Version maintenance method and system of controller, electronic equipment and storage medium

By employing a version maintenance method for hydraulic support controllers in underground coal mines, and utilizing maintenance tools and encryption/decryption technologies, version consistency is ensured, resolving the issue of inconsistent controller versions. This improves accuracy and reliability, simplifies network management, and reduces communication risks.

CN120848940APending Publication Date: 2025-10-28内蒙古蒙泰不连沟煤业有限责任公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510922147.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

During maintenance, the hydraulic support controller in underground coal mines is prone to version inconsistencies due to human error, which can cause new functions to malfunction, increase the workload of maintenance personnel, and threaten production safety.

Method used

The system downloads and stores program upgrade packages using maintenance tools, receives controller broadcast information, encrypts and decrypts upgrade packages using hash algorithms, constructs a mapping data structure, determines the target controller based on version number and filename matching to ensure version consistency, and uses Coap and gRPC protocols for communication to improve accuracy and reliability.

Benefits of technology

It effectively prevents controller version downgrades, improves the accuracy and reliability of version maintenance, simplifies network management, reduces the risk of communication interruptions, and ensures production safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848940A_ABST
    Figure CN120848940A_ABST
Patent Text Reader

Abstract

The invention relates to a controller version maintenance method and system, electronic equipment and a storage medium, and the method comprises the steps: responding to an upgrade instruction, downloading and storing a program upgrade package by a maintenance tool, and receiving broadcast information of each online controller at the same time; the IP of the maintenance tool and the IP of the online controller are in the same network segment; the program upgrade package comprises an identifier, a version number and a program data package; determining a target controller for executing upgrade maintenance according to the stored program upgrade package and all the broadcast information; and the maintenance tool sends the program upgrade package to the target controller so as to upgrade and maintain the target controller. According to the invention, version maintenance can be accurately carried out on the controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, and specifically relates to a method, system, electronic device, and storage medium for version maintenance of a controller. Background Technology

[0002] The environment of underground coal mining faces is complex and diverse. Currently, downloaded maintenance files for underground hydraulic support controllers are often renamed by maintenance technicians, or older versions of maintenance files are mistakenly used. This leads to inconsistencies between the updated and required versions of the controllers, and even downgrades of previously updated programs to older versions. Consequently, new controller functions become unusable, complicating maintenance work, increasing the workload of maintenance personnel, and posing a serious threat to the safety of production operations. Therefore, a new version maintenance technology is urgently needed to ensure the accuracy and complexity of version maintenance for underground coal mine controllers. Summary of the Invention

[0003] The purpose of this invention is to provide a method, system, electronic device, and storage medium for version maintenance of controllers, in order to solve the problems of complexity and inaccuracy in the version maintenance of underground controllers in coal mines in the prior art.

[0004] To address the aforementioned problems, the controller version maintenance method disclosed in this invention employs the following technical solution:

[0005] In response to the upgrade command, the maintenance tool downloads and stores the program upgrade package, and simultaneously receives broadcast information from each online controller; the IP address of the maintenance tool is on the same network segment as the IP address of the online controller; the program upgrade package includes an identifier, a version number, and a program data packet;

[0006] The target controller for performing the upgrade maintenance is determined based on the stored program upgrade package and all the broadcast information;

[0007] The maintenance tool sends the program upgrade package to the target controller to perform upgrade and maintenance on the target controller.

[0008] In some embodiments, a hash algorithm is used to encrypt the program upgrade package, and the encrypted program upgrade package is sent to the cloud.

[0009] In some embodiments, each online controller broadcasts information using the Coap protocol; the broadcast information includes IP address, application version number, daemon version number, gateway address, device type, subnet mask, and system name.

[0010] In some embodiments, the process of determining the target controller for performing upgrade maintenance based on the program upgrade package and the broadcast information includes:

[0011] The program upgrade package is processed to construct a mapping data structure;

[0012] All the broadcast messages are processed to obtain a List;

[0013] The target controller for performing upgrade and maintenance is determined based on the mapping data structure, the program upgrade package, and the List.

[0014] In some embodiments, the program upgrade package is processed sequentially to obtain extracted information, and the mapping data structure is constructed based on the extracted information.

[0015] In some embodiments, the process of sequentially processing the program upgrade package to obtain extracted information and constructing the mapping data structure based on the extracted information includes:

[0016] The encrypted program upgrade package is decrypted using a hash algorithm, and after decryption, a buffer is used to read the version identifier in the program upgrade package. If the version identifier includes an identifier, the extracted information is obtained by parsing, and the extracted information includes the version number in the version identifier.

