Tinyml device inference model update method and related components

By requesting and updating inference model information from the cloud platform through the TinyML device, the problem of low model update efficiency is solved, and an efficient and secure model update process is achieved, which improves the device's learning ability.

CN116070703BActive Publication Date: 2026-03-03SHANDONG INSPUR SCI RES INST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

How to achieve efficient updates to the inference model of TinyML devices, considering the large amount of model data and the need for continuous iterative updates.

Method used

TinyML devices send inference model information retrieval requests to the cloud platform, obtain and determine whether the preset update conditions are met. If they are met, an update request is sent and update information is received. The sliding window mechanism is used to update the model, ensuring improved transmission efficiency and reliability during offline updates.

Benefits of technology

It enables inference model updates for TinyML devices, improves processing efficiency, reduces the need for remote data transmission, enhances data security, and reduces communication energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116070703B_ABST
    Figure CN116070703B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and medium for updating the inference model of a TinyML device, relating to the field of computer technology. The method includes: sending an inference model information acquisition request to a cloud platform, so that the cloud platform generates inference model information corresponding to the inference model based on the inference model information acquisition request; wherein the inference model is a parameter model file required by the TinyML device when performing machine learning inference; acquiring the inference model information returned by the cloud platform, and determining whether a preset update condition is met based on the inference model information; if met, sending an inference model update request to the cloud platform to receive inference model update information returned by the cloud platform based on the inference model update request; and updating the inference model using the inference model update information to obtain an updated inference model. This achieves the updating of the inference model of the TinyML device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for updating the inference model of a TinyML device. Background Technology

[0002] TinyML devices represent the intersection of machine learning and embedded IoT devices. Unlike traditional IoT devices, TinyML devices do not transmit large amounts of data remotely for processing; instead, they possess edge computing capabilities. Therefore, only a small amount of important data and the conclusions derived from machine learning models can be uploaded to the cloud, reducing communication requirements and significantly decreasing cloud data processing time. This also improves data security and reduces energy consumption during communication transmission. The machine learning functionality of TinyML devices requires the support of inference models, which involve large amounts of data and require continuous updates and iterations.

[0003] In summary, how to update the inference model of TinyML devices is a problem that needs to be solved. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for updating the inference model of a TinyML device, capable of updating the inference model of a TinyML device. The specific solution is as follows:

[0005] In a first aspect, this application discloses a method for updating the inference model of a TinyML device, applied to a TinyML device, comprising:

[0006] A request to obtain inference model information is sent to the cloud platform so that the cloud platform can generate inference model information corresponding to the inference model based on the request; wherein, the inference model is a parameter model file required by the TinyML device when performing machine learning inference.

[0007] Obtain the inference model information returned by the cloud platform, and determine whether the preset update conditions are met based on the inference model information;

[0008] If the conditions are met, an inference model update request is sent to the cloud platform so as to receive the inference model update information returned by the cloud platform based on the inference model update request;

[0009] The inference model is updated using the updated information to obtain the updated inference model.

[0010] Optionally, sending the inference model information acquisition request to the cloud platform includes:

[0011] Determine whether the TinyML device is currently in a preset idle state;

[0012] If so, a request to obtain inference model information is sent to the cloud platform.

[0013] Optionally, obtaining the inference model information returned by the cloud platform and determining whether the preset update conditions are met based on the inference model information includes:

[0014] Obtain the inference model information returned by the cloud platform, which includes upgrade information, the identification information of the TinyML device, the model type of the inference model, and the model version number;

[0015] Extract the upgrade information from the inference model information, and determine whether the target flag in the upgrade information is a preset update flag;

[0016] Accordingly, if the condition is met, a reasoning model update request is sent to the cloud platform, including:

[0017] If so, then send an inference model update request to the cloud platform.

[0018] Optionally, sending the inference model update request to the cloud platform, so as to receive the inference model update information returned by the cloud platform based on the inference model update request, includes:

[0019] Send an inference model update request to the cloud platform;

[0020] The cloud platform receives the inference model update information returned by the inference model update request according to the sliding window mechanism, and stores the inference model update information in the backup parameter area.

[0021] Optionally, receiving the inference model update information returned by the cloud platform based on the inference model update request according to the sliding window mechanism, and storing the inference model update information in the backup parameter area, includes:

[0022] The cloud platform generates inference model update information based on the inference model update request, and divides the inference model update information into several data packets;

[0023] Receive the current data packet returned by the cloud platform and perform CRC check on the current data packet;

[0024] If the verification passes, the current data packet is saved to the backup parameter area, and the corresponding confirmation information is sent to the cloud platform so as to receive the next data packet returned by the cloud platform based on the confirmation information.

[0025] Optionally, after updating the inference model using the inference model update information to obtain the updated inference model, the method further includes:

[0026] Update the zone identifier of the backup parameter area and the zone identifier of the running parameter area respectively; wherein, the running parameter area is the parameter area used by the TinyML device during machine learning inference.

[0027] Optionally, updating the inference model using the inference model update information to obtain an updated inference model includes:

[0028] Obtain the preset update time requirement; wherein, the preset update time requirement is divided into immediate update model requirement and delayed update model requirement;

[0029] Based on the preset update time requirement, and using the inference model update information to update the inference model, an updated inference model is obtained.

[0030] Secondly, this application discloses an inference model update apparatus for a TinyML device, applied to a TinyML device, comprising:

[0031] The request sending module is used to send an inference model information acquisition request to the cloud platform, so that the cloud platform can generate inference model information corresponding to the inference model based on the inference model information acquisition request; wherein, the inference model is the parameter model file required by the TinyML device when performing machine learning inference.

[0032] The judgment module is used to obtain the inference model information returned by the cloud platform, and to determine whether the preset update conditions are met based on the inference model information.

[0033] An update information receiving module is used to send an inference model update request to the cloud platform if the conditions are met, so as to receive the inference model update information returned by the cloud platform based on the inference model update request;

[0034] The model update module is used to update the inference model using the inference model update information to obtain the updated inference model.

[0035] Thirdly, this application discloses an electronic device, including:

[0036] Memory, used to store computer programs;

[0037] A processor is configured to execute the computer program to implement the steps of the aforementioned TinyML device inference model update method.

[0038] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned TinyML device inference model update method.

[0039] As can be seen, this application sends an inference model information acquisition request to the cloud platform, so that the cloud platform can generate inference model information corresponding to the inference model based on the inference model information acquisition request; wherein, the inference model is the parameter model file required by the TinyML device when performing machine learning inference; the inference model information returned by the cloud platform is acquired, and it is determined whether the preset update conditions are met based on the inference model information; if they are met, an inference model update request is sent to the cloud platform, so as to receive the inference model update information returned by the cloud platform based on the inference model update request; the inference model is updated using the inference model update information to obtain the updated inference model. Therefore, in this application, the TinyML device sends an inference model information acquisition request to the cloud platform, thereby acquiring the inference model information returned by the cloud platform. If it is determined based on the inference model information that the preset update conditions are met, the inference model is updated using the inference model update information returned by the cloud platform based on the inference model update request to obtain the updated inference model. The updated inference model can then be used for inference calculations, allowing the TinyML device to complete the corresponding learning tasks without transmitting data to a remote location, thus improving processing efficiency. Attached Figure Description

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

[0041] Figure 1 This is a flowchart of a method for updating the inference model of a TinyML device disclosed in this application;

[0042] Figure 2 This is a schematic diagram illustrating a specific inference model update disclosed in this application;

[0043] Figure 3 This application discloses a flowchart of a specific TinyML device inference model update method.

[0044] Figure 4 This is a schematic diagram of the inference model updating device for a TinyML device disclosed in this application.

[0045] Figure 5This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0047] TinyML devices represent the intersection of machine learning and embedded IoT devices. Unlike traditional IoT devices, TinyML devices do not transmit large amounts of data remotely for processing; instead, they possess edge computing capabilities. Therefore, only a small amount of important data and the conclusions derived from machine learning models can be uploaded to the cloud, reducing communication requirements and significantly decreasing cloud data processing time. This also improves data security and reduces energy consumption during communication transmission. The machine learning functionality of TinyML devices requires the support of inference models, which involve large amounts of data and require continuous updates and iterations.

[0048] Therefore, this application provides a scheme for updating the inference model of TinyML devices, which can realize the updating of the inference model of TinyML devices.

[0049] See Figure 1 As shown in the figure, this application discloses an inference model update method for TinyML devices, applied to TinyML devices, the method including:

[0050] Step S11: Send an inference model information acquisition request to the cloud platform so that the cloud platform can generate inference model information corresponding to the inference model based on the inference model information acquisition request; wherein, the inference model is the parameter model file required by the TinyML device when performing machine learning inference.

[0051] In this embodiment, sending the inference model information acquisition request to the cloud platform includes: determining whether the TinyML device is currently in a preset idle state; if so, sending the inference model information acquisition request to the cloud platform. The preset idle state of the TinyML device refers to the state in which the TinyML device currently has no learning tasks to execute.

