CN118193029A - Remote upgrading method and system for micro memory device - Google Patents

Remote upgrading method and system for micro memory device Download PDF

Info

Publication number
CN118193029A
CN118193029A CN202311344787.9A CN202311344787A CN118193029A CN 118193029 A CN118193029 A CN 118193029A CN 202311344787 A CN202311344787 A CN 202311344787A CN 118193029 A CN118193029 A CN 118193029A
Authority
CN
China
Prior art keywords
upgrade
data block
memory device
micro
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311344787.9A
Other languages
Chinese (zh)
Inventor
徐小冰
李桃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neolix Technologies Co Ltd
Original Assignee
Neolix Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Neolix Technologies Co Ltd filed Critical Neolix Technologies Co Ltd
Priority to CN202311344787.9A priority Critical patent/CN118193029A/en
Publication of CN118193029A publication Critical patent/CN118193029A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a remote upgrading method and a system of micro memory equipment, wherein the method comprises the following steps: receiving upgrade version information issued by a server; acquiring a plurality of upgrading data blocks corresponding to the version numbers from a server, and sequentially storing each upgrading data block in an external memory through the residual memory of the micro memory device; determining the state of a flag bit to be upgraded in an external memory when the micro memory device is restarted, acquiring upgrade version information if the flag bit to be upgraded is set, and performing data verification on the whole upgrade data corresponding to a plurality of upgrade data blocks according to the upgrade version information; and if the data verification is successful, the application program area of the micro memory device is erased, and upgrade data is copied to the application program area in a segmented mode from the external memory, so that remote upgrade of the micro memory device is completed. By adopting the remote upgrading method and the remote upgrading system for the micro memory device, the problem that upgrading is easy to fail due to insufficient residual memory when the micro memory device is upgraded is solved.

Description

