Electronic scale-oriented goods category incremental learning method, device and equipment and medium

Through the long- and short-term memory alignment and dual playback framework and the balanced knowledge distillation method based on logit adjustment, the problems of insufficient recognition ability of new and old categories and catastrophic forgetting of intelligent product recognition systems in dynamic environments are solved, and efficient and reliable real-time update and recognition capabilities are achieved.

CN120726445APending Publication Date: 2025-09-30XIAMEN UNIV OF TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510704595.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Existing intelligent product recognition systems are unable to identify new and old product categories when faced with a dynamically changing product environment. They suffer from catastrophic forgetting problems, and data imbalance leads to model bias, affecting the system's stability and operational efficiency.

Method used

By adopting knowledge distillation technology and feature correction network, through long-term and short-term memory alignment and dual playback framework, combined with a balanced knowledge distillation method based on logit adjustment, efficient learning and memory consolidation of new and old product categories can be achieved, alleviating knowledge conflict and data imbalance problems.

Benefits of technology

It significantly improves the real-time online learning capability of smart electronic scales in dynamic environments, reduces model update time and computing costs, maintains efficient and stable recognition capabilities, and adapts to changes in new and old categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726445A_ABST
    Figure CN120726445A_ABST
Patent Text Reader

Abstract

The invention provides an electronic scale-oriented goods category incremental learning method, apparatus and device, and a medium, and relates to the technical field of category incremental learning of dynamic image recognition, the method aligns knowledge differences between new and old tasks through a dual memory mechanism, adopts a balance strategy, optimizes a data distribution problem in a learning process, and improves the learning efficiency. Therefore, identification deviation caused by imbalance of new and old category data is avoided. In addition, the method further strengthens the long-term memory effect of knowledge through a special training mechanism, and ensures that the system keeps efficient and stable recognition performance in continuous updating. Powerful technical support is provided for application of the intelligent electronic scale in a complex dynamic scene, and the intelligent level and practicability of the intelligent electronic scale are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of incremental learning technology for dynamic image recognition, and in particular to a method, device, equipment and medium for incremental learning of product categories for electronic scales. Background Art

[0002] With the rapid development of artificial intelligence (AI), image recognition technology has been widely applied in numerous fields, particularly in smart retail and the Internet of Things (IoT). As a key product identification tool, smart electronic scales use image recognition technology to rapidly identify and automatically check out items, significantly improving retail efficiency and user experience. However, in practice, the dynamic changes in product types pose significant challenges to the product identification systems of smart electronic scales.

[0003] In traditional smart retail scenarios, product recognition systems are typically trained based on fixed product datasets, which are rarely updated after training. While this static training model can maintain high recognition accuracy in the short term, it lacks adaptability and flexibility when faced with the constant influx of new products. For example, when new fresh produce or seasonal items are introduced to the market, existing recognition models often fail to identify these new products in a timely manner, resulting in recognition failures or misidentifications, which in turn impacts the normal operation of the retail system.

[0004] Furthermore, existing product recognition systems often face the problem of "catastrophic forgetting" when handling both new and existing product categories. This is because traditional deep learning models, when learning new categories, often overwrite or interfere with previously learned knowledge of old categories, resulting in a decrease in the model's ability to recognize old products. This phenomenon not only affects the stability and reliability of the system but also increases the cost of model maintenance and updates. For example, to adapt to new product categories, companies may need to collect large amounts of data and retrain the entire model, which is not only time-consuming and labor-intensive but may also cause the system to malfunction during the update period.

[0005] On the other hand, the distribution of commodity data in reality is dynamic, and the amount of data for new and old commodities often differs significantly. This data imbalance further exacerbates model bias, causing the model to favor learning new categories while ignoring knowledge from old ones. For example, in the identification of fresh produce, newly released fruits may have only a small number of samples, while more common fruits have a large number of samples. This imbalanced data distribution causes the model to over-rely on the features of new categories when learning, thereby weakening its memory of old ones.

[0006] Therefore, how to effectively resolve knowledge conflicts between new and existing product categories in a dynamically changing merchandise environment, balance learning between new and old categories, and achieve real-time online model updates has become a key issue that current intelligent product recognition systems must address. This not only affects the system's intelligence level and user experience, but also directly impacts the operational efficiency and cost control of intelligent retail systems.

[0007] In view of this, this application is filed. Summary of the Invention

[0008] The present invention provides a method, device, equipment and medium for incremental learning of product categories for electronic scales, which can at least partially improve the above-mentioned problems.

[0009] To achieve the above object, the present invention adopts the following technical solutions:

[0010] A method for incremental learning of product categories for electronic scales, comprising:

[0011] When a new task arises, the preset auxiliary model and feature correction network are trained using the training dataset based on knowledge distillation technology;

[0012] Obtain the aligned short-range global memory output by the trained auxiliary model, combine it with the trained feature correction network to obtain the feature-corrected teacher network, and obtain the aligned long-range memory output by the feature-corrected teacher network;

[0013] Based on the knowledge distillation technology, the short-range global memory and the long-range memory are replayed, and the feature-corrected teacher network is trained according to the replayed memory;

[0014] When it is determined that the training of the teacher network after feature correction is completed, new category samples and a small number of old category samples are screened and saved.

[0015] The present invention also provides a device for incremental learning of product categories for electronic scales, comprising:

[0016] The first training unit is used to train the preset auxiliary model and feature correction network using the training dataset based on the knowledge distillation technology when a new task appears;

[0017] A memory acquisition unit is used to acquire the aligned short-range global memory output by the trained auxiliary model, and to combine the trained feature correction network to obtain the feature-corrected teacher network, and to acquire the aligned long-range memory output by the feature-corrected teacher network;

[0018] A second training unit is configured to replay the short-range global memory and the long-range memory based on the knowledge distillation technology, and train the feature-corrected teacher network according to the replayed memory;

[0019] The saving unit is used to filter and save new category samples and a small amount of old category samples after determining that the training of the teacher network after feature correction is completed.

[0020] The present invention also provides an incremental learning device for product categories for electronic scales, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the incremental learning method for product categories for electronic scales as described in any one of the above.

[0021] The present invention also provides a readable storage medium storing a computer program, which can be executed by a processor of a device where the storage medium is located to implement the incremental learning method for product categories for electronic scales as described in any one of the above items.

[0022] In summary, the proposed incremental learning method for product categories for electronic scales aims to address the challenges of existing intelligent product recognition systems' inability to recognize new product categories and catastrophic forgetting in dynamic environments. This method utilizes a long- and short-term memory alignment and dual replay framework, combined with a balanced knowledge distillation method based on logit adjustment, to achieve efficient learning and memory consolidation of both new and old product categories. Specifically, the long- and short-term memory alignment framework aligns the heterogeneous knowledge of new and old tasks by training an auxiliary model and a feature calibration network, mitigating knowledge conflicts and narrowing the task gap. The auxiliary model learns from both new and old product category data to acquire global short-term memory, while the feature calibration network corrects the long-term memory of the old model to adapt it to the new category data. During training, the auxiliary model uses knowledge distillation to simulate the output of the old model to prevent forgetting of old knowledge. Local mutual learning mechanisms are also used to further reduce the heterogeneity between long- and short-term memories. Furthermore, the balanced knowledge distillation method based on logit adjustment balances the supervisory information of new and old categories by adjusting category frequencies, effectively alleviating the recent task bias caused by data imbalance and promoting balanced replay and consolidation of long- and short-term memories. Through innovative frameworks and methods, this method significantly improves the real-time online learning capability and intelligence level of smart electronic scales in dynamic environments, providing an efficient and reliable solution for product identification in smart retail scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 1 is a flow chart of an incremental learning method for product categories for electronic scales provided by the first embodiment of the present invention;

[0024] Figure 21 is a schematic diagram of the overall process framework of the incremental learning method for product categories of electronic scales provided by an embodiment of the present invention;

[0025] Figure 3 is a schematic diagram of the first training stage provided by an embodiment of the present invention;

[0026] Figure 4 is a schematic diagram of the second training stage provided by an embodiment of the present invention;

[0027] Figure 5 2 is a schematic diagram of a module of a device for incremental learning of product categories for electronic scales provided in a second embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0029] Due to the differences in domains or distributions between new and old retail fresh food data, there are significant differences between new and old tasks, leading to knowledge concept conflicts, which greatly interferes with the transfer of old knowledge and aggravates the problem of catastrophic forgetting. Based on this:

[0030] refer to Figure 1 、 Figure 2 As shown, the first embodiment of the present invention discloses a method for incremental learning of product categories for electronic scales, which can be executed by an incremental learning device for product categories for electronic scales (hereinafter referred to as a learning device), and in particular, executed by one or more processors in the learning device to implement the following method:

[0031] See also Figure 3 ,S1, when a new task appears, based on the knowledge distillation technology, the training data set is used to train the preset auxiliary model and feature correction network;

[0032] Specifically, step S1 includes: the training data set includes product image data of the new task and product image data of the old task.

[0033] The loss function L used in the training process s1 =L AM +L FCN , L AM For auxiliary model The training loss function, L FCN Correction network for features The training loss function of

[0034] in,

[0035]

[0036] σ is the softmax function, x is the product image, y is the category label corresponding to the product image x, T is the temperature parameter, C old A collection of categories for old fresh goods. To calculate softmax only on the logits of all old fresh product categories, f t-1 (x) is the old model, α is the hyperparameter, θ t-1 (x) is the skeleton network of the old model, Correction network for features The new representation obtained by correcting and aligning the representation of the old fresh product category learned by the old model, σ y Indicates the calculated softmax value at the position of category y.

[0037] In this embodiment, to enhance the intelligence of intelligent product recognition systems, the incremental product category learning method for electronic scales focuses on alleviating the differences between new and old product category recognition tasks. By precisely aligning the heterogeneous knowledge of new and old product category data, the heterogeneity between learning new categories and retaining old product category knowledge is reduced, significantly reducing task interference. Furthermore, a balanced dual playback mechanism is employed to sequentially playback long- and short-term memories, enhancing memory consolidation and enabling the intelligent product recognition system to efficiently integrate new and old knowledge during real-time online model updates.

[0038] Specifically, if the model has not learned fresh food data before, it uses conventional image recognition algorithms, usually using classification cross entropy loss to train the model to learn fresh food in the recognition task. When new product data arrives, that is, when learning fresh food in the new task t>1, the model is updated online in real time using the long-short-term memory alignment and double replay framework and the balanced knowledge distillation method based on logit adjustment. It aims to achieve balanced replay of short-term global memory, and then transfer the knowledge of the auxiliary network to the new model. To alleviate the imbalance problem of new and old task data, this method adjusts the logits representing short-term memory according to the category frequency, provides balanced supervision information for the new and old categories, promotes the balanced transfer of short-term global memory, and ensures that long and short-term memory can be effectively and balanced replayed and integrated.

[0039] Specifically, when a new task involving a new product category arises, a training dataset containing images of the new category's products and a small amount of images from previous tasks is prepared. The selection of these datasets is crucial because they not only capture important features of the new category but also retain key information from previous tasks, providing the model with comprehensive learning material. This approach allows the model to learn new knowledge while preventing the loss of previous knowledge.

[0040] During the training process, through experience replay, knowledge distillation method and local mutual learning mechanism, the preset auxiliary model (Auxiliary Model, AM, denoted as ) and Feature Calibration Network (FCN, denoted as ) processes the training dataset. The auxiliary model aims to learn global knowledge of both new and old product categories, forming short-term memory to enable recognition of all known product categories. The feature correction network, on the other hand, focuses on correcting the representations of old product categories learned by the old model to better adapt them to new category data, thereby forming long-term memory. This alignment mechanism of long-term and short-term memories effectively alleviates knowledge conflicts between the new and old tasks, narrowing the task gap.

[0041] In order to achieve this training process, a special loss function L is designed s1 , used to jointly train the auxiliary model and the feature correction network. The loss function consists of two parts, namely, L AM and L for training feature correction network FCN .

[0042] Among them, L of the training auxiliary model AM and L for training feature correction network FCN It has a similar form and consists of three parts: classification loss, knowledge distillation loss, and local mutual learning loss. The first item is the classification loss used to learn all fresh product categories (covering new and old categories), which enables the model to have accurate classification capabilities for each category; the second item represents the logit-based knowledge distillation loss item, which enables the auxiliary model and feature correction network to imitate the output of the old model, allowing the model to learn the knowledge of the old model, preventing the forgetting of old task knowledge, and thus retaining the old knowledge; the third item represents the local mutual learning loss, which further aligns the logit outputs of the auxiliary model and feature correction network on the old categories, that is, aligns the long- and short-term memories, ensures the consistency of the model's output on the old categories, and achieves the effect of further aligning the long- and short-term memories. Through this comprehensive loss function design, not only can the model's learning ability for new categories be improved, but also the knowledge memory of old categories can be effectively consolidated.

