Device upgrade method, system, programming tool, device and storage medium
By sorting the devices and staggering their responses, the upgrade failure problem caused by the programming tool's inability to normally receive responses from multiple devices is solved, thereby improving the upgrade success rate and efficiency.
Patent Information
- Application Number
- CN202110650143.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-10
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-06-10
AI Technical Summary
During the device upgrade process, the programming tool cannot normally receive responses from multiple devices, resulting in upgrade failure. The one-to-many upgrade mode in the existing technology is prone to data collision problems.
By sorting multiple devices and assigning a different sort number to each device, the programming tool broadcasts the upgrade command. The devices determine different response times based on the sort number and respond in staggered times to avoid data collisions.
It improves the success rate and efficiency of device upgrades, effectively avoids data collision problems, and is suitable for device upgrades of small memory MCUs.
Smart Images

Figure CN113535191B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of device software update technology, and in particular to a device upgrade method, system, programming tool, device and storage medium. Background Art
[0002] When the firmware or other code of devices such as sensors needs to be upgraded, programming tools are currently commonly used to upgrade the devices. To improve efficiency, programming tools need to perform one-to-many upgrades. Because the firmware code of devices of the same type is the same, programming tools generally use broadcast upgrades. However, most programming tool receivers are in single-task processing mode and can only process one piece of data at a time. Due to this limitation, when upgrading multiple devices, simultaneous responses from multiple devices can cause collisions in the programming tool's reception, resulting in the programming tool being unable to properly receive the responses required for the upgrade process, which can easily lead to upgrade failure. Summary of the Invention
[0003] The present application provides a device upgrade method, system, programming tool, device and storage medium, which are used to solve the technical problem that when a programming tool performs a one-to-many upgrade of a device, the programming tool cannot normally receive the response required for the upgrade process, which easily leads to upgrade failure.
[0004] In order to solve the above problems, the following technical solutions are provided:
[0005] In a first aspect, a device upgrade method is provided, comprising: a programming tool sorting a plurality of devices to be upgraded and sending the sorting numbers obtained by the sorting to corresponding devices; the programming tool broadcasting programming commands for upgrading the plurality of devices; and the programming tool receiving programming response data in which the plurality of devices respond to the programming commands in staggered order according to the assigned sorting numbers.
[0006] In a second aspect, a device upgrade method is provided, including: the device receives a sorting number sent by a programming tool; the device receives a programming command broadcast by the programming tool, the programming command being a command for upgrading the device; the device determines a response time to the programming command based on the sorting number, wherein different sorting numbers have different response times; the device responds to the programming command in a staggered manner according to the response time.
[0007] On the third aspect, a device upgrade system is provided, including a programming tool and multiple devices, wherein: the programming tool is used to sort multiple devices to be upgraded, and send the sorting numbers obtained by sorting to corresponding devices; broadcast programming commands for upgrading multiple devices; the devices are used to receive the programming commands broadcast by the programming tool; based on the sorting numbers, the response time to the programming commands is determined, wherein different sorting numbers have different response time lengths; according to the response time lengths, the programming commands are responded to in staggered periods, and the programming tool is used to receive programming response data of the multiple devices that respond to the programming commands in staggered periods in sequence according to the assigned sorting numbers.
[0008] In a fourth aspect, a programming tool is provided, including: a first processing module for sorting multiple devices to be upgraded; a first sending module for sending the sorting numbers obtained by sorting to corresponding devices, and broadcasting programming commands for upgrading multiple devices; a first receiving module for receiving programming response data of multiple devices that respond to the programming commands in staggered order according to the assigned sorting numbers.
[0009] In a fifth aspect, a device is provided, including: a second receiving module for receiving a sorting number sent by a programming tool, and receiving a programming command broadcast by the programming tool, wherein the programming command is a command for upgrading the device; a second processing module for determining a response time to the programming command based on the sorting number, wherein different sorting numbers have different response times; and a second sending module for staggered responses to the programming command according to the response time.
[0010] In a sixth aspect, a programming tool is provided, comprising a communication interface, a memory and a processor, wherein the memory stores program code, and the processor is used to call the program code and is arranged to implement a device upgrade method as described in any one of the first aspects above when the program code is executed.
[0011] In the seventh aspect, a device is provided, comprising a communication interface, a memory and a processor, wherein the memory stores program code, and the processor is used to call the program code and, when the program code is executed, is arranged to implement a device upgrade method as described in any one of the second aspects above.
[0012] In an eighth aspect, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement a device upgrade method as described in any one of the first aspects, or to implement a device upgrade method as described in any one of the second aspects.
[0013] In the solution implemented by the device upgrade method, system, programming tool, device and storage medium proposed in this application, compared with the traditional solution, the programming tool first sorts the devices and then sends a series of programming commands. For the series of programming commands sent by the programming tool, the device will respond in staggered order according to the sorting number assigned by the programming tool, thereby avoiding data collision problems and improving the upgrade success rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0015] Figure 1 This is a schematic diagram of a system structure of a device upgrade system in an embodiment of the present application;
[0016] Figure 2 This is a schematic diagram of an interactive process of a device upgrade method in an embodiment of the present application;
[0017] Figure 3 1 is a schematic diagram of a sorting process in a device upgrading method according to an embodiment of the present application;
[0018] Figure 4 This is a flowchart of a programming tool in a device upgrade method according to an embodiment of the present application;
[0019] Figure 5 This is a schematic diagram of a process on the device side in the device upgrade method according to an embodiment of the present application;
[0020] Figure 6 This is a schematic diagram of the structure of the programming tool in the embodiment of the present application;
[0021] Figure 7 This is a schematic structural diagram of a device in an embodiment of the present application;
[0022] Figure 8 is another structural diagram of the programming tool in the embodiment of the present application;
[0023] Figure 9 Schematic diagram of another structure of the device in the embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field under the premise of this application are within the scope of protection of this application.
[0025] This application provides a device upgrade system, such as Figure 1 As shown, the device upgrade system includes a programming tool and multiple devices, wherein the device is the device to be upgraded. The programming tool is a device used to upgrade the device's firmware or other code. The programming tool can achieve a communication connection with the device, thereby completing the device upgrade through a communication interaction process. Firmware is a program written into the device's EPROM (erasable programmable read-only memory), EEPROM (electrically erasable programmable read-only memory), or other memory. For example, it can specifically refer to a program written into FLASH memory. Firmware refers to the device "driver" stored inside the device. Through firmware, the device can implement specific operating actions according to the set device driver. Firmware serves as a relatively basic program for a device. Of course, in addition to firmware, some devices may also be equipped with other software, referred to as other code in this application.
[0026] Among them, in the device upgrade system, the programming tool is used to sort multiple devices to be upgraded, and send the sorting numbers obtained by sorting to the corresponding devices; broadcast programming commands for upgrading multiple devices; the devices are used to receive the programming commands broadcast by the programming tool; based on the sorting numbers, the response time to the programming commands is determined, wherein different sorting numbers have different response time lengths; according to the response time length, the programming commands are responded to in staggered periods, and the programming tool is used to receive programming response data of multiple devices that respond to the programming commands in staggered periods in sequence according to the assigned sorting numbers.
[0027] Based on the above-mentioned device upgrade system, a device upgrade method is proposed in the present application, which may refer to a method for upgrading the firmware or other codes of a device. The above-mentioned device may refer to any device configured with firmware. For example, the device may refer to various types of sensors or other devices that require firmware configuration. Taking the sensor as an example, the sensor may refer to a tire pressure sensor, a flow sensor, a position sensor and other sensors. The specific application does not limit this, and examples are not given here one by one, but they are all within the scope of the present application. When the corresponding device is upgraded, a corresponding programming tool is usually required. For example, when upgrading the firmware of the tire pressure sensor, the programming tool may refer to a tire pressure monitoring system (TPMS) programming tool, which is referred to as a TPMS programming tool in the present application. For ease of understanding, in the description examples of the subsequent embodiments, the firmware upgrade of the tire pressure sensor will be explained using the TPMS programming tool as an example, but this example does not limit the present application. See the following embodiments for details.
[0028] Example 1
[0029] like Figure 2 As shown, a device upgrade method is provided. Figure 2 The following is a flow chart of the device upgrade method, which explains the device upgrade method from the perspective of the interaction between the programming tool and the device. It mainly includes the following steps:
[0030] S10: The programming tool sorts the multiple devices to be upgraded.
[0031] S20: The programming tool sends the sorted sequence number to the corresponding device.
[0032] When a programming tool upgrades devices in a one-to-many fashion, it first sorts the devices to be upgraded to obtain a corresponding sequence number for each device. This sequence number indicates the order in which each device should be upgraded. After obtaining the sequence number for each device, the programming tool then feeds the sequence number back to the corresponding device.
[0033] For a device, the device receives a sequence number from the programming tool. For example, if the device includes tire pressure sensor 1, tire pressure sensor 2, ..., and tire pressure sensor N, these N tire pressure sensors can be sorted and the corresponding sequence number can be fed back to the corresponding tire pressure sensor.
[0034] S30: The programming tool broadcasts a programming command for upgrading the multiple devices, so that the multiple devices respond to the programming command in a staggered manner according to the assigned sequence numbers.
[0035] Programming commands are commands that need to be sent to devices during the device upgrade process. Usually, during a complete upgrade process, the programming tool needs to send a series of programming commands to the same device in sequence. This series of programming commands contains the data required for the upgrade (such as the upgrade package). After the programming tool feeds back the corresponding sequence number to the corresponding device and the device receives the corresponding sequence number, since it is a one-to-many upgrade method, the programming tool broadcasts programming commands for upgrading multiple devices, so that multiple devices can respond to the programming commands in sequence according to the assigned sequence numbers.
[0036] S40: The device determines a response time to the programming command based on the sequence number, wherein different sequence numbers have different response time.
[0037] S50: The device responds to the programming command in a staggered manner according to the response duration.
[0038] For each device to be upgraded, after the programming tool broadcasts the programming command for upgrading multiple devices, each device within the range can receive the programming command broadcast by the programming tool. After receiving the programming command, the device can determine the corresponding response time based on its own sorting number, and different sorting numbers correspond to different response times. Then, according to the response time, the programming command is responded to in staggered periods, thereby completing the upgrade process.
[0039] It's understandable that because each device receives a different sequence number, each device determines a different response time based on its corresponding sequence number. Consequently, different devices respond to programming commands according to their own response times, resulting in staggered responses. This allows the programming tool to receive programming response data from different devices in staggered periods. For a series of programming commands, both the programming tool and the devices can implement corresponding staggered processing. The programming tool can stagger the entire upgrade process for multiple devices, effectively avoiding data collisions.
[0040] For example, continuing with the above-mentioned N tire pressure sensors, for each tire pressure sensor, it receives the sorting number fed back by the programming tool. For example, after receiving a programming command A broadcast by the programming tool, these N tire pressure sensors respond to the programming command A in turn according to their own response time, so as to stagger the programming response data and feed it back to the programming tool. In this way, after a series of programming command broadcasts, the programming tool can complete the upgrade of these N tire pressure sensors.
[0041] It can be seen that in the device upgrade method provided in the embodiment of the present application, compared with the traditional solution, after all the devices are sorted, for a series of programming commands sent by the programming tool, the devices will respond in staggered manner according to the sorting numbers assigned by the programming tool, thereby avoiding data collision problems and improving the upgrade success rate. Since the one-to-many upgrade is successfully achieved, the upgrade efficiency is effectively improved and it has high practicality.
[0042] It should be noted that, as one example, the above-mentioned specific upgrade process of the device can be carried out using the Firmware Over-The-Air (FOTA) differential upgrade method. Taking the tire pressure sensor as an example, the TPMS programming tool obtains the verification value of the APP bin file of the tire pressure sensor to be upgraded, compares the verification value of the APP bin file with the upgrade APP bin file, calculates the difference, and the programming tool sends the upgrade package of the difference part to the tire pressure sensor to be upgraded through programming commands. Using FOTA differential upgrade can improve upgrade efficiency and is suitable for devices with small memory MCUs.
[0043] It should be noted that the programming tool sorts multiple devices and sends the sorted numbers to the corresponding devices, such as Figure 3 As shown, the process includes the following steps ab:
[0044] a. The programming tool broadcasts a sorting broadcast command, where the sorting broadcast command includes a response control identifier, and the response control identifier is used to instruct an unsorted device among the multiple devices to respond.
[0045] The process of sorting multiple devices to be upgraded can be achieved by broadcasting. In the embodiment of the present application, two broadcast commands for controlling the responses of the devices are preset in the broadcast commands of the programming tool.
[0046] One of the broadcast commands is a sorted broadcast command that includes a response control identifier. As the name suggests, the sorted broadcast command is also a broadcast command. All devices within the broadcast command signal reception range can receive the sorted broadcast command. The special thing is that the sorted broadcast command includes the response control identifier defined in this application. To distinguish it from other broadcast commands, it is called a sorted broadcast command in this application, wherein the response control identifier is used to instruct the unsorted device that receives the sorted broadcast command to respond.
[0047] Another type of broadcast command is a sorting number assignment broadcast command that includes a device ID and a sorting number. As the name suggests, the sorting number assignment broadcast command is also a broadcast command. All devices within the receiving range of the broadcast command signal can also receive the sorting number assignment broadcast command. The special thing is that the sorting number assignment broadcast command includes a device ID. To distinguish it from other broadcast commands, it is called a sorting number assignment broadcast command in this application, wherein the device ID in the sorting number assignment broadcast command is used to instruct the response device that matches the device ID to save the sorting number and respond to the sorting number assignment broadcast command.
[0048] It can be seen that, based on the above two types of broadcast commands, this application will pre-set two types of response controls for the device in the broadcast commands of the programming tool, which can be reflected in the broadcast ID. For example, ID[3] and ID[4] in the broadcast command represent the third and fourth bits of the broadcast ID respectively. The above two types of broadcast commands can be shown as follows:
[0049] The first response control: ID[3]==0xFF&&ID[4]==0xFF, used to instruct unsorted devices to respond;
[0050] The second response control: ID[3]==0xXX&&ID[4]==0xXX, is used to indicate a response only when the device ID matches.
[0051] In step a, the purpose of the sorting number allocation broadcast command will be gradually expanded in the subsequent description. Here, the programming tool first broadcasts the sorting broadcast command. For example, the sorting broadcast command T1 can be as follows:
[0052] T1: FF FF FF FF 0B 11 00 FF aa 55 99 66 FF FF 00 0F e9;
[0053] The first four bytes FF FF FF FF are the broadcast ID. When a device receives a broadcast command with the first four bytes being FF FF FFFF, it can determine that the broadcast command is a sequenced broadcast command.
[0054] In addition, it should be noted that the unsorted devices referred to in this application refer to devices that have not been assigned a sorting number by the programming tool. For a device, it will determine whether it has been sorted by determining whether it has received a sorting number. That is, when the device determines that it has received a sorting number fed back by the programming tool, it means that it has been sorted. The device will refuse to respond to the sorting broadcast command, that is, it will not respond to the sorting broadcast command currently received. When the device determines that it has not received a sorting number fed back by the programming tool, it means that it has not been sorted. The device uses a delayed response method to respond to the programming tool with sorting response data containing its own device ID. Among them, the length of the device's delayed response is determined by the sorting round in which the sorting broadcast command is received and its own device ID.
[0055] It should be noted that the device ID is the unique identification ID of the device, which is the ID configured by the device manufacturer. Unless there are special circumstances, the general device ID is a number. If there are special circumstances, such as the device ID contains non-numeric characters and numeric characters, the device ID of this application refers to the digital ID. For the sake of convenience of description, the digital ID is used as an example in the following description.
[0056] It's also important to note why a device's delayed response duration is linked to the sorting round in which it receives the sorting broadcast command and its device ID. This is because, after receiving a sorting broadcast command, a device needs to determine whether it's the initial sorting broadcast command received during an upgrade process or one of several other sorting broadcast commands received during that upgrade process. If it's the initial sorting broadcast command received during an upgrade process, it's the first sorting round. Since the interval between the last upgrade broadcast command and the last received broadcast command is typically quite long, for example, if an upgrade occurred 20 days ago, then the upgrade broadcast command would have been received 20 days ago. For other sorting broadcast commands during the same upgrade process, beyond the initial sorting broadcast command, i.e., subsequent rounds (second, third, and so on), the intervals between these upgrade broadcast commands are typically shorter. Therefore, for each device, depending on the previous sorting process, there may be multiple subsequent sorting processes, and a particular device may receive multiple sorting broadcast commands. The device needs to determine which sorting broadcast command is being received based on the sorting round, and thus choose a corresponding delayed response duration strategy based on the specific situation.
[0057] Therefore, when the first round of sorting is being performed, i.e., the received sorting broadcast command is the first round of sorting command, the unsorted device is configured to respond using its corresponding first delay duration. When the sorting broadcast command is received for subsequent rounds of sorting after the first round, i.e., when the received sorting broadcast command is a subsequent round of sorting command, the unsorted device is configured to respond using its corresponding second delay duration. The first delay duration is determined by the device ID corresponding to the unsorted device, and the second delay duration is determined by the variant ID corresponding to the unsorted device's device ID. The variant IDs corresponding to unsorted devices vary in different sorting rounds. When the interval between received sorting broadcast commands exceeds the preset interval duration, it indicates that the received sorting broadcast command is the first batch of upgrades, i.e., the sorting broadcast command sent in the first round of sorting. For devices within the range of the sorting broadcast command, after the first delay duration, they will respond to the programming tool with sorting response data containing their own device ID in response to the sorting broadcast command. The special feature is that the first delay duration for different devices is determined by the device ID corresponding to the device.
[0058] In one embodiment, the first delay duration corresponding to the unsorted device is determined by the device ID corresponding to the device and the preset upper limit of the number of devices to be upgraded. Specifically, as one example, the first delay duration corresponding to the unsorted device can be determined by the following calculation method: n*T; wherein n is the device ID corresponding to the unsorted device modulo the preset upper limit of the number of devices. More specifically, n is the device ID modulo the preset upper limit of the number of devices based on the last byte of its own device ID. T is the preset delay period. T can be configured according to the actual application scenario. As an example, T can be 25ms (milliseconds). It should be noted that in addition to modulo the preset upper limit of the number of devices, in actual use, other empirical values can also be used for modulo, or even combined with the device ID, other calculation methods can be used to obtain the first delay duration. This application does not limit this.
[0059] The upper limit of the number of preset devices is determined by the size of the device's memory space. It should be noted that for most programming tools, the number of devices that the programming tool can program simultaneously is limited by the device's memory space. Therefore, the upper limit of the number of devices that the programming tool can program simultaneously must be determined based on the device's memory space, which is also the upper limit of the number of preset devices. For example, the number of tire pressure sensors that a TPMS programming tool can program simultaneously is limited by the tire pressure sensor's MCU Flash memory space. Therefore, the upper limit of the number of sensors that the TPMS programming tool can program simultaneously must be determined based on the tire pressure sensor's MCU Flash memory space.
[0060] Here we may take the example of dividing the Flash memory of the tire pressure sensor MCU into 6K bytes APP + 2kbytes BootLoader. Since the BootLoader (used to boot the loader) occupies only 2KB of memory space, it is impossible to implement a complex anti-collision algorithm. In order to avoid data collision, only a millisecond delay function can be set. At the same time, considering the time it takes for the tire pressure sensor to send a high-frequency response command, it is finally selected to support 8 sensors that can be programmed at one time, that is, the corresponding upper limit of the number of tire pressure sensors that can be upgraded at one time is 8. The above-mentioned upper limit of the number of sensors is pre-written into the tire pressure sensor to facilitate the implementation of the device upgrade method provided in this application.
[0061] Assuming there are eight tire pressure sensors to be upgraded, place them near the TPMS programming tool, for example, within 30cm directly above it. The TPMS programming tool first sends a sequence broadcast command (T1). After receiving this sequence broadcast command, the eight tire pressure sensors enter BootLoader mode. Since all tire pressure sensors have not yet been sequenced, they can all receive and respond to the sequence broadcast command simultaneously. The tire pressure sensors then calculate the remainder n (any one from 1 to 7) modulo the preset value 8 (the upper limit of the number of sensors that can be programmed simultaneously) based on the last byte of their device IDs, thereby implementing a simple response delay of n*25ms. The TPMS programming tool then performs sequencing based on the order in which the responses are received from the tire pressure sensors.
[0062] For example, assume there are eight tire pressure sensors, A, B, C, D, E, F, G, and H. After receiving the aforementioned sorting broadcast command T1, the tire pressure sensors use their device IDs and the delay function (n*25) to determine that the delay durations for tire pressure sensor C and D are 0ms and 50ms, respectively. The remaining tire pressure sensors all have the same delay duration. In this example, because the eight tire pressure sensors have different first delay durations, and therefore respond to the sorting broadcast command at different speeds, the programming tool will receive the corresponding sorting response data at different time points. The programming tool will first receive the sorting response data from tire pressure sensor C, followed by the sorting response data from tire pressure sensor D, and will not receive the remaining sorting response data normally.
[0063] b. The programming tool sorts the response devices that sent the sort response data according to the order of the received sort response data.
[0064] c. The programming tool feeds back the sequence number to the corresponding response device.
[0065] As mentioned above, each tire pressure sensor's response carries its own device ID. The TPMS programming tool obtains the device IDs carried in the sorted response data of C and D. The programming tool assigns corresponding sort numbers to the IDs based on the order of the responses to complete the sorting process and sends the sorted tire pressure sensors back the sorted numbers. Assuming the sorting results obtained in the first round of sorting (let m be the sorting number, ranging from 1 to 8), the final result can be shown as follows:
[0066] C(m:01), D(m:02), A, B, E, F, G, H are not sorted;
[0067] Therefore, the programming tool feeds back the sequence number 1 and sequence number to the tire pressure sensor C and sensor D, respectively.
[0068] In one embodiment, the programming tool sorts the response devices that send the sorting response data according to the order of the received sorting response data, and feeds back the sorting number to the corresponding response device. Specifically, the programming tool generates a sorting number assignment broadcast command corresponding to each response device and broadcasts it. The sorting number assignment broadcast command includes a device ID and a sorting number, wherein the device ID in the sorting number assignment broadcast command is used to control the response device with a matching ID to save the sorting number and respond to the sorting number assignment broadcast command, so that the device matching the device ID in the sorting number assignment broadcast command responds.
[0069] As mentioned above, since the TPMS programming tool only obtains the sorting response data containing the device ID responded by tire pressure sensor C and tire pressure sensor D, based on the results of the first round of sorting, the TPMS programming tool generates sorting number allocation broadcast commands corresponding to tire pressure sensor C and tire pressure sensor D respectively, one of which is a sorting number allocation broadcast command T2 containing the device ID of tire pressure sensor C and sorting number (01), and the other includes the device ID of tire pressure sensor D and sorting number (02). According to the sorting, the TPMS programming tool first broadcasts the sorting number allocation broadcast command T2. At this time, according to the response control, since the sorting number allocation broadcast command T2 contains the device ID of tire pressure sensor C, only tire pressure sensor C will respond to the sorting number allocation broadcast command T2. After receiving the response data R2 containing the device ID responded by tire pressure sensor C, the programming tool broadcasts the sorting number allocation broadcast command T3. Similarly, at this time, only tire pressure sensor D will respond to the sorting number allocation broadcast command T3 with response data R3. Thus, the programming tool sends the assigned sorting numbers to sensors C and D respectively, and the first round of sorting is completed.
[0070] For example:
[0071] T2: C3 3D 84 E6 0B 11 00 FF aa 55 99 66 FF FF 01 0F e9;
[0072] The device ID of tire pressure sensor C in T2 is: C3 3D 84 E6, and the sequence number is 01.
[0073] R2: C3 3D 84 E6 10 51 41 41 42 43 33 33 33 33 33 34 34 34 35 45 47;
[0074] Tire pressure sensor C responds R2 to indicate successful receipt of the sequence number.
[0075] T3: C3 3D 88 99 0B 11 00 FF aa 55 99 66 FF FF 02 0F e9;
[0076] The device ID of the tire pressure sensor D in T3 is: C3 3D 88 99, sort number 02.
[0077] R3: C3 3D 88 99 10 51 41 41 42 43 33 33 33 33 33 34 34 34 35 45 47;
[0078] Tire pressure sensor C responds R3 to indicate successful receipt of the sequence number.
[0079] It's worth noting that after the programming tool generates and broadcasts the broadcast command for assigning a sequence number to each responding device, it receives the assignment response data and, based on the assignment response data, determines which device has been successfully assigned a sequence number. In the example above, the received assignment response data R2 and R3 indicate that tire pressure sensors C and D, respectively, have received a sequence number.
[0080] d. The programming tool repeats steps ac above to continue assigning sort numbers to the remaining unsorted devices among the multiple devices to be upgraded until a preset sorting cutoff condition is met.
[0081] When the preset sorting cutoff condition is not met, the programming tool will continue to broadcast the sorting broadcast command, that is, it will repeat the above steps ab until it continues to assign sorting numbers to the remaining unsorted devices in the multiple devices to be upgraded, until the preset sorting cutoff condition is met. The preset sorting cutoff condition is: the number of sorted devices in the multiple devices to be upgraded reaches the preset upper limit of the number of devices, or no new device sorting is added within the preset time length after the last round of sorting, or the total sorting time of the multiple devices to be upgraded reaches the preset total time length. It should be noted that the above preset sorting cutoff conditions are all set in order to obtain the required sorted devices. Among them, if no new device sorting is added within the preset time length after the last round of sorting, it means that the sorting has been completed and the sorting process will be exited. The preset total time length is an empirical value and can also be set in advance. There is no specific limitation.
[0082] It can be understood that, taking the above example, the upper limit of the number of tire pressure sensors that the TPMS programmer can program simultaneously is 8. After the first round of sorting, that is, only the tire pressure sensors C and D are assigned sorting numbers, it is obviously not in line with the preset cutoff conditions, because there are still 6 to be sorted. The TPMS programmer will continue to broadcast the sorting broadcast command.
[0083] For the devices, there are two types of devices at this time, one is the device that has been assigned a sorting number (C and D), and the other is the device that has not yet been assigned a sorting number (A, B, E, F, G, H). At this time, the devices that have been assigned a sorting number (C and D) will not respond to the second round of sorting broadcast commands, and the devices that have not yet been assigned a sorting number (A, B, E, F, G, H) will continue to respond to the second round of sorting broadcast commands. Specifically, the unsorted device responds to the programming tool with sorting response data containing its own device ID after the second delay period. The second delay period is determined by the variant ID corresponding to the device ID of the unsorted device itself, and the variant ID corresponding to the unsorted device is different in different sorting rounds.
[0084] More specifically, as one example, the second delay duration corresponding to an unsorted device is determined by the following calculation: p*T; where p is the modulo of the variant ID corresponding to the device ID of the unsorted device and the preset device quantity upper limit, and T is the preset delay period, which can be configured based on the actual application scenario. As an example, T can be 25ms (milliseconds). It should be noted that the variant ID corresponding to the unsorted device is obtained by shifting the last byte of the device ID of the unsorted device left or right by a preset number of bits, which is not specifically limited.
[0085] For example, after obtaining the first round of sorting, the TPMS programming tool uses the first response control method to send a broadcast sorting broadcast command T4. After receiving the command T4, all unsorted tire pressure sensors (A, B, E, F, G, H) shift the last byte of their own device ID by one byte to the left (or right, the shift direction and the number of shifts can be flexibly set, and the left shift is taken as an example here), and then re-take the remainder of the upper limit value 8, the remainder n (any one from 1 to 7), and then realize the simple response delay n Z *25ms. For example, the unsorted tire pressure sensor is E, and its device ID is (0x25). The remainder after 8 is 1, and the delay is 1*25ms. In the next sorting, the device ID of tire pressure sensor E is shifted left, and the device ID of tire pressure sensor E (0x25) will become (0x4A). That is, the deformation ID corresponding to tire pressure sensor E is (0x4A). The remainder after 8 is 2. Therefore, the second delay duration corresponding to tire pressure sensor E is 2*25ms. By recalculating the response delay, the collision of unsorted sensor responses can be reduced. It should be noted that if tire pressure sensor E continues to participate in the next sorting, the second delay duration corresponding to tire pressure sensor E will be shifted left by one byte of the deformation ID (0x4A) of the previous sorting round to obtain a new deformation ID, and continue to participate in the delay duration determination of this round of sorting. Other situations are similar and will not be explained here one by one.
[0086] For example:
[0087] T4: FF FF FF FF 0B 11 00 FE aa 55 99 66 FF FF 00 0F e9
[0088] According to the sorting results and response control of the first round, tire pressure sensors C and D are sorted and will not respond to the sorting broadcast command T4. Sensors A, B, D, E, F, G, and H are not sorted. After receiving the sorting broadcast command T4, sensors A, B, E, F, G, and H shift their own serial numbers one position to the left and take the remainder of 8. Assuming that the remainder of the deformation ID of each unsorted tire pressure sensor taken the remainder of the upper limit value 8 is: A(3), B(3), E(1), F(5), G(4), H(7), and the remainder is in the brackets, then the second round sorting result is C(m:1), D(m:2), E(m:3), G(m:4), F(m:5), H(m:6), and A and B are not sorted.
[0089] Similarly, each time the tire pressure sensor responds to the sorting broadcast command, it carries its own device ID. The TPMS programming tool obtains the device ID carried in the sorting response data of tire pressure sensors E, G, F, and H, and assigns corresponding sorting numbers to tire pressure sensors E, G, F, and H according to the order of response. Then, based on E, G, F, and H and their corresponding sorting numbers, as well as the second response control above, the sorting numbers assigned to them are sent to tire pressure sensors E, G, F, and H respectively to complete the second round of sorting. The process of assigning sorting numbers to them can also be found in the description of the aforementioned embodiment and will not be described in detail here.
[0090] Afterwards, the programming tool uses the first response control to send the sorting broadcast command T5, and repeats this cycle to sort the unsorted tire pressure sensors in sequence until the number of sorted devices reaches the preset upper limit of 8 tire pressure sensors to be upgraded, or no new sensors are added to the sorting within the preset time (such as 2s) after the previous round of sorting, or the total sorting time reaches the preset total time (such as 15s), then the sorting process ends.
[0091] It should be noted that the descriptions involving specific numbers such as the preset duration, total duration, and upper limit of the number of devices after the last round of sorting are all examples and do not limit this application.
[0092] It can be understood that through the above sorting process, as the sorting rounds increase, the number of remaining unsorted devices will become fewer and fewer, and the probability of data collision will eventually become lower and lower, which effectively improves the upgrade success rate, solves the problem of high-frequency communication data collision in one-to-many programming, and improves the upgrade efficiency. Moreover, this anti-collision processing method does not need to occupy a large amount of memory, and is suitable for processing devices such as small-memory MCUs, and has strong practicality.
[0093] Example 2
[0094] In the above embodiment 1, the interaction between the programming tool and the device is described. Figure 4 As shown, the embodiment of the present application is described here from the perspective of the programming tool, including the following steps:
[0095] S10A: The programming tool sorts the multiple devices to be upgraded, and sends the sorted sort numbers to the corresponding devices.
[0096] S20A: The programming tool broadcasts programming commands for upgrading multiple devices.
[0097] S30A: The programming tool receives programming response data from multiple devices that respond to programming commands in staggered order according to the assigned sequence numbers.
[0098] In one embodiment, a programming tool sorts a plurality of devices to be upgraded and sends the sorted sort numbers to the corresponding devices, including the following steps:
[0099] a. The programming tool broadcasts a sort broadcast command, which includes a response control identifier. The response control identifier is used to instruct an unsorted device among multiple devices to respond;
[0100] b. The programming tool sorts the response devices that sent the sort response data according to the order of the received sort response data;
[0101] c. The programming tool feeds back the sequence number to the corresponding response device;
[0102] d. The programming tool repeats steps ac above to continue assigning sort numbers to the remaining unsorted devices in the plurality of devices to be upgraded until a preset sorting cutoff condition is met;
[0103] Among them, the unsorted devices respond to the sorting broadcast command in a delayed manner, and the delayed response duration of each unsorted device is determined by the sorting round in which the sorting broadcast command is received and its own device ID.
[0104] In one embodiment, the preset sorting cutoff condition is: the number of sorted devices among multiple devices to be upgraded reaches the preset upper limit of the number of devices, or no new devices are added to the sorting within the preset time after the last round of sorting, or the total sorting time of multiple devices to be upgraded reaches the preset total time.
[0105] In one embodiment, the programming tool feeds back the sequence number to the corresponding sequenced device, including the following steps:
[0106] The programming tool generates a sequence number allocation broadcast command corresponding to each transponder device, and broadcasts the sequence number allocation broadcast command;
[0107] The sequence number allocation broadcast command includes a device ID and a sequence number, and the device ID is used to control a response device with a matching ID to store the sequence number and respond to the sequence number allocation broadcast command.
[0108] For more details of the above-mentioned programming tool, please refer to the description of the aforementioned interactive embodiment. It can be seen that in the device upgrade method provided in the embodiment of the present application, compared with the traditional solution, after the programming tool sorts all the devices to be upgraded, the programming tool will send a series of programming commands, so that the devices will respond in staggered manner according to the sorting numbers assigned by the programming tool, and the programming tool will receive the programming response data in a staggered manner, thereby avoiding data collision problems and improving the upgrade success rate. Since the one-to-many upgrade is successfully achieved, the upgrade efficiency is also effectively improved, and it has high practicality.
[0109] Example 3
[0110] In the above embodiment 1, the interaction between the programming tool and the device is described, and the embodiment 2 is described from the perspective of the programming tool. Figure 5 As shown, the embodiment of the present application is described here from the perspective of the device side, including the following steps:
[0111] S10B: The device receives the sequence number sent by the programming tool.
[0112] S20B: The device receives a programming command broadcast by the programming tool, where the programming command is a command for upgrading the device.
[0113] S30B: The device determines a response time to the programming command based on the sequence number, wherein different sequence numbers have different response time.
[0114] S40B: The device responds to programming commands in staggered intervals according to the response duration.
[0115] In one embodiment, the device receives a sequence number sent by a programming tool, including the following steps:
[0116] The device receives a sorting broadcast command sent by a programming tool, the sorting broadcast command includes a response control identifier, and the response control identifier is used to instruct an unsorted device among the multiple devices to respond;
[0117] The device determines whether it has received the sequence number fed back by the programming tool;
[0118] If the device determines that it has not received the sequencing number fed back by the programming tool, it will respond to the programming tool with sequencing response data containing its own device ID in a delayed response mode. The length of the device's delayed response is determined by the sequencing round of the received sequencing broadcast command and its own device ID.
[0119] The device receives the sorting number fed back by the programming tool, which is the sorting number obtained by the programming tool after sorting the response devices that sent the sorting response data according to the order of the received sorting response data.
[0120] In one embodiment, when it is determined that the device has received the sequence number fed back by the programming tool, the device refuses to respond to the sequence broadcast command.
[0121] In one embodiment, the device responds to the programming tool with sorting response data containing its own device ID using a delayed response method, including the following steps: when the received sorting broadcast command is the first round of sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a first delay period, and the first delay period is determined by its own device ID and a preset upper limit value for the number of devices; when the received sorting broadcast command is another round of sorting command subsequent to the first round of sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a second delay period, and the second delay period is determined by a variant ID corresponding to its own device ID and a preset upper limit value for the number of devices.
[0122] In one embodiment, a device determines the first delay duration by n*T and the second delay duration by p*T; where n is the modulo of the device ID and a preset upper limit on the number of devices, p is the modulo of the variant ID corresponding to the current round and a preset upper limit on the number of devices, and T is the preset delay period. In one embodiment, the variant ID corresponding to a device is obtained by shifting the last byte of the device ID left or right by a preset number of bits.
[0123] It can be seen that in the device upgrade method provided in the embodiment of the present application, compared with the traditional solution, the device can receive the sorting number fed back by the programming tool. In this way, after the device receives the programming instructions fed back by the programming tool, the device will respond in a staggered manner according to the sorting number assigned by the programming tool, thereby avoiding data collision problems and improving the upgrade success rate.
[0124] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order 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 this application.
[0125] Example 4
[0126] In one embodiment, a programming tool is provided. The programming tool may be a TPMS programming tool or other programming tool. The programming tool corresponds to the programming tool in the device upgrade method in the above embodiment. Figure 6 As shown, the programming tool includes a first processing module 101, a first sending module 102, and a first receiving module 103. The functional modules are described in detail as follows: the first processing module 101 is used to sort multiple devices to be upgraded; the first sending module 102 is used to send the sorted sequence numbers to the corresponding devices and broadcast programming commands for upgrading the multiple devices; the first receiving module 103 is used to receive programming response data from multiple devices in staggered responses to the programming commands according to the assigned sequence numbers.
[0127] In one embodiment, the first processing module 101 is used to implement the following steps: a. broadcasting a sorting broadcast command, the sorting broadcast command including a response control identifier, the response control identifier being used to instruct unsorted devices among a plurality of devices to respond; b. sorting the response devices that send the sorting response data according to the order of the received sorting response data; the first sending module 102 is used to: c. feed back the sorting number to the corresponding response device; the programming tool repeats the above steps ac through the first processing module 101 and the sending module 102 to continue assigning sorting numbers to the remaining unsorted devices among the plurality of devices to be upgraded until the preset sorting cutoff condition is met.
[0128] In one embodiment, the preset sorting cutoff condition is: the number of sorted devices among multiple devices to be upgraded reaches the preset upper limit of the number of devices, or no new devices are added to the sorting within the preset time after the last round of sorting, or the total sorting time of multiple devices to be upgraded reaches the preset total time.
[0129] In one embodiment, the first processing module 101 is specifically used to: generate a corresponding sorting number assignment broadcast command for each response device, wherein the sorting number assignment broadcast command includes a device ID and a sorting number, and the device ID is used to control the response device with a matching ID to save the sorting number and respond to the sorting number assignment broadcast command; the first sending module 102 is specifically used to: broadcast the sorting number assignment broadcast command so that the device matching the device ID in the sorting number assignment broadcast command responds.
[0130] In one embodiment, a device is provided, which may be a tire pressure sensor or other device, and the device corresponds one-to-one with the device in the device upgrade method in the above embodiment. Figure 7 As shown, the device includes a second receiving module 201, a second processing module 202, and a second sending module 203. The functional modules are described in detail as follows: the second receiving module 201 is used to receive the sequence number sent by the programming tool and receive the programming command broadcast by the programming tool, which is a command for upgrading the device; the second processing module 202 is used to determine the response time for the programming command based on the sequence number, where different sequence numbers have different response times; and the second sending module 203 is used to stagger responses to the programming command according to the response time.
[0131] In one embodiment, the second receiving module 201 is used to: receive a sorting broadcast command sent by a programming tool, the sorting broadcast command includes a response control identifier, and the response control identifier is used to instruct unsorted devices among multiple devices to respond; the second processing module 202 is used to: determine whether the sorting number fed back by the programming tool has been received; the second sending module 203 is used to use a delayed response method to respond to the programming tool with sorting response data including its own device ID when it is determined that the sorting number fed back by the programming tool has not been received, wherein the delayed response duration of the device is determined by the sorting round of the received sorting broadcast command and its own device ID; the second receiving module 201 is used to: receive the sorting number fed back by the programming tool, which is the sorting number obtained after the programming tool sorts the responding devices that sent the sorting response data according to the order of the received sorting response data.
[0132] In one embodiment, the second processing module 202 is configured to: when the device determines that it has received the sequence number fed back by the programming tool, not respond to the sequence broadcast command.
[0133] In one embodiment, the second sending module 203 is used to: when the received sorting broadcast command is the first round sorting command, after a first delay period, respond to the programming tool with sorting response data containing its own device ID, and the first delay period is determined by its own device ID and a preset upper limit value for the number of devices; when the received sorting broadcast command is another round of sorting command subsequent to the first round of sorting command, after a second delay period, respond to the programming tool with sorting response data containing its own device ID, and the second delay period is determined by a variant ID corresponding to its own device ID and a preset upper limit value for the number of devices, and the variant IDs corresponding to different sorting rounds are different.
[0134] In one embodiment, the second processing module 202 is used to: determine the first delay length by n*T, and determine the second delay length by p*T; wherein n is the device ID of the device modulo the preset device quantity upper limit value, p is the deformation ID corresponding to the current round of the device modulo the preset device quantity upper limit value, and T is the preset delay period.
[0135] In one embodiment, the variant ID corresponding to the device is obtained by shifting the last byte of the device ID left or right by a preset number of bits.
[0136] For the specific limitations of programming tools and devices, please refer to the relevant limitations of the device upgrade method above, which will not be repeated here. The various modules in the above-mentioned programming tools and devices can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the programming tool or device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0137] Example 5
[0138] In one embodiment, a programming tool is provided. The programming tool may be a TPMS programming tool, and its internal structure diagram may be as follows: Figure 8 As shown. The programming tool includes a processor, a memory and a communication interface connected via a system bus. The processor of the programming tool is used to provide computing and control capabilities. The memory of the programming tool includes a non-volatile storage medium and / or a volatile storage medium, and an internal memory, and the non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the programming tool is used to communicate with an external device via a network connection. When the computer program is executed by the processor, the steps or functions on the programming tool side of a device upgrade method are implemented.
[0139] In one embodiment, a device is provided. The device may be a tire pressure sensor, and its internal structure may be as shown in FIG. Figure 9 As shown. The device includes a processor, a memory, and a communication interface connected via a system bus. The processor of the device is used to provide computing and control capabilities. The memory of the device includes a non-volatile storage medium and / or a volatile storage medium, and an internal memory, wherein the non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the device is used to communicate with an external programming tool via a network connection. When the computer program is executed by the processor, it implements the steps or functions on the device side of a device upgrade method.
[0140] In one embodiment, a programming tool is provided, including a communication interface, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: sorting a plurality of devices to be upgraded; calling the communication interface to send the sorted sorting numbers to the corresponding devices; calling the communication interface to broadcast programming commands for upgrading the plurality of devices; and receiving programming response data through the communication interface, in which the plurality of devices respond to the programming commands in staggered order according to the assigned sorting numbers.
[0141] In one embodiment, a device is provided, comprising a communication interface, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: receiving a sorting number sent by a programming tool through the communication interface; receiving a programming command broadcast by the programming tool, wherein the programming command is a command for upgrading the device; determining a response duration to the programming command based on the sorting number, wherein different sorting numbers have different response durations; and performing staggered responses to the programming command using the communication interface according to the response duration.
[0142] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0143] Sort multiple devices to be upgraded; call a communication interface to send the sorted sort numbers to corresponding devices; call the communication interface to broadcast programming commands for upgrading multiple devices; receive programming response data through the communication interface, in which multiple devices respond to the programming commands in staggered order according to the assigned sort numbers.
[0144] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0145] Receive a sorting number sent by a programming tool through a communication interface; receive a programming command sent by the programming tool, where the programming command is a command for upgrading a device; determine a response time to the programming command based on the sorting number, wherein different sorting numbers have different response times; and utilize the communication interface to perform staggered responses to the programming command according to the response time.
[0146] Those skilled in the art will appreciate 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. 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 can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various 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).
[0147] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0148] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A device upgrade method, characterized in that: include: The programming tool sorts the multiple devices to be upgraded and sends the sorted sort numbers to the corresponding devices; The programming tool broadcasts a programming command for upgrading the plurality of devices; The programming tool receives programming response data from the plurality of devices in staggered responses to the programming command in sequence according to the assigned sequence numbers, wherein the programming tool sends an upgrade package containing the difference parts to the tire pressure sensor to be upgraded; The programming tool sorts a plurality of devices to be upgraded and sends the sorted sort numbers to the corresponding devices, including: a. The programming tool broadcasts a sorting broadcast command, wherein the sorting broadcast command includes a response control identifier, and the response control identifier is used to instruct unsorted devices among the plurality of devices to respond; b. the programming tool sorts the response devices that send the sort response data according to the order of the received sort response data; c. The programming tool feeds back the sequence number to the corresponding response device; d. The programming tool repeats steps ac above to continue assigning sort numbers to the remaining unsorted devices in the plurality of devices to be upgraded until a preset sorting cutoff condition is met; The unsorted devices respond to the sorting broadcast command in a delayed manner, and the length of the delayed response of each unsorted device in each sorting round is determined by the sorting round in which the sorting broadcast command is received and its own device ID; When the received sorting broadcast command is a first-round sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a first delay period, and the first delay period is determined by its own device ID and a preset upper limit on the number of devices; when the received sorting broadcast command is a subsequent-round sorting command of the first-round sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a second delay period, and the second delay period is determined by a variant ID corresponding to its own device ID and the preset upper limit on the number of devices.
2. The device upgrade method according to claim 1, wherein: The preset sorting cutoff condition is: the number of sorted devices among the multiple devices to be upgraded reaches the preset device number upper limit, or no new devices are added to the sorting within the preset time after the last round of sorting, or the total sorting time of the multiple devices to be upgraded reaches the preset total time.
3. The device upgrade method according to claim 1, wherein: The programming tool feeds back the sequence number to the corresponding response device, including: The programming tool generates a sequence number allocation broadcast command corresponding to each of the transponder devices, and broadcasts the sequence number allocation broadcast command; The sequence number allocation broadcast command includes a device ID and a sequence number, and the device ID is used to control a response device with a matching ID to store the sequence number and respond to the sequence number allocation broadcast command.
4. A device upgrade method, characterized in that: include: The device receives the sequence number sent by the programming tool; The device receives a programming command broadcast by the programming tool, where the programming command is a command for upgrading the device; The device determines a response time to the programming command according to the sequence number, wherein different sequence numbers have different response time lengths; The device performs staggered responses to the programming command according to the response duration, wherein the programming tool is used to send an upgrade package of a difference portion to the tire pressure sensor to be upgraded; The device receives a sequence number sent by a programming tool, including: The device receives a sorting broadcast command sent by the programming tool, wherein the sorting broadcast command includes a response control identifier, and the response control identifier is used to instruct an unsorted device among the multiple devices to respond; The device determines whether the sequence number fed back by the programming tool has been received; When the device determines that it has not received the sorting number fed back by the programming tool, it responds to the programming tool with sorting response data containing its own device ID in a delayed response manner. The length of the delayed response in each sorting round of the device is determined by the sorting round in which the sorting broadcast command is received and its own device ID. The device receives a ranking number fed back by the programming tool, the ranking number being a ranking number obtained by the programming tool after ranking the response devices that sent the ranking response data according to the order of the received ranking response data; When the device determines that it has received the sequence number fed back by the programming tool, it does not respond to the sequence broadcast command; The device responds to the programming tool with sorted response data containing its own device ID in a delayed response manner, including: When the received sorting broadcast command is a first-round sorting command, the device responds to the programming tool with sorting response data including its own device ID after a first delay period, where the first delay period is determined by the device ID and a preset upper limit on the number of devices. When the received sorting broadcast command is a subsequent round of sorting commands of the first round of sorting commands, the device responds to the programming tool with sorting response data containing its own device ID after a second delay period, and the second delay period is determined by the variant ID corresponding to its own device ID and the preset upper limit of the number of devices.
5. The device upgrade method according to claim 4, wherein: The device determines the first delay time by n*T and determines the second delay time by p*T; Among them, n is the device ID of the device modulo the preset device quantity upper limit value, p is the deformation ID corresponding to the current round of the device modulo the preset device quantity upper limit value, and T is the preset delay period.
6. The device upgrade method according to claim 5, wherein: The deformation ID corresponding to the device is obtained by shifting the last byte of the device ID left or right by a preset number of bits.
7. A device upgrade system, comprising a programming tool and a plurality of devices, characterized in that: The programming tool is used to: a. broadcast a sorting broadcast command, wherein the sorting broadcast command includes a response control identifier, and the response control identifier is used to instruct unsorted devices among the plurality of devices to respond; b. sorting the response devices that sent the sorting response data according to the order of the received sorting response data; c. feeding back the sorting number to the corresponding responding device; d. repeating steps ac above to continue assigning sorting numbers to the remaining unsorted devices in the plurality of devices to be upgraded until a preset sorting cutoff condition is met; wherein the unsorted devices respond to the sorting broadcast command in a delayed manner, and the delayed response duration of each unsorted device in each sorting round is determined by the sorting round in which the sorting broadcast command is received and its own device ID; when the sorting broadcast command received is a first-round sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a first delay duration, the first delay duration being determined by its own device ID and a preset upper limit on the number of devices; when the sorting broadcast command received is a subsequent-round sorting command of the first-round sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a second delay duration, the second delay duration being determined by the variant ID corresponding to its own device ID and the preset upper limit on the number of devices; The device is configured to receive programming commands broadcast by the programming tool; determine a response time for the programming command based on the sequence number, wherein different sequence numbers have different response times; and perform staggered responses to the programming command based on the response times; The programming tool is used to receive programming response data of the multiple devices responding to the programming commands in staggered order according to the assigned sequence numbers, wherein the programming tool is used to send an upgrade package of the difference part to the tire pressure sensor to be upgraded.
8. A programming tool, characterized in that include: The first processing module is configured to: a. broadcast a sorting broadcast command, wherein the sorting broadcast command includes a response control identifier, and the response control identifier is used to instruct an unsorted device among the multiple devices to respond; b. sorting the response devices that sent the sorting response data according to the order of the received sorting response data; c. feeding back the sorting number to the corresponding responding device; d. repeating steps ac above to continue assigning sorting numbers to the remaining unsorted devices in the plurality of devices to be upgraded until a preset sorting cutoff condition is met; wherein the unsorted devices respond to the sorting broadcast command in a delayed manner, and the delayed response duration of each unsorted device in each sorting round is determined by the sorting round in which the sorting broadcast command is received and its own device ID; when the sorting broadcast command received is a first-round sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a first delay duration, the first delay duration being determined by its own device ID and a preset upper limit on the number of devices; when the sorting broadcast command received is a subsequent-round sorting command of the first-round sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a second delay duration, the second delay duration being determined by the variant ID corresponding to its own device ID and the preset upper limit on the number of devices; A first sending module is used to send the sorted sequence numbers to corresponding devices and broadcast programming commands for upgrading the plurality of devices; The first receiving module is used to receive programming response data of the multiple devices responding to the programming command in staggered order according to the assigned sequence numbers, wherein the programming tool also sends an upgrade package of the difference part to the tire pressure sensor to be upgraded.
9. A sensor device, characterized in that: include: A second receiving module is configured to receive a sorting broadcast command sent by a programming tool, wherein the sorting broadcast command includes a response control identifier, and the response control identifier is configured to instruct an unsorted device among the plurality of devices to respond; Determine whether the sorting number fed back by the programming tool has been received; if it is determined that the sorting number fed back by the programming tool has not been received, respond to the programming tool with sorting response data containing its own device ID in a delayed response manner, wherein the length of the delayed response of the device in each sorting round is determined by the sorting round in which the sorting broadcast command is received and its own device ID; receive the sorting number fed back by the programming tool, the sorting number being the sorting number obtained by the programming tool after sorting the responding devices that sent the sorting response data according to the order of the received sorting response data; receive the programming command broadcast by the programming tool, the programming command being a command for upgrading the device; A second processing module is configured to determine a response time for the programming command based on the sequence number, wherein different sequence numbers have different response time lengths; a second sending module, configured to perform staggered responses to the programming command according to the response duration, wherein the programming tool further sends an upgrade package containing a difference portion to the tire pressure sensor to be upgraded; Among them, when the received sorting broadcast command is the first round sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a first delay period, and the first delay period is determined by its own device ID and the preset upper limit of the number of devices; when the received sorting broadcast command is a subsequent round sorting command of the first round sorting command, the device responds to the programming tool with sorting response data containing its own device ID after a second delay period, and the second delay period is determined by the variant ID corresponding to its own device ID and the preset upper limit of the number of devices.
10. A programming tool, characterized in that The device comprises a communication interface, a memory and a processor, wherein the memory stores a program code, and the processor is used to call the program code and is arranged to implement the device upgrade method according to any one of claims 1 to 3 when the program code is executed.
11. A sensor device, characterized in that: The device comprises a communication interface, a memory and a processor, wherein the memory stores a program code, and the processor is used to call the program code and is arranged to implement the device upgrade method according to any one of claims 4 to 6 when the program code is executed.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, is used to implement the device upgrade method according to any one of claims 1 to 3, or to implement the device upgrade method according to any one of claims 4 to 6.
Citation Information
Patent Citations
Tire pressure sensor upgrading method, handheld tire pressure tool and tire pressure sensor
CN112394959A