Remote upgrading method and system for micro memory device
Technical Field
The application relates to the technical field of system upgrading, in particular to a remote upgrading method and system for micro memory equipment.
Background
With the continuous development of internet of things technology, more and more devices and systems need to be remotely upgraded to maintain the security and functionality thereof. OTA (Over-the-Air) upgrade technology is a method for remotely upgrading firmware or software through a wireless network, and has become a widely applied technology in the fields of modern industry, intelligent home, automobiles and the like.
Currently, in the process of OTA upgrade, if the memory of the device to be upgraded is large, for example: the memory of the device to be upgraded is several times larger than the memory required by the upgrade package, so that the memory problem during OTA upgrade is not needed to be considered. However, when the device to be upgraded is a micro memory device, for example: sorting equipment with memory of only 192KB in the logistics industry has the problems that because the memory of the equipment is smaller, when the sorting equipment is running, most memory is occupied when the system normally runs, for example, 100KB, and the remaining memory is insufficient for upgrading an upgrade package of more than 92KB at one time, so that the upgrade is easy to fail.
Disclosure of Invention
Accordingly, the present application is directed to a method and a system for remote upgrade of a micro memory device, so as to solve the problem that the upgrade is easy to fail due to insufficient remaining memory when the micro memory device is upgraded.
In a first aspect, an embodiment of the present application provides a remote upgrade method for a micro memory device, which is applied to the micro memory device, including:
receiving upgrade version information issued by a server in response to a version information reporting behavior of the micro memory device, wherein the upgrade version information comprises a version number;
Acquiring a plurality of upgrading data blocks corresponding to the version numbers from a server, and sequentially storing each upgrading data block in an external memory through the residual memory of the micro memory device;
Determining the state of a flag bit to be upgraded when the micro memory device is restarted, acquiring upgrade version information if the flag bit to be upgraded in the external memory is set, and performing data verification on the whole upgrade data corresponding to the plurality of upgrade data blocks according to the upgrade version information;
and if the data verification is successful, the application program area of the micro memory device is erased, and upgrade data is copied to the application program area in a segmented mode from the external memory, so that remote upgrade of the micro memory device is completed.
Optionally, obtaining a plurality of upgrade data blocks corresponding to the version numbers from the server, and sequentially storing each upgrade data block in the external memory through the remaining memory of the micro memory device, including: receiving a target upgrading data block issued by a server according to a version number and an address offset in a data downloading request, wherein the data downloading request is a request which is actively initiated by micro memory equipment to the server and aims at the target upgrading data block; storing the target upgrade data block in the remaining memory of the micro memory device; acquiring a target upgrading data block from the residual memory, and storing the acquired target upgrading data block in an external memory; determining whether the target upgrade data block is the last upgrade data block; if the current upgrade data block is not the last upgrade data block, taking the next upgrade data block as a target upgrade data block, actively initiating a data downloading request aiming at the target upgrade data block to a server, and acquiring a new target upgrade data block until all upgrade data blocks under the version number are acquired.
Optionally, storing the acquired target upgrade data block in an external memory, including: verifying the target upgrading data block; after the verification is passed, determining the storage address of the target upgrading data block; and storing the target upgrading data block into an external memory according to the storage address through the serial peripheral interface.
Optionally, before acquiring the upgrade version information if the flag bit to be upgraded in the external memory is set, the method further includes: acquiring a flag bit to be upgraded in an external memory through a serial peripheral interface; and determining whether a flag bit to be upgraded is set.
Optionally, after performing data verification on the entire upgrade data corresponding to the plurality of upgrade data blocks according to the upgrade version information, the method further includes: if the data check fails, the boot loader jumps to the application program area to finish the upgrade.
Optionally, after determining whether the target upgrade data block is the last upgrade data block, further comprising: checking the upgrade data corresponding to all the upgrade data blocks in the external memory to determine whether the upgrade data is legal; and if the flag bit is legal, setting the flag bit to be upgraded of the external memory.
Optionally, before receiving the upgrade version information issued by the server in response to the version information reporting action of the micro memory device, the method further includes: establishing connection with a server when power is on each time; and if the connection with the server is successful, actively reporting the version information of the micro memory device.
Optionally, the micro memory device is a device in which a ratio of a device memory to memory occupied by the plurality of upgrade data blocks is less than a set threshold.
Optionally, the micro memory device comprises a plurality.
In a second aspect, an embodiment of the present application further provides a remote upgrade system for a micro memory device, where the system includes:
the server is used for storing the upgrade data and the upgrade version information, segmenting the upgrade data to obtain a plurality of upgrade data blocks, and issuing the upgrade data blocks corresponding to the data downloading request;
And the plurality of micro memory devices are used for executing the steps of the remote upgrading method of the micro memory devices.
The embodiment of the application has the following beneficial effects:
According to the remote upgrading method and system for the micro memory device, each upgrading data block can be sequentially stored in the external memory through the residual memory of the micro memory device, the problem that upgrading is easy to fail due to insufficient residual memory when the micro memory device is upgraded is solved, and the situation that all upgrading data are put into the memory at one time and then copied into an application program area from the external memory to finish upgrading under the condition of data verification is avoided.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for remote upgrade of a micro memory device according to an embodiment of the present application;
Fig. 2 is a schematic structural diagram of a remote upgrade apparatus for a micro memory device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, every other embodiment obtained by a person skilled in the art without making any inventive effort falls within the scope of protection of the present application.
It is worth noting that, before the present application proposes, as the technology of internet of things is continuously developed, more and more devices and systems need to be remotely upgraded to maintain the security and functionality thereof. OTA (Over-the-Air) upgrading technology is an important Internet of things technology, and a method for remotely upgrading firmware or software through a wireless network has become a widely applied technology in the fields of modern industry, intelligent home, automobiles and the like. Currently, in the process of OTA upgrade, if the memory of the device to be upgraded is large, for example: the memory of the device to be upgraded is several times larger than the memory required by the upgrade package, so that the memory problem during OTA upgrade is not needed to be considered. However, when the device to be upgraded is a micro memory device, for example: sorting equipment with memory of only 192KB in the logistics industry has the problems that because the memory of the equipment is smaller, when the sorting equipment is running, most memory is occupied when the system normally runs, for example, 100KB, and the remaining memory is insufficient for upgrading an upgrade package of more than 92KB at one time, so that the upgrade is easy to fail. In addition, when there are a plurality of micro memory devices, upgrading each micro memory device manually consumes a lot of time, and also causes a problem of low upgrading efficiency.
Based on the above, the embodiment of the application provides a remote upgrading method of micro memory equipment, so as to reduce the failure probability of upgrading the micro memory equipment and improve the upgrading efficiency.
Referring to fig. 1, fig. 1 is a flowchart of a remote upgrade method of a micro memory device according to an embodiment of the present application. As shown in fig. 1, a remote upgrade method for a micro memory device according to an embodiment of the present application is applied to a micro memory device, and includes:
step S101, receiving upgrade version information issued by a server in response to a version information reporting action of the micro memory device.
In this step, the server is configured to store the upgrade data and the upgrade version information, and further configured to segment the upgrade data, and issue an upgrade data block corresponding to the data download request.
The total memory of the micro memory device is low, and when the micro memory device operates normally, the micro memory device control system occupies more memory, and the rest memory is insufficient for installing upgrade data at one time.
The micro memory device is a device in which the ratio of the device memory to the memory occupied by the plurality of upgrade data blocks is smaller than a set threshold. The micro memory device may be a sorting trolley with a total memory of 192KB, the micro memory device adopts a 32-bit singlechip, the memory occupied by the micro memory device is 100KB when the micro memory device operates normally, the remaining memory is 92KB, the memory occupied by the plurality of upgrading data blocks may be 192KB, and since the memory occupied by the plurality of upgrading data blocks is larger than the remaining memory, all the upgrading data cannot be downloaded, the sorting trolley may be regarded as the micro memory device at this time, that is, the threshold value is set to 192/192=1.
In the embodiment of the application, a user can upload the latest upgrade data to the server through the Web interface by using the HTTP protocol, and the uploaded data also comprises a version number, the size of the upgrade data (upgrade package) and a check code of the upgrade data. The method comprises the steps of taking a check code of the whole upgrade data uploaded by a user as a first check code, taking a check code obtained by calculating the received upgrade data by a server as a second check code, taking a version number uploaded by the user as a first version number, and taking a version number in the upgrade data as a second version number. Here, the check code may be an MD5 code or a CRC check code, which is not limited herein.
The server receives the data uploaded by the user and calculates a second check code of the received upgrade data. Then, the second check code is compared with the first check code, and the second version number is compared with the first version number. If the first check code is matched with the second check code and the second version number is matched with the first version number, determining that the check is passed, and storing the upgrade data and the latest upgrade version information which pass the check in a database.
The micro memory device actively reports the current version information to the server, and the message type corresponding to the current version information is 1. After receiving the reported current version information, the server responds to the version information reporting behavior, compares the current version number in the current version information with the latest version number stored in the server, and determines whether the micro memory device needs to be upgraded. If the current version number is lower than the latest version number, which indicates that the micro-memory device needs to be upgraded, the server sets the flag bit for the upgrade to 1. Otherwise, the micro memory device does not need to be upgraded, and the server sets the flag bit needing to be upgraded to 0.
The server transmits upgrade version information comprising a version number, data uploading time, a check code and a required upgrade flag bit to the micro memory device, and the message type of the upgrade version information is 2. And the micro memory device receives the upgrade version information issued by the server, and performs subsequent processing according to the upgrade version information so as to upgrade the hardware or software of the micro memory device.
It should be noted that, the current version information sent by the micro memory device to the server and the upgrade version information sent by the server to the micro memory device both include a hardware version number and a software version number, that is, the messages with message types 1 and 2 both include a hardware version number and a software version number.
In an alternative embodiment, before performing step S101, the method further includes:
and a step a1, establishing connection with a server when power is on each time.
After each power-on of the micro memory device, the micro memory device actively establishes a connection with a server through the internet or a local area network, for example: the connection with the server can be established through WIFI, bluetooth and the like.
And a2, if the connection with the server is successful, actively reporting the version information of the micro memory device.
If the micro memory device is successfully connected with the server, the micro memory device actively reports the current version information to the server.
Step S102, a plurality of upgrading data blocks corresponding to the version numbers are obtained from the server, and each upgrading data block is sequentially stored in an external memory through the residual memory of the micro memory device.
In this step, the upgrade data block may refer to a data block obtained after the upgrade data is segmented. Illustratively, the upgrade data is 192KB in total, and the upgrade data is split into 48 upgrade data blocks, each of which is 4KB. Wherein 4KB is a set value, the value size can be dynamically configured in a server, and a person skilled in the art can determine the set value size according to actual conditions, and the application is not limited herein.
The external memory may be referred to as FLASH memory.
In the embodiment of the application, the micro memory device acquires one upgrade data block from the server each time, the acquired upgrade data block is firstly stored in the residual memory of the micro memory device, and then the upgrade data block is extracted from the residual memory and is stored in FLASH.
Taking the above example as an example, the micro memory device obtains the first upgrade data block with the size of 4KB from the server, then puts the first upgrade data block into the remaining memory of the micro memory device for storage, and then transfers the remaining memory into the FLASH for storage. Then, a second upgrading data block with the size of 4KB is obtained from the server, the second upgrading data block is put into the residual memory of the micro memory device for storage, and then the residual memory is transferred into FLASH for storage. And repeating the storage process until all 48 upgrading data blocks are stored in the FLASH.
In an alternative embodiment, step S102 includes: steps b1 to b5.
And step b1, receiving a target upgrading data block issued by the server according to the version number and the address offset in the data downloading request.
Here, the data download request is a request for a target upgrade data block that the micro memory device actively initiates to the server.
After receiving the upgrade version information issued by the server, the micro memory device judges whether the flag bit to be upgraded is set to 1. If the upgrade flag bit is required to be 1, which indicates that there is upgradeable data, the micro memory device actively sends a data download request to the server, and the message type of the data download request is 3. If the required upgrade flag bit is 0, indicating that no upgradeable data exists, a data downloading request is not sent to the server, and the upgrade process is directly ended. The data downloading request comprises a version number and an address offset of upgrade data.
In addition, if an exception occurs when the micro memory device receives an upgrade data block issued by the server, for example: when the network is disconnected or the device runs and is restarted, the micro memory device can continuously apply for subsequent upgrade data at the position where the abnormality occurs after restarting, namely, starting from the upgrade data block which is successfully written into FLASH recently, applying for the next upgrade data block, so as to reduce unnecessary data retransmission and reduce the erasing frequency of the external memory. In specific implementation, only the version number and the offset corresponding to the upgrade data block which is successfully written into the FLASH recently are required to be sent to the server as the data downloading request.
After receiving the data downloading request sent by the micro memory device, the server segments the upgrade data according to the address offset and the set data block segmentation size.
Taking a single upgrade process as an example, the micro memory device initiates a data download request to the server for the first time, and because the address offset in the first data download request is 0, the server determines upgrade data according to the version number, segments the first 4KB of the upgrade data into a first upgrade data block, and then sends the first upgrade data block as a target upgrade data block to the micro memory device. After the micro memory device receives the first upgrade data block, a data downloading request is initiated to the server for the second time, and because the address offset in the second data downloading request is 4KB, the server determines upgrade data according to the version number, cuts 5KB to 8KB of the upgrade data into second upgrade data blocks, and then sends the second upgrade data blocks as target upgrade data blocks to the micro memory device, and the message type of the sent target upgrade data blocks is 4. And the like, until the server transmits 48 upgrading data blocks corresponding to all the upgrading data to the micro memory device, the micro memory device also transmits 48 data downloading requests to the server in total.
It should be noted that, after the server obtains one upgrade data block by splitting, upgrade data block information may be constructed, for example: and calculating a check code corresponding to the upgrading data block, and determining whether the data block ID, the data block size, the data block initial byte ID and the last upgrading data block are obtained. When the upgrade data block is issued, the server issues the check code of the current upgrade data block, the check code corresponding to the whole upgrade data, the size of the current upgrade data block and the information of the final data block flag bit to the micro memory device. The upgrading data block is in the form of binary numbers, and the final data block flag bit is used for representing whether the current upgrading data block is the last upgrading data block in the current upgrading.
And b2, storing the target upgrading data block in the residual memory of the micro memory device.
Here, if the remaining memory of the micro memory device is 92KB, the micro memory device stores the target upgrade data block of 4KB in 92KB after receiving the target upgrade data block of 4 KB.
And b3, acquiring a target upgrading data block from the residual memory, and storing the acquired target upgrading data block in an external memory.
And acquiring a storage address, and transferring the target upgrading data block of 4KB from the residual memory of 92KB into FLASH for storage according to the storage address.
Step b4, determining whether the target upgrade data block is the last upgrade data block.
After a target upgrading data block is stored into FLASH, a final data block flag bit corresponding to the target upgrading data block is obtained, and if the final data block flag bit is 1, the target upgrading data block is the last upgrading data block; if the final data block flag bit is 0, it indicates that the target upgrade data block is not the last upgrade data block.
And b5, if the current upgrade data block is not the last upgrade data block, taking the next upgrade data block as a target upgrade data block, actively initiating a data downloading request aiming at the target upgrade data block to a server, and acquiring a new target upgrade data block until all the upgrade data blocks under the version number are acquired.
If the target upgrade data block is not the last upgrade data block, continuing to send a data download request to the server to obtain the next upgrade data block. And circularly executing the steps until all the upgrading data blocks are acquired.
If the target upgrade data block is the last upgrade data block, step b6 is performed.
In an alternative embodiment, step b3 includes: step b31 to step b33.
And b31, checking the target upgrading data block.
The micro memory device calculates a check code of the received target upgrading data block, compares the check code with a check code of the target upgrading data block issued by the server, and determines that the target upgrading data block passes the check if the comparison is successful; if the comparison is unsuccessful, determining that the target upgrading data block fails to pass the verification, and re-acquiring the target data block.
And step b32, after the verification is passed, determining the storage address of the target upgrading data block.
If the target upgrading data block passes the verification, acquiring a starting address for storing the target upgrading data block from the FLASH, and calculating the storage address of the current target upgrading data block according to the starting address, the number of the stored upgrading data blocks and the size of each upgrading data block stored in the FLASH.
And b33, storing the target upgrading data block into an external memory according to the storage address through the serial peripheral interface.
And storing the target upgrading data block in the FLASH according to the position indicated by the storage address through the SPI (Serial Peripheral Interface) interface.
In an alternative embodiment, after step b4, further comprising: step b6 and step b7.
And b6, checking the upgrade data corresponding to all the upgrade data blocks in the external memory, and determining whether the upgrade data is legal or not.
Reading all the upgrading data blocks in the FLASH to obtain the whole upgrading data, calculating the check code of the whole upgrading data, comparing the calculated check code with the check code corresponding to the whole upgrading data issued by the server, and determining whether the upgrading data are legal or not. If the comparison is successful, the upgrade data is determined to be legal, and if the comparison is unsuccessful, the upgrade data is determined to be illegal.
And b7, if the flag bit is legal, setting the flag bit to be upgraded of the external memory.
If the upgrade data is legal, setting the flag bit to be upgraded in FLASH to be 1; if the upgrade data is illegal, the flag bit to be upgraded in the FLASH is set to 0.
Step S103, when the micro memory device is restarted, determining the state of the flag bit to be upgraded in the external memory, if the flag bit to be upgraded in the external memory is set, acquiring upgrade version information, and performing data verification on the whole upgrade data corresponding to the plurality of upgrade data blocks according to the upgrade version information.
In the step, after the singlechip in the micro memory device is powered on and started each time, the singlechip firstly enters a Boot Loader (Boot Loader), and then initializes an external memory FLASH, including initializing a clock, a serial port and a serial peripheral interface SPI.
Acquiring the state of the flag bit to be upgraded from the FLASH of the external memory through the SPI, determining whether the flag bit to be upgraded is set, and if the flag bit to be upgraded is 1, indicating that the flag bit to be upgraded is set; and if the flag bit to be upgraded is 0, indicating that the flag bit to be upgraded is not set. If the flag bit to be upgraded is set, entering an upgrading process; if the flag bit to be upgraded is not set, entering a boot loader, and jumping to an application program area through the boot loader.
It should be noted that, after the micro memory device is restarted and powered on and the memory of the micro memory device is emptied, the determination as to whether to enter the upgrade process is performed, and whether to enter the upgrade process is determined according to the state of the flag bit to be upgraded.
In the upgrading process, a storage address of upgrading data in an external memory and upgrading version information issued by a server are obtained. And calculating the check code of the upgrade data again, comparing the calculated check code with the check code in the upgrade version information, and simultaneously comparing the version number, the upgrade data size, the hardware version number and the software version number. If the check code, the version number, the upgrade data size, the hardware version number and the software version number are all successfully compared, the data check is determined to be successful, and step S104 is executed; if any item of comparison fails, determining that the data check fails, and executing step d1.
In an alternative embodiment, before step S103, the method further includes: step c1 and step c2.
And step c1, obtaining a flag bit to be upgraded in an external memory through a serial peripheral interface.
Step c2, determining whether the upgrade flag bit is set.
In an alternative embodiment, after step S103, the method further includes: step d1.
Step d1, if the data check fails, the boot loader jumps to the application program area to finish the upgrade.
If the data check fails, the data downloading process is indicated to have errors, then a boot loader is entered, the boot loader jumps to an application program area, and the upgrade is ended.
Step S104, if the data verification is successful, the application program area of the micro memory device is erased, upgrade data is copied from the external memory to the application program area in a segmented mode, and remote upgrade of the micro memory device is completed.
In the step, if the data check is successful, it is indicated that the upgrade data issued by the server is completely received and stored in the external memory, and the upgrade can be performed. And then, all application program areas of the micro memory device are erased, upgrade data are copied to the application program areas from an external memory through SPI segmentation, state verification is carried out after copying is completed, and verification is carried out on the system state, the sensor state, whether an alarm exists or not and the like.
If the verification is passed, entering a boot loader, jumping to an application program area through the boot loader, wherein the upgrade is finished at the moment, and the micro memory device operates according to the upgraded version. If the verification fails, the upgrade data is re-copied.
In an alternative embodiment, the micro-memory device includes a plurality of micro-memory devices.
Here, a plurality of micro memory devices may be simultaneously upgraded, for example: and meanwhile, 20 or 30 micro memory devices are upgraded without the need of a technician to upgrade the micro memory devices one by one, so that the upgrade efficiency of a plurality of micro memory devices is improved. The upgrade mode of each micro memory device is the same, and will not be described in detail here.
Compared with the remote upgrading method of the micro memory device in the prior art, the remote upgrading method of the micro memory device can sequentially store each upgrading data block in the external memory through the residual memory of the micro memory device, avoids that all the upgrading data are put into the memory at one time, and then copies the upgrading data from the external memory into an application program area to finish upgrading under the condition of data verification, and solves the problem that upgrading is easy to fail due to insufficient residual memory when the micro memory device is upgraded.
Based on the same inventive concept, the embodiment of the application also provides a remote upgrade system of the micro memory device corresponding to the remote upgrade method of the micro memory device, and because the principle of solving the problem of the system in the embodiment of the application is similar to that of the remote upgrade method of the micro memory device in the embodiment of the application, the implementation of the system can refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a remote upgrade system of a micro memory device according to an embodiment of the present application. As shown in fig. 2, the remote upgrade system 200 of the micro memory device includes:
The server 210 is configured to store upgrade data and upgrade version information, segment the upgrade data to obtain a plurality of upgrade data blocks, and send the upgrade data blocks corresponding to the data download request;
A plurality of micro memory devices 220 for performing the steps of the remote upgrade method of micro memory devices described above.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. The remote upgrading method for the micro memory device is characterized by comprising the following steps of:
receiving upgrade version information issued by a server in response to a version information reporting behavior of micro memory equipment, wherein the upgrade version information comprises a version number;
Acquiring a plurality of upgrading data blocks corresponding to the version numbers from the server, and sequentially storing each upgrading data block in an external memory through the residual memory of the micro memory device;
When the micro memory device is restarted, determining the state of a flag bit to be upgraded in the external memory, if the flag bit to be upgraded is set, acquiring the upgrade version information, and performing data verification on the whole upgrade data corresponding to the plurality of upgrade data blocks according to the upgrade version information;
And if the data verification is successful, erasing the application program area of the micro memory device, and copying the upgrade data from the external memory to the application program area in a segmented manner to complete remote upgrade of the micro memory device.
2. The method of claim 1, wherein the obtaining, from the server, a plurality of upgrade data blocks corresponding to the version number, each upgrade data block being sequentially stored in an external memory via a remaining memory of the micro memory device, comprises:
Receiving a target upgrading data block issued by the server according to a version number and an address offset in a data downloading request, wherein the data downloading request is a request for the target upgrading data block, which is initiated by the micro memory device to the server;
Storing the target upgrade data block in a remaining memory of the micro memory device;
the target upgrading data block is obtained from the residual memory, and the obtained target upgrading data block is stored in the external memory;
determining whether the target upgrade data block is the last upgrade data block;
If the data block is not the last upgrading data block, taking the next upgrading data block as a target upgrading data block, actively initiating a data downloading request aiming at the target upgrading data block to the server, and acquiring a new target upgrading data block until all the upgrading data blocks under the version number are acquired.
3. The method of claim 2, wherein the storing the acquired target upgrade data block in the external memory comprises:
checking the target upgrading data block;
After the verification is passed, determining the storage address of the target upgrading data block;
And storing the target upgrading data block into the external memory according to the storage address through a serial peripheral interface.
4. The method of claim 1, further comprising, before the obtaining the upgrade version information if a flag bit to be upgraded in the external memory is set:
acquiring a flag bit to be upgraded in the external memory through a serial peripheral interface;
And determining whether the flag bit to be upgraded is set.
5. The method of claim 1, further comprising, after the data verification is performed on the entire upgrade data corresponding to the plurality of upgrade data blocks according to the upgrade version information:
if the data check fails, the boot loader jumps to the application program area to finish the upgrade.
6. The method of claim 2, further comprising, after said determining whether said target upgrade data block is a last upgrade data block:
Checking the upgrade data corresponding to all the upgrade data blocks in the external memory to determine whether the upgrade data is legal;
And if the flag bit is legal, setting the flag bit to be upgraded of the external memory.
7. The method of claim 1, further comprising, prior to the receiving the updated version information issued by the server in response to the version information reporting act of the micro-memory device:
Establishing connection with the server when power is on each time;
and if the connection with the server is successful, actively reporting the version information of the micro memory device.
8. The method of claim 1, wherein the micro-memory device is a device having a ratio of device memory to memory occupied by the plurality of upgrade data blocks less than a set threshold.
9. The method of claim 1, wherein the micro-memory device comprises a plurality of.
10. A remote upgrade system for a micro-memory device, comprising:
the server is used for storing the upgrade data and the upgrade version information, segmenting the upgrade data to obtain a plurality of upgrade data blocks, and issuing the upgrade data blocks corresponding to the data downloading request;
A plurality of micro memory devices for performing the steps of the method for remote upgrade of micro memory devices according to any of claims 1 to 9.
CN202311344787.9A 2023-10-17 2023-10-17 Remote upgrading method and system for micro memory device Pending CN118193029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311344787.9A CN118193029A (en) 2023-10-17 2023-10-17 Remote upgrading method and system for micro memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311344787.9A CN118193029A (en) 2023-10-17 2023-10-17 Remote upgrading method and system for micro memory device

