A control system version verification method, device, equipment and storage medium
By acquiring and storing the solidified files in the valve control host, generating and matching verification codes, and automatically verifying the application version of the device board in the control system, the problem of low efficiency of manual verification is solved, and the accuracy of version verification and the safety of the flow control valve are improved.
Patent Information
- Application Number
- CN202210423031.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-04-21
AI Technical Summary
In the prior art, the inspection and update of the application version of the device board in the control system relies on manual work, resulting in low efficiency and affecting the safe operation and reliability of the converter valve.
By obtaining the first solidification file and storing it in the valve control host, generating the second solidification file, calculating the first and second verification codes, and matching the verification codes to automatically verify the application version of the device board, the version consistency is confirmed by utilizing the application update characteristics in the device board.
The automatic verification of the device board application version is realized, which improves the efficiency and accuracy of version verification and ensures the operational reliability and safety of the converter valve.
Smart Images

Figure CN114880017B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of version verification, and in particular to a control system version verification method, device, equipment and storage medium. Background Art
[0002] With the continuous advancement of existing technologies, flexible DC transmission technology has made rapid progress and has been widely used in various power consumption fields. Converter valves are the core equipment of flexible DC transmission technology. As DC transmission voltage and transmission capacity increase, the reliability of converter valves in operation becomes increasingly important.
[0003] In practical applications, converter valves are typically controlled and protected using a control system that includes both control and protection devices for the converter valves. With the advancement of flexible DC transmission technology, this control system has continued to evolve and become increasingly complex. The multiple devices that comprise this control system often include dozens or even hundreds of different types of device boards, and the application versions installed on these boards are constantly updated and iterated upon. If an application version error occurs on a device board during use, it can easily lead to functional failure, potentially causing power supply failures and other consequences. Therefore, it is necessary to verify the application versions of each device board in this control system.
[0004] The current verification method mainly relies on manual inspection and update of the application version in each device board. When errors or omissions occur in the version update of the application in the device board, manual troubleshooting is difficult and inefficient due to the large number of device boards, and also poses a safety hazard to the safe operation of the converter valve and power supply line. Summary of the Invention
[0005] The present invention provides a control system version verification method, device, equipment and storage medium to solve the problem that when manually checking and updating the versions of the application boards of various devices in the control system, if the efficiency of application version error detection is low, it will affect the operation of the flow control system-dependent valves and cause safety hazards.
[0006] According to one aspect of the present invention, a control system version verification method is provided, comprising:
[0007] Acquire a first curing file, where the first curing file includes first version information of an application in the device board;
[0008] performing a program curing operation on the first curing file, wherein the program curing operation is used to store the first curing file in the valve control host;
[0009] Registering the device board according to the first firmware file to generate a second firmware file, wherein the second firmware file includes second version information of the application in the device board, the second version information being the same as the first version information at the time of registration, and the second version information changing when the application is updated;
[0010] Calculating a first check code for the first solidified file;
[0011] Calculating a second check code in real time for the device board according to the second solidified file;
[0012] Matching the first verification code with the second verification code;
[0013] If the match is successful, it is determined that the device board passes the version verification.
[0014] According to another aspect of the present invention, a control system version verification device is provided, comprising:
[0015] A first solidification file acquisition module is used to acquire a first solidification file, where the first solidification file includes first version information of the application in the device board;
[0016] a program curing module, configured to perform a program curing operation on the first curing file, wherein the program curing operation is configured to store the first curing file in the valve control host;
[0017] a device board registration module, configured to register the device board according to the first firmware file to generate a second firmware file, wherein the second firmware file includes second version information of the application in the device board, the second version information being the same as the first version information at the time of registration and changing when the application is updated;
[0018] A first verification code calculation module, configured to calculate a first verification code for the first solidified file;
[0019] A second check code calculation module, configured to calculate a second check code for the device board in real time according to the second solidified file;
[0020] A verification code matching module, configured to match the first verification code with the second verification code;
[0021] The verification pass determination module is used to determine that the device board has passed the version verification if the match is successful. According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0022] at least one processor; and
[0023] a memory communicatively connected to the at least one processor; wherein,
[0024] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the control system version verification method described in any embodiment of the present invention.
[0025] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the control system version verification method described in any embodiment of the present invention when executed.
[0026] The technical solution of the present invention obtains a first solidification file and solidifies the solidification file to the valve control host. After the solidification is completed, the device board is registered according to the first solidification file. After the registration, a second solidification file will be formed in the device board. Since the first solidification file includes the first version information of the application in the device board, the second solidification file is generated after the device board is registered according to the first solidification file and includes the second version information of the application in the device board, and the second version information changes when the application is updated. Therefore, a first verification code is calculated for the first solidification file, and a second verification code is calculated in real time for the second solidification file. By matching the first verification code with the real-time second verification code, it can be automatically determined whether the version verification of the application in the device board has been passed.
[0027] The present invention automates the process of version verification of the application installed in the device board, and by matching the first verification code calculated based on the first fixed file in the valve control host with the second verification code obtained in real time, the characteristic that the second fixed file in the device board changes as the application in the device board is updated is used to confirm whether the second version information of the application in the device board is consistent with the second version information included in the first fixed file in the valve control host, thereby realizing the version verification of the application in the device board, improving the efficiency of version verification of the application in the device board, ensuring the accuracy of updating the version of the application, and at the same time, timely checking the version consistency of the application in the device board also improves the reliability and safety of the operation process of the converter valve. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 This is a flowchart of a control system version verification method provided according to the first embodiment of the present invention;
[0030] Figure 2 1 is a flowchart of calculating a first check code according to the first embodiment of the present invention;
[0031] Figure 3 is a flow chart of calculating a second check code according to embodiment 1 of the present invention;
[0032] Figure 4 This is a schematic diagram of control system connections provided according to Embodiment 1 of the present invention;
[0033] Figure 5 This is a flowchart of a control system version verification method provided by Example 1 of the present invention;
[0034] Figure 6 This is a schematic diagram of the structure of a control system version verification device provided according to the second embodiment of the present invention;
[0035] Figure 7 It is a structural diagram of an electronic device for implementing the control system version verification method of the third embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0037] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] Example 1
[0039] Figure 1 A flowchart of a control system version verification method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of verifying the version of the application program of each device board in the control system. The method can be executed by a control system version verification device, which can be implemented in the form of hardware and / or software. The control system version verification device can be configured in a computer device. Figure 1 As shown, the method includes:
[0040] S110: Obtain a first solidification file, where the first solidification file includes first version information of an application program in a device board.
[0041] In this embodiment, the control system consists of a valve control host and multiple valve control devices. The valve control device includes a main control board and multiple device boards. The valve control device is used to control the operation of the converter valve. The device boards in the valve control device can realize different functions according to the application burned during registration.
[0042] In this embodiment, the first firmware file can be a bin-formatted file corresponding to a single device board, pre-stored on the valve control host and used to register the device board and configure the device board's parameters. Therefore, to register the device board and verify the version of the application program on the device board, the first firmware file is first obtained and stored on the valve control host. Since the device board is registered based on the first firmware file, and the application program on the device board is derived from the first firmware file, the first firmware file also includes the first version information of the application program burned into the device board during the registration process.
[0043] S120: Perform a program curing operation on the first curing file, where the program curing operation is used to store the first curing file in the valve control host.
[0044] In this embodiment, after obtaining the first solidified file, in order to achieve subsequent version verification, the first verification code generated according to the first solidified file and the second verification code generated according to the second solidified file are matched. The first solidified file can also be stored in the valve control host after obtaining the first solidified file through program solidification operation. When it is necessary to verify the application board version of the device board, the first verification code is calculated for the stored first solidified file.
[0045] In this embodiment, after performing the program solidification operation on the first solidification file, it is also possible to verify whether the program solidification operation is successful. The verification process is specifically as follows:
[0046] A first verification code is calculated for the device board according to the first curing file. Each first curing file corresponds to a device board. The device board can be registered according to a first curing file, and a second curing file formed by the registered device board can be used to verify whether the program curing operation of the first curing file in the valve control host is successful.
[0047] Obtain a second fixed file generated by the device board after registration. In this embodiment, the criterion for a successful program fixed operation can be whether the device board generates a second fixed file that is consistent with the first fixed file after registration. Therefore, to verify whether the program fixed operation is successful, after calculating the first check code, obtain the second fixed file generated by the device board after registration, and calculate a third check code for the second fixed file. The calculation method for the first and third check codes is the same, and both can be calculated using a cyclic redundancy algorithm.
[0048] In this embodiment, obtaining the second fixed file can be for the main control board. That is, the second fixed file on the device board is uploaded to the main control board located in the same valve control device as the device board. The main control board is then controlled to calculate the third check code of the device board based on the second fixed file. That is, the calculation of the third check code of the device board is completed in the main control board. The calculation process specifically includes: sending a first read signal to the main control board. When the main control board receives the first read signal, it initializes the device board under the control of the valve control host under the instruction of the first read signal. In this embodiment, initializing the device board can include configuring the clock of the device board and initializing the storage unit storing the second fixed file in the device board. The clock configuration process can be manifested as enabling the clock of the device board. Because the prerequisite for performing various operations on the device board is the presence of a clock input, the process of enabling the clock is the process of generating the clock input. In this embodiment, the type of storage unit of the device board can be a FLASH memory, which is also called flash memory. The data in the flash memory can be modified by a specific program.
[0049] Determine the third starting reading position of the second solidified file in the reading device board. In this embodiment, when calculating the third verification code, the second solidified file can be read based on the preset reading position of the second solidified file, that is, the third starting reading position. Then, based on the third starting reading position, a third target segment of a specified length located at a preset position in the second solidified file is extracted. In this embodiment, all the contents in the second solidified file are not calculated to obtain the third verification code. Instead, by presetting the first reading position and reading length in advance, a part of the contents of the second solidified file is extracted to calculate the third verification code, which reduces the amount of calculation and improves the calculation speed of the third verification code.
[0050] After extracting the third target segment, a cyclic redundancy calculation is performed on the third target segment to obtain a third check code. The third check code obtained by the cyclic redundancy calculation is the cyclic redundancy check code. The cyclic redundancy check code, abbreviated as CRC code, is a widely used data verification method. A cyclic redundancy check code is a linear block code that has the advantages of strong error correction capabilities, high efficiency, low consumption of logical resources, and low communication bandwidth. It can not only verify the correctness of transmitted data, but also screen which bits have errors. The length of the information field and the check field can be arbitrarily selected, such as the first starting read position and the preset read segment selected in this embodiment. In this embodiment, a 32-bit cyclic redundancy check encoding method, namely CRC-32, can be used to calculate the third check code.
[0051] In this embodiment, the first starting read position can be determined by address offset. Alternatively, the third target segment can be extracted from the second solidified file based on a preset read segment in 16-bit units. In this embodiment, the determination of the first starting read position, the preset read position, and the read length can all be preset based on the structural characteristics of the second solidified file.
[0052] After the third verification code is calculated, the third verification code can be obtained. Obtaining the third verification code is the process of uploading the third verification code calculated at the main control board to the valve control host. The valve control host matches the third verification code and the first verification code of the same device board. If the match is successful, it can be confirmed that the program solidification operation is successful, thereby determining that the first solidification file is successfully solidified to the valve control host.
[0053] S130. Register the device board according to the first solidification file to generate a second solidification file, where the second solidification file includes second version information of the application in the device board. The second version information is the same as the first version information during registration, and changes when the application is updated.
[0054] In this embodiment, after obtaining the first firmware file, the valve control host registers the device board according to the first firmware file. One first firmware file corresponds to the registration of one device board. After registration, a second firmware file corresponding to the first firmware file is generated on the device board. After registration, an application is burned into the device board. The application version information is represented as the first version information in the first firmware file and as the second version information in the second firmware file. When the application on the device board is not updated, the first version information and the second version information are consistent. If the application is updated for a device board, the second version information will no longer be consistent with the first version information. If the second version information changes, the second firmware file will also change.
[0055] The process of registering the device board in this embodiment can be specifically performed as follows:
[0056] Registration information is generated for the main control board based on the first fixed file. In this embodiment, the device board to be registered can be determined first, and then, after obtaining the first fixed file, the registration information generated based on the first fixed file can be sent to the main control board of the valve control device where the device board is located. Alternatively, after obtaining the first fixed file, the device board to be registered can be determined, and the registration information can be sent to the main control board of the valve control device where the device board is located. The main control board is controlled to detect the configuration status of the device board. In this embodiment, the status of the device board includes the status of the component not configured and the status of the component configured. If the device board has been registered, the detected configuration status is the component configured. If the device board has not been registered, the configuration status is the component not configured.
[0057] When the configuration status is detected as the component is not configured, the main control board can be instructed to configure the control parameters for the device board according to the registration information. The control parameters include the communication address of the device board. After the control parameters are configured, the second solidification file can be generated. The communication address can be used to locate the device board when the valve control host establishes communication with the device board, such as Figure 4 The valve control host 410 can communicate with the valve control devices 420 via Ethernet. Different valve control devices 420 can communicate with each other via high-speed optical fiber. Within the same valve control device, the main control board 430 and the device board 440 can also establish a communication connection via a backplane to exchange data. Furthermore, communication between the valve control host 410 and multiple valve control devices 420 can be accomplished via a switch 450.
[0058] When the control parameters are configured, the configuration status of the device board can be adjusted to Component Configured.
[0059] S140: Calculate a first verification code for the first solidified file.
[0060] In this embodiment, the version verification of the application in the device board is completed by matching the verification code. Therefore, after the device board is registered, if the control system fails during operation and the application version in the device board needs to be verified, the first verification code is first calculated for the first solidified file.
[0061] The specific process of calculating the first check code in this embodiment may be:
[0062] Determine the second starting reading position for reading the first solidified file, and then extract the second target segment of the specified length at the preset position in the first solidified file based on the second starting reading position, and finally perform cyclic redundancy calculation on the second target segment to obtain the first verification code. Since when the version of the application in the device board is updated, the device board can be manually updated, and the second version information changes accordingly, the second solidified file in the device board will also change with the change of the second version information. However, the first solidified file will not change at this time. Therefore, after the first verification code is calculated, the first verification code can also be stored in the valve control host and used to verify the application version in the device board at any time. Figure 2 As shown, the process of calculating the first check code in this embodiment can also be expressed as follows: when a version check of the device board is required, the check module is first loaded with initial values. The check module is equivalent to the first check code calculation module in the second embodiment of this application. After the check module is loaded, the information of the first fixed file is traversed and the second target segment used to calculate the first check code is extracted. When the summary information traversal is completed, that is, the second target segment is extracted, the first check code is calculated, and then the first check code is latched into the valve control host. If the first version information in the first fixed file also changes, the offset address and length can be updated according to the change, and the index of the summary information is accumulated, thereby accumulating the address of reading the first fixed file. After the first version information changes, the read position of the first fixed file is equal to the offset address. When the version check is started, the count length of the first fixed file is accumulated, that is, the read length is accumulated, so that the read length is equal to the specified length. If the read length is not equal to the specified length, the read position can be accumulated again to ensure that the read length meets the specified length. Ultimately, when the second target segment is extracted, the starting read position and read length of the first fixed file are matched with the change in the first version information, so that the change in the first version information is reflected in the version check.
[0063] S150: Calculate a second check code for the device board in real time according to the second solidified file.
[0064] In this embodiment, if the application version is verified on the device board, after calculating or obtaining the stored first verification code, the second verification code can be calculated in real time for the second solidified file in the device board in the current state, so that the second verification code can reflect the most accurate application version of the device board.
[0065] In this embodiment, the principle of calculating the second check code is actually the same as that of calculating the third check code. The specific process can be expressed as follows:
[0066] The valve control host sends a second read signal to the main control board, and controls the main control board to initialize the device board when receiving the second read signal. The initialization of the device board includes controlling the main control board to configure the clock of the device board and controlling the main control board to initialize the storage unit of the device board.
[0067] Then, a third starting reading position of the second solidified file in the reading device board is determined, and based on the third starting reading position, a third target segment of a specified length located at a preset position in the second solidified file is extracted. Finally, a cyclic redundancy calculation is performed on the third target segment to obtain a second check code.
[0068] like Figure 3 As shown, the process for calculating the second check code in this embodiment can also be expressed as follows: when a version check of the device board is required, if the second check code is calculated for the device board, the device board is first configured with a clock enable and the FLASH is initialized. The check module is equivalent to the second check code calculation module in the second embodiment of this application. After the check module is loaded, the second fixed file is traversed to extract the third target segment used to calculate the second check code. After the second check code is calculated, the second check code is latched into the device board. If the application on the device board is updated, the second version information in the second fixed file also changes. The offset address and length can be updated based on the change, so that the index of the summary information is accumulated. When the device board FLASH is read to obtain the third target segment of the second fixed file, the accumulation of the FLASH read address is initiated. After the second version information changes, the read position of the second fixed file is equal to the offset address. When the version check is initiated, the count length of the second fixed file is accumulated, that is, the read length is accumulated, so that the read length is equal to the specified length. If the read length is not equal to the specified length, the read address of the FLASH can be accumulated to ensure that the read length meets the specified length. Finally, the starting reading position and reading length of the second solidified file when extracting the third target segment match the changes in the second version information, so that the changes in the second version information are reflected in the version verification process.
[0069] S160: Match the first verification code with the second verification code.
[0070] In this embodiment, after obtaining the first verification code and calculating the second verification code of the device board in real time, the first verification code is matched with the second verification code to check whether the first verification code and the second verification code are consistent.
[0071] S170: If the match is successful, determine whether the device board passes the version verification.
[0072] In this embodiment, when the first verification code and the second verification code are found to be consistent, the first verification code and the second verification code are successfully matched, and it can be determined that the device board has passed the version verification.
[0073] In order to ensure the reliability of version verification in this embodiment, multiple judgments can be performed before matching the first verification code and the second verification code. The flowchart of the multiple judgments is as follows: Figure 5 As shown, it includes first determining whether the valve control host has established a communication connection with the device board. If not, the communication fault is directly reported to the valve control host without matching the first check code and the second check code; secondly determining whether the control parameters at the device board are consistent with the control parameters when the valve control host registers the device board. If they are not consistent, the control parameter configuration failure is directly reported without matching the first check code and the second check code; thirdly determining whether a fault occurs in the process of reading the flash memory when obtaining the second solidified file from the device board. If the reading fails, the FLASH reading failure is directly reported without matching the first check code and the second check code; when all the above steps are passed, the first check code is finally matched with the second check code to obtain a check result of check failure or check pass.
[0074] The technical solution of the present invention obtains a first solidification file and solidifies the solidification file to the valve control host. After the solidification is completed, the device board is registered according to the first solidification file. After the registration, a second solidification file will be formed in the device board. Since the first solidification file includes the first version information of the application in the device board, the second solidification file is generated after the device board is registered according to the first solidification file and includes the second version information of the application in the device board, and the second version information changes when the application is updated. Therefore, a first verification code is calculated for the first solidification file, and a second verification code is calculated in real time for the second solidification file. By matching the first verification code with the real-time second verification code, it can be automatically determined whether the version verification of the application in the device board has been passed.
[0075] The present invention automates the process of version verification of the application installed in the device board, and by matching the first verification code calculated based on the first fixed file in the valve control host with the second verification code obtained in real time, the characteristic that the second fixed file in the device board changes as the application in the device board is updated is used to confirm whether the second version information of the application in the device board is consistent with the second version information included in the first fixed file in the valve control host, thereby realizing the version verification of the application in the device board, improving the efficiency of version verification of the application in the device board, ensuring the accuracy of updating the version of the application, and at the same time, timely checking the version consistency of the application in the device board also improves the reliability and safety of the operation process of the converter valve. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easy to understand through the following description.
[0076] Example 2
[0077] Figure 6 This is a schematic diagram of the structure of a control system version verification device provided by the second embodiment of the present invention. Figure 6 As shown, the device includes:
[0078] A first solidification file acquisition module 610 is configured to acquire a first solidification file, where the first solidification file includes first version information of an application in the device board;
[0079] A program curing module 620 is configured to perform a program curing operation on the first curing file, wherein the program curing operation is configured to store the first curing file in the valve control host;
[0080] a device board registration module 630 configured to register the device board according to the first firmware file to generate a second firmware file, wherein the second firmware file includes second version information of the application in the device board, the second version information being the same as the first version information at the time of registration and changing when the application is updated;
[0081] A first check code calculation module 640, configured to calculate a first check code for the first solidified file;
[0082] A second check code calculation module 650 is configured to calculate a second check code for the device board in real time according to the second fixed file;
[0083] A verification code matching module 660, configured to match the first verification code with the second verification code;
[0084] The verification pass determination module 670 is configured to determine whether the device board passes the version verification if the match is successful.
[0085] Optionally, the control system version verification device further includes:
[0086] A program solidification operation verification module, used to verify whether the program solidification operation is successful;
[0087] A program curing operation determination module is used to determine whether the first curing file is cured to the valve control host if successful.
[0088] Optionally, the program solidification operation inspection module includes:
[0089] A first verification code first calculation module, configured to calculate the first verification code for the device board according to the first curing file;
[0090] A second solidification file acquisition module, configured to acquire the second solidification file generated by the device board after the registration;
[0091] A third check code calculation module is used to control the main control board to calculate the third check code of the device board located in the same valve control device as the main control board according to the second fixed file;
[0092] A third verification code acquisition module, configured to acquire the third verification code;
[0093] a first verification code matching module, configured to match the third verification code and the first verification code of the same device board;
[0094] The curing determination module is used to confirm that the program curing operation is successful if the matching is successful.
[0095] Optionally, the third check code calculation module includes:
[0096] A first read signal sending module, configured to send a first read signal to the main control board;
[0097] a first initialization module, configured to control the main control board to initialize the device board upon receiving the first read signal;
[0098] A first starting reading position determining module, configured to determine a first starting reading position for reading the second solidified file in the device board;
[0099] A first target segment extraction module is configured to extract a first target segment of a specified length located at a preset position in the second solidified file according to the first starting reading position;
[0100] The third check code acquisition module is configured to perform cyclic redundancy calculation on the first target segment to obtain the third check code.
[0101] Optionally, the device board registration module 630 includes:
[0102] A registration information generating module, configured to generate registration information for the main control board according to the first curing file;
[0103] A registration information sending module, used for sending the registration information to the main control board;
[0104] A configuration status detection module, used to control the main control board to detect the configuration status of the device board;
[0105] a control parameter configuration module, configured to, if the configuration state is that the component is not configured, instruct the main control board to configure control parameters for the device board according to the registration information, wherein the control parameters include a communication address of the device board;
[0106] The configuration state adjustment module is used to adjust the configuration state to component configured.
[0107] Optionally, the first verification code calculation module 640 includes:
[0108] A second starting reading position determining module, configured to determine a second starting reading position for reading the first solidified file;
[0109] A second target segment extraction module is configured to extract a second target segment of a specified length located at a preset position in the first solidified file according to the second starting reading position;
[0110] The first check code acquisition module is configured to perform cyclic redundancy calculation on the second target segment to obtain the first check code.
[0111] Optionally, the second verification code calculation module 650 includes:
[0112] A second read signal sending module, used for sending a second read signal to the main control board;
[0113] a second initialization module, configured to control the main control board to initialize the device board upon receiving the second read signal;
[0114] A third starting reading position determining module, configured to determine a third starting reading position for reading the second solidified file in the device board;
[0115] A third target segment extraction module is configured to extract a third target segment of a specified length located at a preset position in the second solidified file according to the third starting reading position;
[0116] The second check code acquisition module is configured to perform cyclic redundancy calculation on the third target segment to obtain the second check code.
[0117] Optionally, the second initialization module includes:
[0118] A clock configuration module, used for controlling the main control board to configure the clock of the device board;
[0119] The storage unit initialization module is used to control the main control board to initialize the storage unit of the device board.
[0120] The control system version verification device provided by the embodiment of the present invention can execute the control system version verification method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0121] Example 3
[0122] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0123] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0124] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0125] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the control system version verification method.
[0126] In some embodiments, the control system version verification method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the control system version verification method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the control system version verification method in any other appropriate manner (for example, by means of firmware).
[0127] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0129] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0130] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0131] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0132] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0133] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0134] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A control system version verification method, characterized in that: The control system includes a valve control host and a plurality of valve control devices, the valve control devices include a main control board and a plurality of device boards, and the method includes: Acquire a first curing file, where the first curing file includes first version information of an application in the device board; performing a program curing operation on the first curing file, wherein the program curing operation is used to store the first curing file in the valve control host; Registering the device board according to the first firmware file to generate a second firmware file, wherein the second firmware file includes second version information of the application in the device board, the second version information being the same as the first version information at the time of registration, and the second version information changing when the application is updated; Calculating a first check code for the first solidified file; Calculating a second check code in real time for the device board according to the second solidified file; Matching the first verification code with the second verification code; If the match is successful, it is determined that the device board passes the version verification; The registering the device board according to the first curing file to generate the second curing file includes: Generate registration information for the main control board according to the first curing file; Sending the registration information to the main control board; Controlling the main control board to detect the configuration status of the device board; If the configuration state is that the component is not configured, instructing the main control board to configure control parameters for the device board according to the registration information, the control parameters including the communication address of the device board; The configuration state is adjusted to component configured.
2. The method according to claim 1, characterized in that After performing a program curing operation on the first curing file, the method further includes: Check whether the program curing operation is successful; If successful, it is determined that the first curing file is cured to the valve control host.
3. The method according to claim 2, characterized in that The step of checking whether the program solidification operation is successful includes: Calculating the first verification code for the device board according to the first curing file; Obtaining the second curing file generated by the device board after the registration; Controlling the main control board to calculate a third check code of the device board located in the same valve control device as the main control board according to the second curing file; Obtaining the third verification code; matching the third verification code and the first verification code of the same device board; If the matching is successful, it is confirmed that the program solidification operation is successful.
4. The method according to claim 3, characterized in that The controlling the main control board to calculate the third check code of the device board located in the same valve control device as the main control board according to the second solidification file includes: Sending a first read signal to the main control board; controlling the main control board to initialize the device board upon receiving the first read signal; Determine a first starting reading position for reading the second solidified file in the device board; extracting, according to the first starting reading position, a first target segment of a specified length located at a preset position in the second solidified file; Performing a cyclic redundancy calculation on the first target segment to obtain the third check code.
5. The method according to any one of claims 1 to 4, characterized in that The calculating a first check code for the first solidified file includes: Determining a second starting reading position for reading the first solidified file; extracting, according to the second starting reading position, a second target segment of a specified length located at a preset position in the first solidified file; Perform a cyclic redundancy calculation on the second target segment to obtain the first check code.
6. The method according to any one of claims 1 to 4, characterized in that The step of calculating the second check code in real time on the device board according to the second solidified file includes: Sending a second read signal to the main control board; controlling the main control board to initialize the device board upon receiving the second read signal; Determine a third starting reading position for reading the second cured file in the device board; extracting, according to the third starting reading position, a third target segment of a specified length located at a preset position in the second solidified file; Performing cyclic redundancy calculation on the third target segment to obtain the second check code.
7. The method according to claim 6, characterized in that The controlling the main control board to initialize the device board when receiving the second read signal comprises: Controlling the main control board to configure the clock of the device board; The main control board is controlled to initialize the storage unit of the device board.
8. A control system version verification device, characterized in that: The control system includes a valve control host and multiple valve control devices, the valve control devices include a main control board and multiple device boards, and the devices include: A first solidification file acquisition module is used to acquire a first solidification file, where the first solidification file includes first version information of the application in the device board; a program curing module, configured to perform a program curing operation on the first curing file, wherein the program curing operation is configured to store the first curing file in a valve control host; a device board registration module, configured to register the device board according to the first firmware file to generate a second firmware file, wherein the second firmware file includes second version information of the application in the device board, the second version information being the same as the first version information at the time of registration and changing when the application is updated; A first verification code calculation module, configured to calculate a first verification code for the first solidified file; A second check code calculation module, configured to calculate a second check code for the device board in real time according to the second solidified file; A verification code matching module, configured to match the first verification code with the second verification code; A verification pass determination module, configured to determine if the device board passes version verification if the match is successful; The device board registration module includes: A registration information generating module, configured to generate registration information for the main control board according to the first curing file; A registration information sending module, used for sending the registration information to the main control board; A configuration status detection module, used to control the main control board to detect the configuration status of the device board; a control parameter configuration module, configured to, if the configuration state is that the component is not configured, instruct the main control board to configure control parameters for the device board according to the registration information, wherein the control parameters include a communication address of the device board; The configuration state adjustment module is used to adjust the configuration state to component configured.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the control system version verification method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the control system version verification method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Version file upgrading method, base station and management station
CN109391497A
Firmware updating method and device and computer readable storage medium
CN110134423A