A type-III dedicated transformer terminal and a method for upgrading an AC sampling module based on the same

The differential update of the transmission module is solved through the core board of the III special-change terminal, which solves the problem of inefficient firmware upgrades in the existing technology, and achieves a more efficient, stable and secure firmware upgrade process.

CN118200138BActive Publication Date: 2025-05-27JIANGSU TONGCHI POWER AUTOMATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410460125.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-17
Publication Date
2025-05-27
Estimated Expiration
2044-04-17

AI Technical Summary

Technical Problem

The firmware upgrade method of the existing III special-change terminal is inefficient, and the traditional overall firmware coverage update results in large data volume and troublesome operation.

Method used

The relay module is differentially updated through the core board of the III special-transformation terminal. First find out the difference in firmware, then only code recovery is carried out for the differences. The combination of single-frame check and overall check is used to achieve compatibility between local retransmission and overall retransmission.

Benefits of technology

It improves the efficiency and speed of firmware upgrades, reduces operational complexity, increases the stability and security of upgrades, and reduces the flash capacity requirements for the transfer module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118200138B_ABST
    Figure CN118200138B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of power consumption acquisition terminals, and particularly to a type III special transformer terminal and a method for upgrading an AC sampling module based on the same. The method of the present invention includes: the core board obtains an upgrade firmware package and the currently running firmware package of the AC sampling module; the core board compares the two packages; if there are differences, a differential target firmware package is generated through difference analysis; the core board sequentially sends the differential target firmware frame by frame to the AC sampling module; if all N upgrade sub-frames are correctly sent and received, the AC sampling module performs differential update of the firmware based on the received N upgrade sub-frames. The present invention adopts a differential update method, which can greatly improve the efficiency and speed of the upgrade and increase the stability of the upgrade. The present invention adopts a means combining single-frame checksum and overall checksum, realizes the compatibility of local retransmission and overall retransmission, ensures the success rate of sending and receiving the differential target firmware package, and improves the security and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power consumption collection terminals, and in particular to: 1. A method for upgrading an exchange collection module based on a type III special transformer terminal; 2. A type III special transformer terminal using the method. Background Art

[0002] The current Type III dedicated transformer terminal has a local data collection function, which collects localized power consumption information through the exchange data collection module. Figure 1 As a part of the Type III special transformer terminal, the exchange module is connected to the core board of the Type III special transformer terminal through a pin header: the core board is on the top and the exchange module board is on the bottom; they are all controlled and operated by independent microprocessors MCU, and data exchange is achieved through the UART port. In addition, the core board has a USB port for data input.

[0003] For the exchange module of the Type III dedicated transformer terminal, the firmware upgrade (i.e., program upgrade of the APP area) is mainly carried out in the traditional way, for example, the exchange module is removed and upgraded separately. This method is more troublesome in actual operation.

[0004] Therefore, the inventors considered directly using the Type III dedicated transformer terminal to upgrade the firmware of the exchange module. However, in order to ensure that the data is error-free, the existing upgrade method adopts an overall firmware overlay update. This requires a large amount of data to be transmitted and is inefficient. Summary of the invention

[0005] Based on this, it is necessary to provide a Type III dedicated transformer terminal and a method for upgrading the exchange module based on it to address the problem of low efficiency of the existing overall firmware overlay update method.

[0006] The present invention is implemented by the following technical solutions:

[0007] In a first aspect, the present invention discloses a method for upgrading an exchange procurement module based on a Type III dedicated transformer terminal, which is used to upgrade the firmware of the exchange procurement module through a core board of the Type III dedicated transformer terminal.

[0008] The method for upgrading the exchange module based on the type III dedicated transformer terminal includes the following steps:

[0009] Step 1: The core board obtains the upgrade firmware package and the current running firmware package of the exchange module;

[0010] Step 2: The core board compares the upgraded firmware package with the currently running firmware package of the exchange module;

[0011] If there is a difference, a differential target firmware package is generated through difference analysis; wherein the differential target firmware package carries a mother data check code; the differential target firmware package is divided into N upgrade subframes, each upgrade subframe carries a corresponding sub-data check code; N sub-data check codes constitute a mother data check code;

[0012] If there is no difference, stop the firmware upgrade;

[0013] Step 3: The core board sends the differential target firmware to the cross-acquisition module frame by frame in sequence;

[0014] Among them, the core board sends the nth upgrade subframe, the exchange module first receives and verifies the nth upgrade subframe, then compares it with the sub-data verification code corresponding to the nth upgrade subframe, and sends the comparison result back to the core board as a type of return frame;

