CN111984891A - Page display method and device, electronic equipment and storage medium - Google Patents

Page display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111984891A
CN111984891A CN202010789343.6A CN202010789343A CN111984891A CN 111984891 A CN111984891 A CN 111984891A CN 202010789343 A CN202010789343 A CN 202010789343A CN 111984891 A CN111984891 A CN 111984891A
Authority
CN
China
Prior art keywords
page
information
filtering
user
text
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.)
Pending
Application number
CN202010789343.6A
Other languages
Chinese (zh)
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.)
Amusement Starcraft Beijing Technology Co ltd
Original Assignee
Amusement Starcraft Beijing Technology 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 Amusement Starcraft Beijing Technology Co ltd filed Critical Amusement Starcraft Beijing Technology Co ltd
Priority to CN202010789343.6A priority Critical patent/CN111984891A/en
Publication of CN111984891A publication Critical patent/CN111984891A/en
Pending legal-status Critical Current

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
    • 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/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • 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/904Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a page display method, a page display device, an electronic device and a storage medium, wherein the method comprises the following steps: determining a page object contained in page data of an initial page; determining a target object which is matched with the filtering characteristics set by the user in the page objects; and displaying the filtered page corresponding to the initial page according to the residual page objects after the target object is filtered. The method and the device realize the targeted and personalized display of the page object according to the user intention, thereby meeting different display requirements of different users for the same page.

Description