[0043] In this example, the softmax function is also used to calculate the classification loss and knowledge distillation loss. The softmax function is a commonly used probabilistic function that converts the model output into a probability distribution, thus providing a more intuitive explanation for classification tasks. A temperature parameter, T, is also introduced to control the smoothness of the softmax output. By adjusting the temperature parameter, a balance can be achieved between model confidence and diversity, further optimizing model performance.

[0044] Furthermore, the knowledge distillation loss specifically focuses on the set of old fresh product categories. Specifically, the softmax is calculated only on the logits of all old fresh product categories, rather than across all categories. By calculating the softmax only on old categories, the knowledge of the new and old tasks can be more accurately aligned, preventing the loss of old knowledge due to interference from new category data. This local alignment mechanism not only improves the model's stability but also strengthens its ability to retain old categories.

[0045] During training, the skeleton network of the old model remains fixed and not updated. This is because the old model has already learned the key features of the old categories, and we hope to correct them through the feature correction network rather than directly modifying the old model's structure. This design not only preserves the knowledge of the old model but also provides a foundation for learning the new model.

[0046] See also Figure 4 , S2, obtain the aligned short-range global memory output by the trained auxiliary model, and combine the trained feature correction network to obtain the feature-corrected teacher network, and obtain the aligned long-range memory output by the feature-corrected teacher network;

[0047] Specifically, step S2 includes: combining the trained feature correction network with the skeleton network of the old model to construct a feature-corrected teacher network.

[0048] In this example, the aligned short-term global memory output by the trained auxiliary model is first extracted. After training, the auxiliary model has learned global knowledge about the categories of new and old goods, forming a short-term memory covering all known categories. This short-term memory is similar to the model's "recent experience," helping it quickly adapt to new tasks and accurately identify new and old categories. In this way, the auxiliary model provides an important foundation for subsequent incremental learning.

[0049] Next, the trained feature correction network is combined with the skeleton network of the old model. The skeleton network of the old model is the core structure used to learn the old category and has already mastered the key features of the old category. By combining the feature correction network with the skeleton network of the old model, a new network structure is constructed—the feature-corrected teacher network (FCTM). The function of this teacher network is to output a corrected long-term memory, that is, the feature representation of the old category adjusted by the feature correction network. This long-term memory is similar to the model's "long-term experience," which helps the model retain knowledge of the old category while learning new categories. This combination not only preserves the old model's memory of the old category, but also optimizes it through the feature correction network, making it more adaptable to learning new categories. This combination of aligned long-term memory and short-term global memory provides strong support for subsequent incremental learning.

[0050] This process achieved significant benefits. First, the feature correction network corrected the old model's skeleton network, effectively resolving the feature mismatch problem that may occur when the old model encounters new categories. This correction mechanism enables the old model's long-term memory to better align with the features of the new categories, thereby reducing the knowledge conflict between the new and old tasks. Second, by constructing a feature-corrected teacher network, it is possible to simultaneously obtain aligned long-term memory and short-term global memory. This combination of long-term and short-term memory not only improves the model's ability to learn new categories, but also enhances the memory consolidation effect of old categories.

[0051] In practical applications, this design enables smart electronic scales to efficiently learn new product categories in dynamic environments while robustly retaining their ability to recognize existing categories. For example, in unmanned retail stores, when new fresh produce items are introduced, the smart electronic scale can quickly adapt to the new categories through this incremental learning approach without forgetting previously learned categories. This not only improves the system's intelligence but also significantly reduces the time and computational cost of model updates, providing an efficient and reliable solution for smart retail scenarios.

[0052] See also Figure 4 ,S3, based on the knowledge distillation technology, the short-range global memory and the long-range memory are replayed, and the feature-corrected teacher network is trained according to the replayed memory;

[0053] Specifically, step S3 includes: replaying the aligned long-range memory using the traditional logit-based knowledge distillation loss, and its loss function is:

[0054] Logits are extracted from the auxiliary model as supervision information, and the short-range global memory is replayed using the balanced knowledge distillation technique based on logit adjustment. The loss function is: in, M i is the number of samples of each category in the training set, M1 is the number of samples of the first category in the training set, M2 is the number of samples of the second category in the training set, M C is the number of samples in the Cth category in the training set, τ is a hyperparameter, C all is the set of all new and old categories, To calculate softmax only on the logits of all new and old categories, C represents the category set and M is the number of samples of all categories in the training set;