[0015] If a type of return frame indicates that the comparison result of the sub-data check code is consistent, it means that the nth upgrade sub-frame is sent and received correctly, and the core board continues to send the n+1th upgrade sub-frame; otherwise, the core board resends the nth upgrade sub-frame; n∈[1,N-1];

[0016] After the Nth upgrade subframe is correctly sent and received, the core board sends a file check frame containing the mother data check code. The exchange module performs an overall check on the received N upgrade subframes and compares them with the mother data check code in the received file check frame, and then sends the comparison result back to the core board as a second-class return frame;

[0017] If the second type of return frame indicates that the comparison result of the mother data check code is consistent, it means that the N upgrade subframes are all sent and received correctly, and the exchange module performs differential update of the firmware based on the received N upgrade subframes;

[0018] If the second type of return frame indicates that the comparison result of the mother data check code is inconsistent, the core board applies to send the upgrade subframe again from the beginning.

[0019] This method of upgrading the exchange module based on the Type III dedicated transformer terminal implements the method or process according to the embodiment of the present disclosure.

[0020] In a second aspect, the present invention discloses a type III dedicated transformer terminal, which uses the method for upgrading the exchange module based on the type III dedicated transformer terminal as disclosed in the first aspect.

[0021] Compared with the prior art, the present invention has the following beneficial effects:

[0022] 1. The present invention abandons the traditional overall firmware upgrade method and adopts a differential update method - first find out the differences in the firmware, then record the information of the differences, and then only re-cover the code for the different parts of the firmware, which can greatly improve the efficiency and speed of the upgrade and increase the stability of the upgrade.

[0023] 2. The present invention adopts a combination of single-frame verification and overall verification to achieve compatibility between local retransmission and overall retransmission, ensure the success rate of receiving and sending the differential target firmware package, and improve security and accuracy; and because the data volume of the differential target firmware package is small, the flash capacity requirement of the exchange module is low.

[0024] 3. The present invention uses data merging to achieve a balance between the difference content and the number of target packages when generating a differential target firmware package, thereby reducing the transmission frequency of the upgrade package and not causing the upgrade package capacity to be too large.

[0025] 4. When upgrading the exchange module, the present invention has low requirements for the operator. It only needs to insert a USB flash drive into the Type III special transformer terminal and press a few buttons to complete the upgrade of the exchange module, which greatly improves the convenience and efficiency of the upgrade and is suitable for comprehensive promotion in Type III special transformer terminals. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 It is a structural framework diagram of a type III dedicated transformer terminal in the background technology;

[0028] Figure 2 A flowchart of a first method for upgrading an exchange module based on a Type III dedicated transformer terminal provided in Embodiment 2 of the present invention;

[0029] Figure 3 A flowchart of the second method for upgrading the exchange module based on a Type III dedicated transformer terminal provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0030] 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 only 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 technicians in this field without creative work are within the scope of protection of the present invention.

[0031] It should be noted that when a component is referred to as being "mounted on" another component, it may be directly on the other component or there may be a central component. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be a central component at the same time. When a component is considered to be "fixed to" another component, it may be directly fixed on the other component or there may be a central component at the same time.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" used herein includes any and all combinations of one or more of the related listed items.

[0033] Example 1

[0034] This embodiment 1 discloses a type III dedicated transformer terminal, which performs firmware upgrades on the exchange module through the core board of the type III dedicated transformer terminal. The upgrade process uses the method for upgrading the exchange module based on the type III dedicated transformer terminal disclosed in subsequent embodiments 2 or 3.

[0035] See also Figure 1 Before upgrading the firmware of the exchange module, you need to save the upgrade firmware package to a USB flash drive, and then connect the USB flash drive to the core board through the USB port.

[0036] The upgrade firmware package can be prepared using the following method:

[0037] In Linux system, put three files (including: upgrade script, upgrade execution program, upgrade firmware) into the update folder; execute the command tar czvf update.tar.gz update to generate the upgrade firmware package update.tar.gz.

[0038] It should also be noted that an update folder should be created in the USB flash drive and the upgrade firmware package should be copied to the update folder.

[0039] While ensuring that the core board can read the USB flash drive normally, open the hidden menu in the Type III dedicated transformer terminal interface, select the firmware upgrade menu, and start upgrading according to the method for upgrading the exchange module based on the Type III dedicated transformer terminal disclosed in Example 2 or 3.

[0040] Example 2

