Method and apparatus for updating a model based on a memory neuron, device and medium

By identifying and updating neurons that meet certain conditions in a large model, the problem of high cost and low efficiency in dynamic knowledge updates of large models is solved, and fast and efficient model updates are achieved.

CN116861986BActive Publication Date: 2026-03-17PING AN TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing large-scale models are costly and inefficient when updating dynamic knowledge, and cannot quickly locate and update neurons that need to be updated.

Method used

By acquiring text data and inputting it into the data model to be updated, neurons whose classification labels meet the preset conditions are identified as second storage neurons, and their weights are updated, thus avoiding retraining the entire model.

Benefits of technology

It enables rapid and efficient model updates even with frequent dynamic knowledge updates, reducing training costs and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116861986B_ABST
    Figure CN116861986B_ABST
Patent Text Reader

Abstract

This application relates to the fields of artificial intelligence and medical health technology, and discloses a method, apparatus, device, and medium for updating a model based on stored neural units. The method includes: acquiring text data; inputting the text data into a first data model to obtain a first output value; inputting each first output value into a target classification model to obtain a first classification label corresponding to each first stored neuron; determining each first stored neuron whose classification label satisfies a preset update condition as a second stored neuron, and designating the first neuron corresponding to the second stored neuron as a second neuron; and updating the weights of the second neurons in the first data model according to the text data and the first data model. This method can identify and update the second neurons that need updating, enabling rapid updating of the first data model, improving the efficiency of updating the first data model, and reducing the cost of training the first data model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and medical and health technology, and in particular to a method, apparatus, device and medium for updating models based on storage neural units. Background Technology

[0002] Large-scale models are widely used, but they face challenges in learning and storing knowledge, especially for knowledge that needs to be updated frequently. These large models can be medical text recognition models or medical data analysis models. The mainstream approach is to fine-tune or retrain the large model.

[0003] However, training large models is extremely expensive, and dynamic knowledge updates are required very frequently. Currently, there are also methods that connect large models to the network to aggregate knowledge and then output factual knowledge. However, inputting knowledge through the network cannot change the inherent knowledge storage of large models such as chatgpt (Chat Generative Pre-trained Transformer). Furthermore, after removing chatgpt from the network, the model will forget the knowledge from the network. Essentially, they are all gpt (Generative Pre-trained Transformer) type models that rely on offline learning.

[0004] Therefore, how to quickly locate the neurons in a large model that need to be updated and update those neurons has become an urgent problem to be solved. Summary of the Invention

[0005] Therefore, it is necessary to address the technical problem that existing technologies cannot quickly update data for large models, and propose a model update method based on storage neural units.

[0006] Firstly, a method for updating a model based on storage neural units is provided, the method comprising:

[0007] Retrieve the text data that needs to be updated;

[0008] The text data is input into the first data model to be updated to obtain the first output value of each first storage neuron in the first data model, wherein the first data model includes each first neuron, and each first neuron is configured with at least one first storage neuron;

[0009] Each of the first output values ​​is input into the target classification model to classify each of the first storage neurons, thereby obtaining the first classification label corresponding to each of the first storage neurons.

[0010] In each of the first storage neurons, each first storage neuron whose classification label satisfies the preset update condition is determined as a second storage neuron, and the first neuron corresponding to the second storage neuron is also determined as the second neuron.

[0011] Based on the text data and the first data model, the weights of the second neuron in the first data model are updated.

[0012] Secondly, a storage neural unit-based update model device is provided, the device comprising:

[0013] The acquisition module is used to acquire the text data that needs to be updated;

[0014] The output module is used to input the text data into the first data model to be updated, and obtain the first output value of each first storage neuron in the first data model, wherein the first data model includes each first neuron, and each first neuron is configured with at least one first storage neuron;

[0015] The classification module is used to input each of the first output values ​​into the target classification model, perform classification processing on each of the first storage neurons, and obtain the first classification label corresponding to each of the first storage neurons. 。

[0016] Thirdly, a storage neural unit-based update model device is provided, the device further comprising:

[0017] The determining module is used to determine each of the first storage neurons in each of the first storage neurons whose classification label satisfies the preset update condition, so as to be used as the second storage neuron, and to use the first neuron corresponding to the second storage neuron as the second neuron;

[0018] The update module is used to update the weights of the second neuron in the first data model based on the text data and the first data model.

[0019] Fourthly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the above-described update model method based on storage neural units.

[0020] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described update model method based on storage neural units.

[0021] The proposed update model method based on storage neural units involves acquiring the text data to be updated, inputting the text data into a first data model to be updated, obtaining the first output value of each first storage neuron in the first data model (each first neuron includes at least one first storage neuron), and then inputting the first output values ​​into a target classification model to classify each first storage neuron, obtaining a first classification label corresponding to each first storage neuron. Next, among the first storage neurons, each first storage neuron whose classification label satisfies a preset update condition is identified as a second storage neuron, and the first neuron corresponding to the second storage neuron is also identified as a second neuron. Finally, based on the text data and the first data model, the weights of the second neurons in the first data model are updated. This method can identify second storage neurons that meet the preset update conditions among the first storage neurons of the first data model, and identify second neurons that need to be updated, and then update the second neurons, thereby rapidly updating the first data model. This eliminates the need for large-scale retraining of the first data model when dynamic knowledge updates are frequent, improving the efficiency of updating the first data model and reducing the cost of training the first data model. Attached Figure Description

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

[0023] in:

[0024] Figure 1 This is an application environment diagram of an update model method based on storage neural units in one embodiment;

[0025] Figure 2 This is a flowchart of an update model method based on storage neural units in one embodiment;

[0026] Figure 3 This is a structural block diagram of an update model device based on a storage neural unit in one embodiment;

[0027] Figure 4 This is a structural block diagram of a computer device in one embodiment;

[0028] Figure 5This is a structural block diagram of a computer device in one embodiment. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] The artificial intelligence-based update model method based on storage neural units provided in this invention can be applied to, for example... Figure 1 In this application environment, it can be applied to intelligent diagnosis and treatment, remote consultation, medical text recognition, and medical data analysis. The client 110 communicates with the server 120 via a network. The server 120 receives the text data to be updated from the client 110. Then, the server 120 inputs the text data into the first data model to be updated, obtaining the first output value of each first storage neuron in the first data model. The first data model includes various first neurons, each of which is configured with at least one first storage neuron. The server 120 then inputs each of the first output values ​​into a target classification model to classify each of the first storage neurons, obtaining a first classification label corresponding to each first storage neuron. Finally, the server 120 determines each first storage neuron whose classification label meets a preset update condition, as the first classification label. The second storage neuron is used as the first neuron corresponding to the second storage neuron. Finally, the server 120 updates the weights of the second neuron in the first data model based on the text data and the first data model. In this invention, a second storage neuron that meets the preset update conditions can be determined from the first storage neurons of the first data model, and the second neuron that needs to be updated can be determined through the second storage neuron. Then, the second neuron is updated, thereby quickly updating the first data model. This eliminates the need for large-scale retraining of the first data model when dynamic knowledge is frequently updated, improving the efficiency of updating the first data model and reducing the cost of training the first data model. The client 110 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server 120 can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will now be described in detail through specific embodiments.

[0031] Please see Figure 2 As shown, Figure 2A flowchart illustrating the update model method based on storage neural units provided in the first embodiment of the present invention includes the following steps:

[0032] S101: Retrieve the text data that needs to be updated;

[0033] In this embodiment, the text data that needs to be updated can be medical text data, such as personal health records, prescriptions, examination reports, etc.

[0034] S102: Input the text data into the first data model to be updated to obtain the first output value of each first storage neuron in the first data model, wherein the first data model includes each first neuron, and each first neuron is configured with at least one first storage neuron;

[0035] The first data model can be a model trained based on a large GPT model, such as a medical text recognition model or a medical data analysis model. As an example, a medical text recognition model can be used to respond to user queries and generate response text. As another example, a medical data analysis model can be used to analyze medical data and obtain analysis text. The first data model can be a model already in the market. The first data model includes interconnected nodes, each of which is a first neuron. For each first neuron, at least one first storage neuron is configured. The first storage neuron stores the same knowledge as the first neuron, and the weights and parameters of the first storage neuron are the same as those of the first neuron. The first neuron is a single neuron.

[0036] In this embodiment, text data is input into the first data model to be updated, thereby obtaining the first output value of each first storage neuron output by the first data model.

[0037] S103: Input each of the first output values ​​into the target classification model, perform classification processing on each of the first storage neurons, and obtain the first classification label corresponding to each of the first storage neurons;

[0038] The target classification model can be a model trained based on a small GPT model, or it can be a model trained based on a BERT (Bidirectional Encoder Representations from Transformer) model.

[0039] In this embodiment, firstly, each first output value is input into the target classification model to classify each first storage neuron and obtain the first classification label corresponding to each first storage neuron. The first classification label can be a numeric label. For example, the first classification label corresponding to the first storage neuron can be the numeric label 1.

[0040] S104: In each of the first storage neurons, determine each first storage neuron whose classification label satisfies the preset update condition, and use it as a second storage neuron; and use the first neuron corresponding to the second storage neuron as the second neuron.

[0041] The classification label can be a numerical label, and the preset update condition can be whether the classification label is greater than the number 2. When the numerical label of the first stored neuron is greater than 2, the preset update condition is met.

[0042] In this embodiment, firstly, in each first storage neuron, it is determined whether there is a first storage neuron whose classification label satisfies the preset update condition. If there is a first storage neuron whose classification label satisfies the preset update condition, then the first storage neuron that satisfies the preset update condition is used as the second storage neuron, and then the first neuron corresponding to the second storage neuron is used as the second neuron.

[0043] S105: Update the weights of the second neuron in the first data model based on the text data and the first data model.

[0044] In this embodiment, firstly, text data is input into the first data model, thereby updating the second neuron in the first data model and updating the weight of the second neuron.

[0045] As an example, each time country A holds a football league, a champion is determined. Old text data is updated using new text data, where the new text data could be that the champion of country A's Nth football league is a team from region B, and the old text data could be that the champion of country A's (N-1)th football league is a team from region C. The second neuron storing the champion information is located using the first storing neuron. Finally, by updating the weights of the second neuron storing the champion information in the larger model, the champion information in the model can be updated to ensure it is consistent with the latest facts.

[0046] The proposed update model method based on storage neurons in this embodiment acquires the text data to be updated, then inputs the text data into a first data model to be updated, obtaining the first output value of each first storage neuron in the first data model. The first data model includes various first neurons, each of which is configured with at least one first storage neuron. The first output values ​​are then input into a target classification model to classify each first storage neuron, obtaining a first classification label corresponding to each first storage neuron. Next, among the first storage neurons, each first storage neuron whose classification label meets a preset update condition is identified as a second storage neuron, and the first neuron corresponding to the second storage neuron is also identified as a second neuron. Finally, based on the text data and the first data model, the weights of the second neurons in the first data model are updated. This method can identify second storage neurons that meet the preset update conditions among the first storage neurons of the first data model, and identify second neurons that need to be updated, and then update the second neurons, thereby rapidly updating the first data model. This eliminates the need for large-scale retraining of the first data model when dynamic knowledge updates are frequent, improving the efficiency of updating the first data model and reducing the cost of training the first data model.

[0047] Based on the first embodiment, a second embodiment of the update model method based on storage neural units of the present invention is proposed. In this embodiment, determining a second storage neuron among each of the first storage neurons that satisfies the preset update condition, as the second storage neuron, includes:

[0048] S201: In each of the first storage neurons, determine whether there is a first storage neuron whose classification label is the first classification level;

[0049] S202: If it exists, then determine that the first storage neuron with the classification label of the first classification level satisfies the preset update condition, and use the first storage neuron with the classification label of the first classification level as the second storage neuron.

[0050] In this embodiment, firstly, among each first storage neuron, it is determined whether there is a first storage neuron with a classification label of the first classification level. If there is a first storage neuron with a classification label of the first classification level, it is determined that the first storage neuron with a classification label of the first classification level meets the preset update condition, and the first storage neuron with a classification label of the first classification level is used as the second storage neuron.

[0051] The update model method based on storage neural units proposed in this embodiment determines whether there is a first storage neuron with the classification label of the first classification level among each first storage neuron. Finally, if there is, it is determined that the first storage neuron with the classification label of the first classification level satisfies the preset update condition, and the first storage neuron with the classification label of the first classification level is used as the second storage neuron. This method can identify the second storage neuron that meets the preset update condition among the first storage neurons of the first data model, and identify the second neuron that needs to be updated through the second storage neuron. Then, the second neuron is updated, thereby quickly updating the first data model. This eliminates the need to retrain the first data model on a large scale when dynamic knowledge is frequently updated, improving the efficiency of updating the first data model and reducing the cost of training the first data model.

[0052] Based on the first embodiment, a third embodiment of the present invention's method for updating a model based on storage neural units is proposed. In this embodiment, updating the weights of the second neuron in the first data model according to the text data and the first data model includes:

[0053] S301: Input the text data into the first data model, train the second neuron, update the weights of the second neuron, and update the second stored neuron synchronously.

[0054] In this embodiment, firstly, text data is input into the first data model to train the second neuron, thereby updating the weights of the second neuron. While updating the second neuron, the weights of the second storage neuron can also be updated simultaneously to be the same as the weights of the second neuron. It should be noted that updating the weights of the second storage neuron to be the same as the weights of the second neuron simultaneously is beneficial for relocating and updating the second neuron after obtaining the text data that needs to be updated next time.

[0055] The update model method based on storage neurons proposed in this embodiment involves inputting the text data into a first data model, training the second neuron, updating the weights of the second neuron, and simultaneously updating the second storage neuron. This allows for rapid updates to the first data model by updating the second neuron, eliminating the need for large-scale retraining of the first data model when dynamic knowledge is frequently updated. This improves the efficiency of updating the first data model and reduces the cost of training it. The weights of the second storage neuron are updated synchronously with the weights of the second neuron, which facilitates the relocation and updating of the second neuron after acquiring the next set of text data that needs updating.

[0056] Based on the first embodiment, a fourth embodiment of the present invention's method for updating a model based on storage neurons is proposed. In this embodiment, before inputting the text data into the first data model to be updated and obtaining the first output value of each first storage neuron in the first data model, the method includes:

[0057] S401: Input the text data into the second data model to obtain the second output value of each third storage neuron in the second data model, wherein each third neuron in the second data model is configured with at least one third storage neuron, and the weight of the third neuron is the same as the weight of the second storage neuron;

[0058] S402: Calculate the gradient of each third storage neuron in the second data model, and determine the second classification label of the third storage neuron based on the gradient of the third storage neuron;

[0059] S403: Based on the second output value and the second classification label, train the preset classification model to obtain the target classification model.

[0060] The second data model can be a model trained based on a large GPT model, such as a medical text recognition model or a medical data analysis model. As an example, a medical text recognition model can be used to respond to user queries and generate reply text. As another example, a medical data analysis model can be used to analyze medical data and obtain analysis text. The second data model can also be a model used by researchers to train a classification model. The second data model includes connected nodes, which are essentially third neurons. Each third neuron in the second data model is configured with at least one third storage neuron, and the weights of the third neurons are the same as the weights of the second storage neurons in the first data model. This means that the knowledge stored in the third neurons is the same as the knowledge stored in the second storage neurons. The second classification label can include multiple classification levels, such as a first level and a second level.

[0061] In this embodiment, text data is input into the second data model to obtain the second output value of each third storage neuron in the second data model, and the gradient of each third storage neuron in the second data model is calculated. The gradient of each third storage neuron can be calculated using the backpropagation algorithm.

[0062] Next, the second classification label to which the third storage neuron belongs can be determined based on the magnitude of its gradient. Finally, the preset classification model is trained using the second output value and the second classification label to obtain the target classification model.

[0063] Further, in one embodiment, determining the second classification label of the third storage neuron based on its gradient includes:

[0064] S4021: If the gradient of the third storage neuron is greater than the gradient threshold, then the second classification label corresponding to the third storage neuron is determined to be the first classification level;

[0065] S4022: If the gradient of the third storage neuron is less than or equal to the gradient threshold, then the second classification label corresponding to the third storage neuron is determined to be the second classification level, wherein the first classification level is higher than the second classification level.

[0066] In this embodiment, firstly, it is determined whether the gradient of the third storage neuron is greater than the gradient threshold. If the gradient of the third storage neuron is greater than the gradient threshold, the classification label corresponding to the third storage neuron is determined to be the first classification level, for example, the first classification level is the first level.

[0067] If the gradient of the third storage neuron is less than or equal to the gradient threshold, then the classification label corresponding to the third storage neuron is determined to be the second classification level. For example, the second classification level is the second grade, where the first classification level is higher than the second classification level, that is, the first grade is higher than the second grade.

[0068] Further, in one embodiment, the step of training a preset classification model based on the second output value and the second classification label to obtain a target classification model includes:

[0069] S4031: Input the identifier corresponding to the third storage neuron, the second output value, and the second classification label into a preset classification model to obtain the predicted value of the third storage neuron;

[0070] S4032: The loss value is calculated by comparing each of the predicted values ​​with the second classification label;

[0071] S4033: Adjust the parameters and weights in the preset classification model according to the loss value;

[0072] S4034: Determine whether the preset classification model has reached the training termination condition. If so, use the preset classification model that has reached the training termination condition as the target classification model.

[0073] It should be noted that the third storage neuron, which stores the same knowledge, has the same identifier as the first storage neuron.

[0074] In this embodiment, the identifier corresponding to the third storage neuron, the second output value, and the second classification label are input into a preset classification model to obtain the predicted value of the third storage neuron output by the preset classification model. The loss value is calculated by comparing each predicted value with the second classification label.

[0075] Then, the parameters and weights in the preset classification model are adjusted using the loss value. Next, it is determined whether the preset classification model has reached the training termination condition. If so, the preset classification model that has reached the training termination condition is used as the target classification model. As an example, after adjusting the parameters and weights in the preset classification model using the loss value, it is determined whether the preset classification model has converged. If it has not converged, the step of inputting the identifier, second output value, and second classification label corresponding to the third storage neuron into the preset classification model to obtain the predicted value of the third storage neuron is repeated. If it has converged, the training termination condition is met, and the converged classification model is used as the target classification model. As another example, after adjusting the parameters and weights in the preset classification model using the loss value, the step of inputting the identifier, second output value, and second classification label corresponding to the third storage neuron into the preset classification model to obtain the predicted value of the third storage neuron is repeated. When the number of iterations reaches a preset number, the training termination condition is met.

[0076] The proposed update model method based on storage neurons in this embodiment involves inputting the text data into a second data model to obtain the second output value of each third storage neuron in the second data model. Each third neuron in the second data model is configured with at least one third storage neuron, and the weights of the third neurons are the same as those of the second storage neurons. Then, the gradient of each third storage neuron in the second data model is calculated, and the second classification label of the third storage neuron is determined based on the gradient. Finally, a preset classification model is trained based on the second output value and the second classification label to obtain the target classification model, which can be applied to the first storage neurons of the first data model. The first data model is updated rapidly by identifying a second storage neuron that meets the preset update conditions, and obtaining the target classification model through the identifier, second output value, and second classification label of the third storage neuron. Then, the first classification label of the first output value of the first data model is predicted with high accuracy using the target classification model. Based on the first classification label, a second storage neuron that meets the preset update conditions is identified in the first storage neuron, and the second storage neuron that needs to be updated is identified. The second neuron is then updated, enabling the first data model to be updated rapidly. In the case of frequent dynamic knowledge updates, there is no need to retrain the first data model on a large scale, which improves the efficiency of updating the first data model and reduces the cost of training the first data model.

[0077] Please see Figure 3 As shown, in one embodiment, an artificial intelligence-based storage neural unit-based update model device is provided, the device comprising:

[0078] The acquisition module 501 is used to acquire the text data that needs to be updated;

[0079] Output module 502 is used to input the text data into the first data model to be updated, and obtain the first output value of each first storage neuron in the first data model, wherein the first data model includes each first neuron, and each first neuron is configured with at least one first storage neuron.

[0080] The classification module 503 is used to input each of the first output values ​​into the target classification model, perform classification processing on each of the first storage neurons, and obtain the first classification label corresponding to each of the first storage neurons;

[0081] The determining module 504 is used to determine each of the first storage neurons in each of the first storage neurons whose classification label satisfies the preset update condition, so as to be a second storage neuron, and to take the first neuron corresponding to the second storage neuron as the second neuron;

[0082] The update module 505 is used to update the weights of the second neuron in the first data model based on the text data and the first data model.

[0083] The proposed update model method based on storage neurons in this embodiment acquires the text data to be updated, then inputs the text data into a first data model to be updated, obtaining the first output value of each first storage neuron in the first data model. The first data model includes various first neurons, each of which is configured with at least one first storage neuron. The first output values ​​are then input into a target classification model to classify each first storage neuron, obtaining a first classification label corresponding to each first storage neuron. Next, among the first storage neurons, each first storage neuron whose classification label meets a preset update condition is identified as a second storage neuron, and the first neuron corresponding to the second storage neuron is also identified as a second neuron. Finally, based on the text data and the first data model, the weights of the second neurons in the first data model are updated. This method can identify second storage neurons that meet the preset update conditions among the first storage neurons of the first data model, and identify second neurons that need to be updated, and then update the second neurons, thereby rapidly updating the first data model. This eliminates the need for large-scale retraining of the first data model when dynamic knowledge updates are frequent, improving the efficiency of updating the first data model and reducing the cost of training the first data model.

[0084] In one embodiment, the determining module 504 is further configured to:

[0085] In each of the first storage neurons, it is determined whether there is a first storage neuron whose classification label is the first classification level;

[0086] If it exists, then the first storage neuron with the classification label of the first classification level is determined to satisfy the preset update condition, and the first storage neuron with the classification label of the first classification level is used as the second storage neuron.

[0087] In one embodiment, the update module 505 is used for:

[0088] The text data is input into the first data model, the second neuron is trained, the weights of the second neuron are updated, and the second stored neuron is updated synchronously.

[0089] In one embodiment, the AI-based storage neural unit-based update model device is further configured to: input the text data into a second data model to obtain a second output value for each third storage neuron in the second data model, wherein each third neuron in the second data model is configured with at least one third storage neuron, and the weight of the third neuron is the same as the weight of the second storage neuron.

[0090] Calculate the gradient of each third storage neuron in the second data model, and determine the second classification label of the third storage neuron based on the gradient of the third storage neuron;

[0091] Based on the second output value and the second classification label, the preset classification model is trained to obtain the target classification model.

[0092] In one embodiment, the AI-based storage neural unit-based update model device is further configured to: if the gradient of the third storage neuron is greater than a gradient threshold, determine the second classification label corresponding to the third storage neural unit as the first classification level;

[0093] If the gradient of the third storage neuron is less than or equal to the gradient threshold, then the second classification label corresponding to the third storage neuron is determined to be the second classification level, wherein the first classification level is higher than the second classification level.

[0094] In one embodiment, the AI-based storage neural unit-based update model device is further configured to: input the identifier corresponding to the third storage neuron, the second output value, and the second classification label into a preset classification model to obtain the predicted value of the third storage neuron;

[0095] The loss value is calculated by comparing each of the predicted values ​​with the second classification label.

[0096] The parameters and weights in the preset classification model are adjusted based on the loss value;

[0097] Determine whether the preset classification model has reached the training termination condition. If so, use the preset classification model that has reached the training termination condition as the target classification model.

[0098] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements server-side functions or steps of an artificial intelligence-based, memory-based neural unit-based update model method.

[0099] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements client-side functions or steps of an artificial intelligence-based, memory-based neural unit-based update model method.

[0100] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps:

[0101] Retrieve the text data that needs to be updated;

[0102] The text data is input into the first data model to be updated to obtain the first output value of each first storage neuron in the first data model, wherein the first data model includes each first neuron, and each first neuron is configured with at least one first storage neuron;

[0103] Each of the first output values ​​is input into the target classification model to classify each of the first storage neurons, thereby obtaining the first classification label corresponding to each of the first storage neurons.

[0104] In each of the first storage neurons, each first storage neuron whose classification label satisfies the preset update condition is determined as a second storage neuron, and the first neuron corresponding to the second storage neuron is also determined as the second neuron.

[0105] Based on the text data and the first data model, the weights of the second neuron in the first data model are updated.

[0106] The proposed update model method based on storage neural units involves acquiring the text data to be updated, inputting the text data into a first data model to be updated, obtaining the first output value of each first storage neuron in the first data model (each first neuron includes at least one first storage neuron), and then inputting the first output values ​​into a target classification model to classify each first storage neuron, obtaining a first classification label corresponding to each first storage neuron. Next, among the first storage neurons, each first storage neuron whose classification label satisfies a preset update condition is identified as a second storage neuron, and the first neuron corresponding to the second storage neuron is also identified as a second neuron. Finally, based on the text data and the first data model, the weights of the second neurons in the first data model are updated. This method can identify second storage neurons that meet the preset update conditions among the first storage neurons of the first data model, and identify second neurons that need to be updated, and then update the second neurons, thereby rapidly updating the first data model. This eliminates the need for large-scale retraining of the first data model when dynamic knowledge updates are frequent, improving the efficiency of updating the first data model and reducing the cost of training the first data model.

[0107] In one embodiment, a computer-readable storage medium is provided that stores a computer program, which, when executed by a processor, performs the following steps:

[0108] Retrieve the text data that needs to be updated;

[0109] The text data is input into the first data model to be updated to obtain the first output value of each first storage neuron in the first data model, wherein the first data model includes each first neuron, and each first neuron is configured with at least one first storage neuron;

[0110] Each of the first output values ​​is input into the target classification model to classify each of the first storage neurons, thereby obtaining the first classification label corresponding to each of the first storage neurons.

[0111] In each of the first storage neurons, each first storage neuron whose classification label satisfies the preset update condition is determined as a second storage neuron, and the first neuron corresponding to the second storage neuron is also determined as the second neuron.

[0112] Based on the text data and the first data model, the weights of the second neuron in the first data model are updated.

[0113] The proposed update model method based on storage neural units involves acquiring the text data to be updated, inputting the text data into a first data model to be updated, obtaining the first output value of each first storage neuron in the first data model (each first neuron includes at least one first storage neuron), and then inputting the first output values ​​into a target classification model to classify each first storage neuron, obtaining a first classification label corresponding to each first storage neuron. Next, among the first storage neurons, each first storage neuron whose classification label satisfies a preset update condition is identified as a second storage neuron, and the first neuron corresponding to the second storage neuron is also identified as a second neuron. Finally, based on the text data and the first data model, the weights of the second neurons in the first data model are updated. This method can identify second storage neurons that meet the preset update conditions among the first storage neurons of the first data model, and identify second neurons that need to be updated, and then update the second neurons, thereby rapidly updating the first data model. This eliminates the need for large-scale retraining of the first data model when dynamic knowledge updates are frequent, improving the efficiency of updating the first data model and reducing the cost of training the first data model.

[0114] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0115] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0117] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for updating a model based on a storage neuron, the method comprising: obtaining text data to be updated; inputting the text data into a first data model to be updated to obtain a first output value of each first storage neuron in the first data model, wherein the first data model comprises first neurons, each of which is configured with at least one first storage neuron; inputting each of the first output values into a target classification model to perform classification processing on each of the first storage neurons to obtain a first classification label corresponding to each of the first storage neurons; determining, among the first storage neurons, each of the first storage neurons whose classification label meets a preset update condition as a second storage neuron, and determining a first neuron corresponding to the second storage neuron as a second neuron; updating a weight of the second neuron in the first data model according to the text data and the first data model.

2. The method of claim 1, wherein, The determining, among the first storage neurons, each of the first storage neurons whose classification label meets a preset update condition as a second storage neuron comprises: determining, among the first storage neurons, whether there is a first storage neuron whose classification label is a first classification level; if there is, determining that the first storage neuron whose classification label is the first classification level meets the preset update condition, and determining the first storage neuron whose classification label is the first classification level as the second storage neuron. 3.The method of claim 1, wherein, The updating a weight of the second neuron in the first data model according to the text data and the first data model comprises: inputting the text data into the first data model to perform model training on the second neuron, updating the weight of the second neuron, and synchronously updating the second storage neuron.

4. The method of claim 1, wherein, Before the inputting the text data into the first data model to be updated to obtain a first output value of each first storage neuron in the first data model, the method comprises: inputting the text data into a second data model to obtain a second output value of each third storage neuron in the second data model, wherein each third neuron in the second data model is configured with at least one third storage neuron, and a weight of the third neuron is the same as a weight of the second storage neuron; calculating a gradient of each third storage neuron in the second data model, and determining a second classification label of the third storage neuron according to the gradient of the third storage neuron; training a preset classification model according to the second output value and the second classification label to obtain a target classification model.

5. The method of claim 4, wherein, The determining a second classification label of the third storage neuron according to the gradient of the third storage neuron comprises: if the gradient of the third storage neuron is greater than a gradient threshold, determining that a second classification label corresponding to the third storage neuron is a first classification level. If the gradient of the third storage neuron is less than or equal to the gradient threshold value, it is determined that the second classification label corresponding to the third storage neuron is a second classification level, wherein the first classification level is higher than the second classification level.

6. The method of claim 4, wherein the updating the model based on the storage neural unit is based on a plurality of the storage neural units. According to the second output value and the second classification label, a preset classification model is trained to obtain a target classification model, including: The third storage neuron corresponding to the identification, the second output value and the second classification label are input into a preset classification model to obtain a prediction value of the third storage neuron; By comparing each prediction value and the second classification label, a loss value is calculated; According to the loss value, the parameters and weights in the preset classification model are adjusted; It is judged whether the preset classification model reaches a training end condition, and if so, the preset classification model reaching the training end condition is taken as a target classification model.

7. An apparatus for updating a model based on a storage neuron, characterized by, The updating model device based on the storage neuron includes: An acquisition module is configured to acquire text data that needs to be updated. An output module is configured to input the text data into a first data model to be updated to obtain a first output value of each first storage neuron in the first data model, wherein the first data model includes each first neuron, and each first neuron is configured with at least one first storage neuron. A classification module is configured to input each first output value into a target classification model to perform classification processing on each first storage neuron to obtain a first classification label corresponding to each first storage neuron. A determination module is configured to determine each first storage neuron satisfying a preset updating condition among each first storage neuron as a second storage neuron, and the first neuron corresponding to the second storage neuron as a second neuron. An updating module is configured to update the weight of the second neuron in the first data model according to the text data and the first data model.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the steps of the updating model method based on the storage neuron according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to realize the steps of the updating model method based on the storage neuron according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Document data classification system, document data classification method, and program

    JP7254314B1