[0017] The mapping data structure is constructed based on the extracted information and the filename corresponding to the program upgrade package.

[0018] In some embodiments, the process of determining the target controller for performing upgrade maintenance based on the mapping data structure, the program upgrade package, and the List includes:

[0019] Determine whether the filenames match based on the filenames of the mapping data structure and the program upgrade package;

[0020] If the filenames match, the version comparison result is determined based on the version number of the online controller in the List and the version number in the mapping data structure. If the version comparison result is the first result, the target controller is determined based on the version number of the online controller. If the version comparison result is the second comparison result, the online controller cannot be upgraded or maintained.

[0021] To address the aforementioned issues, the present invention relates to a controller version maintenance system, comprising a server, a cloud platform, and a base station;

[0022] The server is used to create a new program upgrade package and transmit the program upgrade package to the cloud; the program upgrade package includes an identifier, a version number, and a program data package;

[0023] The base station includes maintenance tools and multiple online controllers;

[0024] In response to the upgrade command, the maintenance tool downloads and stores the program upgrade package, and simultaneously receives broadcast information from each online controller; the IP address of the maintenance tool is on the same network segment as the IP address of the online controller.

[0025] The target controller for performing the upgrade maintenance is determined based on the stored program upgrade package and all the broadcast information;

[0026] The maintenance tool sends the program upgrade package to the target controller to perform upgrade and maintenance on the target controller.

[0027] To address the aforementioned problems, the present invention relates to an electronic device comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the aforementioned controller version maintenance method.

[0028] To address the aforementioned problems, the present invention relates to a computer-readable storage medium storing a computer program, which, when executed on a processor, implements the aforementioned controller version maintenance method.

[0029] The beneficial effects of the present invention are as follows:

[0030] The controller version maintenance method of the present invention, in response to an upgrade command, involves a maintenance tool downloading and storing a program upgrade package, while simultaneously receiving broadcast information from each online controller. The IP address of the maintenance tool is on the same network segment as the IP address of the online controller. The program upgrade package includes an identifier, a version number, and a program data packet. Based on the stored program upgrade package and all broadcast information, the target controller for upgrade maintenance is determined. The maintenance tool sends the program upgrade package to the target controller to perform the upgrade maintenance. This invention incorporates a new version identifier within the program upgrade package, enabling the parsing of the version number within the maintenance upgrade file before upgrading the online controller. This prevents situations where manually modifying filenames and version numbers leads to a controller with a new version program being downgraded to an older version, thereby improving the reliability and accuracy of controller version maintenance. Attached Figure Description

[0031] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below:

[0032] Figure 1 This is a schematic diagram of the controller version maintenance method in an embodiment of the present invention;

[0033] Figure 2 This is a schematic diagram of the structure of the program upgrade package in an embodiment of the present invention;

[0034] Figure 3This is a schematic diagram of the process for determining the target controller in an embodiment of the present invention. Detailed Implementation

[0035] To make the technical objectives, technical solutions, and beneficial effects of the present invention clearer, the technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention; that is, the described embodiments are merely some embodiments of the present invention, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0036] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0037] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0038] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0039] Currently, before maintaining and upgrading hydraulic support controllers in coal mines, maintenance personnel download the corresponding maintenance package version, select what they believe to be the correct version, connect to the underground wireless base station via Wi-Fi, and transmit the maintenance package file to a specific controller via the GRPC protocol for upgrade. This maintenance method only verifies the version during package download and does not consider the possibility of human error in modifying the maintenance file name. This could result in a controller already updated to the new version being maintained by an older version of the maintenance file, leading to controller version downgrading and the inability to use new features in the new version. Therefore, this application proposes a new controller version maintenance method, system, electronic device, and storage medium.

[0040] The following describes the mobile device-based authentication system using specific embodiments.

[0041] A specific embodiment of a controller version maintenance method involved in this invention is as follows: Figure 1 The flowchart shown illustrates the version maintenance method, which includes the following steps:

[0042] S100: Create a new program upgrade package and transmit the program upgrade package to the cloud; the program upgrade package includes an identifier, version number, and program data package;

[0043] Before maintaining and upgrading the hydraulic support controller of the underground fully mechanized mining face, the version of the controller's daemon, APP, and application must be verified to prevent the controller from downgrading from a new version to an old version, which could cause new functions to be unusable or maintenance and upgrade failures. First, the maintenance tool needs to parse the upgrade package version. The upgrade package version is defined in the first 32 bytes of the upgrade package file and starts with the "***" field. If it cannot be parsed, it means that it is an old version upgrade package and cannot be upgraded directly. If it is parsed, it means that it is a new version upgrade package. Parse out the version number and upgrade program, and use the upgrade program to directly maintain and upgrade the controller.

