A processing method and device

By obtaining category feature information from the graph network to process text feature information, the problem of low recognition accuracy when there are many words in text recognition and complex relationships is solved, and higher recognition accuracy is achieved.

CN114742053BActive Publication Date: 2025-06-27LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210238777.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2025-06-27
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

In text recognition, the prior art performs well when the number of words is small or the relationship is simple, but when the number of words is large and the relationship is complex, the recognition accuracy is low.

Method used

By obtaining the category feature information of at least two categories of words having an association relationship from the graph network, the text feature information of the to be processed text is processed, and the position information of the to be processed words is obtained.

Benefits of technology

Even when there are many categories of words to be processed in the text to be processed and the relationship between each category is complex, this method can guide the processing of text feature information through the category feature information in the graph network and improve the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114742053B_ABST
    Figure CN114742053B_ABST
Patent Text Reader

Abstract

The present application discloses a processing method and apparatus. Among them, the method includes: obtaining a text to be processed containing at least one word to be processed; extracting features from the text to be processed to obtain text feature information; obtaining category feature information of at least two categories of words with an association relationship from a graph network; processing the text feature information based on the category feature information to obtain the position information of at least one category of the words to be processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and in particular, to a processing method and apparatus. Background Art

[0002] In practical applications, during text recognition, when the number of words in the text is small or the relationships between words are simple, the accuracy of text recognition is good. However, if the relationships between words in the text are complex, the accuracy of text recognition in related technologies is low. Summary of the Invention

[0003] Based on the above problems, embodiments of this application provide a processing method and apparatus.

[0004] The technical solution provided by the embodiments of this application is as follows:

[0005] Embodiments of this application provide a processing method, where the method includes:

[0006] Obtain a to-be-processed text including at least one to-be-processed word;

[0007] Extract features from the to-be-processed text to obtain text feature information;

[0008] Obtain category feature information of at least two categories of words with an association relationship from a graph network;

[0009] Process the text feature information based on the category feature information to obtain position information of at least one category of the to-be-processed words.

[0010] Embodiments of this application also provide a processing apparatus, including:

[0011] An obtaining module, configured to obtain a to-be-processed text including at least one to-be-processed word;

[0012] An extraction module, configured to extract features from the to-be-processed text to obtain text feature information;

[0013] The obtaining module is further configured to obtain category feature information of at least two categories of words with an association relationship from a graph network;

[0014] A processing module, configured to process the text feature information based on the category feature information to obtain position information of at least one category of the to-be-processed words.

[0015] Embodiments of this application also provide an electronic device, where the electronic device includes a processor and a memory; a computer program is stored in the memory, and when the computer program is executed by the processor, it can implement the processing method provided in any previous embodiment.

[0016] An embodiment of the present application also provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium; when the computer program is executed by a processor of an electronic device, the processing method described in any of the previous embodiments can be implemented.

[0017] As can be seen from the above, for the processing method provided by the embodiment of the present application, after obtaining the text feature information from the text to be processed, it does not only process based on the characteristics of the text feature information itself, but analyzes and processes the text feature information through the category feature information of at least two categories of words with an association relationship in the graph network. Since the graph network carries the category feature information of at least two categories of words and the association relationship between at least two categories of words, thus, even when there are many categories of words to be processed in the text to be processed and the relationships between the categories are complex, the processing method provided by the embodiment of the present application can still use the prior knowledge of the category feature information with an association relationship extracted from the graph network to guide and intervene in the processing process of the text feature information, so that the obtained position information of at least one category of words to be processed can be more consistent with the categories, positions of each word to be processed in the text to be processed, and the association relationship between each word to be processed, thereby improving the accuracy of determining the categories and positions of the words to be processed in the text to be processed with complex relationships. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a schematic flowchart of the processing method provided by the embodiment of the present application;

[0019] Figure 2 is a schematic flowchart of obtaining the position information of at least one category of words to be processed provided by the embodiment of the present application;

[0020] Figure 3 is a schematic flowchart of obtaining the position information of the words to be processed of the target category provided by the embodiment of the present application;

[0021] Figure 4 is a schematic flowchart of obtaining the category feature information provided by the embodiment of the present application;

[0022] Figure 5 is a schematic structural diagram of the processing model provided by the embodiment of the present application;

[0023] Figure 6 is a schematic flowchart of the training and use of the processing model provided by the embodiment of the present application;

[0024] Figure 7 is a schematic structural diagram of the processing device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application.

[0026] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] The present application relates to the technical field of data processing, and in particular, to a processing method and device.

[0028] Named Entity Recognition (NER) is used to identify entity names with specific meanings in text data, such as person names, city names, organization names, and professional technical terms, etc. In practical applications, NER plays an important role in fields such as information extraction, intelligent question answering systems, syntactic analysis of text data, intelligent translation, and knowledge graph construction. At the same time, NER also occupies a crucial position in the process of natural language processing (NLP) moving towards practical applications.

[0029] In practical applications, in the case where the number of word categories in the text to be recognized is small and the relationship between each category is simple, the traditional NER task can achieve the recognition of words in the text to be recognized through the method of combining Long Short-Term Memory (LSTM) and Conditional Random Field (CRF), or the method based on Bidirectional Encoder Representation from Transformers (BERT).

[0030] However, in many application scenarios, the number of categories of named entities to be recognized is large. For example, the number of categories of some named entities can reach hundreds, and the association structure relationship between some types is complex. In this case, if the method of combining LSTM and CRF or the method of BERT in the related technology is used to accurately recognize these named entities, it is necessary to determine the appropriate weights that conform to the category structure only through training data from a completely random initial parameter space during the training of the NER model. However, this requires a large amount of labeled data to achieve, but in practical applications, it is difficult to construct a sample space containing a large amount of labeled data.

[0031] In addition to the method of combining LSTM and CRF and the method of BERT, the related technologies also provide a multi-level recognition method for processing fine-grained NER. This method trains recognition models for recognition tasks with different levels of granularity respectively. However, the training process of such recognition models is complex. When the number of granularity levels increases, the training computational complexity of the above recognition models and the complexity of the recognition models will both increase exponentially. Moreover, such recognition models can only be applied to scenarios of fine-grained named entities where there is only a hierarchical structure between categories. Once the structure between named entities of different categories becomes complex, the recognition accuracy of such recognition models will be significantly weakened.

