Inventory updating method and device, equipment, storage medium and program product

By automatically identifying data center consumables through image acquisition equipment and recognition models, the problem of low efficiency in consumable inventory management has been solved, enabling accurate and real-time inventory updates, improving management efficiency and reducing costs.

CN121094697APending Publication Date: 2025-12-09INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511193382.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

In existing technologies, data center consumable inventory management is inefficient. Manual registration is time-consuming and has a high error rate, while radio frequency identification (RFID) technology is costly and easily lost, leading to management inconvenience.

Method used

By using image acquisition equipment in conjunction with a pre-trained recognition model, the system automatically identifies the current material information on the material rack based on the access control trigger response, and updates the inventory according to historical information, thereby achieving automatic, accurate and real-time inventory updates.

Benefits of technology

It improved the accuracy and efficiency of inventory updates, reduced management costs, and enhanced the informatization level of inventory management and the safety and compliance of consumable use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121094697A_ABST
    Figure CN121094697A_ABST
Patent Text Reader

Abstract

The invention discloses an inventory updating method, device and equipment, a storage medium and a program product, and relates to the field of cloud computation.The method comprises the steps that after an access control trigger response of a material library is received, a shooting instruction is sent to image acquisition equipment, and a current frame position image, shot by the image acquisition equipment, corresponding to a target material frame is received; the current frame position image is input into a pre-trained recognition model, current material information of the target material frame is obtained, and the recognition model is a model obtained after a neural network model is trained with the purpose of extracting the material information in the image and with a loss function and a learning rate scheduling strategy of the recognition model as optimization indexes; determining historical material information of the target material shelf according to the identifier of the target material shelf; and updating inventory information of the material library according to the current material information and the historical material information. According to the method, automatic, accurate and real-time inventory information updating is realized, manual intervention is reduced, the inventory updating accuracy is increased, and the management efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing, and more particularly to an inventory update method, apparatus, device, storage medium, and program product. Background Technology

[0002] Data centers are dedicated physical facilities for the centralized storage, processing, management, and distribution of large amounts of data, and are also core infrastructure supporting the modern digital economy. Because consumables in data centers are quite important, such as magnetic tapes and encryption cards, their management is extremely rigorous.

[0003] Currently, data center consumable inventory management typically involves updating inventory through strict manual registration or RFID technology when consumables are received or issued. However, due to the stringent management processes in data centers, manual registration consumes a significant amount of manpower and time, and has a high error rate, resulting in low management efficiency. RFID technology, on the other hand, is limited by high management costs, the ease with which RFID tags can be lost, and difficulties in recycling. Summary of the Invention

[0004] This invention provides an inventory update method, apparatus, device, storage medium, and program product, relating to the field of cloud computing and applicable to the fintech field. This method enables automatic, accurate, and real-time inventory information updates, reducing manual intervention, increasing inventory update accuracy, improving management efficiency, and, based on a simple image-capturing method, continuously acquiring images, thus reducing management costs.

[0005] According to one aspect of the present invention, an inventory update method is provided, the method comprising:

[0006] After receiving the access control trigger response from the material warehouse, a shooting command is sent to the image acquisition device, and the image of the current shelf position corresponding to the target material shelf is captured by the image acquisition device.

[0007] The current shelf image is input into a pre-trained recognition model to obtain the current material information of the target material shelf. The recognition model is a model obtained by training a neural network model with the purpose of extracting material information from the image and using the loss function and learning rate scheduling strategy of the recognition model as optimization indicators.

[0008] Based on the identification of the target material rack, determine the historical material information of the target material rack.

[0009] Update the inventory information of the material library based on current and historical material information.

[0010] The inventory update method provided in this invention determines the need for inventory updates based on access control triggers in the material warehouse, thus associating the operation that triggers the need for inventory updates with access control triggers and ensuring the real-time nature of inventory updates. It uses an image acquisition device to capture an image of the current shelf location corresponding to the target material shelf, and based on a pre-trained recognition model, it can automatically and accurately identify the current material information on the target material shelf corresponding to the current shelf location image. This achieves fast, accurate, and automated identification of material information on the material shelf, providing accurate and real-time material information for subsequent inventory updates. By assigning an identifier to each material shelf and determining its corresponding historical material information based on the identifier, it can accurately and quickly identify the material shelf whose material information needs to be updated from multiple material shelves in the material warehouse. Furthermore, based on the current material information and historical material information, it can determine the material change information between the two, solving the problems existing in current inventory update methods. Based on automatic, accurate, and real-time inventory information updates, it reduces manual intervention, increases inventory update accuracy, improves management efficiency, and, based on a simple image acquisition method, can continuously acquire images, reducing management costs.

[0011] According to another aspect of the present invention, an inventory updating device is provided, the device comprising:

[0012] The interaction module is used to send a shooting command to the image acquisition device after receiving the access control trigger response from the material warehouse, and to receive the image of the current shelf position corresponding to the target material shelf captured by the image acquisition device;

[0013] The recognition module is used to input the current shelf image into the pre-trained recognition model to obtain the current material information of the target material shelf. The recognition model is a model obtained by training a neural network model with the purpose of extracting material information from the image and using the loss function and learning rate scheduling strategy of the recognition model as optimization indicators.