[0055] The feature-corrected teacher network is trained based on the replayed short-range global memory and long-range memory.

[0056] In this example, the long-term memory (LTM) is first replayed. The LTM is output by the feature-corrected teacher network (FCTM), which represents the old categorical knowledge of the old model after correction. To replay the LTM, a traditional logit-based knowledge distillation loss is used. This knowledge distillation loss transfers the knowledge of the old model to the new teacher network, ensuring the stability and consistency of the LTM.

[0057] Next, the short-term global memory is replayed. Short-term global memory is the global knowledge of new and old categories learned by the auxiliary model. To replay short-term global memory, logits are extracted from the auxiliary model as supervisory information and replayed using knowledge distillation techniques. However, this process faces two major challenges: First, the auxiliary model is trained on an unbalanced product dataset, and its softmax output is inevitably biased towards the latest product category (that is, given the imbalance in the new and old product category data used to train the auxiliary network, the auxiliary network is inevitably biased towards the new category); second, the dataset used for replaying new and old product categories is itself significantly unbalanced. Because the auxiliary model may be affected by the imbalance in new and old category data during training, its output may be biased towards the new category. Therefore, a balanced knowledge distillation technique based on logit adjustment is used to balance the replay of short-term memory. This method adjusts the logits based on category frequency, providing balanced supervisory information for new and old categories, thereby promoting balanced replay of global short-term memory.

[0058] During this process, logits are extracted from the auxiliary model as supervisory information. These logits contain global knowledge of the new and old categories, which is passed to the feature-corrected teacher network through knowledge distillation technology. This balanced knowledge distillation method based on logit adjustment can not only alleviate the problem of imbalance between new and old task data, but also ensure the effective integration and balanced replay of long-term and short-term memories. Finally, the feature-corrected teacher network is trained based on the replayed short-term global memory and long-term memory. This training process combines the advantages of long-term and short-term memory, allowing the new model to learn the features of new categories and the knowledge of old categories at the same time. In this way, not only can the model's recognition ability for new categories be improved, but the knowledge of old categories can also be firmly retained, effectively alleviating the problem of "catastrophic forgetting."

[0059] Simply put, the balanced knowledge distillation method based on logit adjustment aims to alleviate the problem of proximal task bias caused by the imbalance of new and old task data. It adjusts the logits representing short-term memory based on category frequency, providing balanced supervision information for new and old categories, promoting a balanced transfer of short-term global memory, and ensuring the effective and balanced replay and integration of long-term and short-term memories.

[0060] In practical applications, this long- and short-term memory replay mechanism based on knowledge distillation has significant beneficial effects. First, through balanced long- and short-term memory replay, the model can better adapt to the dynamically changing commodity environment and learn new product categories online in real time while firmly retaining the recognition ability of old categories. Second, the balanced knowledge distillation method based on logit adjustment can effectively alleviate the problem of recent task bias caused by the imbalance of new and old task data, improving the overall performance and stability of the model. Finally, this method significantly reduces the time and computational cost of model updates, providing an efficient and reliable solution for the application of smart electronic scales in smart retail scenarios.

[0061] S4, when it is determined that the training of the teacher network after feature correction is completed, the new category samples and a small amount of old category samples are screened and saved.

[0062] Specifically, in this embodiment, after the teacher network training is completed after feature correction, it is necessary to screen out representative samples from the current training data set. These samples will be used for subsequent incremental learning tasks to help the model better adapt to new categories while consolidating the memory of old categories. During the screening process, focus on samples from new categories. These samples are a source of new knowledge that the model needs to learn, so it is necessary to ensure that they can fully cover the characteristics and variability of the new categories. At the same time, a small number of samples are screened out from the old categories. Although the number of these old category samples is small, they are crucial to preventing the model from forgetting old knowledge. By retaining these old category samples, the model can be helped to consolidate old knowledge through experience replay in subsequent learning.

[0063] When screening samples, choose those that are most challenging for the model. These are typically those that the model struggled to correctly identify during training, or those that are easily confused with other classes in the feature space. By selecting these samples, you ensure that the model can better handle these challenges during subsequent learning, thereby improving its overall performance.

[0064] Specifically, in this embodiment, the incremental learning method for product categories for electronic scales proposes a long-short-term memory alignment and dual playback framework. This framework achieves the alignment of long-short-term memory and improves the overall performance by training an auxiliary model and a feature calibration network. The aligned long-short-term memory effectively alleviates the heterogeneity between the new and old task knowledge and narrows the task gap. At the same time, with the help of a balanced long-short-term memory dual playback mechanism, the formation and consolidation of the memory of the new and old task knowledge are promoted, effectively reducing catastrophic forgetting. Among them, since the auxiliary model has learned data of all fresh product categories (covering new and old categories), it can provide short-term global knowledge and identify all product categories, which is called short-term global memory. On the contrary, the feature calibration network is used to correct the representation of the old fresh product category learned by the old model to make it more adaptable to the new category data. Therefore, the output of the feature calibration network is called the long-term memory that has been improved by the correction alignment. Finally, during the dual playback process of long- and short-term memories, the balanced knowledge distillation method based on logit adjustment alleviates the recent task bias problem caused by the imbalance of new and old task data, ensuring that long- and short-term memories can be effectively and balancedly replayed and integrated.

[0065] In summary, this incremental learning method for product categories for electronic scales achieves efficient learning and memory consolidation of both new and old product categories by aligning long- and short-term memories and implementing a dual-replay framework, combined with a balanced knowledge distillation method based on logit adjustments. This approach aims to address the challenges of existing intelligent product recognition systems in recognizing new product categories in dynamic environments and the "catastrophic forgetting" problem.

[0066] Specifically, the method first aligns the heterogeneous knowledge of the new and old tasks by training an auxiliary model and a feature correction network, alleviating knowledge conflicts and narrowing the task gap. The auxiliary model learns data from both new and old categories to acquire global short-term memory, while the feature correction network corrects the long-term memory of the old model to adapt it to the new category data. This alignment mechanism of long-term and short-term memories effectively resolves the knowledge conflicts between the new and old tasks, laying the foundation for subsequent incremental learning. Furthermore, knowledge distillation techniques are used to replay the short-term global memory and long-term memory, and the feature-corrected teacher network is trained based on this replayed memory. During this process, a balanced knowledge distillation method based on logit adjustment adjusts the logit based on category frequency, providing balanced supervision information for both new and old categories, thereby achieving balanced replay of short-term global memory. This method not only mitigates the recent task bias caused by the imbalance of new and old task data, but also promotes the effective integration and balanced replay of long-term and short-term memories. Finally, after the feature-corrected teacher network is trained, samples from the new category and a small number of samples from the old category are filtered and saved to prepare data for subsequent incremental learning tasks. This strategy ensures that the model can robustly retain knowledge of old categories when learning new categories, further alleviating the "catastrophic forgetting" problem.

[0067] Compared with existing technologies, this incremental learning method for product categories for electronic scales offers the following advantages: 1. Through long- and short-term memory alignment and a dual replay framework, the model can effectively align knowledge from new and old tasks, significantly improving learning of new categories and consolidating memory of old categories. 2. A balanced knowledge distillation method based on logit adjustment effectively mitigates bias issues caused by data imbalance and further optimizes model performance. 3. By screening and preserving key samples, the model can continuously update and adapt to the dynamically changing product environment while maintaining efficient and stable recognition capabilities.

[0068] In practical applications, such as in unmanned retail stores or smart warehouse management scenarios, this method can significantly improve the intelligence of smart electronic scales, enabling them to learn new product categories online in real time while reliably retaining the ability to recognize existing categories. This not only improves the system's adaptability and practicality, but also significantly reduces the time and computational cost of model updates, providing an efficient and reliable solution for the smart retail sector.

[0069] See also Figure 5 A second embodiment of the present invention provides a device for incrementally learning product categories for electronic scales, comprising:

[0070] The first training unit 101 is used to train a preset auxiliary model and feature correction network using a training dataset based on knowledge distillation technology when a new task occurs;

[0071] A memory acquisition unit 102 is used to acquire the aligned short-range global memory output by the trained auxiliary model, combine the trained feature correction network to obtain a feature-corrected teacher network, and acquire the aligned long-range memory output by the feature-corrected teacher network;

[0072] The second training unit 103 is used to replay the short-range global memory and the long-range memory based on the knowledge distillation technology, and train the teacher network after feature correction according to the replayed memory;

[0073] The storage unit 104 is used to filter and store new category samples and a small amount of old category samples after determining that the training of the teacher network after feature correction is completed.

[0074] A third embodiment of the present invention provides an incremental learning device for product categories for electronic scales, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the incremental learning method for product categories for electronic scales as described in any one of the above items.