[0032] Based on the above problems, the embodiments of the present application provide a processing method and a device. The processing method provided by the embodiments of the present application can process the text feature information extracted from the text to be processed based on the category feature information of at least two categories of words with association relationships obtained from the graph network, so as to obtain the position information of the words to be processed of at least one category. In this way, through the prior knowledge of the category feature information of at least two categories of words with association relationships carried in the graph network, the processing direction of the text feature information of the text to be processed can be guided, and the accuracy of processing the text feature information can be improved, thereby improving the processing accuracy of the text to be processed.

[0033] The processing method provided by the embodiments of the present application can be implemented by a processor of an electronic device. It should be noted that the above processor can be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor.

[0034] Exemplarily, the electronic device may include a computer device, such as a server device or a personal computer (PC); Exemplarily, the electronic device may also be a smart mobile device, such as a smart phone or a tablet computer, etc.

[0035] Figure 1 For the flow chart of the processing method provided by the embodiments of the present application, as Figure 1As shown, the method may include steps 101 to 104:

[0036] Step 101, obtain a text to be processed that includes at least one word to be processed.

[0037] In one implementation, the words to be processed may include at least one of nouns, verbs, adjectives, adverbs, conjunctions, interjections, pronouns, numerals, and prepositions.

[0038] In one implementation, the words to be processed may be words of the named entity type.

[0039] In one implementation, the text to be processed may include at least one category of words to be processed; for example, the text to be processed may include at least two types of text data, such as the text to be processed may include at least two of numbers, characters, strings, combinations of characters and numbers, mathematical operation symbols, and Chinese characters; for example, the text to be processed may only include one type of text data, such as the text to be processed only includes Chinese characters or numbers.

[0040] In one implementation, in the case where the text to be processed includes multiple words to be processed, the multiple words to be processed may be organized according to the logical organizational structure of the text expression commonly used by the public, such as "I want to travel"; for example, the multiple words to be processed in the text to be processed may also be randomly organized together, such as "go I travel", and the embodiments of the present application do not limit this.

[0041] In one implementation, the text to be processed may be obtained by the processor of the electronic device from the internal storage space of the electronic device; for example, the internal storage space may include the memory or hard disk of the electronic device; for example, the text to be processed may also be obtained by the processor of the electronic device from other addresses, where the other addresses may include network addresses or addresses of the storage spaces of other devices.

[0042] Step 102, perform feature extraction on the text to be processed to obtain text feature information.

[0043] In one implementation, the text feature information may include the number of words to be processed in the text to be processed, the basic types of the words to be processed, and the semantic information obtained after integrating the text to be processed, etc. For example, the basic types of the words to be processed may include numbers, characters, strings, and mathematical symbols, etc.; for example, the semantic information obtained after integrating the text to be processed may include performing a preliminary analysis on the text to be processed to determine the logical structure information of the text to be processed. If the logical structure information of the text to be processed is not the specified logical structure information, then the text to be processed is converted, and the converted text to be processed is analyzed to obtain the above semantic information.

[0044] In one embodiment, the feature extraction of the text to be processed can be obtained by dividing the text to be processed to obtain at least one word to be processed, and then analyzing the at least one word to be processed through a binary tree algorithm or a decision tree algorithm.

[0045] In one embodiment, the feature extraction of the text to be processed can be implemented by a neural network. Exemplarily, the neural network can include an LSTM, or a convolutional neural network (CNN), etc., which can implement the function of extracting text feature information. The embodiments of the present application do not limit this.

[0046] Step 103: Obtain the category feature information of at least two categories of words with an association relationship from the graph network.

[0047] In one embodiment, the at least two categories may include the basic categories of words. For example, the word is a noun, a verb, an adjective, a preposition, etc. Exemplarily, the at least two categories may further include the extended categories of words. Among them, the extended categories may include the categories assigned or extended to the words according to the public's cognitive standards. For example, the names of provincial capitals and rural names. These words are all nouns, but based on the public's cognitive standards, the nouns representing place names can be further divided into finer-grained categories. For another example, long-distance running is a noun of the fitness sport type, but based on the public's cognitive standards, the finer-grained division of long-distance running can be the track and field sport type.

[0048] In one embodiment, the association relationship between at least two categories of words may include the association relationship between the words of the basic categories corresponding to the grammar rules. For example, according to the combination rules between an adjective and a noun, if the adjective and the noun appear adjacent to each other in the text to be processed, there is an association relationship between the adjective and the noun.

[0049] In one embodiment, the association relationship between at least two categories of words may include the association relationship between the words of the extended categories. For example, "contract" is a noun belonging to the commercial agreement category. Then, the at least two categories of words associated with "contract" include the first party, the second party, the terms, and the contract signing date in the contract.

[0050] In one implementation, a graph network may include multiple nodes and edges connecting the nodes. That is to say, the graph network may be composed of a finite non-empty set of nodes and a set of edges connecting the nodes. Among them, each node has a node vector, where the node vector can be used to represent the category feature information of a category of words. The edge connecting the nodes can be used to represent the association relationship between the nodes. Exemplarily, the edge connecting the nodes can also be represented in the form of a vector. In the embodiments of the present application, the vector of the edge connecting the nodes can be denoted as a relationship vector or an adjacency vector, which is used to represent the strength of the association relationship between the two nodes connected by the edge.

[0051] In one implementation, the graph network may include the category feature information of multiple categories of words widely used in various scenarios, as well as the association relationship information between these category feature information. For example, the graph network may include the category feature information of multiple categories of words widely used in scenarios such as tourism, catering, business, education, and medical care, as well as the association relationship information between these category feature information.

[0052] In one implementation, the graph network may include the category feature information of multiple categories of words widely used in a specified scenario, as well as the association relationship information between these category feature information. For example, the first graph network includes multiple types of words corresponding to the tourism scenario, as well as the association relationship between these types of words, and the second graph network includes multiple types of words corresponding to the medical scenario, as well as the association relationship between these types of words.

[0053] In one implementation, when the graph network includes the types of words and the attribute information of the words in a specified field, such as the types of word categories of entity categories and the attribute information of the words, the graph network can also be called the ontology graph corresponding to this field.

