Patent Document ID: 10042827
Application ID: 14411013
Patent Status: 1

Claim One:
1. An apparatus for recognizing non-body text in a webpage, comprising: a memory having instructions stored thereon; and at least one processor to execute the instructions to perform operations comprising: grabbing data associated with one or more webpages of a target website; constructing one or more Document Object Model (DOM) trees corresponding to the one or more webpages of the target website; for each particular DOM tree of the one or more DOM trees: accessing nodes in the particular DOM tree in sequence starting from a root node of the particular DOM tree according to a breadth-first algorithm or a depth-first algorithm, for a current node in the access sequence having a corresponding text section, determining a longest path from the current node to descendant nodes of the particular DOM tree, and comparing the longest path to a predetermined length, determining whether the descendant nodes of the current node contain a complex node, wherein the complex node comprises a node corresponding to at least one of a label table, tr, td, ul, ol, frame, select, input, marquee, and map, when the longest path is less than or equal to the predetermined length and the descendant nodes of the current node do not contain the complex node, determining the text section corresponding to the current node as a unit text section, and determining whether there is at least one node remaining in the particular DOM tree to be accessed by the access sequence, and when there is at least one node to be accessed, determining the at least one node to be accessed as a new current node; counting a number of occurrences of the determined unit text section in the one or more DOM trees corresponding to the one or more webpages of the target web site; determining whether a unit text section having particular content among the one or more DOM trees is non-body text according to the number of occurrences of the unit text section having the particular content in the one or more DOM trees, wherein, when the number of occurrences of the unit text section exceeds a predetermined threshold, the unit text section is determined as the non-body text, and displaying the one or more webpages of the target website by excluding the determined non-body text.