Differential algorithm-based mining area equipment increment upgrading method and system

By combining GNSS and base station fingerprint positioning, improved differential algorithm and three-time handshake transmission protocol during the upgrade of mining equipment, the targeted upgrade of mining equipment is achieved, solving the problems of high communication costs, high error upgrade rate and unstable network in the traditional upgrade method, improving the upgrade success rate and reducing traffic consumption.

CN120499643APending Publication Date: 2025-08-15JIANGSU XCMG STATE KEY LAB TECH CO LTD

Patent Information

Application Number
CN202510773769.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

During the remote firmware upgrade process of mining area equipment, the traditional full-scale upgrade method leads to high communication costs, wasted bandwidth resources, high error upgrade rate, unstable network environment leads to upgrade failure, lack of targeted upgrade mechanism, increasing the risk of equipment interference.

Method used

By obtaining the GNSS positioning of the mining area equipment and the base station fingerprint positioning, pre-processing, comparing and verifying it with the preset electronic fence polygon area, and using an improved binary differential algorithm for dynamic sliding window chunking and multi-level hash index differences, an incremental differential upgrade package is generated, and transmitted to the device through a three-way handshake transmission protocol for upgrading.

Benefits of technology

It has achieved directional upgrades in complex network environments, significantly reducing traffic consumption, reducing the amount of retransmission data, improving the upgrade success rate of weak signal areas such as open-pit mines, and avoiding cross-mining equipment interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120499643A_ABST
    Figure CN120499643A_ABST
Patent Text Reader

Abstract

The invention discloses a mining area equipment increment upgrading method and system based on a difference algorithm, and the method comprises the steps: obtaining the GNSS positioning and base station fingerprint positioning of mining area equipment, carrying out the comparison verification with a preset electronic fence polygon region after preprocessing, and activating an upgrading task after the verification is passed; carrying out difference comparison on the old file and the new file by adopting an improved binary system difference algorithm through dynamic sliding window partitioning and a multi-level hash index, and compressing a difference part to generate an increment difference upgrade package; and establishing connection with mining area equipment through a network, transmitting the increment difference upgrade package to the mining area equipment by adopting a three-way handshake transmission protocol, and downloading, decompressing and upgrading the increment difference upgrade package by the mining area equipment. According to the method, directional upgrading can be realized in a complex network environment, the flow consumption can be remarkably reduced, the retransmission data volume is reduced, and the upgrading success rate of weak signal areas such as strip mine pits is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of system upgrades in mining scenarios, and specifically relates to a method and system for incremental upgrading of mining equipment based on a differential algorithm. Background Art

[0002] With the rapid development of intelligent engineering machinery, the Internet of Things, cloud computing, big data, artificial intelligence, automatic control, industrial Internet, robotic equipment, etc. will be deeply integrated with modern mining development technology.

[0003] In the current intelligent mining scenario, remote firmware upgrades for engineering vehicles (such as unmanned mining trucks, mine boring machines, and intelligent drilling equipment) face the following core issues: Mining areas often rely on satellite backhaul links. Traditional full-volume upgrade methods result in high communication costs and are prone to link congestion. Full-volume upgrades waste bandwidth resources in satellite backhaul links. The distance between adjacent mining equipment is often less than 200 meters. Upgrades based on IP or simple geographic fences have a high rate of erroneous upgrades, which may cause safety hazards such as device command conflicts. Non-directional upgrades may interfere with adjacent mining equipment, resulting in an uncontrolled upgrade range. Electromagnetic interference in mining areas may cause wireless transmission packet loss rates to exceed 20%. The traditional TCP retransmission mechanism is inefficient and requires repeated transmission of most data, resulting in severe environmental interference.

