Neural network model online adjustment method and apparatus, and electronic device

By determining the collection of pre -forgotten training samples and updating the connection authority in the neural network model, the problem of predicting accuracy when the neural network model is changed when the external input data is changed, and the self -adaptability and high accuracy of the model is realized.

CN119378628APending Publication Date: 2025-01-28CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310931622.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prediction accuracy of existing neural network models decreases when external input data characteristics change, and existing methods such as reconstructing samples or continuous online training are difficult to effectively solve this problem.

Method used

By satisfying the starting conditions of the preset forgotten process, determine the pre -forgotten training sample collection from the default training sample collection according to the preset training sample collection, and change the total amount of neural network models based on the total value of these samples. , To realize the online adjustment of neural network models.

Benefits of technology

This method enables the neural network model to adapt to changes in the characteristics of external input data, maintain higher predictive accuracy, while avoiding the time and resource consumption caused by re -constructing samples or continuous online training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378628A_ABST
    Figure CN119378628A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a neural network model online adjustment method and device and electronic equipment, and the method comprises the steps: determining a pre-forgetting training sample set from a preset training sample set according to a preset forgetting strategy under the condition that a preset forgetting process starting condition is satisfied; wherein the preset training sample set comprises all training samples used in model training and sample information corresponding to the training samples, and the sample information comprises the total weight change amount; and updating the current connection weight of the neural network model according to the total weight change amount corresponding to all the pre-forgetting training samples in the pre-forgetting training sample set. According to the method, selective'forgetting 'samples are actively carried out according to external input data characteristics, so that the influence of outdated samples is removed, the connection weight of the neural network model can be incrementally updated online in real time, and the neural network model can keep relatively high precision under the condition that the use of the neural network model is not influenced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device and electronic equipment for online adjustment of a neural network model. Background Art

[0002] The most common neural network training currently available is the back-propagation gradient descent algorithm, which is limited to the data features of the training samples. If the neural network model has been put into operation and the external input data after the model is put into operation changes significantly from the input features of the previous training sample set, the prediction accuracy of the neural network model may be reduced.

[0003] How to make the neural network model adapt to new input data and maintain high prediction accuracy is a difficult problem. The simplest method at present is to reconstruct the samples for training, and completely "eliminate" the outdated samples by removing the old samples, but this involves retraining the neural network model from scratch, which is time-consuming and laborious. Alternatively, the model can be continuously trained online by adding new data samples, and the old samples can be continuously "diluted" to maintain a high prediction accuracy. However, this method makes it impossible to completely eliminate the influence of old samples in the short term, and it may take a long time to obtain a better neural network model. Summary of the invention

[0004] In response to the above problems, the present invention provides a method, device and electronic device for online adjustment of a neural network model, which can adapt to external input data and quickly and conveniently allow the neural network model to maintain a high level of accuracy without affecting the use of the neural network model.

[0005] The present invention provides a method for online adjustment of a neural network model, the method comprising:

[0006] When the preset forgetting process start condition is met, a pre-forgetting training sample set is determined from a preset training sample set according to a preset forgetting strategy; wherein the preset training sample set includes all training samples that have been used in model training and sample information corresponding to the training samples, and the sample information includes the total amount of weight change;

[0007] The current connection weights of the neural network model are updated according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set.

[0008] Further, the current connection weights of the neural network model are updated according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set, including:

[0009] The current connection weight of the neural network model is obtained, and the difference between the current connection weight and the total amount of weight change corresponding to all pre-forgetting training samples is used as the updated current connection weight.

[0010] Furthermore, the method further comprises: constructing a preset training sample set according to a preset construction strategy;

[0011] The preset build strategies include:

[0012] After each training operation is performed on the neural network model using a training sample, the total amount of weight change corresponding to the training sample is determined, and the training sample and the total amount of weight change corresponding to the training sample are stored to construct a preset training sample set.

[0013] Further, the training operation includes performing iterative training using a gradient descent method before and / or after the neural network model is put into operation, and determining the total amount of weight changes corresponding to the training sample includes:

[0014] Obtain the amount of change in the network model weights caused by the training sample after each iterative training;

[0015] The changes in the network model weights caused by the training sample after each iterative training are added together to obtain the total weight change corresponding to the training sample.

[0016] Furthermore, the method further comprises:

[0017] After the neural network model is put into operation, the input parameters, predicted values ​​and true values ​​corresponding to each call to the neural network model for prediction are saved;

[0018] The prediction error is determined according to the predicted value and the true value corresponding to each prediction, and the input parameter and the true value corresponding to each prediction are used as a training sample to train the neural network model;

[0019] When all prediction errors within the first preset time period are greater than the preset error threshold, it is determined that the preset forgetting process start condition is met;

[0020] The first preset duration includes: a preset continuous duration before the current moment.

[0021] Furthermore, the sample information also includes the time when the sample was generated;

[0022] Determining a pre-forgotten training sample set from a preset training sample set according to a preset forgetting strategy includes:

[0023] The training samples whose sample generation time is before the preset moment are used as pre-forgotten training samples, and all pre-forgotten training samples and sample information corresponding to each pre-forgotten training sample are obtained from the preset training sample set to determine the pre-forgotten training sample set; wherein the preset moment includes the moment before the current moment and the moment away from the current moment by a second preset time length.

[0024] Further, determining a pre-forgotten training sample set from a preset training sample set according to a preset forgetting strategy includes:

[0025] Calculate the deviation value between the input parameter of each training sample in the preset training sample set and the latest input parameter of the neural network model to obtain a deviation value set;

[0026] The training samples corresponding to the deviation values ​​in the deviation value set that are greater than the preset deviation threshold are used as pre-forgetting training samples;

[0027] All pre-forgotten training samples and sample information corresponding to each pre-forgotten training sample are obtained from a preset training sample set to determine a pre-forgotten training sample set.

[0028] The present invention also provides a neural network model online adjustment device, the device comprising:

[0029] A determination module is used to determine a pre-forgotten training sample set from a preset training sample set according to a preset forgetting strategy when a preset forgetting process start condition is met; wherein the preset training sample set includes all training samples that have been used in model training and sample information corresponding to the training samples, and the sample information includes a total amount of weight changes;

[0030] The updating module is connected to the determining module and is used to update the current connection weights of the neural network model according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set.

[0031] The present invention also provides a computer-readable storage medium, wherein the computer program stored in the computer-readable storage medium implements the steps of the above method when executed by one or more processors.

[0032] The present invention also provides an electronic device, comprising a memory and one or more processors, wherein a computer program is stored in the memory, and when the computer program is executed by the one or more processors, the steps of the above method are executed.

[0033] The neural network model online adjustment method, device and electronic device provided by the present invention can actively and selectively "forget" samples according to the characteristics of external input data, thereby removing the influence of outdated samples, allowing the connection weights of the neural network model to be incrementally updated online in real time, and maintaining a high accuracy of the neural network model without affecting the use of the neural network model. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] 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 work.

[0035] Figure 1 The steps of the online adjustment method of the neural network model in the first embodiment of the present invention are as follows Figure 1 .

[0036] Figure 2 The steps of the online adjustment method of the neural network model in the first embodiment of the present invention are as follows Figure 2 .

[0037] Figure 3 The steps of the online adjustment method of the neural network model in the first embodiment of the present invention are as follows Figure 3 .

[0038] Figure 4 The steps of the online adjustment method of the neural network model in the first embodiment of the present invention are as follows Figure 4 .

[0039] Figure 5 Schematic diagram of the structure of the online adjustment device of the neural network model in the second embodiment of the present invention.

[0040] Figure 6 This is a schematic diagram of the structure of an electronic device in Embodiment 5 of the present invention.

[0041] Reference numerals:

[0042] Figure 5 In: 501-confirmation module, 502-update module;

[0043] Figure 6 In it: 600 - electronic device, 601 - processor, 602 - communication bus, 603 - user interface, 604 - communication interface, 605 - memory. DETAILED DESCRIPTION

[0044] The following will be combined with the accompanying drawings in the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention. The "first" and "second" used in the claims and description of the present invention are only for the purpose of convenience of distinction, have no special meaning, and are not intended to limit the present invention.

[0045] Embodiment 1

[0046] In the first embodiment of the present invention, a method for online adjustment of a neural network model is provided. Figure 1 As shown, the method comprises the following steps:

[0047] Step S101: when a preset forgetting process start condition is met, a pre-forgetting training sample set is determined from a preset training sample set according to a preset forgetting strategy.

[0048] The preset training sample set includes all training samples used in model training and sample information corresponding to the training samples, and the sample information includes the total amount of weight changes. Specifically, model training includes training of the neural network model before and after it is put into operation.

[0049] Among them, putting into operation includes the official launch of the version, etc.

[0050] It can be understood that when training the neural network model, the value of the loss function is minimized by adjusting the connection weights so that the predicted result of the neural network model is as close to the actual result as possible. That is, each time the neural network model is trained using a training sample, the connection weights of the neural network model will change. This embodiment needs to save the change in the connection weights after each training sample is used to train the neural network model, and then obtain the total weight change corresponding to each training sample. The total weight change corresponding to each training sample is used as the sample information corresponding to the training sample to construct a preset training sample set.

[0051] In one implementation, the sample information further includes the sample generation time, and determining the pre-forgotten training sample set from the preset training sample set according to the preset forgetting strategy may include:

[0052] The training samples whose generation time is before the preset time are taken as pre-forgotten training samples, and all pre-forgotten training samples and sample information corresponding to each pre-forgotten training sample are obtained from the preset training sample set to determine the pre-forgotten training sample set.

[0053] The preset time includes a time before the current time and a second preset time distance from the current time.

[0054] It should be noted that the second preset duration can be set by those skilled in the art according to actual needs and is not specifically limited in this embodiment.

[0055] In another implementation, determining the pre-forgotten training sample set from the preset training sample set according to the preset forgetting strategy may also include:

[0056] The deviation values ​​between the input parameters of each training sample in the preset training sample set and the latest input parameters of the neural network model are calculated respectively to obtain a deviation value set.

[0057] The training samples corresponding to the deviation values ​​in the deviation value set that are greater than the preset deviation threshold are used as pre-forgetting training samples.

[0058] All pre-forgotten training samples and sample information corresponding to each pre-forgotten training sample are obtained from a preset training sample set to determine a pre-forgotten training sample set.

[0059] In this embodiment, existing spatial distance calculation methods such as Euclidean distance and Manhattan distance can be used to determine the spatial distance between the input parameters of each training sample and the latest input parameters of the neural network model, and the spatial distance is used as the deviation value.

[0060] It should be noted that the latest input parameters of the neural network model include the latest input parameters input when the neural network model is used for prediction after the neural network model is put into operation. The preset deviation threshold can be set by those skilled in the art according to actual needs and is not specifically limited in this embodiment.

[0061] Step S102: updating the current connection weights of the neural network model according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set.

[0062] In one implementation, updating the current connection weights of the neural network model according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set may include:

[0063] The current connection weight of the neural network model is obtained, and the difference between the current connection weight and the total amount of weight change corresponding to all pre-forgetting training samples is used as the updated current connection weight.

[0064] If the connection weight of the neural network includes multiple components, the total amount of weight change corresponding to each pre-forgetting training sample also includes multiple components. When the current connection weight is subtracted from the total amount of weight change, the component corresponding to the total amount of weight change is subtracted from each component in the current connection weight.

[0065] For example, there are 2 pre-forgotten training samples in the pre-forgotten training sample set, and the current connection weights include W 1 ,W 2 ,…,W n Taking n components as an example, the total amount of weight change corresponding to the first pre-forgotten training sample is recorded as D 1 , D 1 ={d 11 ,d 12 ,…,d 1n}, the total amount of weight change corresponding to the second pre-forget training sample is recorded as D 2 , D 2 ={d 21 ,d 22 ,…,d 2n}, when the current connection weight is subtracted from the total weight change, let W 1 Subtract d 11 and d 21 , W 2 Subtract d 12 and d 22 ,…,W n Subtract d 1n and d 2n .

[0066] Alternatively, if Figure 2 As shown, before step S101, the method further includes:

[0067] Step S103: construct a preset training sample set according to a preset construction strategy.

[0068] The preset build strategies include:

[0069] After each training operation is performed on the neural network model using a training sample, the total amount of weight change corresponding to the training sample is determined, and the training sample and the total amount of weight change corresponding to the training sample are stored to construct a preset training sample set.

[0070] Furthermore, when constructing the preset training sample set, in addition to storing all training samples and the total amount of weight changes corresponding to each training sample, the sample generation time of each training sample is also stored. The preset training sample set can be expressed as D = {(s i ,ate i , D i )}, where si is the i-th training sample, date i is the sample generation time of the i-th training sample, D i is the total amount of weight change for the ith training sample.

[0071] In one implementation, the training operation includes iterative training using a gradient descent method before and / or after the neural network model is put into operation.

[0072] Among them, the gradient descent method is a first-order optimization algorithm, also commonly known as the steepest descent method.

[0073] Further, determining the total amount of weight change corresponding to the training sample includes:

[0074] Obtain the amount of change in the network model weights caused by the training sample after each iterative training;

[0075] The changes in the network model weights caused by the training sample after each iterative training are added together to obtain the total weight change corresponding to the training sample.

[0076] If the connection weight of the neural network includes multiple components, the amount of change in the network model weight after each iteration of training by the training sample also includes multiple components. When adding the amount of change in the network model weight after each iteration of training by the training sample, the components of the change are added accordingly.

[0077] For example, the connection weights include W 1 ,W 2 ,W 3 ,…,W n There are n components in total. The change D of the n connection weights of the neural network model when the tth iteration training is performed using the ith training sample it ={d it1 , d it2 ,…,d itn}, taking the i-th training sample as an example, the total amount of network model weight change D i ={d i1 ,d i2 ,…,d in},in,

[0078] Optionally, after step S102, as Figure 3 As shown, the method also includes:

[0079] Step S104: deleting each pre-forgotten training sample in the pre-forgotten training sample set and the sample information corresponding to the pre-forgotten training sample from the preset training sample set.

[0080] Optionally, before step S101, Figure 4 As shown, the method also includes:

[0081] Step S105: After the neural network model is put into operation, the input parameters, predicted values ​​and true values ​​corresponding to each call to the neural network model for prediction are saved.

[0082] Step S106: Determine the prediction error according to the predicted value and the true value corresponding to each prediction, and use the input parameter and the true value corresponding to each prediction as a training sample to train the neural network model.

[0083] It is understandable that, in step S106, after the neural network model is trained, the used training samples and the sample information corresponding to the training samples (the sample information includes the total amount of weight changes) are also stored in the preset training sample set.

[0084] Step S107: When all prediction errors within the first preset time period are greater than a preset error threshold, it is determined that the preset forgetting process starting condition is met.

[0085] The first preset duration includes: a preset continuous duration before the current moment.

[0086] It should be noted that the preset continuous duration and the preset error threshold can be set by those skilled in the art according to actual needs and are not specifically limited in this embodiment.

[0087] The online adjustment method of the neural network model provided in this embodiment, when the preset forgetting process starting conditions are met, determines a pre-forgotten training sample set and uses the total amount of weight change corresponding to each pre-forgotten sample in the pre-forgotten training sample set to update the connection weights of the neural network model, thereby removing the influence of outdated samples, allowing the connection weights of the neural network model to be incrementally updated online in real time, and maintaining a high accuracy of the neural network model without affecting the use of the neural network model.

[0088] Embodiment 2

[0089] In the second embodiment of the present invention, a device for adjusting a neural network model online is provided. Figure 5 As shown, the device comprises:

[0090] A determination module 501 is used to determine a pre-forgotten training sample set from a preset training sample set according to a preset forgetting strategy when a preset forgetting process start condition is met;

[0091] The preset training sample set includes all the training samples that have been used in the model training and the sample information corresponding to the training samples, and the sample information includes the total amount of weight changes.

[0092] In one implementation, the sample information further includes the sample generation time, and the determination module 501 determines the pre-forgotten training sample set from the preset training sample set according to the preset forgetting strategy, which may include:

[0093] The training samples whose generation time is before the preset time are taken as pre-forgotten training samples, and all pre-forgotten training samples and sample information corresponding to each pre-forgotten training sample are obtained from the preset training sample set to determine the pre-forgotten training sample set.

[0094] The preset time includes a time before the current time and a second preset time distance from the current time.

[0095] In another implementation, determining the pre-forgotten training sample set from the preset training sample set according to the preset forgetting strategy may also include:

[0096] Calculate the deviation value between the input parameter of each training sample in the preset training sample set and the latest input parameter of the neural network model to obtain a deviation value set;

[0097] The training samples corresponding to the deviation values ​​in the deviation value set that are greater than the preset deviation threshold are used as pre-forgetting training samples;

[0098] All pre-forgotten training samples and sample information corresponding to each pre-forgotten training sample are obtained from a preset training sample set to determine a pre-forgotten training sample set.

[0099] The updating module 502 is connected to the determining module 501 and is used to update the current connection weights of the neural network model according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set.

[0100] In one implementation, updating the current connection weights of the neural network model according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set may include:

[0101] The current connection weight of the neural network model is obtained, and the difference between the current connection weight and the total amount of weight change corresponding to all pre-forgetting training samples is used as the updated current connection weight.

[0102] Optionally, the device further comprises a construction module, which is connected to the determination module 501 and is used to construct a preset training sample set according to a preset construction strategy;

[0103] The preset build strategies include:

[0104] After each training operation is performed on the neural network model using a training sample, the total amount of weight change corresponding to the training sample is determined, and the training sample and the total amount of weight change corresponding to the training sample are stored to construct a preset training sample set.

[0105] In one implementation, the training operation includes iterative training using a gradient descent method before and / or after the neural network model is put into operation.

[0106] Further, determining the total amount of weight change corresponding to the training sample includes:

[0107] Obtain the amount of change in the network model weights caused by the training sample after each iterative training;

[0108] The changes in the network model weights caused by the training sample after each iterative training are added together to obtain the total weight change corresponding to the training sample.

[0109] Optionally, the device further includes a forgetting process starting module, which is connected to the determination module 501 and is used to save the input parameters, predicted values ​​and true values ​​corresponding to each time the neural network model is called for prediction after the neural network model is put into operation; determine the prediction error according to the predicted value and true value corresponding to each prediction, and use the input parameters and true values ​​corresponding to each prediction as a training sample to train the neural network model; when all prediction errors within the first preset time period are greater than the preset error threshold, determine that the preset forgetting process starting condition is met;

[0110] The first preset duration includes: a preset continuous duration before the current moment.

[0111] The neural network model online adjustment device provided in this embodiment determines a pre-forgotten training sample set and updates the connection weights of the neural network model using the total amount of weight change corresponding to each pre-forgotten sample in the pre-forgotten training sample set when the preset forgetting process start conditions are met, thereby removing the influence of outdated samples and allowing the connection weights of the neural network model to be incrementally updated online in real time, thereby maintaining a high accuracy of the neural network model without affecting the use of the neural network model.

[0112] Embodiment 3

[0113] In this embodiment, a computer program product is provided. The computer program product includes a computer program or instructions. When the computer program or instructions are executed by a processor, all or part of the steps of the method in the above-mentioned embodiment 1 are implemented, and this embodiment will not be repeated here.

[0114] Further, the computer program product may include one or more computer executable components configured to execute the embodiment when the program is run; the computer program product may also include a computer program tangibly contained on a readable medium, the computer program including program code for executing any method in the embodiments of the present disclosure. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium.

[0115] Embodiment 4

[0116] This embodiment provides a computer-readable storage medium. The computer program stored in the computer-readable storage medium, when executed by one or more processors, implements all or part of the steps of the method in the above-mentioned embodiment 1, and this embodiment will not be repeated here.

[0117] Embodiment 5

[0118] This embodiment provides an electronic device, Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 600 includes: at least one processor 601, at least one communication bus 602, a user interface 603, at least one external communication interface 604, and a memory 605. Among them, the communication bus 602 is configured to realize the connection and communication between these components. Among them, the user interface 603 may include a display screen, and the external communication interface 604 may include a standard wired interface and a wireless interface. A computer program is stored in the memory 605, and the memory 605 and one or more processors 601 are connected to each other in communication. When the computer program is executed by one or more processors, the processor 601 is configured to execute the computer program stored in the memory to implement all or part of the steps of the method in the above-mentioned embodiment 1, and this embodiment will not be repeated here.

[0119] The neural network model online adjustment method, device and electronic device provided by the present invention determine a pre-forgotten training sample set and use the total amount of weight change corresponding to each pre-forgotten sample in the pre-forgotten training sample set to update the connection weights of the neural network model, thereby removing the influence of outdated samples and allowing the connection weights of the neural network model to be incrementally updated online in real time, so as to maintain a high accuracy of the neural network model without affecting the use of the neural network model.

[0120] The terms and expressions used in the present specification are for illustration only and are not intended to be limiting. It should be understood by those skilled in the art that various changes may be made to the details of the above embodiments without departing from the basic principles of the disclosed embodiments. Therefore, the scope of the present invention is determined solely by the claims, and in the claims, unless otherwise indicated, all terms should be understood in the broadest reasonable sense.

Claims

1. A method for online adjustment of a neural network model, characterized in that: The method comprises: When the preset forgetting process start condition is met, a pre-forgetting training sample set is determined from a preset training sample set according to a preset forgetting strategy; wherein the preset training sample set includes all training samples that have been used in model training and sample information corresponding to the training samples, and the sample information includes the total amount of weight change; The current connection weights of the neural network model are updated according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set.

2. The online adjustment method of the neural network model according to claim 1, characterized in that: The updating of the current connection weights of the neural network model according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set includes: The current connection weight of the neural network model is obtained, and the difference between the current connection weight and the total amount of weight change corresponding to all pre-forgotten training samples is used as the updated current connection weight.

3. The online adjustment method of the neural network model according to claim 1, characterized in that: The method further comprises: constructing the preset training sample set according to a preset construction strategy; The preset construction strategy includes: After each training operation is performed on the neural network model using a training sample, the total amount of weight change corresponding to the training sample is determined, and the training sample and the total amount of weight change corresponding to the training sample are stored to construct the preset training sample set.

4. The online adjustment method of the neural network model according to claim 3 is characterized in that: The training operation includes performing iterative training using a gradient descent method before and / or after the neural network model is put into operation, and determining the total amount of weight changes corresponding to the training sample includes: Obtain the amount of change in the network model weights caused by the training sample after each iterative training; The changes in the network model weights caused by the training sample after each iterative training are added together to obtain the total weight change corresponding to the training sample.

5. The online adjustment method of the neural network model according to claim 1, characterized in that: The method further comprises: After the neural network model is put into operation, the input parameters, predicted values ​​and true values ​​corresponding to each time the neural network model is called for prediction are saved; Determine the prediction error according to the prediction value and the true value corresponding to each prediction, and use the input parameter and the true value corresponding to each prediction as a training sample to train the neural network model; When all prediction errors within the first preset time period are greater than the preset error threshold, it is determined that the preset forgetting process start condition is met; The first preset duration includes: a preset continuous duration before the current moment.

6. The online adjustment method of the neural network model according to claim 1, characterized in that: The sample information also includes the sample generation time; the step of determining the pre-forgotten training sample set from the preset training sample set according to the preset forgetting strategy includes: The training samples whose generation time is before a preset moment are taken as pre-forgotten training samples, and all pre-forgotten training samples and sample information corresponding to each pre-forgotten training sample are obtained from the preset training sample set to determine the pre-forgotten training sample set; wherein the preset moment includes a moment before the current moment and a moment that is a second preset time length away from the current moment.

7. The online adjustment method of the neural network model according to claim 1, characterized in that: The step of determining a pre-forgotten training sample set from a preset training sample set according to a preset forgetting strategy includes: Calculating the deviation values ​​between the input parameters of each training sample in the preset training sample set and the latest input parameters of the neural network model respectively to obtain a deviation value set; Taking the training samples corresponding to the deviation values ​​in the deviation value set that are greater than the preset deviation threshold as pre-forgotten training samples; All pre-forgotten training samples and sample information corresponding to each pre-forgotten training sample are obtained from the preset training sample set to determine the pre-forgotten training sample set.

8. A neural network model online adjustment device, characterized in that: The device comprises: A determination module, configured to determine a pre-forgotten training sample set from a preset training sample set according to a preset forgetting strategy when a preset forgetting process start condition is met; wherein the preset training sample set includes all training samples that have been used in model training and sample information corresponding to the training samples, and the sample information includes a total amount of weight changes; An updating module, connected to the determining module, is used to update the current connection weights of the neural network model according to the total amount of weight changes corresponding to all pre-forgotten training samples in the pre-forgotten training sample set.

9. A computer-readable storage medium, characterized in that: The computer program stored in the computer-readable storage medium, when executed by one or more processors, implements the steps of the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The method comprises a memory and one or more processors, wherein a computer program is stored in the memory, and when the computer program is executed by the one or more processors, the steps of the method according to any one of claims 1 to 7 are performed.