Data processing method and device for large model reasoning
By obtaining and processing problem information, and using the information association and generation processing module to generate target text information, the problem of insufficient answering complex problems in the prior art is solved, and efficient complex problem processing is achieved.
Patent Information
- Application Number
- CN202411244482.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-24
AI Technical Summary
The existing knowledge graph-based question-and-answer technology has insufficient ability to handle complex problems with constraints and/or multi-hop relationships, making it difficult to achieve efficient answers.
By obtaining problem information, information correlation processing is carried out to obtain target correlation information, and information generation and processing is carried out on the problem information and target correlation information, the target text information corresponding to the problem information is generated, and the information acquisition module, association processing module and data processing module are implemented using the information acquisition module, association processing module and data processing module Quick handling of complex problems.
It realizes efficient handling of complex problems, improves the accuracy and efficiency of answering questions, and significantly improves the ability to deal with complex problems compared with the existing technology.
Smart Images

Figure CN119180336A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method and device for large model reasoning. Background Art
[0002] Open-domain question answering aims to answer factual questions from a large model knowledge base. Knowledge graph-based question answering technology uses rich structured semantic information to deeply understand user questions and is widely used in open-domain question answering. However, existing knowledge graph-based question answering technology is not capable of handling complex questions with constraints and / or multi-hop relationships. Summary of the invention
[0003] The embodiments of the present application provide a data processing method and device for large model reasoning.
[0004] In a first aspect, the present application provides a data processing method, comprising:
[0005] Get problem information;
[0006] Performing information association processing on the problem information to obtain target association information;
[0007] Information generation processing is performed on the question information and the target associated information to obtain target text information corresponding to the question information.
[0008] In a second aspect, the present application provides a data processing device, including:
[0009] Information acquisition module, used to obtain problem information;
[0010] An association processing module, used for performing information association processing on the problem information to obtain target association information;
[0011] The data processing module is used to perform information generation processing on the question information and the target associated information to obtain the target text information corresponding to the question information.
[0012] In a third aspect, the present application further provides a computer device, the computer device comprising:
[0013] one or more processors;
[0014] Memory; and
[0015] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement any one of the data processing methods in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is loaded by a processor to execute the steps in the data processing method of any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a schematic diagram of a scenario of a data processing system provided by an embodiment of the present invention;
[0019] Figure 2 is a flow chart of an embodiment of a data processing method provided by an embodiment of the present invention;
[0020] Figure 3 is a flowchart of a specific embodiment of information association processing for problem information provided by an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of the structure of an information identification model provided by an embodiment of the present invention;
[0022] Figure 5 It is a flowchart of a specific embodiment of information generation processing of question information and target association information provided by an embodiment of the present invention;
[0023] Figure 6 is a principle block diagram of a data processing device provided by an embodiment of the present invention;
[0024] Figure 7 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0026] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", "third", etc. may explicitly or implicitly include one or more features. In the description of the present application, "multiple" means more than one, unless otherwise clearly and specifically defined.
[0027] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0028] It should be noted that since the method of the embodiment of the present application is executed in a computer device, the processing objects of each computer device exist in the form of data or information. For example, time is actually time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data for processing by the computer device. The details will not be repeated here.
[0029] The embodiments of the present application provide a data processing method and device for large model reasoning, which are described in detail below.
[0030] See also Figure 1 , Figure 1 Schematic diagram of a data processing system provided in an embodiment of the present application. The data processing system may include a computer device 100, in which a data processing device is integrated, such as Figure 1 Computer equipment in.
[0031] In the embodiment of the present application, the computer device 100 is mainly used to obtain problem information; perform information association processing on the problem information to obtain target association information; perform information generation processing on the problem information and the target association information to obtain target text information corresponding to the problem information, which can realize rapid processing of complex problems.
[0032] In the embodiment of the present application, the computer device 100 may be an independent server, or a server network or server cluster composed of servers. For example, the computer device 100 described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of a plurality of servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0033] It is understandable that the computer device 100 used in the embodiments of the present application may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The specific computer device 100 may be a desktop terminal or a mobile terminal, and the computer device 100 may also be one of a mobile phone, a tablet computer, a laptop computer, etc.
[0034] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or less computer equipment as shown in Figure 1 Only one computer device is shown in the figure. It can be understood that the data processing system may also include one or more other services, which are not specifically limited here.
[0035] In addition, if Figure 1 As shown, the data processing system may further include a memory 200 for storing data, such as association information, such as first association information, target association information, etc., such as evaluation information, such as first evaluation information, second evaluation information, etc.
[0036] It should be noted that Figure 1The scenario diagram of the data processing system shown is merely an example. The data processing system and scenario described in the embodiments of the present application are intended to more clearly illustrate the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application. A person of ordinary skill in the art will appreciate that with the evolution of the data processing system and the emergence of new business scenarios, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
[0037] like Figure 2 FIG. 2 is a flow chart of an embodiment of a data processing method in an embodiment of the present application. The data processing method may include the following steps S201 to S203, which are as follows:
[0038] S201. Obtain problem information.
[0039] The question information is the text information of the question that needs to be answered and obtained by the computer device. The question information can be of one or more categories. For example, the question information can be one or more of basic fact query questions, process or step description questions, prediction and trend analysis questions, etc. This embodiment does not limit this.
[0040] Furthermore, the computer device can obtain question information in a variety of ways. For example, the computer device can collect the user's voice information through its own microphone and convert the voice information into text information to obtain the question information. The computer device can also receive the user's input question information through input devices such as keyboard, mouse, touch screen, etc. The computer device can also obtain question information from other devices through the network, Bluetooth, etc., which is not limited in this embodiment.
[0041] The question information obtained by the computer device may be text information in any language such as Chinese, English, Japanese, etc., and this embodiment does not limit this. For example, the question information may be “What is the capital of France?” or “What is the capital of France?”.
[0042] S202: Perform information association processing on the question information to obtain target association information.
[0043] In this embodiment, the target association information is text information associated with the question information. There are many ways to obtain the target association information. For example, the target association information can be obtained from pre-built knowledge base information based on the question information. The target association information can also be crawled from a preset data source or website based on the question information. Related data and determined based on the crawled related data are not limited in this embodiment.
[0044] In another specific embodiment, Figure 3As shown, in the above step S202, information association processing is performed on the question information to obtain target association information, which may include steps S301 to S302, which are specifically as follows:
[0045] S301. Determine first associated information based on the question information and knowledge base information.
[0046] In this embodiment, the knowledge base information is a pre-built database storing knowledge information. The knowledge base information includes a plurality of knowledge information. The first associated information is the knowledge information associated with the question information among the plurality of knowledge information.
[0047] S302: Determine target association information based on the first association information.
[0048] In a specific embodiment, the step of determining the target association information based on the first association information specifically includes: when the first association information contains first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold, determining the first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold as the target association information; when the first association information does not contain first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold, determining the target association information based on the problem information.
[0049] The evaluation threshold is a preset threshold used to measure whether the first association information is target association information. The evaluation threshold can be set according to actual needs. For example, the evaluation threshold can be set to 0.7, 0.8, 0.9, etc., which is not limited in this embodiment.
[0050] Furthermore, the association evaluation value corresponding to the association evaluation information represents the degree of association between the question information and the first association information. There are many ways to determine the association evaluation value corresponding to the association evaluation information, for example, the semantic similarity calculation of the question information and the first association information is performed to obtain the first evaluation information, and the first evaluation information is determined as the association evaluation value corresponding to the association evaluation information. For another example, the text matching of the question information and the first association information is performed to obtain the second evaluation information, and the second evaluation information is determined as the association evaluation value corresponding to the association evaluation information. For another example, the first evaluation information and the second evaluation information can be weighted, and the weighted evaluation information is determined as the association evaluation value corresponding to the association evaluation information, which is not limited in this embodiment.
[0051] In a specific embodiment, the associated evaluation value corresponding to the associated evaluation information is obtained through the following steps: performing similarity calculation on the question information and the first associated information to obtain first evaluation information of the first associated information; performing information extraction on the question information to obtain feature word information of the question information; performing information matching on the feature word information and the first associated information to obtain second evaluation information of the first associated information; performing weighted processing on the first evaluation information and the second evaluation information to obtain the associated evaluation value corresponding to the associated evaluation information.
[0052] In this embodiment, there are multiple ways to calculate the semantic similarity between the question information and the first related information. For example, the semantic similarity between the question information and the first related information can be calculated based on the cosine similarity calculation method, or based on the Jaccard similarity calculation method, or based on the Euclidean distance calculation method, which is not limited in this embodiment.
[0053] Furthermore, the characteristic word information of the question information is the keywords or characteristic words in the question information. In order to extract information from the question information, a characteristic word extraction function can be predefined. For a given question information, the characteristic word extraction function can extract the keyword information in the question information by identifying the nouns and proper nouns in the question information. The information extraction process of the characteristic word extraction function can be expressed as: K(q) = {k1, k2, ..., kn}. For example, if the question information is "What is the capital of France?", the extracted characteristic word information is ["capital", "France"].
[0054] Optionally, there are multiple ways to match the feature word information and the first associated information to obtain the second evaluation information. For example, the feature word information and the first associated information may be matched to obtain third evaluation information, and the third evaluation information may be determined as the second evaluation information. The frequency of the feature word information appearing in each first associated information may be determined, and fourth evaluation information may be determined based on the frequency of the feature word information appearing in each first associated information, and the fourth evaluation information may be determined as the second evaluation information. The third evaluation information and the fourth evaluation information may also be weighted to obtain the second evaluation information.
[0055] In a specific embodiment, the feature word information includes several feature words, and the step of matching the feature word information with the first associated information to obtain the second evaluation information of the first associated information specifically includes: determining the third evaluation information of the first associated information based on the number of times each feature word appears in the first associated information and the number of first associated information containing each feature word; determining the fourth evaluation information of the first associated information based on the number of feature words contained in the first associated information and the position information of the feature words contained in the first associated information in the first associated information; and weighting the third evaluation information and the fourth evaluation information to obtain the second evaluation information of the first associated information.
[0056] In a specific embodiment, based on the number of times each feature word appears in the first association information and the number of first association information containing each feature word, the step of determining the third evaluation information of the first association information specifically includes: analyzing and processing the total number of several first association information and the number of first association information containing each feature word to obtain the frequency information of each feature word in the first association information; analyzing and processing the frequency information and the number of times each feature word appears in the first association information to obtain the weight information of each feature word in the first association information; adding the weight information of several feature words in the first association information to obtain the third evaluation information of the first association information.
[0057] In a specific embodiment, the frequency information is obtained by analyzing and processing the total number of first associated information and the number of first associated information containing each characteristic word through a first analysis and processing model, wherein the first analysis and processing model is: IDF i =log[(γ1*S) / (γ2*DF i )],IDF i represents the frequency information of the i-th feature word in the first associated information, S represents the total number of first associated information, DF i represents the number of first associated information containing the i-th feature word, and γ1 and γ2 represent preset parameters.
[0058] Optionally, γ1 and γ2 can be set as needed. In a specific embodiment, 0<γ1≤1, 0<γ2≤1. Preferably, γ1=1, γ2=1, then the first analysis and processing model is: IDF i =log(S / DF i ).
[0059] In a specific embodiment, the weight information is obtained by analyzing and processing the frequency information and the number of times each feature word appears in the first associated information through a second analysis and processing model, wherein the second analysis and processing model is: TF-IDF i =(γ3*TFi )*(γ4*IDF i ), TF-IDF i Indicates the weight information of the i-th feature word in the first associated information, TF i Indicates the number of times the i-th feature word appears in the first associated information, IDF i represents the frequency information of the i-th feature word in the first associated information, and γ3 and γ4 represent preset parameters.
[0060] Optionally, γ3 and γ4 can be set as needed. In a specific embodiment, 0<γ3≤1, 0<γ4≤1. Preferably, γ3=1, γ4=1, then the second analysis and processing model is: TF-IDF i =TF i *IDF i .
[0061] In a specific embodiment, the step of determining the fourth evaluation information of the first association information based on the number of feature words included in the first association information and the position information of the feature words included in the first association information in the first association information specifically includes: determining the fifth evaluation information of the first association information based on the number of feature words included in the first association information and the first evaluation association information; determining the sixth evaluation information of the first association information based on the position information of the feature words included in the first association information in the first association information and the second evaluation association information; and performing weighted processing on the fifth evaluation information and the sixth evaluation information to obtain the fourth evaluation information of the first association information.
[0062] The first evaluation association information represents the correspondence between the number of feature words and the fifth evaluation information. Therefore, the fifth evaluation information of the first association information can be determined based on the number of feature words contained in the first association information and the first evaluation association information. For example, the fifth evaluation information corresponding to the number of feature words 1 is 1, the fifth evaluation information corresponding to the feature word information 2 is 2, and the fifth evaluation information corresponding to the feature word information 3 is 3. If the number of feature words contained in the first association information A is 1, the fifth evaluation information of the first association information A is 1.
[0063] Furthermore, the second evaluation association information represents the correspondence between the position information and the sixth evaluation information. Therefore, the sixth evaluation information of the first association information can be determined based on the position information of the feature word contained in the first association information in the first association information and the second evaluation association information. For example, the sixth evaluation information corresponding to the feature word at the beginning or title of the first association information is 3, the sixth evaluation information corresponding to the feature word in the middle of the first association information is 2, and the sixth evaluation information corresponding to the end of the first association information is 1. The position information of the feature word contained in the first association information A in the first association information A is title, middle, middle and end, respectively, then the sixth evaluation information of the first association information A is 8. In a specific embodiment, when the first evaluation information and the second evaluation information are weighted, the first weight information corresponding to the first evaluation information and the second weight information corresponding to the second evaluation information can be pre-set, and the first evaluation information and the second evaluation information are weighted based on the first weight information and the second weight information to obtain the associated evaluation information. Among them, the first weight information and the second weight information can be set according to user needs. For example, the first weight information is set to 0.3, and the second weight information is set to 0.7. For another example, the first weight information is set to 0.5, and the second weight information is set to 0.5. For another example, the first weight information is set to 0.7, and the second weight information is set to 0.3. This embodiment does not limit this.
[0064] In a specific embodiment, the process of weighted processing of the first evaluation information and the second evaluation information can be expressed as: S=α×S1+(1-α)×S2, wherein S represents the associated evaluation information, S1 represents the first evaluation information, S2 represents the second evaluation information, and α represents the weight information corresponding to the first evaluation information.
[0065] In a specific embodiment, the above-mentioned step of determining the target related information based on the question information specifically includes: determining the information to be searched based on the question information; performing information search based on the information to be searched to obtain second related information; using the information recognition model to perform information recognition on the second related information to obtain target recognition information; the target recognition information includes entity information and relationship information between entity information; and fusing the entity information and relationship information to obtain target related information.
[0066] Among them, the information to be searched is the search keyword dynamically generated according to the question information, and the second related information is the data related to the question information crawled from a predetermined data source or website according to the information to be searched. The predetermined data source may include one or more specific news websites, academic paper libraries, government databases, social media platforms, etc., which are not limited in this embodiment.
[0067] Furthermore, the target identification information is an entity relationship triple identified from the second related information using an information identification model. The target identification information includes entity information and relationship information between entity information. For example, the target identification information includes (Zhang San, founder, A Group), Zhang San and A Group are entity information, and founder is the relationship between entity Zhang San and A Group.
[0068] In a specific embodiment, after the second associated information is obtained by performing information search based on the information to be searched, the second associated information can be cleaned and preprocessed before being input into the information recognition model for information recognition, so as to improve the accuracy of the extracted target recognition information. Among them, data cleaning and preprocessing include but are not limited to removing irrelevant content such as HTML tags, JavaScript codes, advertisements, navigation bars, etc. in the second associated information, using regular expressions and natural language processing technology to perform text segmentation and sentence extraction on the second associated information, and performing preprocessing such as word segmentation, stop word removal, and stem extraction on the second associated information, which is not limited in this embodiment.
[0069] In this embodiment, the information recognition model is a pre-trained network model for identifying the second related information. The information recognition model can be constructed based on the UIE model, the CasRel model, or the LSTM-CRF model, which is not limited in this embodiment.
[0070] In a specific embodiment, referring to Figure 4 As shown, the information recognition model includes an encoding module, a first classification module, a second classification module and an information fusion module, wherein the output end of the encoding module is connected to the input end of the first classification module; the output end of the first classification module is connected to the input end of the second classification module; and the output end of the second classification module is connected to the input end of the information fusion module. The encoding module is configured to encode the second associated information to obtain associated encoded information; the first classification module is configured to perform entity recognition on the associated encoded information to obtain entity information; the second classification module is configured to perform relationship extraction on the entity information to obtain relationship information between the entity information; and the information fusion module is configured to fuse the entity information and the relationship information to obtain target recognition information.
[0071] For example, the second related information is "Zhang San, the founder of Group A, announced on Weibo in 2021 that he will invest in a new artificial intelligence research project." After the second related information is input into the information recognition model, the first classification module may identify "Zhang San" as a person's name (PERSON), "Group A" as an organization name (ORGANIZATION), "2021" as a time (DATE), and "artificial intelligence research project" as a project (PROJECT). The second classification model may recognize that the relationship between "Zhang San" and "Group A" is a "founder" relationship, and the relationship between "Group A" and "artificial intelligence research project" is an "investment" relationship, thereby obtaining the target identification information (Zhang San, founder, Group A) and (Group A, investment, artificial intelligence research project).
[0072] In this embodiment, the encoding module can be constructed based on a BERT network, a RoBERTa network, or an ALBERT network, which is not limited in this embodiment. By encoding the second associated information through the encoding module, the context information of the second associated information can be captured. For example, after the second associated information T is input into the encoding module, the encoding module encodes the second associated information T into a series of high-dimensional vectors. The encoded second associated information can be expressed as: H = {h1, h1, ..., h n}, where h i Represents the vector representation of the i-th word in the second association information.
[0073] In this embodiment, the first classification module can be constructed based on a softmax classifier, can be constructed based on a KNN classifier, or can be constructed based on an SVM classifier, which is not limited in this embodiment. After the text encoding information is input into the first classification module, the first classification module will calculate the probability of each word vector in the text encoding information belonging to the preset entity type. For example, when the first classification module is constructed based on a softmax classifier, the probability that the word vector of the i-th word in the text encoding information output by the first classification module belongs to the preset entity type can be expressed as: P(E|h i )=softmax(Linear(h i )), P(E|h i ) represents the word vector h of the i-th word in the text encoding information i The probability of belonging to a preset entity type, E represents the set of entity types.
[0074] In this embodiment, the second classification module can be constructed based on a softmax classifier, can be constructed based on a KNN classifier, or can be constructed based on an SVM classifier, which is not limited in this embodiment. After the entity information is input into the second classification module, the second classification module calculates the probability that each entity pair belongs to a preset relationship. For example, when the second classification module is constructed based on a softmax classifier, the entity pair (S i ,O i ) belongs to the relation R i The probability can be expressed as: Represents an entity pair (S i ,O i ) belongs to the relation R i The probability of Represents entity S i The vector representation of Represents entity O i The vector representation of .
[0075] In a specific embodiment, after the information fusion module fuses the entity information and the relationship information to obtain the entity relationship information, the information fusion module may also post-process the obtained entity relationship information. The post-processing includes but is not limited to removing duplicate entity relationship information, merging semantically similar entity relationship information, etc., which is not limited in this embodiment.
[0076] It should be noted that, in this embodiment, if the first correlation information does not contain first correlation information whose correlation evaluation information is greater than the evaluation threshold, the target correlation information is determined based on the problem information. When the target correlation information cannot be found in the knowledge base information, the target correlation information can be obtained by crawling external data, thereby avoiding the problem information from being unable to be answered due to the failure to find the target correlation information, and achieving efficient processing of complex problems.
[0077] In a specific embodiment, the steps of fusing entity information and relationship information to obtain target association information specifically include: performing word mapping on the entity information to obtain first mapping information for each word in the entity information; aggregating the first mapping information of all words in the entity information to obtain entity feature representation; performing feature extraction on the relationship information to obtain relationship feature representation; and using a feature fusion model to fuse the entity feature representation and the relationship feature representation to obtain target association information.
[0078] In a specific embodiment, the first mapping information represents the vector representation of each word in the entity information, and a pre-trained word embedding model can be used to perform word embedding processing on each word in the entity information to obtain the first mapping information of each word in the entity information. i From the vocabulary [w1,w2,…,wn ], the word embedding model can be used to obtain the entity e i The corresponding word vector representation [h1,h2,…,h n ].
[0079] Furthermore, the entity feature representation is a vectorized representation of the entity information. After obtaining the first mapping information of each word in the entity information, the first mapping information of all words in the entity information can be aggregated to obtain the entity feature representation. i The corresponding word vector representation [h1,h2,…,h n ], by representing the word vector [h1,h2,…,h n ] can be aggregated to obtain entity e i Entity feature representation
[0080] In a specific embodiment, the first mapping information of all words in the entity information is aggregated to obtain the entity feature representation, and the steps specifically include: processing the first mapping information of each word based on preset weight information and preset bias information to obtain the first attention score information of each word; normalizing the first attention score information to obtain the second attention score information of each word; and weighting the first mapping information of all words in the entity information based on the second attention score information of each word to obtain the entity feature representation.
[0081] Among them, the determination process of the second attention score information can be expressed as: α i =softmax(W α h i +b a ), the determination process of entity feature representation can be expressed as: v attn represents entity feature representation, α i represents the second attention score information of the i-th word, W α h i +b a represents the first attention score information of the i-th word, softmax(·) represents the softmax function, which is used to normalize the first attention score information, and W α Indicates preset weight information, b a Indicates preset bias information, h i Represents the first mapping information of the i-th word.
[0082] In another specific embodiment, the step of aggregating the first mapping information of all words in the entity information to obtain the entity feature representation specifically includes: averaging the first mapping information of all words in the entity information to obtain the entity feature representation. In this case, the determination process of the entity feature representation can be expressed as: v mean represents entity feature representation, h i Represents the first mapping information of the i-th word.
[0083] In a specific embodiment, the relationship feature representation is a vectorized representation of the relationship information. There are multiple ways to extract features from the relationship information to obtain the relationship feature representation. For example, a pre-trained word embedding model can be used to extract features from the relationship information to obtain a vector representation of each word in the relationship information; the vector representation of each word in the relationship information is aggregated to obtain the relationship feature information; for example, when the relationship information is defined by the context of an entity pair, a language model can be used to encode the context of the entity pair to obtain the relationship feature information. The language model can be built based on a BERT network, a RoBERTa network, or an ALBERT network, and this embodiment does not limit this.
[0084] There are many ways to fuse the entity feature representation and the relationship feature representation in this embodiment. For example, the entity feature representation and the relationship feature representation can be fused by splicing fusion, or by averaging fusion, or by a neural network layer, which is not limited in the embodiment of the present invention.
[0085] In a specific embodiment, a feature fusion model is used to fuse entity feature representation and relationship feature representation, and the feature fusion model can automatically learn how to better fuse entity feature representation and relationship feature representation, thereby improving the accuracy of the obtained target association information. Among them, the neural network layer can be constructed based on a multi-layer perceptron (MLP) or a support vector machine (SVM), which is not limited in the embodiment of the present invention.
[0086] In a specific embodiment, the feature fusion model includes: an input layer, a plurality of hidden layers and an output layer, wherein the input end of the input layer is configured to receive entity feature representation and relationship feature representation, the output end of the input layer is connected to the input ends of the plurality of hidden layers, and the output ends of the plurality of hidden layers are connected to the input end of the output layer. The input layer is configured to fuse the entity feature representation and the relationship feature representation to obtain a fused feature representation; the plurality of hidden layers are configured to map the fused feature representation to obtain second mapping information; and the output layer is configured to map the second mapping information to obtain target association information.
[0087] Among them, the process of the input layer fusing entity feature representation and relationship feature representation can be expressed as: v triplet represents the fusion feature representation, and Represents entity feature representation, Represents the relational feature representation. The process of mapping the fusion feature representation by several hidden layers can be expressed as: n =σ(W n ·h n-1 +b n ), h n represents the second mapping information of the nth hidden layer output, h n-1 represents the second mapping information output by the n-1th hidden layer, W n Indicates the weight information corresponding to the nth hidden layer, b n represents the bias information corresponding to the nth hidden layer, and σ(·) represents the activation function. The process of the output layer mapping the second mapping information can be expressed as: triplet ˊ=φ(W0·h s +b0), v triplet ˊ represents the target association information, φ(·) represents the activation function, W0 represents the weight information corresponding to the output layer, b0 represents the bias information corresponding to the output layer, and h s Represents the second mapping information of the last hidden layer output.
[0088] In a specific embodiment, after the above-mentioned fusion processing of entity information and relationship information to obtain target association information can also include: updating the knowledge base information based on the target association information, so that when the question information is subjected to information association processing next time, the target association information corresponding to the question information can be directly obtained from the knowledge base information, thereby improving the efficiency of answering the question information.
[0089] S203: Perform information generation processing on the question information and the target related information to obtain target text information corresponding to the question information.
[0090] In this embodiment, the target text information is the answer information corresponding to the question information determined by the computer device based on the question information. The target text information can be text information in any language such as Chinese, English, Japanese, etc., which is not limited in this embodiment. For example, when the question information is "What is the capital of France?", the target text information can be "巴黎" and / or "Paris". In this embodiment, information association processing is performed on the question information to obtain target association information, and information generation processing is performed on the question information and the target association information to obtain the target text information corresponding to the question information. Compared with the existing question-answering technology based on knowledge graphs, efficient processing of complex questions can be achieved.
[0091] To verify the effectiveness of the data processing method provided by the embodiment of the present invention, the inventor uses the Financial Opinion Mining and Question Answering (fiqa) Dataset (https: / / sites.google.com / view / fiqa / ) as the test dataset, uses the Financial Industry Business Ontology (FIBO) as the database, generates the answer information of the question information in the test dataset by using an external knowledge base, and generates the answer information of the question information in the test dataset by using the data processing method provided by the embodiment of the present invention, and uses Ragas to evaluate and score the results obtained by the two methods. The results are shown in Table 1. Among them, Faithfulness represents the degree of consistency between the generated answer and the given context, Answer relevancy represents the degree of relevance between the generated answer and the question, Answer similarity represents the semantic similarity between the generated answer and the standard answer, and Answer Correctness represents the degree of matching between the generated answer and the actual reference answer. It can be seen from Table 1 that the answer information obtained by using the data processing method provided by the embodiment of the present invention is superior to the answer information obtained by using the external knowledge base in terms of the four indicators of Faithfulness, Answer relevancy, Answer similarity, and Answer Correctness.
[0092] Table 1 Comparison results of answer information obtained by the existing method and the method provided by the embodiment of the present invention
[0093] index QWen14B(A1) of the plug-in knowledge base Improved question-answering system - QWen14B(A2) Fidelity 0.71 0.78 Answer relevance 0.84 0.92 Answer similarity 0.63 0.75 Answer accuracy 0.63 0.71
[0094] In a specific embodiment, as shown in Figure 5 In the above step S203, performing information generation processing on the question information and the target association information to obtain the target text information corresponding to the question information may include steps S401 to S402, specifically as follows:
[0095] S401: Determine prompt text information based on question information and target association information.
[0096] In a specific embodiment, different prompt construction information may be constructed in advance for different question types, for example, prompt construction information corresponding to different question types is shown in Table 2. The step of determining prompt text information based on question information and target association information specifically includes: determining prompt construction information corresponding to the question information based on the question category and prompt association information of the question information; and fusing the question information, target association information and prompt construction information to obtain prompt text information.
[0097] Among them, the prompt association information represents the correspondence between the question category and the prompt construction information. The generation process of the prompt text information can be expressed as P(Q,Z)→T, where P(·) represents the prompt construction information, Q represents the question information, Z represents the target association information, and T represents the prompt text information.
[0098] Table 2 Construction information of prompt words corresponding to different question types
[0099]
[0100]
[0101] S402: Perform information generation processing on the prompt text information using the information generation processing model to obtain target text information corresponding to the question information.
[0102] In this embodiment, the information generation processing model can be constructed based on a CNN model, a DGCNN model, or an LLM model, which is not limited in the embodiment of the present invention. The target text information output by the information generation processing model may be unique or may be multiple target text information, and the target text information provided to the user by the computer device may also be one or more, which is not limited in the embodiment of the present invention.
[0103] It should be noted that when the information generation processing model outputs multiple target text information, the computer device can analyze the correlation between the multiple target text information and the question information, and determine the final target text information from the multiple target text information based on the correlation to provide to the user.
[0104] In a specific embodiment, the above-mentioned use of the information recognition model to perform information recognition on the second related information to obtain target recognition information also includes: performing data enhancement on the target recognition information to obtain enhanced target recognition information; constructing a training sample set based on the target recognition information and the enhanced target recognition information; wherein the training sample set includes sample question information and real answer information corresponding to the sample question information; and fine-tuning the information generation processing model based on the training sample set to obtain a fine-tuned information generation processing model.
[0105] In a specific embodiment, when constructing a training sample set based on the target identification information and the enhanced target identification information, the relationship information and the subject information in the target identification information can be jointly constructed into a question, and the object information is used as the answer, so as to obtain the sample question information and the real answer information corresponding to the sample question information. For example, for the target identification information (Zhang San, founder, Group A), the question "Who is the founder of Group A?" can be constructed, and the answer is "Zhang San".
[0106] In this embodiment, the method for data enhancement of target recognition information includes but is not limited to synonym replacement, reverse construction, etc., wherein synonym replacement refers to replacing words in target recognition information with synonyms, and reverse construction refers to generating subject information and relationship information from object information in target recognition information. Synonym replacement can increase the expression diversity of sample question information in the training sample set, and reverse construction can increase the diversity and complexity of sample question information in the training sample set, thereby providing a richer language environment and scenario for model fine-tuning.
[0107] In a specific embodiment, the information generation processing model is fine-tuned based on the training sample set to obtain the fine-tuned information generation processing model, including the following steps: performing information association processing on the sample question information in the training sample set to obtain sample text information corresponding to the sample question information; determining the prompt sample information corresponding to the sample question information based on the sample text information and the sample question information; inputting the prompt sample information into the information generation processing model to obtain the predicted answer information corresponding to the sample question information; determining the loss value based on the predicted answer information, the true answer information and the loss function of the information generation processing model; when the loss value does not meet the preset condition, modifying the model parameters of the information generation processing model based on the preset learning rate, and continuing to perform information association processing on the sample question information in the training sample set to obtain the sample text information corresponding to the sample question information, until the loss value meets the preset condition. Wherein, the loss value meeting the preset condition may be that the loss value is less than a preset first threshold value or the difference between the loss values obtained twice before and after is less than a preset second threshold value.
[0108] It should be noted that the above-mentioned step of performing information association processing on the sample question information in the training sample set to obtain the sample text information corresponding to the sample question information is the same as the aforementioned step S202. For details, please refer to the discussion of step S202. To avoid repetition, this application will not go into details here.
[0109] In summary, the data processing method provided by the present implementation scheme obtains question information, performs information association processing on the question information, obtains target association information, performs information generation processing on the question information and the target association information, and obtains the target text information corresponding to the question information. Compared with the existing question-answering technology based on knowledge graphs, the data processing method can realize rapid processing of complex problems. Furthermore, when the first association information contains the first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold, the first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold is determined as the target association information, so as to realize rapid query of the target association information and further improve the processing efficiency of complex problems. When the first association information does not contain the first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold, the target association information is determined based on the question information, so as to avoid the problem that the question information cannot be answered due to the failure to find the target association information in the knowledge base information. The target identification information is data enhanced, and the information generation processing model is fine-tuned based on the target identification information and the enhanced target identification information, so as to improve the answer prediction accuracy of the information generation processing model.
[0110] In order to better implement the data processing method in the embodiment of the present application, based on the data processing method, a data processing device is also provided in the embodiment of the present application, such as Figure 6 As shown, the data processing device 600 includes:
[0111] Information acquisition module 610, used to acquire problem information;
[0112] The association processing module 620 is used to perform information association processing on the question information to obtain target association information;
[0113] The data processing module 630 is used to perform information generation processing on the question information and the target associated information to obtain target text information corresponding to the question information.
[0114] In an embodiment of the present application, information association processing is performed on the question information to obtain target association information, and information generation processing is performed on the question information and the target association information to obtain target text information corresponding to the question information. Compared with the existing question-answering technology based on knowledge graphs, rapid processing of complex problems can be achieved.
[0115] In some embodiments of the present application, the association processing module 620 performs information association processing on the question information to obtain target association information, including:
[0116] Determine first associated information based on the question information and the knowledge base information;
[0117] Based on the first association information, target association information is determined.
[0118] In some embodiments of the present application, the association processing module 620 determines the target association information based on the first association information, including:
[0119] When the first association information includes first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold, determining the first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold as target association information; or
[0120] When the first association information does not include first association information in which the association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold, the target association information is determined based on the question information.
[0121] In some embodiments of the present application, the association evaluation value corresponding to the association evaluation information is obtained by the association processing module 620 executing the following steps:
[0122] Calculate the similarity between the question information and the first associated information to obtain first evaluation information of the first associated information;
[0123] Extracting information from the question information to obtain feature word information of the question information;
[0124] Matching the feature word information with the first associated information to obtain second evaluation information of the first associated information;
[0125] The first evaluation information and the second evaluation information are weighted to obtain an associated evaluation value corresponding to the associated evaluation information.
[0126] In some embodiments of the present application, the feature word information includes a plurality of feature words, and the association processing module 620 performs information matching on the feature word information and the first association information to obtain second evaluation information of the first association information, including:
[0127] determining third evaluation information of the first association information based on the number of times each feature word appears in the first association information and the amount of first association information containing each feature word;
[0128] determining fourth evaluation information of the first association information based on the number of feature words included in the first association information and position information of the feature words included in the first association information in the first association information;
[0129] The third evaluation information and the fourth evaluation information are weighted to obtain second evaluation information of the first associated information.
[0130] In some embodiments of the present application, the association processing module 620 determines the third evaluation information of the first association information based on the number of times each feature word appears in the first association information and the amount of first association information containing each feature word, including:
[0131] Analyze and process the total number of the first associated information and the number of the first associated information containing each characteristic word to obtain frequency information of each characteristic word in the first associated information;
[0132] Analyze and process the frequency information and the number of times each feature word appears in the first associated information to obtain weight information of each feature word in the first associated information;
[0133] The weight information of the plurality of feature words in the first association information is added together to obtain the third evaluation information of the first association information.
[0134] In some embodiments of the present application, the frequency information is obtained by analyzing and processing the total number of first associated information and the number of first associated information containing each characteristic word by a first analysis and processing model;
[0135] Among them, the first analysis and processing model is: IDF i =log[(γ1*S) / (γ2*DF i )],IDF i represents the frequency information of the i-th feature word in the first associated information, S represents the total number of first associated information, DF i represents the number of first associated information containing the i-th feature word, γ1 and γ2 represent preset parameters;
[0136] The weight information is obtained by analyzing and processing the frequency information and the number of times each feature word appears in the first associated information through the second analysis and processing model;
[0137] Among them, the second analysis and processing model is: TF-IDF i =(γ3*TF i )*(γ4*IDF i ), TF-IDF i Indicates the weight information of the i-th feature word in the first associated information, TF i Indicates the number of times the i-th feature word appears in the first associated information, IDF i represents the frequency information of the i-th feature word in the first associated information, and γ3 and γ4 represent preset parameters.
[0138] In some embodiments of the present application, the association processing module 620 determines the fourth evaluation information of the first association information based on the number of feature words included in the first association information and the position information of the feature words included in the first association information in the first association information, including:
[0139] Determine fifth evaluation information of the first association information based on the number of feature words included in the first association information and the first evaluation association information; the first evaluation association information represents a corresponding relationship between the number of feature words and the fifth evaluation information;
[0140] Determine sixth evaluation information of the first association information based on position information of the feature word contained in the first association information and second evaluation association information; the second evaluation association information represents the correspondence between the position information and the sixth evaluation information;
[0141] The fifth evaluation information and the sixth evaluation information are weighted to obtain fourth evaluation information of the first associated information.
[0142] In some embodiments of the present application, the association processing module 620 determines target association information based on the question information, including:
[0143] Based on the question information, determine the information to be searched;
[0144] Performing information search based on the information to be searched to obtain second related information;
[0145] Using the information recognition model to perform information recognition on the second related information to obtain target recognition information; the target recognition information includes entity information and relationship information between the entity information;
[0146] The entity information and relationship information are fused to obtain the target related information.
[0147] In some embodiments of the present application, the information recognition model includes an encoding module, a first classification module, a second classification module and an information fusion module;
[0148] The output end of the encoding module is connected to the input end of the first classification module; the output end of the first classification module is connected to the input end of the second classification module; the output end of the second classification module is connected to the input end of the information fusion module;
[0149] The encoding module is configured to encode the second associated information to obtain associated coded information;
[0150] The first classification module is configured to perform entity recognition on the associated coded information to obtain entity information;
[0151] The second classification module is configured to extract relationship information from the entity information to obtain relationship information between the entity information;
[0152] The information fusion module is configured to fuse entity information and relationship information to obtain target recognition information.
[0153] In some embodiments of the present application, the information fusion module fuses the entity information and the relationship information to obtain target association information, including:
[0154] Perform word mapping processing on the entity information to obtain first mapping information of each word in the entity information;
[0155] Aggregate the first mapping information of all words in the entity information to obtain entity feature representation;
[0156] Extract features from the relationship information to obtain relationship feature representation;
[0157] The feature fusion model is used to fuse the entity feature representation and the relationship feature representation to obtain the target association information.
[0158] In some embodiments of the present application, the information fusion module aggregates the first mapping information of all words in the entity information to obtain the entity feature representation, including:
[0159] Processing the first mapping information of each word based on the preset weight information and the preset bias information to obtain the first attention score information of each word;
[0160] Normalize the first attention score information to obtain the second attention score information of each word;
[0161] Based on the second attention score information of each word, the first mapping information of all words in the entity information is weighted to obtain the entity feature representation.
[0162] In some embodiments of the present application, the feature fusion model includes: an input layer, a plurality of hidden layers and an output layer;
[0163] The input end of the input layer is configured to receive entity feature representation and relationship feature representation, the output end of the input layer is connected to the input ends of several hidden layers, and the output ends of several hidden layers are connected to the input end of the output layer;
[0164] The input layer is configured to fuse the entity feature representation and the relationship feature representation to obtain a fused feature representation;
[0165] The plurality of hidden layers are configured to perform mapping processing on the fused feature representation to obtain second mapping information;
[0166] The output layer is configured to perform mapping processing on the second mapping information to obtain target association information.
[0167] In some embodiments of the present application, the data processing module 630 performs information generation processing on the question information and the target association information to obtain the target text information corresponding to the question information, including:
[0168] Determine prompt text information based on question information and target-related information;
[0169] The information generation processing model is used to perform information generation processing on the prompt text information to obtain the target text information corresponding to the question information.
[0170] In some embodiments of the present application, the data processing module 630 determines prompt text information based on the question information and the target association information, including:
[0171] Determine prompt construction information corresponding to the question information based on the question category and prompt association information of the question information; the prompt association information represents the corresponding relationship between the question category and the prompt construction information;
[0172] The question information, target association information and prompt construction information are fused to obtain prompt text information.
[0173] The embodiment of the present application further provides a computer device, which integrates any one of the data processing devices provided in the embodiment of the present application, and the computer device includes:
[0174] one or more processors;
[0175] Memory; and
[0176] One or more applications, wherein the one or more applications are stored in a memory and are configured to be executed by a processor to execute the steps of the data processing method in any of the above data processing method embodiments.
[0177] The present application also provides a computer device that integrates any data processing device provided in the present application. Figure 7 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0178] The computer device may include one or more processing core processors 801, one or more computer-readable storage media memories 802, a power supply 803, an input unit 804 and other components. Those skilled in the art will appreciate that Figure 7 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0179] The processor 801 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801.
[0180] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
[0181] The computer device also includes a power supply 803 for supplying power to each component. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 803 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0182] The computer device may further include an input unit 804, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0183] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 801 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the application programs stored in the memory 802, thereby realizing various functions, as follows:
[0184] Get problem information;
[0185] Perform information association processing on the problem information to obtain target association information;
[0186] Information generation processing is performed on the question information and the target related information to obtain the target text information corresponding to the question information.
[0187] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0188] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any data processing method provided in the embodiment of the present application. For example, the computer program is loaded by a processor to execute the following steps:
[0189] Get problem information;
[0190] Perform information association processing on the problem information to obtain target association information;
[0191] Information generation processing is performed on the question information and the target related information to obtain the target text information corresponding to the question information.
[0192] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0193] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0194] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0195] The above is a detailed introduction to a data processing method and device for large model reasoning provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data processing method, characterized in that: include: Get problem information; Performing information association processing on the problem information to obtain target association information; Information generation processing is performed on the question information and the target associated information to obtain target text information corresponding to the question information.
2. The method according to claim 1, characterized in that The performing information association processing on the problem information to obtain target association information includes: Determine first associated information based on the question information and the knowledge base information; Based on the first association information, target association information is determined.
3. The method according to claim 2, characterized in that The determining target association information based on the first association information includes: When the first association information includes first association information whose association evaluation value corresponding to association evaluation information is greater than an evaluation threshold, determining the first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold as the target association information; or When the first association information does not include first association information in which the association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold, target association information is determined based on the problem information.
4. The method according to claim 3, characterized in that The association evaluation value corresponding to the association evaluation information is obtained by the following steps: Calculating similarity between the question information and the first associated information to obtain first evaluation information of the first associated information; Extracting information from the question information to obtain feature word information of the question information; Matching the feature word information with the first associated information to obtain second evaluation information of the first associated information; The first evaluation information and the second evaluation information are weighted to obtain an association evaluation value corresponding to the association evaluation information.
5. The method according to claim 4, characterized in that The feature word information includes a plurality of feature words, and the information matching of the feature word information and the first associated information to obtain the second evaluation information of the first associated information includes: determining third evaluation information of the first association information based on the number of times each of the feature words appears in the first association information and the number of the first association information containing each of the feature words; determining fourth evaluation information of the first association information based on the number of the feature words included in the first association information and position information of the feature words included in the first association information in the first association information; The third evaluation information and the fourth evaluation information are weighted to obtain second evaluation information of the first associated information.
6. The method according to claim 5, characterized in that The determining the third evaluation information of the first association information based on the number of times each of the feature words appears in the first association information and the number of the first association information containing each of the feature words includes: Analyze and process the total number of the first associated information and the number of the first associated information containing each of the feature words to obtain frequency information of each of the feature words in the first associated information; Analyze and process the frequency information and the number of times each of the feature words appears in the first association information to obtain weight information of each of the feature words in the first association information; The weight information of the plurality of feature words in the first associated information is added together to obtain third evaluation information of the first associated information.
7. The method according to claim 6, characterized in that The frequency information is obtained by analyzing and processing the total number of the first associated information and the number of the first associated information containing each of the feature words through a first analysis and processing model; Wherein, the first analysis and processing model is: IDF i =log[(γ1*S) / (γ2*DF i )],IDF i represents the frequency information of the i-th feature word in the first associated information, S represents the total number of the first associated information, DF i represents the number of the first associated information containing the i-th feature word, γ1 and γ2 represent preset parameters; The weight information is obtained by analyzing and processing the frequency information and the number of times each of the feature words appears in the first association information using a second analysis and processing model; Wherein, the second analysis and processing model is: TF-IDF i =(γ3*TF i )*(γ4*IDF i ), TF-IDF i represents the weight information of the i-th feature word in the first associated information, TF i Indicates the number of times the i-th feature word appears in the first associated information, IDF i represents the frequency information of the i-th feature word in the first associated information, and γ3 and γ4 represent preset parameters.
8. The method according to claim 5, characterized in that The determining, based on the number of the feature words included in the first association information and the position information of the feature words included in the first association information in the first association information, fourth evaluation information of the first association information includes: Determine fifth evaluation information of the first association information based on the number of the feature words included in the first association information and the first evaluation association information; the first evaluation association information represents the corresponding relationship between the number of the feature words and the fifth evaluation information; Determine sixth evaluation information of the first association information based on position information of the feature word contained in the first association information and second evaluation association information; the second evaluation association information represents the correspondence between the position information and the sixth evaluation information; The fifth evaluation information and the sixth evaluation information are weighted to obtain fourth evaluation information of the first associated information.
9. The method according to claim 3, characterized in that: The determining target related information based on the problem information includes: Based on the question information, determine the information to be searched; Performing information search based on the information to be searched to obtain second related information; Using the information recognition model to perform information recognition on the second associated information to obtain target recognition information; the target recognition information includes entity information and relationship information between the entity information; The entity information and the relationship information are fused to obtain target association information.
10. The method according to claim 9, characterized in that The information recognition model includes a coding module, a first classification module, a second classification module and an information fusion module; The output end of the encoding module is connected to the input end of the first classification module; the output end of the first classification module is connected to the input end of the second classification module; the output end of the second classification module is connected to the input end of the information fusion module; The encoding module is configured to encode the second associated information to obtain associated coded information; The first classification module is configured to perform entity recognition on the associated coding information to obtain the entity information; The second classification module is configured to perform relationship extraction on the entity information to obtain relationship information between the entity information; The information fusion module is configured to fuse the entity information and the relationship information to obtain the target recognition information.
11. The method according to claim 9, characterized in that The entity information and the relationship information are fused to obtain target association information, including Performing word mapping processing on the entity information to obtain first mapping information of each word in the entity information; Aggregating the first mapping information of all words in the entity information to obtain entity feature representation; Extracting features from the relationship information to obtain a relationship feature representation; The entity feature representation and the relationship feature representation are fused using a feature fusion model to obtain target association information.
12. The method according to claim 11, characterized in that The first mapping information of all words in the entity information is aggregated to obtain entity feature representation, including Processing the first mapping information of each word based on preset weight information and preset bias information to obtain first attention score information of each word; Normalizing the first attention score information to obtain second attention score information of each word; Based on the second attention score information of each word, weighted processing is performed on the first mapping information of all words in the entity information to obtain an entity feature representation.
13. The method according to claim 11, characterized in that The feature fusion model includes: an input layer, a plurality of hidden layers and an output layer; The input end of the input layer is configured to receive the entity feature representation and the relationship feature representation, the output end of the input layer is connected to the input ends of several hidden layers, and the output ends of several hidden layers are connected to the input end of the output layer; The input layer is configured to fuse the entity feature representation and the relationship feature representation to obtain a fused feature representation; The plurality of hidden layers are configured to perform mapping processing on the fused feature representation to obtain second mapping information; The output layer is configured to perform mapping processing on the second mapping information to obtain the target association information.
14. The method according to claim 1, characterized in that The performing information generation processing on the question information and the target associated information to obtain the target text information corresponding to the question information includes: Determining prompt text information based on the question information and the target association information; The prompt text information is processed by using an information generation processing model to obtain target text information corresponding to the question information.
15. The method according to claim 14, characterized in that The step of determining prompt text information based on the question information and the target association information includes: Determine prompt construction information corresponding to the question information based on the question category and prompt association information of the question information; the prompt association information represents the corresponding relationship between the question category and the prompt construction information; The question information, the target association information and the prompt construction information are fused to obtain prompt text information.
16. A data processing device, characterized in that: include: Information acquisition module, used to obtain problem information; An association processing module, used for performing information association processing on the problem information to obtain target association information; A data processing module, used for performing information generation processing on the question information and the target associated information to obtain target text information corresponding to the question information; Preferably, the association processing module performs information association processing on the question information to obtain target association information, including: Determine first associated information based on the question information and the knowledge base information; Determining target association information based on the first association information; Preferably, the association processing module determines target association information based on the first association information, including: When the first association information includes first association information whose association evaluation value corresponding to association evaluation information is greater than an evaluation threshold, determining the first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold as the target association information; or When the first association information does not include first association information whose association evaluation value corresponding to the association evaluation information is greater than the evaluation threshold, determining target association information based on the question information; Preferably, the association evaluation value corresponding to the association evaluation information is obtained by the association processing module executing the following steps: Calculating similarity between the question information and the first associated information to obtain first evaluation information of the first associated information; Extracting information from the question information to obtain feature word information of the question information; Matching the feature word information with the first associated information to obtain second evaluation information of the first associated information; Performing weighted processing on the first evaluation information and the second evaluation information to obtain an association evaluation value corresponding to the association evaluation information; Preferably, the feature word information includes a plurality of feature words, and the association processing module matches the feature word information with the first association information to obtain second evaluation information of the first association information, including: Determine third evaluation information of the first association information based on the number of occurrences in the first association information and the number of the first association information containing each of the feature words; determining fourth evaluation information of the first association information based on the number of the feature words included in the first association information and position information of the feature words included in the first association information in the first association information; Performing weighted processing on the third evaluation information and the fourth evaluation information to obtain second evaluation information of the first associated information; Preferably, the association processing module determines the third evaluation information of the first association information based on the number of times each of the feature words appears in the first association information and the number of the first association information containing each of the feature words, including: Analyze and process the total number of the first associated information and the number of the first associated information containing each of the feature words to obtain frequency information of each of the feature words in the first associated information; Analyze and process the frequency information and the number of times each of the feature words appears in the first association information to obtain weight information of each of the feature words in the first association information; Adding weight information of a plurality of the feature words in the first associated information to obtain third evaluation information of the first associated information; Preferably, the frequency information is obtained by analyzing and processing the total number of the first associated information and the number of the first associated information containing each of the feature words through a first analysis and processing model; Wherein, the first analysis and processing model is: IDF i =log[(γ1*S) / (γ2*DF i )],IDF i represents the frequency information of the i-th feature word in the first associated information, S represents the total number of the first associated information, DF i represents the number of the first associated information containing the i-th feature word, γ1 and γ2 represent preset parameters; The weight information is obtained by analyzing and processing the frequency information and the number of times each of the feature words appears in the first association information using a second analysis and processing model; Wherein, the second analysis and processing model is: TF-IDF i =(γ3*TF i )*(γ4*IDF i ), TF-IDF i represents the weight information of the i-th feature word in the first associated information, TF i Indicates the number of times the i-th feature word appears in the first associated information, IDF i represents the frequency information of the i-th feature word in the first associated information, γ3 and γ4 represent preset parameters; Preferably, the association processing module determines the fourth evaluation information of the first association information based on the number of the feature words included in the first association information and the position information of the feature words included in the first association information in the first association information, including: Determine fifth evaluation information of the first association information based on the number of the feature words included in the first association information and the first evaluation association information; the first evaluation association information represents the corresponding relationship between the number of the feature words and the fifth evaluation information; Determine sixth evaluation information of the first association information based on position information of the feature word contained in the first association information and second evaluation association information; the second evaluation association information represents the correspondence between the position information and the sixth evaluation information; Performing weighted processing on the fifth evaluation information and the sixth evaluation information to obtain fourth evaluation information of the first associated information; Preferably, the association processing module determines target association information based on the question information, including: Based on the question information, determine the information to be searched; Performing information search based on the information to be searched to obtain second related information; Using the information recognition model to perform information recognition on the second associated information to obtain target recognition information; the target recognition information includes entity information and relationship information between the entity information; fusing the entity information and the relationship information to obtain target association information; Preferably, the information recognition model includes a coding module, a first classification module, a second classification module and an information fusion module; The output end of the encoding module is connected to the input end of the first classification module; the output end of the first classification module is connected to the input end of the second classification module; the output end of the second classification module is connected to the input end of the information fusion module; The encoding module is configured to encode the second associated information to obtain associated coded information; The first classification module is configured to perform entity recognition on the associated coding information to obtain the entity information; The second classification module is configured to perform relationship extraction on the entity information to obtain relationship information between the entity information; The information fusion module is configured to fuse the entity information and the relationship information to obtain the target recognition information; Preferably, the information fusion module fuses the entity information and the relationship information to obtain target association information, including: Performing word mapping processing on the entity information to obtain first mapping information of each word in the entity information; Aggregating the first mapping information of all words in the entity information to obtain entity feature representation; Extracting features from the relationship information to obtain a relationship feature representation; Using a feature fusion model to fuse the entity feature representation and the relationship feature representation to obtain target association information; Preferably, the information fusion module aggregates the first mapping information of all words in the entity information to obtain entity feature representation, including: Processing the first mapping information of each word based on preset weight information and preset bias information to obtain first attention score information of each word; Normalizing the first attention score information to obtain second attention score information of each word; Based on the second attention score information of each word, weighted processing is performed on the first mapping information of all words in the entity information to obtain an entity feature representation; Preferably, the feature fusion model comprises: an input layer, a plurality of hidden layers and an output layer; The input end of the input layer is configured to receive the entity feature representation and the relationship feature representation, the output end of the input layer is connected to the input ends of several hidden layers, and the output ends of several hidden layers are connected to the input end of the output layer; The input layer is configured to fuse the entity feature representation and the relationship feature representation to obtain a fused feature representation; The plurality of hidden layers are configured to perform mapping processing on the fused feature representation to obtain second mapping information; The output layer is configured to perform mapping processing on the second mapping information to obtain the target association information; Preferably, the data processing module performs information generation processing on the question information and the target association information to obtain target text information corresponding to the question information, including: Determining prompt text information based on the question information and the target association information; Using the information generation processing model to perform information generation processing on the prompt text information to obtain target text information corresponding to the question information; Preferably, the data processing module determines prompt text information based on the question information and the target association information, including: Determine prompt construction information corresponding to the question information based on the question category and prompt association information of the question information; the prompt association information represents the corresponding relationship between the question category and the prompt construction information; The question information, the target association information and the prompt construction information are fused to obtain prompt text information.
17. A computer device, characterized in that: The computer device comprises: one or more processors; Memory; and One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the data processing method according to any one of claims 1 to 15.
18. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the data processing method according to any one of claims 1 to 15.