[0052] It is important to note that before sending the inference model information retrieval request to the cloud platform, the TinyML device does not know which inference model needs to be updated. Therefore, the TinyML device sends the inference model information retrieval request to the cloud platform in order to obtain the model type and model version number of the inference model that needs to be updated. The inference model information retrieval request includes the TinyML device's identification information (ID, i.e., Identity document).

[0053] Step S12: Obtain the inference model information returned by the cloud platform, and determine whether the preset update conditions are met based on the inference model information.

[0054] In this embodiment, obtaining the inference model information returned by the cloud platform and determining whether the preset update conditions are met based on the inference model information includes: obtaining the inference model information returned by the cloud platform, which includes upgrade information, the identification information of the TinyML device, the model type of the inference model, and the model version number; extracting the upgrade information from the inference model information and determining whether the target flag in the upgrade information is a preset update flag. The upgrade information includes a target flag indicating whether to update this time. For example, if the preset update flag is TRUE, that is, if the target flag is TRUE, it indicates that there are updatable model files, and the subsequent process can continue. If the target flag is FALSE, it indicates that the model files in the TinyML device do not need to be updated.

[0055] Step S13: If satisfied, send an inference model update request to the cloud platform so as to receive the inference model update information returned by the cloud platform based on the inference model update request.

[0056] It is understandable, for example Figure 2 The diagram illustrates a specific inference model update. The step of sending an inference model update request to the cloud platform if a certain condition is met includes: if so, sending an inference model update request to the cloud platform. The inference model update request includes the TinyML device's identification information, the inference model's model type, and the model version number.

[0057] Step S14: Update the inference model using the inference model update information to obtain the updated inference model.

[0058] In this embodiment, updating the inference model using the inference model update information to obtain an updated inference model includes: obtaining a preset update time requirement; wherein, the preset update time requirement is divided into an immediate update model requirement and a delayed update model requirement; and updating the inference model based on the preset update time requirement and using the inference model update information to obtain an updated inference model. An immediate update model requirement, for example, means that the TinyML device updates the inference model using the inference model update information returned by the cloud platform based on the inference model update request. A delayed update model requirement, for example, means that the TinyML device updates the inference model using the inference model update information 10 seconds after receiving the inference model update information returned by the cloud platform based on the inference model update request.

[0059] As can be seen, this application sends an inference model information acquisition request to the cloud platform, so that the cloud platform can generate inference model information corresponding to the inference model based on the inference model information acquisition request; wherein, the inference model is the parameter model file required by the TinyML device when performing machine learning inference; the inference model information returned by the cloud platform is acquired, and it is determined whether the preset update conditions are met based on the inference model information; if they are met, an inference model update request is sent to the cloud platform, so as to receive the inference model update information returned by the cloud platform based on the inference model update request; the inference model is updated using the inference model update information to obtain the updated inference model. Therefore, in this application, the TinyML device sends an inference model information acquisition request to the cloud platform, thereby acquiring the inference model information returned by the cloud platform. If it is determined based on the inference model information that the preset update conditions are met, the inference model is updated using the inference model update information returned by the cloud platform based on the inference model update request to obtain the updated inference model. The updated inference model can then be used for inference calculations, allowing the TinyML device to complete the corresponding learning tasks without transmitting data to a remote location, thus improving processing efficiency.

[0060] See Figure 3 As shown, this application discloses a specific method for updating the inference model of a TinyML device, applied to a TinyML device. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:

[0061] Step S21: Send an inference model information acquisition request to the cloud platform so that the cloud platform can generate inference model information corresponding to the inference model based on the inference model information acquisition request; wherein, the inference model is the parameter model file required by the TinyML device when performing machine learning inference.

[0062] Step S22: Obtain the inference model information returned by the cloud platform, and determine whether the preset update conditions are met based on the inference model information.

[0063] Step S23: If satisfied, send an inference model update request to the cloud platform; receive the inference model update information returned by the cloud platform based on the inference model update request according to the sliding window mechanism, and store the inference model update information in the backup parameter area.

[0064] In this embodiment, receiving the inference model update information returned by the cloud platform based on the inference model update request according to the sliding window mechanism, and storing the inference model update information in the backup parameter area, includes: generating inference model update information by the cloud platform based on the inference model update request, and dividing the inference model update information into several data packets; receiving the current data packet returned by the cloud platform, and performing CRC verification on the current data packet; if the verification passes, saving the current data packet to the backup parameter area, and sending the generated corresponding confirmation information to the cloud platform so as to receive the next data packet returned by the cloud platform based on the confirmation information.

