Software upgrading method and device, equipment and medium

By receiving software upgrade requests from the main control board in multiple board environments and performing wireless signal transmission, the problem of low software upgrade efficiency in the existing technology is solved, and an efficient and simple software upgrade process is achieved.

CN119806598APending Publication Date: 2025-04-11AMBULANC (SHENZHEN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510115976.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing software upgrade technology is inefficient and cumbersome in multiple board environments, making it difficult to meet users' needs for efficient upgrades.

Method used

By receiving the software upgrade request of the main control board within a preset time, sending an upgrade response to the main control board, and transmitting the upgrade packets through wireless signals. When the total number of upgrade packets received is consistent with the number of packets in the request, the address jump is performed to achieve software upgrade.

Benefits of technology

It simplifies the upgrade operation, improves the efficiency of software upgrade, is convenient to operate and is cheap, and ensures the integrity and reliability of software upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806598A_ABST
    Figure CN119806598A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a software upgrading method and device, equipment and a medium, and the method comprises the following steps: when a software upgrading request sent by a main control board is received within a preset time, sending an upgrading response corresponding to the software upgrading request to the main control board, and receiving upgrade data packets transmitted by the main control board through wireless signals according to the upgrade response, and when detecting that the total packet number of the received upgrade data packets is consistent with the total packet number of the upgrade data packets included in the software upgrade request, performing address jump on the upgrade file after transmission is completed so as to realize software upgrade. Visibly, when it is determined that the total packet number of the upgrade data packets transmitted by the main control board through the wireless signal according to the upgrade response is consistent with the total packet number of the upgrade data packets included in the software upgrade request, address skipping is carried out on the upgrade file after transmission is completed, so that software upgrade is achieved, operation is convenient, cost is low, and the upgrade efficiency is improved. And the software upgrading efficiency is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a software upgrading method, device, equipment and medium. Background Art

[0002] With the rapid development of cardiopulmonary resuscitation machines, the growing number of users, more complex business models, and diversified and high-standard user needs have continuously spawned iterative and updated software versions to upgrade the version files running on each board corresponding to the software part of the cardiopulmonary resuscitation machine.

[0003] In the existing software upgrade technology, especially when there are multiple boards, the commonly used upgrade method is the offline upgrade method. However, when upgrading the software using the offline upgrade method, it is usually necessary to bring the software back to the service center or use a specific upgrade tool to update the software. However, this operation process is relatively cumbersome and greatly reduces the efficiency of software upgrade. Therefore, how to improve the efficiency of software upgrade is a problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] Based on this, it is necessary to address the above technical issues. The embodiments of the present invention provide a software upgrade method, device, equipment and medium to simplify the upgrade operation and improve the efficiency of software upgrade.

[0005] A first aspect of an embodiment of the present application provides a software upgrade method, the software upgrade method comprising: When receiving a software upgrade request sent by the main control board within a preset time, sending an upgrade response corresponding to the software upgrade request to the main control board, wherein the software upgrade request is sent after downloading an upgrade file for the application in the main control board from the server to its own storage area, and the upgrade file includes a plurality of upgrade data packets; receiving an upgrade data packet transmitted by the main control board through a wireless signal according to the upgrade response; When it is detected that the total number of the received upgrade data packets is consistent with the total number of the upgrade data packets included in the software upgrade request, the upgrade file after transmission is redirected to achieve software upgrade.

[0006] A second aspect of an embodiment of the present application provides a software upgrade device, the software upgrade device comprising: A sending module, configured to send an upgrade response corresponding to the software upgrade request to the main control board when receiving the software upgrade request sent by the main control board within a preset time, wherein the software upgrade request is sent after downloading the upgrade file for the application in the main control board from the server to its own storage area, and the upgrade file includes a plurality of upgrade data packets; A receiving module, used for receiving an upgrade data packet transmitted by the main control board through a wireless signal according to the upgrade response; The upgrade module is used to redirect the address of the upgrade file after the transmission is completed to realize software upgrade when it is detected that the total number of the received upgrade data packets is consistent with the total number of the upgrade data packets included in the software upgrade request.

[0007] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the software upgrade method as described in the first aspect when executing the computer program.

[0008] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the software upgrade method as described in the first aspect is implemented.