[0014] The determination module is used to determine the historical material information of the target material rack based on its identifier;

[0015] The update module is used to update the inventory information of the material library based on current material information and historical material information.

[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0017] At least one processor; and

[0018] A memory that is communicatively connected to at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the inventory update method of any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the inventory update method of any embodiment of the present invention.

[0021] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the inventory update method of any embodiment of the present invention.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

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

[0024] Figure 1 A flowchart illustrating the inventory update method provided in an embodiment of the present invention;

[0025] Figure 2 This is a schematic diagram of the training process of the identification model in the inventory update method provided in the embodiments of the present invention;

[0026] Figure 3 This is a flowchart illustrating the process of determining the loss function in the inventory update method provided in this embodiment of the invention.

[0027] Figure 4 This is a schematic diagram of the structure of the inventory update device provided in an embodiment of the present invention;

[0028] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

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

[0030] It should be noted that the terms "current," "historical," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] Figure 1 This is a flowchart illustrating an inventory update method provided in an embodiment of the present invention. This embodiment is applicable to situations requiring the management of data center consumables. The method can be executed by an inventory update device, which can be implemented in hardware and / or software and can be configured in an electronic device. In this embodiment, the electronic device can be a computer or server device used to manage data center consumable inventory. Figure 1 As shown, the method includes:

[0032] S101. After receiving the access control trigger response from the material warehouse, send a shooting command to the image acquisition device and receive the current shelf position image corresponding to the target material shelf captured by the image acquisition device.

[0033] The material warehouse is the storage area for consumables within the data center. The access control trigger response is triggered when an employee passes through the detection system and opens the door to enter the material warehouse. In this embodiment, the access control trigger response can be triggered when an employee prepares to enter the material warehouse and opens the door, or when the warehouse door closes after the employee has entered; it can also be triggered when an employee prepares to leave the material warehouse and opens the door, or when the warehouse door closes after the employee has left. The image acquisition device is used to acquire images of consumables on each shelf in the material warehouse. In this embodiment, the image acquisition device can be a dual-camera setup, such as a top-view and side-view dual-camera setup. The shooting command instructs the image acquisition device on any shelf to immediately acquire an image of the shelf location. The target material shelf is the shelf to which the image acquisition device is instructed by the shooting command to acquire an image. The current shelf image is the current image of the target material shelf acquired by the image acquisition device, which may include the target material shelf and all consumables on it.

[0034] Specifically, when the material warehouse door is detected to be open or closed, or when an employee passes through the access control system and opens the warehouse door to prepare for entry or exit, the material warehouse access control management equipment (such as an access control system) will initiate an access control trigger response. At this time, the inventory update device can send a shooting command to the image acquisition device. The image acquisition device will then capture the corresponding target material shelf according to the shooting command, obtain the current shelf image, and feed the current shelf image back to the inventory update device.

[0035] For example, regarding image acquisition devices, one device can be installed at a key location on each shelf to capture images of the corresponding shelf position; another device can be installed on the opposite shelf to capture images of the corresponding shelf position (the shelf number captured by the image acquisition device is associated with the identifier of the image acquisition device); and one or more image acquisition devices can be deployed anywhere in the material warehouse, as long as the shooting range of all image acquisition devices can completely and clearly cover all shelves and the corresponding consumables on the shelves. Regarding the subject of the image acquisition, if it is impossible to determine which shelf the consumables have changed, all image acquisition devices will capture images of the current shelf position corresponding to the target material shelf; if it is possible to determine which shelf the consumables have changed, for example, based on weighing equipment, laser scanning equipment, etc., then only the image acquisition device corresponding to the shelf where the consumables have changed can be sent a shooting instruction.

[0036] Optionally, in this embodiment, if an access control trigger response or a shelf door opening response is received before the image acquisition device receives the shooting command, image acquisition begins at a frame rate of 5 frames per second. If an access control closing response or a shelf door closing response is received, the image acquisition device switches to low-power mode.

[0037] In this embodiment, the need to update the inventory is determined by the access control trigger of the material library, which realizes the association between the operation that triggers the need to update the inventory and the access control trigger, ensuring the real-time nature of the inventory update; the current shelf position image corresponding to the target material shelf is captured by the image acquisition device, which realizes the real-time and accurate image basis for determining the material information that needs to be updated in the future based on visual recognition technology.

[0038] S102. Input the current rack image into the pre-trained recognition model to obtain the current material information of the target material rack.

[0039] The identification model aims to extract material information from images. It is obtained by training a neural network model using a loss function and learning rate scheduling strategy as optimization metrics. The current material information includes information about the materials on the target material rack. In this embodiment, the material information mainly includes the type of material and the quantity of that type of material.

[0040] Specifically, a neural network model can be trained using historical or sample shelf images labeled with the types and quantities of consumables. Based on the model's loss function and learning rate scheduling strategy, the parameters of the neural network model are optimized. Finally, when the model training termination condition is met, the trained neural network model is used as the recognition model. The recognition model is one that can output the material information of the corresponding shelf after inputting any shelf image. Therefore, a real-time captured image of the current shelf can be input into the recognition model to obtain the current material information of the target shelf.

