A controller file updating method, device, electronic device and storage medium

By only transmitting the updated subfiles and their checksums of the controller files, the problem of low communication efficiency in industrial control systems is solved, and more efficient and secure data transmission is achieved.

CN112947972BActive Publication Date: 2025-02-11HANGZHOU HOLLYSYS AUTOMATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110348256.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-31
Publication Date
2025-02-11
Estimated Expiration
2041-03-31

AI Technical Summary

Technical Problem

In the field of industrial control, communication efficiency is low during the update process of controller files, resulting in insufficient data transmission of the system.

Method used

By only transmitting update subfiles and their corresponding update checksums, the amount of data to be transmitted is reduced and communication efficiency is improved. The specific steps include detecting the update of the project file, determining the update subfile from multiple subfiles, obtaining its update checksum, and sending it to the controller for update and verification.

Benefits of technology

It improves communication efficiency, reduces data transmission amount, ensures the security and correctness of data transmission, and solves the problem of low communication efficiency in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112947972B_ABST
    Figure CN112947972B_ABST
Patent Text Reader

Abstract

The present application discloses a controller file update method, device, electronic device and computer-readable storage medium, the method comprising: if it is detected that an engineering file is updated, then an update subfile is determined from multiple subfiles corresponding to the engineering file; an update checksum corresponding to the update subfile is obtained; the update subfile and the update checksum are sent to the controller so that the controller updates the controller file using the update subfile and verifies the update using the update checksum; the method enables the controller to update the local controller file using the update subfile by sending the update subfile and the update checksum to the controller, and at the same time verifies the update process using the update checksum to ensure the correctness of the update. The update checksum is used to ensure that the update can be performed normally, and at the same time, the complete controller file does not need to be transmitted, only the update subfile is transmitted, thereby reducing the amount of data that needs to be transmitted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial control technology, and in particular to a controller file updating method, a controller file updating device, an electronic device, and a computer-readable storage medium. Background Art

[0002] In the current industrial control field, control equipment requires high concurrency, that is, it can handle multiple tasks at the same time, and the most important thing for a multi-task control system is to perform secure data transmission. After the configuration software completes the software coding, how to safely and reliably send the data to the controller becomes one of the important factors affecting whether the multi-task industrial control system can operate safely and stably. When updating the controller file in the controller, the related technology usually sends the updated controller file to the controller for correct update. However, the controller file is large in size, so the communication efficiency is low.

[0003] Therefore, the problem of low communication efficiency in the related technology is a technical problem that needs to be solved by those skilled in the art. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a controller file update method, a controller file update device, an electronic device and a computer-readable storage medium, which only transmit the updated sub-file, reduce the amount of data to be transmitted, and solve the problem of low communication efficiency existing in the related technology.

[0005] To solve the above technical problems, the present application provides a controller file update method, comprising:

[0006] If it is detected that the project file is updated, an updated sub-file is determined from a plurality of sub-files corresponding to the project file;

[0007] Obtaining an update checksum corresponding to the update subfile;

[0008] The update sub-file and the update checksum are sent to the controller so that the controller updates the controller file using the update sub-file and verifies the update using the update checksum.

[0009] Optionally, the determining the updated sub-file from the multiple sub-files corresponding to the project file includes:

[0010] Obtain file version information corresponding to the controller;

[0011] The updated sub-file is determined from the plurality of sub-files according to the file version information and the update record.

[0012] Optionally, obtaining the update checksum corresponding to the update subfile includes:

[0013] Obtaining a first checksum corresponding to the update subfile;

[0014] Determine a number of parent files corresponding to the updated subfile, and obtain second checksums corresponding to the parent files;

[0015] The first checksum and the second checksum are determined as the updated checksum.

[0016] Optionally, sending the update sub-file and the update checksum to the controller includes:

[0017] Obtaining file identification information corresponding to the updated sub-file;

[0018] Performing update and locking processing on the controller;

[0019] The update sub-file, the file identification information and the update checksum are sent to the controller, and the controller is unlocked after the sending is completed.

[0020] Optionally, before determining the update sub-file from the multiple sub-files corresponding to the project file, the method further includes:

[0021] Obtaining identity information and verifying the identity information;

[0022] If the identity information passes the verification, providing update authority for the identity information;

[0023] Correspondingly, after sending the update sub-file and the update checksum to the controller, the method further includes:

