Claim clause text generation method and device, electronic equipment and storage medium
By obtaining sample claims terms and scoring data, filtering and training the scoring model, generating and splicing claims terms text, the problem of inefficient generation of claims terms in the existing technology is solved, and efficient and high-quality claims terms text generation is achieved.
Patent Information
- Application Number
- CN202411274281.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, the efficiency of manually generating claims clauses is inefficient, resulting in low efficiency in the generation of processing rules and measures in complex claims scenarios.
By obtaining sample claims terms and sample scoring data, filtering reference claims terms and training preset terms scoring models, generating target terms scoring models, and training claims terms generation models in combination with the initial terms generation prompts to achieve efficient generation and splicing of claims terms.
It improves the efficiency and quality of the generation of claims clauses, realizes the efficient generation of claims clause texts, and enhances the perception of claims clause scores and generation models.
Smart Images

Figure CN119271797A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of text generation, and in particular to a method and device for generating a claim clause text, an electronic device, and a storage medium. Background Art
[0002] A claim text is a text that includes claim terms. The claim terms elaborate on the processing rules and measures in different claim scenarios. These processing rules and measures are complex, resulting in low efficiency in manually generating claim terms. Therefore, how to improve the efficiency of generating claim terms has become an urgent problem to be solved. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a method and device for generating a claim clause text, an electronic device and a storage medium, aiming to improve the efficiency of generating claim clauses.
[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a method for generating a claim clause text, the method comprising:
[0005] Obtaining sample claim terms and sample scoring data of the sample claim terms; wherein the sample scoring data is used to indicate the compliance of the sample claim terms;
[0006] Screening the sample claim terms to obtain reference claim terms, acquiring the sample scoring data of the reference claim terms, and obtaining reference scoring data;
[0007] Training a preset clause scoring model according to the reference claim clause and the reference scoring data to obtain a target clause scoring model;
[0008] Obtaining an initial clause generation prompt, and training a preset claim clause generation model through the target clause scoring model and the initial clause generation prompt to obtain a target claim clause generation model; wherein the initial clause generation prompt is used to instruct the preset claim clause to generate the reference claim clause;
[0009] Obtaining a target clause generation task, and generating clauses through the target claim clause generation model and the target clause generation task to obtain a target claim clause;
[0010] The target claim terms and the preset general claim terms are concatenated to obtain a claim terms text.
[0011] In some embodiments, keyword matching is performed on the sample claim clause to obtain keyword matching information;
[0012] Performing semantic recognition on the sample claim clause to obtain semantic recognition information;
[0013] The sample claim terms are screened according to the keyword matching information and the semantic recognition information to obtain the reference claim terms.
[0014] In some embodiments, semantic recognition is performed on the sample claim clause to obtain semantic recognition information, including:
[0015] Vectorizing the sample claim clauses to obtain vectorized text information;
[0016] Performing semantic understanding on the vectorized text information to obtain text semantic information;
[0017] Performing text clustering according to the text semantic information to obtain text clustering information;
[0018] The text clustering information is subjected to topic extraction to obtain the semantic recognition information.
[0019] In some embodiments, keyword matching is performed on the sample claim clause to obtain keyword matching information, including:
[0020] Perform keyword recognition on the sample claim clauses to obtain claim clause keywords;
[0021] Keyword matching is performed based on the claim clause keywords and a preset general clause database to obtain the keyword matching information.
[0022] In some embodiments, the obtaining of the initial clause generation prompt and training the preset claim clause generation model by the target clause scoring model and the initial clause generation prompt to obtain the target claim clause generation model include:
[0023] Generating terms through the preset claim terms generation model and the initial terms generation prompt to obtain initial claim terms;
[0024] Performing clause scoring on the initial claim settlement clauses by using the target clause scoring model to obtain initial scoring data;
[0025] The parameters of the preset claim terms generation model are optimized according to the initial scoring data to obtain the target claim terms generation model.
[0026] In some embodiments, the preset claim terms generation model includes a text generation sub-model and a genetic search sub-model, and the clause generation is performed by using the preset claim terms generation model and the initial clause generation prompt to obtain the initial claim terms, including:
[0027] Perform text generation through the text generation sub-model and the initial clause generation prompt to obtain an initial text;
[0028] The initial text is genetically searched through the genetic search sub-model to obtain the initial claim terms.
[0029] In some embodiments, the training of a preset clause scoring model according to the reference claim clause and the reference scoring data to obtain a target clause scoring model includes:
[0030] Performing clause scoring on the reference claim clauses using the preset clause scoring model to obtain predicted scoring data;
[0031] Performing mean square error calculation based on the reference score data and the predicted score data to obtain mean square error data;
[0032] The parameters of the preset clause scoring model are optimized according to the mean square error data to obtain the target clause scoring model.
[0033] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a device for generating a claim clause text, the device comprising:
[0034] A data acquisition module, used to acquire sample claim terms and sample scoring data of the sample claim terms; wherein the sample scoring data is used to indicate the compliance of the sample claim terms;
[0035] A clause screening module, used to screen the sample claim clauses to obtain reference claim clauses, obtain the sample scoring data of the reference claim clauses, and obtain reference scoring data;
[0036] A scoring model training module, used to train a preset clause scoring model according to the reference claim terms and the reference scoring data to obtain a target clause scoring model;
[0037] A model generation module is used to obtain an initial clause generation prompt, and train a preset claim clause generation model through the target clause scoring model and the initial clause generation prompt to obtain a target claim clause generation model; wherein the initial clause generation prompt is used to instruct the preset claim clause to generate the reference claim clause;
[0038] A clause generation module, used to obtain a target clause generation task, and generate clauses through the target claim clause generation model and the target clause generation task to obtain a target claim clause;
[0039] The clause splicing module is used to splice the target claim clause with the preset general claim clause to obtain the claim clause text.
[0040] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0041] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0042] The present application proposes a method and device for generating a claim clause text, an electronic device, and a storage medium. The method obtains sample claim clauses and sample scoring data of the sample claim clauses, and then screens the sample claim clauses to obtain reference claim clauses, and obtains sample scoring data of the reference claim clauses to obtain reference scoring data, and trains a preset clause scoring model based on the reference claim clauses and the reference scoring data, thereby obtaining a target claim clause generation model that can score claim clauses, thereby improving the efficiency of scoring claim clauses; further, an initial clause generation prompt is obtained, and then the preset claim clause generation model is trained through the target clause scoring model and the initial clause generation prompt, thereby obtaining a target claim clause generation model that has good perception of claim clauses, thereby improving the generation quality and generation efficiency of claim clause generation; further, a target clause generation task is obtained, and clause generation is performed through the target claim clause generation model and the target clause generation task to obtain a target claim clause, and then the target claim clause and the preset general claim clause are spliced to obtain the claim clause text, thereby realizing efficient generation of the claim clause text. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flow chart of a method for generating a claim clause text provided in an embodiment of the present application;
[0044] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.
[0045] Figure 3 yes Figure 2 Flow chart of step S201 in FIG.
[0046] Figure 4 yes Figure 2 Flow chart of step S202 in FIG.
[0047] Figure 5 yes Figure 1 Flow chart of step S103 in FIG.
[0048] Figure 6 yes Figure 1 Flow chart of step S104 in FIG.
[0049] Figure 7 yes Figure 6 Flow chart of step S601 in FIG.
[0050] Figure 8 It is a structural schematic diagram of a claim clause text generating device provided in an embodiment of the present application;
[0051] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0055] First, some nouns involved in this application are analyzed:
[0056] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0057] Genetic Search: It is an optimization algorithm inspired by the principles of biological evolution. It is a branch of evolutionary computing and is mainly used to solve search and optimization problems. Genetic search imitates the genetic and natural selection mechanisms of organisms in nature and continuously optimizes solutions through an iterative process. Genetic search involves steps such as encoding, fitness evaluation, selection, crossover (or hybridization) and mutation of individuals (solutions). It is often used to solve complex problems, such as parameter optimization, scheduling, configuration problems, etc., and is especially suitable for large-scale and nonlinear problems that are difficult to handle with traditional algorithms. Genetic search has a wide range of applications, including engineering design, artificial intelligence, economic model prediction, and bioinformatics.
[0058] Clustering: It is used to group objects in a data set according to similarity, so that objects in the same group (or cluster) have a high degree of similarity, while the similarity between different groups is relatively low. Clustering is a part of unsupervised learning in machine learning. It is widely used in statistical data analysis, pattern recognition, image analysis, information retrieval, bioinformatics and other fields. It is often used in market segmentation, social network analysis, organization of computer clusters, image segmentation and gene expression data analysis. Clustering algorithms include K-means, hierarchical clustering, density-based clustering and many other types.
[0059] Semantic Recognition: It is a technology at the intersection of computer science and linguistics that is used to understand and interpret the meaning expressed by language units, such as words, phrases, sentences or entire texts. This process involves analyzing the semantic content and contextual relationships of texts to correctly understand and respond to human language. Semantic recognition is often used in fields such as machine translation, information retrieval, question-answering systems and speech recognition. It is the basis for achieving advanced language understanding tasks and involves multiple technical fields such as deep learning, pattern recognition and artificial intelligence.
[0060] A claim text is a text that includes claim terms. The claim terms elaborate on the processing rules and measures in different claim scenarios. These processing rules and measures are complex, resulting in low efficiency in manually generating claim terms. Therefore, how to improve the efficiency of generating claim terms has become an urgent problem to be solved.
[0061] Based on this, the embodiments of the present application provide a method and device for generating a claim clause text, an electronic device and a storage medium, aiming to improve the efficiency of generating claim clauses.
[0062] The embodiments of the present application provide a method and device for generating a claim terms text, an electronic device, and a storage medium, which are specifically illustrated through the following embodiments. First, the method for generating a claim terms text in the embodiments of the present application is described.
[0063] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0064] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0065] The method for generating the text of the claim terms provided in the embodiment of the present application relates to the field of text generation technology. The method for generating the text of the claim terms provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the method for generating the text of the claim terms, etc., but is not limited to the above forms.
[0066] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0067] Figure 1 is an optional flowchart of the method for generating a claim clause text provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0068] Step S101, obtaining sample claim settlement clauses and sample scoring data of the sample claim settlement clauses; wherein the sample scoring data is used to indicate the compliance of the sample claim settlement clauses;
[0069] Step S102, screening the sample claim terms to obtain reference claim terms, acquiring sample scoring data of the reference claim terms, and obtaining reference scoring data;
[0070] Step S103, training a preset clause scoring model according to reference claim clauses and reference scoring data to obtain a target clause scoring model;
[0071] Step S104, obtaining an initial clause generation prompt, and training a preset claim clause generation model through a target clause scoring model and the initial clause generation prompt to obtain a target claim clause generation model; wherein the initial clause generation prompt is used to instruct the preset claim clause to generate a reference claim clause;
[0072] Step S105, obtaining a target clause generation task, and generating clauses through a target claim clause generation model and a target clause generation task to obtain a target claim clause;
[0073] Step S106, concatenating the target claim terms and the preset general claim terms to obtain the claim terms text.
[0074] Steps S101 to S106 shown in the embodiment of the present application are to obtain sample claim clauses and sample scoring data of the sample claim clauses, and then screen the sample claim clauses to obtain reference claim clauses, and obtain sample scoring data of the reference claim clauses to obtain reference scoring data, and train the preset clause scoring model based on the reference claim clauses and the reference scoring data, so as to obtain a target claim clause generation model that can score the claim clauses, thereby improving the efficiency of scoring the claim clauses; further, obtain initial clause generation prompts, and then train the preset claim clause generation model through the target clause scoring model and the initial clause generation prompts, so as to obtain a target claim clause generation model with good perception ability for the claim clauses, thereby improving the generation quality and generation efficiency of the claim clause generation; further, obtain a target clause generation task, and generate clauses through the target claim clause generation model and the target clause generation task to obtain the target claim clause, and then splice the target claim clause and the preset general claim clause to obtain the claim clause text, thereby realizing efficient generation of the claim clause text.
[0075] In step S101 of some embodiments, the sample claim terms are terms in the claim risk control file, and each term is pre-set with a score, i.e., sample score data. Each sample score data represents the compliance and rationality of the corresponding claim terms.
[0076] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S203:
[0077] Step S201, keyword matching is performed on the sample claim clauses to obtain keyword matching information;
[0078] Step S202, performing semantic recognition on the sample claim clause to obtain semantic recognition information;
[0079] Step S203, screening the sample claim terms according to the keyword matching information and the semantic recognition information to obtain reference claim terms.
[0080] In steps S201 to S203 shown in the embodiment of the present application, keyword matching information is obtained by performing keyword matching on the sample claim terms, and then semantic recognition is performed on the sample claim terms to obtain semantic recognition information. Finally, the sample claim terms are screened according to the keyword matching information and the semantic recognition information to obtain reference claim terms, thereby achieving the screening of representative claim terms from the sample claim terms from both keyword and semantic dimensions to obtain reference claim terms, thereby improving the perception of the subsequent preset clause scoring model on the clauses, enabling the preset clause scoring model to accurately score the clauses, and improving the scoring accuracy of the preset clause scoring model.
[0081] See also Figure 3 In some embodiments, step S201 may include but is not limited to steps S301 to S302:
[0082] Step S301, performing keyword recognition on sample claim clauses to obtain claim clause keywords;
[0083] Step S302, keyword matching is performed based on the claim clause keywords and the preset general clause database to obtain keyword matching information.
[0084] In steps S301 to S302 shown in the embodiment of the present application, keywords are identified for sample claim terms to obtain claim terms keywords, and then keyword matching is performed based on the claim terms keywords and a preset general terms database to obtain keyword matching information, thereby accurately determining the keywords of representative clauses in the claim terms, providing a data basis for subsequent clause screening.
[0085] In step S301 of some embodiments, keyword recognition is to screen representative keywords from the sample claim terms. For example, in a claim term related to a vehicle accident, "unexpected wear and tear" and "claim ratio" are keywords. Keyword recognition is based on context analysis in natural language processing. In one embodiment, the sample claim terms are input into the pre-trained BERT model to identify the claim terms keywords in the sample claim terms.
[0086] In step S302 of some embodiments, the preset general terms database is a preset keyword database, which includes multiple databases, and the data in the database is saved in the form of data pairs, such as ("reference", "wear"), ("general", "risk"). Based on the matching of the claim terms keyword and the preset general terms database, it is determined whether each claim terms keyword belongs to the reference claim terms or the general claim terms.
[0087] See also Figure 4In some embodiments, step S202 may include but is not limited to steps S401 to S404:
[0088] Step S401, vectorizing the sample claim settlement clauses to obtain vectorized text information;
[0089] Step S402, performing semantic understanding on the vectorized text information to obtain text semantic information;
[0090] Step S403, performing text clustering according to text semantic information to obtain text clustering information;
[0091] Step S404: extract topics from the text clustering information to obtain semantic recognition information.
[0092] Steps S401 to S404 shown in the embodiment of the present application are to vectorize the sample claim terms to obtain vectorized text information, then perform semantic understanding on the vectorized text information to obtain text semantic information, then perform text clustering based on the text semantic information to obtain text clustering information, and finally perform topic extraction on the text clustering information to obtain semantic recognition information, thereby classifying the sample claim terms from the semantic dimension, and then extracting the topic information of each category to determine the semantic topic of each sample claim term.
[0093] In step S401 of some embodiments, clause vectorization is to convert sample claim clauses from text form into numerical representation that can be understood by a computer, that is, a matrix. In one embodiment, a pre-trained word embedding model Word2Vec is used to vectorize the clauses, and the sample claim clauses are input into Word2Vec to obtain vectorized text information.
[0094] In step S402 of some embodiments, semantic understanding is the process of parsing and understanding the vectorized text information, identifying the meaning of words and phrases in the context and the semantics expressed by the vectorized text as a whole. In one embodiment, a pre-trained LSTM network is used for semantic understanding to obtain text semantic information, that is, the output of Word2Vec is input into the LSTM to obtain text semantic information.
[0095] In step S403 of some embodiments, text clustering refers to grouping text semantic information according to similarity, specifically, first calculating the Euclidean distance between text semantic information, and then performing KNN clustering based on the Euclidean distance to obtain multiple clustering areas, namely, text clustering information.
[0096] In step S404 of some embodiments, topic extraction is to identify and extract the central topic of each cluster from the text clustering information to determine the core content represented by each cluster area. In one embodiment, the LDA algorithm is used for topic extraction to determine the central topic of each cluster area, and then a similarity is calculated based on the central topic and the preset reference topic and common topic to determine whether each sample claim clause belongs to a common topic or a reference topic, that is, semantic recognition information.
[0097] In step S203 of some embodiments, the sample claim terms are screened based on the keyword matching information and the semantic recognition information, and the common claim terms in the sample claim terms are screened out to obtain the reference claim terms.
[0098] See also Figure 5 In some embodiments, step S103 includes but is not limited to steps S501 to S503:
[0099] Step S501, scoring the reference claim terms using a preset terms scoring model to obtain predicted scoring data;
[0100] Step S502, performing mean square error calculation based on the reference score data and the predicted score data to obtain mean square error data;
[0101] Step S503, optimizing the parameters of the preset clause scoring model according to the mean square error data to obtain the target clause scoring model.
[0102] In steps S501 to S503 shown in the embodiment of the present application, the reference claim terms are first scored using a preset terms scoring model to obtain predicted scoring data, and then the mean square error is calculated based on the reference scoring data and the predicted scoring data to obtain the mean square error data. Finally, the parameters of the preset terms scoring model are optimized based on the mean square error data to obtain a target terms scoring model, thereby improving the perception ability of the preset terms scoring model for the reference claim terms, and obtaining a target terms scoring model that can quickly and accurately score the claim terms, providing a fast scoring method for the subsequent scoring of the generated terms, thereby improving the efficiency of generating claim terms.
[0103] In step S501 of some embodiments, the clause scoring refers to scoring each clause in the reference claim clause to obtain the predicted scoring data of each clause. In one embodiment, the preset clause scoring model is a pre-trained Transformer model, which includes an input layer, an encoding layer, a multi-head self-attention layer, a feedforward network layer, a residual connection layer, and an activation layer. Among them, the multi-head self-attention layer can learn the potential information between multiple claim clauses in parallel, and determine the score for the claim clause according to the context, so that the Transformer predicted scoring data can accurately predict the score value of the reference claim clause.
[0104] In step S502 of some embodiments, the mean square error is calculated by inputting the reference claim terms into a preset terms scoring model to obtain the score of each claim terms by the preset terms scoring model, that is, to obtain predicted scoring data, and then performing a mean square error calculation based on the predicted scoring data and the preset reference scoring data to obtain the mean square error data.
[0105] In step S503 of some embodiments, parameter optimization is to use the stochastic gradient descent method to optimize the parameters of the preset clause scoring model, and the preset clause scoring model is back-propagated through the mean square error data to obtain the target clause scoring model.
[0106] See also Figure 6 In some embodiments, step S104 includes but is not limited to steps S601 to S603:
[0107] Step S601, generating terms through a preset claim terms generation model and initial terms generation prompts to obtain initial claim terms;
[0108] Step S602, scoring the initial claim terms using the target terms scoring model to obtain initial scoring data;
[0109] Step S603, optimizing the parameters of the preset claim terms generation model according to the initial scoring data to obtain the target claim terms generation model.
[0110] In steps S601 to S603 shown in the embodiment of the present application, clauses are generated through a preset claim clause generation model and an initial clause generation prompt to obtain initial claim clauses, thereby improving the speed of claim clause generation; further, the initial claim clauses are scored through a target clause scoring model to obtain initial scoring data, and then the preset claim clause generation model is parameter optimized based on the initial scoring data to obtain a target claim clause generation model, thereby training the target claim clause generation model through the rapid scoring capability of the target clause scoring model, eliminating the need for manual scoring of the claim clauses, thereby improving scoring efficiency. In addition, the target claim clause generation model has a good perception capability for claim clauses, and can accurately determine the score of the claim clauses generated by the preset claim clause generation model, and then train the preset claim clause generation model based on the score, so that the preset claim clause generation model can generate high-quality claim clauses.
[0111] See also Figure 7 In some embodiments, the preset claim clause generation model includes a text generation sub-model and a genetic search sub-model, and step S601 may include but is not limited to steps S701 to S702:
[0112] Step S701, generating text through the text generation sub-model and the initial clause generation prompt to obtain the initial text;
[0113] Step S702, performing a genetic search on the initial text through a genetic search sub-model to obtain initial claim terms.
[0114] In steps S701 to S702 shown in the embodiment of the present application, text is generated through a text generation sub-model and an initial clause generation prompt to obtain an initial text, and then a genetic search is performed on the initial text through a genetic search sub-model to obtain initial claim clauses, thereby improving the efficiency and diversity of generating claim clauses.
[0115] In step S701 of some embodiments, the text generation sub-model is a text generation model that can output text according to the input prompt. The initial clause generation prompt is input into the text generation sub-model to generate text and obtain the initial text.
[0116] In step S702 of some embodiments, the genetic search sub-model is a model used to perform genetic search on the initial text. First, the genetic search sub-model determines the claim keywords in the claim terms, such as "liability division", "claim conditions", "exceptions" and other claim keywords, and then, chromosome encoding is performed based on the claim keywords to generate an initial population, and then crossover and mutation are performed on the initial population to generate initial claim terms.
[0117] In step S602 of some embodiments, the initial claim terms are scored using a target term scoring model to determine the score of the initial claim terms obtained by the genetic search, thereby providing a data basis for the subsequent generation of a model for the preset claim terms based on the score.
[0118] In step S603 of some embodiments, the parameters of the text generation submodel and the genetic search submodel in the preset claim terms are optimized according to the initial scoring data, and the parameters in the text generation submodel and the parameters of the genetic search submodel are adjusted to obtain the target claim terms generation model.
[0119] In step S105 of some embodiments, the target clause generation task includes a target clause generation prompt, and the target claim clause is output by inputting the prompt into a text generation sub-model in the target claim generation clause.
[0120] In step S106 of some embodiments, the target claim terms and the preset general claim terms are spliced together according to the preset claim text internal framework to obtain the claim terms text.
[0121] See also Figure 8 The embodiment of the present application also provides a claim clause text generation device, which can implement the above-mentioned claim clause text generation method, and the device includes:
[0122] The data acquisition module 801 is used to acquire sample claim settlement clauses and sample scoring data of the sample claim settlement clauses; wherein the sample scoring data is used to indicate the compliance of the sample claim settlement clauses;
[0123] The clause screening module 802 is used to screen the sample claim clauses to obtain reference claim clauses, obtain sample scoring data of the reference claim clauses, and obtain reference scoring data;
[0124] The scoring model training module 803 is used to train the preset clause scoring model according to the reference claim clause and the reference scoring data to obtain the target clause scoring model;
[0125] The model generation module 804 is used to obtain the initial clause generation prompt, and train the preset claim clause generation model through the target clause scoring model and the initial clause generation prompt to obtain the target claim clause generation model; wherein the initial clause generation prompt is used to instruct the preset claim clause to generate the reference claim clause;
[0126] The clause generation module 805 is used to obtain a target clause generation task, and generate clauses through a target claim clause generation model and a target clause generation task to obtain a target claim clause;
[0127] The clause splicing module 806 is used to splice the target claim clause and the preset general claim clause to obtain the claim clause text.
[0128] The specific implementation of the claim clause text generation device is basically the same as the specific implementation of the above-mentioned claim clause text generation method, and will not be repeated here.
[0129] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned claim clause text generation method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0130] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0131] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0132] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the claim clause text generation method of the embodiment of this application;
[0133] Input / output interface 903, used to implement information input and output;
[0134] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
[0135] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0136] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0137] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned claim clause text generation method is implemented.
[0138] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0139] The claim clause text generation method, claim clause text generation device, electronic device and storage medium provided in the embodiments of the present application obtain sample claim clauses and sample scoring data of the sample claim clauses, then perform clause screening on the sample claim clauses to obtain reference claim clauses, obtain sample scoring data of the reference claim clauses to obtain reference scoring data, and train a preset clause scoring model based on the reference claim clauses and the reference scoring data, thereby obtaining a target claim clause generation model that can score claim clauses, thereby improving the efficiency of scoring claim clauses; further, obtain an initial clause generation prompt, then train the preset claim clause generation model through the target clause scoring model and the initial clause generation prompt, thereby obtaining a target claim clause generation model that has good perception ability for claim clauses, thereby improving the generation quality and generation efficiency of claim clause generation; further, obtain a target clause generation task, and perform clause generation through the target claim clause generation model and the target clause generation task to obtain a target claim clause, and then perform clause splicing between the target claim clause and the preset general claim clause to obtain a claim clause text, thereby achieving efficient generation of claim clause text.
[0140] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0141] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0142] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0144] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0145] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0146] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0147] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0150] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for generating a claim clause text, characterized in that: The method comprises: Obtaining sample claim terms and sample scoring data of the sample claim terms; wherein the sample scoring data is used to indicate the compliance of the sample claim terms; Screening the sample claim terms to obtain reference claim terms, acquiring the sample scoring data of the reference claim terms, and obtaining reference scoring data; Training a preset clause scoring model according to the reference claim clause and the reference scoring data to obtain a target clause scoring model; Obtaining an initial clause generation prompt, and training a preset claim clause generation model through the target clause scoring model and the initial clause generation prompt to obtain a target claim clause generation model; wherein the initial clause generation prompt is used to instruct the preset claim clause to generate the reference claim clause; Obtaining a target clause generation task, and generating clauses through the target claim clause generation model and the target clause generation task to obtain a target claim clause; The target claim terms and the preset general claim terms are concatenated to obtain a claim terms text.
2. The method according to claim 1, characterized in that The sample claim terms are screened to obtain reference claim terms, including: Perform keyword matching on the sample claim clauses to obtain keyword matching information; Performing semantic recognition on the sample claim clause to obtain semantic recognition information; The sample claim terms are screened according to the keyword matching information and the semantic recognition information to obtain the reference claim terms.
3. The method according to claim 2, characterized in that Perform semantic recognition on the sample claim clause to obtain semantic recognition information, including: Vectorizing the sample claim clauses to obtain vectorized text information; Performing semantic understanding on the vectorized text information to obtain text semantic information; Performing text clustering according to the text semantic information to obtain text clustering information; The text clustering information is subjected to topic extraction to obtain the semantic recognition information.
4. The method according to claim 2, characterized in that Keyword matching is performed on the sample claim clause to obtain keyword matching information, including: Perform keyword recognition on the sample claim clauses to obtain claim clause keywords; Keyword matching is performed based on the claim clause keywords and a preset general clause database to obtain the keyword matching information.
5. The method according to any one of claims 1 to 4, characterized in that: The obtaining of the initial clause generation prompt, and training the preset claim clause generation model through the target clause scoring model and the initial clause generation prompt to obtain the target claim clause generation model, includes: Generating terms through the preset claim terms generation model and the initial terms generation prompt to obtain initial claim terms; Performing clause scoring on the initial claim settlement clauses by using the target clause scoring model to obtain initial scoring data; The parameters of the preset claim terms generation model are optimized according to the initial scoring data to obtain the target claim terms generation model.
6. The method according to claim 5, characterized in that The preset claim clause generation model includes a text generation sub-model and a genetic search sub-model. The clause generation is performed through the preset claim clause generation model and the initial clause generation prompt to obtain the initial claim clause, including: Perform text generation through the text generation sub-model and the initial clause generation prompt to obtain an initial text; The initial text is genetically searched through the genetic search sub-model to obtain the initial claim terms.
7. The method according to any one of claims 1 to 4, characterized in that: The step of training the preset clause scoring model according to the reference claim clause and the reference scoring data to obtain the target clause scoring model includes: Performing clause scoring on the reference claim clauses using the preset clause scoring model to obtain predicted scoring data; Performing mean square error calculation based on the reference score data and the predicted score data to obtain mean square error data; The parameters of the preset clause scoring model are optimized according to the mean square error data to obtain the target clause scoring model.
8. A device for generating a claim clause text, characterized in that: The device comprises: A data acquisition module, used to acquire sample claim terms and sample scoring data of the sample claim terms; wherein the sample scoring data is used to indicate the compliance of the sample claim terms; A clause screening module, used to screen the sample claim clauses to obtain reference claim clauses, obtain the sample scoring data of the reference claim clauses, and obtain reference scoring data; A scoring model training module, used to train a preset clause scoring model according to the reference claim terms and the reference scoring data to obtain a target clause scoring model; A model generation module is used to obtain an initial clause generation prompt, and train a preset claim clause generation model through the target clause scoring model and the initial clause generation prompt to obtain a target claim clause generation model; wherein the initial clause generation prompt is used to instruct the preset claim clause to generate the reference claim clause; A clause generation module, used to obtain a target clause generation task, and generate clauses through the target claim clause generation model and the target clause generation task to obtain a target claim clause; The clause splicing module is used to splice the target claim clause with the preset general claim clause to obtain the claim clause text.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the claim clause text generation method described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for generating a claim clause text according to any one of claims 1 to 7 is implemented.