[0044] In the embodiments of this application, such as Figure 2 As shown, the program upgrade package includes a version identifier and a program data package. The version identifier includes an identifier and a version number. In this embodiment, the version number has a first preset length, and the version identifier has a second preset length, which is greater than the first preset length; for example, the version number is set to 28 characters, and the version identifier is 32 bytes.

[0045] In some embodiments, the identifier is "***". In other implementations, the identifier can also be "&&&", "##", or "****", etc. The identifier is only used to identify the new version of the program upgrade package; therefore, the specific representation of the identifier is not limited. For example, in the version identifier "***v1.0.0.2", "***" is the identifier, and the version number is "v1.0.0.2".

[0046] In this embodiment of the application, the filename of the program upgrade package includes the application and the guardian entry, etc.

[0047] In some embodiments, the program upgrade package is encrypted using a preset algorithm, and the encrypted program upgrade package is sent to the cloud. For example, a hash algorithm is used to encrypt the program upgrade package, and the encrypted program upgrade package is sent to the cloud for storage, to be downloaded when preparing to upgrade the controller of the hydraulic support. The preset algorithm may also use MD5, etc.

[0048] The new version identifier is written into the program upgrade package. Before maintaining and upgrading the online controller, the version number inside the maintenance and upgrade file is parsed to check if it matches. This prevents the controller from being downgraded to the old version program due to manual modification of file names and version numbers.

[0049] In response to upgrade commands, the maintenance tool downloads and stores the program upgrade package, while simultaneously receiving broadcast information from each online controller; the IP address of the maintenance tool is on the same network segment as the IP address of the online controller.

[0050] In this embodiment of the application, the underground base station in the coal mine connects to the cloud via Wi-Fi and uses the base station's maintenance tools to download program upgrade packages from the cloud.

[0051] In this embodiment, the IP address of the maintenance tool and the IP address of the online controller of the hydraulic support are located on the same network segment. Within the same network segment, devices can communicate directly without router forwarding, improving communication efficiency. Furthermore, network administrators can more easily manage and monitor network devices, simplifying network management complexity. The communication path between devices is more direct and stable, reducing the risk of communication interruptions due to router failures or network configuration errors. Therefore, having the IP addresses of the maintenance tool and the online controller on the same network segment improves communication efficiency, simplifies network management, and enhances network stability.

[0052] For example, the IP address of the maintenance tool is 191.168.0.199, and the IP addresses of the online controllers for the 100 hydraulic supports on the base station working surface are 191.168.0.1 to 191.168.0.100, representing that there are 100 online controllers. The last digit is concatenated with "#" to represent the support number.

[0053] The online controller broadcasts information based on a preset protocol, where Coap (Constrained Application Protocol) is a lightweight communication protocol designed by the IETF for Internet of Things (IoT) and Machine-to-Machine (M2M) environments. The broadcast information includes IP address, application version number, daemon version number, gateway address, device type, subnet mask, system name, etc.

[0054] S300 determines the target controller to perform upgrade maintenance based on the stored program upgrade package and all broadcast information;

[0055] In the embodiments of this application, such as Figure 3 As shown, the process of determining the target controller for upgrade maintenance based on the program upgrade package and broadcast information includes:

[0056] S310 processes the program upgrade package to construct a mapping data structure;

[0057] In some embodiments, the program upgrade package is decrypted and parsed sequentially to obtain extracted information, and a mapping data structure is constructed based on the extracted information.

[0058] One specific implementation involves using a hash (SHA1) algorithm to decrypt the encrypted program upgrade package. Then, a buffer is used to read the version identifier from the program upgrade package. If the version identifier includes an identifier, extracted information is obtained, including the version number from the version identifier. A mapping data structure is constructed based on the extracted information and the filename corresponding to the program upgrade package. If the version identifier includes an identifier, it indicates a new version of the program.

[0059] For example, the first 32 bytes of the version number identifier in the maintenance upgrade package are read using a buffer, the SHA1 encrypted program upgrade package is decrypted, and it is checked whether it starts with "***". If it does, it means that it is a new version of the program, and the "v2.2.0.0" in "***v2.2.0.0" is parsed out to represent the version number of the maintenance upgrade file.

[0060] In some embodiments, a mapping data structure (i.e., a Map) is created based on the version number in the version identifier and the filename of the program upgrade package. The mapping data structure (i.e., a Map) stores the new daemon, application, and their corresponding version numbers for verification. For example, {"Application Program", "v2.2.0.0"}, {"Daemon program", "v2.2.0.0"}.

[0061] S320 processes all broadcast messages to obtain a List;

[0062] In some embodiments, the List includes the application version number and daemon version number corresponding to the online controllers; the broadcast information of the online controllers is parsed and the List is updated according to the broadcast information; therefore, the List stores the controller information that is currently online; the List is a common data type, and elements can be added and deleted at any time.

[0063] S330 determines the target controller for performing upgrade and maintenance based on the mapping data structure, program upgrade package, and List.

[0064] In this embodiment, the filenames are determined to match based on the filenames of the mapping data structure and the program upgrade package. If the filenames match, the version comparison result is determined based on the version number of the online controller in the List and the version number in the mapping data structure. If the version comparison result is the first result, the online controller corresponding to the version number of the online controller is taken as the target controller that can perform upgrade maintenance. If the version comparison result is the second comparison result, the online controller cannot be upgraded and maintained.

[0065] For example, the filenames in the Map data structure are traversed and matched with the daemon and application filenames in the List. If a match is found, it indicates success. Then, the version numbers are compared. If the version number of the daemon or application in the List is lower than the version number in the Map data structure, a correct comparison result is output. The online controller corresponding to this comparison result is the target controller, and the target controller can be upgraded according to the program upgrade package. If the version number of the daemon or application in the List is lower than the version number in the Map data structure, an incorrect comparison result is output. In this case, the ascending upgrade package cannot upgrade and maintain the current online controller.

[0066] Before performing maintenance and upgrades on the online controller, it is necessary to first parse the version number within the maintenance and upgrade file to ensure it conforms to the specified version. This measure effectively prevents unauthorized modification of the program upgrade package file name and version number, thus avoiding situations where the controller is downgraded to an older version due to a newer version of the program upgrade package. It also effectively avoids safety issues in production operations caused by the unavailability of the new version of the program.

[0067] S400: The maintenance tool sends the program upgrade package to the target controller to perform upgrade and maintenance on the target controller.

[0068] In this embodiment, before the maintenance tool sends the program upgrade package to the target controller, it first establishes a communication channel between the maintenance tool server and the target controller to transmit the program upgrade package through the communication channel; and verifies the program upgrade package to be executed again to ensure the accuracy and reliability of the upgrade maintenance.

[0069] Specifically, first, write the Proto file. The Proto file is a file format used to define data structures and service interfaces. In the Proto file (filename remote_maintain.propto), the Request and Response messages of the gRPC protocol are specified, as well as the service interface and client interface of the transmission program upgrade package. The interface of the server where the maintenance toolkit is located is the service interface, and the interface of the controller is the client interface.

[0070] GRPC is an open-source RPC framework built on top of HTTP / 2 infrastructure, thus naturally possessing a series of HTTP / 2 advantages: 1. Binary framed data transmission multiplexing; 2. Server-side push; 3. Header compression; 4. Multiplexing. The GRPC workflow is roughly as follows: The client constructs a request message corresponding to the RPC to be invoked; the client invokes the RPC, which includes the service name, method name, and request message; the request message is serialized into an HTTP / 2 message; the client sends the request to the server; the server receives the request and parses the request message. The GRPC client specifies the client port number required for connection: Port=60173. A communication channel for connecting to the server's service interface is created based on the client port number and the target controller IP. A service request API proxy is constructed: RemoteMaintainGrpc.newBlockingStub(channel). The API proxy is used to call the specific business logic code, which is divided into three stages:

[0071] Initial phase: The target controller sends a program upgrade request to the maintenance tool's server. Upon receiving the request, the server performs parameter verification. If the verification is successful, it returns a response message. The target controller on the client side parses the Handle field in the response message. If it is greater than 0, it means success and proceeds to the next phase; otherwise, it does not proceed to the next phase.

[0072] Transmission Phase: The client's target controller maintains the program upgrade package by dividing it into 1MB byte arrays, records the total number of blocks, and sends the byte arrays to the server. The server receives the arrays and returns a response message. The client parses the ErrorCode field in the response message; if it equals 0, it indicates success, and the client proceeds to send the next byte array; otherwise, transmission is terminated. The number of blocks sent is recorded. When the number equals the total number of blocks, it indicates that the program upgrade package transmission is complete, and the next phase begins.

[0073] Verification phase: The server concatenates and verifies the byte array sent by the client, and returns a response message to the client after verification. The client receives and parses the response message to obtain the ErrorCode. If it is equal to 0, it means success and the process ends.

[0074] Before performing program upgrades and maintenance, verification of the program upgrade package by both the client and server can further improve the accuracy and reliability of the maintenance.