[0009] In summary, the present invention provides a software upgrade method, device, equipment and medium. When a software upgrade request sent by a main control board is received within a preset time, an upgrade response corresponding to the software upgrade request is sent to the main control board, wherein the software upgrade request is sent after the upgrade file for the application in the main control board is downloaded from the server to its own storage area, wherein the upgrade file includes a plurality of upgrade data packets, and the upgrade data packets transmitted by the main control board through wireless signals according to the upgrade response are received. When it is detected that the total number of packets of the received upgrade data packets is consistent with the total number of packets of the upgrade data packets included in the software upgrade request, the upgrade file after the transmission is completed is redirected to achieve software upgrade. It can be seen that the present application determines that the total number of packets of the upgrade data packets transmitted by the main control board through wireless signals according to the upgrade response is consistent with the total number of packets of the upgrade data packets included in the software upgrade request, thereby redirecting the upgrade file after the transmission is completed to achieve software upgrade, which is not only convenient to operate and low in cost, but also improves the efficiency of software upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0011] Figure 1 This is an application environment diagram of a software upgrade method provided by an embodiment of the present invention; Figure 2It is a flowchart of a software upgrade method provided by an embodiment of the present invention; Figure 3 It is a structural schematic diagram of a software upgrading device provided by an embodiment of the present invention; Figure 4 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technical personnel in this field without creative work are within the scope of protection of the present invention.

[0013] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0014] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0015] As used in the present specification and the appended claims, the term “if” may be interpreted as “when” or “uponce” or “in response to determining”, depending on the context. Similarly, the phrases “if it is determined” or “if matched to [described condition or event]” may be interpreted as meaning “upon determination” or “in response to determination” or “uponce matched to [described condition or event]” or “in response to matching to [described condition or event]”, depending on the context.

[0016] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0017] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0018] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0019] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.

[0020] See also Figure 1 , is an application environment diagram of a software upgrade method provided by an embodiment of the present invention. A software upgrade method provided by an embodiment of the present invention can be applied in Figure 1 In the application environment, the main control board is connected to the server via WIFI, a U disk is mounted on the server, the upgrade file is stored in the U disk, and the main control board communicates with the control board via the serial port, so that both the main control board and the control board can be upgraded. The server can be implemented with an independent server or a server cluster composed of multiple server terminals. The software upgrade method is performed through the server to improve the efficiency of software upgrade.

[0021] See also Figure 2 , is a flowchart of a software upgrade method provided by an embodiment of the present invention, such as Figure 2 As shown, the software upgrade method can be implemented through the following steps.

[0022] S201: When a software upgrade request is received from the main control board within a preset time, an upgrade response corresponding to the software upgrade request is sent to the main control board, wherein the software upgrade request is sent after downloading an upgrade file for an application in the main control board from the server to its own storage area, and the upgrade file includes several upgrade data packets.

[0023] In step S201, the software upgrade request is sent after the server downloads the upgrade file for the application in the main control board to its own storage area. The upgrade file is written for the application running on the main control board. The upgrade file is divided into several upgrade data packets, each of which contains a part of the updated content of the application. This division helps to reduce the amount of data transmitted in a single time and improve the transmission efficiency. The server first needs to retrieve the upgrade file for the main control board application from the storage. This upgrade file usually contains multiple upgrade data packets, each of which contains a part of the updated content of the application. After the main control board obtains the upgrade file for the application program of the main control board from the server, it downloads the upgrade file to its own storage area, and then sends a notification message for the upgrade file through serial communication to inform the control board that it has obtained the upgrade file. The main control board sends the software upgrade request to the control board. The control board continuously monitors the communication port from the main control board and sets a preset time by starting a timer. This preset time is used to ensure that the control board has enough time to process the request and prepare a response, so that it can process the software upgrade request sent by the main control board in a timely manner after receiving it within the preset time. Among them, the software upgrade request usually contains the metadata of the upgrade file (such as version number, number of data packets, checksum, etc.). After receiving the software upgrade request, the control board shall perform legitimacy verification, such as checking whether the request comes from a trusted server and whether the content of the request conforms to the expected format. During the operation of the timer, the control board checks whether its storage area has enough space to store the upgrade file to be received. If the storage space is sufficient, the control board is ready to send an upgrade response to the main control board. This response usually includes confirmation of willingness to receive the upgrade file, communication port information for receiving the upgrade file, and possible other necessary information (such as expected upgrade data packet size, quantity, checksum algorithm, etc.). If the timer expires and the response has not been sent, the control board may need to take specific error handling measures, such as sending a timeout error response to the main control board.

[0024] It should be noted that the preset time is a pre-set editable time value, such as 3 seconds, 10 seconds or 30 seconds, etc., which can be set according to actual conditions, and this application does not impose any limitation on this.

[0025] In an embodiment of the invention, the main control board obtains the upgrade file in the following manner, including: When the user enters the wireless upgrade function interface, the USB disk status and network status are detected in real time; Determine whether the main control board enters the wireless upgrade mode according to the USB flash drive status and the network status; If the main control board enters the wireless upgrade mode, a file call request is sent to the server, so that the server downloads the upgrade file to the storage area corresponding to the application program in the main control board according to the file call request.

[0026] Specifically, first determine whether the user enters the wireless upgrade function interface. When the user enters the wireless upgrade function interface, the main control board detects the U disk status and the network status in real time. If the U disk is not detected, the upgrade button cannot be clicked. If the U disk is detected, click the start upgrade button, and the network connection is stable and available, then it is determined that the main control board enters the wireless upgrade mode. The wireless upgrade mode refers to the mode in which the main control board enters the wireless upgrade state. When the main control board enters the wireless upgrade mode, a file call request is sent to the server. This file call request usually contains information such as the name and version number of the file, so that the server can correctly identify and provide the required file so that the server can download the upgrade file to the storage area corresponding to the application in the main control board according to the file call request. In addition, the main control board asks the server whether there is an upgrade file for the main control board and the application according to the preset rules through the network (WIFI), for example, after the machine is turned on and connected to the network, the query is asked at a fixed time interval, etc. When the feedback message obtained from the server indicates that there is an upgrade file for the application of the main control board, the upgrade file is downloaded from the server to the storage area of ​​the main control board itself, and then the software upgrade request is sent to the control board. Through the above steps, it can be ensured that when the user enters the wireless upgrade function interface, the main control board can correctly detect the USB disk status and network status, thereby deciding whether to enter the wireless upgrade mode and safely download the upgrade file to the main control board.

[0027] In an embodiment of the invention, downloading the upgrade file to a storage area corresponding to the application in the main control board according to the file call request includes: According to the file call request, download the upgrade file from the server to the storage area corresponding to the application in the main control board; During the process of downloading the upgrade file, detecting whether the size of the downloaded file is greater than or equal to the size of the upgrade file; If the size of the downloaded file is greater than or equal to the size of the upgrade file, it is determined that the file download has been completed, and the downloaded upgrade file is written into the USB flash drive.

[0028] Specifically, first, an upgrade file is set in the server, and the upgrade file includes a configuration file and a resource file of the pre-installed application. The configuration file is a text file containing the upgrade rules of the pre-installed application. Its purpose is to store the corresponding upgrade rules in it according to the different upgrade methods of the pre-installed application. Different upgrade rules can be used to update the local resource files for different pre-installed applications. Resource files generally refer to data files containing non-code resources, which can include pictures, audio, video, text files, configuration files and other types. During the software upgrade process, these resource files may need to be updated or replaced to ensure that the new version of the software can be correctly accessed and used. Then, in the process of downloading the upgrade file from the server to the storage area corresponding to the application in the main control board according to the file call request sent by the main control board, it can be determined whether the upgrade file is downloaded by detecting the file tail mark, detecting the file download completion mark sent by the server, or checking the size of the downloaded file. This application detects whether the size of the downloaded file is greater than or equal to the size of the upgrade file. If the size of the downloaded file is greater than or equal to the size of the upgrade file, it is determined that the file download has been completed. After that, the downloaded upgrade file can be verified. If the verification finds that there is no transmission error in the downloaded upgrade file, the downloaded upgrade file is then written to the U disk. The U disk is mainly used to store upgrade files. Generally, the memory of the upgrade file is relatively large and requires more resources, so directly using a U disk for storage is not only convenient for management, but also stable and fast for downloading. Through the above steps, the upgrade file size is continuously monitored during the download process and compared with the size of the upgrade file on the server to ensure that the downloaded file is not missing or damaged. This increases the reliability and integrity of the upgrade process.

[0029] In this embodiment, when a software upgrade request is received from the main control board within a preset time, an upgrade response corresponding to the software upgrade request is sent to the main control board, which can ensure that the main control board receives the upgrade response within an appropriate time, helping to improve the response speed and efficiency of the main control board, and split the upgrade file into several upgrade data packets so that the amount of data transmitted each time can be smaller, which helps to reduce the risk of a single transmission failure and improve transmission efficiency.

[0030] S202: Receive an upgrade data packet transmitted by the main control board through a wireless signal according to the upgrade response.

[0031] In step S202, when the control board receives the software upgrade request sent by the main control board within a preset time, the control board will receive the software upgrade request and then enter the boot program. At this time, the Boot program will perform necessary hardware detection and settings, such as configuring memory, CPU, input and output devices, etc., and then the control board will send an upgrade response corresponding to the software upgrade request to the main control board, telling the main control board that the upgrade data packet can be sent. At this time, the display screen in the cardiopulmonary resuscitation machine will display the step status of the response, so when the main control board receives the upgrade response corresponding to the software upgrade request sent by the control board, it transmits the upgrade data packets to the control board one by one via wireless signals to ensure the smooth progress of the subsequent upgrade process and the security of the data.

[0032] In one embodiment of the invention, receiving an upgrade data packet transmitted by the main control board through a wireless signal according to the upgrade response includes: Receiving a plurality of data bytes in a first upgrade data packet transmitted by the main control board in a preset form through a wireless signal, wherein the data bytes include data identification information; According to the data identification information, a plurality of the data bytes are spliced ​​according to a preset rule to obtain a spliced ​​first upgrade data packet, wherein the preset rule includes a preset data format and a preset data sequence; Verifying the spliced ​​first upgrade data packet to determine a checksum of the spliced ​​first upgrade data packet; Determining whether the checksum of the spliced ​​first upgrade data packet meets a preset check condition; If the checksum of the spliced ​​first upgrade data packet meets the preset check condition, the verification is successful, and a correct response message is returned to the main control board, so that the main control board continues to send multiple data bytes in the next upgrade data packet after receiving the correct response message, until the main control board has sent multiple data bytes in the last upgrade data packet of all upgrade data packets in the upgrade file.

[0033] Specifically, different upgrade files contain different amounts of data. For upgrade files with large amounts of data, dividing them into several upgrade data packets can ensure transmission reliability and reduce the risk of data loss. The control board receives multiple data bytes in the first upgrade data packet transmitted by the main control board in a preset form through wireless signals, that is, the main control board starts to send each upgrade data packet in packets of 128 data bytes, wherein the data bytes include data identification information, such as the sequence number of the data packet, the total number of packets, the length of the data packet, etc. This information is used to help the receiving end correctly identify and splice the data packets. The preset form (such as a specific data byte format, baud rate, check bit, etc.) can be specifically determined according to the data volume of the upgrade file, and then according to the data identification information, multiple data bytes are spliced ​​according to the preset rules to obtain the first spliced ​​upgrade data packet. The preset rules include a preset data format and a preset data sequence, a preset data format (such as ASCII, binary, hexadecimal, etc.) and a preset data sequence (such as splicing in sequence). Since the control board uses a standard unpacker library, the communication between the main control board and the control board is implemented using a serial port. The main control board and the control board can only send data 1 byte at a time, and the unpacker can receive data in two bytes at a time. Therefore, when the control board receives data and performs checksum verification, it is necessary to pay attention to the big and small end issues and byte shifting to determine the checksum.

[0034] Among them, the big-endian mode is that the low byte of the data is stored in the high address of the memory, and the high byte of the data is stored in the low address of the memory, while the little-endian mode is that the low byte of the data is stored in the low address of the memory, and the high byte of the data is stored in the high address of the memory. The checksum is determined by determining whether the control board uses the big-endian mode or the little-endian mode. Byte shifting may require shifting the individual bytes of data in order to combine them into a larger value for calculation. The shift operation usually involves left shift (<<) or right shift (>>) operations, which change the binary representation of the data but do not change its value (in the sense of modulo operation). The checksum is usually obtained by adding (or combining in other forms) the individual bytes of the data. Therefore, the first upgrade data packet after splicing is verified to ensure the accuracy of the software upgrade, so as to determine whether the checksum of the first upgrade data packet after splicing meets the preset verification conditions. If the checksum of the first upgrade data packet after splicing meets the preset verification conditions, the verification is successful, and the correct response information is returned to the main control board, so that the main control board continues to send multiple data bytes in the next upgrade data packet after receiving the correct response information. This process will continue until the main control board has sent all the upgrade data packets in the upgrade file. The multiple data bytes in the last upgrade data packet have been sent, and the correct 128 bytes of data of all upgrade data packets are written to the specific address in sequence. Through the above steps, during the entire upgrade process, a stable communication connection needs to be maintained between the control board and the main control board, and the control board performs verification after receiving each upgrade data packet, so as to ensure the complete transmission of the data and the correctness of the data.