[0065] Currently, when devices interact with cloud platforms, they typically transmit data in frames, requiring device confirmation before sending the next frame, resulting in low efficiency. In this embodiment, the inference model update information is divided into several data packets, for example, each containing 20 to 50 frames of data. Sending one data packet at a time significantly reduces the time required for device confirmation, thereby improving transmission efficiency.

[0066] Understandably, before sending the current data packet, the cloud platform needs to generate a first checksum corresponding to the current data packet based on CRC (Cyclic Redundancy Check). The cloud platform then sends the current data packet and the first checksum to the TinyML device. The TinyML device receives the current data packet and the first checksum, generates a second checksum corresponding to the received current data packet based on CRC, and determines whether the first checksum and the second checksum match. If they match, the verification is successful, and a corresponding confirmation message is generated and sent to the cloud platform. The cloud platform then sends the next data packet to the TinyML device based on the confirmation message.

[0067] Step S24: Update the inference model using the inference model update information to obtain the updated inference model.

[0068] In this embodiment, after updating the inference model using the inference model update information to obtain the updated inference model, the method further includes: updating the region identifier of the backup parameter area and the region identifier of the running parameter area respectively; wherein, the running parameter area is the parameter area used by the TinyML device during machine learning inference. Before updating the region identifiers of the backup parameter area and the running parameter area, the region identifier of the backup parameter area is, for example, the Bak identifier, and the region identifier of the running parameter area is, for example, the Run identifier. After the update, the region identifier of the backup parameter area is the Run identifier, and the region identifier of the running parameter area is the Bak identifier.

[0069] The inference model is updated using the updated information. After obtaining the updated inference model, if the TinyML device needs to perform a corresponding learning task, it can use the updated inference model for inference calculations to complete the target task. It is important to note that this embodiment allows for online inference model updates. During the update, the area identifiers of the backup parameter area and the running parameter area need to be swapped. Before the update, the TinyML device uses the running parameter area; after the update, it uses the backup parameter area. This alternating use of the two parameter areas achieves the goal of online inference model updates.

[0070] Therefore, it can be seen that the TinyML device of this application receives the inference model update information returned by the cloud platform based on the inference model update request according to the sliding window mechanism, which improves the transmission efficiency between the TinyML device and the cloud platform. The alternating use of the dual parameter area improves the reliability of the inference model update.

[0071] See Figure 4 As shown in the figure, this application discloses an inference model update apparatus for a TinyML device, applied to a TinyML device, comprising:

[0072] The request sending module 11 is used to send an inference model information acquisition request to the cloud platform, so that the cloud platform can generate inference model information corresponding to the inference model based on the inference model information acquisition request; wherein, the inference model is the parameter model file required by the TinyML device when performing machine learning inference.

[0073] The judgment module 12 is used to obtain the inference model information returned by the cloud platform, and to determine whether the preset update conditions are met based on the inference model information.

[0074] The update information receiving module 13 is used to send an inference model update request to the cloud platform if the conditions are met, so as to receive the inference model update information returned by the cloud platform based on the inference model update request;

[0075] The model update module 14 is used to update the inference model using the inference model update information to obtain the updated inference model.

[0076] As can be seen, this application sends an inference model information acquisition request to the cloud platform, so that the cloud platform can generate inference model information corresponding to the inference model based on the inference model information acquisition request; wherein, the inference model is the parameter model file required by the TinyML device when performing machine learning inference; the inference model information returned by the cloud platform is acquired, and it is determined whether the preset update conditions are met based on the inference model information; if they are met, an inference model update request is sent to the cloud platform, so as to receive the inference model update information returned by the cloud platform based on the inference model update request; the inference model is updated using the inference model update information to obtain the updated inference model. Therefore, in this application, the TinyML device sends an inference model information acquisition request to the cloud platform, thereby acquiring the inference model information returned by the cloud platform. If it is determined based on the inference model information that the preset update conditions are met, the inference model is updated using the inference model update information returned by the cloud platform based on the inference model update request to obtain the updated inference model. The updated inference model can then be used for inference calculations, allowing the TinyML device to complete the corresponding learning tasks without transmitting data to a remote location, thus improving processing efficiency.

[0077] Furthermore, embodiments of this application also provide an electronic device. Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0078] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the TinyML device inference model update method executed by the electronic device as disclosed in any of the foregoing embodiments.

[0079] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0080] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0081] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.

[0082] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the TinyML device inference model update method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0083] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the method steps performed during the inference model update process of the TinyML device disclosed in any of the foregoing embodiments.