[0054] In one implementation, obtaining the category feature information of at least two categories of words with an association relationship from the graph network may be directly read from the graph network, or the category feature information of the words and the association relationship information between each category feature information may be first obtained from the graph network, and then at least two categories of words' category feature information are selected from multiple category feature information by a neural network according to the association relationship information between each category feature information.

[0055] Step 104: Process the text feature information based on the category feature information to obtain the position information of at least one category of words to be processed.

[0056] In one embodiment, the position information of at least one category of words to be processed may include the position information of at least one category of words to be processed relative to a specified position in the text to be processed, where the specified position may include the position of the first character of the text to be processed, or the position of the last character of the text to be processed, etc.

[0057] In one embodiment, the position information of at least one category of words to be processed may include the position information of words of a specified category in the text to be processed, such as the position information of words of the type of urban entity names in the text to be processed.

[0058] In one embodiment, the position information of at least one category of words to be processed may include the position information of words of a specified category in the text to be processed and the position information of words that do not belong to the specified category. Exemplarily, for the position information of words that do not belong to the specified category, O (Outside) may be marked at the position where the word appears in the text to be processed to indicate that the word is outside the specified category, while for the words of the specified category that appear in the text to be processed, B (Begin) is marked at the position of the first character of the word of the specified category to indicate the starting position of the detected word of the specified category, and I (Inside) is marked at the subsequent character positions of the word to indicate the second to the nth characters in the word of the specified category, where n is an integer greater than 2.

[0059] In one embodiment, processing the text feature information based on the category feature information may be implemented by any of the following methods:

[0060] Determine whether the word to be processed belongs to the specified category based on the matching degree between the category feature information and the text feature information.

[0061] Analyze and process the text feature information to determine whether the association relationship in the text feature information is consistent with the association relationship between at least two category feature information. When it is determined that the two are consistent, analyze the text feature information based on at least two category feature information to determine whether the text to be processed contains words corresponding to at least two category feature information.

[0062] In the embodiment of the present application, since the category feature information in the graph network is pre-determined, and the graph network not only contains category feature information but also contains the association relationships between various categories, therefore, the process of processing the text feature information based on the category feature information obtained from the graph network is equivalent to adding prior knowledge such as category feature information to the process of processing the text to be processed. That is to say, the process of processing the text feature information with the category feature information obtained from the graph network plays a guiding role, thereby not only improving the processing accuracy of the text to be processed but also improving the processing efficiency of the text to be processed.

[0063] As can be seen from the above, in the processing method provided in the embodiment of the present application, after obtaining the text to be processed containing at least one word to be processed and extracting the text feature information from the text to be processed, it is possible to process the text feature information based on the category feature information of at least two categories of words with association relationships obtained from the graph network to obtain the position information of at least one category of words to be processed.

[0064] Thus, in the processing method provided in the embodiment of the present application, after processing the text to be processed to obtain the text feature information, it does not only process according to the characteristics of the text feature information itself, but analyzes and processes the text feature information through the category feature information of at least two categories of words with association relationships in the graph network. Since the graph network carries the category feature information of at least two categories of words and the association relationships between at least two categories of words, thus, even when there are many categories of words to be processed in the text to be processed and the relationships between various categories are complex, the processing method provided in the embodiment of the present application can still use the prior knowledge of the category feature information with association relationships extracted from the graph network to guide and intervene in the process of processing the text feature information, so that the obtained position information of at least one category of words to be processed can be more consistent with the categories, positions of each word to be processed in the text to be processed, and the association relationships between each word to be processed, thereby improving the accuracy of determining the categories and positions of the words to be processed in the text to be processed with complex relationships.

[0065] Based on the foregoing embodiments, in the processing method provided in the embodiment of the present application, processing the text feature information based on the category feature information to obtain the position information of at least one category of words to be processed may be implemented through the Figure 2 shown process. Figure 2 FIG. is a schematic flowchart of the process for obtaining the position information of at least one category of words to be processed provided in the embodiment of the present application. As Figure 2 shown, the process may include steps 1041 to step 1042:

[0066] Step 1041: Determine the feature fusion weights of the feature fusion module of the processing model based on the category feature information.

[0067] In one implementation, the feature fusion module may include a neural network capable of implementing the feature fusion function; exemplarily, the feature fusion may include the fusion of the category feature information of the graph network and the text feature information extracted from the text to be processed.

[0068] In one implementation, the feature fusion module may fuse the category feature information and the text feature information through the attention mechanism in the field of neural networks. In the embodiments of the present application, the feature fusion module may also be referred to as the attention module. Among them, the attention module can achieve the targeted fusion of the text feature information and the category feature information obtained from the graph network to obtain the feature fusion result, and then through the fully connected layer combined with the softmax module, or through the CRF to obtain the probability that each word to be processed belongs to a certain category, and determine the category with the highest probability as the target category of the word. After the target category is determined, the position information of the word can be output.

[0069] In one implementation, the processing model may only include the feature fusion module. That is to say, the text feature information and the category feature information may be obtained by other models processing the text to be processed and the graph network respectively.

[0070] In one implementation, the processing model may further include a text processing module for processing the text to be processed, and / or a graph feature processing module for processing the graph network.

[0071] In one implementation, determining the feature fusion weights of the feature fusion module of the processing model based on the category feature information may be achieved by the following method:

[0072] Obtain the initial feature fusion weights of the feature fusion model, and then correct the initial feature fusion weights based on the category feature information to obtain the feature fusion weights of the feature fusion module.

[0073] Obtain the feature information of the specified category from the category feature information, and then correct the initial feature fusion weights of the feature fusion model based on the feature information of the specified category to obtain the feature fusion weights of the feature fusion module.

[0074] Step 1042: Through the feature fusion module, process the text feature information based on the feature fusion weights to obtain the position information of the words to be processed in at least one category.

[0075] In one embodiment, through a feature fusion module, the text feature information is processed based on the feature fusion weight to obtain the position information of the words to be processed in at least one category, which can be achieved in the following manner:

[0076] Input the text feature information into the feature fusion module, and process at least part of the feature information in the text feature information through the feature fusion weight of the feature fusion module to determine whether the text to be processed contains the words to be processed in the category corresponding to the category feature information. If the text to be processed contains the words to be processed in the category corresponding to the category feature information, obtain the position information of the words to be processed in the category corresponding to the category feature information from the text to be processed; correspondingly, if the text to be processed does not contain the words to be processed in the category corresponding to the category feature information, output O at the position information of each word to be processed to indicate that the text to be processed does not contain the words to be processed in the category corresponding to the category feature information.

[0077] As can be seen from the above, in the processing method provided by the embodiments of the present application, after obtaining the category feature information from the graph network, the feature fusion weight of the feature fusion module of the processing model can be determined based on the category feature information, and then through the feature fusion module, the text feature information is processed based on the feature fusion weight. In this way, by determining the feature fusion weight through the category feature information, the feature fusion weight contains the factors of the category feature information with an association relationship, so that the feature fusion weight can more quickly, accurately and intelligently extract the category information of each word to be processed with an association relationship from the text feature information based on the prior knowledge in the category feature information, thereby weakening the interference of the association relationship between the words to be processed on the text recognition process.

[0078] Based on the foregoing embodiments, in the processing method provided by the embodiments of the present application, through the feature fusion network, the text feature information is processed based on the feature fusion weight to obtain the position information of the words to be processed in at least one category, which can be achieved through Figure 3 the process shown, Figure 3 which is a schematic flowchart of the process for obtaining the position information of the words to be processed in the target category provided by the embodiments of the present application. As Figure 3 shown, this process may include steps 10421 to step 10422:

[0079] Step 10421: Determine the target feature information of the target category from the category feature information.

[0080] In one embodiment, the target feature information may include at least one type of feature information. Exemplarily, when the number of target feature information is one, the target feature information may be the first feature information among multiple category feature information, or may be any feature information among multiple category feature information. Exemplarily, the target feature information may be determined from multiple category feature information based on the processing requirements of the words to be processed.

[0081] In one embodiment, when the number of target feature information is at least two, the target feature information may be category feature information selected from multiple category feature information with a correlation tightness greater than a first threshold. For example, when the scenario corresponding to the graph network is a business scenario, the target feature information may include: contract, Party A, Party B, etc.

[0082] In one embodiment, the target feature information may be extracted from multiple category feature information through a neural network. Exemplarily, a target node may be set in the graph network, and then the graph network may be processed through a neural network to obtain the target feature information corresponding to the target node. Exemplarily, since the information display method of the graph network is more intuitive, setting a target node in the graph network and then obtaining the target feature information through a neural network can make the determination process of the target feature information more intuitive and improve the determination efficiency of the target feature information.

[0083] Step 10422: Through the feature fusion module, based on the feature fusion weight associated with the target feature information, process the text feature information to obtain the position information of the words to be processed in the target category.

[0084] In one embodiment, the feature fusion weight associated with the target feature information may include the weight for feature fusion and feature screening for the words to be processed in the target category.

[0085] In one embodiment, the feature fusion weight associated with the target feature information may be obtained by correcting the initial feature fusion weight of the feature fusion module based on the target feature information, and is used for fusing and screening the words to be processed in the target category.

[0086] In one embodiment, the feature fusion weight associated with the target feature information may be the weight for detecting the words to be processed in the target category, which is screened from the feature fusion weights based on the target feature information.

[0087] Exemplarily, processing the text feature information through the feature fusion module based on the feature fusion weight associated with the target feature information to obtain the position information of the words to be processed in the target category may be achieved through the following methods:

[0088] Input the text feature information into the feature fusion module, and then, based on the feature fusion weights associated with the target feature information, analyze and process the text feature information to determine whether the text feature information contains the to-be-processed words of the target type. If the to-be-processed words of the target type are included, mark the words in the form of B or I at the positions where the to-be-processed words of the target category appear; if the to-be-processed words of the target type are not included, mark each to-be-processed word in the form of O at its position.

[0089] In one implementation, in order to achieve fine-grained processing of the to-be-processed text, the feature fusion module can perform multiple processes on the text feature information. Moreover, the feature fusion weights based on which the feature fusion module processes the text feature information each time are all associated with the target feature information of the pre-determined target category, i.e., the target feature information of the k-th category. In this way, each time the feature fusion module processes the text feature information, it can determine whether the to-be-processed text contains the to-be-processed words of the k-th category and the position information of the to-be-processed words of the k-th category. After one process of the text feature information by the feature fusion module is completed, the target category can be adjusted to the (k + 1)-th category, and the text feature information can be processed again through the feature fusion weights associated with the (k + 1)-th category in the feature fusion module, so as to determine the position information of the to-be-processed words of the (k + 1)-th category. This process is repeated until the category information of each to-be-processed word in the to-be-processed text is determined. Here, k is an integer greater than or equal to 1.

[0090] In the related art, the recognition process of the traditional NER model includes the recognition of word categories and word positions. For example, B-PER represents Begin-Person and is used to indicate the category identifier starting with a person's name, while I-ORG represents Inside-Organization and is used to indicate the category identifier not starting with an organization. Such a recognition process requires processing too many types of information. Therefore, when the word categories are relatively rich, it is easy to reduce the recognition accuracy.

[0091] In the processing method provided in the embodiments of the present application, the target category can be preset. When processing the to-be-processed text, it only needs to detect whether the to-be-processed words of the target category exist. If they exist, it is only necessary to determine the position information of the to-be-processed words of the target category, thus greatly reducing the complexity of the processing process. Moreover, by adjusting the target category, it is also possible to achieve high-precision recognition of the to-be-processed text.

[0092] From the above, it can be seen that the processing method provided by the embodiment of the present application can determine the target feature information of the target category from the multiple category feature information of the graph network, and process the text feature information through the feature fusion weight associated with the target feature information in the feature fusion module, so as to obtain the position information of the words to be processed of the target category. In this way, when processing the text to be processed, by adjusting the target feature information of the target category, targeted processing of the text to be processed can be achieved; and, when the number of target feature information of the target category is 1, a single processing of the text to be processed can accurately determine the position information of a category of words to be processed in the text to be processed, so that fine-grained processing and recognition of the text to be processed can be achieved. On this basis, combined with the adjustment process of the target feature information of the target category, targeted processing of the text to be processed can be efficiently, accurately and flexibly achieved, further improving the accuracy of determining the category and position of the words to be processed in the text to be processed, and weakening the interference of the complex relationship between the words to be processed on the processing process of the text to be processed.