[0041] See also Figure 2, which is a flowchart of the first method for upgrading the exchange module based on the Type III dedicated transformer terminal provided in this embodiment 2.

[0042] Specifically, the first method for upgrading the exchange module based on the type III dedicated transformer terminal includes the following steps:

[0043] Step 1: The core board obtains the upgrade firmware package and the current running firmware package of the exchange module.

[0044] See above, on the one hand, the core board reads the update folder in the USB flash drive and copies the upgrade firmware package to the local storage of the Type III dedicated transformer terminal; on the other hand, the core board reads the current running firmware package of the exchange module for subsequent comparison with the upgrade firmware package.

[0045] It should be noted that the local storage of the Type III dedicated transformer terminal refers to the storage space that can be operated when the Type III dedicated transformer terminal is running. In order to ensure the running speed, the local storage of the Type III dedicated transformer terminal generally selects memory (i.e. SDRAM soldered on the core board).

[0046] Step 2: The core board compares the upgraded firmware package with the currently running firmware package of the exchange module.

[0047] Among them, the firmware comparison can be carried out in the following ways:

[0048] The core board calculates the checksum of the upgrade firmware package and extracts the version information header of the upgrade firmware package;

[0049] The core board calculates the checksum of the current running firmware package of the exchange module, and extracts the version information header of the current running firmware package of the exchange module;

[0050] The core board compares the checksum values ​​and version information headers of the two packages;

[0051] If there is any difference, it means there is a difference; otherwise, it means there is no difference.

[0052] Since this step is to determine whether to perform firmware difference analysis, there are:

[0053] If there is a difference, a differential target firmware package is generated through difference analysis; if there is no difference, the firmware upgrade is stopped.

[0054] The generated differential target firmware package can also be temporarily stored in the local storage of the Type III dedicated transformer. The differential target firmware package can be generated by the following method:

[0055] S21, the core board compares all differences and common points between the upgrade firmware package and the current running firmware package of the exchange module;

[0056] The core board records the firmware address, difference data content, and number of difference data bytes of each difference to form an original data packet. One difference corresponds to one original data packet, so there are M original data packets for M differences.

[0057] S22, if you directly choose to upgrade with M original data packets, then the number of interactions between the core board and the cross-collection module must be at least M+1 times (M+1 times is the ideal state, that is, including M sub-packet verification and 1 whole packet verification), so the number of interactions is still high. In order to reduce the number of interactions, the data of the M original data packets needs to be reduced:

[0058] If the byte spacing between two adjacent original data packets is less than a preset spacing threshold, and the number of bytes of the non-difference data between the two adjacent original data packets is less than a preset byte number threshold, the non-difference data between the two adjacent original data packets are merged into one target data packet; otherwise, the two adjacent original data packets are directly used as two target data packets;

[0059] Traverse M original data packets to obtain N target data packets and form a data structure array; wherein the number of elements in the data structure array is N, the nth element is the nth target data packet, and a single element includes: data packet number, data content, data bytes, data address. In other words, the data structure array constitutes an index structure for the N target data packets.

[0060] The preset spacing threshold is generally 8 bytes, and the preset byte number threshold is generally 32 bytes. Of course, they can be adjusted according to actual conditions, but should not be too large.

[0061] For ease of understanding, a specific explanation is given here: suppose two adjacent original data packets are O1 and O2. If the byte spacing between O1 and O2 is less than 8 bytes, and the total number of bytes of O1, O2 and the data between them is less than 32 bytes, then O1, O2 and the data between them are merged into a target data packet D1; otherwise, O1 is directly used as the target data packet D1, and O2 is directly used as the target data packet D2.

[0062] The above merging operation takes into full account the byte spacing between adjacent differences: if the spacing is close, the non-difference parts can be combined into one packet to reduce the number of target packets. Of course, the target data packet cannot be unlimitedly large to ensure the transmission effect.

[0063] In this way, a balance is achieved between the difference content and the target number of packages, the frequency of upgrade package transmission is reduced, and the upgrade package capacity will not be too large.

[0064] S23, using the data structure array as a differential target firmware package, wherein the differential target firmware package carries a parent data check code, and the parent data check code is the check value of the data structure array.

[0065] The differential target firmware package is divided into N upgrade subframes. Among them, the nth target data packet corresponds to the nth upgrade subframe. Each upgrade subframe carries a corresponding sub-data check code. Among them, the sub-data check code carried by the nth upgrade subframe is the check value of the nth target data packet. In this way, N sub-data check codes constitute the parent data check code.