Publications (1)

Publication Number Publication Date
CN118193029A true CN118193029A (en) 2024-06-14

Family

ID=91409154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311344787.9A Pending CN118193029A (en) 2023-10-17 2023-10-17 Remote upgrading method and system for micro memory device

Country Status (1)

Country Link
CN (1) CN118193029A (en)

Similar Documents

Publication Publication Date Title
CN106020865B (en) System upgrading method and device
CN110083374B (en) Upgrade rollback method, system and terminal equipment
US8539471B2 (en) Updating firmware of an electronic device
CN106325929B (en) Firmware upgrading method, firmware upgrading device, refrigerator and server
WO2015176454A1 (en) Method and device for upgrading software
JP4680896B2 (en) Network device and method for monitoring startup of such devices
CN110621011A (en) OTA firmware upgrading method and system based on Bluetooth device end
CN109857423B (en) Program version updating method and device, server and readable storage medium
CN110474977B (en) Firmware upgrading method and system for intelligent door lock and intelligent door lock
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN110597545B (en) Hot patch Ding Zhineng upgrading method and system based on OTA component
CN114840242A (en) System upgrading method and device of electronic equipment and readable storage medium
CN113254048B (en) Method, device and equipment for updating boot program and computer readable medium
CN114911500A (en) Terminal upgrading method, terminal and system
CN110865819B (en) OS installation method, server and system
CN112698851B (en) Program update system, program transfer device, and program transfer method
CN114020526A (en) Firmware upgrading method and device and computer storage medium
CN109002305B (en) Method and system for updating equipment program
CN112099825A (en) Method, device and equipment for upgrading component and storage medium
CN112015447A (en) System updating method and device for electronic equipment, electronic equipment and storage medium
CN113225397A (en) Firmware upgrading method and device for embedded equipment, terminal and storage medium
CN118193029A (en) Remote upgrading method and system for micro memory device
CN107920074B (en) SDK automatic upgrading method, terminal equipment and master control server
TWI716969B (en) Recovery image downloads via data chunks
CN112667444A (en) System upgrading method, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication