Disassembly data processing method and system, electronic equipment and storage medium

By obtaining the expropriation and demolition business data set to generate a question set and preprocess it, screening and constructing the positive and negative sample data set, and training the target large language model, the problem of low training stability of large models in urban village renovation and land expropriation and demolition business is solved, and the accuracy and correctness of data processing are improved.

CN120851184APending Publication Date: 2025-10-28GUANGZHOU ZHENGYUN TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510785762.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing large models lack specific business knowledge in areas such as urban village renovation and land acquisition and demolition, resulting in low training stability, poor accuracy and correctness of answers, and a poor user experience.

Method used

By acquiring the land acquisition and demolition business dataset, a question set is generated, preprocessed and filtered, positive and negative sample datasets are constructed, and a target large language model is trained using a preset optimization algorithm to generate the target processing result.

Benefits of technology

It effectively alleviates the serious lack of labeled data, improves the training stability of large language models and the accuracy and correctness of expropriation and demolition data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120851184A_ABST
    Figure CN120851184A_ABST
Patent Text Reader

Abstract

The invention discloses a tampering and splitting data processing method and system, electronic equipment and a storage medium, and the method comprises the steps: obtaining a tampering and splitting business data set, and generating a question set; preprocessing the question set to generate a question answer data set; according to the question and answer data set, through a preset large language model, performing answer rewriting to generate a first question and answer rewriting data set, and performing screening to obtain a second question and answer rewriting data set; constructing a positive and negative sample data set through a pre-training language model according to the second question and answer rewriting data set, training the pre-training language model through a preset optimization algorithm, and generating a target large language model; and inputting the to-be-processed characterization and division data into the target large language model for data processing to obtain a target processing result. According to the embodiment of the invention, the problem of lack of annotation data in an actual business scene can be relieved, the stability and training effect of tagged data processing are improved, and the accuracy and correctness of tagged data processing are improved. The method can be widely applied to the technical field of artificial intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, system, electronic device and storage medium for processing land acquisition and demolition data. Background Technology

[0002] In recent years, with the rapid development of artificial intelligence, large-scale models have significantly improved their ability to understand user intent and the accuracy of their answers. Compared to traditional human responses, intelligent question-answering systems based on large-scale models can replace human answers, meet users' information needs anytime, anywhere, help users obtain the information they need more quickly, and reduce labor costs while improving the efficiency of information acquisition. However, in related technologies, for businesses involving various professional knowledge and regulations, such as urban village renovation and land acquisition, general-purpose large-scale models themselves lack specific business knowledge and real-world business scenario data. This results in low model training stability, making it difficult for the trained large-scale models to provide data support relevant to specific businesses. Furthermore, the accuracy and correctness of their answers are low, and the inherent illusions of large-scale models can easily lead to poor user experience, and even cause contradictions and misunderstandings.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0004] The main objective of this application is to propose a method, system, electronic device, and storage medium for land acquisition and demolition data processing, which can effectively alleviate the problem of severe lack of labeled data in actual business scenarios, effectively improve the stability and training effect of land acquisition and demolition data processing, and thus effectively improve the accuracy and correctness of land acquisition and demolition data processing.

[0005] To achieve the above objectives, one aspect of this application proposes a method for processing land acquisition and demolition data, the method comprising the following steps:

[0006] Obtain the land acquisition and demolition business dataset, and generate a set of questions based on the land acquisition and demolition business dataset;

[0007] The question set is preprocessed to generate a question-and-answer dataset;

[0008] Based on the question-and-answer dataset, the answers are rewritten using a preset large language model to generate the first question-and-answer rewritten dataset.

[0009] The first question-and-answer rewriting dataset is filtered using preset filtering conditions to obtain the second question-and-answer rewriting dataset.

[0010] Based on the second question-and-answer rewrite dataset, a positive and negative sample dataset is constructed using a pre-trained language model;

[0011] The pre-trained language model is trained using a preset optimization algorithm based on the positive and negative sample datasets to generate a target large language model; wherein the preset optimization algorithm is obtained by optimizing the direct preference optimization algorithm based on the positive sample generation probability.

[0012] The land acquisition and demolition data to be processed is input into the target large language model for data processing to obtain the target processing result.

[0013] In some embodiments, obtaining the land acquisition and resettlement business dataset, and generating a question set based on the land acquisition and resettlement business dataset, includes:

[0014] Obtain the land acquisition and demolition business dataset; wherein, the land acquisition and demolition business dataset includes several text data of responses to land acquisition and demolition business;

[0015] Based on the text data of the land acquisition and demolition business responses, preset prompt words are constructed, and then corresponding question text data is generated through the preset large language model based on the preset prompt words.

[0016] The question set is constructed based on the question text data.

[0017] In some embodiments, the preprocessing of the question set to generate a question-answer dataset includes:

[0018] Two question text data are randomly selected from the question set to obtain a question text pair;

[0019] The question text pair is segmented using a preset word segmentation tool to obtain a set of basic text units;

[0020] The repetition probability of the question text pair is calculated based on the set of basic text units to obtain repetition probability data;

[0021] The question and answer dataset is generated by filtering the question text data based on the repetition probability data.

[0022] In some embodiments, the step of generating a first question-and-answer rewritten dataset by rewriting answers using a preset large language model based on the question-and-answer dataset includes:

[0023] Based on the text data of land acquisition and demolition questions in the question-and-answer dataset, the answers are rewritten using the preset large language model to obtain answer variant data;

[0024] The land acquisition and demolition business response text data corresponding to the land acquisition and demolition question text data in the question and answer dataset is used as land acquisition and demolition rule information. Then, the first question and answer rewriting dataset is constructed based on the response variant data, the land acquisition and demolition question text data and the land acquisition and demolition rule information.

[0025] In some embodiments, the step of filtering the first question-and-answer rewriting dataset using preset filtering conditions to obtain the second question-and-answer rewriting dataset includes:

[0026] The first rewritten answer data in the first question-and-answer rewritten dataset is format-filtered to obtain the second rewritten answer data;

[0027] The second rewritten response data is matched with the preset collection and demolition rule conditions using a regular expression matching algorithm to obtain the matching result;

[0028] Once the matching result is determined to be a successful match, the second rewritten answer data is retained, thereby constructing the second question-and-answer rewritten dataset.

[0029] In some embodiments, the step of constructing a positive and negative sample dataset from the second question-answer rewriting dataset using a pre-trained language model includes:

[0030] Based on the second question-and-answer rewrite dataset, negative sample data is generated using a pre-trained language model;

[0031] A positive and negative sample dataset is constructed based on the negative sample data and the second question-and-answer rewrite dataset.

[0032] In some embodiments, training the pre-trained language model using a preset optimization algorithm based on the positive and negative sample dataset to generate a target large language model includes:

[0033] The positive and negative sample datasets are input into the pre-trained language model, and the loss data is calculated based on the model output using a preset cross-entropy loss function; wherein, the preset cross-entropy loss function is constructed based on the positive sample generation probability;

[0034] The target large language model is constructed by adjusting the model parameters using a low-rank adaptation algorithm based on the loss data.

[0035] To achieve the above objectives, another aspect of this application proposes a land acquisition and demolition data processing system, the system comprising:

[0036] The first module is used to acquire the land acquisition and demolition business dataset, and to generate a set of questions based on the land acquisition and demolition business dataset;

[0037] The second module is used to preprocess the question set to generate a question-and-answer dataset;

[0038] The third module is used to rewrite the answers based on the question-and-answer dataset using a preset large language model, and generate the first question-and-answer rewritten dataset.

[0039] The fourth module is used to filter the first question-and-answer rewrite dataset according to preset filtering conditions to obtain the second question-and-answer rewrite dataset.

[0040] The fifth module is used to construct a positive and negative sample dataset based on the second question-and-answer rewrite dataset using a pre-trained language model;

[0041] The sixth module is used to train the pre-trained language model using a preset optimization algorithm based on the positive and negative sample datasets to generate a target large language model; wherein the preset optimization algorithm is obtained by optimizing the direct preference optimization algorithm based on the positive sample generation probability;

[0042] The seventh module is used to input the land acquisition and demolition data to be processed into the target large language model for data processing, and obtain the target processing result.

[0043] To achieve the above objectives, another aspect of this application provides an electronic device, the electronic device comprising:

[0044] At least one processor;

[0045] At least one memory for storing at least one program;

[0046] When the at least one program is executed by the at least one processor, the at least one processor performs the method described above.

[0047] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0048] The embodiments of this application include at least the following beneficial effects: This application provides a method, system, electronic device, and storage medium for processing land acquisition and demolition data. This solution acquires a land acquisition and demolition business dataset, generates a question set based on the dataset, and preprocesses the question set to generate a question-and-answer dataset. Next, the embodiments of this invention use a preset large language model to rewrite the answers based on the question-and-answer dataset, generating a first question-and-answer rewritten dataset. The first question-and-answer rewritten dataset is then filtered using preset screening conditions to obtain a second question-and-answer rewritten dataset. Furthermore, a positive and negative sample dataset is constructed using a pre-trained language model based on the second question-and-answer rewritten dataset. The pre-trained language model is then trained using a preset optimization algorithm obtained by optimizing the direct preference optimization algorithm based on the positive sample generation probability, generating a target large language model. The land acquisition and demolition data to be processed is then input into the target large language model for data processing to obtain the target processing result. This effectively alleviates the problem of severe lack of labeled data in actual business scenarios and effectively improves the stability and effect of large language model training, thereby effectively improving the accuracy and correctness of land acquisition and demolition data processing. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating the steps of the land acquisition and demolition data processing method provided in this embodiment of the invention.

[0050] Figure 2 This is a schematic diagram of the overall process architecture of the land acquisition and demolition data processing method provided in the embodiments of the present invention;

[0051] Figure 3 This is a schematic diagram of the structure of the land acquisition and demolition data processing system provided in an embodiment of the present invention;

[0052] Figure 4 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0054] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0055] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0057] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0058] Large language models are deep learning models with a large number of parameters that can process and understand natural language and perform various natural language processing tasks, such as text generation, question answering, translation, and summarization.

[0059] In recent years, with the rapid development of artificial intelligence, large-scale models have significantly improved their ability to understand user intent and the accuracy of their answers. Compared to traditional human responses, intelligent question-answering systems based on large-scale models can replace human answers, meet users' information needs anytime, anywhere, help users obtain the information they need more quickly, and reduce labor costs while improving the efficiency of information acquisition. However, in related technologies, for businesses involving various professional knowledge and regulations, such as urban village renovation and land acquisition, general-purpose large-scale models themselves lack specific business knowledge and real-world business scenario data. This results in low model training stability, making it difficult for the trained large-scale models to provide data support relevant to specific businesses. Furthermore, the accuracy and correctness of their answers are low, and the inherent illusions of large-scale models can easily lead to poor user experience, and even cause contradictions and misunderstandings.

[0060] For example, in matters related to urban village redevelopment and land expropriation, on the one hand, various professional knowledge and regulations related to specific regions and areas are involved. General-purpose question-and-answer models lack specific business knowledge and cannot meet personalized requirements. On the other hand, much business knowledge is stored locally in the form of knowledge bases or files, and data such as pricing, compensation, and funds are highly sensitive, making it impossible to directly utilize publicly available large models on the internet for knowledge base access and responses. Therefore, providing a question-and-answer model containing professional knowledge is crucial for improving the overall service quality of the dialogue system. Furthermore, since the large model targets many grassroots users and urban village residents with vastly different levels of education and lacking professional knowledge in computer science and related regulations, the content and manner of their questions are diverse, but the content of their answers is relatively fixed. They must strictly adhere to the regulations in relevant documents, avoiding any misinterpretations, and providing corresponding regulatory basis in their responses. Simply using a large model and a locally linked knowledge base (RAG method) is prone to difficulties in meeting the diverse and accurate needs of users and questions in specific application scenarios due to factors such as document segmentation methods, vectorization models, and retrieval and ranking algorithms. Fine-tuning large models requires a sufficient dataset of manually labeled samples, which is difficult to meet practical needs.

[0061] In view of this, this application provides a method, system, electronic device, and storage medium for processing land acquisition and demolition data. This solution acquires a land acquisition and demolition business dataset, generates a question set based on the dataset, and preprocesses the question set to generate a question-and-answer dataset. Next, this embodiment uses a preset large language model to rewrite the answers based on the question-and-answer dataset, generating a first question-and-answer rewritten dataset. The first question-and-answer rewritten dataset is then filtered using preset screening conditions to obtain a second question-and-answer rewritten dataset. Based on the second question-and-answer rewritten dataset, a positive and negative sample dataset is constructed using a pre-trained language model. The pre-trained language model is then trained using a preset optimization algorithm obtained by optimizing the direct preference optimization algorithm based on the positive sample generation probability, generating a target large language model. The land acquisition and demolition data to be processed is then input into the target large language model for data processing to obtain the target processing result. This effectively alleviates the problem of severe lack of labeled data in actual business scenarios and effectively improves the stability and effect of large language model training, thereby effectively improving the accuracy and correctness of land acquisition and demolition data processing.

[0062] The land acquisition and demolition data processing method provided in this application relates to the field of artificial intelligence technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the land acquisition and demolition data processing method, but is not limited to the above forms.

[0063] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: 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, and distributed computing environments including any of the above systems or devices. This 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. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0064] Figure 1 This is an optional flowchart of the land acquisition and demolition data processing method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S110 to S170.

[0065] Step S110: Obtain the land acquisition and demolition business dataset to generate a question set based on the land acquisition and demolition business dataset.

[0066] Step S120: Preprocess the question set to generate a question-answer dataset.

[0067] Step S130: Based on the question-and-answer dataset, rewrite the answers using a preset large language model to generate the first question-and-answer rewritten dataset.

[0068] Step S140: Filter the first question-and-answer rewrite dataset using preset filtering conditions to obtain the second question-and-answer rewrite dataset.

[0069] Step S150: Based on the second question-and-answer rewrite dataset, construct the positive and negative sample datasets using a pre-trained language model.

[0070] Step S160: Train the pre-trained language model using a preset optimization algorithm based on the positive and negative sample datasets to generate the target large language model. The preset optimization algorithm is obtained by optimizing the direct preference optimization algorithm based on the positive sample generation probability.

[0071] Step S170: Input the land acquisition and demolition data to be processed into the target large language model for data processing to obtain the target processing result.

[0072] In this specific embodiment, the present invention first acquires a land acquisition and demolition business dataset to generate a question set based on the dataset. Specifically, the land acquisition and demolition business dataset in this embodiment refers to the business regulations and knowledge dataset related to land acquisition and demolition. The question set refers to a set of questions related to land acquisition and demolition, such as compensation and time limits. The present invention uses the acquired land acquisition and demolition business data to generate several questions related to land acquisition and demolition through a large model, thereby constructing a question set. Next, the present invention preprocesses the question set to generate a question-and-answer dataset. Specifically, since the generated question set may contain duplicates and redundancies, the present invention preprocesses the question set to filter out redundant and duplicate questions, and matches each question in the preprocessed question set with the land acquisition and demolition business data in the land acquisition and demolition business dataset to determine the answers to each question, thereby constructing a question-and-answer dataset. Further, the present invention uses a preset large language model to rewrite the answers based on the question-and-answer dataset, generating a first question-and-answer rewritten dataset. Specifically, since in the actual land acquisition and demolition business answering process, in addition to providing relevant regulations, it is also necessary to provide humanized answers based on the user's questions, thus requiring reinforcement of the model's learning data. Accordingly, in this embodiment of the invention, the answer data in the question-and-answer dataset is rewritten using a preset large language model to obtain more human-like answer data, thereby generating the first question-and-answer rewritten dataset.

[0073] Next, in this embodiment of the invention, the first question-and-answer rewritten dataset is filtered using preset screening conditions to obtain the second question-and-answer rewritten dataset. Specifically, the preset screening conditions in this embodiment refer to screening conditions determined according to the requirements of land acquisition and demolition business. Accordingly, to avoid the rewritten answers not meeting the relevant requirements, this embodiment of the invention filters the first question-and-answer rewritten dataset to obtain the second question-and-answer rewritten dataset. Further, this embodiment of the invention constructs a positive and negative sample dataset using a pre-trained language model based on the second question-and-answer rewritten dataset, and then trains the pre-trained language model using a preset optimization algorithm based on the positive and negative sample dataset to generate a target large language model. Specifically, this embodiment of the invention uses the pre-trained language model to generate corresponding answers based on the questions in the second question-and-answer rewritten dataset, thereby constructing a positive and negative sample dataset. Accordingly, this embodiment of the invention optimizes the Direct Preference Optimization (DPO) algorithm using the positive sample generation probability to obtain a preset optimization algorithm, thereby improving the stability of the model training process by introducing the positive sample generation probability. This invention, based on positive and negative sample datasets, fine-tunes the parameters of a pre-trained language model using an optimized direct preference optimization algorithm (pre-set optimization algorithm) to construct a target large-scale language model. Finally, this invention inputs the land acquisition and demolition data to be processed into the target large-scale language model for data processing, generating the target processing result. Specifically, the land acquisition and demolition data to be processed in this invention includes question data related to land acquisition and demolition operations. This invention processes the land acquisition and demolition data to be processed using the trained target large-scale language model to obtain answer data for questions related to land acquisition and demolition operations, i.e., the target processing result, effectively improving the accuracy and correctness of the answers to land acquisition and demolition operation questions.

[0074] In some embodiments of the present invention, a land acquisition and demolition business dataset is obtained to generate a question set based on the land acquisition and demolition business dataset, including but not limited to the following steps:

[0075] Obtain the land acquisition and resettlement business dataset. This dataset includes text data representing responses to several land acquisition and resettlement business transactions.

[0076] Based on the text data of the answers to the land acquisition and demolition business, preset prompt words are constructed, and then corresponding question text data is generated through a preset large language model based on the preset prompt words.

[0077] A question set is constructed based on the question text data.

[0078] In this specific embodiment, the embodiment of the present invention first obtains a demolition business data set including several demolition business answer text data, and then constructs a preset prompt word according to the demolition business answer text data, so as to generate corresponding question text data through a preset large language model according to the preset prompt word, and thus constructs a question set according to the question text data. Specifically, as Figure 2 shown, the embodiment of the present invention obtains a demolition business data set AN = {a1, a2,..., a ij ,..., a n} including n answers. For each answer a i (1 ≤ i ≤ n), construct the corresponding prompt word and fill in the corresponding content, and then generate m questions through the large model LLM, denoted as Q i = {q i1 , q i2 ,..., q ij ,..., q mn}. Among them, each q i in a i and Q i is a sentence text. In addition, the {{}} in the prompt word template in the embodiment of the present invention is a special mark used to fill in the corresponding content. Exemplarily, the prompt word template AGPrompt in the embodiment of the present invention is as follows:

[0079] You are an expert in land expropriation and demolition. Your task is to generate {{m}} semantically equivalent but differently expressed user question variants for the given answer according to the following examples. These question variants should conform to the daily questioning methods of users as much as possible, and the sentence length of each question is between 8 and 50 words. The generated questions should be listed in the format of 1, 2, 3,.... The following gives an example:

[0080] # Example start #

[0081] <Answer>

[0082] If the person whose house is to be expropriated signs the compensation agreement and transfers the land and house within 3 months from the date when the formal evaluation report is issued by the evaluation unit, a 15% reward will be given based on the evaluated value of the house for expropriation, recovery, or acquisition.

[0083] < / Answer》

[0084] <Question>

[0085] 1. What is the time limit for signing the compensation agreement? Is there any reward if it exceeds three months?

[0086] 2. How much more compensation can be obtained for early delivery of the house? How is it specifically calculated?

[0087] 3. How long after the evaluation report comes out can one get a 15% bonus when signing the contract?

[0088] 4. What are the reward rules for house transfer? What conditions need to be met?

[0089] 5. How much more compensation can one get by signing the agreement within three months?

[0090] 6. When must one complete signing the contract and handing over the house to get the 15% bonus based on the evaluation price?

[0091] 7. What percentage of the house evaluation price is the demolition and relocation reward distributed?

[0092] 8. If one signs the contract immediately after the evaluation report comes out, can one get an extra bonus?

[0093] 9. What is the receiving period for the demolition and relocation compensation bonus in months?

[0094] 10. Do both the actions of signing the agreement and handing over the house need to be completed within three months to get the bonus?

[0095] < / Question>

[0096] #Example ends#

[0097] The following is the answer:

[0098] <Answer>

[0099] {{a i}}

[0100] < / Answer>

[0101] Please generate {{m}} user question variants that are semantically equivalent to the original questions but have different expressions. Separate these questions with line breaks and write the answers within the <Question variant> tag.

[0102] In addition, in the embodiments of the present invention, for each specified a i , the large model generates corresponding questions according to the specified quantity m, which is expressed by the following formula (1):

[0103] Q i = LLM(a i , m) (1)

[0104] Among them, m in the formula is an integer in the interval [4, 10], and the default value is 8, which can be dynamically determined according to the complexity of the paragraph.

[0105] In some embodiments of the present invention, the question set is preprocessed to generate a question-answer data set, including but not limited to the following steps:

[0106] Two question texts are randomly selected from the question set to obtain a question text pair.

[0107] The query text pairs are segmented using a preset word segmentation tool to obtain a set of basic text units.

[0108] The probability of repetition of question text pairs is calculated based on the set of basic text units, thus obtaining the repetition probability data.

[0109] The question text data is filtered based on the repetition probability data to generate a question-and-answer dataset.

[0110] In this specific embodiment, the present invention filters questions generated by a large model using a word repetition calculation formula to ensure question diversity and obtain a question-and-answer dataset (QA). Specifically, as follows... Figure 2 As shown, for each set of questions Q generated by the large model LLM i ={q i1 ,q i2 ,...,q ij ,...,q mn To avoid redundancy caused by repetition of some questions, this embodiment of the invention filters and judges questions from the perspective of word repetition. This invention randomly selects two question texts, and for these two arbitrary question sentences q... ij and q ik The function `seg` represents the set of tokens (basic text units) obtained by filtering commonly used words after segmenting a sentence using a word segmentation tool. Here, ∩ and ∪ represent the intersection and union of the sets, respectively, and `sim(q)`... ij ,q ik ) represents q ij and q ik The probability of word repetition is calculated as shown in equation (2):

[0111]

[0112] Accordingly, embodiments of the present invention compare the calculated repetition probability with a suggested repetition threshold to filter the query text data. For example, when sim(q ij ,q ik If the value of sim(q) is greater than 0.85, the two sentences are considered duplicates; therefore, in this embodiment of the invention, only one sentence is randomly selected. Conversely, if sim(q) is less than 0.85, the sentence is considered duplicate. ij ,q ik If the value of ) is less than 0.85, then in this embodiment of the invention, both sentences are retained. This embodiment of the invention filters the question text data through the above steps, thereby constructing a question-and-answer dataset QA = {(q 11 ,a1),...,(q1m ,a1),...,{(q i1 ,a i ),...,(q im ,a i )}.

[0113] In some embodiments of the present invention, the first question-and-answer rewritten dataset is generated by rewriting the answers using a preset large language model based on the question-and-answer dataset, including but not limited to the following steps:

[0114] Based on the text data of land acquisition and demolition issues in the question-and-answer dataset, the answers are rewritten using a pre-set large language model to obtain answer variant data.

[0115] The text data of the land acquisition and demolition business responses corresponding to the text data of the land acquisition and demolition questions in the question-and-answer dataset are used as land acquisition and demolition rule information. Then, the first question-and-answer rewrite dataset is constructed based on the answer variant data, the text data of the land acquisition and demolition questions, and the land acquisition and demolition rule information.

[0116] In this specific embodiment, because the requirements for large models in the data processing of land acquisition and demolition business differ from those of conventional large models, in answering users' questions about land acquisition and demolition rules, in addition to providing humanized answers based on relevant questions to facilitate user understanding, it is also necessary to provide the relevant regulatory documents on which the answers are based. Therefore, this embodiment of the invention further strengthens the dataset based on the question-and-answer dataset. Specifically, in this embodiment of the invention, land acquisition and demolition rule information refers to the relevant regulations or rules of land acquisition and demolition business. Accordingly, such as Figure 2 As shown, in this embodiment of the invention, the constructed question-and-answer dataset QA={(q 11 ,a1),...,(q 1m ,a1),...,{(q i1 ,a i ),...,(q im ,a i The system constructs prompt words to enable the large model to rewrite answers based on questions and responses, and uses the original answers as the basis for output rules. For example, the specific answer rewriting prompt word template QAPrompt in this embodiment is shown below:

[0117] You are an expert in land acquisition and demolition. Your task is to generate a semantically equivalent but differently worded variant of a given question and its corresponding answer. Note that the variant can be appropriately colloquial, but must adhere to the main content of the original answer. If numbers and calculations are involved, strictly follow the requirements of the original answer. The word count of the variant should be between 0.5 and 2 times that of the original answer. Finally, attach the content of the original answer to the <Rule Basis> tag after the new answer.

[0118] #Example start#

[0119] <Question>

[0120] What is the time limit for signing the compensation agreement? Is there any reward after three months?

[0121] < / Question>

[0122] <Original answer>

[0123] If the person whose property is being expropriated signs the compensation agreement and transfers the land and house within 3 months from the date when the official evaluation report is issued by the evaluation unit, a reward of 15% of the evaluated price of the house value for expropriation, recovery, and acquisition will be given.

[0124] < / Original answer>

[0125] <Answer variant>

[0126] Attention, fellow relocated households! As long as you sign the compensation agreement and hand over the house and land within 90 days after the official issuance of the evaluation report, you can get an extra reward of 15% of the evaluated price of the house. Both of these steps need to be completed within the 3 - month period to enjoy this reward!

[0127] < / Answer variant>

[0128] <Rule basis>

[0129] If the person whose property is being expropriated signs the compensation agreement and transfers the land and house within 3 months from the date when the official evaluation report is issued by the evaluation unit, a reward of 15% of the evaluated price of the house value for expropriation, recovery, and acquisition will be given.

[0130] < / Rule basis>

[0131] #Example end#

[0132] The following are the original question and answer:

[0133] <Question>

[0134] {{q ij}}

[0135] < / Question>

[0136] <Original answer>

[0137] {{a i}}

[0138] < / Original answer>

[0139] Please generate 1 answer variant with the same semantics but different expressions based on the above question and answer, and write your answer within the <Answer variant> tag.

[0140] Accordingly, in this embodiment of the invention, based on QA={(q 11 ,a1),...,(q 1m ,a1),...,{(q i1 ,a i ),...,(q im ,a i Each specified q in )} ij and a i After the large model is filled according to the QAPrompt template mentioned above, the corresponding answer variants are generated, which are expressed by the following formula (3):

[0141] pos_a ij =LLM(q ij ,a i (3)

[0142] Finally, by performing the above steps, this embodiment of the invention constructs a new dataset RW = {(q 11 ,a1,pos_a 11 ),...,(q 1m ,a1,pos_a 1m ),...,{(q i1 ,a i ,pos_a i1 ),...,(q im ,a i ,pos_a im )}, which is the first question-and-answer rewrite dataset.

[0143] In some embodiments of the present invention, a second question-and-answer rewriting dataset is obtained by filtering the first question-and-answer rewriting dataset using preset filtering conditions, including but not limited to the following steps:

[0144] The format of the first rewritten answer data in the first question-and-answer rewritten dataset is filtered to obtain the second rewritten answer data.

[0145] The second rewritten response data is matched with the preset collection and demolition rule conditions using a regular expression matching algorithm to obtain the matching result.

[0146] Once the matching result is confirmed as a successful match, the second rewritten answer data is retained, and the second question-and-answer rewritten dataset is constructed.

[0147] In this specific implementation, to avoid the rewritten answer data not conforming to relevant format and rule requirements, this embodiment of the invention performs format filtering and matching of preset land acquisition and demolition rule conditions on the first question-and-answer dataset. Specifically, this embodiment first performs format filtering on the rewritten first answer data to select second rewritten answer data that conforms to relevant format requirements. Next, this embodiment of the invention uses a regular expression matching algorithm to perform rule condition matching on the second rewritten answer data, that is, to match the second rewritten answer data with preset land acquisition and demolition rule conditions to determine whether the second rewritten answer data meets the relevant land acquisition and demolition rules. Accordingly, when it is determined that the matching is successful, that is, a rule condition corresponding to the second rewritten answer data is matched in the preset land acquisition and demolition rule conditions, this embodiment of the invention retains the second rewritten answer data. Conversely, when it is determined that the matching result is a failure, it means that the second rewritten answer data does not conform to the relevant land acquisition and demolition rules, this embodiment of the invention filters the second rewritten answer data, thereby constructing the second question-and-answer rewritten dataset.

[0148] For example, such as Figure 2 As shown in the figure, in order to avoid the rewritten answers from not meeting the requirements, the first question-and-answer rewriting dataset is subjected to format filtering and rule content matching. The specific code is as follows:

[0149] def answer_rewrite_filter(a_i,pos_a_i):#a_i is a i pos_a_i is the rewritten answer, i.e., pos_a i

[0150] regex = r"^<rule_based>([^<]*(?:<(?! / ?rule_based>)[^<]*)*)<\ / rule_based>$"

[0151] match = re.search(regex, pos_a_i, re.DOTALL) # Use regular expressions for matching

[0152] if match is None or len(match.groups())! =2:

[0153] remain = 0 # If the format is incorrect, set it to 0

[0154] else:

[0155] remain = 1 # If the format is correct, set it to 1

[0156] except Exception:

[0157] remain = 0 # Set to 1 if an exception occurs

[0158] # Define a regular expression pattern to match the <rule based> tag.

[0159] match = re.search(r"<rule basis>(.*?)<\ / rule basis>",pos_a_i)

[0160] If match is None:

[0161] remain = 0 # If no tag is matched, set to 0

[0162] else

[0163] answer = match.group(1).strip() # Extract the content from the <rule basis> tag.

[0164] remain = 0 if answer! = a_i else 1 # If the content is different from a_i, then it is 0; otherwise, it is 1.

[0165] return remain;

[0166] Accordingly, for each rewritten answer, if answer_rewrite_filter(a i ,pos_a i If the value is 1, the answer is retained; if it is 0, it is discarded. This embodiment of the invention filters all rewritten answers sequentially, ultimately obtaining a new dataset RW = {(q...} 11 ,a1,pos_a1),...,(q 1m ,a1,pos_a1),...,{(q i1 ,a i ,pos_a i ),...,(q im ,a i ,pos_a i )}, that is, the second question and answer rewrite dataset.

[0167] In some embodiments of the present invention, a positive and negative sample dataset is constructed from the second question-answer rewriting dataset using a pre-trained language model, including but not limited to the following steps:

[0168] Negative sample data is generated from the second question-and-answer rewrite dataset using a pre-trained language model.

[0169] The positive and negative sample datasets are constructed based on the negative sample data and the second question-and-answer rewrite dataset.

[0170] In this specific embodiment, the embodiments of the present invention generate negative samples through a pre-trained language model to construct a positive and negative sample dataset. Specifically, the pre-trained language model in the embodiments of the present invention refers to the large model PLM to be fine-tuned. Among them, although the pre-trained language model in the embodiments of the present invention does not contain specific expropriation and land expertise, it contains relevant basic constraint rules. Therefore, the embodiments of the present invention use the pre-trained language model to rewrite the question data in the dataset according to the second question and generate corresponding answers, and use this answer as negative sample data. Exemplarily, for each q ij , the embodiments of the present invention can obtain the corresponding answer neg_a ij through the large model PLM to be fine-tuned and the corresponding prompt template. The specific prompt template is as follows:

[0171] You are an expert in land expropriation. Please answer according to the following question.

[0172] <Question>

[0173] {{q ij}}

[0174] < / Question>

[0175] Please answer according to the above question. Note that the length of the answer should be controlled between {{int(0.5*len(a i ))}} and {{int(1.5*len(a i ))}}, and write your answer within the <Answer> tag.

[0176] Next, for each q ij in the second question-answer rewritten dataset, combined with the generated neg_a ij , the positive and negative sample dataset PN = {(q 11 , pos_a1, neg_a 11 ),...,(q 1m , pos_a1, neg_a 1m ),...,{(q i1 , pos_a i , neg_a i1 ),...,(q im , pos_a i , neg_a im )} can be reconstructed.

[0177] In some embodiments of the present invention, the pre-trained language model is trained through a preset optimization algorithm according to the positive and negative sample dataset to generate a target large language model, including but not limited to the following steps:

[0178] The positive and negative sample datasets are input into a pre-trained language model, and the loss data is calculated based on the model's output using a preset cross-entropy loss function. This preset cross-entropy loss function is constructed based on the probability of positive sample generation.

[0179] Based on the loss data, the model parameters are adjusted using a low-rank adaptation algorithm to construct the target large language model.

[0180] In this specific embodiment, the present invention optimizes the loss function of the direct preference optimization algorithm by using the positive sample generation probability to obtain a preset cross-entropy loss function. Then, it calculates the loss function on the output of the pre-trained language model to obtain the corresponding loss data. Finally, it adjusts the model parameters of the pre-trained language model using the Low-Rank Adaptation (LoRA) algorithm to generate the target large language model. Specifically, since the general direct preference algorithm guides the model output to meet the requirements by calculating the log probability of positive and negative samples and converting it to a value on [0,1] using the sigmoid function, its loss function is the loss value of the difference model. Its most direct effect is to increase pos_a. i and neg_a i The difference is negligible, but it does not guarantee pos_a i Because it can be sampled, it easily leads to model instability during training. In online training algorithms like RLHF, if model training encounters problems, some answers that don't conform to the language model are sampled, allowing the reference model to be constrained by a large KL loss value. However, DPO is essentially an offline training algorithm without a sampling process; therefore, in calculating π... ref When (y|x), it can even be pre-calculated before training, leading to chaotic model output results that the reference model cannot know, thus failing to provide sufficient constraints. Therefore, this invention proposes a new DPO method, GDPO (Generation DPO), which includes the probability of positive sample generation, i.e., a pre-defined optimization algorithm, whose loss function is shown in equation (4) below:

[0181]

[0182] Wherein, π θ and π ref Let x and y represent the model being trained and the reference model with its parameters frozen, respectively. w and y l These represent the positive and negative sample datasets PN, respectively, containing the question q. ij The prompt message indicates a good answer to pos_a. i And the poor answer, neg_a ijσ is the sigmoid function, and α∈[0,1] and β∈[0,1] are weighting factors used to adjust the influence of the loss function value. Accordingly, this embodiment of the invention samples the cross-entropy loss, calculates the return result with the same dimension as the input, and then uses a loss_mask to not calculate the loss of the prompt part, that is, only the loss of the model-generated result in response to y. w The loss function value on.

[0183] Furthermore, due to the limited amount of data, this embodiment of the invention employs LoRA during fine-tuning. For example, in this embodiment, the rank r of the LoRA parameter is set to 8 by default, and the scaling factor lora_alpha is set to 16. The goal of model training is to minimize the loss function value L. DPO The learning rate during fine-tuning is 5e-5, with a total of 10 training epochs, and the Adam optimizer is used. Furthermore, the value of β ranges from 0.1 to 0.5; in this embodiment, β is set to 0.3. Correspondingly, the batch size during training is 32. Additionally, in this embodiment, the large model can use Deepseek-R1 or Qwen2.5-70b, while Qwen2.5-32b is used for fine-tuning the large model.

[0184] It should be noted that this embodiment of the invention constructs a reinforcement learning training method for a large-scale land acquisition and demolition question-and-answer model oriented towards question diversity by using preset land acquisition and demolition rules and business knowledge data. This method aims to construct a target large-scale language model that conforms to the application scenarios of land acquisition and demolition business. By improving the training effect and business knowledge fusion capability of the large-scale model, the accuracy of user answers is improved. Specifically, this embodiment of the invention automatically constructs training data for a large-scale land acquisition and demolition question-and-answer model oriented towards question diversity through question generation and answer rewriting. Based on this, iterative training of the large-scale model is performed through an improved reinforcement learning method to obtain the target large-scale language model, which is then used to process the land acquisition and demolition data to be processed. This method, through question generation and answer rewriting, effectively avoids the problem of severe lack of labeled data in actual business scenarios. The improved pure reinforcement learning method also effectively improves the effect of reinforcement learning training of the large-scale model, enhances the stability of large-scale model training, and thus effectively improves the accuracy and correctness of answers to land acquisition and demolition business questions.

[0185] In the experiment, this embodiment of the invention used 300 manually labeled data points as the test set TS, and these data were not directly used in the training of the large model. The experimental results are shown in Table 1 below. In the table, "this method" refers to the results obtained after applying the above method to wen2.5-32b.

[0186] Table 1

[0187]

[0188]

[0189] It is readily understood that the land acquisition and demolition data processing method provided in this embodiment of the invention is simple to implement and does not introduce a complex manual annotation process, thus possessing strong adaptability and transferability. Furthermore, the improved DPO method in this embodiment can enhance the stability of model training, and increasing the probability of positive samples can better improve the model's ability to learn professional and domain knowledge during training, thereby further improving the accuracy of the question-answering system and significantly reducing the illusion of large models in specific domains and business scenarios. Correspondingly, it also has excellent effects on knowledge fusion and reinforcement learning training in other domains, demonstrating superior universality.

[0190] Please see Figure 3 This application also provides a land acquisition and demolition data processing system, which can implement the above-mentioned land acquisition and demolition data processing method. The system includes:

[0191] The first module 210 is used to obtain the land acquisition and demolition business dataset in order to generate a question set based on the land acquisition and demolition business dataset.

[0192] The second module 220 is used to preprocess the question set to generate a question-answer dataset.

[0193] The third module 230 is used to rewrite the answers based on the question-and-answer dataset using a preset large language model, generating the first question-and-answer rewritten dataset.

[0194] The fourth module 240 is used to filter the first question-and-answer rewrite dataset using preset filtering conditions to obtain the second question-and-answer rewrite dataset.

[0195] The fifth module, 250, is used to construct positive and negative sample datasets from the rewritten dataset based on the second question and answer using a pre-trained language model.

[0196] Module 6, 260, is used to train a pre-trained language model using a preset optimization algorithm based on positive and negative sample datasets, generating a target large language model. The preset optimization algorithm is obtained by optimizing the direct preference optimization algorithm based on the positive sample generation probability.

[0197] Module 7, 270, is used to input the land acquisition and demolition data to be processed into the target large language model for data processing, and obtain the target processing result.

[0198] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0199] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described land acquisition and demolition data processing method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0200] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0201] Please see Figure 4 , Figure 4 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0202] The processor 310 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, 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 this application.

[0203] The memory 320 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 320 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 320 and is called and executed by the processor 310 to execute the land acquisition and demolition data processing method of the embodiments of this application.

[0204] Input / output interface 330 is used to realize information input and output;

[0205] The communication interface 340 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0206] Bus 350 transmits information between various components of the device (e.g., processor 310, memory 320, input / output interface 330, and communication interface 340);

[0207] The processor 310, memory 320, input / output interface 330 and communication interface 340 are connected to each other within the device via bus 350.

[0208] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described land acquisition and demolition data processing method.

[0209] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0210] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0211] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0212] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0213] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0214] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0215] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0216] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0217] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0218] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0219] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0220] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0221] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for processing land acquisition and demolition data, characterized in that, The method includes the following steps: Obtain the land acquisition and demolition business dataset, and generate a set of questions based on the land acquisition and demolition business dataset; The question set is preprocessed to generate a question-and-answer dataset; Based on the question-and-answer dataset, the answers are rewritten using a preset large language model to generate the first question-and-answer rewritten dataset. The first question-and-answer rewriting dataset is filtered using preset filtering conditions to obtain the second question-and-answer rewriting dataset. Based on the second question-and-answer rewrite dataset, a positive and negative sample dataset is constructed using a pre-trained language model; The pre-trained language model is trained using a preset optimization algorithm based on the positive and negative sample datasets to generate a target large language model; wherein the preset optimization algorithm is obtained by optimizing the direct preference optimization algorithm based on the positive sample generation probability. The land acquisition and demolition data to be processed is input into the target large language model for data processing to obtain the target processing result.

2. The method according to claim 1, characterized in that, The step of obtaining the land acquisition and demolition business dataset, and generating a question set based on the land acquisition and demolition business dataset, includes: Obtain the land acquisition and demolition business dataset; wherein, the land acquisition and demolition business dataset includes several text data of responses to land acquisition and demolition business; Based on the text data of the land acquisition and demolition business responses, preset prompt words are constructed, and then corresponding question text data is generated through the preset large language model based on the preset prompt words. The question set is constructed based on the question text data.

3. The method according to claim 2, characterized in that, The preprocessing of the question set to generate a question-answer dataset includes: Two question text data are randomly selected from the question set to obtain a question text pair; The question text pair is segmented using a preset word segmentation tool to obtain a set of basic text units; The repetition probability of the question text pair is calculated based on the set of basic text units to obtain repetition probability data; The question and answer dataset is generated by filtering the question text data based on the repetition probability data.

4. The method according to claim 1, characterized in that, The step of generating a first question-and-answer rewritten dataset by rewriting answers using a preset large language model based on the question-and-answer dataset includes: Based on the text data of land acquisition and demolition questions in the question-and-answer dataset, the answers are rewritten using the preset large language model to obtain answer variant data; The land acquisition and demolition business response text data corresponding to the land acquisition and demolition question text data in the question and answer dataset is used as land acquisition and demolition rule information. Then, the first question and answer rewriting dataset is constructed based on the response variant data, the land acquisition and demolition question text data and the land acquisition and demolition rule information.

5. The method according to claim 1, characterized in that, The step of filtering the first question-and-answer rewriting dataset using preset filtering conditions to obtain the second question-and-answer rewriting dataset includes: The first rewritten answer data in the first question-and-answer rewritten dataset is format-filtered to obtain the second rewritten answer data; The second rewritten response data is matched with the preset collection and demolition rule conditions using a regular expression matching algorithm to obtain the matching result; Once the matching result is determined to be a successful match, the second rewritten answer data is retained, thereby constructing the second question-and-answer rewritten dataset.

6. The method according to claim 1, characterized in that, The positive and negative sample datasets are constructed using a pre-trained language model based on the second question-answer rewriting dataset, including: Based on the second question-and-answer rewrite dataset, negative sample data is generated using a pre-trained language model; A positive and negative sample dataset is constructed based on the negative sample data and the second question-and-answer rewrite dataset.

7. The method according to claim 1, characterized in that, The step of training the pre-trained language model using a preset optimization algorithm based on the positive and negative sample datasets to generate the target large language model includes: The positive and negative sample datasets are input into the pre-trained language model, and then the loss data is calculated based on the model output using a preset cross-entropy loss function; wherein, the preset cross-entropy loss function is constructed based on the positive sample generation probability; The target large language model is constructed by adjusting the model parameters using a low-rank adaptation algorithm based on the loss data.

8. A land acquisition and demolition data processing system, characterized in that, The system includes: The first module is used to acquire the land acquisition and demolition business dataset, and to generate a set of questions based on the land acquisition and demolition business dataset; The second module is used to preprocess the question set to generate a question-and-answer dataset; The third module is used to rewrite the answers based on the question-and-answer dataset using a preset large language model, and generate the first question-and-answer rewritten dataset. The fourth module is used to filter the first question-and-answer rewrite dataset according to preset filtering conditions to obtain the second question-and-answer rewrite dataset. The fifth module is used to construct a positive and negative sample dataset based on the second question-and-answer rewrite dataset using a pre-trained language model; The sixth module is used to train the pre-trained language model using a preset optimization algorithm based on the positive and negative sample datasets to generate a target large language model; wherein the preset optimization algorithm is obtained by optimizing the direct preference optimization algorithm based on the positive sample generation probability; The seventh module is used to input the land acquisition and demolition data to be processed into the target large language model for data processing, and obtain the target processing result.

9. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method as described in any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.

Citation Information

Cited By

  • Question and answer method and device based on large language model, equipment and medium

    CN121936631A