Text information processing method, device, equipment and medium
By extracting keyword and sentence information in text and using neural networks to fusion semantic features, the problem of low accuracy in semantic understanding of text information in the prior art is solved, and more accurate and comprehensive semantic feature extraction is achieved.
Patent Information
- Application Number
- CN202111331684.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-11-11
AI Technical Summary
In the prior art, the semantic feature extraction of text information such as regulations, norms, standards or internal management systems is one-sided, resulting in low accuracy in semantic understanding, especially when text chapters are long, semantic deletion is prone to occur.
By extracting keyword information and sentence information from the to-process text information, generating keyword association information, using gate recurrent neural network and graph convolutional neural network to fuse semantic features, output keyword feature information to represent the semantic features of the text, and improve semantics Understand accuracy.
It effectively improves the accuracy and comprehensiveness of text semantic feature extraction, avoids the one-sidedness and forgetfulness of information, and improves the semantic understanding of long texts.
Smart Images

Figure CN113935334B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, and in particular to a text information processing method, device, equipment, medium and program product. Background Art
[0002] With the release of laws, regulations, specifications or standards, relevant organizations or institutions need to modify their internal management systems in accordance with the latest laws, regulations or specifications to ensure that their internal management systems comply with the latest relevant laws, regulations or specifications.
[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following technical problems in the related technology: the semantic features extracted from text information such as laws, regulations, standards or internal management systems are one-sided and the accuracy of semantic understanding is low. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a text information processing method, apparatus, device, medium and program product for improving the accuracy of semantic understanding.
[0005] According to a first aspect of the present disclosure, there is provided a text information processing method, comprising:
[0006] Extracting multiple keyword information and multiple sentence information from the text information to be processed;
[0007] Based on the plurality of keyword information and the plurality of sentence information, generating keyword association information, wherein the keyword association information is used to characterize association attributes between different keyword information;
[0008] Based on the plurality of keyword information and the plurality of sentence information, determining sentence information associated with each of the keyword information;
[0009] Input the plurality of keyword information, sentence information associated with each keyword information and the keyword association information into a first neural network, and output keyword feature information, wherein the keyword feature information is used to characterize the semantic features of the text to be processed.
[0010] According to an embodiment of the present disclosure, the first neural network includes: a gated recurrent neural network layer and a graph convolutional neural network layer;
[0011] Inputting the plurality of keyword information, sentence information associated with each keyword information, and the keyword association information into the first neural network, outputting keyword feature information includes:
[0012] Inputting the plurality of keyword information and the sentence information associated with each keyword information into the gated recurrent neural network layer so as to fuse the semantic features in the sentence information into the keyword information associated with the sentence information to obtain a plurality of fused keyword information;
[0013] The multiple fused keyword information and the keyword association information are input into the graph convolutional neural network layer so as to fuse the association attributes between the different keyword information with the multiple fused keyword information and output the keyword feature information.
[0014] According to an embodiment of the present disclosure, generating keyword association information based on the plurality of keyword information and the plurality of sentence information includes:
[0015] The keyword-related information is generated based on the number of times each two different keyword information among the plurality of keyword information appear in the sentence information.
[0016] According to an embodiment of the present disclosure, based on the plurality of keyword information and the plurality of sentence information, determining the sentence information associated with each of the keyword information includes:
[0017] Based on the similarity between the keyword information and the sentence information, sentence information associated with each keyword information is determined.
[0018] According to an embodiment of the present disclosure, the above-mentioned text information to be processed includes a first category of text information to be processed and a second category of text information to be processed, the keyword feature information of the above-mentioned first category of text information to be processed includes first keyword feature information, and the keyword feature information of the above-mentioned second category of text information to be processed includes second keyword feature information;
[0019] The above text information processing method also includes:
[0020] The first keyword feature information and the second keyword feature information are input into a second neural network, and a text matching result between the first type of text information to be processed and the second type of text information to be processed is output.
[0021] According to an embodiment of the present disclosure, the second neural network includes: a fully connected layer, a maximum pooling layer and a classification layer connected sequentially.
[0022] A second aspect of the present disclosure provides a text information processing device, comprising:
[0023] An extraction module, used to extract multiple keyword information and multiple sentence information from the text information to be processed;
[0024] A first association module, configured to generate keyword association information based on the plurality of keyword information and the plurality of sentence information, wherein the keyword association information is used to characterize association attributes between different keyword information;
[0025] A second association module, configured to determine sentence information associated with each of the keyword information based on the plurality of keyword information and the plurality of sentence information;
[0026] The feature output module is used to input the plurality of the above-mentioned keyword information, the sentence information associated with each of the above-mentioned keyword information, and the above-mentioned keyword association information into the first neural network, and output keyword feature information, wherein the above-mentioned keyword feature information is used to characterize the semantic features of the above-mentioned text to be processed.
[0027] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned text information processing method.
[0028] The fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned text information processing method.
[0029] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned text information processing method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0031] Figure 1 A diagram schematically shows an application scenario of a text information processing method and device according to an embodiment of the present disclosure;
[0032] Figure 2 A flowchart of a text information processing method according to an embodiment of the present disclosure is schematically shown;
[0033] Figure 3 The application scenario diagram of text information processing according to an embodiment of the present disclosure is schematically shown;
[0034] Figure 4 A network structure diagram of a first neural network according to an embodiment of the present disclosure is schematically shown;
[0035] Figure 5 A network structure diagram of a second neural network according to an embodiment of the present disclosure is schematically shown;
[0036] Figure 6 A structural block diagram schematically shows a text information processing device according to an embodiment of the present disclosure; and
[0037] Figure 7 A block diagram of an electronic device suitable for implementing a text information processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0038] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0039] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0040] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0041] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0042] With the release of laws, regulations, specifications or standards, relevant organizations or institutions need to modify their internal management systems in accordance with the latest laws, regulations or specifications to ensure that their internal management systems comply with the latest relevant laws, regulations or specifications.
[0043] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following technical problems in the related technology: the text information such as laws, regulations, specifications, standards or internal management systems is relatively long, which leads to the one-sidedness of the semantic features extracted from the text information such as laws, regulations, specifications, standards or internal management systems, and semantic missing is prone to occur, resulting in low accuracy of semantic understanding.
[0044] In order to at least partially solve the technical problems existing in the related technologies, the embodiments of the present disclosure provide a text information processing method, device, equipment, medium and program product, which can be applied to the financial field and the artificial intelligence field. For example, in financial institutions such as banks and insurance companies, the text information processing method provided by the present disclosure can be applied to improve the accuracy of semantic understanding of the latest regulations issued by relevant departments. However, it is not limited to this, and can also be used in any field other than the financial field and the artificial intelligence field. The application field of the method, device, electronic device, medium and program product provided by the embodiments of the present disclosure is not limited.
[0045] An embodiment of the present disclosure provides a text information processing method including:
[0046] Extract multiple keyword information and multiple sentence information from the text information to be processed; generate keyword association information based on the multiple keyword information and the multiple sentence information, wherein the keyword association information is used to characterize the association attributes between different keyword information; determine the sentence information associated with each keyword information based on the multiple keyword information and the multiple sentence information; input the multiple keyword information, the sentence information associated with each keyword information and the keyword association information into a first neural network, and output keyword feature information, wherein the keyword feature information is used to characterize the semantic features of the text to be processed.
[0047] According to an embodiment of the present disclosure, keyword association information is generated based on multiple keyword information and multiple sentence information, and the association attributes between multiple keywords can be extracted; the sentence information associated with each keyword information can be determined, and the association attributes between the keyword information and the sentence information can be determined; the multiple keyword information, the sentence information associated with each keyword information, and the keyword association information are processed using a first neural network to obtain semantic features of the text to be processed, and the semantic information of the keyword information and the sentence information can be fused, and combined with the association attributes between the keyword information, keyword feature information used to characterize the semantic features of the text to be processed can be obtained, thereby improving the accuracy and comprehensiveness of the semantic feature extraction for the text to be processed.
[0048] Figure 1 The following schematically shows an application scenario diagram of the text information processing method and device according to an embodiment of the present disclosure. It should be noted that: Figure 1What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0049] like Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0050] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0051] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0052] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0053] It should be noted that the text information processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the text information processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The text information processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the text information processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0054] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0055] It should be noted that the text information processing method and device of the embodiment of the present disclosure can be used in the field of artificial intelligence, and can also be used in any field other than the field of artificial intelligence. The present disclosure will be described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0056] In the technical solution disclosed in the present invention, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and do not violate public order and good morals.
[0057] Figure 2 The flowchart of the text information processing method according to the embodiment of the present disclosure is schematically shown.
[0058] like Figure 2 As shown, the text information processing method of this embodiment may include operations S210 to S240.
[0059] In operation S210, a plurality of keyword information and a plurality of sentence information are extracted from the text information to be processed.
[0060] According to an embodiment of the present disclosure, keyword information may include word information representing the subject of the text information to be processed. For example, the text information to be processed includes "Professionals engaged in securities business shall obtain professional qualifications and practice certificates in accordance with the provisions of these Measures. ... The qualification examination shall be organized by the association. Those who pass the examination shall obtain professional qualifications. There is no professional classification examination for professional qualifications. The qualification examination content includes a basic subject and a professional subject." The keyword information may include: "securities", "professional qualifications", "examination". Sentence information may include sentences in the text information to be processed. In an embodiment of the present disclosure, the text information to be processed is relatively long, so the text information to be processed includes multiple sentence information.
[0061] According to an embodiment of the present disclosure, keyword information may be extracted from the text information to be processed based on a statistical method. For example, the TextRank algorithm may be used to extract one or more word information that appears most frequently in the text information to be processed as keyword information.
[0062] In operation S220, keyword association information is generated based on the plurality of keyword information and the plurality of sentence information, wherein the keyword association information is used to represent association attributes between different keyword information.
[0063] According to an embodiment of the present disclosure, sentence information may include one or more keyword information, so keyword association information may be generated based on the number of times different keyword information appears in the sentence information to characterize association properties between different keyword information.
[0064] In operation S230, sentence information associated with each keyword information is determined based on the plurality of keyword information and the plurality of sentence information.
[0065] According to an embodiment of the present disclosure, the sentence information associated with the keyword information may include sentence information containing the keyword information, or sentence information containing semantic information of the keyword information.
[0066] In operation S240, a plurality of keyword information, sentence information associated with each keyword information, and keyword associated information are input into a first neural network, and keyword feature information is output, wherein the keyword feature information is used to characterize semantic features of the text to be processed.
[0067] According to an embodiment of the present disclosure, the first neural network may be a trained neural network, such as a trained gated recurrent neural network, or may be a neural network constructed based on a graph convolutional neural network. Using the first neural network to process multiple keyword information, sentence information associated with each keyword information, and keyword association information can effectively improve the speed of outputting keyword feature information and improve the efficiency of obtaining semantic features of the text information to be processed.
[0068] It should be understood that before inputting into the first neural network, the keyword information, the sentence information associated with each keyword information, and the keyword association information need to be encoded and converted into encoded information that can be processed by the first neural network. For example, the Bert model can be used for encoding, but it is not limited to this. It can also be encoded through the word2vec model. Those skilled in the art can select the encoding model according to actual needs.
[0069] According to an embodiment of the present disclosure, keyword association information is generated based on multiple keyword information and multiple sentence information, and the association attributes between multiple keywords can be extracted; the sentence information associated with each keyword information can be determined, and the association attributes between the keyword information and the sentence information can be determined; the multiple keyword information, the sentence information associated with each keyword information, and the keyword association information are processed using a first neural network to obtain semantic features of the text to be processed, and the semantic information of the keyword information and the sentence information can be fused, and combined with the association attributes between the keyword information, keyword feature information used to characterize the semantic features of the text to be processed can be obtained, thereby improving the accuracy and comprehensiveness of the semantic feature extraction for the text to be processed.
[0070] According to an embodiment of the present disclosure, in operation S220, generating keyword association information based on multiple keyword information and multiple sentence information may include:
[0071] The keyword association information is generated based on the number of times each two different keyword information in the plurality of keyword information appear in the sentence information.
[0072] According to an embodiment of the present disclosure, the keyword association information may be matrix coding information, and the keyword association information may be generated according to whether every two different keyword information appear simultaneously in the same sentence information.
[0073] For example, keyword information may include k 1 , k 2 , k 3 , k 4 and k 5 , in the sentence information contained in the text information to be processed, a sentence information contains k 1 With k 2 In the case of 1 With k 2 The association information between can be 1, and k is not included in all sentence information. 2 With k 3 In the case of 2 With k 3 The association information between can be 0. 1 to k 5 In the above example, each keyword information is associated with the keyword information k 1 to k 5 By comparing, a 5×5 dimensional matrix A can be generated. The keyword association information can be represented as the matrix A, and the matrix A can be used to represent the association attributes between different keyword information.
[0074] According to an embodiment of the present disclosure, in operation S230, based on the plurality of keyword information and the plurality of sentence information, determining the sentence information associated with each keyword information may include:
[0075] Based on the similarity between the keyword information and the sentence information, the sentence information associated with each keyword information is determined.
[0076] According to an embodiment of the present disclosure, by determining a similarity calculation result between the keyword information and the sentence information, if the similarity calculation result is greater than or equal to a preset similarity threshold, the sentence information associated with the keyword information can be determined.
[0077] It should be noted that the preset similarity threshold can be set according to actual needs, and the embodiments of the present disclosure do not limit the specific value of the preset similarity threshold.
[0078] For example, in the text information to be processed, the keyword information may include k 1 to k n , sentence information can include S 1 To S m . For keyword information k 1 to k n Encode and generate keyword encoding information 1 To e n ; For sentence information S 1 To S m Encode and generate sentence encoding information e s1 To e sm . For keyword information k i , determine the keyword encoding information e i (1≤i≤n) and sentence encoding information e s1 To e sm The cosine similarity calculation result of each sentence encoding information in is greater than the preset similarity threshold, and the sentence information is determined to be similar to the keyword information k. i By calculating the cosine similarity, we can determine the i The associated sentence information includes S 1 ......S j (1<j≤n), that is, to determine the keyword information k i The associated sentence information includes j pieces.
[0079] Figure 3 The application scenario diagram of text information processing according to an embodiment of the present disclosure is schematically shown.
[0080] like Figure 3 As shown, multiple keyword information 321 and multiple sentence information 322 can be extracted from the text information to be processed 310. The multiple keyword information 321 can include keyword information k a1 , k a2 , k a3 ; The plurality of sentence information 322 may include sentence information S a1 , S a2 , S a3 , S a4 , S a5 In this embodiment, the TextRank algorithm can be used to extract keyword information k from the text information to be processed. a1 , k a2 , k a3 .
[0081] The keyword information k a1 , k a2 , k a3Input encoder 331, the keyword information k a1 , k a2 , k a3 Converted into a plurality of keyword encoding information 341, the plurality of keyword encoding information 341 may include keyword encoding information e a1 、e a2 、e a3 . The sentence information S a1 , S a2 , S a3 , S a4 , S a5 Input encoder 332, the sentence information S a1 , S a2 , S a3 , S a4 , S a5 Converted into a plurality of sentence encoding information 342, the plurality of sentence encoding information 342 may include sentence encoding information e sa1 、e sa2 、e sa3 、e sa4 、e sa5 .
[0082] Target keyword information a1 In operation S350, the keyword encoding information e a1 Respectively with the sentence encoding information e sa1 、e sa2 、e sa3 、e sa4 、e sa5 Perform similarity association to determine the key word information k a1 The associated sentence encoding information 361 may include sentence encoding information e sal 、e sa2 、e sa3 Therefore, it can be determined that the keyword information k a1 The associated sentence information is S a1 , S a2 , S a3 .
[0083] It should be noted that, in operation S350 of this embodiment, the keyword encoding information e can be calculated. a1 Respectively with the sentence encoding information e sal 、e sa2 、e sa3 、e sa4 、e sa5 The cosine similarity calculation result of the sentence encoding information e is calculated. When the cosine similarity calculation result is greater than or equal to the preset similarity threshold, the sentence encoding information e is converted into sa1 、e sa2 、esa3 Determined to be related to keyword information k a1 Associated sentences encode information.
[0084] Using the same method, we can determine the keyword information k a2 The associated sentence encoding information 362 may include sentence encoding information e sa1 、e sa2 、e sa5 ; can determine the keyword information k a3 The associated sentence encoding information 363 may include sentence encoding information e sa3 、e sa4 、e sa5 .
[0085] It should be noted that Figure 3 The number of keyword information and sentence information in the text information to be processed is only for illustration. According to actual needs, the text information to be processed may have any number of keyword information and sentence information.
[0086] According to an embodiment of the present disclosure, the first neural network may include: a gated recurrent neural network layer and a graph convolutional neural network layer.
[0087] Operation S240, inputting a plurality of keyword information, sentence information associated with each keyword information, and keyword associated information into a first neural network, and outputting keyword feature information may include:
[0088] Input multiple keyword information and sentence information associated with each keyword information into the gated recurrent neural network layer so as to fuse the semantic features in the sentence information into the keyword information associated with the sentence information to obtain multiple fused keyword information; input the multiple fused keyword information and the keyword association information into the graph convolutional neural network layer so as to fuse the association attributes between different keyword information with the multiple fused keyword information and output keyword feature information.
[0089] Figure 4 The network structure diagram of the first neural network according to an embodiment of the present disclosure is schematically shown.
[0090] like Figure 4 As shown, the first neural network 410 may include a gate recurrent neural network layer 411 and a graph convolutional neural network layer 412. The text information to be processed may include a plurality of keyword information 421 and a plurality of sentence information 422. The plurality of keyword information 421 may include keyword information e 1 、e 2 、e 3 ; The plurality of sentence information 422 may include S 11 , S 12 , S 13 , S21 , S 22 , S 23 , S 31 , S 32 , S 33 . With keyword information 1 The associated sentence information may include sentence information S 11 , S 12 , S 13 ; and keyword information 2 The associated sentence information may include sentence information S 21 , 5 22 , S 23 ; and keyword information 3 The associated sentence information may include sentence information S 31 , S 32 , S 33 .
[0091] Keyword information 1 , and keyword information 1 Related sentence information S 11 , S 12 , S 13 The input gate recurrent neural network (GRU) layer 411 can transform the sentence information S 11 , S 12 , S 13 The semantic features in the text are fused into the keyword information 1 In the above example, we get the fusion keyword information f 1 Accordingly, the keyword information can be 2 and sentence information S 21 , S 22 , S 23 Input gate recurrent neural network (GRU) layer 411 to obtain fused keyword information f 2 , integrating keyword information 2 Contains sentence information S 21 , S 22 , S 23 Semantic features of keywords 3 and sentence information S 31 , S 32 , S 33 Input gate recurrent neural network (GRU) layer 411 to obtain fused keyword information f 3 , integrating keyword information 3 Contains sentence information S 31 , S 32 , S 33 Therefore, the plurality of fused keyword information 423 may include fused keyword information f 1 、f2 、f 3 .
[0092] The multiple fused keyword information 423 and the keyword association information 424 are input into the graph convolutional neural network (GCN) layer 412, and the association attributes between different keyword information and the fused keyword information f 1 、f 2 、f 3 Fusion, output keyword feature information 432. Therefore, keyword feature information 432 includes semantic features of multiple sentence information 422, as well as association attributes between different keyword information, and fusion of association attributes between keyword information of the text information to be processed and semantic features of sentence information can avoid the one-sidedness of information extraction and reduce information forgetting, thereby fully reflecting the semantic features of the text information to be processed and the association attributes between keyword information, thereby improving the accuracy and comprehensiveness of semantic feature extraction for the text to be processed.
[0093] According to an embodiment of the present disclosure, the text information to be processed may include a first category of text information to be processed and a second category of text information to be processed, the keyword feature information of the first category of text information to be processed includes first keyword feature information, and the keyword feature information of the second category of text information to be processed includes second keyword feature information;
[0094] The method for text information processing may further include: inputting the first keyword feature information and the second keyword feature information into a second neural network, and outputting a text matching result between the first category of text information to be processed and the second category of text information to be processed.
[0095] According to an embodiment of the present disclosure, the text matching result may include a binary classification calculation result for the first keyword feature information and the second keyword feature information. For example, when the binary classification calculation result is 0, it may indicate that the first category of text information to be processed does not match the second category of text information to be processed; when the binary classification calculation result is 1, it may indicate that the first category of text information to be processed matches the second category of text information to be processed.
[0096] According to an embodiment of the present disclosure, the second neural network may include: a fully connected layer, a maximum pooling layer, and a classification layer connected in sequence.
[0097] Figure 5 The network structure diagram of the second neural network according to an embodiment of the present disclosure is schematically shown.
[0098] like Figure 5As shown, the second neural network 510 may include a fully connected layer 511, a maximum pooling layer 512 and a classification layer 513 connected in sequence, and the classification layer 513 may include a multi-layer perceptron (MLP) network layer.
[0099] The above text information processing method can be used to process the first type of text information to be processed and the second type of text information to be processed respectively to obtain the first keyword feature information 521 and the second keyword feature information 522. The first keyword feature information 521 is obtained based on the first type of text information to be processed, and the second keyword feature information 522 is obtained based on the second type of text information to be processed.
[0100] The first keyword feature information 521 and the second keyword feature information 522 are input into the fully connected layer 511 in the second neural network 510. After the first keyword feature information 521 and the second keyword feature information 522 are processed by the fully connected layer 511, the maximum pooling layer 512 and the classification layer 513, a binary classification calculation result 530 for the first keyword feature information 521 and the second keyword feature information 522 can be obtained. When the binary classification calculation result 530 is 0, it can be indicated that the first category of text information to be processed does not match the second category of text information to be processed; when the binary classification calculation result 530 is 1, it can be indicated that the first category of text information to be processed matches the second category of text information to be processed.
[0101] The first keyword feature information incorporates the association attributes between the keyword information of the first category of text information to be processed and the semantic features of the sentence information, so the first keyword feature information can fully reflect the association attributes between the semantic features of the first category of text information to be processed and the keyword information in the first category of text information to be processed. Correspondingly, the second keyword feature information can fully reflect the association attributes between the semantic features of the second category of text information to be processed and the keyword information in the second category of text information to be processed.
[0102] By processing the first keyword feature information and the second keyword feature information through the second neural network, a text matching result of the first category of text information to be processed and the second category of text information to be processed is obtained, which can comprehensively reflect the text semantic information and keyword semantic information of the first category of text information to be processed and the second category of text information to be processed, reduce information forgetting, and improve the accuracy of text matching.
[0103] Based on the above text information processing method, the present disclosure also provides a text information processing device. Figure 6 The device is described in detail.
[0104] Figure 6 The structural block diagram of the text information processing device according to the embodiment of the present disclosure is schematically shown.
[0105] like Figure 6 As shown, the text information processing device 600 of this embodiment includes an extraction module 610 , a first association module 620 , a second association module 630 and a feature output module 640 .
[0106] The extraction module 610 is used to extract a plurality of keyword information and a plurality of sentence information from the text information to be processed.
[0107] The first association module 620 is used to generate keyword association information based on multiple keyword information and multiple sentence information, wherein the keyword association information is used to represent association attributes between different keyword information.
[0108] The second associating module 630 is used to determine sentence information associated with each keyword information based on the multiple keyword information and the multiple sentence information.
[0109] The feature output module 640 is used to input multiple keyword information, sentence information associated with each keyword information, and keyword association information into the first neural network, and output keyword feature information, wherein the keyword feature information is used to characterize the semantic features of the text to be processed.
[0110] According to an embodiment of the present disclosure, the first neural network includes: a gated recurrent neural network layer and a graph convolutional neural network layer.
[0111] The feature output module includes: a first fusion submodule and a second fusion submodule.
[0112] The first fusion submodule is used to input multiple keyword information and sentence information associated with each keyword information into the gated recurrent neural network layer so as to fuse the semantic features in the sentence information into the keyword information associated with the sentence information to obtain multiple fused keyword information.
[0113] The second fusion submodule is used to input multiple fused keyword information and keyword association information into the graph convolutional neural network layer, so as to fuse the association attributes between different keyword information with the multiple fused keyword information and output keyword feature information.
[0114] According to an embodiment of the present disclosure, the first associating module may include a first associating submodule.
[0115] The first association submodule is used to generate keyword association information based on the number of times each two different keyword information appear in the sentence information among the multiple keyword information.
[0116] According to an embodiment of the present disclosure, the second associating module may include a second associating submodule.
[0117] The second association submodule determines sentence information associated with each keyword information based on the similarity between the keyword information and the sentence information.
[0118] According to an embodiment of the present disclosure, the text information to be processed includes a first category of text information to be processed and a second category of text information to be processed, the keyword feature information of the first category of text information to be processed includes first keyword feature information, and the keyword feature information of the second category of text information to be processed includes second keyword feature information;
[0119] The text information processing device also includes a matching module.
[0120] The matching module is used to input the first keyword feature information and the second keyword feature information into the second neural network, and output the text matching result of the first category of text information to be processed and the second category of text information to be processed.
[0121] According to an embodiment of the present disclosure, the second neural network includes a fully connected layer, a maximum pooling layer and a classification layer that are connected in sequence.
[0122] According to an embodiment of the present disclosure, any multiple modules of the extraction module 610, the first association module 620, the second association module 630 and the feature output module 640 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the extraction module 610, the first association module 620, the second association module 630 and the feature output module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the extraction module 610, the first association module 620, the second association module 630 and the feature output module 640 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0123] Figure 7 A block diagram of an electronic device suitable for implementing a text information processing method according to an embodiment of the present disclosure is schematically shown.
[0124] like Figure 7As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0125] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0126] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0127] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0128] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: 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), 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 the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0129] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the text information processing method provided by the embodiment of the present disclosure.
[0130] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0131] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0132] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0133] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0134] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0135] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0136] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A text information processing method, include: Extracting multiple keyword information and multiple sentence information from the text information to be processed; Generate keyword association information based on the plurality of keyword information and the plurality of sentence information, wherein the keyword association information is used to characterize association attributes between different keyword information; Based on the plurality of keyword information and the plurality of sentence information, determining sentence information associated with each of the keyword information; Inputting a plurality of the keyword information, sentence information associated with each of the keyword information, and the keyword association information into a first neural network, and outputting keyword feature information, wherein the keyword feature information is used to characterize the semantic features of the text to be processed; Wherein, the first neural network includes: a gated recurrent neural network layer and a graph convolutional neural network layer; Inputting a plurality of keyword information, sentence information associated with each keyword information, and the keyword associated information into a first neural network, and outputting keyword feature information includes: Inputting the plurality of keyword information and sentence information associated with each keyword information into the gated recurrent neural network layer so as to fuse the semantic features in the sentence information into the keyword information associated with the sentence information to obtain a plurality of fused keyword information; Input the multiple fused keyword information and the keyword association information into the graph convolutional neural network layer so as to fuse the association attributes between the different keyword information with the multiple fused keyword information and output the keyword feature information.
2. The method according to claim 1, in, Generating keyword association information based on the plurality of keyword information and the plurality of sentence information includes: The keyword association information is generated based on the number of times each two different keyword information among the plurality of keyword information appear in the sentence information.
3. The method according to claim 1, in, Based on the plurality of keyword information and the plurality of sentence information, determining sentence information associated with each keyword information includes: Based on the similarity between the keyword information and the sentence information, sentence information associated with each keyword information is determined.
4. The method according to claim 1, in, The text information to be processed includes a first category of text information to be processed and a second category of text information to be processed, the keyword feature information of the first category of text information to be processed includes first keyword feature information, and the keyword feature information of the second category of text information to be processed includes second keyword feature information; The text information processing method further includes: The first keyword feature information and the second keyword feature information are input into a second neural network, and a text matching result between the first category of text information to be processed and the second category of text information to be processed is output.
5. The method according to claim 4, in, The second neural network includes: a fully connected layer, a maximum pooling layer and a classification layer connected in sequence.
6. A text information processing device, include: An extraction module, used to extract multiple keyword information and multiple sentence information from the text information to be processed; A first association module, configured to generate keyword association information based on the plurality of keyword information and the plurality of sentence information, wherein the keyword association information is used to characterize association attributes between different keyword information; A second associating module, configured to determine sentence information associated with each of the keyword information based on the plurality of keyword information and the plurality of sentence information; A feature output module, used to input a plurality of the keyword information, sentence information associated with each of the keyword information, and the keyword association information into a first neural network, and output keyword feature information, wherein the keyword feature information is used to characterize the semantic features of the text to be processed; The first neural network includes: a gated recurrent neural network layer and a graph convolutional neural network layer, and the feature output module includes: A first fusion submodule, used for inputting the plurality of keyword information and sentence information associated with each keyword information into the gated recurrent neural network layer, so as to fuse the semantic features in the sentence information into the keyword information associated with the sentence information, and obtain a plurality of fused keyword information; The second fusion submodule is used to input the multiple fused keyword information and the keyword association information into the graph convolutional neural network layer, so as to fuse the association attributes between different keyword information with the multiple fused keyword information and output the keyword feature information.
7. An electronic device, 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 execute the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 5.
9. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Automatic text summarization method based on fusion semantic clustering
CN108197111A
Pseudo-correlation feedback model information retrieval method and system based on semantic similarity
CN109829104A
Keyword extraction method and system based on fence type long-short term memory neural network
CN110263323A
Information processing method and device, equipment and storage medium
CN110968684A
Intelligent keyword extraction method and device, computer equipment and storage medium
CN113239668A