[0041] In this embodiment, based directly on the pre-trained recognition model, the current material information on the target material rack corresponding to the current shelf position image can be automatically and accurately identified, realizing fast, accurate and automated identification of material information on the material rack, providing accurate and real-time material information for subsequent inventory updates.

[0042] S103. Determine the historical material information of the target material rack based on its identification markings.

[0043] The identifier for the target material shelf is used to distinguish each material shelf in the material warehouse. In this embodiment, since more than one image of the current shelf location corresponding to the target material shelf is obtained each time an access control trigger response is received, meaning that the types and quantities of consumables on multiple material shelves may change, resulting in multiple images of the current shelf location corresponding to each material shelf, or the image acquisition device may have captured multiple images of the current shelf location corresponding to a certain material shelf from different shooting angles. Therefore, to accurately update the inventory, an identifier can be provided for each material shelf. Historical material information refers to the material information of the target material shelf determined at the time before the current shelf location image was captured, i.e., the time before the current time. In this embodiment, historical material information can be the material information corresponding to the target material shelf output by the previous recognition model, or the material information corresponding to the target material shelf in the inventory information after the previous inventory information update.

[0044] Specifically, one implementation involves determining the identifier of the target material rack and directly obtaining the previous material information of the material rack corresponding to the material rack with the same identifier as the target material rack, as output by the recognition model, as historical material information. Another implementation involves determining the identifier of the target material rack and obtaining partial material information from the current inventory information corresponding to the material rack with the same identifier as the target material rack, as historical material information.

[0045] S104. Update the inventory information of the material library based on the current material information and historical material information.

[0046] Specifically, the material information corresponding to the material shelf with the same identifier as the target material shelf can be updated directly based on the difference between the current material information and the historical material information. This is equivalent to updating the inventory information of the material library.

[0047] For example, updating the inventory information of the material library based on current material information and historical material information may include:

[0048] (i) Determine material change information based on the types of materials and their corresponding quantities included in the current material information, as well as the types of materials and their corresponding quantities included in the historical material information.

[0049] Specifically, the material information mainly includes the types of materials and the corresponding quantities for each type. Therefore, the types of materials and their corresponding quantities in the current material information can be directly compared with those in the historical material information. For example, the current material information includes 6 pieces of material A, 3 pieces of material B, 4 pieces of material C, and 2 pieces of material D. The historical material information includes 3 pieces of material A, 6 pieces of material B, and 9 pieces of material C. The material change information would then be: material A increased by 3 pieces, material B decreased by 3 pieces, material C decreased by 5 pieces, and material D increased by 2 pieces.

[0050] (ii) Update the inventory information of the material warehouse according to the material change information.

[0051] Specifically, after determining the material change information, the inventory information of the material library can be updated accordingly.

[0052] For example, inventory information mainly includes each material type in the entire material library and the total quantity of each material. Therefore, after determining the material change information, the total quantity of each material type in the entire material library can be updated based on the material change information. For example, if the entire material library originally contained 1000 units of material A, 50 units of material B, 680 units of material C, and 350 units of material D, and the material change information is that material A increases by 3 units, material B decreases by 3 units, material C decreases by 5 units, and material D increases by 2 units, then the inventory information of the material library would be: 1003 units of material A, 47 units of material B, 675 units of material C, and 352 units of material D.

[0053] Optionally, in this embodiment, if the inventory information also specifically includes the type of material on each material shelf and its corresponding quantity, the historical material information in the inventory information can be directly replaced based on the current material information, and the inventory information of the material library can be updated.

[0054] In this embodiment, each material rack is assigned an identifier, and its corresponding historical material information is determined based on the identifier of the target material rack. This allows for the accurate and rapid identification of the material rack whose material information needs updating from multiple material racks in the material library. Furthermore, based on the current material information and historical material information, the material change information between the two can be determined, solving the problems existing in current inventory update methods. Based on automatic, accurate, and real-time inventory information updates, this provides efficient and intelligent inventory management, reduces manual intervention, increases inventory update accuracy, improves management efficiency, and continuously acquires images through simple image capture, thus reducing management costs.

[0055] The inventory update method provided in this invention determines the need for inventory updates based on access control triggers in the material warehouse, thus associating the operation that triggers the need for inventory updates with access control triggers and ensuring the real-time nature of inventory updates. It uses an image acquisition device to capture an image of the current shelf location corresponding to the target material shelf, and based on a pre-trained recognition model, it can automatically and accurately identify the current material information on the target material shelf corresponding to the current shelf location image. This achieves fast, accurate, and automated identification of material information on the material shelf, providing accurate and real-time material information for subsequent inventory updates. By assigning an identifier to each material shelf and determining its corresponding historical material information based on the identifier, it can accurately and quickly identify the material shelf whose material information needs to be updated from multiple material shelves in the material warehouse. Furthermore, based on the current material information and historical material information, it can determine the material change information between the two, solving the problems existing in current inventory update methods. Based on automatic, accurate, and real-time inventory information updates, it reduces manual intervention, increases inventory update accuracy, improves management efficiency, and, based on a simple image acquisition method, can continuously acquire images, reducing management costs. Furthermore, because inventory information is updated automatically and accurately, the level of informatization in inventory management can be improved, inventory control can be optimized, and the safety and compliance of the use of consumables in the inventory can be enhanced.

