A text display method, device, equipment and storage medium
By inputting sentences in text into neural network model to obtain similarity and display text, the method of displaying text solves the problem that users cannot effectively filter advertisements and invalid information in text, and improves reading efficiency.
Patent Information
- Application Number
- CN202010843751.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-20
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, when users acquire text for reading, they cannot effectively filter advertisements and invalid information in the text, resulting in inefficient reading.
By obtaining the target text and inputting sentences in the same paragraph into a pre-trained neural network model in sequence, we can obtain the similarity between sentences, so that the text can be displayed based on the similarity.
It realizes filtering of inconsistent content in the text, improves user reading efficiency, and allows users to obtain the information they need more quickly.
Smart Images

Figure CN111950259B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to text technology, and more particularly to a text display method, apparatus, device and storage medium. Background Art
[0002] In an era of attracting attention and earning clicks, the contents of many texts are inconsistent with each other. Advertisements may be interspersed in paragraphs. Merchants gain clicks, but users’ time is wasted.
[0003] However, in the current process of users obtaining texts for reading, there is no way to filter out advertisements in these texts. Users have no way to skip these interspersed invalid information and cannot directly find the information they want to see. Therefore, in order to make reading more efficient, filtering out irrelevant content and only displaying relevant and well-organized content can save users a lot of time and allow the central meaning of the text to directly reach the user's brain, thereby improving the user's reading experience. These needs are becoming more and more urgent. Summary of the invention
[0004] The embodiments of the present invention provide a text display method, apparatus, device and storage medium to filter inconsistent content in a text.
[0005] To achieve this purpose, an embodiment of the present invention provides a text display method, which includes:
[0006] Get the target text;
[0007] Inputting sentences in the same paragraph of the target text into a pre-trained neural network model in pairs to obtain the similarity between the sentences in the same paragraph;
[0008] The target text is displayed according to the similarity between sentences in the same paragraph.
[0009] Furthermore, displaying the target text according to the similarity between sentences in the same paragraph includes:
[0010] Obtaining a similarity score for each sentence in the same paragraph according to the similarity between the sentences in the same paragraph;
[0011] The target text is displayed according to the similarity score.
[0012] Furthermore, displaying the target text according to the similarity score includes:
[0013] sorting the similarity scores from high to low;
[0014] The target texts are displayed according to the ranking of the similarity scores.
[0015] Furthermore, displaying the target text according to the ranking of the similarity scores includes:
[0016] Acquire a first sentence whose similarity score ranking is greater than a first threshold and a second sentence whose similarity score ranking is less than a second threshold;
[0017] The first sentence is displayed in a first manner, and the second sentence is displayed in a second manner.
[0018] Furthermore, displaying the target text according to the similarity score includes:
[0019] sorting the similarity scores from high to low;
[0020] After filtering sentences are removed from the target text, they are displayed, and the ranking of the similarity scores of the filtered sentences is greater than the third threshold or less than the fourth threshold.
[0021] Furthermore, displaying the target text according to the similarity between sentences in the same paragraph includes:
[0022] Obtain at least two third sentences in the same paragraph whose similarity between sentences is greater than a fifth threshold;
[0023] Obtaining the order in which the third sentence appears in the same paragraph;
[0024] The target text is displayed according to the order in which the third sentences appear in the same paragraph.
[0025] Furthermore, the neural network model is a twin neural network model.
[0026] On the one hand, an embodiment of the present invention further provides a text display device, the device comprising:
[0027] A text acquisition module is used to acquire the target text;
[0028] A similarity acquisition module is used to input sentences in the same paragraph of the target text into a pre-trained neural network model in pairs to obtain the similarity between the sentences in the same paragraph;
[0029] The text display module is used to display the target text according to the similarity between sentences in the same paragraph.
[0030] On the other hand, an embodiment of the present invention further provides a computer device, which includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement a method provided in any embodiment of the present invention.
[0031] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method provided in any embodiment of the present invention.
[0032] The embodiment of the present invention obtains a target text; inputs sentences in the same paragraph of the target text into a pre-trained neural network model in pairs in order to obtain the similarity between the sentences in the same paragraph; and displays the target text according to the similarity between the sentences in the same paragraph, thereby solving the problem that users have no way to skip invalid content interspersed in the text and achieving the effect of filtering out inconsistent content in the text. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a flowchart of a text display method provided in Embodiment 1 of the present invention;
[0034] Figure 2 is a flowchart of a text display method provided in Embodiment 2 of the present invention;
[0035] Figure 3 is a structural schematic diagram of a text display device provided in Embodiment 3 of the present invention;
[0036] Figure 4 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0037] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0038] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0039] In addition, the terms "first", "second", etc. can be used in this article to describe various directions, actions, steps or elements, but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element. For example, without departing from the scope of the present application, the first module can be referred to as the second module, and similarly, the second module can be referred to as the first module. Both the first module and the second module are modules, but they are not the same module. The terms "first", "second", etc. cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can expressly or implicitly include one or more of the features. In the description of the embodiment of the present invention, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0040] Embodiment 1
[0041] like Figure 1 As shown, the first embodiment of the present invention provides a text display method, the method comprising:
[0042] S110, obtaining target text.
[0043] S120, inputting sentences in the same paragraph of the target text into a pre-trained neural network model in pairs to obtain similarities between sentences in the same paragraph.
[0044] In this embodiment, the target text input by the user is first obtained, and then the text is divided into paragraphs, each paragraph is divided into sentences, and then the sentences in the same paragraph in the target text are input into the pre-trained neural network model in pairs in turn, so as to obtain the similarity between the sentences in the same paragraph.
[0045] Exemplarily, the target text includes paragraph 1, which includes sentence A, sentence B and sentence C. Then, sentence A and sentence B are grouped together, sentence A and sentence C are grouped together, and sentence B and sentence C are grouped together, and are input into a pre-trained neural network model at once. The neural network model has been pre-trained, and after inputting two sentences, the similarity of the two sentences can be obtained, thereby obtaining the similarity of sentence A and sentence B, the similarity of sentence A and sentence C, and the similarity of sentence B and sentence C. Then, paragraph 2, paragraph 3, etc. are processed in the same way until the entire target text is processed.
[0046] S130: Display the target text according to the similarity between sentences in the same paragraph.
[0047] In this embodiment, after obtaining the similarity between sentences in the same paragraph, the target text can be displayed accordingly. For example, if the similarity between sentences A and B is high, the similarity between sentences A and C is low, and the similarity between sentences B and C is low, it can be explained that sentence C is invalid information in the paragraph, so sentence C is filtered out and the target text is displayed.
[0048] As a preferred method, after filtering out sentences with low similarity between sentences in the same paragraph, irrelevant words in the target text can also be filtered. Specifically, the first entity words in the target text are extracted by using the named entity recognition technology (NER), and the first entity words are input into the pre-trained Word2vec (word to vector) neural network model to obtain the first word vector of each first entity word, determine the center point of the first word vector, and finally obtain the first entity words corresponding to the second word vector as the filter words of the target text, wherein the second word vector is the first word vector of the first preset number farthest from the center point. The first preset number is set by the user, and the user sets the first preset number according to the filtering requirements, and then obtains the first entity words corresponding to the second word vector. Because the second word vector is far from the center point, it means that the first entity words corresponding to the second word vector have a low correlation with the main meaning of the target text, so it is used as the filter word of the target text. Thus, the target text is displayed after filtering out the sentences and filter words with low similarity, and the user can quickly obtain the information he needs.
[0049] As a preferred method, before obtaining the target text, if the user inputs multiple target texts, the target text can be further filtered to filter out the target text whose text title and text content do not match. Specifically, the target text and the text title of the target text are obtained, and then a first preset number of first keywords are extracted from the target text, and a second preset number of second keywords are extracted from the text title, the first keyword is input into a pre-trained Word2vec (word to vector) neural network model to obtain a first phrase vector, and the second keyword is input into a pre-trained Word2vec neural network model to obtain a second phrase vector, and then the average vector of the first phrase vector is determined as the first vector, and the average vector of the second phrase vector is determined as the second vector, and finally the first cosine similarity of the first vector and the second vector is determined, and the target text is filtered according to the first cosine similarity, and it is determined whether the first cosine similarity is less than the first threshold value. If the first cosine similarity is less than the first threshold value, the target text is filtered out to avoid the display of invalid text. As a preferred method, before obtaining the target text, a first preset number of first keywords can also be extracted from any paragraph of the target text, and the above method is used to filter out paragraphs in the target text that are not related to the text title.
[0050] The embodiment of the present invention obtains a target text; inputs sentences in the same paragraph of the target text into a pre-trained neural network model in pairs in order to obtain the similarity between the sentences in the same paragraph; and displays the target text according to the similarity between the sentences in the same paragraph, thereby solving the problem that users have no way to skip invalid content interspersed in the text and achieving the effect of filtering out inconsistent content in the text.
[0051] Embodiment 2
[0052] like Figure 2 As shown, the second embodiment of the present invention provides a text display method, and the second embodiment of the present invention is a further explanation based on the first embodiment of the present invention. The method includes:
[0053] S210: Obtain target text.
[0054] S220, inputting sentences in the same paragraph of the target text into a pre-trained neural network model in pairs to obtain similarities between sentences in the same paragraph.
[0055] In this embodiment, the neural network model is a Siamese Network model.
[0056] S230, obtaining a similarity score of each sentence in the same paragraph according to the similarity between the sentences in the same paragraph.
[0057] S240: Sort the similarity scores from high to low.
[0058] S250: Acquire a first sentence whose similarity score ranking is greater than a first threshold and a second sentence whose similarity score ranking is less than a second threshold.
[0059] S260: Display the first sentence in a first manner, and display the second sentence in a second manner.
[0060] In this embodiment, after obtaining the similarity between sentences in the same paragraph, the similarity score of each sentence in the same paragraph can be obtained accordingly. Exemplarily, the similarity between sentence A and sentence B is high and is set to 1 point, the similarity between sentence A and sentence C is low and is set to 0.5 points, and the similarity between sentence B and sentence C is low and is set to 0.5 points. Then the similarity score of sentence A is the average of 1 point and 0.5 points, 0.75 points, the similarity score of sentence B is the average of 1 point and 0.5 points, 0.75 points, and the similarity score of sentence C is the average of 0.5 points and 0.5 points, 0.5 points. Then the similarity scores are sorted from high to low, and the first sentence with a similarity score ranking greater than the first threshold and the second sentence with a similarity score ranking less than the second threshold are obtained. The first threshold and the second threshold can be 2, so the first sentence is sentence A and sentence B, and the second sentence is sentence C. Finally, the first sentence is displayed in the first way, and the second sentence is displayed in the second way, that is, sentences A and B are displayed in a highlighted and bold way, and sentence C is displayed in a low light and gray way. In this way, users can easily notice the relevant content such as sentences A and B when reading, and ignore the invalid content such as sentence C.
[0061] In an alternative embodiment, steps S250 to S260 may be replaced as follows:
[0062] S350: Sort the similarity scores from high to low.
[0063] S360: excluding filtered sentences from the target text and displaying them, wherein the ranking of the similarity scores of the filtered sentences is greater than the third threshold or less than the fourth threshold.
[0064] In this embodiment, after sorting the similarity scores from high to low, it is also possible to find similarity scores that are ranked greater than the third threshold or less than the fourth threshold, that is, sentences corresponding to the top-ranked and bottom-ranked similarity scores. When there are many sentences in the target text, these sentences may deviate from the central idea or may be sentences without significant meaning, so they are filtered out and displayed in the target text.
[0065] In an alternative embodiment, steps S230 to S260 may be replaced as follows:
[0066] S430: Obtain at least two third sentences in the same paragraph whose similarity between sentences is greater than a fifth threshold.
[0067] S440: Obtain the order in which the third sentences appear in the same paragraph.
[0068] S450: Display the target text according to the order in which the third sentences appear in the same paragraph.
[0069] In this embodiment, after obtaining the similarity between sentences in the same paragraph, at least two third sentences whose similarity between sentences in the same paragraph is greater than the fifth threshold value can also be obtained. For example, the third sentences are sentence A and sentence B, and the similarity between sentence A and sentence B is greater than the fifth threshold value, which means that the similarity between sentence A and sentence B is very high. Then, the order in which the third sentences appear in the same paragraph is obtained, and the target text is displayed according to the order in which the third sentences appear in the same paragraph. For example, if sentence A appears first, sentence A will be bolded and highlighted, and sentence B with the same meaning can be folded, filtered, low-brightness or grayscale displayed. In this way, users can filter out sentences with the same meaning when reading, avoid invalid reading, and save time.
[0070] Embodiment 3
[0071] like Figure 3 As shown, the third embodiment of the present invention provides a text display device 100. The text display device 100 provided in the third embodiment of the present invention can execute the text display method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. The text display device 100 includes a text acquisition module 200, a similarity acquisition module 300 and a text display module 400.
[0072] Specifically, the text acquisition module 200 is used to acquire the target text; the similarity acquisition module 300 is used to input sentences in the same paragraph of the target text into a pre-trained neural network model in pairs in sequence to obtain the similarity between sentences in the same paragraph; the text display module 400 is used to display the target text according to the similarity between sentences in the same paragraph.
[0073] In this embodiment, the text display module 400 is specifically used to obtain the similarity score of each sentence in the same paragraph according to the similarity between sentences in the same paragraph; and display the target text according to the similarity score. The text display module 400 is also specifically used to sort the similarity scores from high to low; and display the target text according to the ranking of the similarity scores. The text display module 400 is also specifically used to obtain a first sentence whose similarity score ranking is greater than a first threshold and a second sentence whose similarity score ranking is less than a second threshold; and display the first sentence in a first manner, and display the second sentence in a second manner. The text display module 400 is also specifically used to sort the similarity scores from high to low; and display the filtered sentences after removing them from the target text, wherein the ranking of the similarity scores of the filtered sentences is greater than the third threshold or less than the fourth threshold. The text display module 400 is also specifically used to obtain at least two third sentences whose similarity between sentences in the same paragraph is greater than the fifth threshold; obtain the order in which the third sentences appear in the same paragraph; and display the target text according to the order in which the third sentences appear in the same paragraph. Preferably, the neural network model is a twin neural network model.
[0074] Embodiment 4
[0075] Figure 4 This is a schematic diagram of the structure of a computer device 12 provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0076] like Figure 4 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0077] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0078] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0079] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0080] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0081] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the computer device 12, and / or may communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computer device 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0082] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, for example, implementing the method provided in the embodiment of the present invention:
[0083] Get the target text;
[0084] Inputting sentences in the same paragraph of the target text into a pre-trained neural network model in pairs to obtain the similarity between the sentences in the same paragraph;
[0085] The target text is displayed according to the similarity between sentences in the same paragraph.
[0086] Embodiment 5
[0087] Embodiment 5 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method provided in all the embodiments of the present invention is implemented:
[0088] Get the target text;
[0089] Inputting sentences in the same paragraph of the target text into a pre-trained neural network model in pairs to obtain the similarity between the sentences in the same paragraph;
[0090] The target text is displayed according to the similarity between sentences in the same paragraph.
[0091] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0092] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0093] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0094] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0095] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A text display method, characterized in that: include: Get the target text; Inputting sentences in the same paragraph of the target text into a pre-trained neural network model in pairs to obtain the similarity between the sentences in the same paragraph; Displaying the target text according to the similarity between sentences in the same paragraph; Wherein, before acquiring the target text, if the user inputs at least one target text, the method further includes: Acquire the target text and a text title of the target text, and extract a first preset number of first keywords from the target text, and extract a second preset number of second keywords from the text title; Inputting the first keyword into a pre-trained Word2vec neural network model to obtain a first phrase vector; Inputting the second keyword into the pre-trained Word2vec neural network model to obtain a second phrase vector; Determine an average vector of the first phrase vectors as a first vector, and determine an average vector of the second phrase vectors as a second vector; Calculating a first cosine similarity between the first vector and the second vector, and determining whether the first cosine similarity is less than a preset threshold; If the first cosine similarity is less than the preset threshold, the target text is filtered.
2. The method according to claim 1, characterized in that The displaying of the target text according to the similarity between sentences in the same paragraph includes: Obtaining a similarity score for each sentence in the same paragraph according to the similarity between the sentences in the same paragraph; The target text is displayed according to the similarity score.
3. The method according to claim 2, characterized in that The displaying of the target text according to the similarity score comprises: sorting the similarity scores from high to low; The target texts are displayed according to the ranking of the similarity scores.
4. The method according to claim 3, characterized in that The displaying of the target text according to the ranking of the similarity scores comprises: Acquire a first sentence whose similarity score ranking is greater than a first threshold and a second sentence whose similarity score ranking is less than a second threshold; The first sentence is displayed in a first manner, and the second sentence is displayed in a second manner.
5. The method according to claim 2, characterized in that: The displaying of the target text according to the similarity score comprises: sorting the similarity scores from high to low; After filtering sentences are removed from the target text, they are displayed, and the ranking of the similarity scores of the filtered sentences is greater than the third threshold or less than the fourth threshold.
6. The method according to claim 1, characterized in that The displaying of the target text according to the similarity between sentences in the same paragraph includes: Obtain at least two third sentences in the same paragraph whose similarity between sentences is greater than a fifth threshold; Obtaining the order in which the third sentence appears in the same paragraph; The target text is displayed according to the order in which the third sentences appear in the same paragraph.
7. The method according to claim 1, characterized in that The neural network model is a twin neural network model.
8. A text display device, characterized in that: include: A text acquisition module is used to acquire the target text; A similarity acquisition module is used to input sentences in the same paragraph of the target text into a pre-trained neural network model in pairs to obtain the similarity between the sentences in the same paragraph; A text display module, used for displaying the target text according to the similarity between sentences in the same paragraph; Wherein, the text acquisition module is also used for, before acquiring the target text, if the user inputs at least one of the target texts, acquiring the target text and the text title of the target text, and extracting a first preset number of first keywords from the target text, and extracting a second preset number of second keywords from the text title; inputting the first keyword into a pre-trained Word2vec neural network model to obtain a first phrase vector; inputting the second keyword into the pre-trained Word2vec neural network model to obtain a second phrase vector; determining the average vector of the first phrase vector as the first vector, and determining the average vector of the second phrase vector as the second vector; calculating the first cosine similarity of the first vector and the second vector, and judging whether the first cosine similarity is less than a preset threshold; If the first cosine similarity is less than the preset threshold, the target text is filtered.
9. A computer device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Text summarization generation method and device
CN108304445A
Text method and device, electronic equipment and computer readable storage medium
CN111125301A
Matching statement determination method and device, equipment and storage medium
CN111414746A