Page display method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of page display, and in particular, to a page display method and apparatus, an electronic device, and a storage medium.
Background
Sensitive information such as foul words, sensitive dialects, violent videos, bloody fishy pictures and the like may be contained in the page displayed by the page display device. In order to avoid discomfort possibly brought to a user by displaying the sensitive information, in the related art, a data sender such as a website examines page data to filter the sensitive information in the page data, so that a page only containing a page object corresponding to non-sensitive information is displayed for the user.
However, because different users have different concerns about sensitive information, even in a page after being audited by a website, some users may feel uncomfortable due to the existence of a part of page objects, and the part of page objects does not feel uncomfortable to other users. Therefore, the sensitive information auditing mode is difficult to meet different display requirements of different users for the same page.
Disclosure of Invention
The disclosure provides a page display method, a page display device, electronic equipment and a storage medium, so as to display page contents individually for different users. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a page display method is provided, including:
determining a page object contained in page data of an initial page;
determining a target object which is matched with the filtering characteristics set by the user in the page objects;
and displaying the filtered page corresponding to the initial page according to the residual page objects after the target object is filtered.
Optionally, the determining the page object included in the page data of the initial page includes:
analyzing page data of an initial page to generate a page structure document corresponding to the initial page;
and determining the page object contained in the page data by traversing the nodes of the page structure document.
Optionally, the method further includes:
acquiring input information from the user;
wherein the filtering feature comprises the input information and/or feature information extracted from the input information.
Optionally, the acquiring input information from the user includes:
reading input information generated by the user at historical time from a preset storage space;
and if the reading from the preset storage space fails, displaying a feature setting interface, and receiving input information formed in the feature setting interface by the user.
Optionally, the method further includes:
expanding the input information and/or the feature information according to a preset expansion rule to obtain expanded information;
wherein the filtering feature further comprises the extension information.
Optionally, the extension rule includes at least one of:
homophone word replacement, near meaning word replacement, special symbol replacement and translation replacement.
Optionally, the filtering feature includes text filtering information, and the determining a target object in the page object that matches the filtering feature set by the user includes:
extracting text information in the page object;
calculating the text similarity between the text information and the text filtering information;
and determining the page object as a target object matched with the filtering characteristics set by the user under the condition that the text similarity is not greater than a preset text similarity threshold value.
Optionally, the calculating the text similarity between the text information and the text filtering information includes:
calculating an average literal distance between the first text and the second text, and determining the average literal distance as the text similarity of the text information and the text filtering information; alternatively, the first and second electrodes may be,
calculating cosine similarity between the first text and the second text, and determining the cosine similarity as text similarity between the text information and the text filtering information; alternatively, the first and second electrodes may be,
and calculating semantic similarity between the first text and the second text by using a pre-trained semantic similarity calculation model, and determining the semantic similarity as the text similarity between the text information and the text filtering information.
Optionally, the filtering feature includes image filtering information, and the determining a target object in the page object that matches the filtering feature set by the user includes:
extracting image information of any picture object or any video frame object in the page object;
calculating the image similarity of the image information and the image filtering information;
and determining any picture object or any video frame object as a target object matched with the filtering characteristics set by the user when the image similarity is not greater than a preset image similarity threshold value.
Optionally, the image information includes a first image and the image filtering information includes a second image, and the calculating the image similarity between the image information and the image filtering information includes:
respectively extracting a first characteristic region in the first image and a second characteristic region in the second image by adopting a characteristic region extraction algorithm;
calculating the region similarity between the first characteristic region and the second characteristic region based on the pixel values of all pixel points in the first characteristic region and the second characteristic region;
and determining the region similarity as the image similarity of the image information and the image filtering information.
Optionally, the method further includes: replacing the target object in the page data by using a preset replacement object;
the displaying the filtered page corresponding to the initial page according to the remaining page objects after the target object is filtered out includes:
and generating and displaying a filtered page corresponding to the initial page according to the preset replacing object and other objects except the target object in the page data.
Optionally, the displaying the filtered page corresponding to the initial page according to the remaining page objects after the target object is filtered out includes:
filtering out node elements corresponding to the target object in the page structure document of the initial page;
and rendering the page according to the page structure document with the node elements filtered out so as to display the filtered page.
Optionally, the displaying the filtered page corresponding to the initial page according to the remaining page objects after the target object is filtered out includes:
generating object change information before and after the target object is filtered;
and rendering the page according to the object change information and the page structure document of the initial page so as to display the filtered page.
Optionally, the method further includes:
and after a characteristic clearing instruction sent by the user aiming at the filtering characteristic is received, triggering and executing the refreshing operation aiming at the filtered page.
According to a second aspect of the embodiments of the present disclosure, a page displaying apparatus is provided, including:
a page object determination module configured to determine a page object included in page data of an initial page;
a target object determination module configured to determine a target object in the page objects that matches a filtering feature set by a user;
and the page display module is configured to display the filtered page corresponding to the initial page according to the residual page objects after the target objects are filtered out.
Optionally, the page object determination module is further configured to:
analyzing page data of an initial page to generate a document object model page structure document corresponding to the initial page;
and determining the page object contained in the page data by traversing the nodes of the page structure document.
Optionally, the apparatus further comprises:
an input information acquisition module configured to acquire input information from the user;
wherein the filtering feature comprises the input information and/or feature information extracted from the input information.
Optionally, the input information obtaining module is further configured to:
reading input information generated by the user at historical time from a preset storage space;
and if the reading from the preset storage space fails, displaying a feature setting interface, and receiving input information formed in the feature setting interface by the user.
Optionally, the apparatus further comprises:
the extended information acquisition module is configured to extend the input information and/or the feature information according to a preset extension rule to obtain extended information;
wherein the filtering feature further comprises the extension information.
Optionally, the extension rule includes at least one of:
homophone word replacement, near meaning word replacement, special symbol replacement and translation replacement.
Optionally, the filtering feature includes text filtering information, and the target object determining module includes:
and the text object determining unit is configured to extract text information in the page object, calculate text similarity between the text information and the text filtering information, and determine the page object as a target object matched with the filtering characteristics set by the user when the text similarity is not greater than a preset text similarity threshold.
Optionally, the text information includes a first text and the text filtering information includes a second text, and the text object determining unit is further configured to:
calculating an average literal distance between the first text and the second text, and determining the average literal distance as the text similarity of the text information and the text filtering information; alternatively, the first and second electrodes may be,
calculating cosine similarity between the first text and the second text, and determining the cosine similarity as text similarity between the text information and the text filtering information; alternatively, the first and second electrodes may be,
and calculating semantic similarity between the first text and the second text by using a pre-trained semantic similarity calculation model, and determining the semantic similarity as the text similarity between the text information and the text filtering information.
Optionally, the filtering feature includes image filtering information, and the target object determining module further includes: an image object determining unit configured to extract image information of any one of the picture objects or any one of the video frame objects in the page object, calculate an image similarity between the image information and the image filtering information, and determine the any one of the picture objects or the any one of the video frame objects as a target object matching the filtering feature set by the user if the image similarity is not greater than a preset image similarity threshold.
Optionally, the image information includes a first image and the image filtering information includes a second image, the image object determining unit is further configured to:
respectively extracting a first characteristic region in the first image and a second characteristic region in the second image by adopting a characteristic region extraction algorithm;
calculating the region similarity between the first characteristic region and the second characteristic region based on the pixel values of all pixel points in the first characteristic region and the second characteristic region;
and determining the region similarity as the image similarity of the image information and the image filtering information.
Optionally, the method further includes: an object replacement module configured to replace the target object in the page data with a preset replacement object;
the page presentation module is further configured to: and generating and displaying a filtered page corresponding to the initial page according to the preset replacing object and other objects except the target object in the page data.
Optionally, the page display module includes:
the element filtering unit is configured to filter out node elements corresponding to the target object in the page structure document of the initial page;
and the first display unit is configured to render the page according to the page structure document with the node elements filtered out so as to display the filtered page.
Optionally, the page display module further includes:
a replacement recording unit configured to generate object change information before and after the target object is filtered;
and the second display unit is configured to render the page according to the object change information and the page structure document of the initial page so as to display the filtered page.
Optionally, the method further includes:
and the characteristic clearing module is configured to trigger and execute the refreshing operation aiming at the filtered page after receiving a characteristic clearing instruction which is sent by the user aiming at the filtering characteristic.
According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page presentation method as described in any of the embodiments of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, a storage medium is provided, where instructions in the storage medium, when executed by a processor of an electronic device, enable a page display device to perform the page display method described in any one of the above first aspects.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the embodiment of the disclosure, the page display device filters the page objects according to the filtering characteristics set by the user, and only displays the filtered page generated according to the rest page objects for the user after filtering the target objects matched with the filtering characteristics in the page objects. Because the filtering characteristics are set by the user, the page object in the filtered page cannot cause discomfort of the user, and the targeted and personalized display of the page object is realized according to the intention of the user, so that different display requirements of different users for the same page can be better met.
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 and are not to be construed as limiting the disclosure.
FIG. 1 is a flowchart illustrating a page presentation method according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating another page presentation method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating yet another page display method according to an embodiment of the present disclosure;
FIG. 4 is a schematic block diagram illustrating a page presentation apparatus in accordance with an embodiment of the present disclosure;
fig. 5 is a block diagram illustrating an electronic device in accordance with an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. 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.
At present, whether a browser installed on the page display device accesses a webpage or corresponding network resources are acquired through various application programs, various sensitive information such as insulting vocabularies, sensitive dialects, violent videos, blood fishy pictures and the like may be contained in a page displayed for a user by the page display device. In order to avoid discomfort possibly brought to a user by displaying the sensitive information, in the related art, a data sender such as a website examines page data to filter the sensitive information in the page data, so that a page only containing a page object corresponding to non-sensitive information is displayed for the user.
However, because different users have different concerns about sensitive information, even in a page after being audited by a website, some users may feel uncomfortable due to the existence of a part of page objects, and the discomfort of other users may not be caused by the part of page objects. Therefore, the sensitive information auditing mode is difficult to meet different display requirements of different users for the same page.
In order to solve the technical problem of displaying the page content individually for different users, the disclosure provides a page display method. Fig. 1 is a flowchart illustrating a page display method according to an embodiment of the disclosure, which is applied to a page display device. As shown in fig. 1, the method may include:
step 102, determining a page object contained in the page data of the initial page.
It should be noted that the page display device disclosed in the present disclosure may include, but is not limited to, an electronic device such as a mobile phone, a computer, a wearable device, and a tablet computer. The page display method is realized by page display software in the page display equipment, for example, the page display method can be realized by a system function of the page display software, and also can be realized by a function plug-in of the page display software. The page display software may be a browser or other program software with a page display function. The specific implementation manners of the page display device, the page display software and the page display method are not limited in the present disclosure.
The initial page described in this disclosure is a page that has not been subjected to page object filtering. The page data of the initial page is the page related data of the page object including the initial page. For example, the HTML (HyperText Markup Language) file corresponding to the initial page, or the set of page object information extracted from the HTML file may be used. The page object is an object to be displayed included in the page, and may be a display object in the form of, for example, text, expression, picture, audio, video, or the like.
In one embodiment, page data of an initial page may be parsed to generate a page structure document to which the initial page corresponds, and then page objects contained in the page data may be determined by traversing nodes (nodes) of the page structure document. For example, when the page structure Document is a DOM (Document Object Model) tree, the page Object included in the page data may be determined by traversing the node Value (node Value) of each node in the DOM tree, and specific ways of generating and traversing the DOM tree may refer to the contents disclosed in the related art, which are not described herein again. Because the page objects of the initial page are contained in the page structure document, all page objects or some type of partial page data of the initial page can be queried by traversing the page structure document. Especially, under the condition that the page structure document is a DOM tree, all page objects in the page data can be searched in order according to the page layout and the page framework of the initial page, the comprehensiveness and the integrity of the searched page data are ensured, and therefore the page objects are prevented from being omitted.
And 104, determining a target object which is matched with the filtering characteristics set by the user in the page objects.
In one embodiment, input information from a user may also be obtained, and accordingly, the filtering feature may be the input information. At the moment, the input information generated by the user is directly set as the filtering characteristic, so that the filtering characteristic can more accurately reflect the filtering willingness of the user to the page, and the accuracy and pertinence of the setting of the filtering characteristic are ensured. The filtering features can also be feature information extracted from the input information, and the feature information is extracted based on the input information input by the user, so that the user does not need to accurately input the input information directly used as the filtering features, the operation cost of setting the filtering features by the user is reduced, the convenience of setting operation is improved, and meanwhile, the filtering features set by the user are more comprehensive. Of course, the filtering feature may also include the input information and the extension information at the same time, so as to achieve both the convenience of the user operation and the comprehensiveness of the filtering feature.
Furthermore, the input information generated by the user at the historical time can be read from the preset storage space, and the input information generated at the historical time can be the input information generated by the user before the current time, so that the input information of the user has continuity, repeated input of the user is avoided, and the operation of the user is simplified. The input information generated by the user at the historical time may be stored in a cache space of the page display device, or may be stored in a local cache of the page display device, such as a localstorage file corresponding to a browser.
If the reading is successful, the read input information generated by the user at the historical time can be used as the input information of the user. Otherwise, if the reading fails, it indicates that the input information generated by the user at the historical time is not stored in the local cache, and the characteristic setting interface can be displayed at this time, and the input information formed in the characteristic setting interface by the user is received. After receiving the input information formed in the characteristic setting interface by the user, the input can be stored in the local cache, so that the input information generated by the user at the historical moment can be directly read from the local cache when the input information needs to be determined next time, and the acquisition time of the input information is saved.
Of course, the input information generated by the user at the historical time may also be acquired from a distributed cache or a server, where the distributed cache may be a redis cache or a Memcached cache, and the like. The process of obtaining the input information from the distributed cache or the server can be referred to the disclosure in the related art, and is not described herein again.
In an embodiment, the input information and/or the feature information may be expanded according to a preset expansion rule to obtain expanded information, and at this time, the filtering feature further includes the expanded information, so that the filtering feature set by the user is more comprehensive. The expansion rule may include one or more of homophone word replacement, synonym word replacement, special symbol replacement, translation replacement, and/or translation replacement, so as to meet different display requirements of different users as much as possible and simplify the setting operation of the user.
In an embodiment, the determined filtering feature set by the user may have multiple formats, and the page data of the initial presentation page may also include multiple page objects, so that for any page object, different target object determination manners may be adopted based on different formats of the filtering feature.
As an exemplary embodiment, the filtering feature set by the user includes text filtering information, at this time, text information in the page object may be extracted, a text similarity between the text information and the text filtering information is calculated, and if the calculated text similarity is not greater than a preset text similarity threshold, the page object is determined as a target object matching the filtering feature set by the user. The text information may include a first text, and the text filtering information may include a second text, and various methods may be used to calculate the text similarity. For example, to verify the degree of similarity of the text information to each text or each font in the text filtering information, an average literal distance between the first text and the second text may be calculated and determined as the text similarity of the text information to the text filtering information. For another example, to determine the overall similarity between the text information and the text filtering information, the cosine similarity between the first text and the second text may be calculated, and the cosine similarity is determined as the text similarity between the text information and the text filtering information, at this time, the pre-similarity may reflect the average similarity between the two pieces of information, thereby avoiding a large error that may be introduced by individual text or font in the two pieces of information. For another example, a training sample containing text information and text filtering information under various scenes may be used in advance to train the semantic similarity calculation model, and after the training and verification are completed (meeting a preset accuracy requirement), the semantic similarity between the first text and the second text is calculated by using the model, and the semantic similarity is determined as the text similarity between the text information and the text filtering information; at the moment, the pre-trained voice similarity calculation model is used for calculating the semantic similarity between the first text and the second text, so that a large amount of information can be processed conveniently, the similarity calculation speed can be accelerated, and the object filtering and page display efficiency can be improved.
As another exemplary embodiment, the filtering feature includes image filtering information, in this case, image information of any one of the image objects or any one of the video frame objects in the page object may be extracted, an image similarity between the image information and the image filtering information is calculated, and if the calculated image similarity is not greater than a preset image similarity threshold, the any one of the image objects or any one of the video frame objects is determined as a target object matching the filtering feature set by the user. The image information may include a first image, the image filtering information may include a second image, and at this time, a feature region extraction algorithm may be adopted to respectively extract a first feature region in the first image and a second feature region in the second image, then, a region similarity between the first feature region and the second feature region is calculated based on pixel values of pixels in the first feature region and the second feature region, and then, the region similarity is determined as an image similarity between the image information and the image filtering information. The image similarity between the image information and the image filtering information is calculated in a characteristic region extraction mode, compared with a complete image similarity calculation mode, the calculation data amount is greatly reduced, and the similarity calculation speed is favorably accelerated.
Therefore, based on different formats (text formats or image formats) of the filtering characteristics, whether the page object is the target object is determined by calculating the similarity, so that only the page object with the same format as the filtering characteristics needs to be judged, the number of the page objects needing to be judged is reduced, and the determination efficiency of the target object is improved.
In an embodiment, a preset replacing object may be used to replace a target object determined from the page data, and then a filtered page corresponding to the initial page is generated and displayed according to the preset replacing object and other objects except the target object in the page data. Through the replacement of the target object, only the preset replacement object is displayed in the filtered page without displaying the corresponding target object, so that the replacement filtering of the target object is realized, and a user can know whether the replaced target object exists at the corresponding position in the filtered page.
And 106, displaying the filtered page corresponding to the initial page according to the residual page objects after the target objects are filtered.
In an embodiment, a node element corresponding to the target object in the page structure document of the initial page may be filtered, and then page rendering may be performed according to the page structure document after the node element is filtered, so as to display a corresponding filtered page. At the moment, the updating of the page structure document is realized by replacing the node elements corresponding to the target object in the page structure document of the initial page, so that the filtered page can be directly displayed only by rendering according to the updated page structure document subsequently, and the rendering and displaying processes of the filtered page are changed little and are more convenient.
In an embodiment, object change information before and after the target object is filtered may be recorded, and then page rendering may be performed according to the object change information and a page structure document corresponding to the page data, so as to display a corresponding filtered page. At this time, only the object change information of the initial page corresponding to the filtering feature set by the user needs to be additionally recorded, and the page structure document corresponding to the initial page does not need to be changed, so that even if the user changes the filtering feature in the filtered page, the page data does not need to be obtained again from the server or the page structure document of the initial page is not needed to be regenerated, thereby effectively reducing the additional data transmission caused by the change of the filtering feature after the filtered page is displayed, being beneficial to reducing the number of requests and reducing the network load. In the two implementations, the page structure document uniformly adopts a DOM tree corresponding to an initial page.
In an embodiment, after a feature clearing instruction issued by a user for a filtering feature is received, a refresh operation for a filtered page may be triggered to be executed. For example, the page data of the initial page may be retrieved from the server and the refresh is implemented by rendering and displaying the initial page, or the refresh may be implemented by rendering the page data of the initial page and the page structure document thereof. And responding to the characteristic clearing operation of the user, and realizing normal display of the initial page through page refreshing.
According to the embodiment of the disclosure, the page display device filters the page objects according to the filtering characteristics set by the user, so as to filter out the target objects matched with the filtering characteristics in the page objects, and only displays the filtered pages generated according to the remaining page objects for the user. The method and the device ensure that the page objects in the filtered page do not cause discomfort to the user, thereby realizing personalized display of the page objects according to the will of the user and better meeting different display requirements of different users.
Referring to fig. 2, the following describes in detail the process of filtering the target object and displaying the corresponding page after the user sets the filtering feature, by taking the page display software as a browser and the page structure document as a DOM tree as an example. The method is applied to the page display equipment. As shown in fig. 2, another page display method flowchart may include:
step 202, a feature setting interface is displayed for a user to set filtering features.
The page display method described in this embodiment may be provided to the user as a browser integration function or a browser plug-in. Therefore, in this embodiment, the feature setting interface may be presented to the user after the user performs the preset operation with respect to the integrated function or the plug-in. For example, a feature setting button may be displayed in a toolbar of the browser, and when the user clicks the trigger button, the feature setting interface may be presented in a currently displayed interface of the browser, or in a new page that pops up.
In one embodiment, the feature setting interface may include a filtering feature input box and accordingly take a filtering keyword in a text form input in the filtering feature input box by the user as the pre-input information. The filtering feature input box may sequentially receive only one filtering keyword input by the user, or may notify that a plurality of filtering keywords distinguished according to a preset interval format are received. The feature setting interface or the filtering feature input box may further include a voice input control, and accordingly, the filtering keyword in the voice form input by the user through the voice input control is used as the pre-input information, or the filtering keyword in the text form converted from the voice input by the user through the voice input control through voice recognition may be used as the pre-input information. The feature setting interface may further include a confirmation control, and in a process of receiving pre-input information in a text form input by a user through the filter feature input box or receiving pre-input information in a voice form input by the user through the voice input control, may detect whether the confirmation control is triggered, and determine the pre-input information in the text form received by the filter feature input box or the pre-input information in the voice form received by the voice input control as the user input information when the confirmation control is detected to be triggered.
The feature setting interface can further comprise a picture feature uploading control, and the picture feature uploading control is used for enabling a user to upload the filtered image in the form of the picture as the pre-input information. After the user selects the filtering image to be uploaded through the picture feature uploading control and the corresponding pop-up window, if the user triggers the confirmation control of the pop-up window or the confirmation control, the filtering image can be determined as the input information of the user. The feature setting interface may further include a feature clearing control, and after the user performs a preset triggering operation for the feature clearing control, all the set filter features may be cleared, and a refresh for the current display interface may be triggered. Of course, the feature setting interface may also include other objects, which the present disclosure does not limit.
Step 204, determining and saving the filtering characteristics according to the input information of the user.
In one embodiment, the input information input by the user may be directly determined as the filtering feature set by the user, for example, a filtering keyword in a text form input by the user may be directly determined as the filtering feature. After receiving the input information input by the user, the feature information extracted from the input information may be determined as the filtering feature, for example, feature information such as a text keyword, an audio change rate, a loudness change curve, and the like may be extracted from the filtering keyword in the form of speech uploaded by the user through speech recognition, or feature information such as a pixel value change rate or character information included in a picture may be extracted from a filtering image in the form of a picture through an intelligent algorithm, and then the one or more kinds of feature information may be determined as the filtering feature.
In an embodiment, the input information or the feature information may be expanded according to a preset expansion rule to obtain expanded information, and then the expanded information is directly determined as the filtering feature, or a user determines that all or part of the expanded information is determined as the filtering feature. For example, the expansion rule may be one or more of homophone word replacement, synonym word replacement, special symbol replacement, translation replacement, and the like.
For example, in the feature setting interface of the browser, after the user inputs the filtering keyword "heart" in the form of characters, the expanded information "new heart" and "new reservoir" can be obtained by expanding according to the homophone replacement rule, the expanded information "atrium" (of course, "ventricle", "heart valve", etc.) can be obtained by expanding according to the synonym replacement rule, and the expanded information can be obtained by expanding according to the special symbol replacement rule
Figure BDA0002623201050000121
According to the translated text substitution ruleThe extension results in extension information "heart". At this time, the extended information may be directly determined as the filtering feature, or a selected control may be added to each extended information, and whether the extended information is determined as the filtering feature is determined according to an operation performed by a user for the selected control corresponding to each extended information. Of course, the extension rule is not limited to the above rule, and the confirmation method of the extension information is not limited to the above method, and may be adjusted according to specific situations, which is not limited in the present disclosure.
After the filtering feature is determined, the filtering feature may be stored in a preset storage space, for example, may be stored in a local cache, a preset distributed cache, or a non-cache storage space corresponding to the browser, so as to avoid that the filtering feature is cleared after the browser is closed. In addition, in the case where the filter characteristic is different from the corresponding input information, the input information corresponding to the filter characteristic may be stored in association with the filter characteristic in a storage space preset for the user so that the filter characteristic may be newly determined based on the input information if necessary.
Therefore, the filtering characteristics are determined according to the user input information, and any page needing to be displayed by the browser can be displayed after being filtered by using the filtering characteristics after the filtering characteristics are determined. Therefore, the interval between when the above filtering feature is saved and when a new page is presented is not determined, and thus the basic disclosure does not limit the interval between step 204 and step 206.
Step 206, obtain the DOM tree corresponding to the initial page and traverse its DOM tree nodes to determine the page object.
In an embodiment, after receiving a display instruction issued by a user for any initial page, the method may obtain page data of the initial page, for example, an HTML file corresponding to the page, based on an instruction of a server, then parse the page data to generate a DOM tree corresponding to the initial page, and then determine a page object included in the page data by traversing nodes of the DOM tree.
As an exemplary embodiment, the information type of the filtering feature may be determined first, and then the page object corresponding to the information type may be found by traversing the DOM tree. For example, if the information type of the filtering feature is a text type, the information type of the corresponding page object may include a text type, a picture type, a voice type, a video type, and the like; if the information type of the filtering feature is a picture type, the information type of the corresponding page object can comprise the picture type or a video type; if the information type of the filtering feature is a voice type, the information type of the corresponding page object may include a voice type or a video type including voice. As can be seen, the traversal in this embodiment may be a complete traversal with an unlimited condition, or an incomplete traversal with a limited condition, and at this time, the determination speed of the page object may be increased.
In step 208, the object similarity between the object information of the page object and the feature information of the filtering feature is calculated.
Step 210, determining whether the object similarity satisfies a similarity threshold.
One or more page objects may be determined in step 206 above. In one embodiment, after all the page objects are determined, similarity calculation can be sequentially performed on object information of each page object and feature information of the filtering features, so that page refreshing times are reduced as much as possible; or in the traversing process, similarity calculation is carried out on object information and feature information of the filtering features when one page object is determined, and the target object is filtered out in time.
In an embodiment, for any page object, the object information of the page object and the feature information of the filtering feature may be extracted, and then the object similarity between the object information and the feature information is calculated to determine whether the page object is a target object. For example, in a case where the filtering feature includes text filtering information, text information in any page object may be extracted, and then a text similarity between the text information and the text filtering information is calculated, and if the calculated text similarity is not greater than a preset text similarity threshold, the page object may be determined as a target object matching the filtering feature set by the user. For example, in the case where any of the page objects is a text object, the text object may be directly determined as text information; under the condition that any page object is a picture object, text information in the picture object can be identified through an intelligent image algorithm; under the condition that any page object is a voice object, recognizing text information (namely, converting voice into characters) corresponding to voice in the voice object through an intelligent voice algorithm; in the case that any page object is a video object, text information in a video frame image of the video object may be identified through an intelligent image algorithm, or text information (i.e., speech-to-text) corresponding to video speech of the video object may be identified through an intelligent speech algorithm, or text information in a subtitle file may be identified by extracting the subtitle file of the video object.
In the case that the filtering feature includes image filtering information, image information of any picture object or any video frame object in the page object may be extracted, then image similarity between the image information of the picture object or the video frame object and the image filtering information is calculated, and if the calculated image similarity is not greater than a preset image similarity threshold, the picture object or the video frame object is determined as a target object matching the filtering feature set by the user.
In an embodiment, the text similarity may be calculated comprehensively according to multiple factors, such as the same character ratio, the same character ratio at the same position, the homophone ratio, the similar meaning word ratio, the special symbol ratio, the translation ratio, and the like in the text information.
In an embodiment, regarding the image similarity, the picture object or the video frame object may be converted into the same format and size as the user input picture corresponding to the image filtering information, such as rgba format, 119 × 160 pixel size, and then the image similarity between the picture object or the video frame object (not denoted as X) and the user input picture (not denoted as S) is calculated according to the following formula (1):
Sim(X|S)=[x1(r,g,b,a)/s1(r,g,b,a)+x2(r,g,b,a)/s2(r,g,b,a)+…xn(r,g,b,a)/sn(r,g,b,a)]/n (1)
wherein, x1(r, g, b, a) represents each dimension pixel value of the first pixel point of the picture object or the video frame object, and s1(r, g, b, a) represents each dimension pixel value of the first pixel point of the user input picture, which are similar to each other and are not repeated. As can be seen, the closer Sim (X | S) calculated by equation (1) is to 1, the more similar the above-mentioned picture object or video frame object is to the user input picture. Therefore, in the case where Sim (X | S) -1 (or | Sim (X | S) -1|) satisfies the preset image similarity threshold, it may be considered that the picture object or the video frame object is sufficiently similar to the user input picture, that is, the picture object or the video frame object is determined to be the target object. For example, if Sim (X | S) -1<0.2, it is possible to determine that the picture object or the video frame object is the target object.
Of course, the degree of deviation between the above-mentioned picture object or video frame object and the user input picture can also be calculated by the following formula (2):
Dev(X|S)={|[x1(r,g,b,a)-s1(r,g,b,a)]/s1(r,g,b,a)|+|[x2(r,g,b,a)-s2(r,g,b,a)]/s2(r,g,b,a)|…+|[xn(r,g,b,a)-sn(r,g,b,a)]/sn(r,g,b,a)|}/n (2)
wherein, x1(r, g, b, a) represents each dimension pixel value of the first pixel point of the picture object or the video frame object, and s1(r, g, b, a) represents each dimension pixel value of the first pixel point of the user input picture, which are similar to each other and are not repeated. It can be seen that the more the Dev (X | S) calculated by equation (2) is close to 0, the more similarity between the above picture object or video frame object and the user input picture is indicated. Therefore, in the case that Dev (X | S) satisfies the preset image similarity threshold, the picture object or the video frame object may be considered to be sufficiently similar to the user input picture, i.e. the picture object or the video frame object is determined to be the target object. For example, it can be determined that the above-described picture object or video frame object is a target object in the case of Dev (X | S) < 0.5.
In another embodiment, for the image similarity, in the case that the sizes of the picture object or the video frame object and the picture uploaded by the user are different, the similarity between different areas of the picture object or the video frame object and the picture uploaded by the user may be sequentially calculated by areas. For example, all pixel points of a picture uploaded by a user or identified feature regions corresponding to feature information may be determined, then, the region similarity between the feature regions and partial regions of the same size in the picture object or the video frame object is sequentially calculated in a sliding manner according to a preset pixel point gradient in all pixel points of the picture object or the video frame object, and under the condition that the calculated region similarity satisfies a preset region similarity threshold, the corresponding similar regions in the picture object or the video frame object are determined as target regions.
Of course, the calculation of the similarity may be performed by other formulas, and the disclosure does not limit the specific manner of calculating the similarity.
After all the target objects (or the target areas) in the page object are determined, step 212 is performed; otherwise, if no target object (or any target area) is determined, the process proceeds to step 216.
Step 212, filtering the target objects in the page objects and generating a filtered DOM tree.
And step 214, rendering the page based on the filtered DOM tree.
In one embodiment, the determined target object may be directly deleted from the page data of the initial page to implement filtering of the target object, and then the filtered DOM tree is generated based on the remaining page objects. However, it should be noted that the remaining page objects after the target data is deleted should keep the original position relationship and reference relationship unchanged, so as to ensure the normal display effect of the filtered page.
In another embodiment, the target object in the page data may be replaced with a preset replacement object, and then a filtered DOM tree is generated based on the replaced replacement object and the remaining objects in the page data except the target object, and then. The preset replacing object may be a preset symbol, such as "+", "# #, etc., a preset character, such as" replaced here "," filtered ", etc., or a combination of a character and a symbol, such as" < replaced >, "| |", etc! Filtered, etc., so that the replacement object is displayed at the original display position corresponding to the target to clearly inform the user that the object replacement has occurred at the corresponding position, thereby facilitating the user to know the details of the replacement and to view the displayed filtered page.
Specifically, when a target object in a certain picture form in the page data has a target region, the entire target object may be replaced for the replacement of the target object, or the pixel values of target pixels in the target region of the target object may be set to be preset pixel values, for example, in an RGB format, the pixel values of the target pixels may be uniformly set to be (255 ), that is, the target region is replaced with a pure white background; the pixel value of the target pixel point can also be uniformly set as the average value of the pixel values of the pixel points at the edge of the area, so that sudden changes of the display effect possibly brought after the target pixel point is uniformly set as the background of the preset color can be reduced as much as possible.
And after the replacement is finished, rendering the page (namely rendering the filtered page) according to the filtered DOM tree to generate corresponding rendering data.
At step 216, a page rendering is performed based on the initial DOM tree.
At this time, the target object does not exist in the page data, that is, the user sensitive information does not exist in the initial page, so that the initial page does not need to be specially processed, and only the page rendering is performed according to the DOM number of the initial page to generate the rendering data of the initial page.
And step 218, displaying the corresponding page according to the rendering result.
The filtered page is displayed based on the rendering data of the filtered page generated in step 214, or the initial page is displayed based on the rendering data of the initial page generated in step 216. And at the display position corresponding to the target object in the filtered page, not displaying any page object (blank), or only displaying the background, or displaying a corresponding replacement object.
For the specific processes of rendering the page based on the DOM tree in the above steps 214 and 216 to generate the rendering data, and displaying the corresponding page based on the rendering data in the step 218, reference may be made to the contents disclosed in the related art, which is not limited by the present disclosure.
In the embodiment of adapting the user to set the "heart" in text form as the filtering feature, the initial page of the current webpage in the browser may include a text region and a picture region, wherein the text region includes the target object in text form, and the picture region includes the target object in picture form.
The text object displayed in the text area is judged to contain the target object through the processing of the page display method, and therefore, the target object is replaced by using the preset replacing character. At this time, the preset replacing characters are all displayed at the display position of the target object in the text area, and the original target object heart is not displayed, so that the filtering of the target object in the initial page is realized.
If the user uploads the feature picture about the heart in the feature setting interface, the picture object displayed in the picture area is determined as the target object through the processing of the page display method, so that the picture object can be replaced by a preset replacement picture. At this time, the preset replacement picture is displayed at the display position of the target object in the picture area, and the original vivid cardiac picture is not displayed, so that the filtering of the target object in the initial page is realized, and the replacement picture displayed in the filtered page may include "! And the explanation text of the original picture which is filtered out is used for informing the user of the replacement effect.
In addition, the replacement characters or the replacement pictures can be respectively and correspondingly associated with the replaced target objects (correspondingly, the filtered target objects can be cached in advance in the filtering process), so that after the user triggers the replacement characters or the replacement pictures, the triggered replacement characters or the replacement pictures are restored to the corresponding target objects, the user can flexibly select the replacement characters or the replacement pictures, and key information in the filtered pages is prevented from being omitted.
Up to this point, the description of the page presentation method shown in fig. 2 has been completed. The embodiment shown in fig. 2 is only described by taking the example that the user sets the filtering characteristics in advance and the filtering of the target object is realized based on the updated DOM tree as an example. In fact, the filtering feature may also be obtained after the initial page is displayed to perform filtering processing on the initial page displayed, and the target object is filtered based on the object change information, which is described below with reference to a flowchart of another page display method shown in fig. 3, where the method may include the following steps:
step 302, obtaining initial page data and displaying the initial page.
First, after obtaining page data of an initial page, the page display device may display the initial page by generating a DOM tree and rendering the page (through page display software). In fact, the process is a conventional method for displaying pages in the related art, and is not described herein again.
And step 304, acquiring the filtering characteristics set by the user.
After the initial page is displayed, the user may find that the initial page includes the sensitive information deemed by the user, so that the user may set the corresponding filtering feature according to the integration function or the function plug-in provided by the page display software, and the corresponding feature setting interface and the specific setting process may refer to the descriptions of the foregoing step 202 to step 204, which are not described herein again.
In one embodiment, the local cache may also be automatically queried by the page presentation device to obtain input information generated by the user at historical times, and then determine corresponding filtering characteristics based on the input information. The local cache can be automatically inquired by the page display equipment to acquire the filtering characteristics set by the user at the historical moment so as to further accelerate the speed of the filtering characteristics.
Step 306, obtain the DOM tree corresponding to the initial page and traverse its DOM tree nodes to determine the page object.
In step 308, the object similarity between the object information of the page object and the feature information of the filtering feature is calculated.
In step 310, it is determined whether the object similarity satisfies a similarity threshold.
The specific contents of the steps 306-310 are not substantially different from the contents of the steps 206-210, and reference is made to the above contents, which are not described herein again.
In step 312, object change information of the target object in the initial DOM tree is generated.
As described above, after the target object is determined, there are two display modes for the corresponding filtered page: a blank or background is exposed (corresponding to the deletion of the target object), and a replacement object is exposed (corresponding to the replacement of the target object with the replacement object). Therefore, in this embodiment, any one of the above presentation manners may be determined according to actual needs or user settings, and accordingly, the corresponding object change information may be generated based on the deletion target object or the replacement target object.
In an embodiment, the object change information may include information such as content, a presentation position, and/or a logical relationship with other page objects of the target object, and the corresponding change operation is a delete operation. In another embodiment, the object change information may include information such as content, presentation position, and/or logical relationship with other page objects of the target object, and content of the replacement object, and the corresponding change operation is a replacement operation.
And step 314, rendering the page based on the initial DOM tree and the object change information.
After the object change information is generated, page rendering may be performed based on the DOM tree of the initial page and the object change information, thereby generating rendering data of the filtered page.
In step 316, page rendering is performed based on the initial DOM tree.
And 318, displaying the corresponding page according to the rendering result.
The specific contents of the steps 316-318 are not substantially different from the contents of the steps 216-218, and reference is made to the above contents, which are not described herein again.
Since the filtering characteristics are determined and the filtering process is performed after the initial page is displayed in the present embodiment, it can be understood that the displaying process of step 318 is actually a refreshing process for the displayed initial page, where the page before refreshing (initial page) includes the user-sensitive target object, and the page after refreshing (filtered page) does not include the user-sensitive target object, so as to implement filtering of the page objects in the page.
In an embodiment, in the case that the filtered page has been presented, the user may choose to clear all the filtering features, and after receiving a feature clearing instruction issued by the user, the refresh operation of the currently presented page may be triggered. For example, the page data of the initial page may be re-acquired from the server and the display is completed, or the corresponding object change information may be deleted, and then the corresponding initial page is displayed based on the generated DOM tree corresponding to the initial page, thereby realizing the refresh of the currently displayed filtered page. In addition, when the page display software background opens multiple filtered pages, only the currently displayed filtered page may be refreshed, or all the filtered pages may be refreshed, which is not limited by the present disclosure.
Corresponding to the embodiment of the page display method, the disclosure also provides an embodiment of a page display device.
Fig. 4 is a schematic block diagram illustrating a page presentation apparatus according to an embodiment of the present disclosure. The page display device shown in this embodiment may be applied to a page display application, where the application is applied to a page display device, and the page display device includes, but is not limited to, an electronic device such as a mobile phone, a tablet computer, a wearable device, and a personal computer. The video playing application may be a browser installed in the page display device, or may be other non-browser applications with a page display function, such as an instant messaging application, a data query application, and the like, and a user may view a displayed page through the page display application.
As shown in fig. 4, the page presentation apparatus may include:
a page object determination module 401 configured to determine a page object included in page data of an initial page;
a target object determination module 402 configured to determine a target object in the page objects that matches a filtering feature set by a user;
the page display module 403 is configured to display the filtered page corresponding to the initial page according to the remaining page objects from which the target object is filtered out.
Optionally, the page object determining module 401 is further configured to:
analyzing page data of an initial page to generate a document object model page structure document corresponding to the initial page;
and determining the page object contained in the page data by traversing the nodes of the page structure document.
Optionally, the apparatus further comprises:
an input information acquisition module 404 configured to acquire input information from the user;
wherein the filtering feature comprises the input information and/or feature information extracted from the input information.
Optionally, the input information obtaining module 404 is further configured to:
reading input information generated by the user at historical time from a preset storage space;
and if the reading from the preset storage space fails, displaying a feature setting interface, and receiving input information formed in the feature setting interface by the user.
Optionally, the apparatus further comprises:
an extended information obtaining module 405 configured to extend the input information and/or the feature information according to a preset extension rule to obtain extended information;
wherein the filtering feature further comprises the extension information.
Optionally, the extension rule includes at least one of:
homophone word replacement, near meaning word replacement, special symbol replacement and translation replacement.
Optionally, the filtering feature includes text filtering information, and the target object determining module 402 includes:
a text object determining unit 402A configured to extract text information in the page object, calculate a text similarity between the text information and the text filtering information, and determine the page object as a target object matching the filtering feature set by the user if the text similarity is not greater than a preset text similarity threshold.
Optionally, the text information includes a first text and the text filtering information includes a second text, and the text object determining unit 402A is further configured to:
calculating an average literal distance between the first text and the second text, and determining the average literal distance as the text similarity of the text information and the text filtering information; alternatively, the first and second electrodes may be,
calculating cosine similarity between the first text and the second text, and determining the cosine similarity as text similarity between the text information and the text filtering information; alternatively, the first and second electrodes may be,
and calculating semantic similarity between the first text and the second text by using a pre-trained semantic similarity calculation model, and determining the semantic similarity as the text similarity between the text information and the text filtering information.
Optionally, the filtering feature includes image filtering information, and the target object determining module 402 further includes: an image object determining unit 402B configured to extract image information of any picture object or any video frame object in the page objects, calculate an image similarity of the image information and the image filtering information, and determine the any picture object or the any video frame object as a target object matching the filtering feature set by the user in a case that the image similarity is not greater than a preset image similarity threshold.
Optionally, the image information includes a first image and the image filtering information includes a second image, the image object determining unit 402B is further configured to:
respectively extracting a first characteristic region in the first image and a second characteristic region in the second image by adopting a characteristic region extraction algorithm;
calculating the region similarity between the first characteristic region and the second characteristic region based on the pixel values of all pixel points in the first characteristic region and the second characteristic region;
and determining the region similarity as the image similarity of the image information and the image filtering information. Optionally, the method further includes:
an object replacement module 406 configured to replace the target object in the page data with a preset replacement object;
the page presentation module 403 is further configured to: and generating and displaying a filtered page corresponding to the initial page according to the preset replacing object and other objects except the target object in the page data.
Optionally, the page displaying module 403 includes:
an element filtering unit 403A configured to filter out a node element corresponding to the target object in the page structure document of the initial page;
the first display unit 403B is configured to perform page rendering according to the page structure document with the node elements filtered out, so as to display the filtered page.
Optionally, the page displaying module 403 further includes:
a replacement recording unit 403C configured to generate object change information before and after the target object filtering;
a second display unit 403D, configured to perform page rendering according to the object change information and the page structure document of the initial page, so as to display the filtered page.
Optionally, the method further includes:
and the feature clearing module 407 is configured to trigger execution of a refresh operation on the filtered page after receiving a feature clearing instruction issued by the user for the filtering feature.
An embodiment of the present disclosure also provides an electronic device, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page presentation method according to any of the above embodiments.
Embodiments of the present disclosure further provide a storage medium, where when an instruction in the storage medium is executed by a processor of an electronic device, the electronic device is enabled to execute the page display method according to any of the above embodiments.
An embodiment of the present disclosure further provides a computer program product, where the computer program product is configured to execute the page display method in any of the above embodiments.
Fig. 5 is a schematic block diagram illustrating an electronic device in accordance with an embodiment of the present disclosure. For example, the electronic device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like. ,
referring to fig. 5, electronic device 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 518.
The processing component 502 generally controls overall operation of the electronic device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the page presentation method described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 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.
The power supply component 506 provides power to the various components of the electronic device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 500.
The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. 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 508 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 electronic device 500 is in an operating mode, such as a shooting 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 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 500 is in an operational 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 504 or transmitted via the communication component 518. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 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 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 may detect an open/closed state of the electronic device 500, the relative positioning of components, such as a display and keypad of the electronic device 500, the sensor assembly 514 may detect a change in the position of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, orientation or acceleration/deceleration of the electronic device 500, and a change in the temperature of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 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 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 518 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 518 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 518 further includes a Near Field Communication (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 embodiment of the present disclosure, the electronic device 500 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-mentioned page showing method.
In an embodiment of the present disclosure, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the electronic device 500 to perform the page presentation 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.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
It is noted that, in the present disclosure, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and apparatus provided by the embodiments of the present disclosure are described in detail above, and the principles and embodiments of the present disclosure are explained herein by applying specific examples, and the above description of the embodiments is only used to help understanding the method and core ideas of the present disclosure; meanwhile, for a person skilled in the art, based on the idea of the present disclosure, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present disclosure should not be construed as a limitation to the present disclosure.

Claims (10)

1. A page display method is characterized by comprising the following steps:
determining a page object contained in page data of an initial page;
determining a target object which is matched with the filtering characteristics set by the user in the page objects;
and displaying the filtered page corresponding to the initial page according to the residual page objects after the target object is filtered.
2. The method of claim 1, wherein determining the page objects contained in the page data of the initial page comprises:
analyzing page data of an initial page to generate a page structure document corresponding to the initial page;
and determining the page object contained in the page data by traversing the nodes of the page structure document.
3. The method of claim 1, further comprising:
acquiring input information from the user;
wherein the filtering feature comprises the input information and/or feature information extracted from the input information.
4. The method of claim 3, wherein the obtaining input information from the user comprises:
reading input information generated by the user at historical time from a preset storage space;
and if the reading from the preset storage space fails, displaying a feature setting interface, and receiving input information formed in the feature setting interface by the user.
5. The method of claim 3, further comprising:
expanding the input information and/or the feature information according to a preset expansion rule to obtain expanded information;
wherein the filtering feature further comprises the extension information.
6. The method of claim 5, wherein the extended rule comprises at least one of:
homophone word replacement, near meaning word replacement, special symbol replacement and translation replacement.
7. The method of claim 1, wherein the filtering features comprise text filtering information, and wherein the determining the target object of the page objects that matches the filtering features set by the user comprises:
extracting text information in the page object;
calculating the text similarity between the text information and the text filtering information;
and determining the page object as a target object matched with the filtering characteristics set by the user under the condition that the text similarity is not greater than a preset text similarity threshold value.
8. A page display apparatus, comprising:
a page object determination module configured to determine a page object included in page data of an initial page;
a target object determination module configured to determine a target object in the page objects that matches a filtering feature set by a user;
and the page display module is configured to display the filtered page corresponding to the initial page according to the residual page objects after the target objects are filtered out.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page presentation method of any one of claims 1 to 7.
10. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the page presentation method of any one of claims 1 to 7.
CN202010789343.6A 2020-08-07 2020-08-07 Page display method and device, electronic equipment and storage medium Pending CN111984891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010789343.6A CN111984891A (en) 2020-08-07 2020-08-07 Page display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010789343.6A CN111984891A (en) 2020-08-07 2020-08-07 Page display method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111984891A true CN111984891A (en) 2020-11-24

Family

ID=73445733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010789343.6A Pending CN111984891A (en) 2020-08-07 2020-08-07 Page display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111984891A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434070A (en) * 2020-12-14 2021-03-02 四川长虹电器股份有限公司 Paging query method based on similarity algorithm
CN112732398A (en) * 2021-02-02 2021-04-30 三盟科技股份有限公司 Big data visualization management method and system based on artificial intelligence
WO2022218351A1 (en) * 2021-04-14 2022-10-20 浙江口碑网络技术有限公司 Page element display method, service information providing method, device and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324888A (en) * 2007-06-13 2008-12-17 北京恒金恒泰信息技术有限公司 Plug-in card for filtering eroticism software based on IE
CN102789484A (en) * 2012-06-28 2012-11-21 奇智软件(北京)有限公司 Method and device for webpage information processing
CN106055574A (en) * 2016-05-19 2016-10-26 微梦创科网络科技(中国)有限公司 Method and device for recognizing illegal URL
CN107329981A (en) * 2017-06-01 2017-11-07 北京京东尚科信息技术有限公司 The method and apparatus of page detection
CN107526842A (en) * 2017-09-22 2017-12-29 深圳互联先锋科技有限公司 A kind of batch monitors multiple Website page method and devices
CN107943954A (en) * 2017-11-24 2018-04-20 杭州安恒信息技术有限公司 Detection method, device and the electronic equipment of webpage sensitive information
CN108304584A (en) * 2018-03-06 2018-07-20 百度在线网络技术(北京)有限公司 Illegal page detection method, apparatus, intruding detection system and storage medium
CN108319672A (en) * 2018-01-25 2018-07-24 南京邮电大学 Mobile terminal malicious information filtering method and system based on cloud computing
CN110598115A (en) * 2019-09-18 2019-12-20 北京市博汇科技股份有限公司 Sensitive webpage identification method and system based on artificial intelligence multi-engine
CN111258904A (en) * 2020-01-16 2020-06-09 恩亿科(北京)数据科技有限公司 Webpage element testing method and related device
CN111353112A (en) * 2020-02-27 2020-06-30 百度在线网络技术(北京)有限公司 Page processing method and device, electronic equipment and computer readable medium
CN111382383A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Method, device, medium and computer equipment for determining sensitive type of webpage content

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324888A (en) * 2007-06-13 2008-12-17 北京恒金恒泰信息技术有限公司 Plug-in card for filtering eroticism software based on IE
CN102789484A (en) * 2012-06-28 2012-11-21 奇智软件(北京)有限公司 Method and device for webpage information processing
CN106055574A (en) * 2016-05-19 2016-10-26 微梦创科网络科技(中国)有限公司 Method and device for recognizing illegal URL
CN107329981A (en) * 2017-06-01 2017-11-07 北京京东尚科信息技术有限公司 The method and apparatus of page detection
CN107526842A (en) * 2017-09-22 2017-12-29 深圳互联先锋科技有限公司 A kind of batch monitors multiple Website page method and devices
CN107943954A (en) * 2017-11-24 2018-04-20 杭州安恒信息技术有限公司 Detection method, device and the electronic equipment of webpage sensitive information
CN108319672A (en) * 2018-01-25 2018-07-24 南京邮电大学 Mobile terminal malicious information filtering method and system based on cloud computing
CN108304584A (en) * 2018-03-06 2018-07-20 百度在线网络技术(北京)有限公司 Illegal page detection method, apparatus, intruding detection system and storage medium
CN111382383A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Method, device, medium and computer equipment for determining sensitive type of webpage content
CN110598115A (en) * 2019-09-18 2019-12-20 北京市博汇科技股份有限公司 Sensitive webpage identification method and system based on artificial intelligence multi-engine
CN111258904A (en) * 2020-01-16 2020-06-09 恩亿科(北京)数据科技有限公司 Webpage element testing method and related device
CN111353112A (en) * 2020-02-27 2020-06-30 百度在线网络技术(北京)有限公司 Page processing method and device, electronic equipment and computer readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
小乔与荞麦: "互联网潜规则二 敏感词屏蔽", 《微信公众平台》, pages 1 - 5 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434070A (en) * 2020-12-14 2021-03-02 四川长虹电器股份有限公司 Paging query method based on similarity algorithm
CN112732398A (en) * 2021-02-02 2021-04-30 三盟科技股份有限公司 Big data visualization management method and system based on artificial intelligence
WO2022218351A1 (en) * 2021-04-14 2022-10-20 浙江口碑网络技术有限公司 Page element display method, service information providing method, device and storage medium

Similar Documents

Publication Publication Date Title
US10296201B2 (en) Method and apparatus for text selection
CN111984891A (en) Page display method and device, electronic equipment and storage medium
US20170154104A1 (en) Real-time recommendation of reference documents
CN109471919B (en) Zero pronoun resolution method and device
CN111898388A (en) Video subtitle translation editing method and device, electronic equipment and storage medium
CN113673261A (en) Data generation method and device and readable storage medium
CN106503048B (en) Browser color setting method and device
CN109977424B (en) Training method and device for machine translation model
CN113343675A (en) Subtitle generating method and device for generating subtitles
CN112329480A (en) Area adjustment method and device and electronic equipment
CN115640093A (en) Page rendering method and device, electronic equipment and storage medium
CN108983992B (en) Candidate item display method and device with punctuation marks
CN113326706A (en) Cross-language retrieval method and device and electronic equipment
CN114462410A (en) Entity identification method, device, terminal and storage medium
CN114239531A (en) Template recommendation method and device, electronic equipment and storage medium
CN112579767B (en) Search processing method and device for search processing
CN115713641A (en) Video acquisition method, device and storage medium
CN106354749B (en) Information display method and device
CN108241438B (en) Input method, input device and input device
CN113079311A (en) Image acquisition method and device, electronic equipment and storage medium
CN112182449A (en) Page loading method and device, electronic equipment and storage medium
CN110781689A (en) Information processing method, device and storage medium
CN111444687A (en) Label generation method and device, server and storage medium
WO2022105229A1 (en) Input method and apparatus, and apparatus for inputting
CN111783771B (en) Text detection method, text detection device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination