General text matching form method and system based on large language model

Through the general text matching form method based on the large language model, the problem of inefficient information entry and text processing in the prior art is solved, efficient and flexible text processing and information retrieval are achieved, and the performance of the large language model is optimized.

CN119621931APending Publication Date: 2025-03-14XIAN QIUQIAN TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411670778.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The prior art is inefficient in information entry and text processing, and large language models have output uncertainty and result format diversity during interaction, which is difficult to match the preset form format, limiting its application scope.

Method used

A general text matching form based on a large language model is proposed. By obtaining and preprocessing user-side text data, defining form input fields, generating prompt words and using large language model analysis, combining semantic similarity algorithm for matching, and finally outputting results based on the preset format and verifying to optimize the model.

Benefits of technology

It improves text processing efficiency, enhances the flexibility of form definition, generates high-quality analysis results, improves the accuracy and efficiency of information retrieval and text processing, and optimizes the performance of large language models by verifying the output results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621931A_ABST
    Figure CN119621931A_ABST
Patent Text Reader

Abstract

The invention discloses a general text matching form method and system based on a large language model, and relates to the technical field of natural language processing, the method comprises the following steps: obtaining and preprocessing text data of a user side, and defining an input field of a form based on the preprocessed text data; in combination with the preprocessed text data and the defined form input field, cue words are obtained, a pre-constructed large language model is used for analyzing the cue words, analysis results are obtained, and a semantic similarity algorithm is used for matching the analysis results; and outputting a matching result according to a preset format, and verifying the output result to optimize the large language model. According to the invention, through text data acquisition and preprocessing, the text processing efficiency is improved; meanwhile, the form input field is defined based on the preprocessed text data, so that the form can more accurately reflect the structure and content of the text data, the flexibility of form definition is enhanced, and the requirements of different application scenes are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and system for general text matching forms based on a large language model. Background Art

[0002] With the rapid development of information technology, various information management systems have been widely used by enterprises and individual users. In order to improve the efficiency and accuracy of information entry, system users usually need to manually fill in the information content into the system. However, this method is not only time-consuming and labor-intensive, but also prone to errors. Especially when faced with large amounts of data processing needs, its inefficiency becomes more and more obvious.

[0003] In recent years, with the development of artificial intelligence technology, especially the progress in the field of natural language processing (NLP), technologies that use large language models to automatically process text data have emerged. These technologies can assist or replace manual work in extracting and converting text information to a certain extent, improving the level of automation in information processing. However, most of the current technical solutions are designed for specific application scenarios and lack the ability to support a wide range of scenarios, which limits their scope of application to a certain extent.

[0004] In addition, existing technical solutions have obvious limitations when interacting with large language models. On the one hand, the output results of large language models have certain uncertainties, which may lead to a high data error rate; on the other hand, the information obtained from large language models is often in various formats and difficult to directly match with the preset form format, which undoubtedly increases the difficulty and complexity of subsequent data processing.

[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0006] In view of the problems in the related art, the present invention proposes a method and system for universal text matching form based on a large language model to overcome the above technical problems existing in the existing related art.

[0007] To this end, the specific technical solution adopted by the present invention is as follows:

[0008] According to one aspect of the present invention, a method for matching a universal text form based on a large language model is provided, the method comprising the following steps:

[0009] S1, obtaining and preprocessing text data from the user end, and defining input fields of the form based on the preprocessed text data;

[0010] S2. Combining the preprocessed text data with the defined form input fields, obtaining prompt words, using the pre-built large language model to analyze the prompt words, obtaining analysis results, and matching the analysis results using a semantic similarity algorithm;

[0011] S3. Output the matching results according to the preset format and verify the output results to optimize the large language model.

[0012] Furthermore, obtaining and preprocessing text data from the user end, and defining input fields of the form based on the preprocessed text data includes the following steps:

[0013] S11, obtaining text data from the user terminal, and preprocessing the obtained text data;

[0014] S12, analyzing the preprocessed text data, identifying input data for form input, and determining input fields of the form based on the input data;

[0015] S13, based on the field attributes of the form input fields, preliminarily define the input fields of the form;

[0016] S14, using the initially defined form input fields to obtain sample data;

[0017] S15, evaluating whether the sample data conforms to the form definition. If the sample data does not conform to the form definition, steps S13 to S14 are repeated. Otherwise, the input fields of the defined form are obtained.

[0018] Furthermore, obtaining text data from the user end and preprocessing the obtained text data includes the following steps:

[0019] S111, obtaining text data in the user terminal, and cleaning the text data to delete abnormal data, duplicate data and erroneous data;

[0020] S112, using a mean filling algorithm to fill in missing data in the cleaned text data;

[0021] S113: Standardize the filled text data to obtain standardized text data.

[0022] Further, analyzing the preprocessed text data, identifying input data for form input, and determining input fields of the form based on the input data includes the following steps:

[0023] S121, segmenting the preprocessed text data using word boundary detection technology to obtain word parameters;

[0024] S122, using entity recognition technology to identify entity data in the word parameters;

[0025] S123. Extract input data for form input from the entity data, map the input data to the form, and determine input fields of the form.

[0026] Furthermore, field attributes include: content definition format, content meaning, field name and data type.

[0027] Further, combining the preprocessed text data with the defined form input fields to obtain prompt words, using the pre-built large language model to analyze the prompt words, obtaining the analysis results, and matching the analysis results using the semantic similarity algorithm includes the following steps:

[0028] S21, extracting feature data from the preprocessed text data using word frequency inverse text frequency technology, and integrating the feature data with the defined form input fields to construct a feature vector;

[0029] S22, using a template generation algorithm to process the feature vector to obtain a prompt word for inputting a large language model;

[0030] S23, inputting the prompt word into a pre-built large language model, analyzing the text data and extracting information and semantic associations, and obtaining text analysis results;

[0031] S24. Use a semantic similarity algorithm to match the text analysis results to obtain matching results.

[0032] Furthermore, the word frequency inverse text frequency technique is used to extract feature data from the preprocessed text data, and the feature data is integrated with the defined form input fields. The feature vector is constructed by the following steps:

[0033] S211, dividing the preprocessed text data into a plurality of words, and marking the parts of speech in the words;

[0034] S212, based on the results of part-of-speech tagging, counting the frequency of each word in each text, and constructing a correlation matrix between the text and the words;

[0035] S213, using the inverse text frequency formula, calculating the inverse text frequency of the vocabulary in the text data, and combining the frequency of the vocabulary in a single text to calculate the word frequency inverse text frequency of each vocabulary;

[0036] S214: Merge the word frequency inverse document frequency with the defined form input field to construct a feature vector containing text and form information.

[0037] Furthermore, the inverse text frequency formula is:

[0038]

[0039] Where I represents the value of inverse text frequency;

[0040] t indicates vocabulary;

[0041] N represents the total number of texts;

[0042] df(t) is the number of documents containing vocabulary t.

[0043] Furthermore, processing the feature vector using the template generation algorithm to obtain prompt words for inputting the large language model includes the following steps:

[0044] S221. According to the task requirements, select a template generation algorithm based on machine learning, and set a weight threshold to select feature parameters with high weights;

[0045] S222, parsing the feature vector, and filling the feature parameters into corresponding variables of the preset template based on the parsing result, to synthesize prompt words for inputting the large language model;

[0046] S223: Verify the synthesized prompt word and optimize the template according to the verification result.

[0047] According to another aspect of the present invention, there is also provided a system for matching universal text forms based on a large language model, the system comprising a data preprocessing and form definition module, a prompt word generation and analysis module, and a result output and optimization module;

[0048] The data preprocessing and form definition module is used to obtain and preprocess the text data of the user end, and define the input fields of the form based on the preprocessed text data;

[0049] The prompt word generation and analysis module is used to combine the pre-processed text data with the defined form input fields to obtain prompt words, use the pre-built large language model to analyze the prompt words, obtain the analysis results, and match the analysis results using the semantic similarity algorithm;

[0050] The result output and optimization module is used to output the matching results according to the preset format and verify the output results to optimize the large language model.

[0051] The beneficial effects of the present invention are:

[0052] 1. The present invention significantly improves the efficiency of text processing by acquiring and preprocessing text data; at the same time, the form input fields are defined based on the preprocessed text data, so that the form can more accurately reflect the structure and content of the text data, enhance the flexibility of the form definition, and meet the needs of different application scenarios.

[0053] 2. The present invention generates prompt words by combining preprocessed text data with defined form input fields, and uses a pre-built large language model to conduct in-depth analysis of the prompt words, thereby generating high-quality analysis results; in addition, the analysis results are matched using a semantic similarity algorithm, which can more accurately identify text content that matches user needs, thereby improving the accuracy and efficiency of information retrieval and text processing.

[0054] 3. The present invention outputs matching results according to a preset format, making the output results more standardized, easy to understand and use, which is helpful for subsequent data processing and analysis, and improves the efficiency and quality of the entire process; at the same time, by verifying the output results, it is possible to promptly discover and correct problems and errors in the model during the text analysis process, optimize the parameters and training strategies of the large language model, and thus continuously improve the performance and accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. 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 paying creative work.

[0056] Figure 1 is a flow chart of a method for universal text matching form based on a large language model according to an embodiment of the present invention;

[0057] Figure 2 is a system principle block diagram of a general text matching form based on a large language model according to an embodiment of the present invention;

[0058] Figure 3 is a flow chart of a method definition phase of a general text matching form based on a large language model according to an embodiment of the present invention;

[0059] Figure 4 is a flow chart of the application phase of a method for general text matching form based on a large language model according to an embodiment of the present invention;

[0060] Figure 5 It is a timing diagram of the entire large prediction model in a method of a universal text matching form based on a large language model according to an embodiment of the present invention.

[0061] In the figure:

[0062] 1. Data preprocessing and form definition module; 2. Prompt word generation and analysis module; 3. Result output and optimization module. DETAILED DESCRIPTION

[0063] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments. They can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention.

[0064] According to an embodiment of the present invention, a method and system for a universal text matching form based on a large language model are provided.

[0065] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to a method for matching a universal text form based on a large language model according to an embodiment of the present invention, the method comprises the following steps:

[0066] S1. Acquire and preprocess text data from the user end, and define input fields of the form based on the preprocessed text data.

[0067] Specifically, obtaining and preprocessing text data from a user terminal and defining input fields of a form based on the preprocessed text data include the following steps:

[0068] S11, obtaining text data from the user end, and preprocessing the obtained text data.

[0069] Specifically, obtaining text data from a user terminal and preprocessing the obtained text data includes the following steps:

[0070] S111. Obtain text data from the user terminal, clean the text data, and delete abnormal data, duplicate data, and erroneous data.

[0071] S112, using a mean filling algorithm to fill in missing data in the cleaned text data.

[0072] It should be noted that the formula of the mean filling algorithm is:

[0073]

[0074] In the formula, mean represents the calculated average value;

[0075] n represents the total number of non-missing values;

[0076] i represents the index, from 1 to n;

[0077] x i Represents the i-th non-missing value.

[0078] S113: Standardize the filled text data to obtain standardized text data.

[0079] S12: Analyze the preprocessed text data, identify input data for form input, and determine input fields of the form based on the input data.

[0080] Specifically, analyzing the preprocessed text data, identifying the input data for form input, and determining the input fields of the form based on the input data includes the following steps:

[0081] S121. Segment the preprocessed text data using word boundary detection technology to obtain word parameters.

[0082] It should be noted that word segmentation tools based on statistics or deep learning methods, such as Jieba word segmenter (for Chinese) and NLTK (for English), can automatically identify word boundaries. According to the characteristics and needs of the text, select the appropriate word segmentation mode, such as precise mode, full mode or search engine mode. Among them, the precise mode is suitable for scenarios that require accurate word segmentation; the full mode will segment all possible words in the text, but there may be redundancy; the search engine mode is more suitable for word segmentation when building search engine indexes. Use the word segmentation tool to segment the preprocessed text data to obtain the word segmentation results, and extract all the words from the word segmentation results. These words are the word parameters of the text data.

[0083] S122. Utilize entity recognition technology to identify entity data in word parameters.

[0084] It should be noted that, according to the task requirements, the entity types that need to be identified should be clearly defined, such as names of people, places, names of organizations, time, date, numbers, etc.; appropriate entity recognition tools or models should be selected, such as named entity recognition (NER) models based on deep learning. These models usually have a high recognition accuracy rate; the selected entity recognition tools or models are used to perform entity recognition on the preprocessed word parameters. The recognition process will automatically detect and mark the entity data in the text, and extract the data marked as entities from the recognition results. These are the required entity data.

[0085] S123. Extract input data for form input from the entity data, map the input data to the form, and determine input fields of the form.

[0086] S13. Based on the field attributes of the form input fields, preliminarily define the input fields of the form.

[0087] Specifically, field attributes include: content definition format, content meaning, field name and data type.

[0088] S14. Use the preliminarily defined form input fields to obtain sample data.

[0089] It should be noted that the source of sample data should be determined based on the purpose and data type of the field. The data source can be an existing data set, historical records, user feedback, or self-created data. Sample data related to the form input field should be collected from the determined data source, ensuring that the collected data complies with the data type and length limit of the field.

[0090] S15, evaluating whether the sample data conforms to the form definition. If the sample data does not conform to the form definition, steps S13 to S14 are repeated. Otherwise, the input fields of the defined form are obtained.

[0091] It should be noted that the sample data is generated by a large language model. The recognition accuracy increases from 92.3% to 98.5% with and without the sample part added.

[0092] The following are the prompts for generating sample data:

[0093] {{background}} is the advance information, including date and background information

[0094] {{definition} The definition of the field conforms to the jsonSchema structure.

[0095] Plain Text

[0096] #Execute tasks

[0097] Generate a sample based on the definition and description of the json-schema in the output field.

[0098] ##Preset Information

[0099] {{background}}

[0100] ## Output requirements

[0101] 1. Return only JSON data

[0102] ##Output fields

[0103] ```json

[0104] {{definition}}

[0105] Finally, its prompt words are:

[0106]

[0107]

[0108] ## Output requirements

[0109] 1. Try to identify the content as much as possible. If the content of any specified field cannot be identified, return <error> and give the field whose content cannot be identified.

[0110] 2. If multiple data are identified, return each one in the form of an array.

[0111] ##Content data

[0112] {{content}}.

[0113] S2. Combine the preprocessed text data with the defined form input fields to obtain prompt words, use the pre-built large language model to analyze the prompt words, obtain the analysis results, and use the semantic similarity algorithm to match the analysis results.

[0114] Specifically, combining the preprocessed text data with the defined form input fields to obtain prompt words, using the pre-built large language model to analyze the prompt words, obtaining the analysis results, and matching the analysis results using the semantic similarity algorithm includes the following steps:

[0115] S21. Use word frequency inverse text frequency technology to extract feature data from the preprocessed text data, and merge the feature data with the defined form input fields to construct a feature vector.

[0116] Specifically, the word frequency inverse text frequency technology is used to extract feature data from the preprocessed text data, and the feature data is integrated with the defined form input fields. The construction of the feature vector includes the following steps:

[0117] S211, dividing the preprocessed text data into a number of words, and marking the parts of speech in the words.

[0118] S212. Based on the results of part-of-speech tagging, count the frequency of occurrence of each word in each text and construct a correlation matrix between text and words.

[0119] S213. Calculate the inverse text frequency of a word in the text data using the inverse text frequency formula, and calculate the word frequency inverse text frequency of each word in combination with the frequency of the word in a single text.

[0120] Specifically, the inverse text frequency formula is:

[0121]

[0122] Where I represents the value of inverse text frequency;

[0123] t indicates vocabulary;

[0124] N represents the total number of texts;

[0125] df(t) is the number of documents containing vocabulary t.

[0126] S214: Merge the word frequency inverse document frequency with the defined form input fields to construct a feature vector containing text and form information.

[0127] S22. Process the feature vector using a template generation algorithm to obtain prompt words for inputting a large language model.

[0128] Specifically, using the template generation algorithm to process the feature vector to obtain the prompt words for the large language model input includes the following steps:

[0129] S221. According to the task requirements, select a template generation algorithm based on machine learning, and set a weight threshold to select feature parameters with high weights;

[0130] S222, parsing the feature vector, and filling the feature parameters into corresponding variables of the preset template based on the parsing result, to synthesize prompt words for inputting the large language model;

[0131] S223: Verify the synthesized prompt word and optimize the template according to the verification result.

[0132] S23, inputting the prompt word into a pre-built large language model, analyzing the text data and extracting information and semantic associations, and obtaining text analysis results.

[0133] It should be noted that a pre-trained large language model, such as BERT, GPT series (GPT-3, GPT-4, etc.), T5, etc., is selected according to the task requirements, and the model parameters, such as maximum input length, output format, inference speed, etc., are adjusted as needed; the prompt word is input into the large language model, and according to the architecture of the model, one or more text sequences are output, or it may be a numerical vector, depending on the configuration of the model and the nature of the task; the output of the model is parsed according to the nature of the task. For text generation tasks, the output may be one or more sentences; for classification tasks, the output may be a category label; for information extraction tasks, the output may be a structured list of information.

[0134] When building the big language model, jsonSchema was introduced. jsonSchema is a structure defined for Json language description. It is well supported and compatible with the big language model. On this basis, extensions were made so that the big language model can better understand the content to be returned.

[0135]

[0136]

[0137] In addition, the description attribute is added to describe the content of the field and the agreed format requirements; and in the scenario of type = array, the items attribute is defined as object to better be compatible with general scenarios; through the definition of this language structure, the format matching degree returned by the large language model can be greatly increased.

[0138] S24. Use a semantic similarity algorithm to match the text analysis results to obtain matching results.

[0139] It should be noted that a suitable semantic similarity algorithm should be selected. Commonly used algorithms include cosine similarity, Jaccard similarity, edit distance (Levenshtein distance), BERT, etc.; based on the selected algorithm, the similarity between the text analysis result and the preset standard or target text is calculated; a similarity threshold is set to determine whether two texts match, and the final matching result is determined based on the similarity value and the threshold.

[0140] S3. Output the matching results according to the preset format and verify the output results to optimize the large language model.

[0141] It should be noted that the output format of the matching results is determined according to the actual application scenario and user needs, and the output format may be text, table, JSON object, XML file, etc. The matching results are formatted according to the determined format, including extracting key information, adjusting the data structure, adding necessary tags or comments, etc. The formatted matching results are presented to the user or saved to a specified storage location, and the presentation method may be directly displayed on the user interface, sent to a specified email address, saved in a database, etc.

[0142] According to the task requirements and actual application scenarios, formulate verification standards for the matching results. The verification standards may include requirements for accuracy, completeness, consistency, readability, etc.; according to the formulated verification standards, check the output results one by one, and record the problems and errors found in the verification process for subsequent analysis and improvement; according to the analysis results of the causes of the errors, adjust the parameter settings of the large language model, including adjusting the learning rate, adding training data, modifying the model architecture, adjusting the loss function, etc.

[0143] In addition, if Figure 3 As shown, the input fields of the form are defined, and the format, content meaning, field and type of each input content are defined. The system performs preparation work based on this definition.

[0144] like Figure 4-Figure 5 As shown, after the definition phase is completed, the application phase can be entered, and the user input is based on the definition requirements, the content is identified, and it is checked and returned for processing.

[0145] like Figure 2 As shown, according to another embodiment of the present invention, a system for matching universal text forms based on a large language model is also provided, the system comprising a data preprocessing and form definition module 1, a prompt word generation and analysis module 2, and a result output and optimization module 3;

[0146] The data preprocessing and form definition module 1 is used to obtain and preprocess the text data of the user end, and define the input fields of the form based on the preprocessed text data;

[0147] The prompt word generation and analysis module 2 is used to combine the pre-processed text data with the defined form input fields to obtain prompt words, use the pre-built large language model to analyze the prompt words, obtain the analysis results, and match the analysis results using the semantic similarity algorithm;

[0148] The result output and optimization module 3 is used to output the matching results according to a preset format and verify the output results to optimize the large language model.

[0149] In summary, with the help of the above technical solution of the present invention, the efficiency of text processing is significantly improved through text data acquisition and preprocessing; at the same time, the form input field is defined based on the preprocessed text data, so that the form can more accurately reflect the structure and content of the text data, enhance the flexibility of the form definition, and meet the needs of different application scenarios. By combining the preprocessed text data with the defined form input field, a prompt word is generated, and the prompt word is deeply analyzed using a pre-built large language model, so that high-quality analysis results can be generated; in addition, the analysis results are matched using a semantic similarity algorithm, so that the text content that matches the user's needs can be more accurately identified, thereby improving the accuracy and efficiency of information retrieval and text processing. By outputting the matching results according to a preset format, the output results are more standardized, easy to understand and use, which is helpful for subsequent data processing and analysis work, and improves the efficiency and quality of the entire process; at the same time, by verifying the output results, problems and errors existing in the model during the text analysis process can be discovered and corrected in a timely manner, and the parameters and training strategies of the large language model can be optimized, thereby continuously improving the performance and accuracy of the model.

[0150] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for matching a general text form based on a large language model, characterized in that: The method comprises the following steps: S1, obtaining and preprocessing text data from the user end, and defining input fields of the form based on the preprocessed text data; S2. Combining the preprocessed text data with the defined form input fields, obtaining prompt words, using the pre-built large language model to analyze the prompt words, obtaining analysis results, and matching the analysis results using a semantic similarity algorithm; S3. Output the matching results according to the preset format and verify the output results to optimize the large language model.

2. A method for matching a universal text form based on a large language model according to claim 1, characterized in that: The step of obtaining and preprocessing text data from a user terminal and defining input fields of a form based on the preprocessed text data comprises the following steps: S11, obtaining text data from the user terminal, and preprocessing the obtained text data; S12, analyzing the preprocessed text data, identifying input data for form input, and determining input fields of the form based on the input data; S13, based on the field attributes of the form input fields, preliminarily define the input fields of the form; S14, using the initially defined form input fields to obtain sample data; S15, evaluating whether the sample data conforms to the form definition. If the sample data does not conform to the form definition, steps S13 to S14 are repeated. Otherwise, the input fields of the defined form are obtained.

3. A method for matching a universal text form based on a large language model according to claim 2, characterized in that: The step of obtaining text data from a user terminal and preprocessing the obtained text data comprises the following steps: S111, obtaining text data in the user terminal, and cleaning the text data to delete abnormal data, duplicate data and erroneous data; S112, using a mean filling algorithm to fill in missing data in the cleaned text data; S113: Standardize the filled text data to obtain standardized text data.

4. The method for matching a universal text form based on a large language model according to claim 3, characterized in that: The step of analyzing the preprocessed text data, identifying the input data for form input, and determining the input fields of the form based on the input data comprises the following steps: S121, segmenting the preprocessed text data using word boundary detection technology to obtain word parameters; S122, using entity recognition technology to identify entity data in the word parameters; S123. Extract input data for form input from the entity data, map the input data to the form, and determine input fields of the form.

5. The method for matching a universal text form based on a large language model according to claim 4, characterized in that: The field attributes include: content definition format, content meaning, field name and data type.

6. The method for matching a universal text form based on a large language model according to claim 1, characterized in that: The method of combining the preprocessed text data with the defined form input fields to obtain prompt words, using the pre-built large language model to analyze the prompt words, obtaining analysis results, and matching the analysis results using a semantic similarity algorithm includes the following steps: S21, extracting feature data from the preprocessed text data using word frequency inverse text frequency technology, and integrating the feature data with the defined form input fields to construct a feature vector; S22, using a template generation algorithm to process the feature vector to obtain a prompt word for inputting a large language model; S23, inputting the prompt word into a pre-built large language model, analyzing the text data and extracting information and semantic associations, and obtaining text analysis results; S24. Use a semantic similarity algorithm to match the text analysis results to obtain matching results.

7. The method for matching a universal text form based on a large language model according to claim 6, characterized in that: The method of extracting feature data from the preprocessed text data by using the word frequency inverse text frequency technology and fusing the feature data with the defined form input fields to construct a feature vector includes the following steps: S211, dividing the preprocessed text data into a plurality of words, and marking the parts of speech in the words; S212, based on the results of part-of-speech tagging, counting the frequency of each word in each text, and constructing a correlation matrix between the text and the words; S213, using the inverse text frequency formula, calculating the inverse text frequency of the vocabulary in the text data, and combining the frequency of the vocabulary in a single text to calculate the word frequency inverse text frequency of each vocabulary; S214: Merge the word frequency inverse document frequency with the defined form input field to construct a feature vector containing text and form information.

8. The method for matching a universal text form based on a large language model according to claim 7, characterized in that: The inverse text frequency formula is: Where I represents the value of inverse text frequency; t indicates vocabulary; N represents the total number of texts; df(t) is the number of documents containing vocabulary t.

9. The method for matching a universal text form based on a large language model according to claim 8, characterized in that: The process of processing the feature vector using the template generation algorithm to obtain the prompt words for inputting the large language model comprises the following steps: S221. According to the task requirements, select a template generation algorithm based on machine learning, and set a weight threshold to select feature parameters with high weights; S222, parsing the feature vector, and filling the feature parameters into corresponding variables of the preset template based on the parsing result, to synthesize prompt words for inputting the large language model; S223: Verify the synthesized prompt word and optimize the template according to the verification result.

10. A system for a universal text matching form based on a large language model, used to implement the method for a universal text matching form based on a large language model according to any one of claims 1 to 9, characterized in that: The system includes a data preprocessing and form definition module, a prompt word generation and analysis module, and a result output and optimization module; The data preprocessing and form definition module is used to obtain and preprocess the text data of the user end, and define the input fields of the form based on the preprocessed text data; The prompt word generation and analysis module is used to combine the pre-processed text data with the defined form input fields to obtain prompt words, use the pre-built large language model to analyze the prompt words, obtain analysis results, and match the analysis results using a semantic similarity algorithm; The result output and optimization module is used to output the matching results according to a preset format and verify the output results to optimize the large language model.

Citation Information

Cited By

  • Intelligent form creation system and method

    CN121052230A