[0004] Patent CN112822199B discloses an OTA upgrade method and system based on protocol conversion. The method includes: obtaining and parsing the manufacturer's proprietary protocol, establishing a standardized protocol, and creating a mapping table between the manufacturer's proprietary protocol and the standardized protocol; automatically generating a mapping file for the corresponding device based on the mapping table and uploading it to a cloud platform; generating the upgrade code for the corresponding device based on the mapping file and packaging it as an OTA (Over-the-Air) file; the cloud platform sending an upgrade notification to the device and performing identity verification on the device; using a differential algorithm to create a differential file based on the OTA file and the original firmware information, restarting the device, and sending the differential file for OTA upgrade. This invention enables protocol adaptation and remote automatic upgrades for devices from different manufacturers, improving the security and convenience of device upgrades. However, there are still other technical limitations and potential disadvantages. For example, the system relies on a mapping table to achieve the conversion between private protocols and standardized protocols, but the protocols of different manufacturers may be frequently updated or adopt non-standard extension functions, resulting in high maintenance costs; the patent does not explicitly mention breakpoint resumption or fault tolerance mechanisms. If applied in mining scenarios located in remote areas, network coverage is unstable, and the download of large-volume differential packets may fail due to delays or interruptions; there is also no targeted upgrade mechanism, which will waste bandwidth and time.

[0005] Patent EP3648502A1 proposes an OTA edge system that receives polling requests from one or more mobile devices, specifically for an OTA core system. An offload filter is implemented within the OTA edge system, configured to accept polling requests from mobile devices whose content is available on the OTA core system and reject polling requests from mobile devices whose content is not available on the OTA core system. While this patent offers certain advantages in request filtering and targeted upgrade efficiency, it still has other technical flaws and potential issues. For example, the system relies on the existence of core system content to determine whether to accept a polling request, but fails to consider dynamic scenarios. It is unclear whether the offload filter integrates an encryption verification mechanism. If used in remote scenarios such as mining areas, mobile devices (such as sensors or controllers) may be unable to reliably connect to the edge system due to network fluctuations, resulting in polling request timeouts or repeated transmissions, increasing system load. Summary of the Invention

[0006] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a method and system for incremental upgrading of mining equipment based on a differential algorithm, which can realize directional upgrading in a complex network environment, and can significantly reduce traffic consumption, reduce the amount of retransmitted data, and improve the upgrade success rate in weak signal areas such as open-pit mines.

[0007] The present invention provides the following technical solutions:

[0008] In a first aspect, a method for incrementally upgrading mining equipment based on a differential algorithm is provided, comprising:

[0009] Obtain the GNSS positioning and base station fingerprint positioning of the mining equipment, and after pre-processing, compare and verify them with the preset electronic fence polygon area. After verification, activate the upgrade task;

[0010] An improved binary difference algorithm is used to compare the old and new files through dynamic sliding window partitioning and multi-level hash indexing, and the difference parts are compressed to generate an incremental difference upgrade package;

[0011] A connection is established with the mining equipment through the network, and the incremental differential upgrade package is transmitted to the mining equipment using the three-way handshake transmission protocol, which is then downloaded, decompressed, and upgraded by the mining equipment.

[0012] Furthermore, the GNSS positioning and base station fingerprint positioning of the mining equipment are obtained and compared with the preset electronic fence polygon area after pre-processing, including:

[0013] Prioritize using Beidou to obtain GNSS positioning for mining equipment, with GPS as a redundant backup;

[0014] Use CID to record the base station number connected to the mining equipment, and convert it into the range from the base station through the time advance TA, which serves as the base station fingerprint positioning;

[0015] The GNSS positioning and base station fingerprint positioning are fused to obtain the fused positioning position P final :

[0016] ;

[0017] Where, It is the three-dimensional coordinate obtained by GNSS positioning. is the two-dimensional approximate position calculated by base station fingerprint positioning, w1 and w2 are the GNSS positioning weight and base station fingerprint positioning weight respectively;

[0018] The fused positioning position is compared and verified with the preset electronic fence polygon area. The device MAC+IMEI is compared with the whitelist, and AES-256 encrypted transmission is used to perform device identity authentication. The upgrade task is activated after both electronic fence verification and identity authentication are passed.

[0019] Furthermore, the method for generating the incremental differential upgrade package includes:

[0020] Perform dynamic sliding window block division on the old file and the new file to obtain old file blocks and new file blocks;

[0021] Use multi-level hash indexing to match new file blocks with old file blocks to obtain unmatched file blocks;

[0022] Perform difference calculation, incremental compression, and Reed-Solomon encoding on unmatched file blocks to generate an incremental differential upgrade package.

[0023] Furthermore, the dynamic sliding window segmentation of the old file and the new file includes:

[0024] Determine the window size W size ;

[0025] Determine the sliding step size S, , where α is the step size coefficient;

[0026] Divide the old and new files into blocks according to the sliding step size S, and divide the files into a set of file blocks covered by the sliding window:

[0027] ;

[0028] Where B is the file block b covered by the sliding window i A set of, i represents the i-th sliding window, It is defined as, where b i Defined as , old[ ] represents the old file, Indicates the length of each file block;

[0029] The dynamic adjustment rules of blocks include:

[0030] If the number of consecutive matching blocks of the new file block and the old file block , then increase the window to , , is the threshold of the number of consecutive matching blocks, is the multiplication factor when the window is expanded;

[0031] If the number of consecutive mismatch blocks between the new file block and the old file block , the window is reduced to , , is the threshold of the number of consecutive mismatch blocks, Is the multiplication factor when the window is reduced.

[0032] Furthermore, the multi-level hash index is used to match the new file block with the old file block, including:

[0033] Create a hash index table for old file blocks and set the key to , the value is ( ,in, File block b generated using the MD5 algorithm i The first-level hash function, File block b generated using the MD5 algorithm i The second-level hash function, offset i is the offset;

[0034] Calculate new file blocks The first-level hash function value , quickly look up in a hash index table If there is no match, it is marked as new data. If there is a match, it enters the second level of verification;

[0035] In the second level check, the new file block is calculated The second-level hash function value and with the hash index table Compare, if they are consistent, confirm it as a matching file block and record the offset i ,If they are inconsistent, it is considered as a hash conflict and marked as a ,different block.

[0036] Furthermore, performing difference calculation on the unmatched file blocks includes:

[0037] For unmatched new file blocks , in the old file block b j Find the most similar region and calculate the longest common subsequence LCS:

[0038] ;

[0039] Where, Indicates that in the old file block and new file chunks The length of the longest common subsequence calculated between s and t, s represents the starting index of the common subsequence in the old file block, t represents the starting index of the common subsequence in the new file block, and len represents the length of the common subsequence, that is, the number of consecutive matching characters or bytes starting from s and t;

[0040] Then calculate the byte-by-byte difference between the new file block and the old file block in the LCS area:

[0041] ;

[0042] Where, Indicates the byte difference between the new file block and the old file block at the kth position in the LCS area.

[0043] Furthermore, the incremental compression includes:

[0044] Use bzip2 to compress the difference data:

[0045] ;

[0046] in, Represents a differential data array, consisting of the byte-by-byte difference between the new file block and the old file block in the longest common subsequence LCS area. , Respectively represent the byte differences between the new file block and the old file block at positions 0, 1, ..., len-1 in the LCS area. len represents the length of the common subsequence. bzip2 is an efficient lossless compression algorithm based on the Burrows-Wheeler transform. Represents compressed difference data;

[0047] The unmatched parts of the new file block are pre-compressed using the LZ77 algorithm and then compressed using bzip2:

[0048] ;

[0049] Among them, extra represents additional data, Indicates the additional data after two levels of compression.

[0050] Furthermore, the Reed-Solomon encoding includes:

[0051] Divide the incrementally compressed data packet into n blocks and add m redundant blocks:

[0052] ;

[0053] Where G is the generator matrix, which satisfies the invertibility of any n×n submatrix, D1, D2...D n are the original data blocks, representing the first data block, the second data block...the nth data block, C1, C2...C n+m Represents the encoded block.

[0054] Furthermore, the three-way handshake transmission protocol is used to transmit the incremental differential upgrade package to the mining equipment, including:

[0055] Send the first file to the mining area device end, the first file is the version information file, the device end performs information detection on the current file, when the device end detects successfully and receives the file, continues to send the second file, the device end detects the current file again and receives the file after the detection is successful, repeats this action until the last file is transferred, completing the transmission of the incremental differential upgrade package and the download of the device end;

[0056] Among them, data transmission adopts a block transmission protocol, with error correction code and breakpoint resumption optimization added to each block, supporting complete data recovery under a 20% packet loss rate.

[0057] Secondly, a system for incremental upgrading of mining equipment based on a differential algorithm is provided, comprising:

[0058] The data acquisition and orientation verification module is used to obtain the GNSS coordinates and base station CID of mining equipment, and then compare and verify them with the preset electronic fence polygon area after pre-processing. After the verification passes, the upgrade task is activated;

[0059] The differential algorithm implementation module is used to use an improved binary differential algorithm to compare the old and new files through dynamic sliding window partitioning and multi-level hash indexing, compress the differences, and generate an incremental differential upgrade package;

[0060] The three-way handshake protocol and upgrade module are used to establish a connection with the mining equipment through the network, and use the three-way handshake transmission protocol to transmit the incremental differential upgrade package to the mining equipment, which is then downloaded, decompressed and upgraded by the mining equipment.

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

[0062] (1) The present invention uses edge cloud control to obtain the GNSS positioning and base station fingerprint positioning of mining equipment, and then compares and verifies them with the preset electronic fence polygon area after pre-processing. After the double verification is passed, the upgrade task is activated, thereby allowing the equipment in the mining area that meets the electronic geo-fence and device fingerprint verification to start the upgrade process, avoiding cross-mining area interference, achieving accurate identification of the target device group, and reducing the error upgrade rate;

[0063] (2) The present invention adopts an improved binary difference algorithm to compare the old and new files through dynamic sliding window partitioning and multi-level hash indexing, thereby reducing the average upgrade traffic of a single device. At the same time, by compressing the difference part to generate an incremental difference upgrade package, the incremental difference upgrade package is only 1%-5% of the traditional full package, significantly reducing traffic consumption, reducing the amount of retransmitted data, and improving the upgrade success rate in weak signal areas such as open-pit mines;

[0064] (3) In the present invention, the edge cloud establishes a connection with the mining equipment through the network, and adopts the three-way handshake transmission protocol to transmit the incremental differential upgrade package to the mining equipment, which is then downloaded, decompressed and upgraded by the mining equipment. The three-way handshake transmission protocol includes version negotiation (hash value verification), block transmission and breakpoint resumption optimization, supports complete data recovery under a 20% packet loss rate, and further improves the upgrade success rate in weak signal areas such as open-pit mines. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 1 is a flow chart of a method for incrementally upgrading mining equipment based on a differential algorithm in an embodiment of the present invention;

[0066] Figure 2 1 is a schematic diagram of a process for performing double verification in step 1 of an embodiment of the present invention;

[0067] Figure 3 This is a schematic diagram of the principle of generating an incremental differential upgrade package in step 2 of an embodiment of the present invention;

[0068] Figure 4 2 is a flow chart of generating an incremental differential upgrade package in step 2 of an embodiment of the present invention;

[0069] Figure 5 This is a flow chart of the process of transmitting the incremental differential upgrade package to the mining equipment using the three-way handshake transmission protocol in step 3 of the embodiment of the present invention;

[0070] Figure 6 This is a system architecture diagram of a mining equipment incremental upgrade system based on a differential algorithm in an embodiment of the present invention. DETAILED DESCRIPTION

[0071] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.

[0072] The term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " generally indicates an "or" relationship between the related objects.

[0073] Example 1

[0074] like Figure 1 As shown, this embodiment provides a method for incremental upgrading of mining equipment based on a differential algorithm, which is applied to the edge cloud. The steps are as follows:

[0075] Step 1: Figure 2 As shown, the GNSS (Global Navigation Satellite System) positioning and base station fingerprint positioning of the mining equipment are obtained, and after pre-processing, they are compared and verified with the preset electronic fence polygon area. After the double verification passes, the upgrade task is activated.

[0076] Step 1.1: The data layer uses GIS tools to construct a three-dimensional model of the mining area and define security upgrade areas (such as surface working areas and underground tunnels). The device feature library uses unique identifiers such as MAC (Media Access Control Address) and IMEI (International Mobile Equipment Identity) to store data, combined with RSA encryption signatures to prevent tampering.

[0077] Step 1.2: The positioning layer preferentially uses Beidou to obtain GNSS positioning of mining equipment, with GPS as a redundant backup. The CID (base station number, a 16-bit data value ranging from 0 to 65535) is used to record the base station number to which the mining equipment is connected. The time advance (TA) is converted into the range from the base station, which is used as the base station fingerprint positioning.

[0078] Step 1.3: The decision layer fuses the GNSS positioning and base station fingerprint positioning data to obtain the fused positioning position P final :

[0079] ;

[0080] Where, It is the three-dimensional coordinate obtained by GNSS positioning (GPS or Beidou), It is a two-dimensional approximate position calculated through base station fingerprint positioning (CID + TA value); w1 and w2 are the GNSS positioning weight and base station fingerprint positioning weight, respectively. w1 and w2 are adjusted dynamically. w1 depends on the signal strength (SNR), number of visible satellites, and DOP (Dilution of Precision), while w2 depends on the base station density, TA value accuracy, and historical positioning error.

[0081] In step 1.4, the execution layer compares the fused positioning position with the preset geo-fence polygon area, compares the device MAC+IMEI with the whitelist, and performs AES-256 encrypted transmission and device identity authentication. After both geo-fence verification and identity authentication are passed, the upgrade task is activated.

[0082] Step 2: Figure 3 and Figure 4 As shown in the figure, an improved binary difference algorithm (based on bsdiff optimization) is used to compare the old and new files through dynamic sliding window partitioning and multi-level hash indexing, and the difference parts are compressed to generate an incremental difference upgrade package.

[0083] Step 2.1: Perform dynamic sliding window segmentation on the old file and the new file to obtain old file blocks and new file blocks. Specifically:

[0084] Determine the window size W size , ;

[0085] Determine the sliding step size S, ,in, is the step size coefficient, ; Among them, the step coefficient The choice of directly affects the efficiency and accuracy of the algorithm. The smaller the value, the smaller the step size, the more window overlap (covering finer granularity), the higher the detection accuracy, but the more computational effort; The larger the value, the larger the step size, the less window overlap (the coverage is sparser), and the higher the computational efficiency, but local differences may be missed.

[0086] Divide the old and new files into blocks according to the sliding step size S, and divide the files into a set of file blocks covered by the sliding window:

[0087] ;

[0088] Where B is the file block b covered by the sliding window i A set of, i represents the i-th sliding window, It is defined as, where b i Defined as , old[ ] represents the old file, the original file (or data sequence) to be segmented; Indicates the length of each file block.

[0089] The dynamic adjustment rules of blocks include:

[0090] Matching feedback, if the new file block matches the old file block in consecutive blocks , then increase the window to , , is the threshold of the number of consecutive matching blocks, is the multiplication factor when the window is expanded;

[0091] Mismatch feedback: if the number of consecutive mismatch blocks between the new file block and the old file block is , the window is reduced to , , is the threshold of the number of consecutive mismatch blocks, Is the multiplication factor when the window is reduced.

[0092] parameter and These are threshold parameters used to control the dynamic adjustment of the window size. They directly affect the algorithm's sensitivity to the file matching status and the decision logic of the window adjustment. Is the threshold of the number of consecutive matching blocks, used to trigger the increase of the sliding window operation when the file repetition is high. Can be appropriately reduced; if repeatability is low, it needs to be increased To avoid misjudgment. It is the threshold of the number of consecutive mismatched blocks, which is used to trigger the operation of shrinking the sliding window. When the local changes of the file are frequent, Need to be lowered to improve sensitivity; can be increased appropriately when global changes are small .parameter and are scaling factors used to control the window resizing amplitude, which directly affect the rate at which the sliding window expands and contracts. is the multiplication factor when the window is enlarged ( ), used when the number of consecutive matching blocks exceeds the threshold When , increase the size of the sliding window. is the multiplication factor when the window is reduced ( ), used when the number of consecutive mismatch blocks exceeds the threshold When , reduce the size of the sliding window.

[0093] Step 2.2: Use a multi-level hash index to match the new file block with the old file block to obtain the unmatched file block.

[0094] Step 2.2.1. Design the hash layer.

[0095] First-level hash (fast match): File block b generated using MD5 (Message Digest Algorithm 5) i The first-level hash function is used to quickly filter non-matching blocks:

[0096] ;

[0097] The hash value generated by MD5 is a fixed-length string of 128 bits (16 bytes);

[0098] Second level hashing (checksum): Use SHA-256 (Secure Hash Algorithm 256-bit) to confirm the authenticity of the matching block:

[0099] ;

[0100] in, File block b generated using the MD5 algorithm i The second-level hash function.

[0101] Step 2.2.2: Preprocess old files.

[0102] Create a hash index table for old file blocks and set the key to , the value is ( , where offset i is the offset.

[0103] Step 2.2.3: File block matching.

[0104] Calculate new file blocks The first-level hash function value , quickly look up in a hash index table If there is no match, it is marked as new data. If there is a match, it enters the second level of verification;

[0105] In the second level check, the new file block is calculated The second-level hash function value and with the hash index table Compare, if they are consistent, confirm it as a matching file block and record the offset i ,If they are inconsistent, it is considered as a hash conflict and marked as a ,different block.

[0106] Step 2.3: Perform difference calculation, incremental compression, and Reed-Solomon encoding on the unmatched file blocks to generate an incremental differential upgrade package.

[0107] Step 2.3.1. Difference calculation.

[0108] For unmatched new file blocks , in the old file block bj Find the most similar region and calculate the longest common subsequence LCS:

[0109] ;

[0110] Where, Indicates that in the old file block and new file chunks The length of the longest common subsequence calculated between s and t, s represents the starting index of the common subsequence in the old file block, t represents the starting index of the common subsequence in the new file block, and len represents the length of the common subsequence, that is, the number of consecutive matching characters or bytes starting from s and t;

[0111] Then calculate the byte-by-byte difference between the new file block and the old file block in the LCS area:

[0112] ;

[0113] Where, Indicates the byte difference between the new file block and the old file block at the kth position in the LCS area.

[0114] Step 2.3.2: Incremental compression.

[0115] (1) Delta data compression: Use bzip2 (a compression program for the .bz2 file format) to compress the difference data:

[0116] ;

[0117] in, Represents a differential data array, consisting of the byte-by-byte difference between the new file block and the old file block in the longest common subsequence LCS area. , Represents the byte difference between the new file block and the old file block at position 0, 1, ..., len-1 in the LCS area. len represents the length of the common subsequence. bzip2 is an efficient lossless compression algorithm based on the Burrows-Wheeler transform. Its compression rate is usually better than traditional algorithms such as gzip. Indicates the compressed difference data, which is significantly smaller than the original ;

[0118] (2) Extra data compression: For the unmatched part of the new file block (extra data), use the LZ77 algorithm to pre-compress it and then use bzip2 to compress it:

[0119] ;

[0120] in, Indicates the additional data after two levels of compression. Initial compression is performed using the LZ77 algorithm, followed by further compression using the bzip2 algorithm. This combination aims to maximize compression efficiency and minimize the size of the differential packet.

[0121] Step 2.3.3: Reed-Solomon coding enhancement.

[0122] Divide the incrementally compressed data packet into n blocks and add m redundant blocks:

[0123] ;

[0124] Where G is the generator matrix, which satisfies the invertibility of any n×n submatrix, D1, D2...D n are the original data blocks, representing the first data block, the second data block, and the nth data block respectively; C1, C2, and C n+m Represents the coded block, where C1...C n Usually directly corresponds to the original data block D1...D n , C n+1 ...C n+m Represents a redundant block, calculated by the generator matrix G; the entire vector The encoded data is finally stored or transmitted.

[0125] Step 3: Establish a connection with the mining equipment through the network, and use the three-way handshake transmission protocol to transmit the incremental differential upgrade package to the mining equipment, which will download, decompress and upgrade it.

[0126] like Figure 5 As shown, in the initial transmission phase, the mining device sends the hash value (SHA-256) of the current firmware during the version negotiation phase. During the difference verification phase, the edge cloud sends the first file to the mining device. This first file is the version information file. The device performs information detection on the current file. Once the device successfully detects and receives the file, it continues to send the second file, which is the upgrade file. The device again detects the current file and receives the file after successful detection. This action is repeated until the last file (upgrade file) is transmitted, completing the transmission of the incremental differential upgrade package and the download of the device. Data transmission uses a block transmission protocol (1024KB / block), with error correction code attached to each block and breakpoint resume optimization, supporting complete data recovery under a 20% packet loss rate.

[0127] Example 2

[0128] Based on the same inventive concept as Example 1, Figure 6As shown, this embodiment provides a system for incremental upgrading of mining equipment based on a differential algorithm. The system architecture consists of an OTA cloud (OTA management & OTA service), an edge cloud (control center), an OTA terminal, and an upgrade object. The edge cloud includes:

[0129] The data acquisition and orientation verification module is used to obtain the GNSS coordinates and base station CID of mining equipment, and then compare and verify them with the preset electronic fence polygon area after pre-processing. After the verification passes, the upgrade task is activated;

[0130] The differential algorithm implementation module is used to use an improved binary differential algorithm to compare the old and new files through dynamic sliding window partitioning and multi-level hash indexing, compress the differences, and generate an incremental differential upgrade package;

[0131] The three-way handshake protocol and upgrade module are used to establish a connection with the mining equipment through the network, and use the three-way handshake transmission protocol to transmit the incremental differential upgrade package to the mining equipment, which is then downloaded, decompressed and upgraded by the mining equipment.

[0132] The specific functional implementation of each of the above modules can be found in the relevant content of the method in Example 1 and will not be elaborated on here.

[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0135] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0137] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for incremental upgrading of mining equipment based on differential algorithm, characterized in that: include: Obtain the GNSS positioning and base station fingerprint positioning of the mining equipment, and after pre-processing, compare and verify them with the preset electronic fence polygon area. After verification, activate the upgrade task; An improved binary difference algorithm is used to compare the old and new files through dynamic sliding window partitioning and multi-level hash indexing, and the difference parts are compressed to generate an incremental difference upgrade package; A connection is established with the mining equipment through the network, and the incremental differential upgrade package is transmitted to the mining equipment using the three-way handshake transmission protocol, which is then downloaded, decompressed, and upgraded by the mining equipment.

2. The method for incremental upgrading of mining equipment based on differential algorithm according to claim 1, characterized in that: The GNSS positioning and base station fingerprint positioning of the mining equipment are obtained and compared with the preset electronic fence polygon area after pre-processing, including: Prioritize using Beidou to obtain GNSS positioning for mining equipment, with GPS as a redundant backup; Use CID to record the base station number connected to the mining equipment, and convert it into the range from the base station through the time advance TA, which serves as the base station fingerprint positioning; The GNSS positioning and base station fingerprint positioning are fused to obtain the fused positioning position P final : ; Where, It is the three-dimensional coordinate obtained by GNSS positioning. is the two-dimensional approximate position calculated by base station fingerprint positioning, w1 and w2 are the GNSS positioning weight and base station fingerprint positioning weight respectively; The fused positioning position is compared and verified with the preset electronic fence polygon area. The device MAC+IMEI is compared with the whitelist, and AES-256 encrypted transmission is used to perform device identity authentication. The upgrade task is activated after both electronic fence verification and identity authentication are passed.

3. The method for incremental upgrading of mining equipment based on differential algorithm according to claim 1, characterized in that: The method for generating the incremental differential upgrade package includes: Perform dynamic sliding window block division on the old file and the new file to obtain old file blocks and new file blocks; Use multi-level hash indexing to match new file blocks with old file blocks to obtain unmatched file blocks; Perform difference calculation, incremental compression, and Reed-Solomon encoding on unmatched file blocks to generate an incremental differential upgrade package.

4. The method for incremental upgrading of mining equipment based on differential algorithm according to claim 3, characterized in that: The dynamic sliding window segmentation of the old file and the new file includes: Determine the window size W size ; Determine the sliding step size S, , where α is the step size coefficient; Divide the old and new files into blocks according to the sliding step size S, and divide the files into a set of file blocks covered by the sliding window: ; Where B is the file block b covered by the sliding window i A set of, i represents the i-th sliding window, It is defined as, where b i Defined as , old[ ] represents the old file, Indicates the length of each file block; The dynamic adjustment rules of blocks include: If the number of consecutive matching blocks of the new file block and the old file block , then increase the window to , , is the threshold of the number of consecutive matching blocks, is the multiplication factor when the window is expanded; If the number of consecutive mismatch blocks between the new file block and the old file block , the window is reduced to , , is the threshold of the number of consecutive mismatch blocks, Is the multiplication factor when the window is reduced.

5. The method for incremental upgrading of mining equipment based on differential algorithm according to claim 3 is characterized in that: The method of using a multi-level hash index to match new file blocks with old file blocks includes: Create a hash index table for old file blocks and set the key to , the value is ( ,in, File block b generated using the MD5 algorithm i The first-level hash function, File block b generated using the MD5 algorithm i The second-level hash function, offset i is the offset; Calculate new file blocks The first-level hash function value , quickly look up in a hash index table If there is no match, it is marked as new data. If there is a match, it enters the second level of verification; In the second level check, the new file block is calculated The second-level hash function value and with the hash index table Compare, if they are consistent, confirm it as a matching file block and record the offset i ,If they are inconsistent, it is considered as a hash conflict and marked as a ,different block.

6. The method for incremental upgrading of mining equipment based on differential algorithm according to claim 3, characterized in that: The performing difference calculation on the unmatched file blocks includes: For new file blocks that do not match , in the old file block b j Find the most similar region and calculate the longest common subsequence LCS: ; Where, Indicates that in the old file block and new file chunks The length of the longest common subsequence calculated between s and t, s represents the starting index of the common subsequence in the old file block, t represents the starting index of the common subsequence in the new file block, and len represents the length of the common subsequence, that is, the number of consecutive matching characters or bytes starting from s and t; Then calculate the byte-by-byte difference between the new file block and the old file block in the LCS area: ; Where, Indicates the byte difference between the new file block and the old file block at the kth position in the LCS area.

7. The method for incremental upgrading of mining equipment based on differential algorithm according to claim 3, characterized in that: The incremental compression includes: Use bzip2 to compress the difference data: ; in, Represents a differential data array, consisting of the byte-by-byte difference between the new file block and the old file block in the longest common subsequence LCS area. , Respectively represent the byte differences between the new file block and the old file block at positions 0, 1, ..., len-1 in the LCS area. len represents the length of the common subsequence. bzip2 is an efficient lossless compression algorithm based on the Burrows-Wheeler transform. Represents compressed difference data; The unmatched parts of the new file block are pre-compressed using the LZ77 algorithm and then compressed using bzip2: ; Among them, extra represents additional data, Indicates the additional data after two levels of compression.

8. The method for incremental upgrading of mining equipment based on differential algorithm according to claim 3, characterized in that: The Reed-Solomon encoding includes: Divide the incrementally compressed data packet into n blocks and add m redundant blocks: ; Where G is the generator matrix, which satisfies the invertibility of any n×n submatrix, D1, D2...D n are the original data blocks, representing the first data block, the second data block...the nth data block, C1, C2...C n+m Represents the encoded block.

9. The method for incremental upgrading of mining equipment based on differential algorithm according to claim 1, characterized in that: The three-way handshake transmission protocol is used to transmit the incremental differential upgrade package to the mining equipment, including: Send the first file to the mining area device end, the first file is the version information file, the device end performs information detection on the current file, when the device end detects successfully and receives the file, continues to send the second file, the device end detects the current file again and receives the file after the detection is successful, repeats this action until the last file is transferred, completing the transmission of the incremental differential upgrade package and the download of the device end; Among them, data transmission adopts a block transmission protocol, with error correction code and breakpoint resumption optimization added to each block, supporting complete data recovery under a 20% packet loss rate.

10. A mining equipment incremental upgrade system based on differential algorithm, characterized in that: include: The data acquisition and orientation verification module is used to obtain the GNSS coordinates and base station CID of mining equipment, and then compare and verify them with the preset electronic fence polygon area after pre-processing. After the verification passes, the upgrade task is activated; The differential algorithm implementation module is used to use an improved binary differential algorithm to compare the old and new files through dynamic sliding window partitioning and multi-level hash indexing, compress the differences, and generate an incremental differential upgrade package; The three-way handshake protocol and upgrade module are used to establish a connection with the mining equipment through the network, and use the three-way handshake transmission protocol to transmit the incremental differential upgrade package to the mining equipment, which is then downloaded, decompressed and upgraded by the mining equipment.

Citation Information

Patent Citations

  • An OTA upgrade method and system based on protocol conversion

    CN112822199B

Cited By

  • Electric energy meter security firmware upgrading method

    CN121644608A