[0075] It should be noted that, in addition to gRPC, REST can also be used to establish a connection between the client and server for file transfer maintenance.

[0076] A specific embodiment of a controller version maintenance system involved in this invention includes a server, a cloud, and a base station;

[0077] The server is used to create new program upgrade packages and transmit them to the cloud; the program upgrade package includes an identifier, version number, and program data package.

[0078] The base station includes maintenance tools and multiple online controllers;

[0079] In response to the upgrade command, the maintenance tool downloads and stores the program upgrade package, while simultaneously receiving broadcast information from each online controller; the IP address of the maintenance tool is on the same network segment as the IP address of the online controller.

[0080] The target controller for performing the upgrade maintenance is determined based on the stored program upgrade package and all the broadcast information;

[0081] The maintenance tool sends the program upgrade package to the target controller to perform upgrade and maintenance on the target controller.

[0082] It is understood that the system in this embodiment corresponds to the version maintenance method of the controller in the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described again here.

[0083] The present invention also provides an electronic device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to cause the electronic device to perform the aforementioned controller version maintenance method.

[0084] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0085] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.

[0086] The present invention also provides a computer-readable storage medium for storing the computer program used in the aforementioned terminal device. For example, the computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0088] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0089] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0090] Finally, it should be noted that the above embodiments are only for illustration and not for limiting the technical solutions of the present invention. Any equivalent substitutions, modifications or partial substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for version maintenance of a controller, characterized in that, include: In response to the upgrade command, the maintenance tool downloads and stores the program upgrade package, while simultaneously receiving broadcast information from each online controller; The IP address of the maintenance tool is on the same network segment as the IP address of the online controller; the program upgrade package includes an identifier, a version number, and a program data package; The target controller for performing the upgrade maintenance is determined based on the stored program upgrade package and all the broadcast information; The maintenance tool sends the program upgrade package to the target controller to perform upgrade and maintenance on the target controller.

2. The controller version maintenance method according to claim 1, characterized in that, The program upgrade package is encrypted using a hash algorithm, and the encrypted program upgrade package is sent to the cloud.

3. The controller version maintenance method according to claim 1, characterized in that, Each online controller broadcasts information using the Coap protocol; the broadcast information includes IP address, application version number, daemon version number, gateway address, device type, subnet mask, and system name.

4. The controller version maintenance method according to claim 2, characterized in that, The process of determining the target controller for performing upgrade and maintenance based on the program upgrade package and the broadcast information includes: The program upgrade package is processed to construct a mapping data structure; All the broadcast messages are processed to obtain a List; The target controller for performing upgrade and maintenance is determined based on the mapping data structure, the program upgrade package, and the List.

5. The controller version maintenance method according to claim 4, characterized in that, The program upgrade package is processed sequentially to obtain extracted information, and the mapping data structure is constructed based on the extracted information.

6. The controller version maintenance method according to claim 5, characterized in that, The process of sequentially processing the program upgrade package to obtain extracted information, and constructing the mapping data structure based on the extracted information, includes: The encrypted program upgrade package is decrypted using a hash algorithm, and after decryption, a buffer is used to read the version identifier in the program upgrade package. If the version identifier includes an identifier, the extracted information is obtained by parsing, and the extracted information includes the version number in the version identifier. The mapping data structure is constructed based on the extracted information and the filename corresponding to the program upgrade package.

7. The controller version maintenance method according to claim 6, characterized in that, The process of determining the target controller for upgrade and maintenance based on the mapping data structure, the program upgrade package, and the List includes: Determine whether the filenames match based on the filenames of the mapping data structure and the program upgrade package; If the filenames match, the version comparison result is determined based on the version number of the online controller in the List and the version number in the mapping data structure. If the version comparison result is the first result, the target controller is determined based on the version number of the online controller. If the version comparison result is the second comparison result, the online controller cannot be upgraded or maintained.

8. A version maintenance system for a controller, characterized in that, This includes the server, cloud, and base station; The server is used to create a new program upgrade package and transmit the program upgrade package to the cloud; the program upgrade package includes an identifier, a version number, and a program data package; The base station includes maintenance tools and multiple online controllers; In response to the upgrade command, the maintenance tool downloads and stores the program upgrade package, and simultaneously receives broadcast information from each online controller; The IP address of the maintenance tool is on the same network segment as the IP address of the online controller; The target controller for performing the upgrade maintenance is determined based on the stored program upgrade package and all the broadcast information; The maintenance tool sends the program upgrade package to the target controller to perform upgrade and maintenance on the target controller.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the version maintenance method of the controller according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements the version maintenance method of the controller according to any one of claims 1-7.