Page text processing method and device, equipment and storage medium
By automatically extracting and processing the target web page text when user access to the webpage, the problem of single and inconvenience of web information processing in existing technology has been solved, and more efficient and convenient text information processing is achieved.
Patent Information
- Application Number
- CN202310922312.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art processes web page information in a single way and is not convenient for users to quickly process or expand functions.
By detecting the current access target webpage and triggering the extraction instructions, the text extraction and imported the target dialog box, the target text is responded according to the received text processing instruction, and the results are displayed in the target dialog box.
The automatic extraction and multiple processing methods of the target webpage text when the user accesss the webpage, which improves the convenience and efficiency of text information processing.
Smart Images

Figure CN119377503A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a page text processing method, device, equipment and storage medium. Background Art
[0002] Currently, when users visit a web page, if they want to operate the text information displayed on the web page, they can only manually select the text information, copy it, and then paste it into the search box or the document being processed to perform word processing and implement various functions. This makes it very inconvenient for users to quickly process text information or implement extended functions, and the functions that can be implemented are also very limited.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present invention is to provide a page text processing method, device, equipment and storage medium, aiming to solve the technical problem that the existing technology has a single and inconvenient way of processing web page information.
[0005] To achieve the above object, the present invention provides a page text processing method, which comprises the following steps:
[0006] When the currently visited target web page is detected and the extraction instruction is triggered, text is extracted from the currently visited target web page, and the target text of the extraction result is imported into the target dialog box and displayed;
[0007] Respond to the target text according to the received text processing instruction to obtain a response result text;
[0008] The response result text is displayed in the target dialog box.
[0009] Optionally, when the currently visited target webpage is detected and the extraction instruction is triggered, extracting text from the currently visited target webpage includes:
[0010] When the currently visited target webpage is detected and the extraction instruction is triggered, the target text selected by the user is obtained, and the target text is imported into the target dialog box and displayed.
[0011] Optionally, responding to the target text according to the received text processing instruction to obtain a response result text includes:
[0012] Determining a text processing method according to the text processing instruction;
[0013] The target text is processed according to the text processing method to obtain a response result text.
[0014] Optionally, the processing the target text according to the text processing method to obtain a response result text includes:
[0015] When the text processing method is text interpretation, performing keyword extraction on the target text to obtain at least one target keyword;
[0016] The explanation text of the target keyword is searched, and the response result text is determined according to the explanation text and the target keyword.
[0017] Optionally, determining the response result text according to the explanation text and the target keyword includes:
[0018] Determining the specific keywords in each target keyword according to the interpretation text;
[0019] Generate response result text according to each proprietary keyword and the corresponding explanation text.
[0020] Optionally, the processing the target text according to the text processing method to obtain a response result text includes:
[0021] When the text processing method is text rewriting, semantic analysis is performed on the target text to obtain a semantic analysis result;
[0022] Generate at least one semantic matching text according to the semantic analysis result;
[0023] A response result text is obtained according to the semantic matching text.
[0024] Optionally, obtaining a response result text according to the semantic matching text includes:
[0025] Comparing the similarity between each semantically matched text and the target text;
[0026] According to the comparison result, the semantic matching text with the highest similarity is selected as the response result text.
[0027] Optionally, the processing the target text according to the text processing method to obtain a response result text includes:
[0028] When the text processing method is text translation, determining a target translation language according to the text processing instruction;
[0029] The target text is translated into the target translation language to obtain a response result text.
[0030] Optionally, the processing the target text according to the text processing method to obtain a response result text includes:
[0031] When the text processing method is text summarization, the target text is segmented to obtain a plurality of fragmented sentence texts;
[0032] Performing semantic analysis on the fragmented sentence text to obtain multiple fragmented semantic information;
[0033] Classifying and screening the fragmented semantic information to obtain summary classification information corresponding to the target text;
[0034] A response result text is obtained according to the summary and classification information.
[0035] Optionally, the processing the target text according to the text processing method to obtain a response result text includes:
[0036] When the text processing method is text abbreviation, performing word extraction on the target text to obtain at least one constituent word;
[0037] Constructing a semantic tree of the target text according to the constituent words;
[0038] The semantic tree is abbreviated to obtain a response result text.
[0039] Optionally, extracting text from the currently visited target web page includes:
[0040] When receiving the quick import instruction, obtain all the text information of the current page;
[0041] Determining useless text information based on all the text information;
[0042] The useless text information in the entire text information is deleted to obtain the target text.
[0043] Optionally, extracting text from the currently visited target web page includes:
[0044] When receiving a text selection instruction, determining the selected text according to the text selection instruction;
[0045] Performing semantic analysis on the selected text to obtain selected semantic information;
[0046] The selected text is semantically sorted according to the selected semantic information to obtain a target text.
[0047] Optionally, extracting text from the currently visited target web page includes:
[0048] When receiving a page frame selection instruction, determining a selected page area according to the page frame selection instruction;
[0049] Obtaining regional text information according to the selected page region identification;
[0050] The regional text information is abstracted and extracted to obtain the target text.
[0051] Optionally, extracting text from the currently visited target web page includes:
[0052] When receiving a link selection instruction, determining a selected page according to the link selection instruction;
[0053] The page text information is extracted from the selected page, and the page text information is subjected to text screening to obtain the target text.
[0054] In addition, to achieve the above-mentioned purpose, the present invention also provides a page text processing device, the page text processing device comprising:
[0055] A text import module is used to extract text from the currently visited target web page when the currently visited target web page is detected and the extraction instruction is triggered, and to import the target text of the extraction result into the target dialog box and display it;
[0056] A text processing module, used to respond to the target text according to the received text processing instruction to obtain a response result text;
[0057] The text display module is used to display the response result text in the target dialog box.
[0058] Optionally, the text processing module is further used to determine a text processing method according to the text processing instruction; and process the target text according to the text processing method to obtain a response result text.
[0059] Optionally, the text processing module is also used to extract keywords from the target text to obtain at least one target keyword when the text processing method is text interpretation; query the interpretation text of the target keyword, and determine the response result text based on the interpretation text and the target keyword.
[0060] Optionally, the text processing module is also used to perform semantic analysis on the target text to obtain a semantic analysis result when the text processing method is text rewriting; generate at least one semantic matching text according to the semantic analysis result; and obtain a response result text according to the semantic matching text.
[0061] In addition, to achieve the above-mentioned purpose, the present invention also proposes a page text processing device, which includes: a memory, a processor, and a page text processing program stored in the memory and running on the processor, and the page text processing program is configured to implement the page text processing method described above.
[0062] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a page text processing program is stored, and when the page text processing program is executed by a processor, the page text processing method as described above is implemented.
[0063] When the target webpage currently being visited is detected and the extraction instruction is triggered, the present invention extracts text from the target webpage currently being visited, imports the target text of the extraction result into the target dialog box and displays it; responds to the target text according to the received text processing instruction to obtain the response result text; and displays the response result text in the target dialog box. In this way, the text of the target webpage is automatically extracted when the user visits the webpage, and can be displayed through the automatically generated target dialog box, and the user can process the target text in a variety of different ways through the text processing instruction, which improves the convenience and efficiency of text information processing and also realizes a shortcut to text processing with more functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a structural diagram of a page text processing device in a hardware operating environment involved in an embodiment of the present invention;
[0065] Figure 2 It is a flowchart of the first embodiment of the method for processing page text of the present invention;
[0066] Figure 3 It is a flowchart of a second embodiment of the method for processing page text of the present invention;
[0067] Figure 4 It is a flowchart of a third embodiment of the method for processing page text of the present invention;
[0068] Figure 5 It is a structural block diagram of the first embodiment of the page text processing device of the present invention.
[0069] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0070] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0071] Reference Figure 1 , Figure 1 It is a schematic diagram of the structure of a page text processing device in the hardware operating environment involved in the embodiment of the present invention.
[0072] like Figure 1 As shown, the page text processing device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0073] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the page text processing device, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.
[0074] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a page text processing program.
[0075] exist Figure 1 In the page text processing device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the page text processing device of the present invention can be set in the page text processing device, and the page text processing device calls the page text processing program stored in the memory 1005 through the processor 1001, and executes the page text processing method provided by the embodiment of the present invention.
[0076] The embodiment of the present invention provides a method for processing page text, referring to Figure 2 , Figure 2 The figure is a flow chart of a first embodiment of a method for processing page text according to the present invention.
[0077] In this embodiment, the page text processing method includes the following steps:
[0078] Step S10: when the currently visited target webpage is detected and the extraction instruction is triggered, text extraction is performed on the currently visited target webpage, and the target text of the extraction result is imported into the target dialog box and displayed.
[0079] In this embodiment, the execution subject of this embodiment may be the page text processing device, which has functions such as data processing, data communication and program running, and the page text processing device may be an intelligent terminal, such as a computer, a smart phone, etc. Of course, it may also be other devices with similar functions, and this implementation condition does not limit this. For the convenience of explanation, this implementation is described by taking the page text processing device as an example.
[0080] It should be noted that the target webpage refers to the page currently visited by the user, which can be any Internet page. Specifically, when the currently visited target webpage is detected and the extraction instruction is triggered at the same time, the text of the currently visited target webpage is extracted. The extraction instruction can be an instruction in any form, which can be an instruction for the user to click to enter the target webpage, or the user pointer stays at a position for more than a preset time, or selects the text in the target webpage, or other forms of extraction instructions, which can be set arbitrarily, and this embodiment does not limit this.
[0081] It should be understood that extracting text from the currently visited target text refers to extracting text from all texts on the target webpage, or any specified text, which is not limited in this embodiment, and then importing the extracted results into the target dialog box for display. The target dialog box can be a pre-established blank page, or a floating box, or a temporarily created area marked on the target page.
[0082] Furthermore, in order to facilitate the user to actively select text, step S10 includes: when the currently visited target webpage is detected and the extraction instruction is triggered, the target text selected by the user is obtained, and the target text is imported into the target dialog box and displayed.
[0083] In a specific implementation, the process of extracting text from a target webpage can be to obtain the target text selected by the user, and then import the target text into the target dialog box for display. The target text can be directly selected by the user, or can be text within a selected range in any form such as box selection, delimitation or interception.
[0084] In this way, in addition to the system's automatic text extraction, users can also select target texts by themselves, making text selection more flexible.
[0085] Furthermore, in order to provide more ways to select target text, the step of extracting text from the currently visited target web page includes: when it is detected that the user has selected the target text, when a text selection instruction is received, determining the selected text according to the text selection instruction; performing semantic analysis on the selected text to obtain selected semantic information; and performing semantic organization on the selected text according to the selected semantic information to obtain the target text.
[0086] It should be noted that when a text selection instruction is received from a user through a mouse, keyboard, or voice, the selected text selected by the user is first determined according to the text selection instruction, and then a semantic analysis is performed on the selected text. The selected text can be imported into a preset deep learning model for analysis to obtain selected semantic information of the selected text. Finally, the selected text is semantically sorted based on the selected semantic information, and the text corresponding to repeated and redundant semantics is deleted, so that the target text can be obtained.
[0087] In this way, automatic semantic screening and simplification of the user's selected text is achieved, and the final target text is more concise and easier for users to process and read.
[0088] Furthermore, in order to extract a summary of the text in the target area to obtain the target text, the step of extracting text from the currently visited target web page includes: when a page frame selection instruction is received, determining a selected page area according to the page frame selection instruction; obtaining regional text information according to the selected page area identification; and extracting a summary of the regional text information to obtain the target text.
[0089] It should be understood that when a page selection instruction is received, that is, the user selects or captures a portion of the page area under the target page with the mouse pointer, the selected area is determined as the selected page area, and then all text and characters in the selected page area are extracted and recognized to obtain regional text information. Finally, the regional text information is abstracted, that is, the regional text information is simplified and the sentences corresponding to the central idea are extracted, so that the semantically unchanged and more simplified text information can be obtained, which is the target text.
[0090] In this way, text extraction and summary extraction are automatically performed based on the page area selected by the user, simplifying the user's reading and text extraction process.
[0091] Furthermore, in order to extract text without the user opening a new link, the step of extracting text from the currently visited target web page includes: when a link selection instruction is received, determining a selected page according to the link selection instruction; extracting page text information from the selected page, and performing text screening on the page text information to obtain the target text.
[0092] In a specific implementation, when a link selection instruction is received, it is determined that the user has selected an external link in the target page or a link from another page, and the selection page corresponding to the link selection instruction is opened in the system background, but is not displayed. The system background then automatically extracts text from the selected page to obtain page text information, and then performs text filtering and semantic simplification on the page text information to obtain the target text.
[0093] In this way, after the user selects a link, the text of the selected page can be extracted without the user actively opening it, which makes it easier for the user to extract and operate the text and reduces the user's operation time.
[0094] Step S20: responding to the target text according to the received text processing instruction to obtain a response result text.
[0095] It should be noted that after the target text is displayed in the target dialog box, if a text processing instruction sent by the user is received, the target text is responded to according to the different text processing instructions, specifically, the target text is processed differently to obtain a response result text.
[0096] Step S30: Display the response result text in the target dialog box.
[0097] It should be understood that after the response result text is obtained, the response result text is directly displayed in the target dialog box for display to the user.
[0098] This embodiment extracts text from the target web page being accessed and triggers the extraction instruction, imports the target text of the extraction result into the target dialog box and displays it; responds to the target text according to the received text processing instruction to obtain the response result text; and displays the response result text in the target dialog box. In this way, the text of the target web page is automatically extracted when the user accesses the web page, and can be displayed through the automatically generated target dialog box, and the user can process the target text in a variety of different ways through the text processing instruction, which improves the convenience and efficiency of text information processing and also realizes a shortcut to text processing with more functions.
[0099] refer to Figure 3 , Figure 3 It is a flow chart of a second embodiment of a method for processing page text according to the present invention.
[0100] Based on the first embodiment described above, the page text processing method of this embodiment includes in step S20:
[0101] Step S201: determining a text processing method according to the text processing instruction.
[0102] It should be noted that text processing methods include but are not limited to text interpretation, text rewriting, text translation, text summary and text abbreviation. Users can select a processing method as a text processing instruction based on different text processing methods.
[0103] Step S202: Process the target text according to the text processing method to obtain a response result text.
[0104] It should be understood that the corresponding text processing method is determined according to the text processing instruction, and then the text is automatically processed based on different text processing methods, and then the processed response result text is output.
[0105] Furthermore, in order to realize the text interpretation function, step S202 includes: when the text processing method is text interpretation, performing keyword extraction on the target text to obtain at least one target keyword; querying the interpretation text of the target keyword, and determining the response result text based on the interpretation text and the target keyword.
[0106] In a specific implementation, when the text processing method is determined to be text interpretation, keyword extraction is first performed on the target text to determine at least one target keyword, where the target keyword refers to each word in the target text that contains a specific meaning.
[0107] It should be noted that, after the target keyword is determined, the explanation text corresponding to the target keyword is searched, and then the target keyword and the explanation text are summarized to obtain the response result text.
[0108] In this way, the response result text is determined by extracting keywords and interpreting the query.
[0109] Furthermore, in order to accurately determine the response result text, the step of determining the response result text according to the explanation text and the target keyword includes: determining the specific keywords in each target keyword according to the explanation text; generating the response result text according to each specific keyword and the corresponding explanation text.
[0110] It should be understood that first, the proper nouns or technologies in each target keyword are determined to be used as proper keywords according to the interpretation text, and then the proper keywords and their corresponding interpretation texts are matched to generate response result texts.
[0111] In this way, it is possible to automatically filter out the proper nouns and technical terms in the target keywords and provide corresponding explanatory texts, thereby reducing the difficulty of users in reading the target texts.
[0112] Furthermore, in order to realize the text rewriting function, step S202 includes: when the text processing method is text rewriting, performing semantic analysis on the target text to obtain a semantic analysis result; generating at least one semantic matching text according to the semantic analysis result; and obtaining a response result text according to the semantic matching text.
[0113] In a specific implementation, when the text processing method is determined to be text rewriting, a semantic analysis is first performed on the target text to obtain the semantics corresponding to each paragraph and sentence of the target text as a semantic analysis result.
[0114] It should be noted that after obtaining the semantic analysis results, text matching is performed on the semantic analysis results, that is, a corresponding description text that is different from the target text is generated according to the semantic analysis results as the semantic matching text, and finally a response result text is generated based on the semantic matching text.
[0115] In this way, the semantics of the target text is automatically recognized and rewritten, making it easier for users to edit and transform the text.
[0116] Furthermore, in order to obtain a response result text based on a semantic matching text, the step of obtaining a response result text based on the semantic matching text includes: comparing the similarity between each semantic matching text and the target text; and selecting the semantic matching text with the highest similarity as the response result text based on the comparison result.
[0117] It should be understood that after the semantically matching texts are determined, each semantically matching text is compared with the target text for similarity, and then the semantically matching text with the highest similarity is output as the response result text, thereby achieving that the final rewritten sentence is different from the target text but semantically similar or identical, thereby improving the accuracy and similarity of the text rewriting.
[0118] Furthermore, in order to perform the translation function of the target text, step S202 includes: when the text processing mode is text translation, determining the target translation language according to the text processing instruction; translating the target text into the target translation language to obtain a response result text.
[0119] In a specific implementation, when it is confirmed that the text processing method is text translation, the target language selected by the user to be translated is first determined according to the text processing instruction, for example: Chinese-English, Chinese-French, etc. After the target translation language is determined, the target text is translated into the description of the target translation language to obtain a response result text. The step of translating the target text can be performed by web page translation or artificial intelligence translation, which is not limited in this embodiment.
[0120] In this way, accurate automatic translation based on the target translation language is achieved, making it easier for users to read and process the text.
[0121] Furthermore, in order to realize the text summarizing function, step S202 includes: when the text processing method is text summarizing, segmenting the target text to obtain multiple fragmented sentence texts; performing semantic analysis on the fragmented sentence texts to obtain multiple fragmented semantic information; classifying and screening the fragmented semantic information to obtain summary classification information corresponding to the target text; and obtaining a response result text according to the summary classification information.
[0122] It should be noted that when the text processing method is determined to be text summarization, the target text is first segmented, specifically according to semantics, so that multiple fragmented sentence texts can be obtained. Then, the fragmented sentence texts are used to obtain the semantic information corresponding to each fragmented sentence text, which is the fragmented semantic information.
[0123] It should be understood that after obtaining the fragmented semantic information, it is screened and classified to obtain the central idea of the target text and the fragmented semantic information corresponding to the central idea. Finally, the fragmented sentence text corresponding to the fragmented semantic information is used as summary classification information, and finally the response result text is obtained based on the classified summary information.
[0124] In this way, automatic text summarization is achieved, making it easier for users to understand and read semantics.
[0125] Furthermore, in order to realize the abbreviation function, step S202 includes: when the text processing method is text abbreviation, extracting words from the target text to obtain at least one constituent word; constructing a semantic tree of the target text according to the constituent words; abbreviating according to the semantic tree to obtain a response result text.
[0126] In a specific implementation, when the text processing method is determined to be text abbreviation, firstly, word extraction is performed on the target text, specifically, all words in the target text are split and separated, so as to obtain at least one constituent word.
[0127] It should be noted that after obtaining the constituent words, a semantic tree is constructed according to the word order and the meaning of the words. The constructed semantic tree includes all the constituent idioms, so that semantic simplification can be performed based on the semantic tree to obtain the final response result text.
[0128] In this way, the abbreviation of the target text is automatically processed, which is convenient for users to read and saves reading time.
[0129] This embodiment determines the text processing method according to the text processing instruction; processes the target text according to the text processing method to obtain a response result text. In this way, the target text is automatically processed according to different text processing instructions, and the user's various operation intentions are integrated and automatically identified and processed accordingly, thereby improving the speed and efficiency of the user's text processing.
[0130] refer to Figure 4 , Figure 4 It is a flow chart of a third embodiment of a method for processing page text according to the present invention.
[0131] Based on the first embodiment, the page text processing method of this embodiment extracts text from the currently visited target web page in step S10, including:
[0132] Step S101: upon receiving a quick import instruction, obtaining all text information of the current page.
[0133] It should be noted that after detecting access to the target web page and triggering the extraction instruction, if a quick introduction instruction initiated by the user is received, the current stop page will be the target page for all text information on the current stop page.
[0134] Step S102: Determine useless text information according to all the text information.
[0135] It should be understood that useless text information refers to text that does not express a specific meaning in the entire text information, such as modal particles, punctuation marks, etc.
[0136] Step S103: Delete useless text information from all the text information to obtain the target text.
[0137] In a specific implementation, after useless text information is determined, all useless text information in all text information is deleted, so that all text with semantics and meaning in the target page can be obtained, thereby realizing automatic text screening.
[0138] This embodiment obtains all text information of the current page upon receiving a quick import instruction; determines useless text information based on the entire text information; deletes the useless text information from the entire text information to obtain the target text. In this way, all text with semantics and meaning in the target page is determined, and automatic text screening is achieved, which is convenient for the user's next operation.
[0139] In addition, an embodiment of the present invention further provides a storage medium, on which a page text processing program is stored. When the page text processing program is executed by a processor, the steps of the page text processing method described above are implemented.
[0140] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0141] Reference Figure 5 , Figure 5 It is a structural block diagram of the first embodiment of the page text processing device of the present invention.
[0142] like Figure 5 As shown, the page text processing device proposed in the embodiment of the present invention includes:
[0143] The text import module 10 is used to extract text from the currently visited target web page when the currently visited target web page is detected and the extraction instruction is triggered, and to import the target text of the extraction result into the target dialog box and display it.
[0144] The text processing module 20 is used to respond to the target text according to the received text processing instruction to obtain a response result text.
[0145] The text display module 30 is used to display the response result text in the target dialog box.
[0146] When the target webpage currently being visited is detected and the extraction instruction is triggered, the present embodiment performs text extraction on the target webpage currently being visited, imports the target text of the extraction result into the target dialog box and displays it; responds to the target text according to the received text processing instruction to obtain the response result text; and displays the response result text in the target dialog box. In this way, the text of the target webpage is automatically extracted when the user visits the webpage, and can be displayed through the automatically generated target dialog box, and the user can process the target text in a variety of different ways through the text processing instruction, which improves the convenience and efficiency of text information processing and also realizes a shortcut to text processing with more functions.
[0147] In one embodiment, the text import module 10 is further used to obtain the target text selected by the user when the currently visited target webpage is detected and the extraction instruction is triggered, and to import the target text into the target dialog box and display it.
[0148] In one embodiment, the text processing module 20 is further used to determine a text processing method according to the text processing instruction; and process the target text according to the text processing method to obtain a response result text.
[0149] In one embodiment, the text processing module 20 is also used to extract keywords from the target text to obtain at least one target keyword when the text processing method is text interpretation; query the interpretation text of the target keyword, and determine the response result text based on the interpretation text and the target keyword.
[0150] In one embodiment, the text processing module 20 is further used to determine the specific keywords in each target keyword according to the explanation text; and generate a response result text according to each specific keyword and the corresponding explanation text.
[0151] In one embodiment, the text processing module 20 is also used to perform semantic analysis on the target text to obtain a semantic analysis result when the text processing method is text rewriting; generate at least one semantic matching text according to the semantic analysis result; and obtain a response result text according to the semantic matching text.
[0152] In one embodiment, the text processing module 20 is further used to compare the similarity between each semantic matching text and the target text; and select the semantic matching text with the highest similarity as the response result text according to the comparison result.
[0153] In one embodiment, the text processing module 20 is further configured to, when the text processing mode is text translation, determine a target translation language according to the text processing instruction; and translate the target text into the target translation language to obtain a response result text.
[0154] In one embodiment, the text processing module 20 is also used to, when the text processing method is text summarization, segment the target text to obtain multiple fragmented sentence texts; perform semantic analysis on the fragmented sentence texts to obtain multiple fragmented semantic information; classify and filter the fragmented semantic information to obtain summary classification information corresponding to the target text; and obtain a response result text based on the summary classification information.
[0155] In one embodiment, the text processing module 20 is also used to extract words from the target text to obtain at least one constituent word when the text processing method is text abbreviation; construct a semantic tree of the target text based on the constituent words; and abbreviate based on the semantic tree to obtain a response result text.
[0156] In one embodiment, the text display module 30 is also used to obtain all text information of the current page when receiving a quick introduction instruction; determine useless text information based on the all text information; delete the useless text information in the all text information to obtain the target text.
[0157] In one embodiment, the text display module 30 is further used to determine the selected text according to the text selection instruction when receiving the text selection instruction; perform semantic analysis on the selected text to obtain selected semantic information; and perform semantic arrangement on the selected text according to the selected semantic information to obtain the target text.
[0158] In one embodiment, the text display module 30 is further used to determine the selected page area according to the page frame selection instruction when receiving the page frame selection instruction; obtain regional text information according to the selected page area identification; and extract the summary of the regional text information to obtain the target text.
[0159] In one embodiment, the text display module 30 is further used to determine the selected page according to the link selection instruction when receiving the link selection instruction; extract page text information from the selected page, and perform text screening on the page text information to obtain the target text.
[0160] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0161] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0162] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the page text processing method provided in any embodiment of the present invention, and will not be repeated here.
[0163] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0164] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0166] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
[0167] This solution also proposes A1, a page text processing method, the page text processing method comprising:
[0168] When the currently visited target web page is detected and the extraction instruction is triggered, text is extracted from the currently visited target web page, and the target text of the extraction result is imported into the target dialog box and displayed;
[0169] Respond to the target text according to the received text processing instruction to obtain a response result text;
[0170] The response result text is displayed in the target dialog box.
[0171] A2. The page text processing method as described in A1, wherein when the currently visited target web page is detected and the extraction instruction is triggered, text extraction is performed on the currently visited target web page, including:
[0172] When the currently visited target webpage is detected and the extraction instruction is triggered, the target text selected by the user is obtained, and the target text is imported into the target dialog box and displayed.
[0173] A3, as described in A1, the page text processing method, responding to the target text according to the received text processing instruction to obtain the response result text, including:
[0174] Determining a text processing method according to the text processing instruction;
[0175] The target text is processed according to the text processing method to obtain a response result text.
[0176] A4. The page text processing method as described in A3, wherein the target text is processed according to the text processing method to obtain a response result text, including:
[0177] When the text processing method is text interpretation, performing keyword extraction on the target text to obtain at least one target keyword;
[0178] The explanation text of the target keyword is searched, and the response result text is determined according to the explanation text and the target keyword.
[0179] A5. The page text processing method as described in A4, wherein determining the response result text according to the interpretation text and the target keyword comprises:
[0180] Determining the specific keywords in each target keyword according to the interpretation text;
[0181] Generate response result text according to each proprietary keyword and the corresponding explanation text.
[0182] A6. The page text processing method as described in A3, wherein the target text is processed according to the text processing method to obtain a response result text, including:
[0183] When the text processing method is text rewriting, semantic analysis is performed on the target text to obtain a semantic analysis result;
[0184] Generate at least one semantic matching text according to the semantic analysis result;
[0185] A response result text is obtained according to the semantic matching text.
[0186] A7. The page text processing method as described in A6, wherein obtaining a response result text according to the semantic matching text comprises:
[0187] Comparing the similarity between each semantically matched text and the target text;
[0188] According to the comparison result, the semantic matching text with the highest similarity is selected as the response result text.
[0189] A8, the page text processing method as described in A3, wherein the target text is processed according to the text processing method to obtain a response result text, including:
[0190] When the text processing method is text translation, determining a target translation language according to the text processing instruction;
[0191] The target text is translated into the target translation language to obtain a response result text.
[0192] A9. The page text processing method as described in A3, wherein the target text is processed according to the text processing method to obtain a response result text, including:
[0193] When the text processing method is text summarization, the target text is segmented to obtain a plurality of fragmented sentence texts;
[0194] Performing semantic analysis on the fragmented sentence text to obtain multiple fragmented semantic information;
[0195] Classifying and screening the fragmented semantic information to obtain summary classification information corresponding to the target text;
[0196] A response result text is obtained according to the summary and classification information.
[0197] A10, the page text processing method as described in A3, wherein the target text is processed according to the text processing method to obtain a response result text, including:
[0198] When the text processing method is text abbreviation, performing word extraction on the target text to obtain at least one constituent word;
[0199] Constructing a semantic tree of the target text according to the constituent words;
[0200] The semantic tree is abbreviated to obtain a response result text.
[0201] A11. The page text processing method as described in any one of A1 to A10, wherein extracting text from the currently visited target web page comprises:
[0202] When receiving the quick import instruction, obtain all the text information of the current page;
[0203] Determining useless text information based on all the text information;
[0204] The useless text information in the entire text information is deleted to obtain the target text.
[0205] A12. The page text processing method as described in any one of A1 to A10, wherein extracting text from the currently visited target web page comprises:
[0206] When receiving a text selection instruction, determining the selected text according to the text selection instruction;
[0207] Performing semantic analysis on the selected text to obtain selected semantic information;
[0208] The selected text is semantically sorted according to the selected semantic information to obtain a target text.
[0209] A13. The page text processing method as described in any one of A1 to A10, wherein extracting text from the currently visited target web page comprises:
[0210] When receiving a page frame selection instruction, determining a selected page area according to the page frame selection instruction;
[0211] Obtaining regional text information according to the selected page region identification;
[0212] The regional text information is abstracted and extracted to obtain the target text.
[0213] A14. The page text processing method as described in any one of A1 to A10, wherein extracting text from the currently visited target web page comprises:
[0214] When receiving a link selection instruction, determining a selected page according to the link selection instruction;
[0215] The page text information is extracted from the selected page, and the page text information is subjected to text screening to obtain the target text.
[0216] The present solution further proposes B15, a page text processing device, the page text processing device comprising:
[0217] A text import module is used to extract text from the currently visited target web page when the currently visited target web page is detected and the extraction instruction is triggered, and to import the target text of the extraction result into the target dialog box and display it;
[0218] A text processing module, used to respond to the target text according to the received text processing instruction to obtain a response result text;
[0219] The text display module is used to display the response result text in the target dialog box.
[0220] B16. In the page text processing device as described in B15, the text processing module is further used to determine a text processing method according to the text processing instruction; and process the target text according to the text processing method to obtain a response result text.
[0221] B17. In the page text processing device as described in B16, the text processing module is further used to extract keywords from the target text to obtain at least one target keyword when the text processing method is text interpretation; query the interpretation text of the target keyword, and determine the response result text based on the interpretation text and the target keyword.
[0222] B18. In the page text processing device as described in B16, the text processing module is further used to perform semantic analysis on the target text to obtain a semantic analysis result when the text processing method is text rewriting; generate at least one semantic matching text according to the semantic analysis result; and obtain a response result text according to the semantic matching text.
[0223] The present solution also proposes C19, a page text processing device, which includes: a memory, a processor, and a page text processing program stored in the memory and running on the processor, wherein the page text processing program is configured to implement the page text processing method as described above.
[0224] The present solution also proposes D20, a storage medium, on which a page text processing program is stored, and when the page text processing program is executed by a processor, the page text processing method as described above is implemented.
Claims
1. A page text processing method, characterized in that: The page text processing method comprises: When the currently visited target web page is detected and the extraction instruction is triggered, text is extracted from the currently visited target web page, and the target text of the extraction result is imported into the target dialog box and displayed; Respond to the target text according to the received text processing instruction to obtain a response result text; The response result text is displayed in the target dialog box.
2. The page text processing method according to claim 1, characterized in that: When the currently visited target webpage is detected and the extraction instruction is triggered, text extraction is performed on the currently visited target webpage, including: When the currently visited target webpage is detected and the extraction instruction is triggered, the target text selected by the user is obtained, and the target text is imported into the target dialog box and displayed.
3. The page text processing method according to claim 1, characterized in that: The step of responding to the target text according to the received text processing instruction to obtain a response result text includes: Determining a text processing method according to the text processing instruction; The target text is processed according to the text processing method to obtain a response result text.
4. The page text processing method according to claim 3, characterized in that: The step of processing the target text according to the text processing method to obtain a response result text includes: When the text processing method is text interpretation, performing keyword extraction on the target text to obtain at least one target keyword; The explanation text of the target keyword is searched, and the response result text is determined according to the explanation text and the target keyword.
5. The page text processing method according to claim 4, characterized in that: The step of determining a response result text according to the explanation text and the target keyword includes: Determining the specific keywords in each target keyword according to the interpretation text; Generate response result text according to each proprietary keyword and the corresponding explanation text.
6. The page text processing method according to claim 3, characterized in that: The step of processing the target text according to the text processing method to obtain a response result text includes: When the text processing method is text rewriting, semantic analysis is performed on the target text to obtain a semantic analysis result; Generate at least one semantic matching text according to the semantic analysis result; A response result text is obtained according to the semantic matching text.
7. The page text processing method according to claim 6, characterized in that: The step of obtaining a response result text according to the semantic matching text includes: Comparing the similarity between each semantically matched text and the target text; According to the comparison result, the semantic matching text with the highest similarity is selected as the response result text.
8. A page text processing device, characterized in that: The page text processing device comprises: A text import module is used to extract text from the currently visited target web page when the currently visited target web page is detected and the extraction instruction is triggered, and to import the target text of the extraction result into the target dialog box and display it; A text processing module, used to respond to the target text according to the received text processing instruction to obtain a response result text; The text display module is used to display the response result text in the target dialog box.
9. A page text processing device, characterized in that: The page text processing device comprises: a memory, a processor, and a page text processing program stored in the memory and running on the processor, wherein the page text processing program is configured to implement the page text processing method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a page text processing program, and when the page text processing program is executed by the processor, the page text processing method according to any one of claims 1 to 7 is implemented.