CN106354749B - Information display method and device - Google Patents

Information display method and device Download PDF

Info

Publication number
CN106354749B
CN106354749B CN201610670510.9A CN201610670510A CN106354749B CN 106354749 B CN106354749 B CN 106354749B CN 201610670510 A CN201610670510 A CN 201610670510A CN 106354749 B CN106354749 B CN 106354749B
Authority
CN
China
Prior art keywords
information
content information
target
text
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610670510.9A
Other languages
Chinese (zh)
Other versions
CN106354749A (en
Inventor
淳刚
刘方
吕帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610670510.9A priority Critical patent/CN106354749B/en
Publication of CN106354749A publication Critical patent/CN106354749A/en
Application granted granted Critical
Publication of CN106354749B publication Critical patent/CN106354749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides an information display method and device, wherein the method comprises the following steps: extracting target content information from a currently displayed page of an application program, wherein the target content information comprises at least one item of title information, text information and label information of the page; and displaying the target content information according to a preset hypertext markup language html format. According to the method and the device, the display mode of the content information in the application program page is provided on the terminal, the user can be ensured to quickly acquire the key information of the page, and the readability is high.

Description

Information display method and device
Technical Field
The present disclosure relates to the field of communications, and in particular, to an information display method and apparatus.
Background
With the rise of mobile internet, more and more users are accustomed to obtaining information through pages displayed by applications (apps) installed on terminals.
However, the user can only read according to the display mode of the App page, and there may be interference information such as advertisements, so that the user cannot quickly acquire the key information therein, and readability is poor.
Disclosure of Invention
In view of the above, the present disclosure provides an information display method and apparatus to solve the deficiencies in the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided an information display method, the method including:
extracting target content information from a currently displayed page of an application program, wherein the target content information comprises at least one item of title information, text information and label information of the page;
and displaying the target content information according to a preset hypertext markup language html format.
Optionally, the extracting target content information from a page currently displayed by an application includes:
acquiring a tree structure corresponding to the currently displayed page of the application program;
analyzing the tree structure and determining an extraction rule for extracting the target content information;
and extracting the target content information from the tree structure according to the extraction rule.
Optionally, the analyzing the tree structure to determine an extraction rule for extracting the target content information includes:
dividing a position range of the alternative position of the target content information in the tree structure;
traversing the tree structure to obtain content information of related nodes, wherein the related nodes are child nodes located at the upper position and/or the lower position of the alternative position;
determining a target position corresponding to the target content information according to at least one item of prestored attribute information of the target content information, the position range and the related node content information;
determining the extraction rule including a correspondence between the target content information and the target location.
Optionally, the dividing the position range of the candidate position where the target content information is located in the tree structure includes:
taking the position of at least one child node of the root node in the tree structure as the title position range of the alternative position of the title information;
and taking the child nodes in the tree structure except the position range of the title as the position range of the text of the alternative position of the text information.
Optionally, the determining a target location corresponding to the target content information according to at least one of pre-stored attribute information of the target content information, the location range, and the content information of the relevant node includes:
when the content information of a first child node located in the title position range meets first preset attribute information and the content information of the related node of the first child node meets first preset content information, taking the position of the first child node as a title target position corresponding to the title information;
when the content information of the related node of a second child node in the text position range meets second preset content information, taking the position of the second child node as a text starting target position corresponding to the text information;
when the content information of the related node of a third child node in the text position range meets third preset content information, taking the position of the third child node as a text ending target position corresponding to the text information;
and when the content information of a fourth child node positioned in the text position range meets second preset attribute information, taking the position of the fourth child node as a label target position corresponding to the label information.
Optionally, the displaying the target content information according to a preset hypertext markup language html format includes:
mapping the target content information into corresponding webpage label information in a preset html format;
and generating and displaying a target webpage according to the content indicated by the corresponding webpage label information in the preset html format.
According to a second aspect of the embodiments of the present disclosure, there is provided an information display apparatus, the apparatus including:
the system comprises an extraction module, a display module and a display module, wherein the extraction module is configured to extract target content information from a page currently displayed by an application program, and the target content information comprises at least one of title information, text information and label information of the page;
and the display module is configured to display the target content information according to a preset hypertext markup language html format.
Optionally, the extraction module comprises:
the obtaining submodule is configured to obtain a tree structure corresponding to the currently displayed page of the application program;
the determining submodule is configured to analyze the tree structure and determine an extraction rule for extracting the target content information;
and the extraction submodule is configured to extract the target content information in the tree structure according to the extraction rule.
Optionally, the determining sub-module includes:
a dividing unit configured to divide a position range of an alternative position where the target content information is located in the tree structure;
the acquisition unit is configured to traverse the tree structure and acquire content information of related nodes, wherein the related nodes are child nodes located at an upper position and/or a lower position of the alternative position;
a first determining unit, configured to determine a target location corresponding to the target content information according to at least one of pre-stored attribute information of the target content information, the location range and the related node content information;
a second determination unit configured to determine the extraction rule including a correspondence between the target content information and the target position.
Optionally, the dividing unit includes:
a first dividing unit, configured to use a position where at least one child node of a root node in the tree structure is located as a title position range of an alternative position where the title information is located;
and the second dividing subunit is configured to take the child nodes except the title position range in the tree structure as the text position range of the alternative position of the text information.
Optionally, the first determining unit includes:
a first determining subunit, configured to, when content information of a first child node located in the title position range satisfies first preset attribute information and the content information of the relevant node of the first child node satisfies first preset content information, take a position where the first child node is located as a title target position corresponding to the title information;
the second determining subunit is configured to, when the content information of the relevant node of a second child node located in the text position range meets second preset content information, take the position of the second child node as a text starting target position corresponding to the text information;
a third determining subunit, configured to, when the content information of the relevant node of a third child node located in the text position range satisfies a third preset content information, take a position of the third child node as a text end target position corresponding to the text information;
and the fourth determining subunit is configured to, when the content information of a fourth child node located in the text position range meets second preset attribute information, take the position of the fourth child node as a tag target position corresponding to the tag information.
Optionally, the display module comprises:
the mapping submodule is configured to map the target content information into corresponding webpage label information in a preset html format;
and the display sub-module is configured to generate and display the target webpage according to the content indicated by the corresponding webpage label information in the preset html format.
According to a third aspect of the embodiments of the present disclosure, there is provided an information display device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
extracting target content information from a currently displayed page of an application program, wherein the target content information comprises at least one item of title information, text information and label information of the page;
and displaying the target content information according to a preset hypertext markup language html format.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, the terminal can automatically extract the target content information from the currently displayed page of the application program, and then display the target content information according to the preset html format. Optionally, the target content information includes at least one of title information, body information, and tag information of the page. Through the process, the display mode of the content information in the application program page is provided on the terminal, and the user can be ensured to quickly acquire the key information of the page, so that the readability is high.
In the embodiment of the present disclosure, optionally, the tree structure corresponding to the currently displayed page of the application program may be obtained first. And further analyzing the tree structure to determine an extraction rule for extracting the target content information, so as to extract the target content information according to the extraction rule. By the process, non-key information such as advertisements and comments in the page can be filtered, and a user can be ensured to quickly acquire the key information.
In the embodiment of the present disclosure, when determining the extraction rule of the target content information, the position range of the alternative position corresponding to the target content information may be first divided, and the tree structure corresponding to the currently displayed page may be traversed, so as to obtain the content information of the relevant node. Further, according to at least one of the pre-stored attribute information of the target content information, the location range and the content information of the relevant node, the target location corresponding to the target content information can be determined, so as to determine the extraction rule. Through the process, the accuracy of the extracted target content information is ensured, and the readability of subsequent display content is enhanced.
In the embodiment of the present disclosure, the target content information may be displayed according to a preset html format. Optionally, the target content information may be mapped to webpage tag information in a preset html format one by one, and then the target webpage is generated and displayed according to the content indicated by the corresponding webpage tag information in the preset html format, so that the applicability is good and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart of an information display method shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart of another information display method shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an information display scenario illustrated by the present disclosure in accordance with an exemplary embodiment;
FIG. 4 is a flow chart illustrating another method of displaying information according to an exemplary embodiment of the present disclosure;
FIG. 5 is a flow chart illustrating another method of displaying information according to an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram of another information display scenario illustrated by the present disclosure in accordance with an exemplary embodiment;
FIG. 7 is a block diagram of an information display device shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 8 is a block diagram of another information display device shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 9 is a block diagram of another information display device shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 10 is a block diagram of another information display device shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 11 is a block diagram of another information display device shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 12 is a block diagram of another information display device shown in accordance with an exemplary embodiment of the present disclosure;
fig. 13 is a schematic view illustrating a structure for an information display device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as operated herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
The information display method provided by the embodiment of the disclosure can be used for a terminal, such as a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like. As shown in fig. 1, fig. 1 is a view illustrating an information display method according to an exemplary embodiment, including the steps of:
in step 101, target content information is extracted from a page currently displayed by an application program, wherein the target content information comprises at least one of title information, text information and tag information of the page.
Alternatively, step 101 is as shown in fig. 2, and fig. 2 is another information display method shown on the basis of the foregoing embodiment shown in fig. 1, and includes the following steps:
in step 101-1, a tree structure corresponding to the page currently displayed by the application program is obtained.
In this step, the terminal may obtain the tree structure corresponding to the page according to a related technique. For example, the terminal may acquire the tree structure by using a tree structure extraction function in the android system, and the extracted tree structure may be as shown in fig. 3.
In step 101-2, the tree structure is analyzed to determine an extraction rule for extracting the target content information.
Alternatively, step 101-2 is shown in fig. 4, and fig. 4 is another information display method shown on the basis of the foregoing embodiment shown in fig. 2, and includes the following steps:
in step 101-21, a position range of the candidate position where the target content information is located is divided in the tree structure.
Tags are part of a message that identifies a keyword in the body, and typically are located within the body's coverage and do not have to be present. Therefore, in the embodiment of the present disclosure, only the title position range of the candidate position where the title information is located and the text position range of the candidate position where the text information is located may be divided in the tree structure.
How to divide the title position range and the body position range is described below, respectively.
< title position Range >
In this embodiment of the present disclosure, the terminal may use a position where at least one child node of the root node in the tree structure is located as a title position range of the candidate position where the title information is located.
For example, as shown in fig. 3, the root node 1 includes 3 child nodes, child node 2, child node 3 and child node 4, and the title location range may include locations of the child nodes 2 and 3.
In the embodiment of the present disclosure, in order to avoid missing the header information, the header position range may further include a designated position, for example, in the tree structure shown in fig. 3, the header position range may further include a position where the child node 5 is located in addition to positions where the child node 2 and the child node 3 are located.
< text position Range >
In the embodiment of the present disclosure, the child nodes in the tree structure except for the position range of the title may be used as the position range of the text in the alternative position where the text information is located.
For example, in the tree structure shown in fig. 3, the title position range includes positions of the child nodes 2, 3, and 5, and the text position range may include positions of the child nodes 4, 6, 7, 8, and 9.
Further, considering that the text is generally a continuous segment of text information, the position of the child node 4 may be removed within the text position range. I.e. the text position range may include the positions of the child nodes 6 to 9.
In step 101-22, the tree structure is traversed to obtain the content information of the related nodes.
Wherein the related node is a child node located at an above position and/or a below position of the alternative position.
In this step, the terminal may perform depth-first traversal on the tree structure according to a related technique, thereby obtaining the content information of the related node.
For example, in the tree structure shown in fig. 3, the child node located at the upper position of the child node 3 is the child node 2, and the child node located at the lower position of the child node 3 is the child node 4, and the content information of the child node 2 and the child node 4, that is, the content information of the relevant node of the child node 3, may be obtained in a depth-first traversal manner.
In step 101-23, a target location corresponding to the target content information is determined according to at least one of pre-stored attribute information of the target content information, the location range and the related node content information.
Optionally, the attribute information includes at least character number information.
How to determine the title target position corresponding to the title information, the text target position corresponding to the text information, and the tag target position corresponding to the tag information is described below.
< title target position >
And when the content information of a first child node positioned in the title position range meets first preset attribute information and the content information of the related node of the first child node meets first preset content information, taking the position of the first child node as a title target position corresponding to the title information.
Optionally, the first preset attribute information may be that the number of characters is 8 to 40, and the first preset content information is publishing agency information.
In this embodiment of the disclosure, if a first child node exists in the title position range, content information of the first child node satisfies the first preset attribute information, that is, the number of characters is between 8 and 40, and meanwhile, the content information of the relevant node of the first child node is publishing agency information, it may be determined that the content information of the first child node is the title information, and a position where the first node is located is the title target position.
For example, in the tree structure shown in fig. 3, the previously determined title position range includes positions of the child node 2, the child node 3, and the child node 5, and if the content information of the child node 2 is between 8 and 40 characters and the content information of the related node of the child node 2, that is, the content information of the child node 3 is "a certain publisher", it may be determined that the content information of the child node 2 is the title information and the position where the child node 2 is located is the title target position.
< text object position >
Considering that the text information is generally long, the text target position includes a text starting target position and a text ending target position.
And when the content information of the related node of a second child node in the text position range meets second preset content information, taking the position of the second child node as a text starting target position corresponding to the text information.
Optionally, the second preset content information is author information, for example, reporter information for writing the news.
In this embodiment of the present disclosure, if a second child node exists in the text position range, and the content information of the relevant node of the second child node satisfies the second preset content information, that is, the reporter information, it may be determined that the position of the second child node is the text start target position.
For example, in the tree structure shown in fig. 3, the text position range determined previously includes positions of the child node 4, the child node 6, the child node 7, the child node 8, and the child node 9, and if the content information of the relevant node of the child node 6 assumes that the content information of the child node 5 is some reporter, the position of the child node 6 may be determined to be the text start target position.
And when the content information of the related node of a third child node in the text position range meets third preset content information, taking the position of the third child node as a text ending target position corresponding to the text information.
Optionally, the third preset content information is forwarding information, such as WeChat forwarding and the like.
In this embodiment of the present disclosure, if a third child node exists in the text position range, and the content information of the relevant node of the third child node satisfies the third preset content information, that is, when the third preset content information is forwarding information, it may be determined that the position of the third child node is the text end target position.
For example, in the tree structure shown in fig. 3, the text position range determined before includes positions of the child nodes 6 to 9, and if the content information of the relevant node of the child node 8 assumes that the content information of the child node 9 is forwarded by WeChat, the position of the child node 8 may be determined to be the text end target position.
In the embodiment of the present disclosure, the text information corresponds to content information of a position range from the text start target position to the text end target position.
< tag target position >
And when the content information of a fourth child node positioned in the text position range meets second preset attribute information, taking the position of the fourth child node as a label target position corresponding to the label information.
Considering that general tag information is 2 to 6 words in series, each word includes 2 to 5 character numbers. Alternatively, the second preset attribute information may include 2 to 6 words in series, each word including 2 to 5 character numbers.
In this embodiment of the disclosure, if a fourth child node exists in the title position range, and content information of the fourth child node satisfies the second preset attribute information, it may be determined that the content information of the fourth child node is the tag information, and a position where the fourth node is located is the tag target position. Note that the tag target position is not included in the range from the body start target position to the body end target position.
For example, in the tree structure shown in fig. 3, the text position range determined before includes positions of the child nodes 6 to 8, and if the content information of the child nodes 8 and 9 is between 2 to 6 words and each word includes 2 to 5 characters in number, the content information of the child nodes 8 and 9 may be determined to be label information.
In steps 101-24, the extraction rules comprising the correspondence between the target content information and the target location are determined.
In this step, the terminal directly uses the correspondence between the target content information and the target location determined in the above steps 101 to 23, for example, as shown in table 1, as the extraction rule.
TABLE 1
Figure BDA0001079112710000111
Figure BDA0001079112710000121
In step 101-3, the target content information is extracted from the tree structure according to the extraction rule.
In this step, the terminal may extract the target content information in the tree structure according to the extraction rule according to the related art.
For example, the content information of the position of the child node 2 is extracted as the header information, the content information between the child nodes 6 to 8 is extracted as the body information, and the content information of the child node 9 is extracted as the tag information.
In step 102, the target content information is displayed according to a preset hypertext markup language html format.
Alternatively, step 102 is as shown in fig. 5, and fig. 5 is another information display method shown on the basis of the foregoing embodiment shown in fig. 1, and includes the following steps:
in step 102-1, the target content information is mapped to corresponding webpage tag information in a preset html format.
In this step, the terminal maps the title information into corresponding title webpage tag information according to a related technology, the text information into corresponding body webpage tag information, and the tag information into corresponding tag webpage tag information.
In step 102-2, a target webpage is generated and displayed according to the content indicated by the corresponding webpage label information in the preset html format.
In this step, the terminal generates and displays a target web page based on the content indicated by the corresponding web page tag information in the preset html format according to the related art, for example, as shown in fig. 6.
In the above embodiment, the terminal may automatically extract the target content information from the currently displayed page of the application program, and further display the target content information according to the preset format. Optionally, the target content information includes at least one of title information, body information, and tag information of the page. Through the process, the display mode of the content information in the application program page is provided on the terminal, and the user can be ensured to quickly acquire the key information of the page, so that the readability is high.
Corresponding to the foregoing method embodiments, the present disclosure also provides embodiments of an apparatus.
As shown in fig. 7, fig. 7 is a block diagram of an information display apparatus shown in accordance with an exemplary embodiment of the present disclosure, including:
an extracting module 210 configured to extract target content information from a page currently displayed by an application, wherein the target content information includes at least one of title information, text information and tag information of the page;
and a display module 220 configured to display the target content information according to a preset hypertext markup language html format.
As shown in fig. 8, fig. 8 is a block diagram of another information display device shown in the present disclosure according to an exemplary embodiment, on the basis of the foregoing embodiment shown in fig. 7, the extracting module 210 includes:
the obtaining sub-module 211 is configured to obtain a tree structure corresponding to the currently displayed page of the application program;
a determining sub-module 212 configured to analyze the tree structure and determine an extraction rule for extracting the target content information;
an extracting sub-module 213 configured to extract the target content information in the tree structure according to the extraction rule.
As shown in fig. 9, fig. 9 is a block diagram of another information display device shown in the present disclosure according to an exemplary embodiment, on the basis of the foregoing embodiment shown in fig. 8, the determining sub-module 212 includes:
a dividing unit 212-1 configured to divide a position range of an alternative position where the target content information is located in the tree structure;
an obtaining unit 212-2 configured to traverse the tree structure to obtain content information of related nodes, where the related nodes are child nodes located at an upper position and/or a lower position of the candidate position;
a first determining unit 212-3, configured to determine a target location corresponding to the target content information according to at least one of pre-stored attribute information of the target content information, the location range, and the related node content information;
a second determining unit 212-4 configured to determine the extraction rule including a correspondence between the target content information and the target location.
As shown in fig. 10, fig. 10 is a block diagram of another information display device shown in the present disclosure according to an exemplary embodiment, on the basis of the foregoing embodiment shown in fig. 9, the dividing unit 212-1 includes:
a first dividing unit 212-11 configured to use a position where at least one child node of the root node in the tree structure is located as a title position range of the candidate position where the title information is located;
a second dividing subunit 212-12 configured to use the child nodes in the tree structure except the header position range as the text position range of the candidate position of the text information.
As shown in fig. 11, fig. 11 is a block diagram of another information display device shown in the present disclosure according to an exemplary embodiment, which is based on the foregoing embodiment shown in fig. 10, where the first determining unit 212-3 includes:
a first determining subunit 212-31, configured to, when the content information of a first child node located in the title position range satisfies first preset attribute information and the content information of the relevant node of the first child node satisfies first preset content information, take the position of the first child node as a title target position corresponding to the title information;
a second determining subunit 212-32, configured to, when the content information of the relevant node of a second child node located in the text position range satisfies a second preset content information, take a position of the second child node as a text start target position corresponding to the text information;
a third determining subunit 212-33, configured to, when the content information of the relevant node of a third child node located in the text position range satisfies a third preset content information, take a position of the third child node as a text end target position corresponding to the text information;
and the fourth determining subunit 212-34 is configured to, when the content information of a fourth child node located in the text position range satisfies second preset attribute information, take the position of the fourth child node as the label target position corresponding to the label information.
As shown in fig. 12, fig. 12 is a block diagram of another information display device shown in the present disclosure according to an exemplary embodiment, on the basis of the foregoing embodiment shown in fig. 7, the display module 220 includes:
the mapping sub-module 221, configured to map the target content information to corresponding webpage tag information in a preset html format;
and the display sub-module 222 is configured to generate and display the target webpage according to the content indicated by the corresponding webpage tag information in the preset html format.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
Correspondingly, the present disclosure also provides an information display device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
extracting target content information from a currently displayed page of an application program, wherein the target content information comprises at least one item of title information, text information and label information of the page;
and displaying the target content information according to a preset hypertext markup language html format.
As shown in fig. 13, fig. 13 is a schematic structural diagram of an information display device 1300 according to an exemplary embodiment of the present disclosure. For example, apparatus 1300 may be embodied as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a smart jack, a smart sphygmomanometer, a gaming console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 13, the apparatus 1300 may include one or more of the following components: a processing component 1302, a memory 1304, a power component 1306, a multimedia component 1308, an audio component 1310, an input/output (I/O) interface 1312, a sensor component 1314, and a communication component 1316.
The processing component 1302 generally controls overall operation of the device 1300, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1302 can include one or more modules that facilitate interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate interaction between the multimedia component 1308 and the processing component 1302.
The memory 1304 is configured to store various types of data to support operations at the apparatus 1300. Examples of such data include instructions for any application or method operating on device 1300, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1304 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 1306 provides power to the various components of device 1300. The power components 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 1300.
The multimedia component 1308 includes a screen between the device 1300 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 1300 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1310 is configured to output and/or input audio signals. For example, the audio component 1310 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 1300 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1304 or transmitted via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
The I/O interface 1312 provides an interface between the processing component 1302 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1314 includes one or more sensors for providing various aspects of state assessment for the device 1300. For example, the sensor assembly 1314 may detect the open/closed state of the device 1300, the relative positioning of components, such as a display and keypad of the device 1300, the sensor assembly 1314 may also detect a change in the position of the device 1300 or a component of the device 1300, the presence or absence of user contact with the device 1300, orientation or acceleration/deceleration of the device 1300, and a change in the temperature of the device 1300. The sensor assembly 1314 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, a microwave sensor, or a temperature sensor.
The communication component 1316 is configured to facilitate communications between the apparatus 1300 and other devices in a wired or wireless manner. The apparatus 1300 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1316 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1316 also includes a Near Field Communications (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1300 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods. In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 1304 comprising instructions, executable by the processor 1320 of the apparatus 1300 to perform the method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
The above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (7)

1. An information display method, characterized in that the method comprises:
extracting target content information from a currently displayed page of an application program, wherein the target content information comprises at least one item of title information, text information and label information of the page;
displaying the target content information according to a preset hypertext markup language html format;
the extracting of the target content information from the page currently displayed by the application program includes:
acquiring a tree structure corresponding to the currently displayed page of the application program;
analyzing the tree structure and determining an extraction rule for extracting the target content information;
extracting the target content information from the tree structure according to the extraction rule;
the analyzing the tree structure to determine an extraction rule for extracting the target content information includes:
dividing a position range of the alternative position of the target content information in the tree structure;
traversing the tree structure to obtain content information of related nodes, wherein the related nodes are child nodes located at the upper position and/or the lower position of the alternative position;
determining a target position corresponding to the target content information according to at least one item of prestored attribute information of the target content information, the position range and the related node content information;
determining the extraction rule including a correspondence between the target content information and the target location;
the step of dividing the position range of the alternative position where the target content information is located in the tree structure includes:
taking the position of at least one child node of the root node in the tree structure as the title position range of the alternative position of the title information;
taking the child nodes in the tree structure except the title position range as the text position range of the alternative position of the text information;
the determining a target location corresponding to the target content information according to at least one of pre-stored attribute information of the target content information, the location range and the related node content information includes:
when the content information of the related node of a second child node in the text position range meets second preset content information, taking the position of the second child node as a text starting target position corresponding to the text information;
when the content information of the related node of a third child node in the text position range meets third preset content information, taking the position of the third child node as a text ending target position corresponding to the text information;
the second preset content information is author information, and the third preset content information is forwarding information.
2. The method according to claim 1, wherein the determining the target location corresponding to the target content information according to at least one of pre-stored attribute information of the target content information, the location range, and the content information of the relevant node comprises:
when the content information of a first child node located in the title position range meets first preset attribute information and the content information of the related node of the first child node meets first preset content information, taking the position of the first child node as a title target position corresponding to the title information;
and when the content information of a fourth child node positioned in the text position range meets second preset attribute information, taking the position of the fourth child node as a label target position corresponding to the label information.
3. The method according to claim 1, wherein the displaying the target content information according to a preset hypertext markup language html format comprises:
mapping the target content information into corresponding webpage label information in a preset html format;
and generating and displaying a target webpage according to the content indicated by the corresponding webpage label information in the preset html format.
4. An information display apparatus, characterized in that the apparatus comprises:
the system comprises an extraction module, a display module and a display module, wherein the extraction module is configured to extract target content information from a page currently displayed by an application program, and the target content information comprises at least one of title information, text information and label information of the page;
the display module is configured to display the target content information according to a preset hypertext markup language html format;
wherein the extraction module comprises:
the obtaining submodule is configured to obtain a tree structure corresponding to the currently displayed page of the application program;
the determining submodule is configured to analyze the tree structure and determine an extraction rule for extracting the target content information;
the extraction submodule is configured to extract the target content information in the tree structure according to the extraction rule;
the determination sub-module includes:
a dividing unit configured to divide a position range of an alternative position where the target content information is located in the tree structure;
the acquisition unit is configured to traverse the tree structure and acquire content information of related nodes, wherein the related nodes are child nodes located at an upper position and/or a lower position of the alternative position;
a first determining unit, configured to determine a target location corresponding to the target content information according to at least one of pre-stored attribute information of the target content information, the location range and the related node content information;
a second determination unit configured to determine the extraction rule including a correspondence between the target content information and the target position;
the dividing unit includes:
a first dividing unit, configured to use a position where at least one child node of a root node in the tree structure is located as a title position range of an alternative position where the title information is located;
a second dividing subunit, configured to use child nodes in the tree structure except the title position range as a text position range of the alternative position where the text information is located;
the first determination unit includes:
the second determining subunit is configured to, when the content information of the relevant node of a second child node located in the text position range meets second preset content information, take the position of the second child node as a text starting target position corresponding to the text information;
a third determining subunit, configured to, when the content information of the relevant node of a third child node located in the text position range satisfies a third preset content information, take a position of the third child node as a text end target position corresponding to the text information;
the second preset content information is author information, and the third preset content information is forwarding information.
5. The apparatus according to claim 4, wherein the first determining unit comprises:
a first determining subunit, configured to, when content information of a first child node located in the title position range satisfies first preset attribute information and the content information of the relevant node of the first child node satisfies first preset content information, take a position where the first child node is located as a title target position corresponding to the title information;
and the fourth determining subunit is configured to, when the content information of a fourth child node located in the text position range meets second preset attribute information, take the position of the fourth child node as a tag target position corresponding to the tag information.
6. The apparatus of claim 4, wherein the display module comprises:
the mapping submodule is configured to map the target content information into corresponding webpage label information in a preset html format;
and the display sub-module is configured to generate and display the target webpage according to the content indicated by the corresponding webpage label information in the preset html format.
7. An information display device characterized by comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
extracting target content information from a currently displayed page of an application program, wherein the target content information comprises at least one item of title information, text information and label information of the page;
displaying the target content information according to a preset hypertext markup language html format;
the extracting of the target content information from the page currently displayed by the application program includes:
acquiring a tree structure corresponding to the currently displayed page of the application program;
analyzing the tree structure and determining an extraction rule for extracting the target content information;
extracting the target content information from the tree structure according to the extraction rule;
the analyzing the tree structure to determine an extraction rule for extracting the target content information includes:
dividing a position range of the alternative position of the target content information in the tree structure;
traversing the tree structure to obtain content information of related nodes, wherein the related nodes are child nodes located at the upper position and/or the lower position of the alternative position;
determining a target position corresponding to the target content information according to at least one item of prestored attribute information of the target content information, the position range and the related node content information;
determining the extraction rule including a correspondence between the target content information and the target location;
the step of dividing the position range of the alternative position where the target content information is located in the tree structure includes:
taking the position of at least one child node of the root node in the tree structure as the title position range of the alternative position of the title information;
taking the child nodes in the tree structure except the title position range as the text position range of the alternative position of the text information;
the determining a target location corresponding to the target content information according to at least one of pre-stored attribute information of the target content information, the location range and the related node content information includes:
when the content information of the related node of a second child node in the text position range meets second preset content information, taking the position of the second child node as a text starting target position corresponding to the text information;
when the content information of the related node of a third child node in the text position range meets third preset content information, taking the position of the third child node as a text ending target position corresponding to the text information;
the second preset content information is author information, and the third preset content information is forwarding information.
CN201610670510.9A 2016-08-15 2016-08-15 Information display method and device Active CN106354749B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610670510.9A CN106354749B (en) 2016-08-15 2016-08-15 Information display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610670510.9A CN106354749B (en) 2016-08-15 2016-08-15 Information display method and device

Publications (2)

Publication Number Publication Date
CN106354749A CN106354749A (en) 2017-01-25
CN106354749B true CN106354749B (en) 2020-06-02

Family

ID=57844760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610670510.9A Active CN106354749B (en) 2016-08-15 2016-08-15 Information display method and device

Country Status (1)

Country Link
CN (1) CN106354749B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109683906A (en) * 2018-12-25 2019-04-26 北京小米移动软件有限公司 Handle the method and device of HTML code segment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270206A (en) * 2010-06-03 2011-12-07 北京迅捷英翔网络科技有限公司 Method and device for capturing valid web page contents
CN103577466A (en) * 2012-08-03 2014-02-12 腾讯科技(深圳)有限公司 Method and device for displaying webpage content in browser
CN104484449A (en) * 2014-12-25 2015-04-01 北京国双科技有限公司 Web page text extraction method and web page text extraction device
CN105760527A (en) * 2016-03-02 2016-07-13 百度在线网络技术(北京)有限公司 Method and device for displaying third-party page

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853760B (en) * 2012-12-03 2017-05-03 ***通信集团公司 Method and device for extracting contents of bodies of web pages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270206A (en) * 2010-06-03 2011-12-07 北京迅捷英翔网络科技有限公司 Method and device for capturing valid web page contents
CN103577466A (en) * 2012-08-03 2014-02-12 腾讯科技(深圳)有限公司 Method and device for displaying webpage content in browser
CN104484449A (en) * 2014-12-25 2015-04-01 北京国双科技有限公司 Web page text extraction method and web page text extraction device
CN105760527A (en) * 2016-03-02 2016-07-13 百度在线网络技术(北京)有限公司 Method and device for displaying third-party page

Also Published As

Publication number Publication date
CN106354749A (en) 2017-01-25

Similar Documents

Publication Publication Date Title
US10949490B2 (en) Method and apparatus for displaying webpage content
CN107423106B (en) Method and apparatus for supporting multi-frame syntax
EP2924591A1 (en) Method and device for controlling page rollback
EP3128411B1 (en) Interface display method, terminal, computer program and recording medium
US20170139555A1 (en) Method and device for displaying a message
EP2978170A2 (en) Method, device, terminal and server for pushing message through web application
US9959487B2 (en) Method and device for adding font
US20200159789A1 (en) Method and device for page display, and storage medium
WO2015176483A1 (en) Label creation method and device, and terminal
CN105786944B (en) Method and device for processing automatic page turning of browser
EP3015997A1 (en) Method and device for facilitating selection of blocks of information
US20170155604A1 (en) Method and device for processing information
CN106331328B (en) Information prompting method and device
CN106155703B (en) Emotional state display method and device
CN104951445B (en) Webpage processing method and device
CN108270661B (en) Information reply method, device and equipment
CN106503048B (en) Browser color setting method and device
CN105468606B (en) Webpage saving method and device
CN107402756B (en) Method, device and terminal for drawing page
CN106354749B (en) Information display method and device
CN107679205B (en) Multimedia data playing method and device, computer equipment and storage medium
CN108108356B (en) Character translation method, device and equipment
US20170060822A1 (en) Method and device for storing string
CN110941670B (en) Mark state detection method, device, equipment and storage medium
CN110084065B (en) Data desensitization method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant