Insurance field automatic question-answering method and device based on large model, equipment and medium
The automatic question-answering method using a large model addresses data integration challenges in the insurance industry by enabling real-time data retrieval through entity recognition and SQL query generation, enhancing data analysis accuracy and timeliness.
Patent Information
- Application Number
- CN202411374071.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
AI Technical Summary
The insurance industry faces challenges in integrating and analyzing scattered data across different systems, leading to delayed and inaccurate data analysis due to reliance on big data engineers for timely data retrieval.
An automatic question-answering method using a large model that performs entity recognition, updates entity values, and generates SQL queries from natural language inputs to facilitate real-time data retrieval.
Enables business personnel to obtain accurate data in real-time, reducing dependence on big data engineers and improving the timeliness and accuracy of analysis results.
Smart Images

Figure CN119202194A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing technology, and in particular to an automatic question-answering method, device, equipment and medium in the insurance field based on a large model. Background Art
[0002] In the era of big data, the insurance industry has accumulated a large amount of data on operations, organizational development, and human resources management. However, these data are scattered in different systems and departments, and the data standards of different systems are not unified, making it difficult to integrate and analyze the data. At the same time, when analyzing data, business managers usually need to rely on the support of big data engineers, and cannot obtain the required data in a timely manner, affecting the timeliness of the results analysis.
[0003] How to mine and analyze these data conveniently and quickly to provide data support and reference for current business decisions has become crucial. However, at present, most applications based on form question and answer focus on the query of single-point knowledge, which undoubtedly brings huge challenges to user-side business analysis. Summary of the invention
[0004] Based on this, the present invention provides an automatic question-answering method, device, equipment and medium in the insurance field based on a large model to solve the problem that business personnel cannot obtain accurate data results in a timely manner through natural language interaction.
[0005] In a first aspect, an embodiment of the present invention provides an automatic question answering method in the insurance field based on a large model, the method comprising:
[0006] Obtaining an insurance-domain query text input by a user, and performing entity recognition on the insurance-domain query text using a pre-trained entity extraction model to obtain at least one target entity, wherein each target entity includes an entity type and an input entity value;
[0007] Link all target entities to the pre-built entity link database, and update the input entity value in each target entity to the standard entity value;
[0008] Input the insurance query text and the updated target entities as query content into the pre-trained instruction generation model;
[0009] Determine the standard business questions corresponding to the query content through the instruction generation model, and obtain the target SQL query statement matching the standard business questions through at least one round of interaction with the report database;
[0010] The query result matching the target SQL query statement is obtained from the report database, and the query result is fed back to the user.
[0011] In a second aspect, an embodiment of the present invention provides an automatic question-answering device in the insurance field based on a large model, the device comprising:
[0012] An entity recognition module is used to obtain an insurance field query text input by a user, and use a pre-trained entity extraction model to perform entity recognition on the insurance field query text to obtain at least one target entity, wherein each target entity includes an entity type and an input entity value;
[0013] An entity value update module is used to link all target entities to a pre-built entity link database and update the input entity value in each target entity to a standard entity value;
[0014] A query content input module is used to input the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model;
[0015] The SQL query statement acquisition module is used to determine the standard business question corresponding to the query content through the instruction generation large model, and obtain the target SQL query statement matching the standard business question through at least one round of interaction with the report database;
[0016] The query result acquisition module is used to acquire the query result matching the target SQL query statement from the report database and feed back the query result to the user.
[0017] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute an automatic question-answering method in the insurance field based on a big model as described in any embodiment of the present invention.
[0021] In a fourth aspect, a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement an automatic question-answering method in the insurance field based on a large model as described in any embodiment of the present invention when executed.
[0022] The technical solution of the embodiment of the present invention allows business management personnel to raise query requests in the form of natural language, and automatically convert them into SQL statements for database retrieval, reducing dependence on big data engineers, enabling business personnel to obtain data in real time, improving the timeliness and accuracy of analysis results, and providing effective data support and reference for business plan formulation and operational decision-making; secondly, through named entity recognition technology, entity values (such as time, place, organization name, etc.) in user questions are automatically identified and extracted, so as to more accurately understand the context of the question and the problem requirements.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 is a flow chart of an automatic question-answering method in the insurance field based on a large model provided according to the first embodiment of the present invention;
[0026] Figure 2 is a flow chart of another automatic question-answering method in the insurance field based on a large model provided according to the second embodiment of the present invention;
[0027] Figure 3 is a structural diagram of an automatic question-answering device in the insurance field based on a large model provided according to Embodiment 3 of the present invention;
[0028] Figure 4 It is a structural schematic diagram of an electronic device for implementing an automatic question-answering method in the insurance field based on a large model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment 1
[0032] Figure 1 This is a flowchart of an automatic question-answering method in the insurance field based on a big model provided in the first embodiment of the present invention. This embodiment can be applied to the situation where business personnel can obtain accurate data results in a timely manner in a natural language question-asking interactive mode. The method can be executed by an automatic question-answering device in the insurance field based on a big model. The device can be implemented in the form of hardware and / or software, and the device can be configured in the internal server of an insurance company. Figure 1 As shown, the method includes:
[0033] S110, obtaining an insurance field query text input by a user, and performing entity recognition on the query text using a pre-trained entity extraction model to obtain at least one target entity, wherein each target entity includes an entity type and an input entity value.
[0034] The query text in the insurance field is the question sentence entered by the user in the query input box. The pre-trained entity extraction model obtains multiple target entities by recognizing the query text entered by the user. In a specific example, the query text entered by the user is as follows: "Comparison of the insurance premiums of the Pudong Avenue Branch of the Bank of China and the Fenglin Branch of the Agricultural Bank of China in March". The entity types refer to 'branch name', 'time' and 'indicator name', and the input entity values under the entity type of 'branch name' are: 'Pudong Avenue Branch of the Bank of China' and
[0035] 'Agricultural Bank Fenglin Branch'; the input entity value under the entity type of "time" is 'March'; the input entity value under the entity type of 'indicator name' is 'premium'. Therefore, a target entity can refer to a set of entity types and an input entity value.
[0036] S120: Link all target entities to a pre-built entity link database, and update the input entity value in each target entity to a standard entity value.
[0037] The pre-built entity link database contains a mapping relationship between entity types and standard entity values. For example, in the entity link database, under the entity type of 'branch name', the standard entity value corresponding to the input entity value 'BOC Pudong Avenue Branch' may be 'Bank of China Shanghai Pudong Avenue Branch'.
[0038] S130: Input the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model.
[0039] The updated target entity is the target entity after the input entity value is corrected. The query content is used as an input prompt to the pre-trained instruction generation model, which can automatically generate possible standard business questions that match the query content and corresponding SQL query statements.
[0040] Optionally, before inputting the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model, the following may also be included:
[0041] Collect historical conversation records of users in the insurance field, and perform semantic analysis on the historical conversation records based on the specified data structure to obtain multiple professional terms and synonyms similar to each professional term, and store them in a synonym thesaurus of proper nouns to construct a domain professional term thesaurus module;
[0042] By counting the business problems with a frequency higher than a preset frequency threshold in the historical conversation data, the business problems are extracted and converted into high-dimensional vectors, and stored in a vector retrieval library to construct a query embedding module;
[0043] The table name, entity type and standard entity value in each table data are extracted in the report database, and a mapping relationship is constructed between the table name, entity type and standard entity value, and the mapping relationship is stored in the entity link database to construct an entity embedding module.
[0044] In an embodiment of the present invention, an efficient data structure, such as a Trie tree, can be used to store professional terms and synonyms similar to each professional term. By identifying the professional terms in the query text input by the user and performing semantic analysis and matching, the accuracy of question understanding and recall efficiency can be further improved.
[0045] The high-dimensional vector in the query embedding module can represent the semantic information of the question, so that the large model can retrieve known questions that are semantically similar to the query text currently input by the user, thereby quickly locating the data table and SQL query statement.
[0046] The entity embedding module uses the trained named entity recognition model to extract input entity values from the query text entered by the user. This is the prerequisite for understanding user intentions and performing data retrieval. After replacing the input entity values with standard entity values according to the mapping relationship, it can match the accurate data table and SQL query statement, accurately corresponding to the user's query needs.
[0047] S140, generating a large model through instructions to determine a standard business question corresponding to the query content, and obtaining a target SQL query statement matching the standard business question by performing at least one round of interaction with a report database.
[0048] In actual scenarios, the query text entered by the user tends to be colloquial or does not use domain-specific professional vocabulary. Therefore, it is impossible to directly obtain a valid SQL query statement for calling relevant data in the report database based on the query text. Standard business questions, as a verified and standardized expression of input text, can accurately understand the user's query intention and match the corresponding target SQL query statement to locate the relevant data table in the report database.
[0049] Furthermore, the generation of a large model through instructions to determine standard business questions corresponding to the query content may include:
[0050] The large model generated by the instruction inputs the query content into the domain professional terminology vocabulary module, entity embedding module and entity embedding module, which are pre-assigned with weight values, respectively, to perform business problem recall;
[0051] The recall score of each business problem obtained by the recall under each module is calculated through the instruction generation model, and the business problem with the highest score is determined as the standard business problem.
[0052] In order to more accurately improve the accuracy of SQL query statement generation, different weights will be pre-set for the above three recall methods according to specific business needs, and the three recall methods will be used to recall business questions for the input query content respectively. The recall score under each recall method is obtained by weighted summation, so as to determine the standard business questions most relevant to the query content.
[0053] S150: Obtain query results matching the target SQL query statement from the report database, and feed back the query results to the user.
[0054] Furthermore, the method may further include:
[0055] Acquire new conversation records of the user within a certain period, and extract new query texts of the user from the new conversation records;
[0056] The new query text is extracted into multiple strings using the n-gram model, and the distribution entropy values of the left and right neighboring characters of each target string are calculated respectively. The higher the distribution entropy value, the higher the degree of freedom.
[0057] Divide each string into multiple combination pairs, obtain the probability of each word appearing alone and the probability of two words appearing together in each combination pair, and calculate the mutual information value between the word segments, where the higher the mutual information value, the higher the degree of solidification;
[0058] According to the preset freedom degree threshold and solidification degree threshold, the character strings reaching the two thresholds in the new query text are determined as potential new words and stored in the proper noun synonym thesaurus and the entity link database.
[0059] In the embodiment of the present invention, in order to enrich the automatic learning function of the large model, an automatic discovery mechanism for new domain words is added, and a scheduled task automatically analyzes the new conversations of users within a certain period. Specifically, the new word discovery mechanism extracts multiple strings from a large amount of corpus, takes each string as a candidate word, counts the entropy of the left and right neighbor distributions of each candidate word, and takes the smaller distribution entropy as the final degree of freedom of the candidate word, which is usually expressed as degree of freedom = min (left entropy, right entropy).
[0060] Mutual information represents the correlation between two words, that is, the probability that the two words together are represented as an acceptable common word. In a specific example, the target string is represented by 'abcd', then the target string can be split into different combination pairs, such as ('a', 'bcd');
[0061] ('ab','cd'); ('abc','d'), calculate the mutual information value of each combination pair, and finally take the combination pair with the smallest mutual information value as the solidification degree of the target string.
[0062] By comparing the calculated degree of freedom and degree of solidification of the target character string with the preset degree of freedom threshold and degree of solidification threshold, it is generally believed that the higher the degree of solidification threshold is, the greater the possibility of becoming a new word. Similarly, the higher the degree of freedom threshold is, the greater the possibility of becoming a new word. Words judged as potential new words are stored in the proper noun synonym thesaurus and entity link database to ensure the continuous optimization of the large model.
[0063] The embodiments of the present invention allow business management personnel to raise query requests in the form of natural language, and automatically convert them into SQL statements for database retrieval, thereby reducing dependence on big data engineers and enabling business personnel to obtain data in real time, thereby improving the timeliness and accuracy of analysis results while providing effective data support and reference for business plan formulation and operational decision-making; secondly, through named entity recognition technology, entity values (such as time, place, organization name, etc.) in user questions are automatically identified and extracted, so as to more accurately understand the context of the question and the problem requirements.
[0064] Embodiment 2
[0065] Figure 2 This is a flowchart of another automatic question-answering method in the insurance field based on a large model provided in the second embodiment of the present invention. This embodiment is refined based on the above embodiment. Figure 2 As shown, the method specifically includes:
[0066] S210, obtaining an insurance field query text input by a user, and performing entity recognition on the query text using a pre-trained entity extraction model to obtain at least one target entity, wherein each target entity includes an entity type and an input entity value.
[0067] S220: When it is determined that the current input entity value in the current target entity exists in the entity link database, the current input entity value is determined as the standard entity value in the current target entity.
[0068] S230. When it is determined that the current input entity value does not exist in the current target entity in the entity link database, a pre-built proper noun synonym thesaurus is used to perform a synonym match for the current input entity value, and the matched entity value is determined as the standard entity value in the current target entity.
[0069] Steps S220-S230 are mapping instructions for the target entity. By comparing the input entity value in the target entity with the entity value pre-stored in the entity link library, it is determined whether the input entity value can be directly used as the standard entity value. If the comparison is consistent, it is directly used as the standard entity value. If it is inconsistent, the input entity value in the target entity is replaced with the standard entity value corresponding to the input entity value.
[0070] S240: Input the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model.
[0071] Optionally, while inputting the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model, it also includes:
[0072] Recalling a set number of sample templates similar to the query text in the insurance field based on a retrieval enhancement generation algorithm;
[0073] The instruction generates a large model to determine a standard business question corresponding to the query content, further comprising:
[0074] A large model is generated through instructions, using the set number of sample templates and the pre-built table structure template as context information to determine standard business questions corresponding to the query content.
[0075] The retrieval enhancement algorithm is used to improve the matching accuracy between the query text and the standard business questions. Specifically, the sample template refers to a number of standardized question texts similar to the query text that are recalled. The number of sample templates can be preset in advance according to demand. The table structure template is a pre-written prompt template, which contains the table structure information, field information and the standard SQL query statement corresponding to each standardized question text in the recalled report database. Several sample templates and table structure templates are input into the instruction generation model as context information. The instruction generation model uses the context information as an example to infer the standardized question text that best matches the query text, that is, the standard business question.
[0076] S250, generating a large model through instructions based on a pre-built mapping relationship table between business questions and SQL query statements, and obtaining a standard SQL query statement matching the standard business question.
[0077] S260, using a standard SQL query statement to perform a pre-query in the report database. If an execution error occurs during the pre-query process, the error information returned in the report database is obtained, and the error type and the error position of the original SQL query statement are identified according to the error information.
[0078] In specific instances, common error types include: syntax errors, table or field non-existence, data type mismatch, etc. By analyzing the returned error information, the big model can locate the erroneous part of the original SQL query statement.
[0079] S270: Generate an error correction suggestion based on the error type, and generate a new standard SQL query statement according to the error location and the error correction suggestion.
[0080] For syntax errors, the big model will provide suggestions for correcting keywords or punctuation marks in SQL query statements; for table or field name errors that do not exist, the big model will provide correct field names or recommend similar field names through the metadata of the report database; for data type errors, the big model will provide corresponding data type conversion suggestions.
[0081] S280 , returning to step S260 , until no execution error occurs during the pre-query process, and determining the current standard SQL query statement as the target SQL query statement.
[0082] The big model will automatically correct the original standard SQL query statement based on the error correction suggestions, and reconstruct a new standard SQL query statement that conforms to the grammatical specifications, submit the corrected new standard SQL query statement to the report database for execution again, and confirm the query result again. If an error is reported again, the above process will be repeated until the new standard SQL query statement is correct and successfully executed. Among them, the maximum number of error corrections can be preset for the above adaptive SQL error correction mechanism to improve the execution efficiency of the query.
[0083] The technical solution of the embodiment of the present invention specifically illustrates the retrieval enhancement algorithm and the potential new word discovery mechanism by refining the overall solution. Since the general large language model may have insufficient knowledge depth in specific fields, a small number of domain-specific samples are used as examples to provide the large model with necessary context information, thereby improving the generalization ability of the large model and the question-and-answer efficiency of the large model in the insurance field. Finally, by constructing a proprietary knowledge base, a potential new word discovery strategy, and entity link enhancement methods, the ability to understand specific terms and concepts in the insurance field is improved, the interaction effect is improved, and the user question-and-answer experience is improved.
[0084] Embodiment 3
[0085] Figure 3 This is a schematic diagram of the structure of a conduction test troubleshooting device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0086] The entity recognition module 310 is used to obtain the insurance field query text input by the user, and use the pre-trained entity extraction model to perform entity recognition on the insurance field query text to obtain at least one target entity, wherein each target entity includes an entity type and an input entity value;
[0087] An entity value updating module 320 is used to link all target entities to a pre-built entity link database and update the input entity value in each target entity to a standard entity value;
[0088] The query content input module 330 is used to input the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model;
[0089] The SQL query statement acquisition module 340 is used to determine the standard business question corresponding to the query content through the instruction generation large model, and obtain the target SQL query statement matching the standard business question through at least one round of interaction with the report database;
[0090] The query result acquisition module 350 is used to acquire the query result matching the target SQL query statement from the report database and feed back the query result to the user.
[0091] The embodiments of the present invention allow business management personnel to raise query requests in the form of natural language, and automatically convert them into SQL statements for database retrieval, thereby reducing dependence on big data engineers and enabling business personnel to obtain data in real time, thereby improving the timeliness and accuracy of analysis results while providing effective data support and reference for business plan formulation and operational decision-making; secondly, through named entity recognition technology, entity values (such as time, place, organization name, etc.) in user questions are automatically identified and extracted, so as to more accurately understand the context of the question and the problem requirements.
[0092] Based on the above embodiments, the entity value updating module 320 includes:
[0093] A first standard entity value determination unit, configured to determine the current input entity value as the standard entity value in the current target entity when it is determined that the current input entity value in the current target entity exists in the entity link database;
[0094] The second standard entity value determination unit is used to use a pre-built proper noun synonym thesaurus to perform synonym matching for the current input entity value when it is determined that the current input entity value in the current target entity does not exist in the entity link database, and determine the matched entity value as the standard entity value in the current target entity.
[0095] On the basis of the above embodiments, it further includes a recall module construction unit, which is used to collect historical conversation records of users in the insurance field before inputting the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model, and perform semantic analysis on the historical conversation records based on the specified data structure to obtain multiple professional terms and synonyms similar to each professional term, and store them in a special noun synonym word library to construct a domain professional term word library module;
[0096] By counting the business problems with a frequency higher than a preset frequency threshold in the historical conversation data, the business problems are extracted and converted into high-dimensional vectors, and stored in a vector retrieval library to construct a query embedding module;
[0097] The table name, entity type and standard entity value in each table data are extracted in the report database, and a mapping relationship is constructed between the table name, entity type and standard entity value, and the mapping relationship is stored in the entity link database to construct an entity embedding module.
[0098] Based on the above embodiments, the SQL query statement acquisition module 340 may include:
[0099] A business question recall unit is used to generate a large model through instructions to input the query content into the domain professional terminology word library module, the entity embedding module and the entity embedding module, which are pre-assigned with weight values, respectively, to perform business question recall;
[0100] The standard business problem determination unit is used to generate a large model through instructions to calculate the recall score of each business problem obtained by the recall under each module, and determine the business problem with the highest score as the standard business problem.
[0101] On the basis of the above embodiments, it further includes a sample template recall unit, which is used to input the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model, and recall a set number of sample templates similar to the insurance field query text based on the retrieval enhancement generation algorithm;
[0102] Optionally, the SQL query statement acquisition module 340 further includes:
[0103] The context information introduction unit is used to generate a large model through instructions, use the set number of sample templates and the pre-built table structure template as context information, and determine the standard business questions corresponding to the query content.
[0104] Based on the above embodiments, the SQL query statement acquisition module 340 may further include:
[0105] A mapping relationship table query unit, used to generate a mapping relationship table between a large model based on pre-built business questions and SQL query statements through instructions, and obtain a standard SQL query statement matching the standard business question;
[0106] The error information returning unit is used to perform a pre-query in the report database using a standard SQL query statement. If an execution error occurs during the pre-query process, the error information returned in the report database is obtained, and the error type and the error position of the original SQL query statement are identified according to the error information;
[0107] A standard SQL query statement correction unit, used to generate an error correction suggestion based on the error type, and generate a new standard SQL query statement according to the error location and the error correction suggestion;
[0108] The target SQL query statement determination unit is used to return to the operation of performing a pre-query in the table report database using a standard SQL query statement until no execution error occurs during the pre-query process, and determine the current standard SQL query statement as the target SQL query statement.
[0109] Based on the above embodiments, it further includes a potential new word determination unit, which is used to obtain the user's newly added conversation records within a certain period, and extract the user's new query text from the newly added conversation records;
[0110] The new query text is extracted into multiple strings using the n-gram model, and the distribution entropy values of the left and right neighboring characters of each target string are calculated respectively. The higher the distribution entropy value, the higher the degree of freedom.
[0111] Divide each string into multiple combination pairs, obtain the probability of each word appearing alone and the probability of two words appearing together in each combination pair, and calculate the mutual information value between the word segments, where the higher the mutual information value, the higher the degree of solidification;
[0112] According to the preset freedom degree threshold and solidification degree threshold, the character strings reaching the two thresholds in the new query text are determined as potential new words and stored in the proper noun synonym thesaurus and the entity link database.
[0113] An automatic question-answering method device in the insurance field based on a big model provided in an embodiment of the present invention can execute an automatic question-answering method device in the insurance field based on a big model provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0114] Embodiment 4
[0115] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0116] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0117] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0118] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as an automatic question-answering method in the insurance field based on a large model.
[0119] That is: obtaining the insurance field query text input by the user, and using the pre-trained entity extraction model to perform entity recognition on the query text to obtain at least one target entity, wherein each target entity contains an entity type and an input entity value;
[0120] Link all target entities to the pre-built entity link database, and update the input entity value in each target entity to the standard entity value;
[0121] Input the insurance query text and the updated target entities as query content into the pre-trained instruction generation model;
[0122] Determine the standard business questions corresponding to the query content through the instruction generation model, and obtain the target SQL query statement matching the standard business questions through at least one round of interaction with the report database;
[0123] The query result matching the target SQL query statement is obtained from the report database, and the query result is fed back to the user.
[0124] In some embodiments, a method for automatic question answering in the insurance field based on a big model may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for automatic question answering in the insurance field based on a big model described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a method for automatic question answering in the insurance field based on a big model in any other appropriate manner (e.g., by means of firmware).
[0125] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0127] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0129] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0130] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0131] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0132] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An automatic question answering method in the insurance field based on a large model, characterized by: include: Obtaining an insurance-domain query text input by a user, and performing entity recognition on the insurance-domain query text using a pre-trained entity extraction model to obtain at least one target entity, wherein each target entity includes an entity type and an input entity value; Link all target entities to the pre-built entity link database, and update the input entity value in each target entity to the standard entity value; Input the insurance query text and the updated target entities as query content into the pre-trained instruction generation model; Determine the standard business questions corresponding to the query content through the instruction generation model, and obtain the target SQL query statement matching the standard business questions through at least one round of interaction with the report database; The query result matching the target SQL query statement is obtained from the report database, and the query result is fed back to the user.
2. The method according to claim 1, characterized in that: Link all target entities to the pre-built entity link database, and update the input entity value in each target entity to the standard entity value, including: When it is determined that the current input entity value in the current target entity exists in the entity link database, the current input entity value is determined as the standard entity value in the current target entity; When it is determined that the current input entity value does not exist in the current target entity in the entity link database, a pre-built proper noun synonym thesaurus is used to perform synonym matching for the current input entity value, and the matched entity value is determined as the standard entity value in the current target entity.
3. The method according to claim 1, characterized in that: Before the insurance query text and the updated target entities are input as query content into the pre-trained instruction generation model, the following steps are also included: Collect historical conversation records of users in the insurance field, and perform semantic analysis on the historical conversation records based on the specified data structure to obtain multiple professional terms and synonyms similar to each professional term, and store them in a synonym thesaurus of proper nouns to construct a domain professional term thesaurus module; By counting the business problems with a frequency higher than a preset frequency threshold in the historical conversation data, the business problems are extracted and converted into high-dimensional vectors, and stored in a vector retrieval library to construct a query embedding module; The table name, entity type and standard entity value in each table data are extracted in the report database, and a mapping relationship is constructed between the table name, entity type and standard entity value, and the mapping relationship is stored in the entity link database to construct an entity embedding module.
4. The method according to claim 3, characterized in that Generate a large model through instructions to determine the standard business questions corresponding to the query content, including: The large model generated by the instruction inputs the query content into the domain professional terminology vocabulary module, entity embedding module and entity embedding module, which are pre-assigned with weight values, respectively, to perform business problem recall; The recall score of each business problem obtained by the recall under each module is calculated through the instruction generation model, and the business problem with the highest score is determined as the standard business problem.
5. The method according to any one of claims 1 to 4, characterized in that: When the insurance query text and the updated target entities are input into the pre-trained instruction generation model as query content, it also includes: Recalling a set number of sample templates similar to the query text in the insurance field based on a retrieval enhancement generation algorithm; The instruction generates a large model to determine a standard business question corresponding to the query content, further comprising: A large model is generated through instructions, using the set number of sample templates and the pre-built table structure template as context information to determine standard business questions corresponding to the query content.
6. The method according to claim 1, characterized in that Generate a large model through instructions. By interacting with the report database for at least one round, obtain the target SQL query statement that matches the standard business problem, including: Generate a large model through instructions based on a pre-built mapping relationship table between business questions and SQL query statements, and obtain a standard SQL query statement that matches the standard business question; Use standard SQL query statements to pre-query in the report database. If an execution error occurs during the pre-query process, obtain the error information returned in the report database and identify the error type and the error location of the original SQL query statement based on the error information. Generate error correction suggestions based on the error type, and generate new standard SQL query statements according to the error location and the error correction suggestions; Return to the operation of performing a pre-query in the table report database using a standard SQL query statement until no execution error occurs during the pre-query process, and the current standard SQL query statement is determined as the target SQL query statement.
7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquire new conversation records of the user within a certain period, and extract new query texts of the user from the new conversation records; The new query text is extracted into multiple strings using the n-gram model, and the distribution entropy values of the left and right neighboring characters of each target string are calculated respectively. The higher the distribution entropy value, the higher the degree of freedom. Divide each string into multiple combination pairs, obtain the probability of each word appearing alone and the probability of two words appearing together in each combination pair, and calculate the mutual information value between the word segments, where the higher the mutual information value, the higher the degree of solidification; According to the preset freedom degree threshold and solidification degree threshold, the character strings reaching the two thresholds in the new query text are determined as potential new words and stored in the proper noun synonym thesaurus and the entity link database.
8. An automatic question-answering device in the insurance field based on a large model, characterized in that: include: An entity recognition module is used to obtain an insurance field query text input by a user, and use a pre-trained entity extraction model to perform entity recognition on the insurance field query text to obtain at least one target entity, wherein each target entity includes an entity type and an input entity value; An entity value update module is used to link all target entities to a pre-built entity link database and update the input entity value in each target entity to a standard entity value; A query content input module is used to input the insurance field query text and the updated target entities as query content into the pre-trained instruction generation model; The SQL query statement acquisition module is used to determine the standard business question corresponding to the query content through the instruction generation large model, and obtain the target SQL query statement matching the standard business question through at least one round of interaction with the report database; The query result acquisition module is used to acquire the query result matching the target SQL query statement from the report database and feed back the query result to the user.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute an automatic question-answering method in the insurance field based on a big model as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement an automatic question-answering method in the insurance field based on a large model as described in any one of claims 1 to 7 when executed.
Citation Information
Cited By
Automatic Excel analysis result visualization method based on LLM natural language processing
CN119513160A
Question and answer model-based business query method, apparatus and device, medium and product
CN119691138A