[0024] The update authority corresponding to the identity information is cleared.

[0025] Optionally, after sending the update sub-file and the update checksum to the controller, the method further includes:

[0026] Obtaining a verification checksum sent by the controller;

[0027] determining whether the verification checksum matches the corresponding update checksum;

[0028] If they do not match, an update failure alarm will be issued.

[0029] Optionally, if the verification checksum matches the update checksum, comprising:

[0030] Obtaining operation status information corresponding to the controller, and using the operation status information to determine whether the controller is operating normally;

[0031] If the controller does not operate normally, an abnormal operation alarm is issued.

[0032] The present application also provides a controller file update device, comprising:

[0033] A determination module, configured to determine an updated sub-file from a plurality of sub-files corresponding to the project file if an update of the project file is detected;

[0034] A checksum acquisition module, used to acquire an update checksum corresponding to the update subfile;

[0035] The update module is used to send the update sub-file and the update checksum to the controller, so that the controller updates the controller file using the update sub-file and verifies the update using the update checksum.

[0036] The present application also provides an electronic device, including a memory and a processor, wherein:

[0037] The memory is used to store the computer program;

[0038] The processor is used to execute the computer program to implement the controller file updating method mentioned above.

[0039] The present application also provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the above-mentioned controller file update method when executed by a processor.

[0040] The controller file update method provided in the present application, if it is detected that an update of a project file has occurred, determines an updated sub-file from multiple sub-files corresponding to the project file; obtains an update checksum corresponding to the updated sub-file; sends the updated sub-file and the update checksum to the controller, so that the controller uses the updated sub-file to update the controller file, and uses the update checksum to verify the update.

[0041] It can be seen that when the method detects that the project file has been updated, it indicates that the updated project file needs to be sent to the controller in order to update the controller file therein. Since the project file includes controller files corresponding to multiple tasks, and the controller files corresponding to each task are composed of multiple sub-files, the update of the project file is specifically the update of several sub-files, so the update sub-file can be determined from the multiple sub-files corresponding to the project file. In order to ensure the security of data transmission, the update checksum corresponding to the updated sub-file is obtained at the same time. By sending the updated sub-file and the update checksum to the controller, the controller can use the updated sub-file to update the local controller file, and use the update checksum to check the update process to ensure the correctness of the update. This method uses the update checksum to ensure that the update can be carried out normally. At the same time, there is no need to transmit the complete controller file, only the update sub-file is transmitted, thereby reducing the amount of data that needs to be transmitted and solving the problem of low communication efficiency in related technologies.

[0042] In addition, the present application also provides a controller file updating device, an electronic device and a computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0044] Figure 1 A flow chart of a controller file update method provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of a specific engineering file composition structure provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of the structure of a controller file updating device provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] Please refer to Figure 1 , Figure 1 A flow chart of a controller file update method provided in an embodiment of the present application. The method includes:

[0050] S101: If it is detected that the project file is updated, an updated sub-file is determined from a plurality of sub-files corresponding to the project file.

[0051] Some or all of the steps in this embodiment can be performed by a designated electronic device, and the specific form of the designated electronic device is not limited, for example, it can be a computer, or it can be a control terminal. The engineering file corresponds to the controller file, which can be a controller file located on the designated electronic device and sent to the controller; or it can be other files used to generate controller files. It can be understood that in this case, if the engineering file changes, the controller file generated based on the engineering file will also change. Therefore, when it is detected that the engineering file is updated, it means that the controller file on the controller needs to be updated.

[0052] In this embodiment, the engineering file is composed of multiple sub-files, each of which can directly constitute the engineering file; or can constitute multiple intermediate files, and then use each intermediate file to constitute the engineering file. In this case, this embodiment does not limit the specific number and type of intermediate files, nor does it limit whether the intermediate files have a subordinate relationship. For example, it can be a secondary subordinate relationship, that is, the engineering file is composed of multiple first-level intermediate files, each first-level intermediate file is composed of multiple second-level intermediate files, and each second-level intermediate file is composed of multiple sub-files. The sub-file is the smallest unit that constitutes the engineering file. The smaller the granularity of the sub-file, the smaller the amount of data required to be transmitted when updating the controller file under the same circumstances. For an industrial control system with multiple tasks, since each task has different categories of engineering files, such as code management files, hardware configuration management files, network variable request management files, etc., in a preferred embodiment, the engineering file can be divided with the task as the initial granularity, and the file category is divided in the engineering file corresponding to each task as the granularity, and the preset file volume is divided in the engineering file of each category as the granularity, thereby obtaining multiple sub-files. It is understandable that in this case, the number of sub-files corresponding to each task and each category of engineering files within each task may not be used. In another embodiment, the engineering files may be divided based on the category of engineering files as the initial granularity, and then divided based on the task as the granularity in the engineering files corresponding to each category, and finally divided based on the preset file volume as the granularity.