[0056] Optionally, to further ensure the accuracy and real-time nature of inventory updates, detailed records can be made of the types of consumables involved in the updated inventory information, the corresponding quantities of each type, the precise storage location of each consumable, the time of entry into the warehouse, and the records of exit from the warehouse.

[0057] Optionally, the image acquisition device can also record the information of the staff member entering the material warehouse. Optionally, if some consumables are severely obscured on the material rack, such as consumables placed in boxes, the obstruction needs to be removed and the consumables need to be turned over when the consumables are put into or taken out of the warehouse to ensure that the image acquisition device can recognize each consumable.

[0058] Optionally, after each inventory update, a pre-defined inventory warning threshold can be set to alert inventory management personnel to take appropriate action regarding the inventory situation. The warning threshold is set by comprehensively considering factors such as data center business needs, consumable procurement cycles, and historical usage data. When the quantity of a certain type of consumable falls below the warning threshold, an automatic and timely low-stock warning can be sent to management personnel, reminding them to replenish stock promptly. Furthermore, in addition to monitoring situations where the current quantity is below the minimum threshold, when the current quantity is above the minimum threshold, the estimated remaining lifespan of the consumables can be predicted. By analyzing the consumable consumption rate in historical usage data and dynamically adjusting it in conjunction with the current data center workload, the estimated lifespan can be calculated. This allows for advance planning of procurement schedules, preventing disruptions to normal data center operations due to consumable shortages.

[0059] Optionally, to enhance the security management of warehouse consumables, the identification of employees entering the warehouse can be incorporated into images or videos captured by image acquisition equipment. For example, it can determine whether the person receiving the warehouse consumables is a manager, and whether there have been any violations or lost consumables. When personnel enter the consumables warehouse area, the image acquisition equipment captures their image information and compares it with a pre-entered database of authorized personnel images to verify the legitimacy of the person receiving the consumables. During the consumables receiving process, image data is monitored in real time to determine if there are any unauthorized receiving behaviors, such as receiving excessive amounts or receiving consumables outside of working hours. If the inventory is updated using the above methods and the quantity of consumables received by the staff in the real-time monitoring image data does not match the updated inventory record, and the possibility of normal entry and exit operations is ruled out, it can be determined that consumables are lost, and an alarm can be issued. This strengthens the full-process supervision and dynamic monitoring of data center consumables management, making consumables management more standardized, scientific, transparent, and efficient.

[0060] Figure 2 This is a schematic diagram illustrating the training process of the identification model in the inventory update method provided by this invention. Based on the above embodiments and other examples, this embodiment provides a detailed description of the steps for training the identification model. Figure 2 As shown, the method includes:

[0061] S201. Obtain the sample set.

[0062] The sample set includes multiple sample images.

[0063] Specifically, the sample images in the sample set can be images from the material library monitoring video, or images of each material rack and the materials on it that were specifically photographed.

[0064] For example, before obtaining the sample set, it may also include:

[0065] (a) Obtain the first type of image and the second type of image.

[0066] The first type of images includes images of materials on a shelf taken from different shooting angles and under different light intensities, and any image in the second type of images has the same background as at least one image in the first type of images.

[0067] Specifically, because the data center's material warehouse contains dedicated physical facilities storing large amounts of data, the types and quantities of consumables in the warehouse are numerous, and their placement may overlap. Therefore, to improve the accuracy of model recognition, sample images can be obtained from different dimensions. Thus, two types of images can be acquired first: one type consists of images of materials on different shelves, and the other type consists of images with only the background. That is, the first type of images includes images of materials on shelves taken from different shooting angles and under different lighting intensities, and any image in the second type has the same background as at least one image in the first type.

[0068] For example, the first type of image may include: single consumable image and multiple consumable image; that is, an image containing only one consumable and an image containing multiple consumables, and the multiple consumables may be arranged in an overlapping manner. Multiple consumables refer to the presence of multiple types of consumables and / or multiple quantities of a certain type of consumables in the same image. When capturing the first type of image, the shooting angle, lighting conditions, and the overlapping arrangement of multiple consumables can be varied. For example, the lighting conditions may include natural light, indoor light, and dim environments. The second type of image is an image with a background completely consistent with that of the first type of image. For example, after capturing a first type of image with multiple consumables overlapping under a certain angle and lighting conditions, only the multiple consumables are removed, and a second type of image without consumables is captured, which is consistent with the shelf background, camera position, and environmental arrangement of the first type of image, and this second type of image is associated with the first type of image.

[0069] Optionally, the second type of image can be 20 images, the single consumable multi-angle image can be 20 images per type (including horizontal / vertical rotation angles), the overlapping images can include 10 images of 10 different combinations (the combination is the overlapping arrangement), and the multi-light image can include 5 images of each type of light (light includes natural light, indoor light, and dim environments, etc.).

