Method and device for displaying corpus resources, storage medium, and electronic device

By using a reader in the learning software to obtain and display source corpus resources and filter the definition content based on word attributes, the problem of automatic matching and display of definition content is solved, selective automatic translation is achieved, and the user experience is improved.

CN112069839BActive Publication Date: 2024-09-20TIANJIN HONGEN FUTURE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010774595.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-04
Publication Date
2024-09-20
Estimated Expiration
2040-08-04

AI Technical Summary

Technical Problem

Existing learning software cannot automatically match and display definition content during the translation process, making it difficult for users to find words that need definition in long texts, resulting in poor user experience.

Method used

Obtain the source corpus resources to be translated through the reader, select the target word set according to the word attributes, and display the source corpus resources and interpretation content in the reader. It supports attribute filtering such as word difficulty, status, and frequency of occurrence to achieve selective automatic translation.

Benefits of technology

It reduces the time required for full text translation, avoids paraphrasing content that users don’t pay attention to taking up a lot of space, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112069839B
    Figure CN112069839B
Patent Text Reader

Abstract

The present invention provides a method and device for displaying corpus resources, a storage medium, and an electronic device, wherein the method comprises: obtaining a source corpus resource to be translated through a reader, wherein the source corpus resource is a corpus resource in a first language; selecting a target word set in the source corpus resource according to word attributes; obtaining the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language; and displaying the source corpus resource and the interpretation content in the reader. The present invention solves the technical problem of not being able to automatically match and display interpretation content in the source corpus resource in the related art, realizes a selective automatic translation solution, reduces the time for translating the entire text, and avoids the interpretation content that the user does not pay attention to occupying a large amount of space in the reader.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method and device for displaying corpus resources, a storage medium, and an electronic device. Background Art

[0002] In the related art, in order to master a certain language, such as English, users will use learning software, such as dictionary software and translation software, to improve language skills through learning tasks.

[0003] In the related art, the reading-assist function in the learning software is usually a simple translation function. By inputting words or texts, the reading-assist module translates them into Chinese or the target language. First, the form of obtaining the source corpus is single. Users can only input manually or copy texts, and cannot obtain corpus from web pages or documents. Secondly, through rough translation of the entire text, users often only pay attention to a few unfamiliar or learning words in the text. It is difficult to find the content that needs to be explained in a long translation manuscript, and the user experience is not good.

[0004] With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for displaying corpus resources, a storage medium, and an electronic device.

[0006] According to one embodiment of the present invention, a method for displaying corpus resources is provided, comprising: obtaining a source corpus resource to be translated through a reader, wherein the source corpus resource is a corpus resource in a first language; selecting a target word set in the source corpus resource according to word attributes; obtaining the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language; and displaying the source corpus resource and the interpretation content in the reader.

[0007] Optionally, selecting a target word set in the source corpus resource according to word attributes includes at least one of the following: selecting a first target word set in the source corpus resource according to a difficulty attribute of the word, wherein the difficulty attribute is used to characterize the difficulty level of the word; selecting a second target word set in the source corpus resource according to a state attribute of the word, wherein the state attribute is used to characterize the user's mastery state of the word.

[0008] Optionally, selecting a target word set in the source corpus resource according to word attributes includes: calculating the occurrence frequency of each word in the source corpus resource; and selecting a third target word set whose occurrence frequency is within a predetermined range in the source corpus resource.

[0009] Optionally, calculating the occurrence frequency of each word in the source corpus resource includes: extracting a first word set whose word attribute is new words from the source corpus resource; and calculating the occurrence frequency of each word in the first word set.

[0010] Optionally, obtaining the source corpus resources to be translated through the reader includes one of the following: uploading the source text loaded in the reader to a network server, wherein the network server is used to segment the corpus resources in the source text through a natural language processing algorithm, restore the deformed forms of the words after segmentation to their original forms, obtain the target text, and encapsulate the target text into a hypertext markup language HTML static file; receiving the HTML static file returned by the network server; uploading the HTML source code of the web page of the URL input in the reader to the server through js injection, wherein the network server is used to obtain the source text file in the web page element of the input URL, segment the corpus resources in the text file through a natural language processing algorithm, restore the deformed forms of the words after segmentation to their original forms, obtain the target text, and encapsulate the target text into a map file; receiving the map file returned by the network server through a js interface; replacing the source text file in the web page of the input URL with the map file.

[0011] Optionally, obtaining the source corpus resource to be translated through the reader includes: extracting a first corpus resource in the source text through the reader; segmenting the first corpus resource through a natural language processing algorithm, and restoring the deformed form of the words after segmentation to the original form, to obtain a second corpus resource.

[0012] Optionally, obtaining the source corpus resource to be translated through a reader includes: loading the web page elements of the source web page through a browser component in the reader, wherein the web page elements include at least one of the following: text, pictures, links; extracting the text content in the web page elements to obtain a third corpus resource; segmenting the third corpus resource through a natural language processing algorithm, and restoring the deformed form of the words after segmentation to the original form to obtain a fourth corpus resource.