[0053] Please refer to Figure 2 , Figure 2 A specific schematic diagram of the composition structure of an engineering file provided in an embodiment of the present application. The engineering file is divided into six intermediate files according to the file category, namely, the code management file of the task, the hardware configuration management file of the task, the network variable request management file of the task, the network resource file of the task, the configuration file of the task and other related files of the task, and each intermediate file corresponds to multiple sub-files. Among them, the names of the sub-files corresponding to different intermediate files are different, such as the daily code split file 1, the hardware configuration file 1 of the task, the network variable request file 1 of the task, etc.

[0054] If it is detected that the project file is updated, the changed subfile can be selected from the multiple subfiles corresponding to the project file and determined as the updated subfile. This embodiment does not limit the specific number and type of updated subfiles. The updated subfiles can be multiple subfiles of different categories, or multiple subfiles of the same category. This embodiment does not limit the specific way to update subfiles. For example, in a feasible implementation, it can be detected which subfiles have been modified and the modified subfiles can be determined as updated subfiles; or it can be determined which subfiles are newly generated and the newly generated subfiles can be determined as updated subfiles.

[0055] Specifically, in order to ensure the reliability of the controller file update, before determining the update sub-file from the multiple sub-files corresponding to the project file, the following steps may be further included:

[0056] Step 11: Obtain identity information and verify the identity information.

[0057] Step 12: If the identity information passes the verification, the update permission is provided for the identity information.

[0058] The identity information indicates the identity of the user who determines to update the sub-file and then update the controller file. It is input from the outside, and the specific content is not limited. For example, it can be account information and password information. After obtaining the identity information, it is verified. The specific process of verification is not limited. For example, it can be determined whether the identity information matches the pre-stored account and password information. If they match, the verification is passed; or it can be determined whether the permission information corresponding to the identity information includes the controller update permission. If it includes the controller update permission, the verification is passed. If the verification is passed, the update permission is provided to it, so that it can use the update permission to perform subsequent steps such as determining to update the sub-file.

[0059] Accordingly, after sending the update sub-file and the update checksum to the controller, the following steps may also be included:

[0060] Step 13: Clear the update permissions corresponding to the identity information.

[0061] It is understandable that after the update sub-file is sent to the controller, the update is completed, so the update permission corresponding to the identity information can be cleared.

[0062] Furthermore, in a feasible implementation, since not every controller file on every controller participates in every update, it is necessary to determine the update subfile according to the specific situation of the control file on the controller to prevent update failure. Specifically, the step of determining the update subfile from the multiple subfiles corresponding to the project file may include the following steps:

[0063] Step 21: Get the file version information corresponding to the controller.

[0064] Step 22: According to the file version information and the update record, determine the updated sub-file from the multiple sub-files.

[0065] The file version information of the controller is the version information corresponding to the controller file, which is used to indicate the status of the last update of the controller file on the controller. The file version information can specifically be a version number, or it can be the last update time. After obtaining the file version information, the update record records each update of the project file. Therefore, the update record can be used to determine the updates of the project file after the version corresponding to the file version information, determine which sub-files have been updated, and then determine the updated sub-files from multiple sub-files. Specifically, the update record can be used to record the updated sub-files corresponding to each update, or it can include various versions of project files, and the updated sub-files are determined by judging whether the historical project files corresponding to the file version information and the various sub-files in the updated project files have changed.

[0066] For example, when the update record records the update subfiles corresponding to each update, if the file version information is A, and there are three versions B, C and D corresponding to the subsequent update subfiles, the update subfiles corresponding to version B are subfiles numbered 1 and 3, the update subfiles corresponding to version C are subfiles numbered 5, and the update subfiles corresponding to version D are subfiles 3 and 6. Version D is the updated version of the project file. In this case, the subfiles numbered 1, 3, 5, and 6 can be determined as update subfiles. Alternatively, when the update record includes various versions of the project file, if the file version information is A, then the subfiles corresponding to version A are obtained from the update record, and the subfiles are compared with the corresponding subfiles in the updated project file to determine whether the two are the same. If they are not the same, the subfiles corresponding to the updated project file are determined as update subfiles, and the subfiles that exist in the updated project file but do not exist in the A version of the project file are determined as update subfiles.