[0066] At this point, the differential target firmware package for upgrading has been obtained, and the next step is to transfer the differential target firmware package to the exchange acquisition module.

[0067] Step 3: The core board sends the differential target firmware to the cross-acquisition module frame by frame in sequence.

[0068] It should be noted that before the core board sends the differential target firmware to the exchange acquisition module, the core board sends a self-expansion command (based on DLT / 645 protocol) to the exchange acquisition module to allow the exchange acquisition module to enter the BOOT upgrade mode (this mode supports running the BOOT program from the BOOT area of ​​the exchange acquisition module and upgrading the APP program in the APP area of ​​the exchange acquisition module). In this way, the exchange acquisition module starts waiting for data sent by the core board.

[0069] As mentioned above, the differential target firmware obtained in step 2 is divided into N upgrade subframes. The components of the upgrade subframe include: fixed characters at the beginning and end, frame type, frame number, firmware address, firmware byte, firmware content, and sub-data check code. Among them, the frame type of the upgrade subframe is 1 to distinguish it from other types.

[0070] Generally, the core board sends in sequence according to the index order of the data structure array, that is, 1→N.

[0071] Among them, the core board sends the nth upgrade subframe, the exchange acquisition module first receives and verifies the nth upgrade subframe, then compares it with the sub-data verification code corresponding to the nth upgrade subframe, and sends the comparison result back to the core board as a type of return frame - the above process of the exchange acquisition module occurs in the BOOT area of ​​the exchange acquisition module.

[0072] If a type of return frame indicates that the comparison result of the sub-data check code is consistent, it means that the nth upgrade sub-frame is sent and received correctly, and the core board continues to send the n+1th upgrade sub-frame; otherwise, it means that the nth upgrade sub-frame is not sent and received correctly, so the core board resends the nth upgrade sub-frame; n∈[1,N-1].

[0073] In the present embodiment 1, 1 is set to indicate correctness and 0 is set to indicate error. Therefore, if the comparison result of the sub-data check code is consistent, the first type of return frame is 1; otherwise, the first type of return frame is 0.

[0074] Of course, after a certain upgrade subframe is correctly sent and received, it is necessary to determine whether it is the Nth upgrade subframe (i.e., whether it is the last frame) to avoid an infinite loop or empty data. The following method can be used to determine whether it is the Nth upgrade subframe:

[0075] After the nth upgrade subframe is correctly sent and received, determine whether n+1 is greater than N;

[0076] If n+1≤N, the core board continues to send the n+1th upgrade subframe; otherwise, it means that all N upgrade subframes have been sent, so the core board sends a file check frame containing the mother data check code.

[0077] The file check frame is used to verify whether all frames previously received by the exchange module are correct. Its composition is the same as that of the upgrade subframe, except that the frame type of the file check frame is 2.

[0078] Then, after the Nth upgrade subframe is correctly sent and received, the core board sends a file verification frame containing the mother data verification code. The exchange module performs an overall verification on the N received upgrade subframes and compares them with the mother data verification code in the received file verification frame, and then sends the comparison result back to the core board as a second-class return frame - the above process of the exchange module occurs in the BOOT area of ​​the exchange module.

[0079] If the second type of return frame indicates that the comparison result of the mother data check code is consistent, it means that the N upgrade subframes are all sent and received correctly, then the exchange module performs a differential update of the firmware based on the received N upgrade subframes.

[0080] As shown above, each upgrade subframe includes firmware information such as firmware location and firmware content, that is, it provides the specific location of the firmware update and the specific data content that needs to be updated.

[0081] Then, after N upgrade subframes are correctly sent and received, for the nth upgrade subframe, the acquisition module obtains the firmware information contained in it and replaces the corresponding data of the currently running firmware package (i.e., the acquisition module APP area) - that is, the BOOT program in the acquisition module BOOT area replaces the corresponding data of the APP program in the acquisition module APP area according to the firmware information received in the nth upgrade subframe to implement program update. Traverse N upgrade subframes to complete the differential update of the currently running firmware package.

[0082] If the second type of return frame indicates that the comparison result of the mother data check code is inconsistent, it means that an unexpected error with a very low probability has occurred.

[0083] Refer to the above. In the first embodiment, 1 is set to represent correct and 0 is set to represent incorrect. Therefore, if the comparison result of the mother data check code is consistent, the Class II return frame is 1; otherwise, the Class II return frame is 0.