[0075] A fourth embodiment of the present invention provides a readable storage medium storing a computer program, wherein the computer program can be executed by a processor of a device where the storage medium is located to implement the incremental learning method for product categories for electronic scales as described in any one of the above items.

[0076] Illustratively, the above-mentioned various devices and various process steps can be implemented by a computer program. The computer program can be divided into one or more units. The one or more units are stored in the memory and executed by the processor to complete the present invention.

[0077] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0078] The memory can be used to store the computer program and / or module, and the processor realizes the various functions of the present invention by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0079] Wherein, if the unit integrated into the electronic device or printer is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0080] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement the present invention without inventive effort.

[0081] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for incremental learning of product categories for electronic scales, characterized by: include: When a new task arises, the preset auxiliary model and feature correction network are trained using the training dataset based on knowledge distillation technology; Obtain the aligned short-range global memory output by the trained auxiliary model, combine it with the trained feature correction network to obtain the feature-corrected teacher network, and obtain the aligned long-range memory output by the feature-corrected teacher network; Based on the knowledge distillation technology, the short-range global memory and the long-range memory are replayed, and the feature-corrected teacher network is trained according to the replayed memory; When it is determined that the training of the teacher network after feature correction is completed, new category samples and a small number of old category samples are screened and saved.

2. The incremental learning method for product categories for electronic scales according to claim 1, characterized in that: The training data set includes product image data of the new task and product image data of the old task.

3. The incremental learning method for product categories of electronic scales according to claim 1, characterized in that: The loss function L used in the training process s1 =L AM +L FCN , L AM For auxiliary model The training loss function, L FCN Correction network for features The training loss function of in, σ is the softmax function, x is the product image, y is the category label corresponding to the product image x, T is the temperature parameter, C old A collection of categories for old fresh goods. To calculate softmax only on the logits of all old fresh product categories, f t-1 (x) is the old model, α is the hyperparameter, θ t-1 (x) is the skeleton network of the old model, Correction network for features The new representation obtained by correcting and aligning the representation of the old fresh product category learned by the old model, σ y Indicates the calculated softmax value at the position of category y.

4. The incremental learning method for product categories for electronic scales according to claim 1, characterized in that: The trained feature correction networks are combined to obtain the feature-corrected teacher network, specifically: The trained feature correction network is combined with the skeleton network of the old model to construct a feature-corrected teacher network.

5. The incremental learning method for product categories of electronic scales according to claim 3, characterized in that: Based on the knowledge distillation technology, the short-range global memory and long-range memory are replayed, and the feature-corrected teacher network is trained according to the replayed memory, specifically: The aligned long-range memory is replayed using the traditional logit-based knowledge distillation loss, and its loss function is: Logits are extracted from the auxiliary model as supervision information, and the short-range global memory is replayed using the balanced knowledge distillation technique based on logit adjustment. The loss function is: in, M i is the number of samples of each category in the training set, M1 is the number of samples of the first category in the training set, M2 is the number of samples of the second category in the training set, M C is the number of samples in the Cth category in the training set, τ is a hyperparameter, C all is the set of all new and old categories, To calculate softmax only on the logits of all new and old categories, C represents the category set and M is the number of samples of all categories in the training set; The feature-corrected teacher network is trained based on the replayed short-range global memory and long-range memory.

6. A product category incremental learning device for electronic scales, characterized in that: include: The first training unit is used to train the preset auxiliary model and feature correction network using the training dataset based on the knowledge distillation technology when a new task appears; A memory acquisition unit is used to acquire the aligned short-range global memory output by the trained auxiliary model, and to combine the trained feature correction network to obtain the feature-corrected teacher network, and to acquire the aligned long-range memory output by the feature-corrected teacher network; A second training unit is configured to replay the short-range global memory and the long-range memory based on the knowledge distillation technology, and train the feature-corrected teacher network according to the replayed memory; The saving unit is used to filter and save new category samples and a small amount of old category samples after determining that the training of the teacher network after feature correction is completed.

7. A product category incremental learning device for electronic scales, characterized by: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for incremental learning of product categories for electronic scales as described in any one of claims 1 to 5 is implemented.

8. A readable storage medium, characterized in that: A computer program is stored, and the computer program can be executed by a processor of the device where the storage medium is located to implement the incremental learning method for product categories for electronic scales as described in any one of claims 1 to 5.