Natural language processing method and device, equipment, medium and product

Through natural language processing methods, based on user identity permissions matching databases, generating and rewriting natural language, the efficiency and accuracy of training and Q & A platforms in the insurance industry have been solved, and targeted and high standards of answers are achieved.

CN119336889APending Publication Date: 2025-01-21PICC LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411403241.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the insurance industry, traditional offline training methods have problems such as high labor costs, slow timeliness and possible deviations in information transmission. At the same time, insurance field personnel lack professional tools for professional knowledge retrieval and product Q&A. The existing technology Q&A platform can only answer questions based on manual generation of Q&A, and cannot answer questions other than Q&A, and has low accuracy.

Method used

Through a natural language processing method, based on the user's identity permissions, determine the database matched in the pre -training model, generate a candidate natural language, and use the preset rewriting rules to determine the natural language of the target to achieve targeted answers and improve the accuracy of answers.

Benefits of technology

It achieves targeted answers to different users, improves the accuracy of answers, and meets the needs of users in the insurance industry for professional knowledge retrieval and product Q&A.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336889A_ABST
    Figure CN119336889A_ABST
Patent Text Reader

Abstract

The invention provides a natural language processing method and device, equipment, a medium and a product, and the method comprises the steps: determining a first database matched with the identity authority in a pre-training model based on the identity authority of a user; determining first key information based on a question natural language input by a user; based on the first database and the first key information, utilizing a pre-training model to generate candidate natural languages; and based on the candidate natural language, determining a target natural language by using a preset rewriting rule. According to the method disclosed by the invention, the first databases of different storage data are matched for the users with different identity permissions, so that targeted answers to different users can be realized; the target natural language is determined by using the preset rewriting rule, so that the accuracy of the target natural language can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence, and in particular to a natural language processing method, device, equipment, medium and product. Background Art

[0002] The insurance industry is in a deep transformation. When new traditional insurance products are launched, sales staff are usually trained offline. This method has many disadvantages, such as high labor costs, slow timeliness, and possible deviations in information transmission. At the same time, insurance internal and external staff also lack professional tools in terms of professional knowledge retrieval and product Q&A. In related technologies, some insurance companies' platforms can only answer questions and answers based on manually generated question and answer pairs, but cannot answer questions outside of these provided question and answer pairs, and the accuracy of the questions and answers is low. Summary of the invention

[0003] The present disclosure provides a natural language processing method, apparatus, device, medium and product to solve the problems in the related technology, achieve targeted answers to different users, and improve the accuracy of the answers.

[0004] The first aspect of the present disclosure proposes a natural language processing method, including: based on the user's identity authority, determining a first database in a pre-trained model that matches the identity authority; based on the question natural language input by the user, determining first key information; based on the first database and the first key information, using the pre-trained model, generating candidate natural languages; based on the candidate natural languages, using preset rewriting rules, determining a target natural language.

[0005] In some embodiments of the present disclosure, determining the first key information based on the natural language of the question input by the user includes: determining the first entity based on the natural language of the question using a semantic segmentation algorithm; determining the first entity relationship between the first entities based on the structure of the sentence containing the first entity using a preset recognition rule, and / or determining the first entity relationship based on the semantic feature information of the first entity; determining the first entity and the first entity relationship as the first key information.

[0006] In some embodiments of the present disclosure, generating candidate natural languages ​​based on the first database and the first key information using a pre-trained model includes: based on the first entity in the first key information, determining a knowledge graph node in the first database that matches the first entity using a similarity matching algorithm; based on the knowledge graph node and the first entity relationship, determining a relationship edge in the first database that matches the entity relationship; based on the knowledge graph nodes and the relationship edges, generating candidate natural languages ​​using a pre-trained model.

[0007] In some embodiments of the present disclosure, determining a target natural language based on a candidate natural language using a preset rewriting rule includes: determining a similarity score between the candidate natural language and the problem natural language using a text similarity algorithm; determining a language structure score of the candidate natural language based on a second entity of the candidate natural language and a second entity relationship between the second entities; determining a fusion score of the candidate natural language based on the similarity score and the language structure score; determining the candidate natural language as the target natural language when the fusion score is greater than or equal to a preset evaluation value; and rewriting the candidate natural language using a text editing algorithm until the fusion score of the rewritten candidate natural language is greater than or equal to the preset evaluation value, and determining the rewritten candidate natural language as the target natural language.

[0008] In some embodiments of the present disclosure, the method also includes: performing data preprocessing on the question natural language and the target natural language to obtain a first question and answer group; performing data labeling on the first question and answer group; and performing data adjustment on the hyperparameters of the pre-trained model based on the labeled first question and answer group.

[0009] In some embodiments of the present disclosure, identity authority includes at least one of the following: insurance company customer authority, insurance company field authority, and insurance company back-office authority.

[0010] The second aspect embodiment of the present disclosure proposes a natural language processing device, which includes: a matching unit, which is used to determine a first database in a pre-trained model that matches the identity authority based on the user's identity authority; an extraction unit, which is used to determine first key information based on the question natural language input by the user; a first generation unit, which is used to generate a candidate natural language based on the first database and the first key information using the pre-trained model; and a second generation unit, which is used to determine a target natural language based on the candidate natural language using a preset rewriting rule.

[0011] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when used to run the computer program, executes the method described in the first aspect embodiment of the present disclosure.

[0012] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.

[0013] The fifth aspect embodiment of the present disclosure provides a computer program product, including a computer program, which implements the method described in the first aspect embodiment of the present disclosure when executed by a processor.

[0014] In summary, according to a natural language processing method proposed in the present disclosure, the method includes: based on the identity authority of the user, determining a first database in the pre-trained model that matches the identity authority; based on the natural language of the question input by the user, determining the first key information; based on the first database and the first key information, using the pre-trained model, generating candidate natural languages; based on the candidate natural languages, using preset rewriting rules, determining the target natural language. The method of the present disclosure can provide targeted answers to different users by matching the first databases with different storage data for users with different identity authorities; by using preset rewriting rules to determine the target natural language, the accuracy of the target natural language can be improved.

[0015] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0017] Figure 1 A flowchart of a natural language processing method provided by an embodiment of the present disclosure;

[0018] Figure 2 A flowchart of another natural language processing method provided by an embodiment of the present disclosure;

[0019] Figure 3 A schematic diagram of the structure of a natural language processing device provided in an embodiment of the present disclosure;

[0020] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0022] The following is a brief introduction to the background technology involved in this disclosure:

[0023] The insurance industry is in a deep transformation. When new traditional insurance products are launched, sales staff are usually trained offline. This method has many disadvantages, such as high labor costs, slow timeliness, and possible deviations in information transmission. At the same time, insurance internal and external staff also lack professional tools in terms of professional knowledge retrieval and product Q&A. In related technologies, some insurance companies' platforms can only answer questions and answers based on manually generated question and answer pairs, but cannot answer questions outside of these provided question and answer pairs, and the accuracy of the questions and answers is low.

[0024] The present disclosure is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] Figure 1 A flowchart of a natural language processing method provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes steps 101-104.

[0026] Step 101, based on the identity authority of the user, determine the first database in the pre-trained model that matches the identity authority.

[0027] In some optional embodiments, for an insurance company, the authority can be divided into three types: insurance company customers, insurance company field staff, and insurance company back office staff, but it is not limited to this and the present disclosure does not limit this.

[0028] In some embodiments, since users with different identity permissions usually ask different types of questions to the pre-trained model, the pre-trained model can correspond users with different identities to different first databases to provide users with targeted answers and reduce the generation speed of the target natural language.

[0029] Among them, different first databases can store the same or different knowledge graph sets.

[0030] For example, for users with insurance company customer identity rights, as the core user group of insurance companies, insurance company customers usually have the most urgent needs for understanding, consulting, and purchasing products. Therefore, the first database corresponding to the insurance company customer rights can store knowledge graphs of entities such as the names, terms, instructions, and rates of products on sale / discontinued, so as to facilitate self-service consultation and purchase.

[0031] For example, users with insurance company fieldwork rights include telephone customer service, e-commerce customer service, and salespersons. They are the bridge between the company and customers. They usually have the most urgent needs for telephone work orders, obtaining agent script recommendations, and providing product consulting services. Therefore, the first database corresponding to the insurance company fieldwork rights can store knowledge graphs of entities such as names of on-sale / discontinued products, work orders, and scripts, so as to improve work efficiency and customer satisfaction.

[0032] For example, for users with internal staff identity permissions of insurance companies, including management positions, IT positions, etc., they are responsible for the daily operation and management of the company. They usually have the most urgent needs for company knowledge questions and answers, contract review and comparison, congratulatory reports, automatic generation of marketing copy, etc. Therefore, the first database corresponding to the internal staff permissions of insurance companies can store knowledge graphs of entities such as company knowledge, company data, and copy, so as to improve work efficiency and creativity.

[0033] In some embodiments, different tags can be assigned to the first database to match the first database with the user identity authority according to the tags on the database, but not before this, and the present disclosure does not limit the matching method.

[0034] In some embodiments, the pre-trained model can be any of the trained BERT, GPT series, RoBERTa, XL Ne, etc. models.

[0035] Step 102: determine the first key information based on the natural language of the question input by the user.

[0036] In some embodiments, the first key information may include a first entity in the question natural language and a first entity relationship between the first entities, but is not limited thereto.

[0037] In some optional embodiments, the pre-trained model may determine one or more first entities contained in the question natural language through a semantic segmentation algorithm, wherein the first entity refers to any entity in the question natural language.

[0038] In some optional embodiments, the pre-trained model may also determine the first entity relationship between the first entities based on the structure of the sentence containing the first entity and the semantic feature information of the first entity.

[0039] For example, if the natural language question is "What is the advantage of Product A over Product B?", the first entities of the natural language question may be "Product A" and "Product B", and the first entity relationship may be "The advantage is", thereby determining "Product A", "Product B" and "The advantage is" as the first key information of the natural language question.

[0040] Step 103: Generate candidate natural languages ​​based on the first database and the first key information using a pre-trained model.

[0041] In some embodiments, the pre-trained model can determine a knowledge graph corresponding to the first key information from a matching first database based on the determined first key information, thereby generating a candidate natural language based on the nodes and relationship edges in the knowledge graph.

[0042] For details, please refer to Figure 2The embodiments shown will not be described in detail here.

[0043] Step 104 : Based on the candidate natural languages, a target natural language is determined using preset rewriting rules.

[0044] In some embodiments, the generated candidate natural languages ​​can be scored in terms of similarity, language structure, etc., and the candidate natural languages ​​that meet the scoring requirements are output to the user as target natural languages; the candidate natural languages ​​that do not meet the scoring requirements are rewritten until the rewritten candidate natural languages ​​meet the scoring requirements, and the rewritten natural languages ​​that meet the scoring requirements are determined as the target natural languages, thereby improving the accuracy of the target natural languages.

[0045] In summary, according to the natural language processing method proposed in the present disclosure, the method includes: based on the user's identity authority, determining the first database in the pre-trained model that matches the identity authority; based on the natural language of the question input by the user, determining the first key information; based on the first database and the first key information, using the pre-trained model, generating candidate natural languages; based on the candidate natural languages, using preset rewriting rules, determining the target natural language. The method of the present disclosure can achieve targeted answers to different users by matching the first databases with different storage data for users with different identity authorities; by using preset rewriting rules to determine the target natural language, the accuracy of the target natural language can be improved.

[0046] Figure 2 A flowchart of a natural language processing method proposed in the present disclosure is further shown. Figure 1 The embodiment shown, Figure 2 The following steps are included.

[0047] Step 201, based on the identity authority of the user, determine the first database in the pre-trained model that matches the identity authority.

[0048] In some embodiments, the principle of step 201 is the same as that of the embodiment shown in step 101, and reference may be made to the above related description, which will not be repeated here.

[0049] Step 202: determine the first key information based on the natural language of the question input by the user.

[0050] In some optional embodiments, the pre-trained model may determine one or more first entities contained in the question natural language through a semantic segmentation algorithm, wherein the first entity refers to any entity in the question natural language.

[0051] Among them, the semantic segmentation algorithm is, for example, a hidden Markov algorithm, a conditional random field algorithm, etc., which determines the boundaries of each word in the problem natural language, thereby determining the first entity, but is not limited to this and the present disclosure does not limit this.

[0052] In some optional embodiments, the pre-trained model may also determine the first entity relationship between the first entities based on the structure of the sentence containing the first entity and the semantic feature information of the first entity.

[0053] Specifically, the first entity relationship between the first entities may be determined based on the structure of the sentence containing the first entity and using a preset recognition rule.

[0054] For example, the following rule may be set: the first entity relationship of the problem natural language satisfying the sentence pattern "Compared with A and B, the advantage is..." (ie, the sentence containing the first entity) is determined as a contrast relationship.

[0055] Specifically, the first entity relationship may also be determined based on the semantic feature information of the first entity. For example, the pre-trained model determines the semantic features of the first entity by using a support vector machine algorithm, a maximum entropy model algorithm, etc., thereby determining the first entity relationship.

[0056] Step 203: Based on the first entity in the first key information, a similarity matching algorithm is used to determine a knowledge graph node in the first database that matches the first entity.

[0057] In some embodiments, the similarity matching algorithm is, for example, a cosine similarity algorithm, a Simhash algorithm, etc., which is not limited in the present disclosure.

[0058] In some embodiments, by calculating the similarity between the first entity and each node in the knowledge graph, the knowledge graph node with the highest similarity to the first entity is determined as the knowledge graph node that matches the first entity, thereby improving the accuracy of the target natural language.

[0059] Step 204: Based on the knowledge graph nodes and the first entity relationship, determine the relationship edge in the first database that matches the entity relationship.

[0060] In some embodiments, by determining the knowledge graph nodes and the first entity relationship, the corresponding relationship edges are selected from the knowledge graph, so that the pre-trained model can obtain the logical relationship between the first entities, laying the foundation for generating candidate natural languages.

[0061] Step 205, based on the knowledge graph nodes and relationship edges, using the pre-trained model, generate candidate natural languages.

[0062] In some embodiments, the pre-trained model determines the logical relationship between each knowledge graph node through the knowledge graph nodes and relationship edges, thereby forming a complete semantic network based on the knowledge graph nodes and relationship edges, and then generates the selected natural language based on the semantic network.

[0063] Step 206: Determine the similarity score between the candidate natural language and the question natural language using a text similarity algorithm.

[0064] In some embodiments, the text similarity algorithm is, for example, a BERTScore algorithm, an STS algorithm, etc., which is not limited in the present disclosure.

[0065] In some embodiments, the similarity between the candidate natural language and the question natural language is determined by using a text similarity algorithm, thereby judging whether the candidate natural language is related to the question natural language to avoid giving irrelevant answers.

[0066] Step 207 : determining an information structure score of the candidate natural language based on the second entity of the candidate natural language and the second entity relationship between the second entities.

[0067] In some embodiments, by determining the positions of the second entity and the second entity relationship in the knowledge graph, it is possible to determine whether the nodes corresponding to the respective second entities can be connected in the knowledge graph through the relationship edges corresponding to the second entity relationship, thereby determining whether there is information missing in the candidate language. The more information missing there is, the lower the information structure score.

[0068] Step 208: Determine the fusion score of the candidate natural language based on the similarity score and the information structure score.

[0069] In some embodiments, a weighted sum of the similarity score and the information structure score may be performed to determine the fusion score of the candidate natural language.

[0070] Step 209: Determine the target natural language based on the fusion score.

[0071] In some embodiments, when the fusion score is greater than or equal to a preset evaluation value, the candidate natural language is determined as the target natural language.

[0072] In some embodiments, when the fusion score is less than a preset evaluation value, the candidate natural language is rewritten using a text editing algorithm until the fusion score of the rewritten candidate natural language is greater than or equal to the preset evaluation value, and the rewritten candidate natural language is determined as the target natural language.

[0073] Step 210: perform data preprocessing on the question natural language and the target natural language to obtain a first question-answer group.

[0074] In some embodiments, the pre-trained model may be further trained using the question natural language and the target natural language.

[0075] In some embodiments, preprocessing may include: data cleaning, labeling, verification, and management, etc., which is not limited in this disclosure.

[0076] In some embodiments, the preprocessed question natural language and target natural language may be packaged into a first question-answer group for use in subsequent model training.

[0077] Step 211: label the data of the first question and answer group.

[0078] In some embodiments, entities, entity relationships, user authority of asking questions, user satisfaction, etc. included in the first question and answer group may be labeled.

[0079] Step 212: Based on the labeled first question and answer group, perform data adjustment on the hyperparameters of the pre-trained model.

[0080] In some embodiments, the hyperparameters of the pre-trained model can be further adjusted using methods such as grid search, random search, or Bayesian optimization, and the adjusted pre-trained model can be further trained using the labeled first question-and-answer group so that the pre-trained model can understand the user's preferences more clearly.

[0081] In summary, the natural language processing method proposed in the present disclosure includes: based on the identity authority of the user, determining a first database in the pre-trained model that matches the identity authority; based on the question natural language input by the user, determining the first key information; based on the first entity in the first key information, using a similarity matching algorithm, determining a knowledge graph node in the first database that matches the first entity; based on the knowledge graph node and the first entity relationship, determining a relationship edge in the first database that matches the entity relationship; based on the knowledge graph node and the relationship edge, generating a candidate natural language using the pre-trained model; using a text similarity algorithm to determine a similarity score between the candidate natural language and the question natural language; based on the relationship between the second entity of the candidate natural language and the second entity, determining ... first entity, determining a similarity score between the candidate natural language and the question natural language; based on the relationship between the second entity of the candidate natural language and the first entity, determining a similarity score between the candidate natural language and the question natural language; based on the relationship between the second entity of the candidate natural language and the first entity, determining a knowledge graph node in the first database that matches the first entity The second entity relationship determines the language structure score of the candidate natural language; based on the similarity score and the language structure score, determines the fusion score of the candidate natural language; when the fusion score is greater than or equal to the preset evaluation value, determines the candidate natural language as the target natural language; when the fusion score is less than the preset evaluation value, rewrites the candidate natural language using a text editing algorithm until the fusion score of the rewritten candidate natural language is greater than or equal to the preset evaluation value, and determines the rewritten candidate natural language as the target natural language; performs data preprocessing on the question natural language and the target natural language to obtain a first question and answer group; performs data annotation on the first question and answer group; and performs data adjustment on the hyperparameters of the pre-trained model based on the annotated first question and answer group. The method disclosed in the present invention can achieve targeted answers to different users by matching a first database with different storage data for users with different identity permissions; determines the target natural language by using a preset rewriting rule, and can improve the accuracy of the target natural language; and further trains the pre-trained model based on the user's question and answer situation, which can further improve the accuracy of the target natural language.

[0082] Therefore, this solution has the following beneficial effects:

[0083] By matching the first database with different stored data for users with different identity permissions, targeted answers can be provided to different users; by utilizing preset rewriting rules to determine the target natural language, the accuracy of the target natural language can be improved.

[0084] Figure 3 FIG. 3 is a schematic diagram of a natural language processing device 300 provided in an embodiment of the present disclosure. Figure 3 As shown, the natural language processing device includes:

[0085] A matching unit 310 is used to determine a first database matching the identity authority in the pre-trained model based on the identity authority of the user;

[0086] An extraction unit 320 is used to determine the first key information based on the natural language of the question input by the user;

[0087] A first generating unit 330 is used to generate a candidate natural language based on the first database and the first key information using a pre-trained model;

[0088] The second generation unit 340 is used to determine the target natural language based on the candidate natural language using the preset rewriting rules.

[0089] In some embodiments of the present disclosure, the extraction unit 320 is also used to determine the first entity based on the natural language of the question using a semantic segmentation algorithm; determine the first entity relationship between the first entities based on the structure of the sentence containing the first entity using a preset recognition rule, and / or determine the first entity relationship based on the semantic feature information of the first entity; and determine the first entity and the first entity relationship as the first key information.

[0090] In some embodiments of the present disclosure, the first generation unit 330 is also used to determine, based on the first entity in the first key information, a knowledge graph node that matches the first entity in the first database using a similarity matching algorithm; based on the knowledge graph node and the first entity relationship, determine the relationship edge that matches the entity relationship in the first database; based on the knowledge graph nodes and the relationship edges, use a pre-trained model to generate a candidate natural language.

[0091] In some embodiments of the present disclosure, the second generation unit 330 is further used to determine the similarity score between the candidate natural language and the problem natural language by using a text similarity algorithm; determine the information structure score of the candidate natural language based on the second entity of the candidate natural language and the second entity relationship between the second entities; determine the fusion score of the candidate natural language based on the similarity score and the information structure score; when the fusion score is greater than or equal to a preset evaluation value, determine the candidate natural language as the target natural language; when the fusion score is less than the preset evaluation value, rewrite the candidate natural language by using a text editing algorithm until the fusion score of the rewritten candidate natural language is greater than or equal to the preset evaluation value, and determine the rewritten candidate natural language as the target natural language.

[0092] In some embodiments of the present disclosure, the second generation unit 330 is further used to perform data preprocessing on the question natural language and the target natural language to obtain a first question and answer group; to perform data labeling on the first question and answer group; and to perform data adjustment on the hyperparameters of the pre-trained model based on the labeled first question and answer group.

[0093] In some embodiments of the present disclosure, identity authority includes at least one of the following: insurance company customer authority, insurance company field authority, and insurance company back-office authority.

[0094] In summary, the natural language processing device proposed in the present disclosure includes: a matching unit, which is used to determine the first database in the pre-trained model that matches the identity authority based on the user's identity authority; an extraction unit, which is used to determine the first key information based on the natural language of the question input by the user using a semantic extraction algorithm; a first generation unit, which is used to generate candidate natural languages ​​based on the first database and the first key information using the pre-trained model; a second generation unit, which is used to determine the target natural language based on the candidate natural language using a preset rewriting rule. The device of the present disclosure can provide targeted answers to different users by matching the first databases with different storage data for users with different identity authorities; and can determine the target natural language by using the preset rewriting rules to improve the accuracy of the target natural language.

[0095] It should be noted that: when the natural language processing device provided in the above embodiment performs natural language processing, only the division of the above-mentioned program modules is used as an example. In actual applications, the above-mentioned processing can be assigned to different program modules as needed, that is, the internal structure of the natural language processing device is divided into different program modules to complete all or part of the processing described above.

[0096] Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation of the method is also applicable to the device provided in the embodiment and will not be described in detail in this embodiment.

[0097] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.

[0098] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the electronic device 400 includes at least one processor 402; and a memory 401 communicatively connected to the at least one processor 402; wherein the memory 401 stores instructions executable by the at least one processor 402, and the instructions are executed by the at least one processor 402 to implement the steps of the natural language processing method described in the embodiment of the present disclosure; or, the instructions are executed by the at least one processor 402 to implement the steps of the natural language processing method described in the embodiment of the present disclosure.

[0099] It is understood that the electronic device also includes a communication interface. The various components in the electronic device are coupled together through a bus system. It is understood that the bus system is used to achieve connection and communication between these components. In addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus.

[0100] It can be understood that the memory 401 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM).The memory 401 described in this embodiment of the present solution is intended to include, but is not limited to, these and any other suitable types of memory.

[0101] The method disclosed in the above embodiment of the present disclosure may be applied to the processor 402, or implemented by the processor 402. The processor 402 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 402 or an instruction in the form of software.

[0102] The processor 402 described above may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 402 may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this solution. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of this solution, it may be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a storage medium, which is located in the memory 401, and the processor 402 reads the information in the memory 401 and completes the steps of the aforementioned method in combination with its hardware.

[0103] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), FPGA, general purpose processor, controller, MCU, microprocessor, or other electronic components to execute the aforementioned method.

[0104] The embodiment of the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to implement the steps of the natural language processing method described in the embodiment of the present solution when the computer instructions are executed.

[0105] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0106] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present solution. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0107] Any process or method description in the flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiment of the present scheme includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present scheme belong.

[0108] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.

[0109] It should be understood that the various parts of the implementation of the present solution can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned implementation, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another implementation, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0110] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0111] In addition, each functional unit in each embodiment of the present solution can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0112] Although the implementation methods of the present scheme have been shown and described above, it can be understood that the above implementation methods are exemplary and cannot be understood as limitations on the present scheme. Ordinary technicians in this field can change, modify, replace and modify the above implementation methods within the scope of the present scheme.

Claims

1. A natural language processing method, characterized in that: The method comprises: Based on the identity authority of the user, determining a first database in the pre-trained model that matches the identity authority; Determine the first key information based on the natural language of the question input by the user; Based on the first database and the first key information, using a pre-trained model, generating a candidate natural language; Based on the candidate natural languages, a target natural language is determined using preset rewriting rules.

2. The method according to claim 1, characterized in that The determining of the first key information based on the natural language of the question input by the user includes: Based on the natural language of the question, using a semantic segmentation algorithm, determining a first entity; Determining a first entity relationship between the first entities based on a structure of a sentence containing the first entity using a preset recognition rule, and / or determining the first entity relationship based on semantic feature information of the first entity; The first entity and the first entity relationship are determined as the first key information.

3. The method according to claim 1, characterized in that The generating a candidate natural language based on the first database and the first key information by using a pre-trained model comprises: Based on the first entity in the first key information, using a similarity matching algorithm, determine a knowledge graph node in the first database that matches the first entity; Based on the knowledge graph node and the first entity relationship, determine a relationship edge in the first database that matches the entity relationship; Based on the knowledge graph nodes and the relationship edges, candidate natural languages ​​are generated using the pre-trained model.

4. The method according to claim 1, characterized in that The determining of the target natural language based on the candidate natural language and using a preset rewriting rule comprises: Determine a similarity score between the candidate natural language and the question natural language using a text similarity algorithm; Determining a language structure score of the candidate natural language based on a second entity of the candidate natural language and a second entity relationship between the second entity; Determining a fusion score of the candidate natural language based on the similarity score and the language structure score; When the fusion score is greater than or equal to a preset evaluation value, determining the candidate natural language as the target natural language; When the fusion score is less than a preset evaluation value, the candidate natural language is rewritten using a text editing algorithm until the fusion score of the rewritten candidate natural language is greater than or equal to the preset evaluation value, and the rewritten candidate natural language is determined as the target natural language.

5. The method according to claim 1, characterized in that The method further comprises: Performing data preprocessing on the question natural language and the target natural language to obtain a first question-answer group; Performing data annotation on the first question-and-answer group; Based on the labeled first question-answer group, data adjustment is performed on the hyperparameters of the pre-trained model.

6. The method according to claim 1, characterized in that The identity authority includes at least one of the following: insurance company customer authority, insurance company field authority and insurance company internal authority.

7. A natural language processing device, characterized in that: The device comprises: A matching unit, configured to determine, based on the identity authority of the user, a first database in the pre-trained model that matches the identity authority; An extraction unit, configured to determine first key information based on the natural language of the question input by the user; A first generating unit, configured to generate a candidate natural language using a pre-trained model based on the first database and the first key information; The second generating unit is used to determine a target natural language based on the candidate natural languages ​​by using a preset rewriting rule.

8. An electronic device, characterized in that: include: a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the method described in any one of claims 1-6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.