[0013] Optionally, displaying the source corpus resource and the interpretation content in the reader includes: locating a target word in the target word set in the source corpus resource; and displaying corresponding interpretation content at a predetermined position of the target word when displaying the source corpus resource in the reader.

[0014] Optionally, displaying the corresponding interpretation content at the predetermined position of the target word includes: matching the display form of the target word based on word attributes; controlling the display form of each target word through a js script or a cascading style sheet CSS; and displaying the target word and the corresponding interpretation content according to the display form at the predetermined position of the target word.

[0015] Optionally, after displaying the source corpus resource and the interpretation content in the reader, the method further includes: generating a reading record of the source corpus resource; when a learning operation of a related word is monitored on the client according to the reading record, pushing a corpus segment of the related word in the source corpus resource, wherein the source corpus resource includes the original form or deformed form of the related word.

[0016] According to another embodiment of the present invention, a display device for corpus resources is provided, comprising: a first acquisition module, used to acquire source corpus resources to be translated through a reader, wherein the source corpus resources are corpus resources in a first language; a selection module, used to select a target word set in the source corpus resources according to word attributes; a second acquisition module, used to acquire the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language; and a display module, used to display the source corpus resources and the interpretation content in the reader.

[0017] Optionally, the selection module includes at least one of the following: a first selection unit, used to select a first target word set in the source corpus resource according to a difficulty attribute of the word, wherein the difficulty attribute is used to characterize the difficulty level of the word; a second selection unit, used to select a second target word set in the source corpus resource according to a state attribute of the word, wherein the state attribute is used to characterize the user's mastery state of the word.

[0018] Optionally, the selection module includes: a calculation unit, used to calculate the occurrence frequency of each word in the source corpus resource; and a third selection unit, used to select a third target word set whose occurrence frequency is within a predetermined range in the source corpus resource.

[0019] Optionally, the calculation unit includes: an extraction subunit, used to extract a first word set whose word attribute is new words from the source corpus resource; and a calculation subunit, used to calculate the occurrence frequency of each word in the first word set.

[0020] Optionally, the first acquisition module includes one of the following: a first acquisition unit, used to upload the source text loaded in the reader to a network server, wherein the network server is used to segment the corpus resources in the source text through a natural language processing algorithm, restore the deformed forms of the words after segmentation to their original forms, obtain the target text, and encapsulate the target text into a hypertext markup language HTML static file; receive the HTML static file returned by the network server; a second acquisition unit, used to upload the HTML source code of the web page of the URL input in the reader to the server through js injection, wherein the network server is used to obtain the source text file in the web page element of the input URL, segment the corpus resources in the text file through a natural language processing algorithm, restore the deformed forms of the words after segmentation to their original forms, obtain the target text, and encapsulate the target text into a map file; receive the map file returned by the network server through a js interface; replace the source text file in the web page of the input URL with the map file.

[0021] Optionally, the first acquisition module includes: a first extraction unit, used to extract a first corpus resource in a source text through a reader; a first processing unit, used to segment the first corpus resource through a natural language processing algorithm, and restore the deformed form of the words after segmentation to the original form to obtain a second corpus resource.

[0022] Optionally, the first acquisition module includes: a loading unit, used to load web page elements of a source web page through a browser component in a reader, wherein the web page elements include at least one of the following: text, pictures, links; a second extraction unit, used to extract text content in the web page elements to obtain a third corpus resource; a second processing unit, used to segment the third corpus resource through a natural language processing algorithm, and restore the deformed form of the words after segmentation to the original form to obtain a fourth corpus resource.

[0023] Optionally, the display module includes: a positioning unit, used to locate the target word in the target word set in the source corpus resource; and a display unit, used to display the corresponding interpretation content at a predetermined position of the target word when displaying the source corpus resource in the reader.

[0024] Optionally, the display unit includes: a matching subunit, used to match the display form of the target word based on word attributes; a control subunit, used to control the display form of each target word through a js script or a cascading style sheet CSS; and a display subunit, used to display the target word and the corresponding interpretation content at a predetermined position of the target word according to the display form.

[0025] Optionally, the device also includes: a generation module, which is used to generate a reading record of the source corpus resource after the display module displays the source corpus resource and the interpretation content in the reader; and a push module, which is used to push the corpus segment of the relevant word in the source corpus resource when a learning operation of the relevant word is monitored on the client according to the reading record, wherein the source corpus resource includes the original form or deformed form of the relevant word.

[0026] According to another embodiment of the present invention, a system for displaying corpus resources is provided, comprising: a client and a network server, wherein the client comprises: a first acquisition module, used to acquire source corpus resources to be translated through a reader, wherein the source corpus resources are corpus resources in a first language; an upload module, used to upload source text or HTML source code of the source corpus resources to the network server; a selection module, used to select a target word set from the source corpus resources according to word attributes; a second acquisition module, used to acquire the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language; a display module, used to display the source corpus resources and the interpretation content in the reader; the network server comprises: a receiving module, used to Receive the source text or HTML source code of the source corpus resource uploaded by the client; a processing module is used to segment the corpus resources in the source text through a natural language processing algorithm, restore the deformed forms of the words after segmentation to the original form, obtain the target text, and encapsulate the target text into a hypertext markup language HTML static file; or, obtain the source text file in the web page element of the input URL, segment the corpus resources in the text file through a natural language processing algorithm, restore the deformed forms of the words after segmentation to the original form, obtain the target text, and encapsulate the target text into a map file; receive the map file returned by the network server through a js interface; a return module is used to return the HTML static file or the map file to the client.

[0027] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.

[0028] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0029] Through the present invention, a source corpus resource to be translated is obtained through a reader, and then a target word set is selected from the source corpus resource according to word attributes, the interpretation content of each word in the target word set is obtained, and the source corpus resource and the interpretation content are displayed in the reader. By selecting a target word set that a user is interested in from the entire source corpus resource, and synchronously displaying the interpretation content of the target word when displaying the source corpus resource in the reader, the technical problem in the related art that the interpretation content cannot be automatically matched and displayed in the source corpus resource is solved, a selective automatic translation solution is implemented, the time for translating the entire article is reduced, and at the same time, it is avoided that the interpretation content that the user is not interested in occupies a large amount of space in the reader. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0031] Figure 1 It is a hardware structure block diagram of a mobile phone for displaying corpus resources according to an embodiment of the present invention;

[0032] Figure 2 is a flow chart of a method for displaying corpus resources according to an embodiment of the present invention;

[0033] Figure 3 is a schematic diagram of selecting a target word set in an embodiment of the present invention;

[0034] Figure 4 is a schematic diagram of an interface for inputting source corpus resources according to an embodiment of the present invention;

[0035] Figure 5 is a schematic diagram of displaying interpretation content in a reader according to an embodiment of the present invention;

[0036] Figure 6 is a structural block diagram of a corpus resource display device according to an embodiment of the present invention;

[0037] Figure 7 It is a structural block diagram of a corpus resource display system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0040] Example 1

[0041] The method embodiment provided in the first embodiment of the present application can be executed in a mobile phone, tablet, computer, wearable device or similar electronic terminal. Taking running on a mobile phone as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mobile phone for displaying corpus resources according to an embodiment of the present invention. Figure 1 As shown, the mobile phone 10 may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the mobile phone may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile phone. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0042] The memory 104 can be used to store mobile phone programs, for example, software programs and modules of application software, such as a mobile phone program corresponding to a method for displaying corpus resources in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the mobile phone program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile phone 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0043] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by the communication provider of the mobile phone 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0044] In this embodiment, a method for displaying corpus resources is provided. Figure 2 is a flow chart of a method for displaying corpus resources according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0045] Step S202, obtaining source corpus resources to be translated through a reader, wherein the source corpus resources are corpus resources in a first language;

[0046] The reader of this embodiment is an electronic reading software running on a client. Text can be input through the client, or files such as txt files, pdf files, etc. can be imported from other data sources. URL links can also be loaded in the reader to load the text content of the corresponding web page. This embodiment is described by taking English as the first language as an example. In addition, the first language can also be Chinese (which can be divided into simplified Chinese and traditional Chinese), French, German, etc. The corpus resources of this embodiment can be resources such as words, sentences, articles, exercises, news, etc.

[0047] Step S204, selecting a target word set from the source corpus resource according to word attributes;

[0048] In this embodiment, the target word set is one or more words in the source corpus resource.

[0049] Step S206, obtaining the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in the second language;

[0050] Optionally, the interpretation content includes at least one of the following: Chinese translation of the English word, annotations, examples, etc.

[0051] Step S208: displaying the source corpus resources and the interpretation content in the reader.

[0052] Optionally, the words in the target word set and their interpretation contents are displayed in a first display form, and other words in the source corpus resource are displayed in an original display form.

[0053] Through the above steps, the source corpus resource to be translated is obtained through the reader, and then the target word set is selected in the source corpus resource according to the word attributes, the interpretation content of each word in the target word set is obtained, and the source corpus resource and the interpretation content are displayed in the reader. By selecting the target word set that the user is concerned about in the entire source corpus resource, and synchronously displaying the interpretation content of the target word when displaying the source corpus resource in the reader, the technical problem of not being able to automatically match and display the interpretation content in the source corpus resource in the related art is solved, a selective automatic translation solution is implemented, the time for translating the entire article is reduced, and at the same time, it is avoided that the interpretation content that the user is not concerned about occupies a large amount of space in the reader.

[0054] In one implementation of this embodiment, the target word set is selected from the source corpus resource according to the word attributes, which may be, but is not limited to:

[0055] Method 1: Selecting a first target word set from the source corpus resource according to the difficulty attribute of the word, wherein the difficulty attribute is used to characterize the difficulty level of the word;

[0056] In some examples, the difficulty levels of words include the following levels: high school, CET-4, CET-6, postgraduate entrance examination, and studying abroad. In addition, they can also be divided into Pre-A1 and A1 according to the Common European Framework of Reference for Languages ​​(CEFR), and divided into first grade, second grade, third grade, etc. according to the Compulsory Education Curriculum (PEP) standards.

[0057] In one example, before selecting the first target word set in the source corpus resource according to the difficulty attribute of the word, the solution also includes: calculating the first difficulty index according to the number of letters constituting the word, and calculating the second difficulty index according to the number of roots constituting the word; using a preset weight, calculating the difficulty level of the word based on the first difficulty index and the second difficulty index. The difficulty attribute is divided according to the number of letters and roots of the word, such as the higher the number of letters in the word, the higher the difficulty level, and the more roots constituting the word, the higher the difficulty level.

[0058] Method 2: Selecting a second target word set from the source corpus resource according to the state attribute of the word, wherein the state attribute is used to characterize the user's mastery state of the word.

[0059] In some examples, the status attributes of a word include the following attributes: mastered, under review, where the mastered status indicates that the user account has learned the word at a historical time and passed the test after review, and the under review status indicates that the user account has learned the word at a historical time but has not yet passed the test in the review stage.

[0060] In an example of this embodiment, before selecting the second target word set in the source corpus resource according to the state attribute of the word, the scheme also includes: calculating the state attribute of the word, including the following steps: counting the number of clicks on the word, if the number of clicks is greater than a first preset value, determining that the word is in a mastered state; if the number of clicks is less than or equal to the first preset value and greater than a second preset value, determining that the word is in a reviewing state; if the number of clicks is less than the second preset value, determining that the word is in a new word state, wherein the second preset value is less than the first preset value, in one example, the second preset value is 0, and the first preset value is 3. In addition, the state attribute can also be determined based on the tag information of the word. When the user recognizes the word online, he can set a tag for the word, such as "familiar", "new word", etc.

[0061] In another implementation of this embodiment, selecting a target word set in a source corpus resource according to word attributes includes:

[0062] S21, calculate the frequency of occurrence of each word in the source corpus resource;

[0063] In this embodiment, the frequency of occurrence of a word is the frequency of the word in the entire source corpus resource. In one example, the source corpus resource includes 10 words, among which word a and word b appear 1 time and 3 times respectively. By calculation, the frequency of occurrence of word a and word b is 10% and 30% respectively.

[0064] S22: Select a third target word set whose occurrence frequency is within a predetermined range from the source corpus resource.

[0065] Usually in an English reading corpus (such as a press release, official notice, etc.), there are many articles (such as a, an, the) and auxiliary verbs (such as do, did, does, etc.), and the meanings of the words are simple or have no actual meaning. Displaying them in the reader will affect the user's reading and are not the words that the user pays attention to. Some users' very rare words have no meaning to be displayed in the reader. Therefore, words with an appearance frequency in an appropriate predetermined range can be selected to form a third target word set, such as selecting words with an appearance frequency of 20% to 50%.

[0066] Figure 3 It is a schematic diagram of selecting a target word set in an embodiment of the present invention, including selecting words belonging to five difficulty levels of high school, CET-4, CET-6, postgraduate entrance examination, and studying abroad according to difficulty attributes, selecting word sets in "mastered" and "reviewing" according to status attributes, and selecting words with a frequency ranking of 1400 to 30000 according to word frequency, and finally selecting words that meet the above conditions from all words in the source corpus resources to form a target word set.

[0067] In one example of this embodiment, before calculating the frequency of occurrence of each word in the source corpus resource, specified words can be shielded in the source corpus resource, such as shielding articles (such as a, an, the) and auxiliary verbs (such as do, did, does, etc.). By shielding, the computational amount of the system can be calculated and the computational speed can be improved.

[0068] In an example of this implementation, calculating the occurrence frequency of each word in the source corpus resource includes: extracting a first word set whose word attribute is new words from the source corpus resource; and calculating the occurrence frequency of each word in the first word set.

[0069] The reader of this embodiment can be divided into a text reader and a web page reader according to the source corpus resource data source. Figure 4 The following is a schematic diagram of the interface for inputting source corpus resources in an embodiment of the present invention, including a text input or import entry and a URL input entry. The following are two examples of displaying source corpus resources and interpretation content in the two readers:

[0070] In a network architecture of this embodiment, a client and a network server are included. The client is used for data interaction (such as receiving source corpus resources input by users through the UI interface of the reader, and displaying source corpus resources and interpretation content on the UI interface), and the network server is used for data processing in the user background. Obtaining source corpus resources to be translated through the reader includes:

[0071] Text reader: upload the source text loaded in the reader to the network server, wherein the network server is used to segment the corpus resources in the source text through a natural language processing algorithm, restore the deformed forms of the words after segmentation to their original forms, obtain the target text, and encapsulate the target text into a Hypertext Markup Language (HTML) static file; receive the HTML static file returned by the network server.

[0072] The user enters text on the client, or uploads a txt / pdf file to the server. The server parses the txt / pdf file and extracts the text. The parsed text is segmented using NPL technology, and the inflections of different words (such as tense, singular and plural, etc.) are restored to the original word form. The segmented and restored text is then packaged into an html static file using html technology and sent back to the client. The word attributes that need to be highlighted are determined on the client, and word sets with different attributes (such as different difficulty levels, high school, CET-4, CET-6 vocabulary, etc., different mastery levels, proficiency, new words, etc.) are selected from the text. Finally, js (Javascript, dynamic scripting language) and CSS (Cascading Style Sheets, called cascading style sheets) are used to control the display form of word definitions with different attributes (such as different difficulty levels) and present them to users on the client.

[0073] Web page reader: upload the HTML source code of the web page of the input URL in the reader to the server through js injection, wherein the network server is used to obtain the source text file in the web page element of the input URL, segment the corpus resources in the text file through the natural language processing algorithm, restore the deformed form of the word after segmentation to the original form, obtain the target text, and encapsulate the target text into a map file; receive the map file returned by the network server through the js interface; replace the source text file in the web page of the input URL with the map file.

[0074] The user enters the URL on the client, and the client transmits the HTML source code of the web page to the server through js injection technology. The server extracts the text content of the web page through text extraction technology. When the web page content includes text, pictures, links and other elements, only the text content is extracted. Then, the NPL technology is used for word segmentation, and the inflections of different words (such as tense, singular and plural, etc.) are restored to the original words.

[0075] The server sends the segmented and restored text back to the client js in the format of map. js uses injection technology to replace the original text of the web page with the text of map, and determines the word attributes that need to be highlighted on the original web page and the client. It selects word sets with different attributes (such as different difficulty levels, high school, CET-4, CET-6 vocabulary, etc., different mastery levels, proficient, new words, etc.) from the text, and controls the display form of word definitions with different attributes (such as different difficulty levels) through js and CSS, and presents them to users on the client.

[0076] In this embodiment, CSS: Cascading Style Sheet, by setting the corresponding style attributes, the display, position and other styles of each element in the HTML document can be modified, which is used to beautify the page, that is, to set the display form; such as modifying the color, font, font size, width, height, position, background, etc. js is used for the functional development of web applications and to enrich the page experience, and can dynamically control the page content of the map file, such as modifying the page text, pictures, various effects, functions, etc. Any of the three methods of element inline, page embedding and external introduction to modify the CSS elements or map elements in the page. After the client obtains the HTML static file, it starts page rendering, including: parsing HTML and building a DOM tree; parsing CSS and building a CSSOM tree; merging DOMtree and CSSOM tree to generate a render tree; layout (layout / reflow), calculating the size and position of each element; drawing (paint / repaint), drawing the page pixel information; the client sends the information of each layer to the GPU, and the GPU synthesizes each layer and displays it on the screen.

[0077] In a network architecture of this embodiment, a client and a network server are included, the client is used for data interaction (such as receiving source corpus resources input by users through the UI interface of the reader, and displaying source corpus resources and interpretation content on the UI interface), and the network server is used for data processing in the user background. In the text reader, obtaining the source corpus resources to be translated through the reader includes: extracting the first corpus resources in the source text through the reader; segmenting the first corpus resources through the natural language processing algorithm, and restoring the deformed form of the words after segmentation to the original form, to obtain the second corpus resources.

[0078] In a web page reader, obtaining a source corpus resource to be translated through the reader includes: loading web page elements of a source web page through a browser component in the reader, wherein the web page elements include at least one of the following: text, pictures, and links; extracting text content in the web page elements to obtain a third corpus resource; segmenting the third corpus resource through a natural language processing algorithm, and restoring the deformed form of the words after segmentation to the original form to obtain a fourth corpus resource.

[0079] In this embodiment, displaying the source corpus resources and interpretation content in the reader includes:

[0080] S31, locating a target word in a target word set in a source corpus resource;

[0081] S32, when displaying the source corpus resource in the reader, displaying the corresponding interpretation content at the predetermined position of the target word.

[0082] Figure 5It is a schematic diagram of displaying interpretation content in a reader according to an embodiment of the present invention. The left side is the source corpus resource input into the reader, and the right side is a schematic diagram of displaying interpretation content in a specific display form in the reader (only the schematic part).

[0083] In one example, the target word set includes words with multiple word attributes, such as "CET-4", "CET-6", "Graduate Entrance Examination", etc., wherein each type of word attribute corresponds to a display form, such as "CET-4" corresponds to yellow and "CET-6" corresponds to gray. During the display process, the target words are assigned display forms corresponding to their word attributes, and then the corresponding interpretation content is displayed at the predetermined position of the target words through the corresponding display forms.

[0084] In one implementation of the present embodiment, displaying corresponding interpretation content at a predetermined position of a target word includes: matching the display form of the target word based on word attributes; controlling the display form of each target word through a js script or a cascading style sheet CSS; and displaying the target word and the corresponding interpretation content according to the display form at a predetermined position of the target word.