[0035] It should be noted that the preset form and preset rules can be set according to actual conditions, and this application does not impose any limitations on this.

[0036] In an embodiment of the invention, receiving the upgrade data packet transmitted by the main control board through the wireless signal according to the upgrade response further includes: If the checksum of the spliced ​​first upgrade data packet does not meet the preset check condition, the verification fails, and an error response message is returned to the main control board, so that the main control board resends multiple data bytes in the first upgrade data packet after receiving the error response message until the checksum of the spliced ​​first upgrade data packet meets the preset check condition.

[0037] Specifically, if the checksum of the spliced ​​first upgrade data packet does not meet the preset check condition, the verification fails, and it is necessary to return error frame data to the main control board, that is, return error response information (such as NACK signal) to the main control board, so that the main control board resends multiple data bytes in the first upgrade data packet after receiving the error response information, until the checksum of the spliced ​​first upgrade data packet meets the preset check condition, that is, the control board returns the correct response information of the upgrade data packet, then the verification is successful, and the correct response information is returned to the main control board, so that the main control board continues to send multiple data bytes in the next upgrade data packet after receiving the correct response information. This process will continue. If only the checksum of one of the spliced ​​upgrade data packets fails If the preset verification conditions are not met, it is necessary to return error frame data to the main control board, that is, return error response information (such as NACK signal) to the main control board, so that the main control board resends multiple data bytes in the current one of the spliced ​​upgrade data packets after receiving the error response information, until the checksum of the current one of the spliced ​​first upgrade data packets meets the preset verification conditions, and continue to transmit the next upgrade data packet until the control board returns the correct response information of all upgrade data packets, that is, the main control board has sent all the upgrade data packets in the upgrade file. The multiple data bytes in the last upgrade data packet are sent, and the correct 128 bytes of data of all upgrade data packets are written to the specific address in sequence. Through the above steps, it is possible to feedback errors in a timely manner and resend upgrade data packets, which can ensure that the control board obtains complete and accurate data, thereby improving the reliability of the entire communication process.

[0038] S203: When it is detected that the total number of the received upgrade data packets is consistent with the total number of the upgrade data packets included in the software upgrade request, the upgrade file after transmission is redirected to achieve software upgrade.

[0039] In step S203, during the software upgrade process, the display screen in the cardiopulmonary resuscitation machine will display a progress bar for the transmission of the upgrade data packet, and the control board will continuously receive the upgrade data packet from the main control board. A counter is set in the control board to record the number of upgrade data packets that have been successfully received and verified, that is, to count the total number of packets received. After each new data packet is received, its counter will be updated. When the progress bar for the transmission of the upgrade data packet shows 100%, the control board will detect whether the total number of upgrade data packets received is consistent with the total number of upgrade data packets included in the software upgrade request. If it is detected that the total number of upgrade data packets received is consistent with the total number of upgrade data packets included in the software upgrade request, it is determined that all upgrade data packets have been successfully received and verified. At this time, the control board can assume that the upgrade file has been completely received and is ready for address jump, where address jump usually means transferring the execution pointer of the device (such as the instruction pointer of the CPU) from the currently running code area to the newly upgraded code area, thereby realizing software upgrade.

[0040] In an embodiment of the invention, after the software upgrade is implemented, the following steps are included: A response indicating successful upgrading is returned to the main control board, so that the main control board reads the stored upgrading file according to the response indicating successful upgrading, and upgrades the application corresponding to the upgrading file.

[0041] Specifically, after the control board completes the software upgrade, it returns a successful upgrade response to the main control board, so that the main control board can safely access the upgrade file that has been downloaded and stored in the area before. The main control board will use the read upgrade file content to update or replace the currently running application or firmware, that is, after the control board upgrade is completed, the main control board will automatically enter the upgrade interface of the main control board, and the main control board will enter the boot program. At this time, the Boot program will perform necessary hardware detection and settings, such as configuring memory, CPU, input and output devices, etc., so as to write the resource file in the upgrade file, and directly jump the address after writing is completed, so as to complete the software upgrade of the main control board. After the software upgrade is completed, the upgraded application needs to be verified. If the application in the main control board is successfully verified, the upgrade is displayed as successful. If the application in the main control board fails to be verified, or the resource file is missing, the upgrade is displayed as failed. It should be noted that the main control board can display the upgrade status in real time, and the upgrade status includes upgrade file, upgrade erasing, upgrade burning, upgrade verification, upgrade verification completed, upgrade verification failed, upgrade completed, upgrade failed, etc. Through the above steps, a response indicating successful upgrade is returned to the main control board, and the upgrade steps of the main control board are performed accordingly, which can ensure the reliability and consistency of the main control board upgrade process and improve the user experience.

[0042] In this embodiment, by comparing the total number of upgrade data packets received with the total number of upgrade data packets in the software upgrade request, it can be ensured that all necessary upgrade data packets have been successfully received to achieve the integrity of data transmission, and then address jumping is performed to achieve software upgrade, which can greatly improve the success rate and efficiency of the upgrade.

[0043] S204: When it is detected that the total number of the received upgrade data packets is inconsistent with the total number of the upgrade data packets included in the software upgrade request, a response indicating that the upgrade has failed is returned to the main control board.

[0044] In step S204, during the upgrade process, the control board will continue to receive upgrade data packets from the main control board, and each received upgrade data packet should be counted to ensure that the number of data packets that have been received can be tracked. Once the receiving process is completed, it is necessary to compare the total number of upgrade data packets actually received with the total number of upgrade data packets in the software upgrade request. If the comparison result shows that the total number of upgrade data packets actually received is inconsistent with the specified number, this may mean that the upgrade data packets are lost during transmission, or some data packets are not correctly received due to various reasons (such as network errors, storage failures, etc.). Therefore, once the inconsistency in the number of data packets is detected, the device should immediately send an upgrade failure response to the main control board or other components responsible for upgrade management. This response can be a simple signal (such as a specific error code) or a message containing more detailed information so that the main control board can understand the specific reason for the upgrade failure so as to take corresponding measures for the specific reason for the upgrade failure (such as retrying the upgrade, contacting technical support, etc.).

[0045] In this embodiment, by detecting the inconsistency of the total number of packets of the upgrade data packet and returning a response of upgrade failure, the control board can be prevented from running under incomplete or damaged firmware, thereby avoiding potential failures or safety issues, thereby improving the reliability and security of the software upgrade process.

[0046] In summary, the present invention provides a software upgrade method, device, equipment and medium. When a software upgrade request sent by a main control board is received within a preset time, an upgrade response corresponding to the software upgrade request is sent to the main control board, wherein the software upgrade request is sent after the upgrade file for the application in the main control board is downloaded from the server to its own storage area, wherein the upgrade file includes a plurality of upgrade data packets, and the upgrade data packets transmitted by the main control board through wireless signals according to the upgrade response are received. When it is detected that the total number of packets of the received upgrade data packets is consistent with the total number of packets of the upgrade data packets included in the software upgrade request, the upgrade file after the transmission is completed is redirected to achieve software upgrade. It can be seen that the present application determines that the total number of packets of the upgrade data packets transmitted by the main control board through wireless signals according to the upgrade response is consistent with the total number of packets of the upgrade data packets included in the software upgrade request, thereby redirecting the upgrade file after the transmission is completed to achieve software upgrade, which is not only convenient to operate and low in cost, but also improves the efficiency of software upgrade.

[0047] See also Figure 3 , Figure 3 is a schematic diagram of the structure of the software upgrade device provided in an embodiment of the present invention. The software upgrade device corresponds to the software upgrade method in the above embodiment. Figure 2 as well as Figure 2 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 3 The software upgrading device 30 includes: a sending module 31 , a receiving module 32 , and an upgrading module 33 .

[0048] The sending module 31 is used to send an upgrade response corresponding to the software upgrade request to the main control board when receiving the software upgrade request sent by the main control board within a preset time, wherein the software upgrade request is sent after downloading the upgrade file for the application in the main control board from the server to its own storage area, and the upgrade file includes a plurality of upgrade data packets; A receiving module 32, configured to receive an upgrade data packet transmitted by the main control board through a wireless signal according to the upgrade response; The upgrade module 33 is used to redirect the upgrade file after transmission to achieve software upgrade when it is detected that the total number of the received upgrade data packets is consistent with the total number of the upgrade data packets included in the software upgrade request.

[0049] Optionally, the software upgrading device 30 further includes: a response module 34 .

[0050] The response module 34 is configured to return an upgrade failure response to the main control board when it is detected that the total number of the received upgrade data packets is inconsistent with the total number of the upgrade data packets included in the software upgrade request.

[0051] Optionally, the sending module 31 is specifically used for: When the user enters the wireless upgrade function interface, the USB disk status and network status are detected in real time; Determine whether the main control board enters the wireless upgrade mode according to the USB flash drive status and the network status; If the main control board enters the wireless upgrade mode, a file call request is sent to the server, so that the server downloads the upgrade file to the storage area corresponding to the application program in the main control board according to the file call request.

[0052] Optionally, the sending module 31 is further used for: According to the file call request, download the upgrade file from the server to the storage area corresponding to the application in the main control board; During the process of downloading the upgrade file, detecting whether the size of the downloaded file is greater than or equal to the size of the upgrade file; If the size of the downloaded file is greater than or equal to the size of the upgrade file, it is determined that the file download has been completed, and the downloaded upgrade file is written into the USB flash drive.

[0053] Optionally, the receiving module 32 is specifically used for: Receiving a plurality of data bytes in a first upgrade data packet transmitted by the main control board in a preset form through a wireless signal, wherein the data bytes include data identification information; According to the data identification information, a plurality of the data bytes are spliced ​​according to a preset rule to obtain a spliced ​​first upgrade data packet, wherein the preset rule includes a preset data format and a preset data sequence; Verifying the spliced ​​first upgrade data packet to determine a checksum of the spliced ​​first upgrade data packet; Determining whether the checksum of the spliced ​​first upgrade data packet meets a preset check condition; If the checksum of the spliced ​​first upgrade data packet meets the preset check condition, the verification is successful, and a correct response message is returned to the main control board, so that the main control board continues to send multiple data bytes in the next upgrade data packet after receiving the correct response message, until the main control board has sent multiple data bytes in the last upgrade data packet of all upgrade data packets in the upgrade file.

[0054] Optionally, the receiving module 32 is further used for: If the checksum of the spliced ​​first upgrade data packet does not meet the preset check condition, the verification fails, and an error response message is returned to the main control board, so that the main control board resends multiple data bytes in the first upgrade data packet after receiving the error response message until the checksum of the spliced ​​first upgrade data packet meets the preset check condition.

[0055] Optionally, the upgrade module 33 is specifically used for: A response indicating successful upgrading is returned to the main control board, so that the main control board reads the stored upgrading file according to the response indicating successful upgrading, and upgrades the application corresponding to the upgrading file.

[0056] It should be noted that the information interaction, execution process and other contents between the above-mentioned units are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0057] Figure 4 Schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 4 As shown, the computer device of this embodiment includes: at least one processor ( Figure 4 Only one is shown in the figure), a memory, and a computer program stored in the memory and executable on at least one processor, and when the processor executes the computer program, the steps in any of the above-mentioned software upgrade method embodiments are implemented.

[0058] The computer device may include, but is not limited to, a processor and a memory. It can be understood by those skilled in the art that Figure 4 These are merely examples of computer devices and do not constitute limitations on the computer devices. The computer devices may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, they may also include a network interface, a display screen, and an input system.

[0059] In one embodiment, a computer-readable storage medium is provided, and when the instructions in the computer-readable storage medium are executed by a processor in a computer device, the computer device can perform the steps of any embodiment of a software upgrade method disclosed in the present invention, which will not be repeated here. The computer-readable storage medium can be non-volatile or volatile.

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

[0061] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments, it may also be an external storage device of the computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Further, the memory may also include both an internal storage unit of the computer device and an external storage device. The memory is used to store an operating system, a cooperative application, a boot loader (BootLoader), data, and other programs, such as the program code of a computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.

[0062] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0063] The technical business in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the system is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0064] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A software upgrade method, characterized in that: include: When receiving a software upgrade request sent by the main control board within a preset time, sending an upgrade response corresponding to the software upgrade request to the main control board, wherein the software upgrade request is sent after downloading an upgrade file for the application in the main control board from the server to its own storage area, and the upgrade file includes a plurality of upgrade data packets; receiving an upgrade data packet transmitted by the main control board through a wireless signal according to the upgrade response; When it is detected that the total number of the received upgrade data packets is consistent with the total number of the upgrade data packets included in the software upgrade request, the upgrade file after transmission is redirected to achieve software upgrade.

2. The software upgrade method according to claim 1, characterized in that: Also includes: When it is detected that the total number of the received upgrade data packets is inconsistent with the total number of the upgrade data packets included in the software upgrade request, a response indicating that the upgrade has failed is returned to the main control board.

3. The software upgrade method according to claim 1, characterized in that: The main control board obtains the upgrade file in the following manner, including: When the user enters the wireless upgrade function interface, the USB disk status and network status are detected in real time; Determine whether the main control board enters the wireless upgrade mode according to the USB flash drive status and the network status; If the main control board enters the wireless upgrade mode, a file call request is sent to the server, so that the server downloads the upgrade file to the storage area corresponding to the application program in the main control board according to the file call request.

4. The software upgrade method according to claim 3, characterized in that: The downloading of the upgrade file to a storage area corresponding to the application program in the main control board according to the file call request includes: According to the file call request, download the upgrade file from the server to the storage area corresponding to the application in the main control board; During the process of downloading the upgrade file, detecting whether the size of the downloaded file is greater than or equal to the size of the upgrade file; If the size of the downloaded file is greater than or equal to the size of the upgrade file, it is determined that the file download has been completed, and the downloaded upgrade file is written into the USB flash drive.

5. The software upgrade method according to claim 1, characterized in that: The receiving of the upgrade data packet transmitted by the main control board through the wireless signal according to the upgrade response includes: Receiving a plurality of data bytes in a first upgrade data packet transmitted by the main control board in a preset form through a wireless signal, wherein the data bytes include data identification information; According to the data identification information, a plurality of the data bytes are spliced ​​according to a preset rule to obtain a spliced ​​first upgrade data packet, wherein the preset rule includes a preset data format and a preset data sequence; Verifying the spliced ​​first upgrade data packet to determine a checksum of the spliced ​​first upgrade data packet; Determining whether the checksum of the spliced ​​first upgrade data packet meets a preset check condition; If the checksum of the spliced ​​first upgrade data packet meets the preset check condition, the verification is successful, and a correct response message is returned to the main control board, so that the main control board continues to send multiple data bytes in the next upgrade data packet after receiving the correct response message, until the main control board has sent multiple data bytes in the last upgrade data packet of all upgrade data packets in the upgrade file.

6. The software upgrade method according to claim 5, characterized in that: The receiving of the upgrade data packet transmitted by the main control board through the wireless signal according to the upgrade response also includes: If the checksum of the spliced ​​first upgrade data packet does not meet the preset check condition, the verification fails, and an error response message is returned to the main control board, so that the main control board resends multiple data bytes in the first upgrade data packet after receiving the error response message until the checksum of the spliced ​​first upgrade data packet meets the preset check condition.

7. The software upgrade method according to claim 1, characterized in that: After the software upgrade is implemented, it includes: A response indicating successful upgrading is returned to the main control board, so that the main control board reads the stored upgrading file according to the response indicating successful upgrading, and upgrades the application corresponding to the upgrading file.

8. A software upgrade device, characterized in that: include: A sending module, configured to send an upgrade response corresponding to the software upgrade request to the main control board when receiving the software upgrade request sent by the main control board within a preset time, wherein the software upgrade request is sent after downloading the upgrade file for the application in the main control board from the server to its own storage area, and the upgrade file includes a plurality of upgrade data packets; A receiving module, used for receiving an upgrade data packet transmitted by the main control board through a wireless signal according to the upgrade response; The upgrade module is used to redirect the address of the upgrade file after the transmission is completed to realize software upgrade when it is detected that the total number of the received upgrade data packets is consistent with the total number of the upgrade data packets included in the software upgrade request.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the software upgrade method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the software upgrading method according to any one of claims 1 to 7 is implemented.