[0070] Optionally, after the images are acquired, the first type of images can be preprocessed, such as by cropping or scaling. Also, the second type of images can be preprocessed to expand the sample, provided that the preprocessing of the second type of images still ensures that the background of any image in the first type of images is consistent.

[0071] (ii) For any first image in the first type of images, perform differential processing on the second image in the second type of images that has the same image background as the first image and the first image to obtain an intermediate image.

[0072] Differential processing is an image processing method that calculates the differences between two images pixel by pixel.

[0073] Specifically, since the background of any second image in the second category of images is the same as the background of a first image in the first category of images, differential processing can be performed on the second images in the second category of images that have the same background as the first images as the first images. That is, the pixel-level difference between the first image and the second image is calculated to eliminate background interference and highlight the key features in the image, thus obtaining the intermediate image.

[0074] (iii) Binarize all intermediate images to obtain sample images.

[0075] Binarization is a method of converting image pixel values ​​into an image containing only two colors. In this embodiment, image binarization is performed by converting a grayscale image into a binary image containing only 0 and 1.

[0076] Specifically, all intermediate images are binarized to obtain sample images.

[0077] Optionally, after binarizing all intermediate images, data augmentation can be performed on the binarized images. For example, multiple single-consumer images can be randomly selected from the single-consumer images in the first type of images, and overlapping images can be synthesized through affine transformations (translation, rotation, scaling) to simulate actual stacking scenarios and increase the diversity of the dataset. Additionally, the image brightness can be adjusted to simulate consumable images under different lighting conditions. Furthermore, the images can be labeled, such as with the type and quantity of consumables. If a region contains multiple consumables, the bounding box and category of each consumable can be labeled separately. After performing the above processing on the images, sample images can be obtained.

[0078] In this embodiment, images are acquired from multiple angles, considering the placement of consumables and various lighting conditions. This allows the model to be exposed to more data variations during subsequent training, improving its ability to recognize the appearance features of consumables under different conditions. Acquiring a second type of image with a single background identical to the first type of image, and eliminating fixed background interference through differential processing, highlights key features in the image. Binarizing the intermediate images simplifies image information, significantly reducing the complexity of subsequent model processing of sample images, providing the model with clear and simplified input, thereby improving the accuracy and efficiency of model recognition.

[0079] S202. Based on the sample set, use an adaptive optimization algorithm to iteratively train the neural network model until the decrease in the loss function of two adjacent training rounds meets the first preset condition.

[0080] The adaptive optimization algorithm is an optimization algorithm that dynamically adjusts the learning rate for each parameter based on gradient history information. In this embodiment, the adaptive optimization algorithm is an algorithm that determines how to update the model's weight parameters based on the gradient of the loss function. Optionally, in this embodiment, the initial learning rate of the adaptive optimization algorithm is the default learning rate. The first preset condition is a pre-set threshold for the magnitude of the loss function's decline.

[0081] Specifically, the sample images in the sample set are input into the neural network model in batches for iterative training. The learning rate of the model is continuously adjusted using an adaptive optimization algorithm until the decrease in the loss function between two adjacent training rounds meets a first preset condition. Then, step S203 can be executed. Optionally, the first preset condition is: the decrease in the loss function between two adjacent training rounds is less than 1%.

[0082] S203. Update the learning rate of the neural network model according to the learning rate scheduling strategy.

[0083] The learning rate scheduling strategy is used to optimize the model's convergence speed, stability, and final performance by dynamically adjusting the global learning rate during training. In this embodiment, the learning rate scheduling strategy can be a preset scheduling, such as a decay mode. Optionally, the decay factor can be the maximum value within a normal range.

[0084] Specifically, in each epoch of model training, a loss function is calculated to determine the training status of the model in each epoch. Based on this, the decrease in the loss function between two adjacent training epochs can be calculated, and when the decrease in the loss function meets a first preset condition, the learning rate of the neural network model is updated using a learning rate scheduling strategy. For example, if the model's original learning rate scheduling strategy is PS1 or empty, then when the decrease in the loss function between two adjacent training epochs meets the first preset condition, the original PS1 is switched using learning rate scheduling strategy PS2, or learning rate scheduling strategy PS2 is directly introduced to further change the model's learning rate.

[0085] In this embodiment, during model training, an adaptive optimization algorithm is first used to iteratively train the neural network model. This allows the model's parameter vector to quickly approach the optimal solution neighborhood of the loss function in the early stages of training, reducing the possibility of slow convergence. During training, if the decrease in the loss function between two adjacent training rounds meets a first preset condition, it indicates that the "coarse tuning" of the model's parameters is basically complete, and the model has escaped the "high-speed descent zone," requiring "fine tuning." Therefore, switching the learning rate scheduling strategy allows for fine-tuning the weights in the neighborhood of the optimal solution, avoiding oscillations and divergence caused by an excessively large learning rate. By gradually reducing the step size, the training time of the switched model is shortened, enabling the model to converge stably to a local optimum and improving convergence stability.

[0086] S204. Based on the sample set, use an adaptive optimization algorithm to iteratively train the updated neural network model until the curvature of the loss function curve and the training accuracy meet the second preset condition, and use the current neural network model as the recognition model.

[0087] The second preset condition is the training termination condition for the model.