[0084] In order to eliminate the error represented by the Class II return frame, the core board requests to resend the upgrade sub-frame from the beginning. Specifically, the core board first sends a resend frame to the acquisition module. The acquisition module receives the resend frame and re-enters the BOOT upgrade mode (i.e., clears the received and generated data in the previous process), and then the core board resends the upgrade sub-frame from the beginning; in this way, the above steps are repeated, and the verification is sent frame by frame again and then verified as a whole.

[0085] Among them, the composition of the resend frame is the same as that of the upgrade sub-frame. The difference is that: the frame type of the resend frame is 3, the frame number is N + 1, the firmware byte is 0, and there is no firmware content.

[0086] The Class I return frame corresponds to the first-level verification, which is for each upgrade sub-frame; the Class II return frame corresponds to the second-level verification, which is for the overall N upgrade sub-frames; in this way, double verification is formed, which can ensure the security and accuracy of the differential target firmware transmission.

[0087] Since the above process uses a differential target firmware package, its capacity is greatly reduced compared to the upgrade firmware package, and through the cooperation of double verification and retransmission mechanism, the success rate of data transmission and firmware upgrade is guaranteed. Therefore, this method has low requirements for the on-chip flash capacity of the acquisition module, and the differential update data volume is also greatly reduced compared to the overall overwrite update, which can effectively improve the upgrade effect.

[0088] Based on the above upgrade method, it is possible to implement firmware upgrade of the acquisition module through the core board of the Type III special transformer terminal. Therefore, in actual operation, there is no need to disassemble and upgrade through a dedicated download channel by the PC, nor to penetrate the overall upgrade by the method of typing commands on the terminal core CPU through the PC interface. Only need to insert the USB flash drive into the Type III special transformer terminal, call out the hidden menu through the button, and execute the upgrade command of the menu.

[0089] Embodiment 3

[0090] Refer to Figure 3 , which is the flowchart of the second method for upgrading the acquisition module based on the Type III special transformer terminal provided in this Embodiment 3.

[0091] The second upgrade method of this Embodiment 3 is substantially the same as the first upgrade method of Embodiment 2, and the same parts will not be repeated.

[0092] The difference between the two is that in step three of the second upgrade method, a prerequisite is added for the core board to apply to send the upgrade subframe again from the beginning.

[0093] The specific prerequisites are:

[0094] If the second type of return frame indicates that the comparison result of the mother data check code is inconsistent, the number of the second type of return frames is counted;

[0095] If the number of the second type of return frames is less than the preset number threshold, the core board applies to send the upgrade subframe again from the beginning; otherwise, the firmware upgrade is stopped.

[0096] The preset number threshold is generally 3 times; of course, it can be adjusted according to actual conditions, but it should not be too large.

[0097] The above judgment can avoid the upgrade falling into an infinite loop in extreme cases (the second check fails multiple times in a row).

[0098] Since the second upgrade method is substantially the same as the first upgrade method, it also has the effects described in Example 2 and will not be described again here.

[0099] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0100] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for upgrading a cross-purchase module based on a type III dedicated transformer terminal, which is used to upgrade the firmware of the cross-purchase module through the core board of the type III dedicated transformer terminal, characterized in that: The method for upgrading the exchange module based on the type III dedicated transformer terminal comprises the following steps: Step 1: The core board obtains the upgrade firmware package and the current running firmware package of the exchange module; Step 2: The core board compares the upgraded firmware package with the currently running firmware package of the exchange module; If there is a difference, a differential target firmware package is generated through differential analysis; wherein, the differential target firmware package has a parent data check code; the differential target firmware package is divided into N Upgrade subframes, each upgrade subframe has a corresponding sub-data check code; N The sub-data check codes constitute the parent data check code; If there is no difference, stop the firmware upgrade; Step 3: The core board sends the differential target firmware to the cross-acquisition module frame by frame in sequence; Among them, the core board sends the n The acquisition module first receives and verifies the first upgrade subframe. n The upgrade subframe, and then n The sub-data check codes corresponding to the upgrade sub-frames are compared, and the comparison results are sent back to the core board as a type of return frame; If a type of return frame indicates that the comparison result of the sub-data check code is consistent, it means that the n The first upgrade subframe is sent and received correctly, and the core board continues to send the n+ 1 upgrade subframe; otherwise, the core board resends the n Upgrade subframes; n ∈[1, N -1]; In the N After the upgrade subframe is correctly sent and received, the core board sends a file check frame containing the mother data check code, and the exchange module checks the received N The upgrade subframe is checked as a whole, and compared with the parent data check code in the received file check frame, and then the comparison result is sent back to the core board as a second-class return frame; If the second type of return frame indicates that the comparison result of the mother data check code is consistent, it means N The upgrade subframes are sent and received correctly, and the exchange module receives N An upgrade subframe is used to perform differential update of the firmware; If the second type of return frame indicates that the comparison result of the mother data check code is inconsistent, the core board applies to send the upgrade subframe again from the beginning.