[0067] S102: Obtain an update checksum corresponding to the updated sub-file.

[0068] After determining the update sub-file, obtain its corresponding update checksum. The specific form of the update checksum is not limited, for example, it can be in the form of a hash value. By obtaining the update checksum and sending the update checksum to the controller in a subsequent step, it can be used to verify the update sub-file and / or the updated controller file to ensure that the transmitted update sub-file or updated controller file is correct. This embodiment does not limit the specific content and quantity of the update checksum. In a feasible implementation, the number of update checksums is the same as the number of update sub-files, that is, each update sub-file corresponds to an update checksum; in another feasible implementation, it can also include the update checksum corresponding to the last file of the update sub-file, or the update checksum corresponding to the project file.

[0069] In one implementation, the step of obtaining the update checksum corresponding to the updated subfile may include the following steps:

[0070] Step 31: Obtain a first checksum corresponding to the updated sub-file.

[0071] Step 32: Determine a number of parent files corresponding to the updated subfile, and obtain second checksums corresponding to the parent files.

[0072] Step 33: Determine the first checksum and the second checksum as updated checksums.

[0073] After obtaining the first checksum corresponding to the updated subfile, in order to verify the controller file after it is updated to ensure correct update, the parent file corresponding to the updated subfile can also be determined and the second checksum corresponding to the parent file can be obtained. The previous file can be an intermediate file, or it can be a parent file of the intermediate file. Please refer to Figure 2 , if the code split file 1 and the task's network variable request file 2 are update sub-files, then the task's code management file and the task's network variable request management file are the parent files of the update sub-files. In another embodiment, since the project file is the parent file of the task's code management file and the task's network variable request management file, the project file itself can also be determined as the parent file. After determining the parent file, obtain its corresponding second checksum, and determine the first checksum and the second checksum as the update checksum.

[0074] S103: Sending the update sub-file and the update checksum to the controller, so that the controller updates the controller file using the update sub-file and verifies the update using the update checksum.

[0075] After obtaining the update sub-file and the update checksum, they are sent to the controller so that the controller file can be updated using the update sub-file and the update checksum can be used to verify the update. The specific verification process varies depending on the specific content of the update checksum. For example, when the update checksum has a first checksum and a second checksum, the controller can verify the received update sub-file using the first checksum, and after the update, verify each parent file corresponding to the update sub-file using the second checksum to ensure that the controller file can be correctly updated.

[0076] Furthermore, in one embodiment, in order to prevent multiple electronic devices from updating a controller file on a controller at the same time, a locking process may be performed. In this case, the step of sending the update sub-file and the update checksum to the controller may also include:

[0077] Step 41: Obtain file identification information corresponding to the updated sub-file.

[0078] Step 42: Update and lock the controller.

[0079] Step 43: Send the update sub-file, file identification information and update checksum to the controller, and unlock the controller after sending.

[0080] The file identification information is the identification information corresponding to the update sub-file. The controller can use the file identification information to determine the identity of the update sub-file, and then use it to replace the corresponding part in the controller file to complete the update of the controller file. Before transmitting the update sub-file, the controller is updated and locked so that the controller can only communicate with one electronic device. After the locking process, the update sub-file, the file identification information and the update checksum are sent to the controller. After the sending is completed, the controller is unlocked so that the controller can resume normal communication.

[0081] Furthermore, in another feasible implementation manner, after sending the update sub-file and the update checksum to the controller, the following may also be included:

[0082] Step 51: Get the verification checksum sent by the controller.

[0083] Step 52: Determine whether the verification checksum matches the corresponding update checksum.

[0084] Step 53: If they do not match, an update failure alarm is issued.

[0085] After sending the update sub-file to the controller, the verification checksum sent by the controller can also be obtained. Similar to the update checksum, the verification checksum may include the checksum corresponding to the update sub-file received by the controller, and may also include the checksum corresponding to the parent file of the update sub-file after the controller file is updated using the update sub-file. Since the update sub-file and update checksum may be wrong during the transmission process, and the wrong update checksum and update sub-file just match, this will also cause controller file update errors. By obtaining the verification checksum sent by the controller and matching it with the update checksum, it can be determined whether the update sub-file obtained by the controller and / or the controller file updated based on the update sub-file is correct. If the two do not match, an update failure alarm is issued.

[0086] Furthermore, if the verification checksum matches the update checksum, the following steps can be performed:

[0087] Step 61: Obtain the operating status information corresponding to the controller, and use the operating status information to determine whether the controller is operating normally.

[0088] Step 62: If the controller does not operate normally, an abnormal operation alarm is issued.

[0089] If the verification checksum matches the update checksum, it means that the controller file is updated normally. However, due to the large number of actual operating conditions of the controller, after the controller file is updated, it may not be able to run normally due to software and hardware mismatch. In order to timely discover controller operation failures caused by controller file updates. After confirming that the controller file is updated correctly, the controller's operating status information can be obtained to determine whether the controller is running normally, and an abnormal alarm will be issued when the controller is not running normally, so that the controller can be maintained in time.

[0090] The controller file update method provided by the embodiment of the present application is applied. When it is detected that the project file is updated, it is indicated that the updated project file needs to be sent to the controller so as to update the controller file therein. Since the project file includes controller files corresponding to multiple tasks, and the controller files corresponding to each task are composed of multiple sub-files, the update of the project file is specifically the update of several sub-files, so the update sub-file can be determined from the multiple sub-files corresponding to the project file. In order to ensure the security of data transmission, the update checksum corresponding to the update sub-file is obtained at the same time. By sending the update sub-file and the update checksum to the controller, the controller can use the update sub-file to update the local controller file, and use the update checksum to check the update process to ensure the correctness of the update. The method uses the update checksum to ensure that the update can be carried out normally. At the same time, it is not necessary to transmit the complete controller file, only the update sub-file is transmitted, thereby reducing the amount of data to be transmitted, and solving the problem of low communication efficiency in the related art.

[0091] The following is an introduction to a controller file updating device provided in an embodiment of the present application. The controller file updating device described below and the controller file updating method described above can refer to each other.

[0092] Please refer to Figure 3 , Figure 3 A schematic diagram of the structure of a controller file updating device provided in an embodiment of the present application includes:

[0093] The determination module 110 is used to determine the updated sub-file from the multiple sub-files corresponding to the project file if it is detected that the project file is updated;

[0094] A checksum acquisition module 120, used to acquire an update checksum corresponding to an updated subfile;

[0095] The update module 130 is used to send the update sub-file and the update checksum to the controller, so that the controller updates the controller file using the update sub-file and verifies the update using the update checksum.

[0096] Optionally, the determination module 110 includes:

[0097] A version information acquisition unit, used to acquire file version information corresponding to the controller;

[0098] The updated sub-file determining unit is used to determine the updated sub-file from the multiple sub-files according to the file version information and the update record.

[0099] Optionally, the verification and acquisition module 120 includes:

[0100] A first obtaining unit, used to obtain a first checksum corresponding to the updated subfile;

[0101] A second acquisition unit, used to determine a number of parent files corresponding to the updated subfile, and obtain a second checksum corresponding to the parent file;

[0102] The update checksum determination unit is used to determine the first checksum and the second checksum as the update checksum.

[0103] Optionally, the update module 130 includes:

[0104] An information acquisition unit is used to acquire file identification information corresponding to the updated sub-file;

[0105] A locking unit, used for updating and locking the controller;

[0106] The transmission and unlocking unit is used to send the update sub-file, file identification information and update checksum to the controller, and unlock the controller after the sending is completed.

[0107] Optionally, it also includes:

[0108] An identity verification module is used to obtain identity information and verify the identity information;

[0109] The authorization module is used to provide update permission for identity information if the identity information passes the verification;

[0110] The permission clearing module is used to clear the update permissions corresponding to the identity information.

[0111] Optionally, it also includes:

[0112] A verification checksum acquisition module, used to obtain the verification checksum sent by the controller;

[0113] A matching judgment module, used to judge whether the verification checksum matches the corresponding update checksum;

[0114] The update fault alarm module is used to issue an update fault alarm if there is a mismatch.

[0115] Optionally include:

[0116] The operation status judgment module is used to obtain the operation status information corresponding to the controller and use the operation status information to judge whether the controller is operating normally;

[0117] The abnormal operation alarm module is used to issue an abnormal operation alarm if the controller does not operate normally.

[0118] The electronic device provided in the embodiment of the present application is introduced below. The electronic device described below and the controller file update method described above can refer to each other.

[0119] Please refer to Figure 4 , Figure 4 The electronic device 100 may include a processor 101 and a memory 102 , and may further include one or more of a multimedia component 103 , an information input / information output (I / O) interface 104 , and a communication component 105 .

[0120] The processor 101 is used to control the overall operation of the electronic device 100 to complete all or part of the steps in the controller file update method described above; the memory 102 is used to store various types of data to support the operation of the electronic device 100, and these data may include, for example, instructions for any application or method used to operate on the electronic device 100, and application-related data. The memory 102 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0121] The multimedia component 103 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 102 or sent through the communication component 105. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 104 provides an interface between the processor 101 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 105 is used for wired or wireless communication between the electronic device 100 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 105 may include: Wi-Fi components, Bluetooth components, NFC components.

[0122] The electronic device 100 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the controller file update method given in the above embodiment.

[0123] The computer-readable storage medium provided in the embodiment of the present application is introduced below. The computer-readable storage medium described below and the controller file updating method described above can be referenced to each other.

[0124] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the controller file update method described above are implemented.

[0125] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0126] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0127] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0128] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0129] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0130] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A controller file update method, characterized in that: include: If it is detected that the project file is updated, an updated sub-file is determined from a plurality of sub-files corresponding to the project file; Obtaining an update checksum corresponding to the update subfile; Sending the update sub-file and the update checksum to the controller, so that the controller updates the controller file using the update sub-file and verifies the update using the update checksum; Wherein, obtaining the update checksum corresponding to the update sub-file includes: Obtaining a first checksum corresponding to the update subfile; Determine a number of parent files corresponding to the updated subfile, and obtain second checksums corresponding to the parent files; The first checksum and the second checksum are determined as the updated checksum.

2. The controller file updating method according to claim 1, characterized in that: The step of determining an update sub-file from a plurality of sub-files corresponding to the project file comprises: Obtain file version information corresponding to the controller; The updated sub-file is determined from the plurality of sub-files according to the file version information and the update record.

3. The controller file updating method according to claim 1, characterized in that: The step of sending the update sub-file and the update checksum to the controller comprises: Obtaining file identification information corresponding to the updated sub-file; Performing update and locking processing on the controller; The update sub-file, the file identification information and the update checksum are sent to the controller, and the controller is unlocked after the sending is completed.

4. The controller file updating method according to claim 1, characterized in that: Before determining the updated sub-file from the multiple sub-files corresponding to the project file, the method further includes: Obtaining identity information and verifying the identity information; If the identity information passes the verification, providing update authority for the identity information; Correspondingly, after sending the update sub-file and the update checksum to the controller, the method further includes: The update authority corresponding to the identity information is cleared.

5. The controller file updating method according to any one of claims 1 to 4, characterized in that: After sending the update sub-file and the update checksum to the controller, the method further includes: Obtaining a verification checksum sent by the controller; determining whether the verification checksum matches the corresponding update checksum; If they do not match, an update failure alarm will be issued.

6. The controller file updating method according to claim 5, characterized in that: If the verification checksum matches the update checksum, including: Obtaining operating status information corresponding to the controller, and using the operating status information to determine whether the controller is operating normally; If the controller does not operate normally, an abnormal operation alarm is issued.

7. A controller file updating device, characterized in that: include: A determination module, configured to determine an updated sub-file from a plurality of sub-files corresponding to the project file if an update of the project file is detected; A checksum acquisition module, used to acquire an update checksum corresponding to the update subfile; An update module, configured to send the update sub-file and the update checksum to the controller, so that the controller updates the controller file using the update sub-file and verifies the update using the update checksum; Wherein, the verification and acquisition module includes: A first obtaining unit, used to obtain a first checksum corresponding to the updated subfile; A second acquisition unit, used to determine a number of parent files corresponding to the updated subfile, and obtain a second checksum corresponding to the parent file; The update checksum determination unit is used to determine the first checksum and the second checksum as the update checksum.

8. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store the computer program; The processor is used to execute the computer program to implement the controller file updating method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the controller file updating method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Application change monitoring method, device and equipment, and storage medium

    CN111400102A

  • Method and apparatus for file synchronization based on qualifying trigger actions in industrial control applications

    US20170169089A1