Targeted vertical domain large model optimization method, device and equipment

By constructing a sample pool containing general and vertical domain data, training a large model and identifying knowledge blind spots, the problem of insufficient knowledge in vertical domains of multimodal large language models is solved, and the model's reasoning ability and adaptability in vertical domains are improved.

CN122287707APending Publication Date: 2026-06-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2026-05-13
Publication Date
2026-06-26

Smart Images

  • Figure CN122287707A_ABST
    Figure CN122287707A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and device for optimizing a large model targeting a specific vertical domain, belonging to the field of artificial intelligence. The method includes: acquiring a sample pool, which includes general domain data and vertical domain data; constructing current-round training data based on the sample pool, and training an initial large model based on the current-round training data to obtain a target large model; constructing test questions for the vertical domain data based on the technical standards of the target vertical domain; generating response results for the test questions using the target large model; determining domain knowledge blind spots from the vertical domain data based on the understanding of the technical standards based on the response results; updating the current-round training data based on the domain knowledge blind spots to obtain the next-round training data, and training the target large model again based on the updated next-round training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular to a method, apparatus and device for large-scale model optimization for a target vertical domain. Background Technology

[0002] Multimodal Large Language Model (MLLM) is a significant breakthrough in the field of artificial intelligence in recent years. With its powerful language understanding and generation capabilities, MLLM has achieved remarkable results in multimodal natural language processing tasks such as intelligent question answering, text generation, and machine translation, and is widely empowering various intelligent applications.

[0003] In related technologies, MLLM is pre-trained with massive amounts of cross-domain multimodal knowledge to generate corresponding large models. These large models have powerful cross-domain reasoning capabilities, can understand and integrate input information from multiple modalities, and generate answers to questions related to multimodal information.

[0004] However, in order to ensure the generalization ability of the large model, the vertical domain knowledge corresponding to the cross-domain knowledge base is insufficient at the same order of magnitude. This may result in a knowledge blind spot when answering questions in a specific vertical domain, leading to inference results that do not match the actual needs. How to improve the understanding of vertical domain knowledge of the large model while ensuring the generalization ability of the target large model is a problem that needs to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, and device for optimizing large models targeting a specific vertical domain. The technical solution includes: According to one aspect of this application, a large-scale model optimization method for a target vertical domain is provided, the method comprising: Obtain a sample pool, which includes general domain data and vertical domain data; The current round of training data is constructed based on the sample pool, and the initial large model is trained based on the current round of training data to obtain the target large model; Construct test questions for vertical domain data based on the technical standards of the target vertical domain; generate response results for the test questions using the target large model; and identify domain knowledge blind spot samples from the vertical domain data based on the understanding of the technical standards based on the response results. The next round of training data is obtained by updating the current round of training data based on domain knowledge blind spot samples, including: adding domain knowledge blind spot samples to the sample pool, removing vertical domain data that the target large model has fully understood from the sample pool; and training the target large model again based on the updated next round of training data.

[0006] According to another aspect of this application, a large model optimization apparatus oriented towards a target vertical domain is provided, the apparatus comprising: The sampling module is used to acquire a sample pool, which includes general domain data and vertical domain data. The training module is used to construct the current round of training data based on the sample pool, and to train the initial large model based on the current round of training data to obtain the target large model; The evaluation module is used to construct test questions for vertical domain data based on the technical standards of the target vertical domain; generate response results for the test questions using the target large model; and identify domain knowledge blind spots from the vertical domain data based on the understanding of the technical standards based on the response results. The training module is used to update the current round of training data based on domain knowledge blind spot samples to obtain the next round of training data. This includes: adding domain knowledge blind spot samples to the sample pool, removing vertical domain data that the target large model has fully understood from the sample pool, and training the target large model for the next round based on the updated next round of training data.

[0007] According to another aspect of this application, a computer device is provided, comprising: a processor and a memory, wherein the memory stores at least one computer program, the at least one computer program being loaded and executed by the processor to implement the target vertical domain-oriented large model optimization method as described in the various aspects above.

[0008] According to one aspect of this application, a computer-readable storage medium is provided that stores at least one program, which is loaded and executed by a processor to implement the target vertical domain-oriented large model optimization method of the above aspects.

[0009] According to one aspect of this application, a chip is provided that includes programmable logic circuits or program instructions, which, when the chip is running, implement a large-scale model optimization method for the target vertical domain as described above.

[0010] The technical solution provided in this application can bring at least the following beneficial effects: This application provides a method for optimizing a large model targeting a specific vertical domain. It addresses the problem of mismatched generated or judged content due to insufficient understanding of vertical domain knowledge by the large model. During model training, the large model is trained using both general domain data and vertical domain data. Based on the large model's understanding of vertical domain knowledge, domain knowledge blind spots are identified, and these blind spots are input into at least one subsequent round of model optimization training. This allows the target large model to focus on learning the vertical domain knowledge corresponding to the blind spots during subsequent training. In the event of dynamic changes in the vertical domain, the target large model can quickly identify the changed target knowledge blind spots and retrain and optimize them. This significantly improves the large model's understanding or reasoning ability regarding vertical domain knowledge and reduces the computational cost of training all sample data in each training or fine-tuning process. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 An architectural diagram of a computer system provided in an exemplary embodiment of this application is shown; Figure 2 This illustration shows an overview diagram of a large model optimization method for a target vertical domain provided in an exemplary embodiment of this application; Figure 3 A flowchart illustrating a large-scale model optimization method for a target vertical domain provided in an exemplary embodiment of this application is shown. Figure 4 A schematic diagram of a large model optimization method for a target vertical domain provided in an exemplary embodiment of this application is shown; Figure 5 A flowchart illustrating a large-scale model optimization method for general domains provided in an exemplary embodiment of this application is shown. Figure 6 This illustration shows a schematic diagram of sample pool updating provided in an exemplary embodiment of this application; Figure 7 A flowchart illustrating sample pool updating provided in an exemplary embodiment of this application is shown; Figure 8 This illustration shows a schematic diagram of filtering labeled data according to an exemplary embodiment of this application; Figure 9This illustration shows a schematic diagram of filtering unlabeled data according to an exemplary embodiment of this application; Figure 10 This illustration shows a schematic diagram of sample data distillation provided in an exemplary embodiment of this application; Figure 11 A flowchart illustrating a large-scale model optimization method for a target vertical domain provided in an exemplary embodiment of this application is shown. Figure 12 This illustration shows the overall process flow of a large-scale model optimization method for a target vertical domain provided in an exemplary embodiment of this application; Figure 13 This is a structural block diagram of a large model optimization device for a target vertical domain provided in an exemplary embodiment of this application; Figure 14 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0014] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0015] The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0016] It should be understood that although the terms first, second, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0017] It should be noted that this application may display prompts, pop-ups, or output voice messages before and during the collection of user data. These prompts, pop-ups, or voice messages are used to inform the user that their data is being collected. This ensures that the application only begins the steps for collecting user data after receiving confirmation from the user regarding the prompt or pop-up; otherwise (i.e., without user confirmation), the steps for collecting user data end, meaning no user data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of this user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0018] First, let's introduce the relevant terms used in this application: Vertical industry A vertical domain is a field that focuses on a specific industry, profession, or task scenario, and has clear boundaries and in-depth knowledge requirements.

[0019] Vertical domains emphasize professional depth, terminology systems, business logic, and domain-specific data distribution. Embodiments of this application require the artificial intelligence system to possess a full understanding of the professional knowledge, business processes, rule constraints, and specific terminology within that domain. This vertical domain can be a specific industry such as healthcare, finance, education, or security, or it can be a specific task within a given business scenario, such as information security assessment in network communication.

[0020] General Field A general domain is a domain that is open to a wide range of general or cross-domain scenarios and has an open boundary and a universal knowledge system.

[0021] The general domain emphasizes basic cognition, common language norms, cross-scenario adaptability, and widely distributed common-sense data. Embodiments of this application require the artificial intelligence system to have a full understanding and application capability of the general knowledge, business logic, universal rules, and common terminology within this domain. This general domain can be a general knowledge question-and-answer framework covering multiple scenarios in life, work, and study, or it can be a cross-industry common basic business processing task, such as text classification, language translation, or basic logical reasoning.

[0022] Large Language Model (LLM) LLM refers to an artificial intelligence model that is based on deep learning technology, trained on massive cross-domain knowledge bases, and capable of understanding the semantics, syntax, logic and discourse structure of natural language, and automatically generating coherent and fluent answers based on specified prompts.

[0023] The core objective of Large Language Models (LLMs) is to model and generate natural language by learning statistical patterns, structures, and semantic relationships within language, thereby enabling the completion of various natural language tasks. Large language models contain a vast number of parameters used to learn complex patterns in language data and support autoregressive generation and contextual reasoning.

[0024] At the technical level, LLM typically employs a neural network architecture (such as Transformer) with self-attention mechanism at its core. It is pre-trained on large-scale, multi-domain text corpora through self-supervised learning to achieve one or more tasks, including but not limited to text summarization, translation, and sentiment analysis.

[0025] Multimodal Large Language Model (MLLM) MLLM refers to an artificial intelligence model that is based on deep learning technology, trained on data containing at least two modalities such as text, images, audio, and video, and is able to understand and associate the semantic and contextual relationships of information from different modalities, and automatically generate coherent and accurate multimodal answers or descriptions based on specified prompts or input modal content.

[0026] The core objective of MLLM is to learn patterns in cross-modal data to model and generate multimodal information, thereby enabling multimodal interactive tasks involving multiple perceptual channels, such as image description, visual question answering, image-text reasoning, and video understanding. MLLM not only includes a large number of parameters to capture complex patterns within a single modality, but also possesses a cross-modal attention mechanism, supporting collaborative reasoning and generation in multimodal contexts.

[0027] At the technical level, MLLM typically uses a large language model as a foundation, introducing perceptual modules such as visual encoders and audio encoders, and achieving intermodal alignment and fusion in a unified semantic space through self-attention or cross-attention mechanisms. The model often employs a multi-stage training strategy, first pre-training on single-modal data, and then fine-tuning on multimodal data.

[0028] Expert Model (EM) EM refers to an artificial intelligence model that possesses deep expertise and optimized performance in a specific vertical domain or task through fine-tuning, knowledge injection, or skill encapsulation. Through targeted training or architectural design, it significantly outperforms general-purpose models in reasoning or response within a specific vertical domain.

[0029] EM is mainly used to solve the problems of insufficient professional knowledge, high risk of illusion, and uncontrollable output of general large models in vertical domains. EM is a large model that has been fine-tuned with specified data, or an artificial intelligence agent that integrates a knowledge base and toolchain of a specified vertical domain.

[0030] In the embodiments of this application, EM mainly includes prediction models with different prediction preferences that are trained by adjusting the ratio of target vertical domain data to general domain data during training.

[0031] Knowledge blind spots Knowledge blind spots refer to areas of information that large model systems cannot correctly understand or process due to limitations in training data, algorithm models, or cognitive structures.

[0032] In some embodiments, the knowledge blind spot is also referred to as a cognitive blind spot or unused experience; alternatively, the knowledge blind spot manifests as the large model producing illusions or erroneous outputs in a specified vertical domain; or, when the data in the specified vertical domain is updated or changed, the large model, due to the lag in training data, produces illusions or erroneous outputs in the updated knowledge region, which is not limited in this application.

[0033] Technical Standards Technical standards are normative documents that contain specific technical parameters and compliance requirements. They serve as the objective basis for judging whether a technical solution meets the standards or whether a product is compliant.

[0034] Technical standards, also known as technical specifications, are a collection of technical requirements. They typically include one or more of the following: detailed technical specifications, design guidelines, testing methods, performance indicators, interface protocols, and compatibility requirements for a product, service, process, or system. The aim is to ensure the operability, compatibility, security, and reliability of different products or systems through a unified technical framework.

[0035] In this embodiment of the application, the technical standard is a benchmark used to indicate the degree of understanding of the vertical domain by a specified large model. By performing confidence analysis on the response results of the large model to the specified problem and the corresponding information of the technical standard, it is determined whether the output of the large model is correct or conforms to the technical standard.

[0036] Label Labels are semantic information attached to data that represents the true attributes or expected results of a sample.

[0037] Labels are the core reference benchmark and optimization target during model training. Labels give the raw data clear semantic information, enabling large models to correct their parameters by calculating the difference between predicted values ​​and true labels, thereby obtaining the mapping pattern between input features and output results and achieving accurate reasoning about unknown data.

[0038] Risk Sample Risk samples are specified data used to assess potential security vulnerabilities or functional failures in artificial intelligence systems throughout their entire lifecycle.

[0039] Risk samples are used to systematically expose uncertainties in data quality, large model inference logic, and system architecture, providing an empirical basis for risk assessment and compliance verification. When data is identified as a risk sample, the system needs to further process it to determine whether to discard the data. As a risk probe in artificial intelligence technology, risk samples ensure the credibility of data used for training or prediction by proactively revealing and quantifying risks.

[0040] Figure 1 A structural block diagram of a computer system provided in an exemplary embodiment of this application is shown. The computer system 100 includes: a terminal 110 and a server 120.

[0041] The terminal 110 in this application is installed and / or runs on a terminal 110 that supports multimodal large language model interaction. Optionally, the interaction of the multimodal large language model includes at least one of intelligent dialogue applications, code assistants, and vertical domain artificial intelligence (AI) applications. The terminal 110 can receive prompts from system-generated and / or manually designed prompts. In response to at least one received prompt, the terminal 110 encapsulates the corresponding prompt and corresponding data into a data packet and sends it to the server 120 via the network. The server 120 processes the data packet using the multimodal large language model based on the received corresponding prompt to obtain the model-generated response content. Subsequently, the server 120 feeds back the generated response content to the terminal 110 via the network. The terminal 110 outputs a specified application service based on the received response content, including at least one of text creation, code writing, data analysis, and knowledge question answering.

[0042] Optionally, the device type corresponding to the terminal 110 that calls the multimodal large language model may be the same or different. This device type includes at least one of the following: smartphone, tablet, laptop, personal computer (PC), smart home appliance, smart voice interaction device, unmanned vending terminal, wearable device, and vehicle terminal; or the terminal 110 may be a client that has installed a specified target application (App). This target application may be a security detection application for the multimodal large language model, or other applications that provide security detection functions for the multimodal large language model. This application embodiment does not limit the specific application type. Furthermore, this application embodiment does not limit the form of the target application, including but not limited to at least one of the following: applications, mini-programs, and web clients installed on the terminal 110.

[0043] In this application, terminal 110 is connected to server 120 via a wireless network or a wired network.

[0044] Figure 1 The diagram illustrates three possible terminal access methods. It is possible that multiple other terminals 110 may access the server 120 in different embodiments. Optionally, one or more developer terminals 110 (not shown) may also be present. These developer terminals 110 are equipped with a model fine-tuning platform, prompt word debugging tools, or a training and / or debugging environment for a multimodal large language model application. In response to editing and updating the configuration, prompt words, and database content of the multimodal large language model in the developer terminal 110, the updated configuration or fine-tuned version of the model is transmitted to the server 120 via a wired or wireless network. Other terminals 110 can then obtain the updated model or the corresponding model-driven application functions through the server 120.

[0045] The server 120 in this application includes at least one of a single server, a server cluster, a cloud computing platform, a graphics processing unit (GPU) cluster, and a virtualization center. Server 120 provides backend services for multimodal large language model interaction, including one or more of model inference, user management, session maintenance, and content security auditing. Optionally, server 120 can be at least one corresponding node in a blockchain system.

[0046] In an illustrative example, server 120 includes at least one of the following: an input / output (I / O) interface 121, a processor 122, and a model service and scheduling module 123. The I / O interface 121 is used to establish communication with terminal 110 via a wireless or wired network, receive prompts or data packets input by the user, and return response content generated by the model. The processor 122 is used to load or process at least one instruction received or generated by server 120; and / or to provide inference computing services to model service and scheduling module 123. Model service and scheduling module 123 is used to provide inference services for multimodal large language models, including but not limited to at least one of the following: model training or iteration, multi-model collaboration (such as joint inference of multiple models), context management and memory maintenance, and execution of specified inference strategies (such as security rules).

[0047] Optionally, server 120 undertakes the main computing tasks (such as large model inference), and terminal 110 undertakes the secondary computing tasks (such as input acquisition and result rendering); or, server 120 and terminal 110 can use a distributed computing architecture for collaborative computing, for example, the terminal device can run a small model for preprocessing, and the server can run a large model for complex inference.

[0048] In the following description, "large language model" or "large model" can also be understood as at least one of multimodal large language model, text large language model, and vision language model (VLM). For example, the preset large language model is a specified multimodal large language model trained on preset data, or the target large model is a target multimodal large language model trained on a specified dataset.

[0049] The large model optimization method for a target vertical domain provided in this application is illustrated using a computer device as the execution subject of each step. Here, a computer device refers to an electronic device capable of data computation, processing, and storage. It should be understood that this example of using a computer device is merely one specific application scenario of this application and is not intended to limit the scope of protection of this application. That is, the large model optimization method for a target vertical domain can also be applied to other electronic devices with large model interactions, including but not limited to at least one of smartphones, tablets, personal computers, smart home appliances, and wearable devices.

[0050] MLLM represents a significant breakthrough in artificial intelligence in recent years. Leveraging its powerful language understanding and generation capabilities, MLLM has achieved remarkable results in natural language processing tasks such as intelligent question answering, text generation, and machine translation, and is increasingly empowering various intelligent applications. In this technology, MLLM generates a large-scale model through pre-training in a massive cross-domain knowledge base. This large model possesses strong cross-domain reasoning capabilities, understanding and fusing input information from multiple modalities, and generating answers to questions related to these multimodal information. However, to ensure the generalization ability of this large model, the vertical domain knowledge corresponding to the cross-domain knowledge base may be insufficient at the same scale. This can lead to knowledge gaps when answering questions in a specific vertical domain, resulting in inference results that do not match actual needs. Therefore, improving the large model's understanding of vertical domain knowledge while ensuring its generalization ability is a problem that needs to be solved.

[0051] Based on this, in order to solve the problems existing in the related technologies, this application provides a large model optimization method for a target vertical domain. Figure 2 This diagram illustrates an overview of a large-scale model optimization method for a target vertical domain, provided in one embodiment of this application, which is executed by a computer device.

[0052] Combination Figure 2 The large model optimization method for the target vertical domain, as described in this application, will be explained as follows: In some embodiments, to improve the reasoning ability of the target large model in a target vertical domain while maintaining its general capabilities, the training data for training the target large model includes both general domain data and vertical domain data. Optionally, the data is stored in a dynamic sample pool, and samples are taken from the dynamic sample pool as the training dataset for subsequent models when training the target large model. The data in the dynamic sample pool can be manually selected, supplemented, and updated, and / or obtained from publicly available online data. Furthermore, to ensure the reasoning ability of the target model, the dynamic sample pool also includes domain knowledge blind spots and / or necessary samples from the target large model training process. Among them, domain knowledge blind spot samples refer to sample data that the large model system cannot correctly understand or process due to limitations in training data, algorithm models, or cognitive structures. Necessary samples are samples that contain key information or have an irreplaceable role in improving the model's generalization ability and are therefore given priority or focus. Optionally, necessary samples include necessary samples corresponding to general domains and / or vertical domains. The following description will use general necessary samples corresponding to general domains as an example. The dynamic sample pool can actively feed back update requests to the system's data update module based on domain knowledge blind spot samples and / or general necessary samples. This update request is used to instruct the data update module to supplement or update the original data (including various data and / or technical standard information corresponding to various domains) corresponding to domain knowledge blind spot samples or general necessary samples according to the dynamic data update mechanism. Preprocessing is performed on the latest or specified original data, including cleaning, screening, and distillation, to obtain high-quality samples and store them in the dynamic sample pool. For example, when the target large model determines that at least one received question-and-answer session includes samples from domain knowledge blind spots, the target large model sends feedback to the data update module, requesting the data update module to retrieve and / or supplement the relevant data indicated as samples from domain knowledge blind spots based on a dynamic data update mechanism. The obtained updated data is then added to the original data, and high-quality sample data is obtained through cleaning, filtering, and distillation steps. Details of the aforementioned dynamic sample pool will be described in detail in subsequent chapters and will not be repeated here.

[0053] In some embodiments, the system samples a dynamic sample pool, including: randomly sampling, sorting, or deduplicating the dynamic sample pool to obtain corresponding sample data; constructing the sample data to obtain subsequent training data; and training an initial large model based on the training data to obtain a target large model. Optionally, the initial large model is a general-purpose MLLM that has not undergone iterative training, or the initial large model is a target large model that has undergone at least one round of iterative training. Iterative training means that at least two rounds of target large model training are performed during the training process to ensure the inference capability of the target large model in the target vertical domain. Details of the above model training and sample data construction are described in subsequent chapters and will not be repeated here.

[0054] In some embodiments, to verify the target large model's ability to understand or reason about sample data, corresponding test questions are constructed based on general domain data and / or vertical domain data. The target large language model generates response results for these test questions. Based on the matching degree between the response results and the corresponding standard answers, the target large model's ability to understand or reason about the sample data is determined. Specifically, for general domain data, the test questions and standard answers are determined based on one or more of a specified test dataset and a public question-and-answer dataset. The response results and standard answers corresponding to the general domain data are input into an arbitration model for correctness and / or consistency judgment. When the response result corresponding to the general domain data is judged as a negative sample (i.e., inconsistent and incorrect), the corresponding general domain data is identified as a general necessary sample and updated or supplemented into the dynamic sample pool for at least one subsequent round of iterative training. For vertical domain data, the test questions and standard answers are generated based on extracted vertical domain technical standards. When the matching degree (including semantic similarity, numerical accuracy, and conditional completeness) between the response results and the corresponding standard answers is low, the corresponding vertical domain data is identified as a domain knowledge blind spot sample and updated or supplemented into the dynamic sample pool for at least one subsequent round of iterative training. In subsequent explanations, "domain knowledge blind zone samples" and / or "generally necessary samples" are used to indicate the general domain data and / or vertical domain data corresponding to at least one low-matching response determined by the target large model during at least one round of training iterations. This can also be understood as one or more data points in the current round of training data that are indicated to need to be added to subsequent training iterations. The determination of domain knowledge blind zone samples and / or generally necessary samples is performed in parallel; and / or, the determination of domain knowledge blind zone samples and / or generally necessary samples is performed in a specified order. Figure 2 The positional relationship between the domain knowledge blind spot samples and / or general necessity samples is not used to indicate the order in which they are executed. Details regarding the model training and sample data construction described above will be provided in subsequent chapters and will not be repeated here.

[0055] In some embodiments, the dynamic sample pool performs at least one subsequent round of iterative training based on the updated and / or supplemented dynamic sample pool. This at least one round of iterative training is used to enhance the target large model's understanding of general necessary samples and samples in the domain knowledge blind spots, so as to improve the understanding of the target vertical domain while ensuring the general capabilities of the target large model. The details of the updating and iterative training of the dynamic sample pool are described in detail in subsequent chapters, and will not be repeated here.

[0056] Optionally, upon meeting a preset termination condition, the target large model stops iterative training, and the output of the target large model that meets the preset termination condition is used as the final target large model. The final large model is used to interact with the large model of at least one terminal associated with it via a wired network and / or a wireless network. The preset termination condition includes at least one of the following: the number of iterations reaches a preset maximum number of iterations; the total number of domain knowledge blind spot samples and general necessity samples is less than a preset sample number threshold; the performance improvement of the target large model on the evaluation set is less than a preset performance improvement threshold. The preset performance improvement threshold and / or the preset sample number threshold and / or the maximum number of iterations are fixed values ​​based on manual input. For example, the preset performance improvement threshold ranges from 0.5% to 3%, the preset sample number threshold is 400,000, and the maximum number of iterations is 10. These parameters can be dynamically adjusted based on different iteration processes.

[0057] In the subsequent explanation, taking ecological security as the target vertical field as an example, the technical standards refer to the standards corresponding to the ecological security field, including but not limited to at least one of the national standards, industry standards, and local standards related to ecological security. Optionally, the above-mentioned large model optimization method for the target vertical field can also be used in one or more of the fields of medical and health care, financial risk control, recommendation systems, and natural language processing, and this application does not impose any restrictions on this.

[0058] The following examples will provide a detailed introduction to the large model optimization method for target vertical domains.

[0059] Figure 3 A flowchart illustrating a large-scale model optimization method for a target vertical domain provided in an exemplary embodiment of this application is shown. This method is executed by a computer device, with the computer device serving as the... Figure 1 Taking terminal 110 and / or server 120 as an example, the method includes at least one of the following steps: Step 310: Obtain the sample pool, which includes general domain data and vertical domain data.

[0060] The general domain knowledge includes at least two cross-domain data sets in addition to the target vertical domain knowledge. The general domain data is used to train at least one of the following: natural language syntax, factual knowledge, reasoning ability, and semantic cognition of the initial large model, to ensure that the target large model has basic expression and reasoning abilities. The vertical domain data is used to train the initial large model to understand the depth of vertical domain knowledge, to ensure that the target large model exhibits stronger reasoning and prediction abilities for vertical domain questions, and to improve the professionalism of the target large model's answers to vertical domain questions.

[0061] In some embodiments, vertical domain data consists of actual sample data from the vertical domain and the corresponding technical standards for that target vertical domain. The structured information of the technical standards corresponding to the vertical domain may be the same or different in different embodiments. For example, in this embodiment, the technical standards are divided into a three-segment structure: a primary label, a secondary label, and label details. These technical labels are used to determine whether the data in the original data belongs to the target vertical domain based on the corresponding actual sample data, or to detect the target large model's understanding of the vertical domain. Taking ecological security standards as an example, the three-segment structure is a standard overview, specific requirements, and judgment method.

[0062] Optionally, the sample pool is a fixed set of data, and the large model schedules the data in the sample pool for training during each training process; or, the sample pool is a dynamic sample pool that is automatically updated or dynamically updated according to the corresponding update instructions. When the update conditions are met, the dynamic sample pool will update and / or supplement the data in the sample pool.

[0063] Optionally, general domain data is determined based on at least one of high-quality open-source question-and-answer datasets, pre-configured specified datasets, and public network data, while vertical domain data is determined based on at least one of public network data and vertical domain-related technical standards.

[0064] Step 320: Construct the current round of training data based on the sample pool, and train the initial large model based on the current round of training data to obtain the target large model.

[0065] The construction of training data includes sampling, sorting, or deduplication of the sample pool. For example, random sampling is performed with a specified ratio (e.g., 2:8) between vertical domain data and general domain data, obtaining corresponding data from the sampling pool according to the specified ratio. Based on the indices (e.g., hash indices) included in each data set, it is determined whether duplicate samples exist in the current round of training data. For instance, if at least two samples with the same index value are detected in the vertical domain data, these at least two samples are considered duplicate samples, and one of these samples with the same index value is selected as the target sample for subsequent initial model training. Optionally, if the deduplicated training data does not meet the specified ratio, the sample pool is resampled until the specified ratio is met. Optionally, this specified ratio is dynamically adjusted based on the number of iterations in the training rounds. In this process, each sample is either a sample with replacement or a sample without replacement. A sample with replacement means that after this round of sampling, the sampled sample is added back to the sampling pool, meaning that the sampling process does not affect the amount of data in the sampling pool. A sample without replacement means that after this round of sampling, the sampled sample is not added back to the sampling pool, meaning that the training data after the sampling process will not appear in subsequent sampling pools. The following description mainly uses the example of a sample without replacement, and this application does not limit it.

[0066] In some embodiments, the initial large model is trained based on the training data processed or constructed as described above, so that the model retains its original general capabilities while gradually incorporating the target vertical domain data and corresponding features included in the current round of training data, thereby obtaining a target large model with stronger reasoning capabilities in that vertical domain.

[0067] Step 330: Construct test questions for vertical domain data based on the technical standards of the target vertical domain, generate response results for the test questions using the target large model, and determine domain knowledge blind spot samples from the vertical domain data based on the understanding of the technical standards based on the response results.

[0068] The design process for the test questions includes: parsing the structured information of the corresponding technical standards in the vertical field, that is, extracting key fields from the technical standards and assigning them explicit semantic labels, and determining the type of the technical standard based on the corresponding semantic labels. The structured information includes at least one of the following: standard number, scope of application, core indicators, judgment conditions, and risk level thresholds. The standard number serves as the index information of the technical standard; the scope of application is used to determine the target object and boundary information of the technical standard; the core indicators are the core parameters used to determine whether the corresponding data conforms to the technical standard; the judgment conditions are the corresponding rules used to determine whether the target sample conforms to the core indicators; and the risk level thresholds are used to classify the critical values ​​of indicators corresponding to different risk levels in non-compliant samples. Based on the semantic information of the above structured information, knowledge units are extracted from the technical standard. These knowledge units include at least one of the following: numerical knowledge, conditional knowledge, and process knowledge. Numerical knowledge indicates the numerical information corresponding to the limits or threshold constants of the core indicators in the above structured information; conditional knowledge indicates the limiting conditions or boundary limits included in the above structured information; and process knowledge indicates the information corresponding to the operation process or judgment sequence in the above structured information. Based on the extracted knowledge units, corresponding question templates are constructed. For example, if the knowledge unit is numerical knowledge, a data query question template is constructed. Optionally, the question templates include: numerical query templates, conditional judgment templates, and decision process templates; the above question templates are determined based on at least one knowledge unit. Scene features of the sampled vertical domain are obtained, and knowledge units in the matching technology standard are used to populate the corresponding question templates, thereby generating test questions related to the vertical domain sample. For example, the vertical domain sample includes numerical information; the extracted numerical information is used to populate the numerical query question template to obtain numerical query test questions related to the vertical domain sample.

[0069] Based on the target large model trained in step 320 above, a response is generated to the test question, outputting response results related to the test question. Simultaneously, a standard answer to the test question is determined based on the technical standards of this vertical domain. This includes: obtaining the applicable scope related to the test question from the technical standards; confirming the standard range corresponding to the sample; extracting the corresponding structured information from the sample (such as core indicators, judgment conditions, and risk level thresholds); comparing the relevant information in the sample with the relevant knowledge units of the technical standards; obtaining intermediate results; and organizing and determining the final standard answer based on the intermediate results and the form of the test question.

[0070] Subsequently, the matching degree between the response result and the standard answer is calculated, including: semantically vectorizing the response result generated by the model and the standard answer respectively to obtain the response vector and the standard vector. Based on this, the cosine similarity between the response vector and the standard vector is calculated, and the value of this cosine similarity is used as the semantic similarity between the response result and the standard answer, or the response result to be evaluated is paired with the standard answer to form an evaluation data pair. In each round of iterative training, a small batch of samples (e.g., 30) is obtained for manual evaluation. Each evaluator independently scores the selected samples, and the final similarity is obtained based on the weighted calculation of the scores of each evaluator (taking semantic similarity as an example). Subsequently, numerical information is extracted from the response results and compared with relevant values ​​(such as thresholds, proportions, and value ranges) in the technical standards to determine the absolute or relative deviation of each value, thereby obtaining the overall numerical deviation rate. This deviation rate is used to determine the numerical accuracy (i.e., the larger the overall numerical deviation rate, the lower the numerical accuracy). Conditional or procedural information is extracted from the response results and compared with the standard conditions or procedures in the standard answer to calculate the proportion of conditions or standards covered by the response results to the standard conditions or procedures, which is used as the conditional completeness. Based on at least one of semantic similarity, numerical accuracy, and conditional completeness, a weighted calculation is performed to obtain the matching degree. Optionally, based on different business scenarios, corresponding weights are dynamically assigned to each matching degree condition.

[0071] Based on the matching information identified above, samples with matching scores below a threshold are determined. These samples typically reflect deficiencies in at least one aspect of the target model, such as semantic understanding, numerical accuracy, or conditional logic. For these low-matching samples, manual review or automated auxiliary tools are used to locate and label the knowledge blind spots and / or comprehension deviations, forming a set of domain knowledge blind spot samples that can be used for iteration of the target large model.

[0072] Figure 4 A schematic diagram of a large model optimization method for a target vertical domain provided in an exemplary embodiment of this application is shown.

[0073] like Figure 4As shown, taking the soil pollution risk control standard as an example, the large-scale model acquires the technical standard for the vertical domain. This technical standard has a three-part structure: standard overview, specific requirements, and judgment method. The first-level label defines the scope or boundary of the technical standard, its terminology, and overall requirements. The second-level label is a refinement based on the first-level label (i.e., the specific requirements of the technical standard), such as the judgment range and corresponding values ​​of core indicators. The third-level label is the specific judgment method for whether the standard is met. The target large-scale model acquires structured information for this vertical domain through training and generates corresponding test questions. For example, the semantic information acquired from the samples includes semantic information related to soil pollution and heavy metals. The system determines the corresponding test question based on the relevant semantic information, such as: "What is the risk screening value of cadmium in GB 15618-2018 'Soil Environmental Quality Agricultural Land Soil Pollution Risk Control Standard (Trial)'?". The trained target large-scale model responds to the above test question, obtaining the model's response result, such as "The risk screening value of cadmium is 0.4-0.7 mg / kg". Simultaneously, the standard answer to the test question is determined based on the technical standards of this vertical domain. For example, the standard answer determined based on technical standards is: "The risk screening value for cadmium is 0.3-0.6 mg / kg." The matching degree between the target large-scale model's response and the standard answer is determined based on one or more of the following: semantic similarity, numerical accuracy, and conditional completeness. When the judgment result is a mismatch (i.e., the system considers the sample to be a sample that the target large-scale model has misunderstandings about), the sample is identified as a domain knowledge blind spot sample. Figure 4 Taking soil safety as an example, the above methods may be applied to other safety fields, including but not limited to information security and life safety.

[0074] Step 340: Update the current round of training data based on the domain knowledge blind spot samples to obtain the next round of training data, and perform the next round of training on the target large model based on the updated next round of training data.

[0075] Specifically, step 330 above identifies domain knowledge blind spot samples in the current round of training data, and updates the current round of training data based on these samples to obtain the next round of training data. This includes adding the identified domain knowledge blind spot samples to the sample pool and updating at least one element in the sample pool. For example, adding domain knowledge blind spot samples to the sample pool involves proactively sending a feedback request to the data update module, obtaining data related to the domain knowledge blind spot samples from open-source datasets or publicly available online data, and adding it to the sample pool; and / or, based on the sampled data and the feedback domain knowledge blind spot samples, performing self-cleaning of the sample pool, including removing vertical domain data that the system considers fully understood by the target large model from the sample pool. Fully understood vertical domain data refers to samples where the matching degree between the standard answer and the response result is greater than a specified threshold.

[0076] In some embodiments, samples from the domain knowledge blind spot are added to the current round of training data according to a preset sampling strategy; the updated current round of training data is preprocessed (including resampling and / or reordering) to obtain the next round of training data.

[0077] In some embodiments, the raw data obtained from the sample pool is further subjected to a data optimization process before entering the sample pool, in order to remove redundant or low-quality parts from each raw data.

[0078] The target large model undergoes a second round of training to retrain on the samples and the aforementioned domain knowledge blind spots, thereby improving the target large model's understanding of the vertical domain. This at least one round of repeated training (i.e., the process of performing the next round of training based on updated data after training) can also be understood as iterative training, which is not limited in this application.

[0079] By employing the above method and iteratively training with vertical domain data, the generalization reasoning ability of the large model is ensured while its understanding of vertical domain knowledge is improved, thereby enhancing the reasoning performance of the target large model. Based on the large model's understanding of vertical domain knowledge, domain knowledge blind spot samples are identified and fed into at least one subsequent round of model optimization training. This allows the target large model to focus on learning the vertical domain knowledge corresponding to the domain knowledge blind spot samples during subsequent training. When the vertical domain changes dynamically, the target large model can quickly identify the changed target knowledge blind spots and retrain and optimize them, reducing the computational cost of training all samples in each training or fine-tuning process.

[0080] Optionally, in order to ensure the generality of the target large model during the iterative training process, iterative training of general domain data is also involved during the vertical domain data iterative training process. That is, after step 330, the above method further includes at least one step, which is used to detect whether the generality of the large model is affected, or to fine-tune the generality of the large model.

[0081] Iterative training of general domain data like Figure 5 As shown, after step 320, the method further includes at least one of the following steps: Step 350: Use the target large model to generate response results for general questions from general domain data, input the response results of general questions and corresponding reference answers into the arbitration model for evaluation, and select general necessity samples from general domain data based on the evaluation results.

[0082] In this process, based on the target large model trained in step 320 above, a response is generated to the general question, outputting a response result related to the general question. Unlike vertical domain data, general domain data does not include specific technical standards; that is, the general question is determined based on high-quality question-and-answer datasets included in the general domain data. The answers from the question-and-answer dataset corresponding to the general domain data are used as reference answers, and the standard answers and the response results generated by the target large model are input into an arbitration model for judgment. The arbitration model is an evaluation model built independently of the target large model based on a pre-defined large language model, used to detect the general capabilities of the target large model, including judging the correctness and / or consistency between the response results and the reference answers. Optionally, this prediction model can be a model trained on general domain data in a sample pool, or other open-source models specifically designed for detecting the general capabilities of large models.

[0083] The evaluation process, based on an arbitration model, assesses the relationship between the response and the reference answer (including correctness and / or consistency): It calculates the semantic similarity between the response and the reference answer for a general question. Optionally, the semantic similarity is determined by segmenting the response and the reference answer into words, or by calculating their similarity. This includes: segmenting the response and the reference answer into words separately, which can be understood as dividing the continuous text sequence into independent word units along word boundaries, removing other non-semantic characters from the response and the reference answer to obtain a response word sequence and a reference word sequence, and calculating the word vector similarity between the response word sequence and the reference word sequence; and / or, encoding the response and the reference answer for a general question using a pre-trained semantic encoding model, directly obtaining the response semantic vector and the reference semantic vector corresponding to the response and the reference answer, and calculating the vector similarity between the response semantic vector and the reference semantic vector; and determining the semantic similarity between the response and the reference answer based on word vector similarity and / or vector similarity. In the subsequent description of this application, the correct answer corresponding to the general domain data is used as an example (i.e., the sample obtained through semantic analysis does not include incorrect answers judged to be consistent). This does not preclude the evaluation of the correctness of the reference answer in other embodiments, and this application does not limit this. When the similarity between the response result and the reference answer is less than a preset similarity threshold, the correctness of the response result for the general question is judged, including: preprocessing the response result and obtaining the corresponding word segmentation vector or semantic vector; analyzing one or more of the semantic correctness, numerical correctness, conditional correctness, structural correctness, and factual correctness of the response result based on the word segmentation vector or semantic vector to obtain the confidence level corresponding to the response result. Optionally, the preset correctness threshold and the preset similarity value range between 0.6 and 0.8.

[0084] In some embodiments, when the semantic similarity between the response result and the reference answer is less than a preset similarity threshold and the confidence level is less than a preset correctness threshold, the sample of the general domain data is determined as a general necessary sample, and the general necessary sample is retained and used for subsequent iterative training. Optionally, when the semantic similarity between the response result and the reference answer is greater than a preset similarity threshold, or when the semantic similarity between the response result and the reference answer is less than a preset similarity threshold and the confidence level is greater than a preset correctness threshold, the sample is considered a correct sample and the corresponding correct sample is discarded.

[0085] In some embodiments, to ensure the accuracy of the judgment on the consistency and / or correctness of general domain data, the arbitration model is trained and / or fine-tuned, including: obtaining judgment training data, optionally, the judgment training data is based on public datasets and / or samples that have undergone at least one round of consistency and / or correctness judgment as described above, the judgment training data includes sample pairs and their corresponding judgment labels, the sample pairs are the actual data and corresponding labeled data of each sample, and the judgment labels are other labels independent of the labeled data; the judgment labels include consistency labels and correctness labels determined based on the arbitration model above, the consistency label is the corresponding semantic similarity value, used to measure the degree of consistency between the answer to be judged (as described in the above embodiments) and the reference answer, that is, the degree of matching of the answer to be judged in semantic expression or information coverage; the correctness label is the corresponding confidence value, used to measure the degree of correctness of the answer to be judged, that is, the factual accuracy or logical compliance of the answer to be judged. Based on the above-mentioned evaluation training data, the preset large language model is subjected to supervised fine-tuning training to obtain the arbitration model; optionally, the arbitration model is subjected to supervised fine-tuning training after each round of iteration training, or after performing a specified number of consistency and / or correctness evaluations.

[0086] Among them, the consistency label is used to identify the degree of consistency between the answer to be judged and the reference answer, and the correctness label is used to identify the degree of correctness of the answer to be judged.

[0087] Step 360: Update the current round of training data based on the general necessity samples to obtain the next round of training data, and perform the next round of training on the target large model based on the updated next round of training data.

[0088] The process of determining universally necessary samples in the current round of training data through step 350, and updating the current round of training data based on these universally necessary samples to obtain the next round of training data, includes: adding the determined universally necessary samples to the sample pool and updating at least one element in the sample pool. For example, adding universally necessary samples to the sample pool involves actively sending a feedback request to the data update module, obtaining data related to the universally necessary samples from open-source datasets or publicly available online data, and adding it to the sample pool; and / or, based on the sampled data and the feedback universally necessary samples, performing self-cleaning of the sample pool, including: removing universal domain data corresponding to the universal capabilities that the system believes the target large model already possesses from the sample pool. The universal capabilities already possessed are samples whose semantic similarity to the reference answer and response result is greater than a preset similarity threshold, or samples whose semantic similarity is less than a preset similarity threshold and whose confidence is greater than a preset correctness threshold.

[0089] In some embodiments, the raw data obtained from the sample pool is further subjected to a data optimization process before entering the sample pool, in order to remove redundant or low-quality parts from each raw data.

[0090] In some embodiments, general necessary samples and domain knowledge blind spot samples are added to the current round of training data according to a preset sampling strategy; the updated current round of training data is preprocessed (including resampling and / or reordering) to obtain the next round of training data.

[0091] The target large model undergoes a second round of training to retrain the samples and the aforementioned general necessary samples, thereby improving the generality of the target large model and avoiding the weakening of its generalization ability due to an excessively high proportion of vertical domains.

[0092] It should be noted that steps 350 and 360 are only used to represent the unique numbers of the above-mentioned iterative optimization steps for general domain data, and are not used to indicate the sequential relationship between steps 350 and 360 and the above-mentioned iterative optimization steps for general domain data. Optionally, in different embodiments, in the large model optimization method for the target vertical domain, only the iterative optimization steps for general domain data are executed, or only the iterative optimization steps for vertical domain data are executed, or the above steps are executed simultaneously in the iterative optimization process. The two can be executed based on a first-in-first-out order or based on a parallel mechanism, and this application does not limit this.

[0093] Optionally, based on the acquired general necessary samples and domain knowledge blind spot samples, the current round of training data is updated to obtain the next round of training data. This includes discarding other samples in the current round of training data except for domain knowledge blind spot samples and general necessary samples, supplementing the general necessary samples and domain knowledge blind spot samples into the sample pool, and performing resampling, sorting, reordering or deduplication on the sample pool to obtain the training data required for the new round of model training.

[0094] By using the above method, through iterative training with general domain data, the generalization and reasoning capabilities of the large model are guaranteed. At the same time, the redundant data in the sample pool (i.e., other sampled samples besides general necessary samples) is reduced by filtering general necessary samples. This allows the target large model to focus on learning the general domain knowledge corresponding to general necessary samples in subsequent training. It can maintain the same general capabilities on a smaller data scale and avoid the redundant process of training all samples in each training or fine-tuning process, effectively reducing the training cost in the iterative training process.

[0095] Through the aforementioned iterative approach, the target large model can be trained and fine-tuned based on candidate training data in the sample pool. This effectively improves the target large model's understanding of the vertical domain and optimizes its inference performance without significantly increasing the amount of training data in the current round. However, for dynamically updatable sample pools, the quality of relevant data in publicly available online data or open-source datasets varies, and the sampling process involves repeatedly acquiring the same sample. To reduce the impact of low-quality or erroneous data on the training of the target large model and effectively reduce the training cost associated with training on redundant data, this application also provides a process for acquiring high-quality training data during the optimization of the target large model. This process supplements and / or updates high-quality training data in the sample pool before acquiring and performing training data sampling.

[0096] The training data acquisition process includes at least one of the following: raw data acquisition, screening, cleaning, and distillation. Screening is used to identify target samples from at least two identical data points or data pairs in the raw data; cleaning is used to remove identical redundant target samples from the raw data; and distillation is used to determine the confidence level of the target samples, i.e., whether the target samples are high-quality domain data suitable for subsequent training. Optionally, the updated data in the sample pool is relevant data obtained from publicly available online data or open-source datasets based on the vertical domain; or, the updated data in the sample pool is domain knowledge blind spot samples and / or general necessity samples determined based on the above iterative training method; or, the updated data in the sample pool is relevant data identified and obtained from publicly available online data or open-source datasets based on domain knowledge blind spot samples and / or general necessity samples. Optionally, each raw data point includes labeled data (such as data used for training other large models in public datasets) and unlabeled data (such as publicly available online data).

[0097] Figure 6 A schematic diagram of sample pool updating provided in an exemplary embodiment of this application is shown.

[0098] like Figure 6As shown, the system uses raw data, including labeled and unlabeled data. The labeled and unlabeled raw data undergo processing as described in Stage 1 and Stage 2 respectively. This process filters the raw data to obtain as much relevant domain data as possible. This relevant domain data includes sample-label pairs. The filtering process (Stage 1 and Stage 2) obtains a large number of unambiguous samples from the raw data for subsequent data pair verification. For labeled samples, target samples are selected using a majority voting principle for labeling, used in subsequent processing to determine whether to add the sample to the sample pool. For unlabeled samples, a pre-trained expert model predicts and votes on the labels of the samples, thereby selecting target samples for subsequent processing. The verification process evaluates the correctness and / or consistency of each data point based on a pre-trained large model to determine whether it can be used as candidate training data in the subsequent training process of the target large model. Optionally, the pre-trained large model and the arbitration model are the same model, or the pre-trained model is another open-source large model independent of the arbitration model; this embodiment does not limit this. The above illustrations are based on the example of simultaneous screening, washing, and distillation processes (i.e., stages one to three). It is possible that the processing order or corresponding processing procedures of one or more of the above stages may change in different embodiments, and this embodiment does not limit this.

[0099] The following is combined with Figure 6 The three stages shown below explain the various preprocessing steps of the raw data: For the original dataset containing labeled data, each labeled data point is labeled based on a specified index, and the target sample is determined using a majority voting principle. Figure 7 As shown, it also includes the following steps on the technical side: Step 710: Obtain the raw data before obtaining the sample pool.

[0100] The following example illustrates the use of filtering and cleaning the original data for subsequent iterative training of a large-scale optimization model. That is, step 710 occurs before step 310. This does not preclude the above method from being implemented alone as an embodiment for obtaining a high-quality dataset; however, this embodiment does not limit this approach.

[0101] In some embodiments, the original data is illustrated using relevant data obtained from publicly available online data or open-source datasets based on a vertical domain. Publicly available online data includes one or more of the following: webpage text, news articles, forum discussions, academic papers, code repositories, and Wikipedia, all scraped from the internet on a large scale. Open-source datasets refer to standardized datasets publicly released by relevant institutions, enterprises, or communities that can be used for academic or commercial purposes. The system collects the relevant data according to compliant protocols using relevant technologies to obtain the target original data.

[0102] Step 720: Perform validity screening on the original data to obtain the filtered sample data.

[0103] For labeled data, the system uses hash indexing technology to group the labeled data. This involves calculating the hash value of each labeled data point (e.g., using the MD5 algorithm to generate a data digest of a specified length based on the data content). All labeled data points with the same hash value are considered identical duplicates and grouped into the same data group; different hash values ​​correspond to different data groups. The system then retrieves the labels for each labeled data point in the data group and determines the frequency of each label. During manual annotation, due to subjective judgment or oversight, different labels may exist for the same data point. To ensure the accuracy of the data's semantic information, a majority voting principle is used to determine the target sample in the data group. This majority voting principle means that the sample with the most frequent label occurrences is selected as the target sample and output as the target sample data for that group of labeled data for subsequent processing. To avoid potentially controversial tags (such as a relatively balanced distribution of the frequency of each tag in a voting result), if the difference between the frequency of the first tag and the frequency of the second tag is greater than or equal to a first threshold, the labeled data corresponding to the first tag is determined as the filtered sample data. If the difference between the frequency of the first tag and the frequency of the second tag is less than the first threshold, the labeled data is discarded, or the labeled data is fed back to the subsequent review module for manual verification of the target sample data of the labeled data. Here, the first tag is the tag with the most occurrences, and the second tag is the tag with the second most occurrences. Optionally, the above description uses the tag with the most occurrences and the tag with the second most occurrences as examples. It is not excluded that in different embodiments, the target sample data in the labeled data may be determined based on the distribution function of each tag or the proportion of the difference between the tag with the most occurrences and the other n tags to the total number of tags. The first threshold is a relatively balanced threshold based on manual calibration, and optionally, the value of the first threshold is between 0.6 and 0.8. Based on the identified target sample data with labels, a cleaning process is performed, including: outputting one sample from the target sample data and discarding all other sample data except for the output sample. That is, through the above filtering and cleaning process, at least two samples with the same hash index value are processed, discarding ambiguous samples (i.e., samples that do not correspond to the majority label) and duplicate samples (i.e., other samples with the same hash index value and including the same label), and using the output sample data for subsequent processing.

[0104] Figure 8 This illustration shows a schematic diagram of filtering labeled data according to an exemplary embodiment of this application.

[0105] like Figure 8 As shown, for labeled data with the same hash index value, different labeled data may have the same or different labels, such as... Figure 8 In a dataset where labeled data 1 and labeled data 2 have the same label, and labeled data 1 and labeled data 3 have different labels, the system statistically analyzes the labels of each labeled dataset to determine the frequency of each label. For example, if the labeled dataset includes labels 1 and 2, with label 1 appearing 5 times and label 2 appearing 2 times, and the ratio of the difference in the frequency of label 1 to the total frequency of labels is greater than a first threshold, then the sample data with label 1 is retained, while other sample data in the labeled dataset are discarded. Based on the determined consistent samples, a cleaning process is performed, outputting one data sample from the consistent samples and discarding other sample data with label 1. This discarded sample data is used for subsequent processing.

[0106] For unlabeled data, to ensure the target model can understand the corresponding semantic information and perform the same filtering function, each unlabeled data point is input into a pre-trained expert model for label prediction. For each unlabeled data point, multiple expert models are invoked for prediction, each with different prediction preferences; for example, some expert models favor high recall, while others favor high precision. The predicted labels output by each model are statistically analyzed, and the target label is determined from among the multiple predicted labels based on the majority voting principle. The majority voting principle means that the target label is determined based on the frequency of occurrence of each predicted label. Subsequently, the correctness of the target label is evaluated, including: preprocessing the target label and obtaining its corresponding semantic vector; and analyzing one or more of the semantic correctness, numerical correctness, conditional correctness, structural correctness, and factual correctness of the target label based on the semantic vector to obtain the confidence level corresponding to the target label. When the confidence level corresponding to the target label is greater than or equal to the confidence threshold, the target label and the corresponding unlabeled data are paired for subsequent processing. When the confidence level corresponding to the target label is less than the confidence threshold, the unlabeled data is discarded, or the unlabeled data is input into a subsequent review module for manual review to determine the label corresponding to the unlabeled data. Optionally, the unlabeled data is grouped based on hash index, and the generated data pairs with the same hash index value are subjected to the above cleaning and filtering process, including but not limited to: determining the target sample data based on the label majority voting principle for data pairs with hash index values, outputting one sample data from the target sample data, discarding other sample data except for the output sample data, i.e., discarding ambiguous and duplicate samples, and using the output sample data for subsequent processing. Optionally, the confidence threshold is set between 0.7 and 0.95.

[0107] The aforementioned expert models are trained using training data with different data ratios. This includes: constructing N training datasets (where N is an integer greater than or equal to 2) according to N different ratios of vertical domain data to general domain data; and training N expert models on each of these N training datasets, ensuring that each model has a different prediction preference. For example, N different data ratio schemes are set, each specifying the mixing ratio of vertical domain data to general domain data in the training set. To ensure the basic predictive ability of the expert models, the proportion of vertical domain data ranges from 10% to 90%, and the proportion of general domain data ranges from 90% to 10% in the N different data ratios. For each ratio, data is extracted in appropriate proportions from both the vertical and general domain data, and mixed to construct N training datasets with different domain compositions. Based on these N training datasets, N expert models are trained. Because each expert model is trained based on different proportions of vertical domain data and general domain data, they will form different preferences when making predictions. For example, when the configuration ratio of vertical domain data and general domain data is 10% and 90% respectively, the expert model is more inclined to general common sense reasoning, which is used to describe the basic logic of the predicted label. When the configuration ratio of vertical domain data and general domain data is 90% and 10% respectively, the expert model is more inclined to professional judgment in the vertical domain, which can accurately extract knowledge units and corresponding semantic elements from unlabeled data.

[0108] Optionally, for expert models that focus on specialized judgment within a vertical domain, optimization training can be performed based on technical standards and general domain knowledge, or fine-tuning can be done based on samples from domain knowledge blind spots and samples of general necessity. For example, based on the degree of deviation between various data points and corresponding technical standards, expert models can be trained to assess different levels of risk. For instance, training can be conducted on data where answers completely deviate from technical standards (such as information in collected chat data that does not conform to preset content specifications), resulting in an expert model more sensitive to high-risk data; or, training can be conducted on data where answers partially deviate from technical standards (such as information in collected chat data that may potentially not conform to preset content specifications), resulting in an expert model more sensitive to medium- and low-risk data. For potentially risky samples, risk verification is performed.

[0109] Figure 9 This illustration shows a schematic diagram of filtering unlabeled data according to an exemplary embodiment of this application.

[0110] like Figure 9As shown, for the unlabeled data in the original dataset, this unlabeled data is input into various expert models, such as expert models 1 to N. Each expert model has different prediction preferences based on different training dataset ratios. For example, expert model 1 is biased towards professional judgment in vertical fields and is used for high-risk sample prediction. The expert models obtain corresponding prediction labels based on the processing of the unlabeled data. The system will count the prediction results output by each expert model, count the occurrence frequency of each prediction label, retain the consistent label with the highest occurrence frequency, and discard other ambiguous labels. Cleaning processing is performed on the consistent label, outputting one target label from the consistent label, forming a corresponding data pair with the unlabeled data, and discarding other prediction labels. Optionally, the above process can be performed based on the generated data. Figure 8 At least one of the preprocessing steps, which will not be elaborated here.

[0111] Among them, the same samples have the same effect on subsequent training. Through the above processing, redundant and ambiguous samples in the original data are eliminated, which reduces the order of magnitude of the acquired data. By filtering through the above process, it is avoided to train all the data in the original data. Sample data with the same training effect are maintained on a smaller data scale, which effectively saves the training cost in the subsequent model training process.

[0112] Step 730: Based on the filtered sample data, obtain the vertical domain data in the sample pool.

[0113] Figure 10 A schematic diagram of sample data distillation provided in an exemplary embodiment of this application is shown.

[0114] In some embodiments, the data is distilled based on the filtered data pairs (sample data - labels). Identifying risk samples from the filtered sample data includes: based on preset risk assessment rules or anomaly detection algorithms, further locating potentially problematic, erroneous, boundary cases, or high-value samples requiring review from the filtered and / or cleaned data pairs. For example, filtering can be based on confidence thresholds, such as identifying risk samples as data pairs with confidence levels below a second threshold from the previous round of unlabeled data; or filtering can be based on consistency differences, such as identifying risk samples as those with inconsistent labels output by multi-expert models (which can also be understood as sample data in a general-purpose model with poor understanding of the vertical or general domain). The process involves retrieving relevant and irrelevant technical standards from the technical standards corresponding to the risk sample. The risk sample, relevant technical standards, and irrelevant technical standards are then input into a pre-defined large language model. This model detects the risk sample based on the relevant technical standards, including: constructing a corresponding question template based on structured knowledge of the technical standards; generating test questions by filling in the question templates; outputting corresponding detection results based on the test questions using the pre-defined large language model; and evaluating the correctness of the detection results. Optionally, the pre-defined large language model and the arbitration model are the same model. The correctness of the detection results is then judged, including: preprocessing the detection results and obtaining corresponding word segmentation vectors or semantic vectors; analyzing one or more of the semantic correctness, numerical correctness, conditional correctness, structural correctness, and factual correctness of the detection results based on the word segmentation vectors or semantic vectors to obtain the confidence level corresponding to the detection results. If the confidence score is greater than or equal to a pre-defined scoring threshold, the risk sample is identified as vertical domain data or general domain data; if the confidence score is less than the pre-defined scoring threshold, the risk sample is discarded. Optionally, the aforementioned vertical domain data or general domain data is the updated relevant data corresponding to the domain knowledge blind spot samples or general necessity samples determined by iterative training. Optionally, the preset scoring threshold ranges from 0.7 to 0.95. For example, as shown... Figure 10As shown, when the obtained filtered data pair contains [pH value, cadmium concentration] (the specific values ​​are determined based on the corresponding original data), and the label is "risky", a corresponding question is constructed for this data pair, such as "According to GB 15618-2018 'Soil Environmental Quality Agricultural Land Soil Pollution Risk Control Standard (Trial)', what is the risk screening value for cadmium? If this value is exceeded, what risk level will it constitute?" The generated question is input into a preset large language model to obtain the corresponding standard answer, such as "According to GB..." According to the "Soil Environmental Quality Standard for Agricultural Land Soil Pollution Risk Control (Trial Implementation)" (15618-2018), when pH ≤ 5.5, the risk screening value for cadmium is 0.3 mg / kg. Exceeding this value may indicate a risk of agricultural land soil pollution. The system analyzes one or more of the following aspects of the standard answer generated by the preset large language model: semantic correctness, numerical correctness, conditional correctness, structural correctness, and factual correctness, to obtain the corresponding confidence score. For example, if the score is 0.85 and exceeds the preset score threshold (e.g., 0.75), the data pair is determined to be a high-confidence sample and retained as a reserve sample for subsequent rounds of iterative training.

[0115] By constructing an expert model with differentiated prediction preferences and combining it with a pre-set large language model for data distillation, high-quality and low-cost labeling and filtering of unlabeled data is achieved. Redundant and duplicate samples are cleaned, generating a high-quality dataset that can be used for subsequent iterative training. This provides support for the target large model to improve its understanding of vertical domains with less data and reduces the training cost required during iterative training.

[0116] In some embodiments, under a specified order of magnitude, the performance of the target large model gradually improves during iterative training, i.e., its understanding of the vertical domain continuously improves. To reduce overfitting and training costs caused by endless iterative training of the target large model, the spiral iteration termination judgment module sets corresponding preset termination conditions for the target large model. Before the target large model performs at least one more round of iterative training, it determines whether the preset termination conditions are met. If the corresponding preset termination conditions are met, iterative training stops and the target large model is output as the final model. If the corresponding preset termination conditions are not met, iterative training continues. Optionally, the preset termination conditions include: the number of iterations reaches a preset maximum number of iterations; the total number of domain knowledge blind spots and general necessity samples is less than a preset sample number threshold; and the performance improvement of the target large model on the evaluation set is less than a preset performance improvement threshold. The preset maximum number of iterations, the preset sample number threshold, and the preset performance improvement threshold are specified values ​​based on manual settings.

[0117] In addition to the above-described method for updating the sample pool, this application embodiment also includes an active update module. The active update module is used to detect whether the technical standards of the corresponding vertical field have changed.

[0118] In some embodiments, the proactive update module detects changes in the technical standard, identifies the changes in the technical standard, and the changes include at least one of the following three categories: new standards, such as newly released standard documents or revisions to existing standard documents; revised standard values, such as adjustments to indicator limits or thresholds; adjustments to applicable conditions, such as expansion or contraction of the scope of application; and changes in judgment prerequisites. Based on the identified changes, the module extracts the structured information corresponding to the updated technical standard, extracts the corresponding knowledge units from the structured information, constructs new question templates, and designs and constructs new test questions based on the iterative training process obtained from the above iterative training, or based on the identified updated knowledge units. The question types include at least one of the following three categories: numerical query (directly querying new values ​​or thresholds), condition comparison (comparing the differences between new and old applicable conditions or logical rules), and impact analysis (examining the impact of changes on judgment results or risk levels). Using a preset large language model, a standard answer is generated for each new question to ensure that the answer accurately reflects the changed technical standard. Finally, the constructed new questions and their corresponding standard answers are combined into data pairs as new training data for the next round of training. The sample pool is updated through the data update module. For example, the problem template is updated or supplemented, the corresponding sample data is retrieved, and new training data is constructed. These new training data increments are added to the existing sample pool, triggering a new round of spiral iterative training, enabling the model to continuously adapt to knowledge updates and maintain its accuracy and timeliness.

[0119] The entire solution revolves around the dynamic changes in a specified vertical domain (such as technical standards) or the target large model's understanding of vertical domain knowledge. It constructs a closed-loop, spiral iterative training system to ensure the target large model continuously maintains a full understanding of vertical domain knowledge and the ability to accurately understand and evaluate the latest knowledge. The solution begins with acquiring raw data, preprocessing it to form a sample pool, and then triggering a new round of iterative training by training and detecting universally necessary samples and / or samples from domain knowledge blind spots.

[0120] like Figure 11 As shown, the above-mentioned large-scale model optimization method for the target vertical domain includes the following steps on the technical side: Step 1110: Obtain the raw data.

[0121] In some embodiments, during the raw data acquisition and preprocessing stage, the system collects massive amounts of raw data from publicly available online data and open-source datasets.

[0122] Optionally, the original data may be supplemented or updated based on general necessary samples or domain knowledge blind spots that are added or updated in subsequent iterations of training, or the original data may be proactively updated based on the detection of changes in vertical domain technical standards.

[0123] Step 1120: Data preprocessing.

[0124] Among them, the acquired raw data is processed by at least one of cleaning, screening and distillation to identify high-quality sample data from the massive data, which is then used for subsequent large model training.

[0125] To achieve diverse predictive capabilities, the system employs a multi-expert model strategy. Specifically, it sets N different ratios (N≥2) between vertical domain data and general domain data, for example, vertical domain data: general domain data ratios of 9:1, 7:3, 5:5, 3:7, and 1:9. Data is sampled from the sample pool according to each ratio and mixed to construct N training datasets with distinct domain compositions. Based on these datasets, N expert models are independently trained. Because each model encounters different proportions of vertical and general knowledge, they develop different preferences during prediction. For any unlabeled data point, the system can invoke all expert models to perform inference, obtaining multiple predicted labels. This allows for the rapid acquisition of pseudo-labels for unlabeled data, avoiding the training costs associated with manually labeling large amounts of unlabeled data.

[0126] The specific details of steps 1110 and 1120 are as follows: Figure 8-10 The relevant texts mentioned above will not be repeated here.

[0127] Step 1130: Get / update sample pool data.

[0128] In the knowledge update and change detection phase, the system continuously monitors updates or changes to technical standards, general necessity samples, or domain knowledge blind spots. Changes to technical standards include at least the addition of new standards, revisions to standard values, and adjustments to applicable conditions. When the system detects a change in at least one of these technical standards, general necessity samples, or domain knowledge blind spots, it analyzes the change, extracts the corresponding knowledge units, and constructs new questions around these knowledge units. Question types include at least numerical query, conditional comparison, and impact analysis. A pre-defined large language model generates a standard answer for each new question, and then pairs the new question with the standard answer to form question-answer pairs, which are added to the sample pool as new training data.

[0129] Step 1140: Determine whether the preset termination condition is met based on the relevant information of the current iteration training.

[0130] Before the target large model performs at least one more round of iterative training, it is determined whether the preset termination condition is met. If the preset termination condition is met, the iterative training is stopped and the target large model is output as the final model. If the preset termination condition is not met, iterative training continues.

[0131] Step 1150: Train the target large model based on the sampled data from the training pool.

[0132] The data in the sample pool is sampled to obtain the corresponding training data. Subsequent iterative training is then performed based on the training data to obtain the target large model.

[0133] Step 1160: Data verification, obtaining samples from domain knowledge blind spots / generally necessary samples.

[0134] The system validates the understanding of the target large-scale model in both vertical and general domains using an arbitration model. Supervised fine-tuning of the pre-set large language model is performed based on training data evaluated during training, resulting in an arbitration model that automatically assesses the consistency and correctness of responses generated for relevant test questions. In the evaluation phase, the system quantifies the degree of matching between the response results and the standard answers from multiple dimensions. Different weights (fixed or dynamic weights) are assigned to semantic similarity, numerical accuracy, and conditional completeness according to the application scenario, and a weighted calculation yields the comprehensive matching degree. Based on the matching value, domain knowledge blind spots are identified for the corresponding vertical domain. Based on the matching degree and other risk indicators, the system identifies risk samples requiring manual attention (such as general necessity samples and domain knowledge blind spot samples). Key information that is missed is annotated and corrected through manual review or automated assistance tools.

[0135] After adding general-necessary samples and / or domain-knowledge blind spot samples to the sample pool, the training data corresponding to at least one subsequent round of iterative training is updated, triggering a new round of spiral iterative training. After the new data is added to the sample pool, the target large model can be fine-tuned or trained again, and then the domain-knowledge blind spot samples and / or general-necessary samples are re-evaluated, and the sample pool is updated. By iterating the training of the target large model for at least one round in this way, a large model with stronger understanding of the vertical domain can be obtained without significantly increasing the amount of training data.

[0136] Figure 12 This illustration shows a complete flowchart of a large-scale model optimization method for a target vertical domain provided in an exemplary embodiment of this application. The steps of the method are as follows: Step S1: Obtain the raw data.

[0137] The details of obtaining the raw data are as described above. Figure 7 As described in the relevant sections, it will not be repeated here.

[0138] Step S2: Preprocess the raw data to obtain candidate sample pool data.

[0139] The pretreatment process includes at least one of screening, washing, and distillation processes, and its implementation details are as described above. Figures 8 to 10 As described in the relevant sections, it will not be repeated here.

[0140] Step S3: Construct training data based on the updated sample pool data.

[0141] The updated sample pool includes corresponding samples removed without replacement during at least one round of iterative training, supplementary or updated domain knowledge blind spot samples and general necessity samples, and vertical domain data based on actively updated public network data or open source datasets.

[0142] Step S4: Determine whether the preset termination condition is met.

[0143] If the preset termination condition is not met, step S5 is executed; otherwise, step S6 is executed.

[0144] Step S5: Train the target large model based on the training data.

[0145] Step S6: Output the final large model.

[0146] When a preset termination condition is met, it indicates that the large model has achieved the desired optimization effect in the target vertical domain, terminates the iterative optimization training process, and outputs the final large model.

[0147] Step S7: Evaluate the training results of the large model.

[0148] Specifically, the consistency and / or correctness of general domain data are evaluated based on the arbitration big model, the matching degree of vertical domain data is determined based on technical standards, and the understanding of general domain data and vertical domain data by the target big model is determined based on the above evaluation results.

[0149] Step S8: Determine the general necessity samples and the domain knowledge blind spot samples.

[0150] Based on the above determination method, the general necessary samples and domain knowledge blind spot samples in this round of training are identified.

[0151] Step S9: Update the training data.

[0152] The training data for the next round is updated based on the general necessary samples and the domain knowledge blind spots samples, and the subsequent steps S4 are performed with the updated training data.

[0153] The numbers in each step of the above flowchart are used to uniquely identify and reference each step, and do not represent the order of time or importance of each step. For example, if step S1 occurs during iterative training (i.e., after S8) or before the initial sample pool is built, this application embodiment does not impose any restrictions on this.

[0154] Figure 13 This application shows a structural block diagram of a large model optimization device 1300 for a target vertical domain, provided in an exemplary embodiment. The device includes: The sampling module 1310 is used to acquire a sample pool, which includes general domain data and vertical domain data. Training module 1320 is used to construct the current round of training data based on the sample pool, and to train the initial large model based on the current round of training data to obtain the target large model; Evaluation module 1330 is used to construct test questions for vertical domain data based on the technical standards of the target vertical domain, generate response results for the test questions using the target large model, and determine domain knowledge blind spot samples from the vertical domain data based on the understanding of the technical standards based on the response results. Training module 1320 is used to update the current round of training data based on domain knowledge blind spot samples to obtain the next round of training data, including: adding domain knowledge blind spot samples to the sample pool, removing vertical domain data that the target large model has fully understood from the sample pool; and performing the next round of training on the target large model based on the updated next round of training data.

[0155] In some optional designs, the evaluation module 1330 is also used to parse the structured information of the technical standard, which includes at least one of the following: standard number, scope of application, core indicators, judgment conditions, and risk level thresholds; based on the structured information, it extracts knowledge units from the technical standard, which include at least one of numerical knowledge, conditional knowledge, and process knowledge; constructs question templates for the knowledge units, which include at least one of the following: numerical query templates, conditional judgment templates, and judgment process templates; and generates test questions based on the question templates and vertical domain data.

[0156] In some optional designs, the evaluation module 1330 is also used to obtain the standard answer corresponding to the response result, which is generated based on the technical standard; calculate the matching degree between the response result and the standard answer, which includes at least one of semantic similarity, numerical accuracy, and conditional completeness; if the matching degree is lower than a preset matching degree threshold, determine that the target large model has a misunderstanding of the technical standard, and identify the vertical domain data corresponding to the response result as domain knowledge blind spot samples; or, perform feature attribution analysis on the response result to identify the weak links in the target large model's understanding of the technical standard, and identify the vertical domain data corresponding to the weak links as domain knowledge blind spot samples.

[0157] In some optional designs, the evaluation module 1330 is used to generate response results for general questions from general domain data using the target large model, input the response results of general questions and corresponding reference answers into the arbitration model for evaluation, and select general necessity samples from general domain data based on the evaluation results; the training module 1320 is used to update the current round of training data based on general necessity samples and domain knowledge blind spot samples to obtain the next round of training data.

[0158] In some optional designs, the evaluation module 1330 is used to calculate the semantic similarity between the response result of the general question and the reference answer; when the semantic similarity is less than or equal to a preset similarity threshold, the correctness confidence of the response result of the general question is calculated using an arbitration model; when the correctness confidence is less than a preset correctness threshold, the general domain data corresponding to the response result is determined as a general necessary sample.

[0159] In some optional designs, the evaluation module 1330 is used to perform text segmentation on the response results and reference answers of the general question, obtain response word sequences and reference word sequences, calculate the word vector similarity between the response word sequences and reference word sequences, and determine semantic similarity based on the word vector similarity; or, it uses a pre-trained semantic coding model to encode the response results and reference answers of the general question, obtain response semantic vectors and reference semantic vectors, calculate the vector similarity between the response semantic vectors and reference semantic vectors, and determine semantic similarity based on the vector similarity; or, it performs text segmentation on the response results and reference answers of the general question, obtain response word sequences and reference word sequences, calculate the word vector similarity between the response word sequences and reference word sequences, use a pre-trained semantic coding model to encode the response results and reference answers of the general question, obtain response semantic vectors and reference semantic vectors, calculate the vector similarity between the response semantic vectors and reference semantic vectors, and determine semantic similarity based on word vector similarity and vector similarity.

[0160] In some optional designs, the arbitration model is a judgment model built based on a pre-set large language model. The arbitration model is trained as follows: obtaining judgment training data, which includes sample pairs and their corresponding judgment labels. The sample pairs include the answer to be judged and the reference answer. The judgment labels include consistency labels and correctness labels. Based on the judgment training data, the pre-set large language model is fine-tuned to obtain the arbitration model. Among them, the consistency label is used to identify the degree of consistency between the answer to be judged and the reference answer, and the correctness label is used to identify the degree of correctness of the answer to be judged.

[0161] In some optional designs, the training module 1320 is used to add general necessary samples and domain knowledge blind spot samples to the current round of training data according to a preset sampling strategy; and to preprocess the updated current round of training data to obtain the next round of training data.

[0162] In some optional designs, the sampling module 1310 is used to acquire raw data, including labeled and unlabeled data, before acquiring the sample pool; to perform validity screening on the raw data to obtain filtered sample data; and to acquire vertical domain data from the sample pool based on the filtered sample data.

[0163] In some optional designs, the sampling module 1310 is used to group labeled data based on hash index, identify labeled data with the same hash value as the same data group; obtain the label of each labeled data in the data group, and determine the occurrence frequency of each label; if the difference between the occurrence frequency of the first label and the occurrence frequency of the second label is greater than or equal to the total number of labels in the data group, the labeled data corresponding to the first label is identified as the filtered sample data; wherein, the first label is the label with the most occurrence frequency among all labels, and the second label is the label with the second most occurrence frequency among all labels.

[0164] In some optional designs, the sampling module 1310 is used to obtain the predicted labels of multiple expert models with different prediction preferences for each unlabeled data; based on the majority voting principle of labels, the predicted label that appears most frequently is determined as the target label of the unlabeled data; if the confidence of the target label is greater than or equal to the confidence threshold, the data pair consisting of the unlabeled data and the target label is determined as the filtered sample data.

[0165] In some optional designs, multiple expert models with different prediction preferences are trained as follows: N training datasets are constructed according to the data ratios of N different vertical domain data and general domain data, where N is an integer greater than or equal to 2; N expert models are trained on the N training datasets respectively, so that the N expert models have different prediction preferences.

[0166] In some optional designs, the sampling module 1310 is used to identify risk samples from the screened sample data; retrieve relevant technical standards and irrelevant technical standards related to the risk samples from the technical standards; input the risk samples, relevant technical standards and irrelevant technical standards into a preset large language model, which detects the risk samples based on the relevant technical standards; obtain the detection results and confidence scores output by the preset large language model, and determine the risk samples as vertical domain data if the confidence scores are higher than a preset score threshold.

[0167] In some optional designs, the device also includes a decision module 1340 for determining whether a preset termination condition is met before performing the next round of training; the preset termination condition includes at least one of the following: the number of iterations reaches a preset maximum number of iterations; the total number of domain knowledge blind zone samples and general necessity samples is less than a preset sample number threshold; the performance improvement of the target large model on the evaluation set is less than a preset performance improvement threshold; if the preset termination condition is met, the spiral iteration is terminated and the final target large model is output.

[0168] In some optional designs, the device also includes an update module 1350 for identifying changes in technical standards when changes are detected, including at least one of adding new standards, revising standard values, or adjusting applicable conditions; constructing new training data based on the changes; adding the new training data to the sample pool; and triggering a new round of spiral iterative training.

[0169] In some optional designs, the update module 1350 is used to parse the changed content and extract the changed knowledge units; construct new questions around the changed knowledge units, and the types of new questions include at least one of numerical query, conditional comparison, and impact analysis; generate standard answers to the new questions using a preset large language model; and combine the new questions and standard answers into question-answer pairs as new training data.

[0170] In some optional designs, the target vertical field is ecological security, and the technical standards include at least one of the national standards, industry standards, and local standards related to ecological security. The core indicators of the technical standards include at least one of the pollutant concentration limits, environmental quality levels, and risk control thresholds.

[0171] It should be noted that the above embodiments only illustrate the division of the above functional modules when implementing the functions of the device. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0172] Furthermore, the target vertical domain-oriented large model optimization device and the target vertical domain-oriented large model optimization method provided in the above embodiments belong to the same concept. For details of their specific implementation process, please refer to the method embodiments, which will not be repeated here.

[0173] It should be noted that the large model optimization device for the target vertical domain provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0174] Figure 14 A structural block diagram of a computer device 1400 provided in an exemplary embodiment of this application is shown. The computer device 1400 may be a smartphone, tablet computer, MP3 player, MP4 player, laptop computer, desktop computer, server, server cluster, or cloud terminal. The computer device 1400 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0175] Typically, computer device 1400 includes a processor 1401 and a memory 1402.

[0176] Processor 1401 includes one or more processing cores, such as a quad-core processor, an octa-core processor, or one or more of these. Processor 1401 can be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 1401 also includes a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1401 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1401 also includes an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.

[0177] Memory 1402 includes one or more computer-readable storage media, which may be non-transitory. Memory 1402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 1402 is used to store at least one instruction, at least one program, code set, or instruction set, which is executed by processor 1401 to implement the large model optimization method for a target vertical domain provided in the method embodiments of this application.

[0178] In some embodiments, the computer device 1400 also includes other components 1403, as those skilled in the art will understand. Figure 14 The structure shown does not constitute a limitation on the computer device 1400, which may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0179] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the large model optimization method for the target vertical domain provided in the above-described method embodiments.

[0180] This application also provides a chip, which includes programmable logic circuits and / or program instructions. When the chip is run on a computer device, it is used to implement the large model optimization method for the target vertical domain provided in the above-described method embodiments.

[0181] Optionally, the computer-readable storage medium includes one or more of the following: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs. The random access memory includes resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments described above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0182] For details not described in this embodiment, please refer to the method-side embodiment above, which will not be repeated here.

[0183] It should be understood that the term "instruction" mentioned in the embodiments of this application can be a direct instruction, an indirect instruction, or an indication of a relationship. For example, A instructing B can mean that A directly instructs B, such as B being able to obtain information through A; it can also mean that A indirectly instructs B, such as A instructing C, so B can obtain information through C; or it can mean that there is a relationship between A and B.

[0184] In the description of the embodiments of this application, the term "correspondence" may indicate that there is a direct or indirect correspondence between two things, or that there is an association between two things, or that there is a relationship of instruction and being instructed, configuration and being configured, etc.

[0185] In some embodiments of this application, "predefined" can be implemented by pre-storing corresponding codes, tables, or other means that can be used to indicate relevant information in the device (e.g., including a first site and a second site). This application does not limit the specific implementation method. For example, predefined can refer to what is defined in the protocol.

[0186] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0187] In this article, "greater than or equal to" can mean greater than or equal to, and "less than or equal to" can mean less than or equal to.

[0188] Furthermore, the step numbers described herein are merely illustrative of one possible execution order between steps. In some other embodiments, the steps may not be executed in the order of their numbers, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0189] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0190] The above are merely exemplary embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application shall be included within the protection scope of this application.

Claims

1. A large model optimization method for a target vertical field, characterized in that, The method includes: Obtain a sample pool, which includes general domain data and vertical domain data; The current round of training data is constructed based on the sample pool, and the initial large model is trained based on the current round of training data to obtain the target large model; Based on the technical standards of the target vertical domain, a test question is constructed for the data of the vertical domain. The target large model is used to generate the response result of the test question. Based on the understanding of the technical standards based on the response result, domain knowledge blind spot samples are identified from the data of the vertical domain. The process of updating the current round of training data based on the domain knowledge blind spot samples to obtain the next round of training data includes: adding the domain knowledge blind spot samples to the sample pool, removing the vertical domain data that the target large model has fully understood from the sample pool, and performing the next round of training on the target large model based on the updated next round of training data.

2. The method of claim 1, wherein, The construction of test questions for data in the target vertical domain based on the technical standards of the target vertical domain includes: The structured information of the technical standard is parsed, and the structured information includes at least one of the following: standard number, scope of application, core indicators, judgment conditions, and risk level threshold. Based on the structured information, knowledge units are extracted from the technical standards, and the knowledge units include at least one of numerical knowledge, conditional knowledge, and process knowledge. A question template is constructed for the knowledge unit, and the question template includes at least one of the following: numerical query template, condition judgment template, and decision process template. The test question is generated based on the question template and the vertical domain data.

3. The method of claim 1, wherein, The understanding of the technical standard based on the response results, and the determination of domain knowledge blind spot samples from the vertical domain data, include: Obtain the standard answer corresponding to the response result, wherein the standard answer is generated based on the technical standard; Calculate the matching degree between the response result and the standard answer, wherein the matching degree includes at least one of semantic similarity, numerical accuracy, and conditional completeness; if the matching degree is lower than a preset matching degree threshold, determine that the target large model has a misunderstanding of the technical standard, and identify the vertical domain data corresponding to the response result as the domain knowledge blind spot sample; Alternatively, feature attribution analysis can be performed on the response results to identify the weaknesses of the target large model in understanding the technical standard, and the vertical domain data corresponding to the weaknesses can be identified as the domain knowledge blind spot samples.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The target large model is used to generate response results for general questions on the general domain data. The response results for the general questions and the corresponding reference answers are input into the arbitration model for evaluation. Based on the evaluation results, general necessity samples are selected from the general domain data. The step of updating the current round of training data based on the domain knowledge blind spot samples to obtain the next round of training data includes: The current round of training data is updated based on the general necessity samples and the domain knowledge blind spot samples to obtain the next round of training data.

5. The method of claim 4, wherein, The step of inputting the response results of the general question and the corresponding reference answer into the arbitration model for evaluation includes: Calculate the semantic similarity between the response to the general question and the reference answer; When the semantic similarity is less than or equal to a preset similarity threshold, the correctness confidence of the response result of the general question is calculated using the arbitration model; When the correctness confidence level is less than the preset correctness threshold, the general domain data corresponding to the response result of the general problem is determined as the general necessity sample.

6. The method of claim 5, wherein, The calculation of the semantic similarity between the response to the general question and the reference answer includes: The response results to the general question and the reference answer are processed by text segmentation to obtain a response word sequence and a reference word sequence. The word vector similarity between the response word sequence and the reference word sequence is calculated. Based on the word vector similarity, the semantic similarity is determined; or, The response to the general question and the reference answer are encoded using a pre-trained semantic encoding model to obtain a response semantic vector and a reference semantic vector. The vector similarity between the response semantic vector and the reference semantic vector is calculated, and the semantic similarity is determined based on the vector similarity; or, The response results and reference answers to the general question are processed by text segmentation to obtain the response word sequence and the reference word sequence. The word vector similarity between the response word sequence and the reference word sequence is calculated. The response results and reference answers to the general question are encoded using the pre-trained semantic coding model to obtain the response semantic vector and the reference semantic vector. The vector similarity between the response semantic vector and the reference semantic vector is calculated. Based on the word vector similarity and the vector similarity, the semantic similarity is determined.

7. The method of claim 4, wherein, The arbitration model is a judgment model built based on a pre-set large language model, and the arbitration model is trained in the following way: Obtain evaluation training data, which includes sample pairs and their corresponding evaluation labels. The sample pairs include the answer to be evaluated and the reference answer. The evaluation labels include consistency labels and correctness labels. The arbitration model is obtained by fine-tuning the preset large language model based on the evaluation training data. The consistency label is used to identify the degree of consistency between the answer to be evaluated and the reference answer, and the correctness label is used to identify the degree of correctness of the answer to be evaluated.

8. The method of claim 4, wherein, The step of updating the current round of training data based on the general necessity samples and the domain knowledge blind spot samples to obtain the next round of training data includes: The general necessary samples and the domain knowledge blind spot samples are added to the current round of training data according to the preset sampling strategy; The updated current training data is preprocessed to obtain the next round of training data.

9. The method of claim 4, wherein, The method further includes: Before acquiring the sample pool, raw data is acquired, including labeled data and unlabeled data; The original data is filtered for validity to obtain filtered sample data; Based on the filtered sample data, the vertical domain data in the sample pool is obtained.

10. The method according to claim 9, characterized in that, The step of filtering the labeled data for validity to obtain filtered sample data includes: The labeled data is grouped based on the hash index, and labeled data with the same hash value are identified as the same data group. Obtain the labels of each labeled data in the data group and determine the frequency of each label; If the difference between the number of occurrences of the first label and the number of occurrences of the second label is greater than or equal to the proportion of the total number of labels in the data group, the labeled data corresponding to the first label is determined as the filtered sample data. Among them, the first tag is the tag that appears most frequently among all the tags, and the second tag is the tag that appears the second most frequently among all the tags.

11. The method according to claim 9, characterized in that, The step of filtering the unlabeled data for validity, resulting in filtered sample data, includes: For each of the unlabeled data, obtain the predicted labels output by multiple expert models with different prediction preferences; Based on the majority voting principle for labels, the predicted label that appears most frequently is determined as the target label for the unlabeled data; If the confidence level of the target label is greater than or equal to the confidence level threshold, the data pair consisting of the unlabeled data and the target label is determined as the filtered sample data.

12. The method according to claim 11, characterized in that, The multiple expert models with different prediction preferences are trained in the following manner: Based on the data ratios of N different vertical domain data and the general domain data, construct N training datasets, where N is an integer greater than or equal to 2; N expert models are trained based on the N training datasets, such that the N expert models have different prediction preferences.

13. The method according to claim 9, characterized in that, The step of obtaining the vertical domain data from the sample pool based on the filtered sample data includes: Identify risky samples from the filtered sample data; Retrieve relevant technical standards and irrelevant technical standards related to the risk sample from the technical standards; The risk sample, the relevant technical standard, and the irrelevant technical standard are input into a preset large language model, and the preset large language model detects the risk sample based on the relevant technical standard; Obtain the detection results and confidence scores output by the preset large language model. If the confidence score is higher than the preset score threshold, the risk sample is identified as the vertical domain data.

14. The method according to claim 4, characterized in that, The method also includes a spiral iteration termination determination: Before executing the next round of training, determine whether the preset termination conditions are met; The preset termination condition includes at least one of the following: the number of iterations reaches the preset maximum number of iterations; The total number of the domain knowledge blind spot samples and the general necessity samples is less than a preset sample number threshold; The performance improvement of the target large model on the evaluation set is less than the preset performance improvement threshold. If the preset termination condition is met, the spiral iteration is terminated, and the final target large model is output.

15. The method according to any one of claims 1 to 3, characterized in that, The method also includes a dynamic data update process: When a change in the technical standard is detected, the change is identified, and the change includes at least one of adding a new standard, revising the standard value, or adjusting the applicable conditions. Construct new training data based on the changes mentioned above; The new training data is added to the sample pool, triggering a new round of spiral iterative training.

16. The method according to claim 15, characterized in that, The construction of new training data based on the changed content includes: Analyze the changes and extract the knowledge units related to those changes; New questions are constructed around the changed knowledge unit, and the types of the new questions include at least one of numerical query type, condition comparison type, and impact analysis type; The standard answer to the new question is generated using a pre-defined large language model. The new question and the standard answer are combined to form a question-answer pair, which is used as the new training data.

17. The method according to any one of claims 1 to 3, characterized in that, The target vertical field is the field of ecological security, and the technical standards include at least one of the national standards, industry standards and local standards related to ecological security. The core indicators of the technical standards include at least one of the pollutant concentration limits, environmental quality levels and risk control thresholds.

18. A large-scale model optimization device oriented towards a target vertical domain, characterized in that, The device includes: A sampling module is used to acquire a sample pool, which includes general domain data and vertical domain data; The training module is used to construct the current round of training data based on the sample pool, and to train the initial large model based on the current round of training data to obtain the target large model; The evaluation module is used to construct test questions for the target vertical domain data based on the technical standards of the target vertical domain, generate response results for the test questions using the target large model, and determine domain knowledge blind spot samples from the vertical domain data based on the understanding of the technical standards based on the response results. The training module is used to update the current round of training data based on the domain knowledge blind spot samples to obtain the next round of training data, including: adding the domain knowledge blind spot samples to the sample pool, removing the vertical domain data that the target large model has fully understood from the sample pool; and performing the next round of training on the target large model based on the updated next round of training data.

19. A computer device, characterized in that, The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the target vertical domain-oriented large model optimization method as described in any one of claims 1 to 17.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the target vertical domain-oriented large model optimization method as described in any one of claims 1 to 17.

21. A chip, characterized in that, The chip includes programmable logic circuits or program instructions, which, when the chip is running, implement the large model optimization method for the target vertical domain as described in any one of claims 1 to 17.