2. The method for upgrading the exchange module based on the type III dedicated transformer terminal according to claim 1 is characterized in that: In step 1, the core board copies the upgrade firmware package to the local storage of the Type III dedicated transformer terminal.

3. The method for upgrading the exchange module based on the type III dedicated transformer terminal according to claim 1 is characterized in that: In step 2, the firmware comparison method includes: The core board calculates the checksum of the upgrade firmware package and extracts the version information header of the upgrade firmware package; The core board calculates the checksum of the current running firmware package of the exchange module, and extracts the version information header of the current running firmware package of the exchange module; The core board compares the checksum values ​​and version information headers of the two packages; If there is any difference, it means there is a difference; otherwise, it means there is no difference.

4. The method for upgrading the exchange module based on the type III dedicated transformer terminal according to claim 3 is characterized in that: In step 2, the method for generating the differential target firmware package includes: The core board compares all the differences between the upgrade firmware package and the current running firmware package of the exchange module. M The core board records the firmware address, difference data content, and number of difference data bytes of each difference to form an original data packet; one difference corresponds to an original data packet. M Original data packets; If the byte spacing between two adjacent original data packets is less than a preset spacing threshold, and the number of bytes of the non-difference data between the two adjacent original data packets is less than a preset byte number threshold, the non-difference data between the two adjacent original data packets are merged into one target data packet; otherwise, the two adjacent original data packets are directly used as two target data packets; Traversal M The original data packets are obtained N target data packets and form a data structure array; the number of elements in the data structure array is N , No. n The element is n target data packets, and the individual elements include: data packet number, data content, data bytes, data address; The data structure array is used as a differential target firmware package; wherein the check value of the data structure array is used as the parent data check code; n The target data packet corresponds to n Upgrade subframe, n The checksum of the target data packet is used as the n The sub-data check code of each upgraded sub-frame.

5. The method for upgrading the exchange module based on the type III dedicated transformer terminal according to claim 1 is characterized in that: In step three, before the core board sends the differential target firmware to the cross-acquisition module, the core board sends a self-expansion command to the cross-acquisition module to allow the cross-acquisition module to enter the BOOT upgrade mode.

6. The method for upgrading the exchange module based on the type III dedicated transformer terminal according to claim 1 is characterized in that: In step three, In the n After the upgrade subframe is correctly sent and received, it is determined n+ Is 1 greater than N ; like n+ 1≤N, the core board continues to send n+ 1 upgrade subframe; otherwise, the core board sends a file check frame containing the mother data check code.

7. The method for upgrading the exchange module based on the type III dedicated transformer terminal according to claim 1 is characterized in that: In step three, if the second type of return frame indicates that the comparison result of the mother data check code is inconsistent, the core board first sends a resend frame to the exchange module, the exchange module receives the resend frame and re-enters the BOOT upgrade mode, and then the core board starts sending the upgrade subframe again from the beginning.

8. The method for upgrading the exchange module based on the type III dedicated transformer terminal according to claim 1 is characterized in that: In step three, N After all upgrade subframes are correctly sent and received, n The acquisition module obtains the firmware information contained in the upgrade subframe and replaces the corresponding data of the currently running firmware package; Traversal N An upgrade subframe is used to complete the differential update of the currently running firmware package.

9. The method for upgrading the exchange module based on the type III dedicated transformer terminal according to claim 1 is characterized in that: In step three, If the second type of return frame indicates that the comparison result of the mother data check code is inconsistent, the number of the second type of return frames is counted; If the number of second-class return frames is less than the preset number threshold, the core board applies to send the upgrade subframe again from the beginning; Otherwise, stop the firmware upgrade.

10. A type III dedicated transformer terminal, characterized in that: It uses the method for upgrading the exchange module based on the type III dedicated transformer terminal as described in any one of claims 1 to 9; The Type III dedicated transformer terminal includes: a core board and an exchange module.

Citation Information

Patent Citations

  • Differential data processing method and receiver test method

    CN110837091A

  • Gas meter upgrading method and device and electronic equipment

    CN114500508A