[0088] Specifically, after introducing the learning rate scheduling strategy, model training continues, meaning the updated neural network model is iteratively trained using an adaptive optimization algorithm based on the sample set. Simultaneously, the learning rate is continuously adjusted by the adaptive optimization algorithm based on the changed learning rate scheduling strategy. During model training, a loss function curve can be obtained by plotting the epochs on the horizontal axis and the loss function value on the vertical axis. The curvature of the loss function curve is then calculated by determining the change in its second derivative. Furthermore, the training accuracy can be determined based on the model's output and sample labels at each epoch. Therefore, the training termination condition can be determined by combining the curve curvature of the loss function and the training accuracy.

[0089] For example, the second preset condition is: the training accuracy fluctuation for a preset number of rounds is less than a preset fluctuation threshold, and the curvature of the curve corresponding to the loss function approaches 0. Optionally, the preset number of rounds is 5 rounds, and the preset fluctuation threshold is 0.5%.

[0090] Optionally, in this embodiment, the sample set can be divided into a training set, a validation set, and a test set at a ratio of 80%, 10%, and 10%. Model parameters are trained based on the training set, generalization ability is evaluated, hyperparameters are adjusted, and early stopping is implemented based on the validation set, and the performance of the trained model is tested based on the test set. The training accuracy under the second preset condition can be the model accuracy corresponding to the validation set.

[0091] In this embodiment, the second preset condition is used as the training termination condition. That is, not only is the training accuracy of the model considered, but also the curvature of the loss curve corresponding to the loss function. This can effectively avoid the problem of premature stopping caused by traditional single-indicator monitoring.

[0092] Figure 3 This is a flowchart illustrating the process of determining the loss function in the inventory update method provided by this invention. Based on the above embodiments and other examples, this embodiment provides a detailed explanation of the steps involved in determining the loss function during the training of the recognition model. Furthermore, it specifically describes the architecture of the neural network model in this embodiment. Figure 3 As shown, the method includes:

[0093] S301. Input the current sample image into the neural network model to obtain the training label corresponding to the current sample image.

[0094] Here, the current sample image is any image in the sample set, and it is the sample image input to the neural network model at the current time. The training label is the result output by the neural network model after the current sample image is input.

[0095] Specifically, the current sample image is input into the neural network model to obtain the training labels corresponding to the current sample image, including:

[0096] (i) Perform convolution operation on the current sample image to obtain initial feature information, and perform feature batch normalization and scaling offset processing on the initial feature information to obtain target feature information.

[0097] The convolution operation essentially involves locally weighted summation of the input data through a sliding window to extract local features. Feature batch normalization standardizes and adjusts the features. In this embodiment, feature batch normalization calculates the mean, variance, and normalizes the features for each batch of input data. Scaling and offsetting involves scaling and offsetting the feature information after feature batch normalization. In this embodiment, the scaling threshold can be pre-set for the scaling operation.

[0098] Specifically, after the current sample image is input into the neural network model, it is converted into structured numerical data. Therefore, the convolution operation performed on the current sample image is actually a convolution operation on the "current sample image" that has already been converted into structured numerical data. After the convolution operation, the initial feature information corresponding to the "current sample image" can be obtained, which is the local feature extracted from the original pixels of the current sample image. To ensure the stability of the feature distribution of the initial feature information obtained after convolution, feature batch normalization and scaling offset processing can be used to process the initial feature information, accelerate the stabilization of the feature distribution, and avoid gradient anomalies.

[0099] (ii) Spatial dimensionality reduction, data structure transformation and feature dimensionality reduction are performed on the target feature information to obtain feature vector information.

[0100] Spatial dimensionality reduction involves compressing the spatial size of feature information while retaining key spatial information. In this embodiment, spatial dimensionality reduction is specifically pooling the target feature information. Data structure transformation involves converting a three-dimensional tensor into a one-dimensional vector. Feature dimensionality reduction reduces the total dimension of the feature vectors, retains core features, and compresses the data size. In this embodiment, feature dimensionality reduction can be performed using global pooling.

[0101] Specifically, since the obtained target feature information is too large to meet the needs of subsequent model processing, it is necessary to process the target feature information. For example, pooling can be performed on the target feature information, i.e., spatial dimensionality reduction, to reduce the computational load of subsequent processing while retaining key spatial information. Furthermore, the spatially dimensionality-reduced feature information undergoes data structure transformation to meet the input requirements of subsequent layers in the neural network model. Finally, the transformed feature information undergoes feature dimensionality reduction to obtain feature vector information.

[0102] (iii) Perform linear transformation and nonlinear activation on the feature vector information to obtain nonlinear features, and then perform regularization on the nonlinear features to obtain regularized features.

[0103] Linear transformation and nonlinear activation involve combining scattered local features (such as edges and textures displayed after convolution) through matrix multiplication to form a high-level semantic representation, enabling the model to fit complex functions. In this embodiment, linear transformation and nonlinear activation of feature vector information are the processing performed on feature vectors in the fully connected layer. Regularization is a regularization technique that prevents overfitting of the neural network by randomly and temporarily discarding neurons.

[0104] Specifically, after processing the target feature information through pooling layers, feature vector information that meets the requirements for entering the fully connected layer can be obtained. Therefore, linear transformation and nonlinear activation can be performed on the feature vector information to obtain nonlinear features. Subsequently, in order to prevent overfitting of the neural network, regularization can be used to perturb the feature information, reduce variance shift, and finally obtain regularized features.

[0105] Optionally, in this embodiment, the nonlinear features are regularized, and the probability of randomly discarding neurons can be 30%-40%. This can reduce the distribution differences of the data and mitigate the impact of feature batch normalization processing in different layers.

[0106] In this embodiment, after obtaining the feature information, it is first subjected to feature batch normalization, and then after other processing, when the feature vector information enters other levels and is processed at that level, regularization is performed. This not only achieves hierarchical physical isolation of the two processing methods, structurally avoiding the variance shift problem caused by their direct superposition, but also enables the reduction of distribution differences based on regularization after feature batch normalization, thus mitigating the negative impact of feature batch normalization on the features.

[0107] (iv) Perform prediction head processing on the regularized features to obtain the training labels corresponding to the current sample image.

[0108] Among them, prediction head processing refers to the processing performed on the feature input prediction head module.

[0109] Specifically, after obtaining the regularization features, the regularization features can be input into the prediction head module, and the backbone network can extract the features to finally obtain the training label corresponding to the current sample image.

[0110] Optionally, in this embodiment, the neural network model includes convolutional layers, pooling layers, and fully connected layers. In the above steps, (i) "performs convolution operation on the current sample image to obtain initial feature information" is a processing step in the convolutional layer, (ii) is a processing step in the pooling layer, and (iii) is a processing step in the fully connected layer. Furthermore, in this embodiment, the weights corresponding to the convolutional layer, pooling layer, and fully connected layer are updated using a backpropagation algorithm based on global structured weight decay. That is, global structured weight decay is introduced to constrain the weights of each layer in the neural network model, limiting large fluctuations in weights and preventing overfitting during training. Specifically, global structured weight decay mainly performs regularization based on the structural relationships between parameters to control model complexity in a more refined manner.

[0111] In this embodiment, after convolution processing of the input information, feature batch normalization and scaling offset processing can accelerate feature distribution stabilization; after linear transformation and nonlinear activation of the feature vector information, regularization processing is performed on the nonlinear features to suppress the dependence of specific neurons; and global weights are constrained by global structured weight decay, which can reduce the overfitting rate.

[0112] S302. Determine the loss function based on the calibration label and training label corresponding to the current sample image.

[0113] The labeling tags are pre-defined labels for the current sample image. In this embodiment, the main focus is on labeling the boundaries and categories of consumables in each current sample image. Furthermore, labels can be pre-defined according to different characteristics of the consumables based on their type. For example, for ordinary storage consumables, their shape outline, color distribution, and interface features can be labeled; for security authentication consumables, key features such as chip layout and identification information can be labeled.

[0114] Specifically, after inputting the current sample image into the model and having the model output the predicted label, the loss function can be determined based on the label and the training label.

[0115] Figure 4 This is a schematic diagram of the inventory update device provided in an embodiment of the present invention. Figure 4 As shown, the device includes:

[0116] The interaction module 401 is used to send a shooting command to the image acquisition device after receiving the access control trigger response from the material warehouse, and to receive the image of the current shelf position corresponding to the target material shelf captured by the image acquisition device;

[0117] The recognition module 402 is used to input the current shelf image into a pre-trained recognition model to obtain the current material information of the target material shelf. The recognition model is a model obtained by training a neural network model with the purpose of extracting material information from the image and using the loss function and learning rate scheduling strategy of the recognition model as optimization indicators.

[0118] The determination module 403 is used to determine the historical material information of the target material rack based on the identifier of the target material rack;

[0119] The update module 404 is used to update the inventory information of the material library based on the current material information and historical material information.

[0120] Optionally, update module 404 is specifically used for:

[0121] Based on the types of materials and their corresponding quantities included in the current material information, as well as the types of materials and their corresponding quantities included in the historical material information, determine the material change information; based on the material change information, update the inventory information of the material library.

[0122] Optionally, the device further includes: a model training module for training a recognition model, wherein the model training module is specifically used for:

[0123] Obtain a sample set, which includes multiple sample images; based on the sample set, use an adaptive optimization algorithm to iteratively train the neural network model until the decrease in the loss function of two adjacent training rounds meets a first preset condition; update the learning rate of the neural network model according to the learning rate scheduling strategy; based on the sample set, use the adaptive optimization algorithm to iteratively train the updated neural network model until the curvature of the curve corresponding to the loss function and the training accuracy meet a second preset condition, and use the current neural network model as the recognition model.

[0124] Optionally, one sample image corresponds to one label; the loss function is determined, and the model training module is specifically used for:

[0125] Input the current sample image into the neural network model to obtain the training label corresponding to the current sample image; determine the loss function based on the calibration label and the training label corresponding to the current sample image.

[0126] Optionally, the current sample image is input into the neural network model to obtain the training label corresponding to the current sample image. The model training module is specifically used for:

[0127] The current sample image is convolved to obtain initial feature information. This initial feature information is then subjected to feature batch normalization and scaling / offset processing to obtain target feature information. The target feature information is then subjected to spatial dimensionality reduction, data structure transformation, and feature dimensionality reduction processing to obtain feature vector information. The feature vector information is then subjected to linear transformation and nonlinear activation to obtain nonlinear features. These nonlinear features are then regularized to obtain regularized features. Finally, the regularized features are processed by a prediction head to obtain the training label corresponding to the current sample image.

[0128] Optionally, before acquiring the sample set, the model training module is also used for:

[0129] Acquire a first type of image and a second type of image, wherein the first type of image includes images of materials on a shelf taken from different shooting angles and under different light intensities, and any image in the second type of image has the same background as at least one image in the first type of image; for any first image in the first type of image, perform difference processing on the second image in the second type of image that has the same background as the first image and the first image to obtain an intermediate image; perform binarization processing on all intermediate images to obtain a sample image.

[0130] The inventory update device provided in this embodiment of the invention can execute the inventory update method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0131] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0132] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0133] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0134] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as inventory update methods.

[0135] In some embodiments, the inventory update method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the inventory update method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the inventory update method by any other suitable means (e.g., by means of firmware).

[0136] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0137] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0138] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0139] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0140] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0141] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0142] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the inventory update method as provided in any embodiment of this invention.

[0143] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0144] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0145] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An inventory update method, characterized in that, The method includes: After receiving the access control trigger response from the material warehouse, a shooting command is sent to the image acquisition device, and the current shelf position image corresponding to the target material shelf is captured by the image acquisition device. The current shelf image is input into a pre-trained recognition model to obtain the current material information of the target material shelf. The recognition model is a model obtained by training a neural network model with the purpose of extracting material information from the image and using the loss function and learning rate scheduling strategy of the recognition model as optimization indicators. Based on the identifier of the target material rack, determine the historical material information of the target material rack; The inventory information of the material library is updated based on the current material information and the historical material information.

2. The method according to claim 1, characterized in that, The step of updating the inventory information of the material library based on the current material information and the historical material information includes: Based on the types of materials and their corresponding quantities included in the current material information, and the types of materials and their corresponding quantities included in the historical material information, material change information is determined; The inventory information of the material library is updated based on the material change information.

3. The method according to claim 1, characterized in that, The method for training the recognition model includes: Obtain a sample set, wherein the sample set includes multiple sample images; Based on the sample set, the neural network model is iteratively trained using an adaptive optimization algorithm until the decrease in the loss function of two adjacent training rounds meets the first preset condition. The learning rate of the neural network model is updated according to the learning rate scheduling strategy; Based on the sample set, the updated neural network model is iteratively trained using an adaptive optimization algorithm until the curvature of the loss function curve and the training accuracy meet the second preset condition, and the current neural network model is used as the recognition model.

4. The method according to claim 3, characterized in that, One sample image corresponds to one label; the method for determining the loss function includes: The current sample image is input into the neural network model to obtain the training label corresponding to the current sample image; The loss function is determined based on the calibration label and the training label corresponding to the current sample image.

5. The method according to claim 4, characterized in that, The step of inputting the current sample image into the neural network model to obtain the training label corresponding to the current sample image includes: The current sample image is convolved to obtain initial feature information, and the initial feature information is subjected to feature batch normalization and scaling offset processing to obtain target feature information. The target feature information is subjected to spatial dimensionality reduction, data structure transformation, and feature dimensionality reduction to obtain feature vector information; The feature vector information is subjected to linear transformation and nonlinear activation to obtain nonlinear features, and the nonlinear features are then regularized to obtain regularized features. The regularized features are processed by a prediction head to obtain the training label corresponding to the current sample image.

6. The method according to claim 3, characterized in that, Before obtaining the sample set, the method further includes: Acquire a first type of image and a second type of image, wherein the first type of image includes images of materials on a shelf taken from different shooting angles and different light intensities, and any image in the second type of image has the same background as at least one image in the first type of image; For any first image in the first type of images, perform difference processing on a second image in the second type of images that has the same image background as the first image and the first image to obtain an intermediate image; All intermediate images are binarized to obtain the sample images.

7. The method according to claim 5, characterized in that, The neural network model includes convolutional layers, pooling layers, and fully connected layers; The weights corresponding to the convolutional layer, the pooling layer, and the fully connected layer are updated based on global structured weight decay using the backpropagation algorithm.

8. An inventory update device, characterized in that, The device includes: The interaction module is used to send a shooting command to the image acquisition device after receiving the access control trigger response from the material warehouse, and to receive the image of the current shelf position corresponding to the target material shelf captured by the image acquisition device; The recognition module is used to input the current shelf image into a pre-trained recognition model to obtain the current material information of the target material shelf. The recognition model is a model obtained by training a neural network model with the purpose of extracting material information from the image and using the loss function and learning rate scheduling strategy of the recognition model as optimization indicators. The determination module is used to determine the historical material information of the target material rack based on the identifier of the target material rack; The update module is used to update the inventory information of the material library based on the current material information and the historical material information.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the inventory update method as described in any one of claims 1 to 7.

10. A readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the inventory update method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the inventory update method as described in any one of claims 1 to 7.