[0084] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0085] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0086] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0087] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0088] The foregoing has provided a detailed description of the inference model update method, apparatus, device, and storage medium for TinyML devices provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for updating the inference model of a TinyML device, characterized in that, Applied to TinyML devices, including: A request to obtain inference model information is sent to the cloud platform so that the cloud platform can generate inference model information corresponding to the inference model based on the request; wherein, the inference model is a parameter model file required by the TinyML device when performing machine learning inference. Obtain the inference model information returned by the cloud platform, and determine whether the preset update conditions are met based on the inference model information; If the conditions are met, an inference model update request is sent to the cloud platform so as to receive the inference model update information returned by the cloud platform based on the inference model update request; The inference model is updated using the inference model update information to obtain the updated inference model; The step of obtaining the inference model information returned by the cloud platform and determining whether the preset update conditions are met based on the inference model information includes: Obtain the inference model information returned by the cloud platform, which includes upgrade information, the identification information of the TinyML device, the model type of the inference model, and the model version number; extract the upgrade information from the inference model information, and determine whether the target flag in the upgrade information is a preset update flag; Accordingly, if the condition is met, a reasoning model update request is sent to the cloud platform, including: If so, then send an inference model update request to the cloud platform; Sending the inference model update request to the cloud platform, so as to receive the inference model update information returned by the cloud platform based on the inference model update request, includes: Send an inference model update request to the cloud platform; receive the inference model update information returned by the cloud platform based on the inference model update request according to the sliding window mechanism, and store the inference model update information in the backup parameter area; After updating the inference model using the inference model update information to obtain the updated inference model, the method further includes: The area identifiers of the backup parameter area and the running parameter area are interchanged; wherein, the running parameter area is the parameter area used by the TinyML device during machine learning inference.

2. The inference model update method for TinyML devices according to claim 1, characterized in that, Sending the inference model information acquisition request to the cloud platform includes: Determine whether the TinyML device is currently in a preset idle state; If so, a request to obtain inference model information is sent to the cloud platform.

3. The inference model update method for TinyML devices according to claim 1, characterized in that, The step of receiving the inference model update information returned by the cloud platform based on the inference model update request according to the sliding window mechanism, and storing the inference model update information in the backup parameter area, includes: The cloud platform generates inference model update information based on the inference model update request, and divides the inference model update information into several data packets; Receive the current data packet returned by the cloud platform and perform CRC check on the current data packet; If the verification passes, the current data packet is saved to the backup parameter area, and the corresponding confirmation information is sent to the cloud platform so as to receive the next data packet returned by the cloud platform based on the confirmation information.

4. The inference model update method for TinyML devices according to any one of claims 1 to 3, characterized in that, The step of updating the inference model using the inference model update information to obtain the updated inference model includes: Obtain the preset update time requirement; wherein, the preset update time requirement is divided into immediate update model requirement and delayed update model requirement; Based on the preset update time requirement, and using the inference model update information to update the inference model, an updated inference model is obtained.

5. A reasoning model update device for a TinyML device, characterized in that, Applied to TinyML devices, including: The request sending module is used to send an inference model information acquisition request to the cloud platform, so that the cloud platform can generate inference model information corresponding to the inference model based on the inference model information acquisition request; wherein, the inference model is the parameter model file required by the TinyML device when performing machine learning inference. The judgment module is used to obtain the inference model information returned by the cloud platform, and determine whether the preset update conditions are met based on the inference model information. An update information receiving module is used to send an inference model update request to the cloud platform if the conditions are met, so as to receive the inference model update information returned by the cloud platform based on the inference model update request; The model update module is used to update the inference model using the inference model update information to obtain the updated inference model; The judgment module is specifically used for: Obtain the inference model information returned by the cloud platform, which includes upgrade information, the identification information of the TinyML device, the model type of the inference model, and the model version number; extract the upgrade information from the inference model information, and determine whether the target flag in the upgrade information is a preset update flag; Accordingly, the update information receiving module is specifically used for: If so, then send an inference model update request to the cloud platform; The update information receiving module includes: Send an inference model update request to the cloud platform; receive the inference model update information returned by the cloud platform based on the inference model update request according to the sliding window mechanism, and store the inference model update information in the backup parameter area; The inference model update device of the TinyML device is specifically used for: The area identifiers of the backup parameter area and the running parameter area are interchanged; wherein, the running parameter area is the parameter area used by the TinyML device during machine learning inference.

6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the inference model update method for the TinyML device as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the inference model update method for the TinyML device as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Embedded software on-line updating method

    CN101807155A

  • Method and apparatus for cloud monitoring based on edge computing, electronic device, and storage medium

    WO2021151279A1

  • System updating method and apparatus, electronic device, and computer readable storage medium

    WO2021249266A1