A method, device, electronic device and storage medium for processing data in an application program
The entity recognition model and the intent recognition model are used to preprocess and correct the data to be recognized, which solves the problem of reduced recognition accuracy due to input errors in data processing and achieves higher recognition accuracy and stability.
Patent Information
- Application Number
- CN201910778784.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-22
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-08-22
AI Technical Summary
Existing data processing technology is easily affected by user input errors during the recognition process, resulting in a decrease in recognition accuracy, and lacks an effective data error correction mechanism.
Through entity recognition model and intent recognition model, the data to be recognized is preprocessed, word segmentation operation and edit distance analysis are used to determine the target entity to correct erroneous data and improve recognition accuracy.
It effectively improves the accuracy of data recognition processing, reduces recognition errors caused by input errors, and enhances the stability and reliability of data processing.
Smart Images

Figure CN110647987B
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, device, electronic device and storage medium for processing data in an application. Background Art
[0002] Nowadays, data in various fields is growing rapidly, which leads to the rapid development of data processing technology. Generally, the process of data processing is as follows: the device identifies the entity in the data to be identified based on the received data to be identified, and processes the identification result to determine the output corresponding to the data. This data processing method can be applied to various fields such as language recognition and human-computer interaction.
[0003] In the above description, entity refers to something with a specific and real form or structure that can be perceived and touched by people. From the perspective of data processing, objective things in the real world are called entities, which are any distinguishable and identifiable things in the real world. However, since the data to be identified received by the device itself may contain certain errors, for example, the user enters the wrong words or phrases in some entities during the input process. If the device directly identifies the erroneous data to be identified, it may have a greater negative impact on the final result. Based on this, the device needs to perform data error correction before identifying the data to be identified.
[0004] The embodiment of the present application provides a method for processing data in an application program, which can improve the recognition accuracy of subsequent data recognition processing by pre-performing data error correction processing on the data to be recognized. Summary of the invention
[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for processing data in an application program. By pre-correcting the data to be identified, the recognition accuracy of subsequent data recognition processing can be improved.
[0006] On the one hand, an embodiment of the present application provides a method for processing data in an application, the method comprising:
[0007] Based on the entity recognition model and the intent recognition model, the entity and intent of the data to be recognized are recognized to obtain pre-selected entities and pre-selected intents;
[0008] If there is no matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent, a word segmentation operation is performed on the data to be recognized to obtain the data to be corrected;
[0009] Determine an entity set corresponding to the data to be corrected according to the entity library of the application and the preset edit distance; each entity in the entity set is an entity in the entity library;
[0010] Determine a target entity for error correction from the entity set based on a similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected;
[0011] Perform error correction on the data to be identified based on the target entity.
[0012] Another aspect provides a device for processing data in an application program, the device comprising:
[0013] A recognition module is used to recognize entities and intents of the data to be recognized based on the entity recognition model and the intent recognition model, and obtain pre-selected entities and pre-selected intents;
[0014] A word segmentation module is used to perform word segmentation on the data to be recognized to obtain data to be corrected if there is no matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent;
[0015] A first determination module is used to determine an entity set corresponding to the data to be corrected according to an entity library of the application and a preset edit distance; each entity in the entity set is an entity in the entity library;
[0016] A second determination module is used to determine a target entity for error correction from the entity set based on a similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected;
[0017] The processing module is used to perform error correction processing on the data to be identified based on the target entity.
[0018] On the other hand, an electronic device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a method for processing data in an application as described above.
[0019] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for processing data in an application as described above.
[0020] The method, device, electronic device, and storage medium for processing data in an application provided by the embodiments of the present application have the following technical effects:
[0021] Based on the entity recognition model and the intent recognition model, the data to be recognized is recognized for entities and intents, and pre-selected entities and pre-selected intents are obtained. If there is no matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent, the data to be recognized is segmented to obtain the data to be corrected, and the entity set corresponding to the data to be corrected is determined according to the entity library of the application and the preset edit distance; each entity in the entity set is an entity in the entity library, and the target entity for correction is determined from the entity set based on the similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, and the data to be recognized is corrected based on the target entity. In this way, data correction processing is performed on the data to be recognized, which can improve the recognition accuracy of subsequent data recognition processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;
[0024] Figure 2 It is a flowchart of a method for processing data in an application provided by an embodiment of the present application;
[0025] Figure 3 It is a schematic diagram of a representation form of an entity set provided in an embodiment of the present application;
[0026] Figure 4 It is a schematic diagram of a representation form of an entity set provided in an embodiment of the present application;
[0027] Figure 5 It is a flowchart of a method for processing data in an application provided by an embodiment of the present application;
[0028] Figure 6 It is a schematic diagram of the structure of a device for processing data in an application program provided in an embodiment of the present application;
[0029] Figure 7 It is a hardware structure block diagram of a server of a method for processing data in an application provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] 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 ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] See also Figure 1 , Figure 1 It is a schematic diagram of an application environment provided in an embodiment of the present application, including a terminal device 101 and a server 102, wherein the server 102 may be a server that provides data processing services for an application on the terminal device 101.
[0033] In an optional implementation, after the application is started, the terminal device 101 receives the data to be recognized input by the user, and sends the data to be recognized to the server 102 through the connection link established between the terminal device 101 and the server 102. Correspondingly, the server 102 receives the data to be recognized, and can identify the entity and intent of the data to be recognized based on the entity recognition model and the intent recognition model to obtain the preselected entity and the preselected intent. The server 102 can determine whether there is a matching relationship between the preselected entity and the entity of the sub-template in the intent template corresponding to the preselected intent. If there is no matching relationship, a word segmentation operation is performed on the data to be recognized to obtain the data to be corrected. Among them, the data to be corrected is the data in the data to be recognized. After the server 102 obtains the data to be corrected, it can determine the entity set corresponding to the data to be corrected according to the entity library of the application and the preset edit distance, wherein each entity in the entity set is an entity in the entity library, and based on the similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, a target entity for correction is determined from the entity set. The server 102 can perform error correction on the data to be identified based on the target entity, and obtain the corrected data to be identified.
[0034] In the embodiment of the present application, the application program on the terminal device 101 may provide data processing services. Figure 1 The server shown may also be a server platform, which may include multiple servers. For example, the server platform may include a first server, a second server, and a third server connected to each other.
[0035] Among them, the first server can identify the entities and intents of the data to be identified based on the entity recognition model and the intent recognition model, obtain pre-selected entities and pre-selected intents, and when it is determined that there is no matching relationship between the entities of the sub-template in the intent template corresponding to the pre-selected entity and the pre-selected intent, the data to be identified is sent to the second server.
[0036] The second server receives the data to be recognized, performs a word segmentation operation on the data to obtain data to be corrected, and sends the data to be corrected and the data to be recognized to the third server.
[0037] After the third server obtains the data to be corrected, it can determine the entity set corresponding to the data to be corrected according to the entity library of the application and the preset edit distance, wherein each entity in the entity set is an entity in the entity library. And based on the similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, the target entity for error correction is determined from the entity set. Finally, the third server performs error correction processing on the data to be identified based on the target entity, and obtains the data to be identified after error correction.
[0038] In the embodiment of the present application, after the server 102 or the third server obtains the corrected data to be identified, it can continue to identify it. For example, the data to be identified is a question raised by the user in the application of the terminal device 101. After the server 102 or the third server corrects the question, it can continue to identify, obtain a reply to the question, and send the reply to the terminal device 101 to complete the whole process.
[0039] In an optional implementation, the terminal device 101 may be a mobile phone, a desktop computer, a tablet computer, a laptop computer, a wearable device, etc.
[0040] Optionally, the entity relationship data between the terminal device 101 and the server 102 or the terminal device 101 and the server platform can be transmitted via a wired link or a wireless link. The choice of the communication link type can be determined according to the actual application situation and application environment. The server 102 or the server platform can provide data processing services for multiple terminal devices 101, and the number of terminal devices 101 connected to the server 102 or the server platform can be determined according to the actual situation.
[0041] There are many application scenarios involved in the embodiments of the present application, and the following description will be given using terminal devices and servers as examples.
[0042] The following describes a specific embodiment of a method for processing data in an application program of the present application. Figure 2 It is a flowchart of a method for processing data in an application provided by an embodiment of the present application. This specification provides method operation steps such as the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:
[0043] S201: Identify entities and intents of the data to be identified based on the entity recognition model and the intent recognition model to obtain pre-selected entities and pre-selected intents.
[0044] In an embodiment of the present application, the data to be identified in S201 is received by the terminal device after a certain application is started. Specifically, when a user starts an application on the terminal device, a receiving module for the data to be identified can be triggered on the interface of the application. In this way, the terminal device can receive the data to be identified input by the user through the receiving module and send the data to be identified to the server. Optionally, the receiving module can be a text receiving module for receiving text data input by the user. Optionally, the receiving module can be a voice receiving module for receiving input voice data. In an embodiment of the present application, the above-mentioned text data and voice data are both regarded as data to be identified.
[0045] Optionally, the application may be a music application, a game application, a social application, a news application, etc.
[0046] Before the server identifies entities and intents on the data to be identified based on the entity recognition model and the intent recognition model, it is also necessary to train the entity recognition model and the intent recognition model.
[0047] In the embodiment of the present application, the server can train the entity recognition model whose model parameter is the first parameter according to the first training data to obtain the entity recognition model whose model parameter is the second parameter. The server can train the intent recognition model whose model parameter is the third parameter according to the second training data to obtain the intent recognition model whose model parameter is the fourth parameter.
[0048] Optionally, the entity recognition model and the intent recognition model may be predetermined, and the entity recognition model and the intent recognition model may be any one of a neural network model, a conditional random field CRF model, a RNN-CRF model, and a BERT model.
[0049] In a specific embodiment, taking the convolutional neural network in the neural network model as an example, a large amount of first training data can be obtained, and the first training data can be labeled with entities. Then, the convolutional neural network can be trained for entity recognition based on the first training data. During the entity recognition training, the first parameter of the convolutional neural network is adjusted until the entity output by the convolutional neural network matches the entity of the input first training data, so as to obtain an entity recognition model, and the model parameter of the entity recognition model is the second parameter.
[0050] In another specific embodiment, taking the convolutional neural network in the neural network model as an example, a large amount of second training data can be obtained, the second training data can be labeled with intent, and then the convolutional neural network can be trained for intent recognition based on the second training data. During the intent recognition training, the third parameter of the convolutional neural network is adjusted so that the intent output by the convolutional neural network matches the intent of the input second training data, so as to obtain an intent recognition model, and the model parameter of the intent recognition model is the fourth parameter.
[0051] The first training data and the second training data include historical recognition data of the application, and the historical recognition data may be data previously input by the user into the application. Optionally, the first training data and the second training data may be historical recognition data of exactly the same application; optionally, the first training data and the second training data may include not only the historical recognition data of the application, but also recognition data related to the application downloaded from the Internet. By using the historical recognition data of the application and the recognition data related to the application, the trained intent recognition model and entity recognition model are more targeted in recognition, and the recognition accuracy of the intent recognition model and the entity recognition model can be improved.
[0052] S203: If there is no matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent, a word segmentation operation is performed on the data to be recognized to obtain data to be corrected.
[0053] In the embodiment of the present application, before determining whether there is a matching relationship between the pre-selected entity and the entity in the sub-template in the intent template corresponding to the pre-selected intent, the server may also determine the intent template of the application and determine the sub-template in each intent template. The following is an example of a shooting game in a game application combined with the above implementation.
[0054] In an optional embodiment, the server can determine multiple pre-selected intentions based on historical recognition data, and determine the intention templates used for the pre-selected intentions. For example, the historical recognition data contains historical recognition data such as "what is the damage value of M24 to a level 3 helmet", and the server can determine that one of the pre-selected intentions is a damage-type intention, and its corresponding intention template is a damage-type intention template. The historical recognition data contains historical recognition data such as "comparison data of M24 and AKM", and the server can determine that one of the pre-selected intentions is a comparison-type intention, and its corresponding intention template is a comparison-type intention template.
[0055] The server may classify the historical recognition data according to the intent templates to obtain the historical recognition data corresponding to each intent template, and then determine the sub-templates included in each intent template based on the historical recognition data corresponding to the intent template.
[0056] Continuing to explain based on the above-mentioned shooting games, assuming that the historical recognition data corresponding to the damage intent template includes three major categories of historical recognition data: "What is the damage value of a certain weapon to a certain level of armor", "What is the damage value of a certain weapon to a certain level of helmet" and "What is the damage value of a certain weapon", the server can determine that the damage intent template includes the following three sub-templates: the first sub-template is "weapon name, armor name", the second sub-template is "weapon name, helmet name", and the third sub-template is "weapon name". Assuming that the historical recognition data corresponding to the comparison intent template includes two major categories of historical recognition data: "Comparison data of weapon A and weapon B" and "Comparison data of weapon A, weapon B and weapon C", the server can determine that the comparison intent template includes the following two sub-templates: the first sub-template is "weapon name, weapon name" and the second sub-template is "weapon name, weapon name, weapon name".
[0057] The sub-templates in the intent template in the embodiment of the present application not only involve entity types, but also entity quantities. For example, the "weapon name", "armor name" or "helmet name" in the above-mentioned injury intent template sub-template can be regarded as entity types. For example, the entity type of "weapon name" can include "M24", "AKM", "AWM" and "AK" in the shooting game application. The entity type of "armor name" can include "first-level armor", "second-level armor" and "third-level armor" in the shooting game application. The entity type of "helmet name" can include "first-level helmet", "second-level helmet" and "third-level helmet" in the shooting game application. The entity types in the first sub-template of the injury intent template are "weapon name" and "armor name", and the number of entities is 2; the entity types in the second sub-template of the injury intent template are "weapon name" and "helmet name", and the number of entities is 2; the entity type in the third sub-template of the injury intent template is "weapon name", and the number of entities is 1. In summary, the maximum number of entities in the injury intent template is 2, and the minimum number of entities is 1. Optionally, each sub-template may also involve an entity order, for example, in the first sub-template, "weapon name" is located before "armor name".
[0058] Based on the description in the previous paragraph, the server in the embodiment of the present application can measure whether there is a matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent based on two factors: entity type and entity quantity.
[0059] In an optional embodiment, if there is no matching relationship between the entity type of the pre-selected entity and the entity type of the entity in any sub-template in the intent template, the server may perform a word segmentation operation on the data to be recognized to obtain data to be corrected.
[0060] For example, suppose the data to be identified is "What is the damage value of AKN to the third-level protective gear?", and after the server identifies the data to be identified based on the entity recognition model, the pre-selected entity obtained is "AKN", and the intent of the data to be identified is identified based on the intent recognition model, and the pre-selected intent obtained is the damage intent. If "AKN" is not an entity corresponding to any entity type in the shooting game application due to user input errors, then the entity type of the pre-selected entity "AKN" cannot be matched with the entity type of the entity in any sub-template of the damage intent template corresponding to the damage intent. Therefore, the server can perform word segmentation on the data to be identified to obtain the data to be corrected.
[0061] In another optional embodiment, if there is no matching relationship between the entity quantity of the pre-selected entity and the entity quantity of the entity in the upper limit sub-template in the intent template, the server can perform a word segmentation operation on the data to be recognized to obtain the data to be corrected. Among them, the upper limit sub-template is the sub-template containing the largest number of entities among all the sub-templates of the intent template.
[0062] For example, suppose the data to be identified is "What is the damage value of AKM to level 3 protective gear?", and after the server identifies the data to be identified based on the entity recognition model, the pre-selected entity obtained is "AKM". The intent of the data to be identified is identified based on the intent recognition model, and the pre-selected intent obtained is a damage-type intent, where the number of entities of the pre-selected entity "AKM" is 1. Based on the definition of the upper limit sub-template, the server can determine that the upper limit sub-template in the damage-type intent template can be the first sub-template "weapon name, armor name" or the second sub-template "weapon name, helmet name", and determine that the number of entities in the upper limit sub-template is 2, and there is no matching relationship with the entity number 1 of the pre-selected entity "AKM". Then the server can perform word segmentation on the data to be identified to obtain the data to be corrected.
[0063] The above two methods for determining whether a matching relationship exists can be combined to determine whether a matching relationship exists between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent.
[0064] Optionally, the server first determines the entity type, and then determines the number of entities. If the entity type of the pre-selected entity does not match the entity type of the entity in any sub-template in the intent template, such as the above-mentioned data to be identified is "how much is the damage value of AKN to the third-level protective gear", the server can directly perform a segmentation operation on the data to be identified to obtain the data to be corrected. If the entity type of the pre-selected entity matches the entity type of the entity in any sub-template in the intent template, such as the above-mentioned data to be identified is "how much is the damage value of AKM to the third-level protective gear", the pre-selected entity is "AKM", because the server determines that "AKM" is the entity corresponding to the entity type "weapon name" in the gunfight game application, and there is a matching relationship with the third sub-template "weapon name" in the damage intent template, the next step of determining the number of entities can be continued. However, since the third sub-template is not the upper limit sub-template in the damage intent template, there is no matching relationship between the entity number of the pre-selected entity and the entity number of the entity in the upper limit sub-template in the intent template, so the server can perform a segmentation operation on the data to be identified to obtain the data to be corrected.
[0065] In actual applications, the data to be identified is "What is the damage value of AKM to level 3 protective gear?" In this example, the entity type of the pre-selected entity matches the entity type of the entity in any sub-template in the intent template. However, considering that the entity recognition model in the server in the previous step identifies the data to be identified, there may be unrecognized entities. Therefore, a matching comparison of the number of entities is required to make the entire implementation plan include more possibilities and reduce the error rate of the overall plan.
[0066] Optionally, the server in the embodiment of the present application first determines the number of entities and then determines the entity type. Only when both judgment conditions are met, the server may not perform word segmentation operations on the data to be recognized.
[0067] In an embodiment of the present application, a common word N-gram segmentation operation can be performed on the data to be identified to obtain data to be corrected. The value of N in the common word N-gram can be determined according to actual conditions. For example, the server can perform a common word 1-gram segmentation operation on the data to be identified "how much is the damage value of AKN to level three armor", and the data to be corrected obtained by performing the common word 1-gram operation is "how much is the damage value of AKN to level three armor". Optionally, common word 1-gram segmentation operation and common word 2-gram segmentation operation can also be performed on the data to be identified, and the specific implementation method of the segmentation operation can be determined according to the actual application scenario.
[0068] In an optional embodiment, if the pre-selected entity matches the entity in the application entity library, the server can perform a word segmentation operation on the data to be identified except the pre-selected entity to obtain the data to be corrected. Assuming that through S201, the server performs entity recognition on the data to be identified "how much is the damage value of AKN to level 3 armor" based on the entity recognition model to obtain the pre-selected entity as "level 3 armor", and the entities in the entity library of the application include "level 3 armor", that is, the pre-selected entity matches the entity in the application entity library, then the server can replace the pre-selected entity in the data to be identified with a character in a preset format, perform a word segmentation operation on the data to be identified except the pre-selected entity, and obtain the data to be corrected. In this way, the data to be corrected is "how much is the damage value of AKN to *". Among them, the character in the preset format is "*". The beneficial effect of this embodiment is that by shielding the determined entity, the noise of the subsequent error correction effect can be reduced, and the efficiency of error correction can be improved.
[0069] S205: Determine an entity set corresponding to the data to be corrected according to the entity library of the application and a preset edit distance; wherein each entity in the entity set is an entity in the entity library.
[0070] In the embodiment of the present application, the edit distance is the minimum number of edit operations required to convert one data item into another. The allowed edit operations include replacing one character with another character, inserting a character, and deleting a character. For example, the edit distance of converting "level 3 clothing" into "level 3 armor" is 2.
[0071] In the embodiment of the present application, since the server determines the entity set corresponding to the data to be corrected based on the entity library in the application, in an optional implementation, the server can determine the entity set corresponding to the entity to be corrected in the data to be corrected based on the entity library of the application and the preset edit distance. Based on the above data to be corrected, assuming that the preset edit distance is 3, the server can determine from the entity library that the entities in the entity set corresponding to the entity to be corrected "AKN" in the data to be corrected are: "AKM" with an edit distance of 1 from the entity to be corrected "AKN", "AWM" with an edit distance of 2 from the entity to be corrected "AKN", "M24" with an edit distance of 3 from the entity to be corrected "AKN", "AUG" with an edit distance of 2 from the entity to be corrected "AKN" and "M4" with an edit distance of 3 from the entity to be corrected "AKN".
[0072] Optionally, the above-mentioned entity to be corrected "AKN" and the corresponding entity set are represented in the form of a tree. Figure 3 A schematic diagram of a representation of an entity set provided for an embodiment of the present application, wherein the schematic diagram includes an entity to be corrected "AKN" in the data to be corrected and entities "AKM", "AWM", "M24", "AUG", "M4" in the entity set corresponding to "AKN", as well as the editing distance between the entity to be corrected and each entity in the entity set.
[0073] Optionally, since the entity to be corrected "AKN" is not an entity in the entity library, the entity to be corrected "AKN" may not be included in the tree format. In this way, the entity set of the entity to be corrected "AKN" may be represented by a transition entity. Figure 4 A schematic diagram of a representation of an entity set provided in an embodiment of the present application, wherein the schematic diagram includes entities "AKM", "AWM", "M24", "AUG", and "M4" in the entity set corresponding to the entity "AKN" to be corrected in the data to be corrected. Among them, the entity "AKM" with the smallest edit distance to the entity "AKN" to be corrected will be used as a transition entity. In addition, Figure 4 The edit distance between the transition entity and the entities in the entity set excluding the transition entity is also included.
[0074] In another optional implementation, the server can determine the entity set corresponding to the data to be corrected based on the entity library of the application and the preset edit distance. Among them, the data to be corrected can not only include the entity to be corrected "AKN", the specific implementation method of determining the entity set can refer to the above paragraphs, and can also include non-entities to be corrected: "right", "of", "damage value", "for" and "how much". Optionally, the entity to be corrected and the non-entity to be corrected can determine the corresponding entity set from the entity library of the application based on the same preset edit distance. Optionally, the entity to be corrected and the non-entity to be corrected can determine the corresponding entity set from the entity library of the application based on different preset edit distances. For example, the preset edit distance 3 corresponding to the entity to be corrected is less than the preset edit distance 4 corresponding to the non-entity to be corrected. The preset edit distance in the embodiment of the present application can be determined according to the actual application situation, mainly in combination with the actual application and the preset edit distance to eliminate interference data. Reduce the sorting workload of the implementation method.
[0075] In order to simplify the subsequent steps of determining the target entity from the entity set, in an embodiment of the present application, after the server determines the entity set corresponding to the data to be corrected according to the entity library of the application and the preset edit distance, it can also determine a candidate entity set from the entity set corresponding to the data to be corrected according to the preset edit threshold, wherein the candidate entities in the candidate entity set are entities in the entity set.
[0076] Based on the entity set corresponding to the above-mentioned entity "AKN" to be corrected, Figure 3 and Figure 4 Continuing to explain how to determine the candidate entity set corresponding to the error correction entity "AKN", assuming that the preset editing threshold is 2, the server can determine the entities in the entity set whose editing distance with the to-be-corrected entity "AKN" is less than or equal to 2.
[0077] In an optional implementation, the server may Figure 3 The edit distance shown determines the candidate entity set. The server can determine that the entities whose edit distances to the data to be corrected are less than or equal to 2 are "AKM", "AUG" and "AWM". Thus, the candidate entity set includes "AKM", "AUG" and "AWM".
[0078] In another optional implementation, the server may Figure 4The edit distance shown determines the candidate entity set. Optionally, the server determines it according to the triangle three-side principle. The first side is the edit distance 1 from the entity to be corrected "AKN" to the transition entity "AKM", and the second side is the maximum edit distance 2 between the entity to be corrected "AKN" and the entities in the candidate entity set. In this way, the third side, that is, the edit distance from the transition entity "AKM" to the entity in the candidate entity set can be 3, which is less than the sum of the two sides. Thus, it can be determined that the entities in the candidate entity set include "AKM", "AUG" and "AWM".
[0079] S207: Determine a target entity for error correction from the entity set based on a similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected.
[0080] In an embodiment of the present application, in an implementation of determining the similarity value between each entity in an entity set and the data to be corrected, the server can determine the entity similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, and determine the editing similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected. The server determines the similarity value between each entity in the entity set and the data to be corrected based on the entity similarity value and the editing similarity value.
[0081] Correspondingly, in an implementation of determining the similarity value between each entity in a candidate entity set and the data to be corrected, the server can determine the entity similarity value between each entity in the candidate entity set corresponding to the data to be corrected and the data to be corrected, and determine the editing similarity value between each entity in the candidate entity set corresponding to the data to be corrected and the data to be corrected. The server determines the similarity value between each entity in the candidate entity set and the data to be corrected based on the entity similarity value and the editing similarity value.
[0082] The following description will be continued based on the entities "AKM", "AUG" and "AWM" in the candidate entity set of the entity to be corrected "AKN" in the above example.
[0083] In the embodiment of the present application, the entity similarity value between each entity in the candidate entity set and the data to be corrected can be determined according to formula (1):
[0084]
[0085] Among them, sim1 represents the entity similarity value, d gram (a, b) represents the entity distance between the data to be corrected and an entity in the candidate entity set, len a Indicates the character length of the data to be corrected, len b Represented as the character length of an entity in the candidate entity set.
[0086] In the embodiment of the present application, the physical distance d gram (a, b) can be expressed as the number of overlaps in the character set between the entity to be corrected and the entity in the candidate entity set. If the character set is a set of two characters or three characters, the server determines that the character set of the entity to be corrected "AKN" is {AK, KN, AKN}, the character set of "AKM" is {AK, KM, AKM}, the character set of "AWM" is {AW, WM, AWM}, and the character set of "AUG" is {AU, UG, AUG}. The character length of the data to be corrected is len a 3, the character length len of the three entities "AKM", "AUG" and "AWM" b Both are 3. Thus, the entity similarity value between "AKM" and "AKN" can be calculated as 1-1 / 6=5 / 6, the entity similarity value between "AWM" and "AKN" can be calculated as 1, and the entity similarity value between "AUG" and "AKN" can be calculated as 1.
[0087] In the embodiment of the present application, the edit similarity value of each entity in the candidate entity set and the data to be corrected can be determined according to formula (2):
[0088]
[0089] Among them, sim2 represents the editing similarity value, d levenshtein (a, b) represents the edit distance between the data to be corrected and the entities in the candidate entity set, max(len a ,len b ) represents the length of the longer character between the character length of the data to be corrected and the character length of the entity.
[0090] Optionally, the edit distance between the data to be corrected and the entities in the candidate entity set is the minimum number of edit operations required to convert one data into another. Allowed edit operations include replacing one character with another, inserting a character, and deleting a character.
[0091] Optionally, the edit distance between the data to be corrected and the entities in the candidate entity set is the minimum number of edit operations required to transform one data into another. Allowed edit operations include replacing one character with another, inserting a character, deleting a character, and swapping two characters.
[0092] Any of the above-mentioned edit distances can be applied to the step of determining the edit similarity value. Since the max(len) of "AKM" and "AKN", "AWM" and "AKN", "AUG" and "AKN" is a,len b ) are both 3, the edit distance between "AKM" and "AKN" is 1, and the server can determine that the edit similarity between "AKM" and "AKN" is 1-1 / 3=2 / 3. The edit distance between "AWM" and "AKN" is 2, and the server can determine that the edit similarity between "AWM" and "AKN" is 1-2 / 3=1 / 3. The edit distance between "AUG" and "AKN" is 2, and the server can determine that the edit similarity between "AUG" and "AKN" is 1-2 / 3=1 / 3.
[0093] In an embodiment of the present application, the server can determine the similarity value between each entity in the candidate entity set and the data to be corrected according to the sum of the entity similarity value and the edit similarity value. In the above embodiment, the server can determine that the similarity value between "AKM" and "AKN" is 5 / 6+2 / 3=1.5, the server can determine that the similarity value between "AWM" and "AKN" is 1+1 / 3=1.33, and the server can determine that the similarity value between "AUG" and "AKN" is 1+1 / 3=1.33.
[0094] Based on the similarity values between each entity in the candidate entity set and the entity to be corrected, the server may determine the entity corresponding to the maximum similarity value in the candidate entity set as the target entity corresponding to the data to be corrected, and the target entity is "AKM".
[0095] S209: Perform error correction processing on the data to be identified based on the target entity.
[0096] In the embodiment of the present application, the target entity can replace the data to be corrected in the data to be identified. That is, the server can replace the target entity "AKM" with the data to be corrected "AKN" in the data to be identified "how much is the damage value of AKN to the third-level protective gear", and obtain the corrected data to be identified "how much is the damage value of AKM to the third-level protective gear".
[0097] In some application scenarios, if the intention corresponding to the data to be identified is a harm-related intention, and the server performs word segmentation on the data to be identified according to the common word N-gram, and determines the candidate entity set corresponding to the data to be corrected according to the entity library of the application, the preset edit distance and the preset edit threshold, three candidate entity sets are obtained, such as the first candidate entity set is {AKM, AWM}, the second candidate entity set is {level 2 helmet, level 3 helmet} and the third candidate entity set is {level 2 armor, level 3 armor}. The server can continue to determine the similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected. For example, the similarity value of the first candidate entity set is {AKM (1.5), AWM (1.33)}, the similarity value of the second candidate entity set is {level 2 helmet (1.3), level 3 helmet (0.8)} and the similarity value of the third candidate entity set is {level 2 armor (0.2), level 3 armor (1.5)}. The server determines the target entities AKM (1.5), level 2 helmet (1.3) and level 3 armor (1.5) for correction from each candidate set.
[0098] In this application scenario, the embodiment of the present application can determine the target entity that is actually used for error correction based on the degree of match between the determined target entity and the sub-template of the damage intent template. Since the damage intent template assumed above includes three sub-templates: the first sub-template is "weapon name, armor name", the second sub-template is "weapon name, helmet name", and the third sub-template is "weapon name". The server can determine the matching program values of the target entity substituted into the sub-template respectively, and obtain the matching program value substituted into the first sub-template as 1.5+1.5=3; the matching program value substituted into the second sub-template is 1.5+1.3=2.8, and the matching program value substituted into the third sub-template is 1.5. Finally, the server determines that the target entities that are actually used for error correction are the AKM and level 3 armor with the highest matching degree values.
[0099] An optional implementation scheme is determined below based on the above examples. Figure 5 A flow chart of a method for processing data in an application program provided in an embodiment of the present application is shown in FIG. Figure 5 As shown:
[0100] S501: The server determines a plurality of pre-selected intents according to historical recognition data, and determines an intent template corresponding to each pre-selected intent;
[0101] S503: The server identifies entities and intents on the data to be identified based on the entity recognition model and the intent recognition model, and obtains pre-selected entities and pre-selected intents;
[0102] S505: The server determines whether there is a matching relationship between the entity type of the pre-selected entity and the entity type of the entity in any sub-template in the intent template. If so, go to step S507; if not, go to step S509;
[0103] S507: The server determines whether there is a matching relationship between the entity quantity of the pre-selected entity and the entity quantity of the entity in the upper limit sub-template in the intent template. If so, go to step S523; if not, go to step S509;
[0104] S509: The server determines whether the pre-selected entity matches the entity in the application entity library. If so, it goes to step S511; if not, it goes to step S513;
[0105] S511: The server performs a word segmentation operation on the data to be identified except for the pre-selected entity to obtain the data to be corrected, and then goes to step S515;
[0106] S513: The server performs a word segmentation operation on the data to be recognized to obtain data to be corrected;
[0107] In the embodiment of the present application, the server may perform a common word N-gram segmentation operation on the data to be identified or data other than the pre-selected entity to obtain the data to be corrected, wherein the value of N in the common word N-gram may be determined according to actual conditions.
[0108] S515: The server determines an entity set corresponding to the data to be corrected according to the entity library of the application and the preset edit distance;
[0109] S517: The server determines a candidate entity set from the entity set corresponding to the to-be-corrected data according to a preset editing threshold, where the candidate entities in the candidate entity set are entities in the entity set;
[0110] S519: The server determines a target entity for error correction from the candidate entity set based on a similarity value between each entity in the candidate entity set corresponding to the data to be corrected and the data to be corrected;
[0111] In an embodiment of the present application, the server can determine the entity similarity value between each entity in the candidate entity set corresponding to the data to be corrected and the data to be corrected, and determine the edit similarity value between each entity in the candidate entity set corresponding to the data to be corrected and the data to be corrected. In this way, the server determines the similarity value between each entity in the candidate entity set and the data to be corrected based on the entity similarity value and the edit similarity value. The server can determine the entity corresponding to the maximum similarity program value in the candidate entity set as the target entity corresponding to the data to be corrected.
[0112] S521: The server replaces the data to be corrected in the data to be identified with the target entity.
[0113] S523: The server continues to identify the data to be identified and obtains a response to the question.
[0114] In summary, in the embodiment of the present application, the preset intent template is combined to concentrate the data to be corrected in a certain correction area, ensuring that the error correction process can be carried out quickly and accurately. Subsequently, the target entity is determined through the application of the entity library and the edit distance to perform error correction on the data to be corrected, paving the way for subsequent data recognition processing, and can improve the accuracy of subsequent data recognition processing.
[0115] The present application also provides a device for processing data in an application program. Figure 6 is a schematic diagram of a structure of a data processing device in an application program provided in an embodiment of the present application, such as Figure 6 As shown, the device comprises:
[0116] The recognition module 601 is used to recognize entities and intents of the data to be recognized based on the entity recognition model and the intent recognition model, and obtain pre-selected entities and pre-selected intents;
[0117] The word segmentation module 602 is used to perform word segmentation on the data to be recognized to obtain data to be corrected if there is no matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent;
[0118] The first determination module 603 is used to determine the entity set corresponding to the to-be-corrected data according to the entity library of the application and the preset edit distance; each entity in the entity set is an entity in the entity library;
[0119] The second determination module 604 is used to determine the target entity for error correction from the entity set based on the similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected;
[0120] The processing module 605 is used to perform error correction processing on the data to be identified based on the target entity.
[0121] In an optional embodiment, the device further comprises:
[0122] The word segmentation module is used to perform word segmentation on the data to be recognized to obtain data to be corrected if there is no matching relationship between the entity type of the pre-selected entity and the entity type of the entity in any sub-template in the intent template.
[0123] In an optional embodiment, the device further comprises:
[0124] The word segmentation module is used to perform word segmentation on the data to be recognized to obtain data to be corrected if there is no matching relationship between the entity quantity of the pre-selected entity and the entity quantity of the entity in the upper limit sub-template in the intent template;
[0125] The upper limit sub-template is a sub-template containing the largest number of entities among all sub-templates of the intent template.
[0126] In an optional embodiment, the device further comprises:
[0127] The word segmentation module is used to perform word segmentation operations on the data to be identified except the pre-selected entity if the pre-selected entity matches the entity in the application entity library, so as to obtain the data to be corrected.
[0128] In an optional embodiment, the device further comprises:
[0129] The second determination module is used to determine the entity similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected;
[0130] Determine the edit similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected;
[0131] Determine the similarity value between each entity in the entity set and the data to be corrected according to the entity similarity value and the edit similarity value;
[0132] Determine the entity corresponding to the maximum similarity program value as the target entity corresponding to the data to be corrected;
[0133] The processing module is used to replace the data to be corrected in the data to be identified with the target entity.
[0134] In an optional embodiment, the device further comprises:
[0135] The first determination module is used to determine a candidate entity set from the entity set corresponding to the to-be-corrected data according to a preset editing threshold; the candidate entities in the candidate entity set are entities in the entity set;
[0136] Determining a target entity for error correction from the entity set based on a similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, including:
[0137] Based on the similarity value between each candidate entity in the candidate entity set corresponding to the data to be corrected and the data to be corrected, a target entity for error correction is determined from the candidate entity set.
[0138] In an optional embodiment, the device further includes a training module:
[0139] The training module is used to train the entity recognition model whose model parameter is the first parameter according to the first training data to obtain the entity recognition model whose model parameter is the second parameter;
[0140] The intention recognition model whose model parameter is the third parameter is trained according to the second training data to obtain the intention recognition model whose model parameter is the fourth parameter;
[0141] The first training data and the second training data include historical recognition data of the application program.
[0142] The device and method embodiments in the embodiments of this application are based on the same application concept.
[0143] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal, a server or a similar computing device. Taking running on a server as an example, Figure 7 1 is a hardware structure block diagram of a server of a method for processing data in an application program provided in an embodiment of the present application. Figure 7 As shown, the server 700 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 710 (the processor 710 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 730 for storing data, and one or more storage media 720 (such as one or more mass storage devices) for storing application programs 723 or data 722. Among them, the memory 730 and the storage medium 720 can be short-term storage or permanent storage. The program stored in the storage medium 720 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 710 can be configured to communicate with the storage medium 720 and execute a series of instruction operations in the storage medium 720 on the server 700. The server 700 may also include one or more power supplies 760, one or more wired or wireless network interfaces 750, one or more input and output interfaces 740, and / or one or more operating systems 721, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0144] The input / output interface 740 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 700. In one example, the input / output interface 740 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 740 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0145] It can be understood by those skilled in the art that Figure 7 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 7 More or fewer components as shown, or with Figure 7 Different configurations are shown.
[0146] An embodiment of the present application also provides a storage medium, which can be set in a server to store at least one instruction, at least one program, a code set or an instruction set related to a method for processing data in an application in an implementation method embodiment. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for processing data in the above-mentioned application.
[0147] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0148] It can be seen from the embodiments of the method, device or storage medium for processing data in the application provided by the present application that in the present application, entities and intents of the data to be identified are identified based on the entity recognition model and the intent recognition model to obtain pre-selected entities and pre-selected intents. If there is no matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent, a word segmentation operation is performed on the data to be identified to obtain data to be corrected, and the entity set corresponding to the data to be corrected is determined according to the entity library of the application and the preset edit distance; each entity in the entity set is an entity in the entity library, and the target entity for correction is determined from the entity set based on the similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, and the data to be identified is corrected based on the target entity. In this way, data correction processing is performed on the data to be identified, paving the way for subsequent data identification processing.
[0149] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0150] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0151] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0152] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for processing data in an application program. It is characterized in that Applied to a domain-specific application, the method comprises: Based on the entity recognition model and the intention recognition model, the data to be recognized is recognized for entities and intentions, and pre-selected entities and pre-selected intentions are obtained; the data to be recognized includes text data or voice data input by the user; the intention recognition representation is performed to recognize the motivation of the user inputting the data to be recognized; the pre-selected entities include noun objects in the data to be recognized; If there is no matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent, performing a word segmentation operation on the data to be identified to obtain data to be corrected; Determine an entity set corresponding to the data to be corrected according to an entity library of the application and a preset edit distance; each entity in the entity set is an entity in the entity library; Determining a target entity for error correction from the entity set based on a similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected; Perform error correction processing on the data to be identified based on the target entity.
2. The method according to claim 1, It is characterized in that If there is no matching relationship between the pre-selected entity and the entity in the sub-template in the intent template corresponding to the pre-selected intent, performing a word segmentation operation on the data to be identified to obtain data to be corrected, including: If there is no matching relationship between the entity type of the pre-selected entity and the entity type of the entity in any sub-template in the intent template, a word segmentation operation is performed on the data to be identified to obtain data to be corrected.
3. The method according to claim 1, It is characterized in that If there is no matching relationship between the pre-selected entity and the entity in the sub-template in the intent template corresponding to the pre-selected intent, performing a word segmentation operation on the data to be identified to obtain data to be corrected, including: If there is no matching relationship between the entity quantity of the pre-selected entity and the entity quantity of the entity in the upper limit sub-template in the intent template, performing a word segmentation operation on the data to be identified to obtain data to be corrected; The upper limit sub-template is a sub-template containing the largest number of entities among all sub-templates of the intent template.
4. The method according to claim 1, It is characterized in that The step of performing a word segmentation operation on the data to be identified to obtain the data to be corrected includes: If the pre-selected entity matches an entity in the entity library of the application, a word segmentation operation is performed on the data to be identified except for the pre-selected entity to obtain data to be corrected.
5. The method according to claim 1, It is characterized in that The step of determining a target entity for error correction from the entity set based on a similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, and performing error correction processing on the data to be identified based on the target entity, comprises: Determine an entity similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected; Determine an edit similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected; Determine the similarity value between each entity in the entity set and the data to be corrected according to the entity similarity value and the edit similarity value; Determine the entity corresponding to the maximum similarity value as the target entity corresponding to the data to be corrected; The target entity is used to replace the to-be-corrected data in the to-be-identified data.
6. The method according to claim 1, It is characterized in that Before determining the target entity for error correction from the entity set based on the similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, the method further includes: Determine a candidate entity set from the entity set corresponding to the to-be-corrected data according to a preset editing threshold; the candidate entities in the candidate entity set are entities in the entity set; The step of determining a target entity for error correction from the entity set based on a similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected, comprises: A target entity for error correction is determined from the candidate entity set based on a similarity value between each candidate entity in the candidate entity set corresponding to the data to be corrected and the data to be corrected.
7. The method according to claim 1, It is characterized in that The method further comprises the step of training the entity recognition model and the intent recognition model, wherein the training of the entity recognition model and the intent recognition model comprises: Training an entity recognition model whose model parameter is a first parameter according to the first training data to obtain an entity recognition model whose model parameter is a second parameter; The intention recognition model whose model parameter is the third parameter is trained according to the second training data to obtain the intention recognition model whose model parameter is the fourth parameter; The first training data and the second training data include historical identification data of the application.
8. A device for processing data in an application program, It is characterized in that Applicable to a domain-specific application, the device comprises: The recognition module is used to identify entities and intents of the data to be identified based on the entity recognition model and the intent recognition model to obtain pre-selected entities and pre-selected intents; the data to be identified includes text data or voice data input by the user; the intent recognition representation is used to identify the motivation of the user to input the data to be identified; the pre-selected entities include noun objects in the data to be identified; A word segmentation module, used for performing a word segmentation operation on the data to be identified to obtain data to be corrected if there is no matching relationship between the pre-selected entity and the entity in the sub-template of the intent template corresponding to the pre-selected intent; A first determination module is used to determine an entity set corresponding to the to-be-corrected data according to an entity library of an application and a preset edit distance; each entity in the entity set is an entity in the entity library; A second determination module, configured to determine a target entity for error correction from the entity set based on a similarity value between each entity in the entity set corresponding to the data to be corrected and the data to be corrected; A processing module is used to perform error correction processing on the data to be identified based on the target entity.
9. An electronic device, It is characterized in that The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for processing data in an application as described in any one of claims 1-7.
10. A computer-readable storage medium, It is characterized in that The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for processing data in the application as described in any one of claims 1-7.
