Online upgrading method and device of wireless vibration sensor
By receiving and processing the pre-upgrade information and upgrade file package serial numbers provided by the server in the wireless vibration sensor, firmware upgrades are gradually completed, and the problems of high power consumption and data transmission interruption in the existing technology are solved, and efficient firmware upgrades and low power transmission are achieved.
Patent Information
- Application Number
- CN202510166711.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art During the online upgrade of wireless vibration sensors, high power consumption may lead to interruption of data transmission of other sensor states, and long-term firmware packet transmission aggravates battery consumption.
By receiving the pre-upgrade version number and corresponding upgrade information reply from the server, and saving it in a dormant state, the upgrade file package number is attached to the vibration data during wake-up, and the upgrade file is gradually received and packaged to process the upgrade file to automatically complete the firmware upgrade.
Reduces the size of the transmission firmware packet, avoids channel occupation, reduces the power consumption of the sensor, and avoids interruptions in data transmission of other sensors.
Smart Images

Figure CN120017505A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to an online upgrading method and device for a wireless vibration sensor. Background Art
[0002] LoRaWAN is a low-power, long-distance wireless communication protocol, but the communication transmission rate is relatively slow, and the maximum data packet generally does not exceed 200B. Online upgrade of wireless sensors refers to remotely updating the firmware of deployed sensors through wireless communication technology to improve functions, fix vulnerabilities or optimize performance.
[0003] In the existing technology, the firmware package for upgrading is usually sent to the sensor that needs to be upgraded through the wireless communication technology used by the sensor. Then the sensor installs the firmware by itself, that is, the firmware upgrade is completed.
[0004] However, when using wireless communication protocols with faster communication rates (WiFi, 4G, etc.) for firmware package transmission, the power consumption is high, which will put pressure on the battery life of the sensor. If low-power protocols such as LoRaWAN are used for long-term packet transmission, in industrial sites, dozens or hundreds of sensors are usually bound to one gateway. As long as a sensor is in the firmware package transmission state, it will occupy the channel for a long time, resulting in the interruption of the transmission of other sensor status data; and long-term firmware package transmission will increase the consumption of battery power. Summary of the invention
[0005] In view of the defects in the prior art, an object of the present invention is to provide an online upgrade method and device for a wireless vibration sensor.
[0006] In a first aspect, an embodiment of the present application provides an online upgrade method for a wireless vibration sensor, which is applied to a sensor end and includes:
[0007] Receive the pre-upgrade version number and corresponding upgrade information replied by the server;
[0008] After saving the pre-upgrade version number and the corresponding upgrade information, enter the dormant state;
[0009] If the device switches from the dormant state to the awake state, the vibration data uploaded to the server is accompanied by at least one upgrade file package number that needs to be obtained each time;
[0010] Receive the upgrade file package fed back by the server and save the upgrade file package;
[0011] If all upgrade file packages are received, the upgrade file packages are assembled to obtain differential firmware;
[0012] Performing a restoration process according to the pre-stored basic firmware package and the differential firmware to obtain the firmware to be upgraded;
[0013] Automatically complete the upgrade of the firmware to be upgraded and update the current firmware version number.
[0014] Optionally, before receiving the pre-upgrade version number and corresponding upgrade information replied by the server, the method includes:
[0015] When uploading vibration data to the server, the current firmware version number is uploaded to the server;
[0016] A confirmation packet replied by the server is received, wherein the confirmation packet includes the current pre-upgrade version number.
[0017] Optionally, after receiving the pre-upgrade version number and corresponding upgrade information replied by the server, the method further includes:
[0018] Determine whether the current firmware version number is consistent with the current pre-upgrade version number in the confirmation package;
[0019] If they are consistent, the pre-upgrade version number and the corresponding upgrade information will not be saved and the system will enter the dormant state.
[0020] If they are inconsistent, save the pre-upgrade version number and the corresponding upgrade information.
[0021] Optionally, the upgrade information includes: the total number of upgrade file packages, and the serial number of each upgrade file package; wherein the upgrade file package refers to: a difference package obtained by performing difference extraction based on a pre-stored basic firmware package using a differential algorithm, and splitting the difference package into multiple small packages according to a fixed protocol format;
[0022] The method further comprises:
[0023] If the reception of all upgrade file packages is not completed, the upgrade file packages are saved and no package assembly process is performed until the reception of all file upgrade packages is completed.
[0024] Optionally, after automatically completing the upgrade of the firmware to be upgraded and updating the current firmware version number, the method further includes:
[0025] Clear the upgrade information and enter hibernation mode.
[0026] In a second aspect, an embodiment of the present application provides an online upgrade method for a wireless vibration sensor, which is applied to a server side, and the method includes:
[0027] Receive vibration data uploaded by the sensor, and obtain the current firmware version number contained in the vibration data;
[0028] Compare the current firmware version number with the current pre-upgrade version number to obtain a comparison result;
[0029] If the comparison result is inconsistent, the pre-upgrade version number and corresponding upgrade information will be replied to the sensor;
[0030] If the comparison result is consistent, the process ends.
[0031] Optionally, after replying the pre-upgrade version number and the corresponding upgrade information to the sensor, the method further includes:
[0032] Receiving vibration data uploaded by the sensor, and obtaining at least one upgrade file package serial number required to be obtained that is included in the vibration data;
[0033] According to the upgrade file package sequence number, the corresponding upgrade file package is sent to the sensor, so that after the sensor completes the reception of all upgrade file packages, it will assemble the upgrade file packages to obtain differential firmware, and restore them according to the pre-stored basic firmware package and the differential firmware. After obtaining the firmware to be upgraded, the upgrade of the firmware to be upgraded is automatically completed.
[0034] In a third aspect, an embodiment of the present application provides an online upgrade device for a wireless vibration sensor, which is applied to a sensor end and includes:
[0035] The device comprises:
[0036] A receiving module, used to receive the pre-upgrade version number and corresponding upgrade information replied by the server;
[0037] A storage module, used to enter a dormant state after saving the pre-upgrade version number and the corresponding upgrade information;
[0038] A sending module, used for attaching at least one upgrade file package serial number to be obtained each time in the vibration data uploaded to the server when switching from the sleep state to the wake-up state;
[0039] The receiving module is further used to receive the upgrade file package fed back by the server and save the upgrade file package;
[0040] A package assembly module, used for assembling the upgrade file packages to obtain differential firmware after receiving all upgrade file packages;
[0041] A restoration module, used to perform restoration processing according to the pre-stored basic firmware package and the differential firmware to obtain the firmware to be upgraded;
[0042] The upgrade module is used to automatically complete the upgrade of the firmware to be upgraded and update the current firmware version number.
[0043] In a fourth aspect, an embodiment of the present application provides an online upgrade device for a wireless vibration sensor, which is applied to a server side, and the device includes:
[0044] A receiving module, used to receive the vibration data uploaded by the sensor and obtain the current firmware version number contained in the vibration data;
[0045] A comparison module, used for comparing the current firmware version number with the current pre-upgrade version number to obtain a comparison result;
[0046] The sending module is used to reply the pre-upgrade version number and corresponding upgrade information to the sensor when the comparison result is inconsistent; if the comparison result is consistent, the process ends.
[0047] In a fifth aspect, an embodiment of the present application provides an online upgrade device for a wireless vibration sensor, comprising: a processor and a memory, wherein the memory stores executable program instructions, and when the processor calls the program instructions in the memory, the processor is used to:
[0048] Execute the steps of the online upgrade method of the wireless vibration sensor as described in any one of the first aspect or the second aspect.
[0049] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of the online upgrade method of the wireless vibration sensor as described in any one of the first aspect or the second aspect.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] In this application, the pre-upgrade version number and the corresponding upgrade information replied by the server are received; after saving the pre-upgrade version number and the corresponding upgrade information, the dormant state is entered; if the dormant state is switched to the awake state, at least one upgrade file package sequence number that needs to be obtained is attached to each vibration data uploaded to the server; thus, there is no need to spend an extra period of time to transmit the firmware package. The upgrade file package fed back by the server is received, and the upgrade file package is saved; if all upgrade file packages are received, the upgrade file package is processed to obtain differential firmware; the firmware to be upgraded is obtained by restoring the pre-stored basic firmware package and the differential firmware; the upgrade of the firmware to be upgraded is automatically completed, and the current firmware version number is updated. Therefore, the package processing can be performed based on the basic firmware package and the upgrade file package sealed by the sensor before leaving the factory, which greatly reduces the size of the transmitted firmware package, avoids channel occupation, and reduces the power consumption of the sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings in the following descriptions are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work. By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, purposes and advantages of the present invention will become more obvious:
[0053] Figure 1 This is a schematic diagram of the principle of splitting the upgrade file package in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of a flow chart of an online upgrade method of a wireless vibration sensor provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of a flow chart of another online upgrade method of a wireless vibration sensor provided in an embodiment of the present application;
[0056] Figure 4 It is a flowchart of an online upgrade method applied to a wireless vibration sensor in one embodiment of the present application;
[0057] Figure 5 The figure is a flow chart of an online upgrade method applied to a server in one embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there can be a central component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there can be a central component at the same time.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0061] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0062] The following specific embodiments are used to describe in detail the technical solution of the present invention and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0063] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0064] Figure 1 FIG. 1 is a schematic diagram showing the principle of splitting the upgrade file package in an embodiment of the present application. Figure 1 As shown in the figure, a basic version of the firmware package will be burned into the Flash (flash memory) of the MCU (microcontroller unit) in advance when the sensor leaves the factory; the subsequent upgrade firmware uses a differential algorithm (with corresponding algorithm tools) to extract differences based on the basic version of the firmware to reduce the firmware size; the extracted difference package is divided into multiple small packages according to a fixed protocol format.
[0065] For example, the basic working principle of a wireless vibration sensor is to detect the vibration of an object through a built-in accelerometer or vibration sensor. The accelerometer can measure the acceleration changes of an object in different directions, thereby calculating the amplitude, frequency and direction of the vibration. These data are transmitted to a server or cloud platform for analysis and processing via wireless communication technology (LoRaWAN). In order to extend battery life, the sensor will sleep for a long time, and then wake up regularly according to the configuration information, collect, calculate, and transmit data after waking up, and enter sleep mode again after the transmission is completed.
[0066] For example, based on the working principle of the wireless vibration sensor, it can be obtained Figure 2The online upgrade method of a wireless vibration sensor shown is applied to the sensor end. The method in this embodiment may include the following steps:
[0067] Step 201: Receive the pre-upgrade version number and corresponding upgrade information replied by the server.
[0068] Exemplarily, before executing step 201, the sensor uploads the current firmware version number to the server when uploading vibration data to the server; and receives a confirmation packet replied by the server, wherein the confirmation packet includes the current pre-upgrade version number.
[0069] In this embodiment, according to a specific communication protocol, all vibration sensors on site will upload the current firmware version number to the server software each time they upload vibration data; when the server software replies to the confirmation package, it will also reply with the current pre-upgrade version number.
[0070] In this embodiment, the upgrade information includes: the total number of upgrade file packages, and the serial number of each upgrade file package; wherein the upgrade file package refers to: a difference package obtained by using a differential algorithm to perform difference extraction based on a pre-stored basic firmware package, and the difference package is split into multiple small packages according to a fixed protocol format.
[0071] In this embodiment, when firmware upgrade is not required, the version number uploaded by the sensor is consistent with the version number replied by the server software; when an online upgrade is required (i.e., the server software detects that the version uploaded by the sensor is inconsistent with the pre-upgrade version, and an upgrade file of the pre-upgrade version already exists on the software), the server software will reply with the pre-upgrade version number and corresponding upgrade information (i.e., the total number of upgrade file packages, etc.).
[0072] Step 202, after saving the pre-upgrade version number and the corresponding upgrade information, enter the dormant state.
[0073] In this embodiment, after receiving the information that the server software needs to upgrade, the sensor will not immediately obtain the upgrade file, but will save the information and then go into sleep mode normally.
[0074] Exemplarily, before executing step 202, the sensor pre-determines whether the current firmware version number is consistent with the current pre-upgrade version number in the confirmation package; if they are consistent, the pre-upgrade version number and the corresponding upgrade information are not saved and the sensor enters a dormant state; if they are inconsistent, the pre-upgrade version number and the corresponding upgrade information are saved.
[0075] Step 203: If the state is switched from the dormant state to the awake state, at least one upgrade file package number to be obtained is attached to the vibration data uploaded to the server each time.
[0076] In this embodiment, after the next wake-up, based on the saved information (whether to upgrade, upgrade file size, etc.), the data is collected and when the vibration data is uploaded, if the upgrade file needs to be obtained, the serial number of the upgrade file package to be obtained will be attached to the uploaded vibration data (for example, based on the saved information, only one package of upgrade files will be obtained in sequence).
[0077] Step 204: Receive the upgrade file package fed back by the server and save the upgrade file package.
[0078] In this embodiment, the server software replies with a confirmation package based on the data information uploaded by the sensor and attaches a corresponding upgrade file package; after receiving the upgrade file package data, the sensor updates and saves the upgrade information and saves the upgrade file package (when the upgrade file has not been fully acquired).
[0079] In this embodiment, if the reception of all upgrade file packages is not completed, the upgrade file packages are saved and no package assembly process is performed until the reception of all file upgrade packages is completed.
[0080] Step 205: If all upgrade file packages have been received, the upgrade file packages are assembled to obtain differential firmware.
[0081] In this embodiment, after the sensor obtains all the upgrade file packages (the total number of upgrade file packages is included in the initial upgrade information), it will automatically assemble the upgrade files into differential firmware.
[0082] Step 206: Perform restoration processing based on the pre-stored basic firmware package and the differential firmware to obtain the firmware to be upgraded.
[0083] In this embodiment, the basic firmware package stored in the Flash is combined and restored to the firmware to be upgraded (saved and a rollback path is provided) according to a specific algorithm.
[0084] Step 207, automatically completing the upgrade of the firmware to be upgraded, and updating the current firmware version number.
[0085] In this embodiment, the sensor completes the firmware upgrade by itself, and uploads the firmware version number after the upgrade is completed during the next data upload.
[0086] Exemplarily, after the upgrade of the firmware to be upgraded is automatically completed and the current firmware version number is updated, the upgrade information is cleared and the dormant state is entered.
[0087] In this embodiment, the pre-upgrade version number and the corresponding upgrade information replied by the server are received; after saving the pre-upgrade version number and the corresponding upgrade information, the dormant state is entered; if the dormant state is switched to the awake state, at least one upgrade file package serial number that needs to be obtained is attached to each vibration data uploaded to the server; thus, there is no need to spend an extra period of time to transmit the firmware package. The upgrade file package fed back by the server is received, and the upgrade file package is saved; if all upgrade file packages are received, the upgrade file package is processed to obtain differential firmware; the firmware to be upgraded is obtained according to the pre-stored basic firmware package and the differential firmware; the upgrade of the firmware to be upgraded is automatically completed, and the current firmware version number is updated. Therefore, the package processing can be performed based on the basic firmware package and the upgrade file package sealed by the sensor before leaving the factory, which greatly reduces the size of the transmitted firmware package, avoids channel occupation, and reduces the power consumption of the sensor.
[0088] For example, based on the working principle of the wireless vibration sensor, it can be obtained Figure 3 Another online upgrade method of a wireless vibration sensor shown is applied to a server side. The method in this embodiment may include the following steps:
[0089] Step 301: Receive vibration data uploaded by a sensor, and obtain the current firmware version number contained in the vibration data.
[0090] In this embodiment, the server continuously receives the vibration data uploaded by the sensor, and obtains the current firmware version number contained in the vibration data when parsing the vibration data. That is, the sensor side will continuously report the current firmware version number to the server.
[0091] Step 302, compare the current firmware version number with the current pre-upgrade version number to obtain a comparison result.
[0092] In this embodiment, the server can determine whether an upgrade is required based on the current firmware version number and the current pre-upgrade version number. If the two are different, it means that an upgrade is required, and if the two are the same, no upgrade is required.
[0093] Step 303: If the comparison result is inconsistent, the pre-upgrade version number and corresponding upgrade information are replied to the sensor.
[0094] In this embodiment, in combination with step 302, when an upgrade is required, the server replies to the server with the upgrade version number and corresponding upgrade information.
[0095] Step 304: If the comparison result is consistent, the process ends.
[0096] In this embodiment, if upgrading is not required, there is no need to start the upgrading process and the process ends.
[0097] Exemplarily, after replying the pre-upgrade version number and corresponding upgrade information to the sensor, the method also includes: receiving vibration data uploaded by the sensor, and obtaining at least one upgrade file package serial number that needs to be obtained and is attached to the vibration data; and sending the corresponding upgrade file package to the sensor according to the upgrade file package serial number.
[0098] In this embodiment, the corresponding upgrade file packages are sent to the sensor in accordance with the upgrade file package sequence number by multiple sending, so that after the sensor completes the reception of all the upgrade file packages, the upgrade file packages are assembled to obtain differential firmware, and the upgrade is automatically completed based on the pre-stored basic firmware package and the differential firmware after the firmware to be upgraded is obtained.
[0099] This embodiment can use a differential algorithm to split the upgrade firmware into differential firmware based on the factory-cured basic firmware package, greatly reducing the amount of transmitted data. By splitting the upgrade file into a large number of upgrade file packets according to a specific communication protocol, and sending them to the sensor in multiple times through data reply packets, and using a low-power wireless communication protocol to reduce the transmission power consumption of wireless sensors, the firmware delivery does not cause excessive power consumption and does not occupy the channel for a long time to cause communication congestion of other sensors.
[0100] This embodiment can compress the size of the upgraded firmware as much as possible and utilize the normal data interaction process of the sensor to transmit the firmware data for upgrading to each sensor node in packets, thereby effectively avoiding data signal occupation and reducing battery consumption.
[0101] For example, Figure 4 FIG. 1 is a flow chart of an online upgrade method for a wireless vibration sensor in an embodiment of the present application. Figure 4 As shown, after waking up the sensor, collect vibration / temperature data; query the upgrade information; determine whether to obtain the upgrade package, if so, upload the corresponding upgrade file package number in the vibration / temperature data, if not, upload the vibration / temperature data with the firmware version number to the server; receive the server reply; detect whether the received upgrade file package has been received, if not, save the upgrade file and update the upgrade information, and enter the dormant state, if so, assemble the differential firmware; component upgrade firmware save and roll back; firmware upgrade; determine whether the upgrade is successful, if so, clear the upgrade information and update the firmware version number, and enter the dormant state, if not, roll back and upgrade again. After uploading the vibration / temperature data with the firmware version number to the server, determine whether it needs to be upgraded, if so, save the upgrade information, if not, enter the dormant state.
[0102] For example, Figure 5FIG. 1 is a flow chart of an online upgrade method applied to a server in an embodiment of the present application. Figure 5 As shown, first receive sensor data and determine whether an upgrade is needed. If so, determine whether to issue the upgrade file. If not, reply with a confirmation package. If an upgrade file is issued, reply with a confirmation package to upgrade the corresponding file package. If the upgrade file is not issued, reply with a confirmation package upgrade information.
[0103] Although this embodiment performs online upgrade based on a low-power wireless communication protocol, the firmware file will not be sent to occupy the channel for a long time, thereby preventing other sensors from sending and receiving data normally. By using data reply packets to sub-packetize and transmit the firmware file for upgrading, there is no need to send the firmware for a long time alone, thus avoiding a large amount of battery power consumption.
[0104] Exemplarily, an embodiment of the present application further provides an online upgrade device for a wireless vibration sensor, which is applied to a sensor end, and the device includes:
[0105] A receiving module, used to receive the pre-upgrade version number and corresponding upgrade information replied by the server;
[0106] A storage module, used to enter a dormant state after saving the pre-upgrade version number and the corresponding upgrade information;
[0107] A sending module, used for attaching at least one upgrade file package serial number to be obtained each time in the vibration data uploaded to the server when switching from the sleep state to the wake-up state;
[0108] The receiving module is further used to receive the upgrade file package fed back by the server and save the upgrade file package;
[0109] A package assembly module, used for assembling the upgrade file packages to obtain differential firmware after receiving all upgrade file packages;
[0110] A restoration module, used to perform restoration processing according to the pre-stored basic firmware package and the differential firmware to obtain the firmware to be upgraded;
[0111] The upgrade module is used to automatically complete the upgrade of the firmware to be upgraded and update the current firmware version number.
[0112] Exemplarily, before receiving the pre-upgrade version number and corresponding upgrade information replied by the server, the sending module is further used to upload the current firmware version number to the server when uploading the vibration data to the server;
[0113] The receiving module is further used to receive a confirmation package replied by the server, wherein the confirmation package includes the current pre-upgrade version number.
[0114] Exemplarily, the above-mentioned device also includes a judgment module, which is also used to judge whether the current firmware version number is consistent with the current pre-upgrade version number in the confirmation package after receiving the pre-upgrade version number and corresponding upgrade information replied by the server; if they are consistent, the pre-upgrade version number and the corresponding upgrade information are not saved, and the device enters a dormant state; if they are inconsistent, the pre-upgrade version number and the corresponding upgrade information are saved.
[0115] Exemplarily, the upgrade information includes: the total number of upgrade file packages, and the serial number of each upgrade file package; wherein the upgrade file package refers to: a difference package obtained by performing difference extraction based on a pre-stored basic firmware package using a differential algorithm, and splitting the difference package into multiple small packages according to a fixed protocol format;
[0116] The storage module is also used to save the upgrade file packages when all upgrade file packages have not been received, and not to perform package assembly processing until all file upgrade packages have been received.
[0117] Exemplarily, the above-mentioned device also includes: a clearing module, which is used to clear the upgrade information and enter a dormant state after automatically completing the upgrade of the firmware to be upgraded and updating the current firmware version number.
[0118] Exemplarily, the embodiment of the present application further provides an online upgrade device for a wireless vibration sensor, which is applied to a server side, and the device includes:
[0119] A receiving module, used to receive the vibration data uploaded by the sensor and obtain the current firmware version number contained in the vibration data;
[0120] A comparison module, used for comparing the current firmware version number with the current pre-upgrade version number to obtain a comparison result;
[0121] The sending module is used to reply the pre-upgrade version number and corresponding upgrade information to the sensor when the comparison result is inconsistent.
[0122] Exemplarily, the receiving module is further used to receive the vibration data uploaded by the sensor after replying the pre-upgrade version number and the corresponding upgrade information to the sensor, and obtain at least one upgrade file package serial number required to be obtained attached to the vibration data;
[0123] The sending module is also used to send the corresponding upgrade file package to the sensor according to the upgrade file package sequence number, so that after the sensor completes the reception of all upgrade file packages, it will assemble the upgrade file packages to obtain differential firmware, and restore them according to the pre-stored basic firmware package and the differential firmware. After obtaining the firmware to be upgraded, the upgrade of the firmware to be upgraded is automatically completed; if the comparison result is consistent, the process ends.
[0124] The embodiment of the present application also provides an online upgrade device for a wireless vibration sensor, comprising: a processor and a memory, wherein the memory stores executable program instructions, and when the processor calls the program instructions in the memory, the processor is used to: execute the above Figure 2 to Figure 4 The steps of the online upgrade method of the wireless vibration sensor are shown.
[0125] It should be noted that those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "platform" herein.
[0126] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When at least one processor of a user device executes the computer-executable instructions, the user device executes the above-mentioned various possible methods. Among them, the computer-readable medium includes a computer storage medium and a communication medium, wherein the communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also exist in a communication device as discrete components.
[0127] The present application also provides a program product, which includes a computer program. The computer program is stored in a readable storage medium. At least one processor of the server can read the computer program from the readable storage medium. At least one processor executes the computer program so that the server implements any method of the above-mentioned embodiments of the present invention.
[0128] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0129] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. An online upgrade method for a wireless vibration sensor, characterized in that: Applied to the sensor end, the method includes: Receive the pre-upgrade version number and corresponding upgrade information replied by the server; After saving the pre-upgrade version number and the corresponding upgrade information, enter the dormant state; If the device switches from the dormant state to the awake state, the vibration data uploaded to the server is accompanied by at least one upgrade file package number that needs to be obtained each time; Receive the upgrade file package fed back by the server and save the upgrade file package; If all upgrade file packages are received, the upgrade file packages are assembled to obtain differential firmware; Performing a restoration process according to the pre-stored basic firmware package and the differential firmware to obtain the firmware to be upgraded; Automatically complete the upgrade of the firmware to be upgraded and update the current firmware version number.
2. The online upgrade method of the wireless vibration sensor according to claim 1, characterized in that: Before receiving the pre-upgrade version number and corresponding upgrade information replied by the server, the method includes: When uploading vibration data to the server, the current firmware version number is uploaded to the server; A confirmation packet replied by the server is received, wherein the confirmation packet includes the current pre-upgrade version number.
3. The method according to claim 1, characterized in that: After receiving the pre-upgrade version number and corresponding upgrade information replied by the server, the method further includes: Determine whether the current firmware version number is consistent with the current pre-upgrade version number in the confirmation package; If they are consistent, the pre-upgrade version number and the corresponding upgrade information will not be saved and the system will enter the dormant state. If they are inconsistent, save the pre-upgrade version number and the corresponding upgrade information.
4. The online upgrade method of the wireless vibration sensor according to any one of claims 1 to 3, characterized in that: The upgrade information includes: the total number of upgrade file packages and the serial number of each upgrade file package; wherein the upgrade file package refers to: a difference package obtained by performing difference extraction based on a pre-stored basic firmware package using a differential algorithm, and the difference package is split into multiple small packages according to a fixed protocol format; The method further comprises: If the reception of all upgrade file packages is not completed, the upgrade file packages are saved and no package assembly process is performed until the reception of all file upgrade packages is completed.
5. The online upgrade method of the wireless vibration sensor according to any one of claims 1 to 3, characterized in that: After automatically completing the upgrade of the firmware to be upgraded and updating the current firmware version number, the method further includes: Clear the upgrade information and enter hibernation mode.
6. An online upgrade method for a wireless vibration sensor, characterized in that: Applied to the server side, the method includes: Receive vibration data uploaded by the sensor, and obtain the current firmware version number contained in the vibration data; Compare the current firmware version number with the current pre-upgrade version number to obtain a comparison result; If the comparison result is inconsistent, the pre-upgrade version number and corresponding upgrade information will be replied to the sensor; If the comparison result is consistent, the process ends.
7. The online upgrade method of the wireless vibration sensor according to claim 6, characterized in that: After replying the pre-upgrade version number and the corresponding upgrade information to the sensor, the method further includes: Receiving vibration data uploaded by the sensor, and obtaining at least one upgrade file package serial number required to be obtained that is included in the vibration data; According to the upgrade file package sequence number, the corresponding upgrade file package is sent to the sensor, so that after the sensor completes the reception of all upgrade file packages, the upgrade file package is assembled to obtain differential firmware, and the sensor is restored according to the pre-stored basic firmware package and the differential firmware to automatically complete the upgrade of the firmware to be upgraded after obtaining the firmware to be upgraded; if the comparison result is consistent, the process ends.
8. An online upgrade device for a wireless vibration sensor, characterized in that: Applied to the sensor end, the device comprises: A receiving module, used to receive the pre-upgrade version number and corresponding upgrade information replied by the server; A storage module, used to enter a dormant state after saving the pre-upgrade version number and the corresponding upgrade information; A sending module, used for attaching at least one upgrade file package serial number to be obtained each time in the vibration data uploaded to the server when switching from the sleep state to the wake-up state; The receiving module is further used to receive the upgrade file package fed back by the server and save the upgrade file package; A package assembly module, used for assembling the upgrade file packages to obtain differential firmware after receiving all upgrade file packages; A restoration module, used to perform restoration processing according to the pre-stored basic firmware package and the differential firmware to obtain the firmware to be upgraded; The upgrade module is used to automatically complete the upgrade of the firmware to be upgraded and update the current firmware version number.
9. An online upgrade device for a wireless vibration sensor, characterized in that: Applied to the server side, the device comprises: A receiving module, used to receive the vibration data uploaded by the sensor and obtain the current firmware version number contained in the vibration data; A comparison module, used for comparing the current firmware version number with the current pre-upgrade version number to obtain a comparison result; The sending module is used to reply the pre-upgrade version number and corresponding upgrade information to the sensor when the comparison result is inconsistent.
10. An online upgrade device for a wireless vibration sensor, characterized in that: include: A processor and a memory, wherein the memory stores executable program instructions, and when the processor calls the program instructions in the memory, the processor is used to: Execute the steps of the online upgrade method of the wireless vibration sensor as described in any one of claims 1 to 7.