Model incremental fine-tuning method, system, device and medium based on dynamic information
Through the dynamic information incremental fine-tuning method, we build a supervised data set and use the Adapter module to optimize the language model, which solves the problems of low efficiency and poor accuracy of language models in real-time data processing in the e-commerce industry, and achieves rapid iteration and continuous learning. Improved model performance and flexibility in e-commerce scenarios.
Patent Information
- Application Number
- CN202410344611.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-03-25
AI Technical Summary
Traditional large-scale language model fine-tuning methods are inefficient when faced with a large amount of real-time changing data in the e-commerce industry, are difficult to update quickly, and are difficult to effectively integrate new information on the basis of maintaining old knowledge, and the model lacks flexibility and adaptability. Address the diversity and complexity of data.
Adopt the incremental fine-tuning method of the model based on dynamic information, collect and preprocess product information data, build a supervised data set, use the Adapter module to optimize the language model, and conduct fine-tuning training through the supervised data set, and regularly evaluate the model performance to achieve rapid iteration and Continuous learning.
Significantly improves the application effect of language models in e-commerce scenarios, can quickly adapt to new information, improves the performance of tasks such as product description generation, attribute query, and price change explanation, maintains model generalization capabilities, and achieves higher accuracy and response Speed, expanding the application potential of language models.
Smart Images

Figure CN118094105B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a model incremental fine-tuning method, system, device and medium based on dynamic information. Background Art
[0002] In the field of e-commerce, the application of large language models is increasing day by day. They play a vital role in processing product descriptions, user reviews, and automatically answering customer inquiries. However, a notable feature of the e-commerce industry is the high dynamics of information. Product information, user preferences, market trends and other factors are constantly changing. The rapid capture and application of this incremental knowledge is crucial to maintaining the timeliness and accuracy of large models.
[0003] Traditional large-scale model fine-tuning methods face several key challenges. First, traditional methods are often inefficient when faced with large amounts of real-time changing data and cannot achieve rapid model updates. Second, as new information continues to accumulate, how to effectively integrate this information without losing old knowledge is also a technical difficulty. In addition, the diversity and complexity of e-commerce industry data requires the model to have a high degree of flexibility and adaptability, which is also difficult for traditional methods to meet.
[0004] Therefore, a model incremental fine-tuning method based on dynamic information is urgently needed to address the high requirements for language model flexibility caused by the diversity and complexity of the e-commerce industry data. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention proposes a model incremental fine-tuning method, system, device and medium based on dynamic information.
[0006] The first aspect of the present invention discloses a model incremental fine-tuning method based on dynamic information, comprising:
[0007] S1: Collect commodity information data, pre-process the commodity information data, and obtain commodity change data;
[0008] S2: determining a supervision problem of a supervision training set based on the commodity change data, and constructing a supervision data set of a language model based on the supervision problem and the commodity change data, wherein the supervision data set includes a training set, a test set, and a validation set;
[0009] S3: Optimizing the model in the language model using the Adapter module;
[0010] S4: fine-tuning the optimized language model using the supervised dataset;
[0011] S5: Evaluate the performance of the fine-tuned language model according to the model evaluation indicators and output the target language model.
[0012] In an optional embodiment, the collecting of commodity information data, preprocessing of the commodity information data, and obtaining commodity change data include:
[0013] S11: regularly collecting updated product information on the platform, wherein the product information includes product attribute information, product price information, and product related information;
[0014] S12: Preprocessing the product information data, wherein the preprocessing operations include data cleaning, data denoising, data labeling, data enhancement, and change feature extraction.
[0015] In an optional embodiment, the supervision problem of determining the supervision training set based on the commodity change data includes:
[0016] S21: Determine a target supervision problem based on the input product information and product change data, wherein the supervision problem includes generating product description text, querying product attributes, and product price changes.
[0017] In an optional embodiment, the supervised data set for constructing a language model based on the supervised problem and the commodity change data
[0018] S22: For the supervision problem of generating a product description text, the supervision data set is constructed by inputting partial product information and / or product change data to associate the real-time product information, so as to output a complete product description text as a target supervision problem;
[0019] S23: For the supervision problem of querying product attributes, the product attributes are associated by inputting a query statement, and the attribute association response corresponding to the query statement is output as the target supervision problem to construct the supervision data set;
[0020] S24: For the supervision problem of the commodity price change, the commodity information is associated by inputting the commodity change data to output the price change description corresponding to the commodity change data as the target supervision problem to construct the supervision data set.
[0021] In an optional embodiment, optimizing the model in the language model by the Adapter module includes:
[0022] S31: Two fully connected layers and a nonlinear activation function form the Adapter module;
[0023] S32: Insert the Adapter module after the feedforward network layer of the language model and between the self-attention layer and the feedforward network layer. The expression of the Adapter module is:
[0024] Adapter(x)=W 2 ReLU(W 1 ·x+b 1 )+b 2 +x
[0025] Where x represents the input vector and has dimension d x ×1,W 1 Represents the first weight matrix, which is used to linearly change the input data, W 2 Represents the second weight matrix, which is used to transform the output after the activation function into the dimension of the original input vector x through mapping. ReLU represents the activation function, and b 1 represents the first bias vector and is the same as W 1 The dimension of the output result after linear transformation is the same, b 2 represents the second bias vector and has the same dimension as the input vector x, +x represents the residual connection and the parameter dimension remains d x ×1 unchanged;
[0026] S33: For each encoder layer of the language model, the supervised data set is input into the language model, and passes through the self-attention layer, the Adapter module, the feedforward network layer and the Adapter module in sequence.
[0027] In an optional embodiment, fine-tuning the optimized language model using the supervised dataset includes:
[0028] S41: setting the target of incremental fine-tuning to update only the parameters in the Adapter module;
[0029] S42: outputting a prediction result through forward propagation of the language model trained with the supervised dataset, and updating the parameters in the Adapter module through back propagation;
[0030] S43: A negative log-likelihood loss function is used to evaluate the gap between the predicted value and the true value of the prediction result for the generation task of the supervision problem. The expression of the negative log-likelihood loss function is:
[0031]
[0032] Among them, L(θ) represents the negative log-likelihood loss function, (y 1 ,y 2 , ..., y T) represents the real sequence of the generated task corresponding to the supervision problem, y t represents the tth word in the real sequence, T represents the sequence length, p(y t |y 1 ,y 2 , ..., y t-1 ; θ) represents the probability distribution of a word generated by the language model, and θ represents the parameters of the model;
[0033] S44: Regularly evaluate the performance of the language model on the validation set of the supervised dataset, monitor and adjust the model fine-tuning process through the evaluation results, and save the weight of the language model with the highest performance on the validation set.
[0034] In an optional embodiment, evaluating the performance of the fine-tuned language model according to the model evaluation index and outputting the target language model includes:
[0035] S51: The model evaluation indicators include BLEU indicator, Rouge indicator and Perplexity indicator. The BLEU indicator outputs a BLEU score by calculating the matching degree of n-gram to measure the overlap between the model output and the reference text. The Rouge indicator calculates the Rouge score based on the matching degree of n-gram, the phrase matching degree and the recall rate to evaluate the quality of text generation. The Perplexity indicator evaluates the selection certainty of the generated sequence when the language model generates text to evaluate the selection perplexity of the language model.
[0036] S52: The weights of BLEU score, Rouge score and Perplexity score are learned through the neural network model, and the target evaluation score is output by weighting the BLEU index, Rouge index and Perplexity index to minimize the difference between the evaluation score and the manual scoring score;
[0037] S53: Filter the target language model according to the target evaluation score.
[0038] A second aspect of the present invention discloses a model incremental fine-tuning system based on dynamic information, the system comprising:
[0039] A data collection module is used to collect commodity information data, pre-process the commodity information data, and obtain commodity change data;
[0040] A data processing module, used to determine a supervision problem of a supervision training set based on the commodity change data, and to construct a supervision data set of a language model based on the supervision problem and the commodity change data, wherein the supervision data set includes a training set, a test set, and a validation set;
[0041] A model optimization module, used for optimizing the model in the language model by using the Adapter module;
[0042] A model training module, used to fine-tune the optimized language model using the supervised dataset;
[0043] The output module is used to evaluate the performance of the fine-tuned language model according to the model evaluation indicators and output the target language model.
[0044] The third aspect of the present invention discloses a model incremental fine-tuning device based on dynamic information, comprising:
[0045] at least one processor, and
[0046] a memory communicatively connected to the at least one processor; wherein,
[0047] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the dynamic information-based model incremental fine-tuning method as described in any one of the first aspects of the present invention.
[0048] The fourth aspect of the present invention discloses a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the dynamic information-based model incremental fine-tuning method as described in any one of the first aspect of the present invention.
[0049] Compared with the prior art, the present invention has the following advantages:
[0050] (1) The present invention fine-tunes the language model through a supervised dataset that updates product information in real time, and adopts an innovative retrieval-enhanced reasoning framework for supervised problems to achieve rapid iteration and continuous learning of the language model, thereby solving the problems of low efficiency and poor accuracy of the language model in the e-commerce field when dealing with real-time changing data. This can not only significantly improve the application effect of the language model in e-commerce scenarios, but also provide valuable reference for other fields that need to process real-time dynamic data.
[0051] (2) The present invention aims at the dynamic update of product information in the e-commerce industry. By constructing a targeted supervised data set, the language model can quickly adapt to new product information without sacrificing pre-trained knowledge, thereby improving the performance in tasks such as product description generation, attribute query, and price change explanation.
[0052] (3) By fine-tuning the model in detail, we can optimize the performance of the model for specific tasks while maintaining its generalization ability, thereby achieving higher accuracy and response speed in specific fields. The flexible and efficient fine-tuning method will greatly expand the application potential of language models in various industries and provide strong support for the realization of more intelligent industry solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0054] Figure 1 It is a flow chart of the model incremental fine-tuning method based on dynamic information of the present invention;
[0055] Figure 2 Schematic diagram of the model incremental fine-tuning system based on dynamic information of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0057] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0058] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0059] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0060] Example 1
[0061] See also Figure 1 The embodiment of the present invention discloses a model incremental fine-tuning method based on dynamic information, comprising:
[0062] S1: Collect commodity information data, pre-process the commodity information data, and obtain commodity change data;
[0063] S2: determining a supervision problem of a supervision training set based on the commodity change data, and constructing a supervision data set of a language model based on the supervision problem and the commodity change data, wherein the supervision data set includes a training set, a test set, and a validation set;
[0064] S3: Optimizing the model in the language model using the Adapter module;
[0065] S4: fine-tuning the optimized language model using the supervised dataset;
[0066] S5: Evaluate the performance of the fine-tuned language model according to the model evaluation indicators and output the target language model.
[0067] In an optional embodiment, the collecting of commodity information data, preprocessing of the commodity information data, and obtaining commodity change data include:
[0068] S11: regularly collecting updated product information on the platform, wherein the product information includes product attribute information, product price information, and product related information;
[0069] S12: Preprocessing the product information data, wherein the preprocessing operations include data cleaning, data denoising, data labeling, data enhancement, and change feature extraction.
[0070] In an optional embodiment, the supervision problem of determining the supervision training set based on the commodity change data includes:
[0071] S21: Determine a target supervision problem based on the input product information and product change data, wherein the supervision problem includes generating product description text, querying product attributes, and product price changes.
[0072] In an optional embodiment, the supervised data set for constructing a language model based on the supervised problem and the commodity change data
[0073] S22: For the supervision problem of generating a product description text, the supervision data set is constructed by inputting partial product information and / or product change data to associate the real-time product information, so as to output a complete product description text as a target supervision problem;
[0074] S23: For the supervision problem of querying product attributes, the product attributes are associated by inputting a query statement, and the attribute association response corresponding to the query statement is output as the target supervision problem to construct the supervision data set;
[0075] S24: For the supervision problem of the commodity price change, the commodity information is associated by inputting the commodity change data to output the price change description corresponding to the commodity change data as the target supervision problem to construct the supervision data set.
[0076] In an optional embodiment, optimizing the model in the language model by the Adapter module includes:
[0077] S31: Two fully connected layers and a nonlinear activation function form the Adapter module;
[0078] S32: Insert the Adapter module after the feedforward network layer of the language model and between the self-attention layer and the feedforward network layer. The expression of the Adapter module is:
[0079] Adapter(x)=W 2 ReLU(W 1 ·x+b 1 )+b 2 +x
[0080] Where x represents the input vector and has dimension d x ×1,W 1 Represents the first weight matrix, which is used to linearly change the input data, W 2 Represents the second weight matrix, which is used to transform the output after the activation function into the dimension of the original input vector x through mapping. ReLU represents the activation function, and b 1 represents the first bias vector and is the same as W 1 The dimension of the output result after linear transformation is the same, b 2 represents the second bias vector and has the same dimension as the input vector x, +x represents the residual connection and the parameter dimension remains d x ×1 unchanged;
[0081] S33: For each encoder layer of the language model, the supervised data set is input into the language model, and passes through the self-attention layer, the Adapter module, the feedforward network layer and the Adapter module in sequence.
[0082] In an optional embodiment, fine-tuning the optimized language model using the supervised dataset includes:
[0083] S41: setting the target of incremental fine-tuning to update only the parameters in the Adapter module;
[0084] S42: outputting a prediction result through forward propagation of the language model trained with the supervised dataset, and updating the parameters in the Adapter module through back propagation;
[0085] S43: A negative log-likelihood loss function is used to evaluate the gap between the predicted value and the true value of the prediction result for the generation task of the supervision problem. The expression of the negative log-likelihood loss function is:
[0086]
[0087] Among them, L(θ) represents the negative log-likelihood loss function, (y 1 ,y 2 , ..., y T) represents the real sequence of the generated task corresponding to the supervision problem, y t represents the tth word in the real sequence, T represents the sequence length, p(y t |y 1 ,y 2 , ..., y t-1 ; θ) represents the probability distribution of a word generated by the language model, and θ represents the parameters of the model;
[0088] S44: Regularly evaluate the performance of the language model on the validation set of the supervised dataset, monitor and adjust the model fine-tuning process through the evaluation results, and save the weight of the language model with the highest performance on the validation set.
[0089] In an optional embodiment, evaluating the performance of the fine-tuned language model according to the model evaluation index and outputting the target language model includes:
[0090] S51: The model evaluation indicators include BLEU indicator, Rouge indicator and Perplexity indicator. The BLEU indicator outputs a BLEU score by calculating the matching degree of n-gram to measure the overlap between the model output and the reference text. The Rouge indicator calculates the Rouge score based on the matching degree of n-gram, the phrase matching degree and the recall rate to evaluate the quality of text generation. The Perplexity indicator evaluates the selection certainty of the generated sequence when the language model generates text to evaluate the selection perplexity of the language model.
[0091] S52: The weights of BLEU score, Rouge score and Perplexity score are learned through the neural network model, and the target evaluation score is output by weighting the BLEU index, Rouge index and Perplexity index to minimize the difference between the evaluation score and the manual scoring score;
[0092] S53: Filter the target language model according to the target evaluation score.
[0093] The present invention fine-tunes the language model through a supervised data set that updates commodity information in real time, and adopts an innovative retrieval-enhanced reasoning framework for supervised problems to achieve rapid iteration and continuous learning of the language model, thereby solving the problems of low efficiency and poor accuracy of the language model in the e-commerce field when dealing with real-time changing data. This can not only significantly improve the application effect of the language model in e-commerce scenarios, but also provide valuable reference for other fields that need to process real-time dynamic data.
[0094] The present invention aims at the dynamic update of commodity information in the e-commerce industry. By constructing a targeted supervised data set, the language model can quickly adapt to new commodity information without sacrificing pre-trained knowledge, and improve the performance in tasks such as commodity description generation, attribute query and price change explanation.
[0095] By fine-tuning the model in a refined manner, the present invention can optimize its performance for specific tasks while maintaining the generalization ability of the model, thereby achieving higher accuracy and response speed in specific fields. The flexible and efficient fine-tuning method will greatly expand the application potential of language models in various industries and provide strong support for the realization of more intelligent industry solutions.
[0096] like Figure 2 As shown, the second aspect of the present invention discloses a model incremental fine-tuning system based on dynamic information, the system comprising:
[0097] A data collection module is used to collect commodity information data, pre-process the commodity information data, and obtain commodity change data;
[0098] A data processing module, used to determine a supervision problem of a supervision training set based on the commodity change data, and to construct a supervision data set of a language model based on the supervision problem and the commodity change data, wherein the supervision data set includes a training set, a test set, and a validation set;
[0099] A model optimization module, used for optimizing the model in the language model by using the Adapter module;
[0100] A model training module, used to fine-tune the optimized language model using the supervised dataset;
[0101] The output module is used to evaluate the performance of the fine-tuned language model according to the model evaluation indicators and output the target language model.
[0102] The third aspect of the present invention discloses a model incremental fine-tuning device based on dynamic information, comprising:
[0103] at least one processor, and
[0104] a memory communicatively connected to the at least one processor; wherein,
[0105] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the dynamic information-based model incremental fine-tuning method as described in any one of the first aspects of the present invention.
[0106] The computer device may be a terminal, and the computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a model incremental fine-tuning method based on dynamic information is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0107] The fourth aspect of the present invention discloses a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the dynamic information-based model incremental fine-tuning method as described in any one of the first aspect of the present invention.
[0108] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned model incremental fine-tuning method based on dynamic information. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0109] Alternatively, if the above modules of the present invention are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, RAM, ROM, magnetic disks or optical disks.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A model incremental fine-tuning method based on dynamic information, characterized in that: The method comprises: S1: Collect commodity information data, pre-process the commodity information data, and obtain commodity change data; S2: determining a supervision problem of a supervision training set based on the commodity change data, and constructing a supervision data set of a language model based on the supervision problem and the commodity change data, wherein the supervision data set includes a training set, a test set, and a validation set; S3: Optimizing the model in the language model using an Adapter module; S4: fine-tuning the optimized language model using the supervised dataset; S5: Evaluate the performance of the fine-tuned language model according to the model evaluation indicators and output the target language model; The collecting of commodity information data, preprocessing of the commodity information data, and obtaining commodity change data include: S11: regularly collecting updated product information on the platform, wherein the product information includes product attribute information, product price information, and product related information; S12: Preprocessing the commodity information data, wherein the preprocessing includes data cleaning, data denoising, data labeling, data enhancement, and change feature extraction; The supervision problem of determining the supervision training set based on the commodity change data includes: S21: determining a target supervision problem based on the input commodity information and commodity change data, wherein the supervision problem includes generating commodity description text, querying commodity attributes and commodity price changes; The supervised data set for constructing a language model based on the supervised problem and commodity change data includes: S22: For the supervision problem of generating a product description text, the supervision data set is constructed by inputting partial product information and / or product change data to associate the real-time product information, so as to output a complete product description text as a target supervision problem; S23: For the supervision problem of querying product attributes, the product attributes are associated by inputting a query statement, and the attribute association response corresponding to the query statement is output as the target supervision problem to construct the supervision data set; S24: For the supervision problem of the commodity price change, the commodity information is associated by inputting the commodity change data, and the price change description corresponding to the commodity change data is output as the target supervision problem to construct the supervision data set.
2. The model incremental fine-tuning method based on dynamic information according to claim 1, characterized in that: The adopting of the Adapter module to optimize the model in the language model includes: S31: Two fully connected layers and a nonlinear activation function form the Adapter module; S32: Insert the Adapter module after the feedforward network layer of the language model and between the self-attention layer and the feedforward network layer. The expression of the Adapter module is: Adapter(x)=W2·ReLU(W1·x+b1)+b2+x Where x represents the input vector and has dimension d x ×1, W1 represents the first weight matrix, which is used to linearly change the input data, W2 represents the second weight matrix, which is used to transform the output after the activation function into the dimension of the original input vector x through mapping, ReLU represents the activation function, b1 represents the first bias vector and has the same dimension as the output result after the linear change of W1, b2 represents the second bias vector and has the same dimension as the input vector x, +x represents the residual connection and the parameter dimension remains d x ×1 unchanged; S33: For each encoder layer of the language model, the supervised data set is input into the language model, and passes through the self-attention layer, the Adapter module, the feedforward network layer and the Adapter module in sequence.
3. The model incremental fine-tuning method based on dynamic information according to claim 1, characterized in that: The fine-tuning training of the optimized language model using the supervised dataset includes: S41: setting the target of incremental fine-tuning to update only the parameters in the Adapter module; S42: outputting a prediction result through forward propagation of the language model trained with the supervised dataset, and updating the parameters in the Adapter module through back propagation; S43: A negative log-likelihood loss function is used to evaluate the gap between the predicted value and the true value of the prediction result for the generation task of the supervision problem. The expression of the negative log-likelihood loss function is: Among them, L(θ) represents the negative log-likelihood loss function, (y1,y2,...,y T ) represents the real sequence of the generated task corresponding to the supervision problem, y t represents the tth word in the real sequence, T represents the sequence length, p(y t |y1,y2,...,y t-1 ; θ) represents the probability distribution of a word generated by the language model, and θ represents the parameters of the model; S44: Regularly evaluate the performance of the language model on the validation set of the supervised dataset, monitor and adjust the model fine-tuning process through the evaluation results, and save the weight of the language model with the highest performance on the validation set.
4. The model incremental fine-tuning method based on dynamic information according to claim 1, characterized in that: The step of evaluating the performance of the fine-tuned language model according to the model evaluation index and outputting the target language model includes: S51: The model evaluation indicators include BLEU indicator, Rouge indicator and Perplexity indicator. The BLEU indicator outputs a BLEU score by calculating the matching degree of n-gram to measure the overlap between the model output and the reference text. The Rouge indicator calculates the Rouge score based on the matching degree of n-gram, the phrase matching degree and the recall rate to evaluate the quality of text generation. The Perplexity indicator evaluates the selection certainty of the generated sequence when the language model generates text to evaluate the selection perplexity of the language model. S52: The weights of BLEU score, Rouge score and Perplexity score are learned through the neural network model, and the target evaluation score is output by weighting the BLEU index, Rouge index and Perplexity index to minimize the difference between the evaluation score and the manual scoring score; S53: Filter the target language model according to the target evaluation score.
5. A model incremental fine-tuning system based on dynamic information, characterized in that: The system comprises: A data collection module is used to collect commodity information data, pre-process the commodity information data, and obtain commodity change data; A data processing module, used to determine a supervision problem of a supervision training set based on the commodity change data, and to construct a supervision data set of a language model based on the supervision problem and the commodity change data, wherein the supervision data set includes a training set, a test set, and a validation set; A model optimization module, used for optimizing the model in the language model by using an Adapter module; A model training module, used to fine-tune the optimized language model using the supervised dataset; The output module is used to evaluate the performance of the fine-tuned language model according to the model evaluation indicators and output the target language model; The collecting of commodity information data, preprocessing of the commodity information data, and obtaining commodity change data include: Regularly collect updated product information on the platform, the product information includes product attribute information, product price information and product association information; pre-process the product information data, the pre-processing includes data cleaning, data denoising, data labeling, data enhancement and change feature extraction; The determining of the supervision problem of the supervision training set based on the commodity change data includes: determining the target supervision problem according to the input commodity information and the commodity change data, wherein the supervision problem includes generating commodity description text, querying commodity attributes and commodity price changes; The supervised data set for constructing a language model based on the supervised problem and the commodity change data includes: for the supervised problem of generating commodity description text, the supervised data set is constructed by inputting partial commodity information and / or commodity change data to associate with real-time commodity information so as to output a complete commodity description text as a target supervised problem; for the supervised problem of querying commodity attributes, the supervised data set is constructed by inputting a query statement to associate with commodity attributes so as to output a property association response corresponding to the query statement as a target supervised problem; for the supervised problem of commodity price changes, the supervised data set is constructed by inputting the commodity change data to associate with commodity information so as to output a price change description corresponding to the commodity change data as a target supervised problem.
6. A model incremental fine-tuning device based on dynamic information, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the dynamic information-based model incremental fine-tuning method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the model incremental fine-tuning method based on dynamic information as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Construction method of dynamic intelligent container commodity identification model
CN115984653A
Unified prompt tuning method for small sample text analysis
CN116596058A
Commodity description content generation method and device, equipment and medium
CN117057873A
Trusted electronic file large language model training and reasoning method and device
CN117236410A
Data processing method, data processing device, and computer readable storage medium
WO2019071965A1