[0093] Based on the above embodiments, in the processing method provided in the embodiments of the present application, the feature fusion weight of the feature fusion module of the processing model is determined based on the category feature information, which can be achieved in the following way:

[0094] The text feature information is processed based on the category feature information to determine the feature fusion weight.

[0095] In one embodiment, a weighted operation can be directly performed on the category feature information and the text feature information, and the result of the operation can be determined as the feature fusion weight. The feature fusion weight obtained in this way can be sensitive to feature information of any category in the category feature information and to any feature information in the text feature information.

[0096] In one embodiment, part of the text feature information can be processed based on the category feature information according to the weight calculation function, thereby strengthening or weakening part of the text feature information, which enables the feature fusion weight to achieve targeted detection of the text feature information based on the category feature information.

[0097] In one implementation, the feature fusion weight can be calculated through three state vectors of the attention module; wherein the three state vectors of the attention module include a key vector, a value vector, and a query vector; in an embodiment of the present application, the query vector can be the category feature information obtained from the graph network, the key vector and the value vector can be the same, and can both be text feature vectors; illustratively, the key vector and the query vector can be processed through a weight calculation function to obtain the feature fusion weight of the attention module.

[0098] Exemplarily, in the embodiments of the present application, the text feature information may be a text feature vector; exemplarily, the text feature vector may be denoted as a text token. After processing the text token through a feature fusion module such as an attention module to obtain a feature fusion result, and then combining the text token, the information gain of the text token with respect to the graph network can be obtained, so that the prior knowledge in the graph network carried in the text feature fusion result can be more directly represented.

[0099] As can be seen from the above, the processing method provided by the embodiments of the present application can process the text feature information based on the category feature information to obtain a feature fusion weight, so that the feature fusion weight is not only sensitive to the text feature information, but also sensitive to the category feature information in the graph network, and further can improve the accuracy of the feature fusion module in processing the text feature information based on the prior knowledge in the graph network.

[0100] Based on the foregoing embodiments, in the processing method provided by the embodiments of the present application, obtaining the category feature information of at least two categories of words with an association relationship from the graph network can be achieved by the following methods:

[0101] Process the graph network through the graph feature extraction module of the processing model to obtain the category feature information.

[0102] In one implementation, the graph feature extraction module can obtain the category feature information from the graph network by means of node traversal. In this case, the graph feature extraction module does not process the obtained category feature information.

[0103] In one implementation, the graph feature extraction module can also be implemented by a neural network. Exemplarily, the neural network can obtain the vector feature information of multiple nodes from the graph network and process the vector feature information of each node to obtain the category feature information. Through the above processing process, the category feature information can be more sensitive to the category of the word to be processed in the text to be processed, thereby improving the processing accuracy of the processing model for the text to be processed; exemplarily, the neural network corresponding to the graph feature extraction module may include a Generative Adversarial Network (GAN).

[0104] In one implementation, the processing of the graph network by the graph feature extraction module of the processing model can be implemented by any of the following methods:

[0105] The graph feature extraction module obtains the node vector and the adjacency vector of the graph network, then adjusts and processes the node vector according to the adjacency vector, and determines the result of the adjustment and processing as the category feature information.

[0106] The graph feature extraction module obtains the node vectors and adjacency vectors in the graph network, and then obtains the node vectors with the degree of tightness of the association relationship greater than or equal to the second threshold from the node vectors according to the adjacency vectors, and uses these node vectors as the category feature information.

[0107] As can be seen from the above, the processing method provided by the embodiment of the present application can process the graph network through the graph feature extraction module of the processing model, so as to obtain the category feature information. In this way, by adjusting the parameter information of the graph feature extraction module, the targeted processing of the category feature information can be realized, thereby laying a foundation for improving the targeted processing of the text feature information and the flexibility of the text to be processed.

[0108] Based on the foregoing embodiments, in the processing method provided by the embodiments of the present application, through the graph feature extraction module of the processing model, the graph network is processed to obtain the category feature information, which can be achieved through Figure 4 the process shown. Figure 4 It is a schematic flowchart of the process for obtaining the category feature information provided by the embodiment of the present application. As Figure 4 shown, the process may include steps 401 to 402:

[0109] Step 401: Quantify the category information in the graph network and the association relationship between each category through the graph embedding unit of the graph feature extraction module to obtain the initial category feature information and the association relationship information of the graph network.

[0110] In one implementation, the category information in the graph network may be the node vectors in the graph network; the association relationship between each category in the graph network may be the adjacency vectors in the graph network.

[0111] In one implementation, the graph embedding unit can be used to perform quantization processing on the discrete node vectors and adjacency vectors after reading the node vectors and adjacency vectors in the graph network, so as to convert the node vectors and adjacency vectors into continuous initial category feature information and association relationship information.

[0112] In one implementation, the initial category feature information and the association relationship information may also be embodied in the form of vectors; for example, multiple initial category feature information and association relationship information may constitute an initial category feature matrix and an adjacency matrix.

[0113] In one implementation, the graph embedding unit may include any graph data processing unit capable of implementing Graph Embedding.

[0114] Step 402: Process the initial category feature information based on the association relationship information through the graph coding unit of the graph feature extraction module to obtain the category feature information.

[0115] In one embodiment, the graph encoding unit can aggregate adjacent feature information in the initial category feature information, so as to achieve adaptive matching of different adjacent feature information.

[0116] In one embodiment, the graph encoding unit can be a Graph Attention Network (GAT). Exemplarily, GAT can adjust and process the adjacent feature information in the initial category feature information based on the association relationship information combined with the attention coefficient, so as to improve the consistency between the feature representation of the adjacent feature information and the association relationship information.

[0117] In one embodiment, the graph encoding unit can adjust the vector elements in the initial category feature information based on the association relationship information, so that the distance or association degree between adjacent or related category feature information in the initial category feature information can be consistent with the association relationship information, and further the finally obtained category feature information can fully contain the information of the node vectors and adjacency vectors in the graph network.

[0118] As can be seen from the above, in the processing method provided by the embodiments of the present application, the category information in the graph network and the association relationship between each category are quantified through the graph embedding unit of the graph feature extraction module to obtain the initial category feature information and the association relationship information of the graph network, and then the initial category feature information is processed based on the association relationship information through the graph encoding unit of the graph feature extraction module, so as to finally obtain the category feature information.

[0119] In this way, through the above processing process, the category feature information not only has the characteristic of continuous features, but also is consistent with the association relationship information in the graph network, so as to improve the consistency between the category feature information and the network structure of the graph network.

[0120] Based on the foregoing embodiments, in the processing method provided by the embodiments of the present application, feature extraction is performed on the text to be processed to obtain text feature information, which can be implemented through steps A1 to A2:

[0121] Step A1: Quantify the word to be processed through the text encoding unit of the processing model to obtain a text quantization result.

[0122] In one embodiment, the text quantization result can be embodied in the form of a binary code stream. For example, the quantization result of the first word to be processed is 100010, and the quantization result of the second word to be processed can be 010001.

[0123] In one implementation, the text encoding unit quantifies the words to be processed, which may be to encode and quantify the text information contained in each word to be processed.

[0124] In one implementation, the text encoding unit of the processing model may first segment the text to be processed to obtain at least one word to be processed, and then determine the encoding information of each word to be processed according to the word to be processed and the word encoding set, so as to realize the quantification of each word to be processed and obtain the text quantification result. Exemplarily, the word encoding set may be a data set including words and encoding information, in which there is a one-to-one correspondence between the words and the encoding information.

[0125] In one implementation, the text encoding unit may be implemented by the language model word2vec.

[0126] Step A2: The first text extraction unit extracts features from the text quantification result to obtain text feature information.

[0127] In one implementation, the first text extraction unit may analyze the correlation relationship of each quantization result in the text quantization result, and adjust the vector elements in the text quantization result according to the correlation relationship, so as to obtain the text feature information.

[0128] In one implementation, the first text extraction unit may be implemented by a neural network, such as an LSTM or a Convolutional Neural Network (CNN). These neural networks can analyze whether there is a correlation relationship between each quantization result in the text quantization result and the strength of the correlation relationship, and adjust the vector elements in the text quantization result according to the analysis result, so that the text feature information is more consistent with the deep semantic information of the text to be processed.

[0129] As can be seen from the above, in the processing method provided by the embodiments of the present application, each word to be processed in the text to be processed is quantified by the text encoding unit of the processing model to obtain the text quantization result, so that the discrete words to be processed can be converted into continuous text feature vectors. The text feature information obtained by the first text extraction unit extracting features from the text quantization result not only carries the meaning information of each word to be processed, but also contains the deep semantic information of the text to be processed, thus providing objective data support for the high-precision recognition of the words to be processed.

[0130] Based on the foregoing embodiments, in the processing method provided by the embodiments of the present application, the features of the text to be processed are extracted to obtain text feature information, which may also be implemented in the following manner:

[0131] The second text extraction unit of the processing model analyzes the words to be processed and the context information of the words to be processed to obtain text feature information.

[0132] In one implementation, the context information of the word to be processed may include position information of the word to be processed in the text to be processed, basic type information of words adjacent to the word to be processed, and the like.

[0133] In one embodiment, the second text extraction unit may include BERT. When BERT processes the text to be processed, it can integrate the deep bidirectional language representation of the context information of the words to be processed, thereby obtaining a deep bidirectional language representation corresponding to each word to be processed in the text to be processed.

[0134] From the above, it can be seen that in the processing method provided in the embodiment of the present application, the second text extraction unit of the processing model can analyze the context information of the words to be processed, so that the text feature information finally obtained can be consistent with the overall context information of the text to be processed, thereby improving the consistency between the text feature information and the deep semantics of the text to be processed.

[0135] Based on the above embodiments, the present application also provides a processing model 5. Figure 5 A schematic diagram of the structure of the processing model 5 provided in the embodiment of the present application is shown in FIG. Figure 5 As shown, the processing model 5 may include: a text feature extraction module 501 , a graph feature extraction module 502 , a feature fusion module 503 and an output module 504 .

[0136] Among them, the text feature extraction module 501 may include a text encoding unit 5011 and a first text extraction unit 5012; exemplarily, the text encoding unit 5011 may be a language model word2vec, which is used to quantize the text to be processed to obtain a text quantization result; the first text extraction unit 5012 may be an LSTM, which is used to perform feature extraction on the text quantization result to obtain text feature information.

[0137] Exemplarily, the text feature extraction module 501 may also be the second text extraction unit in the aforementioned embodiment, such as GAT.

[0138] Exemplarily, the graph feature extraction unit 502 may include a graph embedding unit 5021 and a graph encoding unit 5022; wherein the graph embedding unit 5021 is used to read the node vectors and edge vectors in the graph network, and quantize the node vectors and edge vectors to obtain the initial category feature information and association relationship information of the graph network; the graph encoding unit 5022 may process the initial category feature information based on the association relationship information to obtain the category feature information.

[0139] Exemplarily, the feature fusion module 503 may include the attention module in the foregoing embodiments, which can obtain text feature information and category feature information, determine the key vector and value vector of the attention module based on the text feature information and category feature information, and then determine the weight of the attention module. Then, the text feature information is processed according to the weight to obtain a feature fusion result.

[0140] Exemplarily, the output layer 504 can predict the category of the feature fusion result; Exemplarily, the output layer 504 may include a combination of a fully connected layer and softmax, or may be implemented by CRF. Exemplarily, the position information of the word to be processed of the target category detected by the current processing model can be determined as the position information with the highest probability of the position information output by the output layer 504, and the target category is labeled based on the position information.

[0141] It should be noted that the parameters of each module or unit in the processing model 5 need to be determined by training the processing model in the initial state based on sample data.

[0142] Exemplarily, in order to train the processing model in the initial state, sample data needs to be determined first. In the embodiments of the present application, the sample data may include text samples and graph network samples; Exemplarily, the text sample may include multiple text data, and each word in the text data may carry category information; The graph network sample can correspond to various application scenarios, such as business scenarios, tourism scenarios, and medical treatment scenarios, etc.

[0143] Figure 6 It is a schematic flowchart of the training and use of the processing model provided by the embodiments of the present application, as Figure 6 shown, this process may include the following steps:

[0144] Step 601, start.

[0145] Exemplarily, in step 601, the structure information of the processing model in the initial state can be determined. For example, the structure of the processing model in the processing state can be Figure 5 the structure shown.

[0146] Step 602, construct a text sample.

[0147] Exemplarily, the text sample may include multiple text data containing at least one word; Exemplarily, when the number of words contained in the text data is multiple, the types of the multiple words may be different; Exemplarily, the text sample can be divided according to the application scenario. For example, text samples in the medical scenario, text samples in the tourism scenario, etc.

[0148] Step 603: Construct a graph network sample.

[0149] Exemplarily, the graph network sample can also correspond to the application scenario, such as the graph network sample corresponding to the medical scenario, the graph network sample corresponding to the tourism scenario, etc.

[0150] Exemplarily, the graph network sample can include the type information of the words with a usage frequency higher than the third threshold in this application scenario and the association relationship information between these type information; Exemplarily, the above type information and association relationship information can be represented in the form of node vectors corresponding to the nodes and adjacency vectors corresponding to the edges in the graph network sample.

[0151] Step 604: Obtain ontology information.

[0152] Exemplarily, the ontology information can be the category feature information obtained after quantifying and feature extracting the adjacency matrix corresponding to the node vectors and edge vectors in the graph network sample; Exemplarily, the graph network sample can be processed by the graph feature extraction module in the processing model to obtain the ontology information.

[0153] Step 605: Process the text sample and the ontology information through the processing model in the initial state.

[0154] Exemplarily, by processing the text sample and the ontology information through the processing model in the initial state, the position information of at least one category of words in the text sample can be obtained.

[0155] Exemplarily, after obtaining the position information of at least one category of words in the text sample, based on the matching relationship between its category and position information and the corresponding words in the sample data, the parameters of each module and each unit in the processing model in the initial state can be adjusted, and then based on each module and each unit in the processing model after parameter adjustment, the sample data and the ontology information are continuously processed until after obtaining the position information of at least one category of words in the text sample, the matching degree between the category and position information of this word and the category and position information of the corresponding word in the sample data is greater than or equal to the fourth threshold. At this time, the training of the processing model can be stopped.

[0156] Exemplarily, during the above training process, the category information with the highest prediction probability of the processing model can be matched with the category label information in the text sample, the processing error is calculated, and the parameters of the processing model are adjusted by backpropagating the processing error; Exemplarily, the backpropagation of the processing error can be implemented through the cross-entropy loss function.

[0157] Exemplarily, during the above training process, the category nodes in the graph sample data can be marked, and the marked graph sample data is input into the processing model. The category with the highest probability output by the processing model is matched with the category corresponding to the marked category node in the graph sample, and how to adjust each parameter of the processing model is determined according to the matching result, so as to realize the training process of the processing model for the category corresponding to the marked category node.

[0158] Step 606: Obtain the processing model.

[0159] Exemplarily, the processing model here can be a model capable of accurately identifying the word category information and location information of at least one specified application scenario.

[0160] Step 607: Process the text to be processed through the processing model.

[0161] Exemplarily, step 607 can be implemented by the processing method provided in the foregoing embodiment.

[0162] Step 608: Obtain the type information and location information.

[0163] Exemplarily, through multiple processes of the text to be processed by the processing model, the type and location information of each word to be processed in the text to be processed can be obtained.

[0164] As can be seen from the above, during the training process of the processing model provided in the embodiments of the present application, the ontology information is represented in the form of a graph network and incorporated into the processing model, i.e., NER, so that the ontology information can guide the parameter convergence direction of the processing model, so that the processing model can converge faster during training, thus accelerating the training speed of the processing model; and, the processing model provided in the embodiments of the present application has an end-to-end structure, its training process is simple, and there are few intermediate tasks for data processing, so as to reduce the risk of error accumulation in the training and actual data processing processes.

[0165] It should be noted that during the training process, the ontology information extracted in advance from the graph network can be directly used. If the existing ontology information is not available, it can be quickly constructed through the category labels in the text sample.

[0166] Correspondingly, during the process of the processing model processing the data to be processed, the graph network can also be quickly determined in the following way, and the ontology information can be obtained from the graph network:

[0167] Determine the corpus sample based on the text to be processed; determine the graph network based on the category information included in the corpus sample.

[0168] In one implementation, the corpus sample can be the text sample provided in the foregoing embodiments; for example, the corpus sample can include at least one type of word and the type information of the word.

[0169] In one implementation, the text to be processed can be preliminarily analyzed to determine the application scenario of the sample to be processed, and then the corpus sample can be determined according to the application scenario.

[0170] In one implementation, based on the application scenario corresponding to the corpus sample, the category information included in the corpus sample can be analyzed to determine whether there is an association relationship between different category words and the strength of the association relationship between different category words, etc., and then the graph network can be determined based on the category information and the above-mentioned association relationship.

[0171] As can be seen from the above, in the embodiments of the present application, the graph network can be determined based on the category information included in the surplus sample corresponding to the text to be processed, so that the consistency between the graph network and the text to be processed is stronger. Then, based on the category information obtained from the graph network, the text feature information obtained by processing the text to be processed is processed to obtain the position information of at least one category of words, which can be more consistent with the position information of the corresponding category of words in the text to be processed; moreover, based on the corpus sample, the graph network can be quickly determined, and the efficiency of processing the text to be processed can also be improved.

[0172] It should be noted that the processing method and processing model provided in the embodiments of the present application can also be used for the implementation of other tasks modeled as sequence labeling problems, such as word segmentation, part-of-speech tagging, CHUNK recognition, and syntactic analysis.

[0173] Based on the foregoing embodiments, the embodiments of the present application further provide a processing device 7. Figure 7 It is a schematic structural diagram of the processing device 7 provided in the embodiments of the present application, as Figure 7 shown. The device can include:

[0174] An acquisition module 701, configured to acquire a text to be processed including at least one word to be processed;

[0175] An extraction module 702, configured to perform feature extraction on the text to be processed to obtain text feature information;

[0176] The acquisition module 701 is further configured to acquire category feature information of at least two categories of words having an association relationship from the graph network;

[0177] A processing module 703, configured to process the text feature information based on the category feature information to obtain the position information of at least one category of words to be processed.

[0178] In one embodiment, the processing module 703 is configured to determine the feature fusion weights of the feature fusion module of the processing model based on the category feature information; and process the text feature information through the feature fusion module based on the feature fusion weights to obtain the position information of the words to be processed of at least one category.

[0179] In one embodiment, the processing module 703 is configured to determine the target feature information of the target category from the category feature information; and process the text feature information through the feature fusion module based on the feature fusion weights associated with the target feature information to obtain the position information of the words to be processed of the target category.

[0180] In one embodiment, the processing module 703 is configured to process the text feature information based on the category feature information to determine the feature fusion weights.

[0181] In one embodiment, the processing module 703 is configured to process the graph network through the graph feature extraction module of the processing model to obtain the category feature information.

[0182] In one embodiment, the processing module 703 is configured to quantify the category information in the graph network and the association relationships between the categories through the graph embedding unit of the graph feature extraction module to obtain the initial category feature information and the association relationship information of the graph network; and process the initial category feature information through the graph encoding unit of the graph feature extraction module based on the association relationship information to obtain the category feature information.

[0183] In one embodiment, the processing module 703 is configured to quantify the words to be processed through the text encoding unit of the processing model to obtain the text quantization result; and perform feature extraction on the text quantization result through the first text extraction unit to obtain the text feature information.

[0184] In one embodiment, the processing module 703 is configured to analyze the words to be processed and the context information of the words to be processed through the second text extraction unit of the processing model to obtain the text feature information.

[0185] In one embodiment, the processing module 703 is configured to determine the corpus sample based on the text to be processed; and determine the graph network based on the category information included in the corpus sample.

[0186] Based on the foregoing embodiments, an embodiment of the present application further provides an electronic device, which includes a processor and a memory. Among them, a computer program is stored in the memory, and when the computer program is executed by the processor of the electronic device, it can implement the processing method as described in any of the foregoing.

[0187] The above-mentioned processor may be at least one of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU, a controller, a microcontroller, and a microprocessor.

[0188] The above-mentioned memory may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state disk (SSD); or a combination of the above types of memories, and provides instructions and data to the processor.

[0189] Exemplarily, the obtaining module 701, the extracting module 702, and the processing module 703 in the foregoing embodiments may be implemented by a processor of an electronic device.

[0190] Based on the foregoing embodiments, an embodiment of the present application further provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor of an electronic device, it can implement the processing method described in any of the previous ones.

[0191] The descriptions of the foregoing embodiments tend to emphasize the differences between the embodiments. The same or similar parts can be referred to each other. For the sake of brevity, they will not be repeated herein.

[0192] The methods disclosed in the method embodiments provided by the present application can be arbitrarily combined without conflict to obtain new method embodiments.

[0193] The features disclosed in the product embodiments provided by the present application can be arbitrarily combined without conflict to obtain new product embodiments.

[0194] The features disclosed in the method or device embodiments provided by the present application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0195] It should be noted that the above computer-readable storage medium may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; it may also be various electronic devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc.

[0196] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including that element.

[0197] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.

[0198] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus necessary general hardware nodes. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

[0199] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the heating module of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the heating module of the computer or other programmable data processing devices generate means for implementing the functions specified in one or more of the flows Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0200] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in one or more of the flows Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0201] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the flows Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0202] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. A processing method, wherein, The method includes: Obtaining a text to be processed that includes at least one word to be processed; Performing feature extraction on the text to be processed to obtain text feature information; Obtaining category feature information of at least two categories with an association relationship from a graph network; Based on the category feature information, determining the feature fusion weights of the feature fusion module of the processing model; Inputting the text feature information into the feature fusion module, and based on the feature fusion weights associated with the target feature information, analyzing and processing the text feature information to determine whether the text feature information includes words to be processed of a target type; If it includes words to be processed of the target type, adding a first identifier at the position where the words to be processed of the target category appear; If it does not include words to be processed of the target type, adding a second identifier at the position of each word to be processed.

2. The method according to claim 1, wherein, The processing of the text feature information by the feature fusion module based on the feature fusion weights to obtain the position information of the words to be processed of at least one category includes: Determining target feature information of a target category from the category feature information; Through the feature fusion module, based on the feature fusion weights associated with the target feature information, processing the text feature information to obtain the position information of the words to be processed of the target category.

3. The method according to claim 1, wherein, The determining of the feature fusion weights of the feature fusion module of the processing model based on the category feature information includes: Processing the text feature information based on the category feature information to determine the feature fusion weights.

4. The method according to claim 1, wherein, The obtaining of the category feature information of at least two categories with an association relationship from the graph network includes: Processing the graph network through the graph feature extraction module of the processing model to obtain the category feature information.

5. The method according to claim 4, wherein The processing of the graph network through the graph feature extraction module of the processing model to obtain the category feature information includes: Quantifying the category information and the association relationship between each category in the graph network through the graph embedding unit of the graph feature extraction module to obtain the initial category feature information and the association relationship information of the graph network; Through the graph coding unit of the graph feature extraction module, processing the initial category feature information based on the association relationship information to obtain the category feature information.

6. The method according to claim 1, wherein The performing of feature extraction on the text to be processed to obtain text feature information includes: Quantifying the words to be processed through the text coding unit of the processing model to obtain a text quantification result; Performing feature extraction on the text quantification result through a first text extraction unit to obtain the text feature information.

7. The method according to claim 1, wherein The performing of feature extraction on the text to be processed to obtain text feature information includes: Analyzing the words to be processed and the context information of the words to be processed through the second text extraction unit of the processing model to obtain the text feature information.

8. The method according to any one of claims 1 to 7, wherein The method further includes: Determining a corpus sample based on the text to be processed; Determining the graph network based on the category information included in the corpus sample.

9. A processing device, including: An acquisition module for acquiring a text to be processed containing at least one word to be processed; An extraction module for extracting features from the text to be processed to obtain text feature information; The acquisition module is further configured to acquire category feature information of at least two categories of words having an association relationship from a graph network; A processing module for determining, based on the category feature information, the feature fusion weights of the feature fusion module of the processing model; inputting the text feature information into the feature fusion module, and analyzing and processing the text feature information based on the feature fusion weights associated with the target feature information to determine whether the text feature information contains words to be processed of a target type; if the words to be processed of the target type are included, adding a first identifier at the position where the words to be processed of the target category appear; If the words to be processed of the target type are not included, adding a second identifier at the position of each word to be processed.

Citation Information

Patent Citations

  • Entity relationship recognition method and system based on improved graph attention network

    CN113010683A

  • Text information classification method and device, computer equipment and storage medium

    CN113569042A