[0085] Optionally, after displaying the source corpus resources and interpretation content in the reader, it also includes: generating a reading record of the source corpus resources; when a learning operation of a related word is monitored on the client according to the reading record, pushing a corpus segment of the related word in the source corpus resources, wherein the source corpus resources include the original form or deformed form of the related word.

[0086] In this embodiment, all the articles read can be recorded, the words in the source corpus resources can be cut, and the mapping relationship between each word and the source corpus resources, as well as the corpus fragments (such as paragraphs, sentences, phrases, etc.) of the source corpus resources can be established, and saved locally or on the server, and the learning operation of the related words can be monitored. When the user recites or reads the related words again, the corpus fragments related to the related words are pushed to deepen the memory. In one example, the source corpus resource includes two paragraphs, namely "abcde", and "efghi" stores the mapping relationship between the word "a" and the paragraph "abcde". When the user is monitored to read the word "a" again, the paragraph "abcde" is pushed to him.

[0087] The present invention can add tags to the articles that have been interpreted in the reader, including personal interests, occupations, geographic locations, etc., and set a corpus segment recommendation wheel. The corpus segment recommendation wheel rotates according to the recommendation threshold. When the number of times the tag of the recommended article appears exceeds the recommendation threshold, the pointer of the corpus segment recommendation wheel randomly selects other tags for recommendation, and repeats this process to increase the contextual diversity of the user in the word learning process. The corpus segment recommendation wheel of the present invention is used to change the tags of the user recommended articles according to a random algorithm, and also sets a recommendation threshold so that the user can stably read a scene under the current recommendation tag, thereby maintaining the continuity and stability of the reading scene.

[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented 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 ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling 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.

[0089] Example 2

[0090] In this embodiment, a display device and system for corpus resources are also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0091] Figure 6 is a structural block diagram of a corpus resource display device according to an embodiment of the present invention, such as Figure 6 As shown, the device includes: a first acquisition module 60, a selection module 62, a second acquisition module 64, and a display module 66, wherein:

[0092] A first acquisition module 60, configured to acquire a source corpus resource to be translated through a reader, wherein the source corpus resource is a corpus resource in a first language;

[0093] A selection module 62, configured to select a target word set in the source corpus resource according to word attributes;

[0094] A second acquisition module 64 is used to acquire the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language;

[0095] The display module 66 is used to display the source language resource and the interpretation content in the reader.

[0096] Optionally, the selection module includes at least one of the following: a first selection unit, used to select a first target word set in the source corpus resource according to a difficulty attribute of the word, wherein the difficulty attribute is used to characterize the difficulty level of the word; a second selection unit, used to select a second target word set in the source corpus resource according to a state attribute of the word, wherein the state attribute is used to characterize the user's mastery state of the word.

[0097] Optionally, the selection module includes: a calculation unit, used to calculate the occurrence frequency of each word in the source corpus resource; and a third selection unit, used to select a third target word set whose occurrence frequency is within a predetermined range in the source corpus resource.

[0098] Optionally, the calculation unit includes: an extraction subunit, used to extract a first word set whose word attribute is new words from the source corpus resource; and a calculation subunit, used to calculate the occurrence frequency of each word in the first word set.

[0099] Optionally, the first acquisition module includes one of the following: a first acquisition unit, used to upload the source text loaded in the reader to a network server, wherein the network server is used to segment the corpus resources in the source text through a natural language processing algorithm, restore the deformed forms of the words after segmentation to their original forms, obtain the target text, and encapsulate the target text into a hypertext markup language HTML static file; receive the HTML static file returned by the network server; a second acquisition unit, used to upload the HTML source code of the web page of the URL input in the reader to the server through js injection, wherein the network server is used to obtain the source text file in the web page element of the input URL, segment the corpus resources in the text file through a natural language processing algorithm, restore the deformed forms of the words after segmentation to their original forms, obtain the target text, and encapsulate the target text into a map file; receive the map file returned by the network server through a js interface; replace the source text file in the web page of the input URL with the map file.

[0100] Optionally, the first acquisition module includes: a first extraction unit, used to extract a first corpus resource in a source text through a reader; a first processing unit, used to segment the first corpus resource through a natural language processing algorithm, and restore the deformed form of the words after segmentation to the original form to obtain a second corpus resource.

[0101] Optionally, the first acquisition module includes: a loading unit, used to load web page elements of a source web page through a browser component in a reader, wherein the web page elements include at least one of the following: text, pictures, links; a second extraction unit, used to extract text content in the web page elements to obtain a third corpus resource; a second processing unit, used to segment the third corpus resource through a natural language processing algorithm, and restore the deformed form of the words after segmentation to the original form to obtain a fourth corpus resource.

[0102] Optionally, the display module includes: a positioning unit, used to locate the target word in the target word set in the source corpus resource; and a display unit, used to display the corresponding interpretation content at a predetermined position of the target word when displaying the source corpus resource in the reader.

[0103] Optionally, the display unit includes: a matching subunit, used to match the display form of the target word based on word attributes; a control subunit, used to control the display form of each target word through a js script or a cascading style sheet CSS; and a display subunit, used to display the target word and the corresponding interpretation content at a predetermined position of the target word according to the display form.

[0104] Optionally, the device also includes: a generation module, which is used to generate a reading record of the source corpus resource after the display module displays the source corpus resource and the interpretation content in the reader; and a push module, which is used to push the corpus segment of the relevant word in the source corpus resource when a learning operation of the relevant word is monitored on the client according to the reading record, wherein the source corpus resource includes the original form or deformed form of the relevant word.

[0105] Figure 7 is a structural block diagram of a corpus resource display system according to an embodiment of the present invention, such as Figure 7As shown, the system includes: a client 70 and a network server 72, wherein the client 70 includes: a first acquisition module 700, used to acquire a source corpus resource to be translated through a reader, wherein the source corpus resource is a corpus resource of a first language; an upload module 702, used to upload a source text or a webpage HTML source code of the source corpus resource to the network server; a selection module 704, used to select a target word set from the source corpus resource according to word attributes; a second acquisition module 706, used to acquire the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource of a second language; a display module 708, used to display the source corpus resource and the interpretation content in the reader; the network server 72 includes: a receiving module 722, used to receive Receive the source text or HTML source code of the source corpus resource uploaded by the client; the processing module 724 is used to segment the corpus resources in the source text through a natural language processing algorithm, restore the deformed form of the words after segmentation to the original form, obtain the target text, and encapsulate the target text into a hypertext markup language HTML static file; or, it is used to obtain the source text file in the web page element of the input URL, segment the corpus resources in the text file through a natural language processing algorithm, restore the deformed form of the words after segmentation to the original form, obtain the target text, and encapsulate the target text into a map file; receive the map file returned by the network server through a js interface; the return module 626 is used to return the HTML static file or the map file to the client.

[0106] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0107] Example 3

[0108] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0109] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0110] S1, obtaining a source corpus resource to be translated through a reader, wherein the source corpus resource is a corpus resource in a first language;

[0111] S2, selecting a target word set in the source corpus resource according to word attributes;

[0112] S3, obtaining the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language;

[0113] S4, displaying the source corpus resource and the interpretation content in the reader.

[0114] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0115] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0116] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0117] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0118] S1, obtaining a source corpus resource to be translated through a reader, wherein the source corpus resource is a corpus resource in a first language;

[0119] S2, selecting a target word set in the source corpus resource according to word attributes;

[0120] S3, obtaining the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language;

[0121] S4, displaying the source corpus resource and the interpretation content in the reader.

[0122] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0123] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0124] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0125] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0129] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for displaying corpus resources. It is characterized in that include: Obtaining source corpus resources to be translated through a reader, wherein the source corpus resources are corpus resources in a first language; Selecting a target word set in the source corpus resource according to word attributes; Obtaining the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language; Displaying the source corpus resource and the interpretation content in the reader; The method further comprises: Add tags to the paraphrased articles in the reader, set a corpus segment recommendation wheel and a recommendation threshold, the corpus segment recommendation wheel is used to select tags for user-recommended articles according to a random algorithm, and when the number of occurrences of the tags of the recommended articles exceeds the recommendation threshold, the corpus segment recommendation wheel randomly selects other tags for recommendation; Generate a reading record of a source corpus resource; when a learning operation of a related word is monitored on a client according to the reading record, push the corpus fragment of the related word in the source corpus resource according to the corpus fragment recommendation wheel, the related word is obtained by word segmentation based on the source corpus resource, and a related mapping relationship is established with the corpus fragment of the source corpus resource, and the source corpus resource includes the original form or deformed form of the related word.

2. The method according to claim 1, It is characterized in that Selecting a target word set in the source corpus resource according to word attributes includes at least one of the following: Selecting a first target word set in the source corpus resource according to a difficulty attribute of the word, wherein the difficulty attribute is used to characterize a difficulty level of the word; A second target word set is selected from the source corpus resource according to state attributes of the words, wherein the state attributes are used to characterize a user's mastery state of the words.

3. The method according to claim 1, It is characterized in that Selecting a target word set in the source corpus resource according to word attributes includes: Calculate the frequency of occurrence of each word in the source corpus resource; A third target word set whose occurrence frequency is within a predetermined range is selected from the source corpus resource.

4. The method according to claim 3, It is characterized in that Calculating the frequency of occurrence of each word in the source corpus resource includes: Extracting a first word set whose word attribute is new words from the source corpus resource; The occurrence frequency of each word in the first word set is calculated.

5. The method according to claim 1, It is characterized in that Obtaining source corpus resources to be translated through the reader includes one of the following: Uploading the source text loaded in the reader to a network server, wherein the network server is used to segment the corpus resources in the source text by a natural language processing algorithm, restore the deformed forms of the words after segmentation to the original form, obtain the target text, and encapsulate the target text into a hypertext markup language HTML static file; receiving the HTML static file returned by the network server; The HTML source code of the web page of the input URL in the reader is uploaded to the server through js injection, wherein the network server is used to obtain the source text file in the web page element of the input URL, segment the corpus resources in the text file through a natural language processing algorithm, restore the deformed form of the words after segmentation to the original form, obtain the target text, and encapsulate the target text into a map file; receive the map file returned by the network server through the js interface; and replace the source text file in the web page of the input URL with the map file.

6. The method according to claim 1, It is characterized in that The source corpus resources to be translated obtained through the reader include: Extracting the first corpus resource from the source text through the reader; The first corpus resource is segmented by a natural language processing algorithm, and the deformed forms of the words after segmentation are restored to their original forms to obtain a second corpus resource.

7. The method according to claim 1, It is characterized in that The source corpus resources to be translated obtained through the reader include: Loading web page elements of the source web page through a browser component in the reader, wherein the web page elements include at least one of the following: text, image, link; Extracting text content from the web page element to obtain a third corpus resource; The third corpus resource is segmented by a natural language processing algorithm, and the deformed forms of the words after the segmentation are restored to the original form to obtain a fourth corpus resource.

8. The method according to claim 1, It is characterized in that Displaying the source corpus resource and the interpretation content in the reader includes: Locating a target word in the target word set in the source corpus resource; When the source corpus resource is displayed in the reader, the corresponding interpretation content is displayed at the predetermined position of the target word.

9. The method according to claim 8, It is characterized in that Displaying the corresponding interpretation content at the predetermined position of the target word includes: Matching the display form of the target word based on word attributes; Control the display form of each target word through js script or cascading style sheet css; The target word and the corresponding interpretation content are displayed at a predetermined position of the target word according to the display form.

10. The method according to claim 1, It is characterized in that After displaying the source corpus resource and the interpretation content in the reader, the method further includes: Generating a reading record of the source corpus resource; When a learning operation of a related word is monitored on the client according to the reading record, a corpus segment of the related word in the source corpus resource is pushed, wherein the source corpus resource includes the original form or the deformed form of the related word.

11. A device for displaying corpus resources, It is characterized in that include: A first acquisition module, configured to acquire a source corpus resource to be translated through a reader, wherein the source corpus resource is a corpus resource in a first language; A selection module, configured to select a target word set from the source corpus resource according to word attributes; A second acquisition module is used to acquire the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language; A display module, used for displaying the source corpus resource and the interpretation content in the reader; The display module is also used to add tags to articles that have been interpreted in the reader, set a corpus segment recommendation wheel and a recommendation threshold, the corpus segment recommendation wheel is used to select tags for user recommended articles according to a random algorithm, and when the number of times the tag of the recommended article appears exceeds the recommendation threshold, the corpus segment recommendation wheel randomly selects other tags for recommendation; generates a reading record of the source corpus resource; when the learning operation of related words is monitored on the client according to the reading record, pushes the corpus segments of the related words in the source corpus resource according to the corpus segment recommendation wheel, the related words are obtained based on word segmentation of the source corpus resource, and establish a related mapping relationship with the corpus segments of the source corpus resource, and the source corpus resource includes the original form or deformed form of the related words.

12. A corpus resource display system, It is characterized in that It includes a client and a network server, where The client comprises: A first acquisition module, configured to acquire a source corpus resource to be translated through a reader, wherein the source corpus resource is a corpus resource in a first language; An uploading module, used for uploading the source text or HTML source code of the source corpus resource to the network server; A selection module, configured to select a target word set from the source corpus resource according to word attributes; A second acquisition module is used to acquire the interpretation content of each word in the target word set, wherein the interpretation content is a corpus resource in a second language; A display module, used for displaying the source corpus resource and the interpretation content in the reader; The network server comprises: A receiving module, used for receiving the source text or HTML source code of the source corpus resource uploaded by the client; The processing module is used to segment the corpus resources in the source text by a natural language processing algorithm, restore the deformed form of the words after segmentation to the original form, obtain the target text, and encapsulate the target text into a hypertext markup language HTML static file; or, to obtain the source text file in the web page element of the input URL, segment the corpus resources in the text file by a natural language processing algorithm, restore the deformed form of the words after segmentation to the original form, obtain the target text, and encapsulate the target text into a map file; receive the map file returned by the network server through a js interface; A feedback module, used for returning the HTML static file or the map file to the client; The processor is also used to add tags to articles that have been interpreted in the reader, set a corpus segment recommendation wheel and a recommendation threshold, the corpus segment recommendation wheel is used to select tags for user recommended articles according to a random algorithm, and when the number of times the tag of the recommended article appears exceeds the recommendation threshold, the corpus segment recommendation wheel randomly selects other tags for recommendation; generates a reading record of the source corpus resource; when the learning operation of related words is monitored on the client according to the reading record, pushes the corpus segments of the related words in the source corpus resource according to the corpus segment recommendation wheel, the related words are obtained based on word segmentation of the source corpus resource, and establish a related mapping relationship with the corpus segments of the source corpus resource, and the source corpus resource includes the original form or deformed form of the related words.

13. A storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 10 when executed.

14. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 10.