Multi-level software upgrading method, system, product and medium

By using the upper computer to generate upgrade requirements and determine the command type in the electromagnetic flowmeter with IP68 waterproof level structure, software upgrade of the communication adapter board and motherboard is realized, solving the problem of software upgrade restriction of the full seal structure, and ensuring the stable and efficient operation of the equipment.

CN120122967APending Publication Date: 2025-06-10HANGZHOU ZHENHUA INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510240824.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

Due to the fully sealed structure of the electromagnetic flowmeter with IP68 waterproof grade structure, the upgrade operation cannot be achieved simply when both the communication adapter board and the motherboard software need to be updated.

Method used

The upper computer generates adapted upgrade requirements instructions, judges the command type and performs software upgrades to the communication adapter board and motherboard respectively. The specific steps include after receiving the upgrade command, the upper computer prepares and transmits the upgrade requirements command, and judges the command type. If it is the upgrade command or data of the communication adapter board, upgrades its software, and otherwise spreads it outward. After receiving the information received by the motherboard, the motherboard controls the motherboard to upgrade the software.

Benefits of technology

It realizes the multi-level software update of the communication adapter board and motherboard without the need to remove the external waterproof structure, ensuring the stable operation of the equipment in harsh environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120122967A_ABST
    Figure CN120122967A_ABST
Patent Text Reader

Abstract

A method, system, product and medium for upgrading multi-level software. The method comprises the steps that after an upgrading instruction is received, an upper computer is controlled to prepare a corresponding upgrading requirement instruction; the upper computer is controlled to transmit an upgrading demand instruction to the communication adapter plate; judging whether the upgrading demand instruction is an upgrading instruction corresponding to the communication adapter plate or not; if yes, controlling the communication adapter plate to upgrade the communication adapter plate software in combination with the upgrade demand instruction; if not, the communication adapter plate is controlled to spread the upgrade demand instruction outwards; and after information sent by the mainboard after receiving the upgrading demand instruction is received, controlling the mainboard to upgrade mainboard software in combination with the upgrading demand instruction. By implementing the technical scheme provided by the invention, multilevel software updating can be simply realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of application software updates, and particularly to a method, system, product, and medium for upgrading multi-level software. Background Art

[0002] Under the double tests of complex and changeable industrial production and harsh usage environments, the protection performance and data transmission stability of electromagnetic flowmeters are crucial. The electromagnetic flowmeter with an IP68 waterproof rating structure plays a key role in many harsh working conditions due to its unique design.

[0003] Currently, for the electromagnetic flowmeter with an IP68 waterproof rating structure, the main body structure where the measurement main board is located is usually designed as a fully sealed structure to effectively resist the intrusion of water and dust and ensure the stable operation of the internal circuit. At the same time, a communication adapter board will be designed to achieve diverse data transmission functions.

[0004] However, since this electromagnetic flowmeter adopts a fully sealed structure, it restricts the direct way to upgrade the software of the main board. This makes it impossible to simply implement the upgrade operation like ordinary devices when both the communication adapter board and the main board software need to be updated. Summary of the Invention

[0005] This application provides a method, system, product, and medium for upgrading multi-level software to simply implement multi-level software updates.

[0006] In the first aspect of this application, a method for upgrading multi-level software is provided. The method includes:

[0007] After receiving an upgrade instruction, control the host computer to prepare a corresponding upgrade requirement instruction according to the upgrade instruction; control the host computer to transmit the upgrade requirement instruction to the communication adapter board; determine whether the upgrade requirement instruction is a first instruction or first data; the first instruction is the upgrade instruction corresponding to the communication adapter board; the first data is the upgrade data corresponding to the communication adapter board; if so, control the communication adapter board to upgrade the communication adapter board software in combination with the upgrade requirement instruction; if not, control the communication adapter board to propagate the upgrade requirement instruction outward; after receiving the main board reception information, control the main board to upgrade the main board software in combination with the upgrade requirement instruction; the main board reception information is the information sent by the main board after receiving the upgrade requirement instruction.

[0008] In the above embodiments, after receiving the upgrade instruction, the host computer prepares and transmits an upgrade requirement instruction, and then determines the instruction type. If it is an upgrade instruction or data for the communication adapter board, its software is upgraded; if not, it is propagated externally. After receiving the main board reception information, the main board is controlled to perform software upgrade. Compared with the related technology, for an electromagnetic flowmeter with an IP68 waterproof level structure, if both the communication adapter board and the main board have software that needs to be updated, the external waterproof structure needs to be removed to achieve it. Compared with the related technology, the above embodiments can simply implement the update of multi-level software.

[0009] Combined with some embodiments of the first aspect, in some embodiments, after receiving the main board reception information and controlling the main board to upgrade the main board software in combination with the upgrade requirement instruction, it further includes:

[0010] During the main board upgrade process, monitor the real-time operating parameters; the operating parameters include CPU usage rate, memory occupancy rate, and storage read / write speed; in the case where the real-time operating parameters exceed the preset parameter range threshold, control the main board to start the preset multi-dimensional regulation matrix; the multi-dimensional regulation matrix is constructed in advance based on the correlation relationship between the operating parameters of the main board; divide the storage device of the main board into different spatial regions according to the preset storage device size; for each spatial region, detect the operating parameters of each spatial region respectively; if the numerical differences of the operating parameters of all spatial regions are within the preset operating parameter difference threshold range, the multi-dimensional regulation matrix evenly distributes the available resources to each spatial region according to the number of divided spatial regions; the available resources include CPU resources, memory resources, and storage resources; if there is a value outside the preset operating parameter difference threshold range among the numerical differences of the operating parameters of all spatial regions, the multi-dimensional regulation matrix will adopt a differential allocation strategy to allocate the available resources according to the actual needs of each region.

[0011] In the above embodiments, by monitoring parameters such as CPU usage rate, memory occupancy rate, and storage read / write speed in real time during the main board upgrade, the multi-dimensional regulation matrix is started when the threshold is exceeded. At the same time, the main board storage device is partitioned, the operating parameters of each region are detected, and according to the parameter difference situation, the multi-dimensional regulation matrix evenly or differentially allocates resources such as CPU, memory, and storage. In the case of abnormal resource usage, the resources are allocated according to the actual situation, so that the main board can maintain stable and efficient operation during the upgrade process, timely respond to resource anomalies, and optimize resource allocation.

[0012] Combined with some embodiments of the first aspect, in some embodiments, after receiving the main board reception information, controlling the main board to upgrade the main board software in combination with the upgrade requirement instruction specifically includes:

[0013] After receiving the main board reception information, determine whether the upgrade requirement instruction is the second instruction; the second instruction is the upgrade instruction corresponding to the main board; if so, control the main board to enter the upgrade state; if not, the upgrade requirement instruction is the second information, and determine whether the main board is in the upgrade state; the second information is the upgrade information corresponding to the main board; in the case where the main board is in the upgrade state, slice the second information according to the preset slicing rule to obtain multiple data slices; store each data slice in different physical storage areas of the main board; during the data writing process, every time a data slice is written, control the main board to add the hash value of the corresponding data slice to a temporary blockchain structure; after the main board finishes writing all data slices, calculate the comprehensive hash value of the entire second information based on the hash values of each data slice recorded in the blockchain structure; in the case where there is a difference between the comprehensive hash value and the second information hash value, locate the incorrect data slice with the difference according to the blockchain structure; the second information hash value is the hash value calculated based on the second information before upgrading the main board; retransmit the data of the incorrect data slice.

[0014] In the above embodiment, after receiving the main board reception information, first determine the type of the upgrade requirement instruction. If it is an upgrade instruction, let the main board enter the upgrade state. If it is upgrade information, determine the main board state. Then slice and store the upgrade information, use the blockchain to record the hash value to calculate the comprehensive hash value, compare and locate the incorrect data slice and retransmit it. This makes the software upgrade of the main board more reliable, can timely detect and correct data writing errors, and ensure the accuracy and integrity of the upgrade data.

[0015] Combined with some embodiments of the first aspect, in some embodiments, if so, control the communication transfer board to upgrade the communication transfer board software in combination with the upgrade requirement instruction, specifically including:

[0016] If the upgrade requirement instruction is the first instruction or the first data, determine whether the upgrade requirement instruction is the first instruction; if so, match the first instruction with the preset instruction table; the preset instruction table contains various correct upgrade instructions corresponding to the communication transfer board; after matching the first instruction in the preset instruction table, send a wake-up message with an encryption key to the communication transfer board; the wake-up message can be decrypted and verified by the communication transfer board, and after the decryption verification passes, a verification success message from the communication transfer board will be received; after receiving the verification success message, control the communication transfer board to enter the upgrade state.

[0017] In the above embodiments, when the upgrade requirement instruction is the first instruction or the first data, first determine whether it is the first instruction, then match it with the preset instruction table. After successful matching, send a wake-up message with an encryption key. After the communication transfer board decrypts and verifies successfully and returns a success message, control it to enter the upgrade state. This makes the upgrade process of the communication transfer board more secure and reliable. Through instruction matching and encryption verification, it can effectively prevent interference from illegal instructions and malicious attacks, ensure that only legal and correct upgrade instructions can trigger the upgrade, and guarantee the smooth progress of the software upgrade of the communication transfer board and the system security.

[0018] Combined with some embodiments of the first aspect, in some embodiments, after determining whether the upgrade requirement instruction is the first instruction when the upgrade requirement instruction is the first instruction or the first data, it further includes:

[0019] If not, send a status query request to the communication transfer board within the first time slice; the status query request is such that after the communication transfer board receives it, it will collect the status information of the communication transfer board and send it out; the status information includes the software version and the running status; the first time slice is the time slice corresponding to the communication transfer board; after receiving the status information of the communication transfer board, determine whether the communication transfer board enters the upgrade state; the upgrade state is that the software version is the un-upgraded version and the running status is the pause mode; in the case where the communication transfer board enters the upgrade state, process the first data in blocks according to a preset size to obtain a plurality of data blocks; store all the obtained data blocks in a preset data block circular linked list; control the communication transfer board to sequentially take out the data blocks from the data block circular linked list in the storage order and perform update operations; the update operations include writing the checksum of the data in the data block; after each data block update operation is completed, control the communication transfer board to send feedback information to the host computer; the feedback information includes the number of the corresponding data block, the update status, and the running status data of the corresponding data block.

[0020] In the above embodiments, when the upgrade requirement instruction is not the first instruction, send a status query request to the communication transfer board within the first time slice, and determine whether it enters the upgrade state according to the returned status information. If it enters, divide the first data into blocks and store them in the circular linked list, let the communication transfer board take them out sequentially for update, and require feedback information after each update. This makes the upgrade process of the communication transfer board more orderly and controllable, can carry out the upgrade according to its actual status, the block processing is convenient for management, and the feedback mechanism can timely master the upgrade situation, guaranteeing the accuracy and reliability of the upgrade.

[0021] Combined with some embodiments of the first aspect, in some embodiments, after sending the processing result to the host computer after each first data block update operation is completed, it further includes:

[0022] After receiving the real-time feedback information, determine whether the update is successful; in the case of an update failure, use the pre-set error type association mapping table to calculate the association degree between the real-time feedback information and each error type in the error type association mapping table; the association degree is the similarity between the operation status data in the feedback information and the operation status data of each error type in the error type association mapping table; determine the error type and repair strategy corresponding to the maximum association degree value as the real-time error type and real-time repair strategy; the error type association mapping table records various combinations of operation status data and the corresponding error types and corresponding repair strategies; execute the real-time repair strategy.

[0023] In the above embodiment, by receiving the real-time feedback information of the communication adapter board, it is determined whether the update is successful. When the update fails, with the help of the pre-set error type association mapping table, the association degree between the feedback information and each error type in the table is calculated, and the real-time error type and repair strategy are determined and executed according to the maximum association degree. This enables the root cause of the problem to be quickly located and targeted repair measures to be taken when the communication adapter board is upgraded incorrectly, greatly improving the fault resolution efficiency.

[0024] Combined with some embodiments of the first aspect, in some embodiments, after receiving the main board reception information and controlling the main board to upgrade the main board software in combination with the upgrade requirement instruction, it further includes:

[0025] Control the main board to send out the upgrade result information; after the communication adapter board receives the upgrade result information, transmit the upgrade result information to the upper computer; after the upper computer receives the upgrade result information, record the upgrade result information in the pre-set main board upgrade result system log.

[0026] In the above embodiment, the main board sends out the upgrade result information, the communication adapter board receives it and then transmits it to the upper computer, and the upper computer records the information in the pre-set main board upgrade result system log after receiving it. This makes the entire main board upgrade process form a complete information closed-loop, which is convenient for subsequent review and query. Once a problem occurs, the problem node can be quickly located through the log, and the upgrade process can be traced, improving the system management and maintenance efficiency.

[0027] In a second aspect, an embodiment of the present application provides an upgraded multi-level software system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, and the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the upgraded multi-level software system to execute the methods described in the first aspect and any possible implementation manner in the first aspect.

[0028] In a third aspect, an embodiment of the present application provides a computer program product including instructions. When the computer program product runs on an upgraded multi-level software system, the upgraded multi-level software system is caused to execute the method described in the first aspect and any possible implementation manner in the first aspect.

[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium including instructions. When the instructions run on an upgraded multi-level software system, the upgraded multi-level software system is caused to execute the method described in the first aspect and any possible implementation manner in the first aspect.

[0030] It can be understood that the upgraded multi-level software system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the upgraded multi-level software method provided in the embodiments of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, and will not be elaborated here.

[0031] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0032] 1. After receiving an upgrade instruction, the host computer in the present application prepares and transmits an upgrade requirement instruction, and then determines the instruction type. If it is an upgrade instruction or data for a communication adapter board, its software is upgraded; if not, it is propagated externally. After receiving the main board reception information, the main board is controlled to perform software upgrade. Compared with related technologies, for an electromagnetic flowmeter with an IP68 waterproof grade structure, if both the communication adapter board and the main board need software updates, the external waterproof structure needs to be removed to achieve it. Compared with related technologies, the above embodiments simply implement the update of multi-level software.

[0033] 2. When the main board is upgraded in the present application, parameters such as CPU usage rate, memory occupancy rate, and storage read / write speed are monitored in real time. When the threshold is exceeded, a multi-dimensional regulation matrix is started. At the same time, the main board storage device is partitioned, the operating parameters of each area are detected, and according to the parameter difference situation, the multi-dimensional regulation matrix is used to evenly or differentially allocate resources such as CPU, memory, and storage. This enables the main board to maintain stable and efficient operation during the upgrade process, timely respond to resource anomalies, and optimize resource allocation.

[0034] 3. When the upgrade requirement instruction is the first instruction or the first data, this application first determines whether it is the first instruction, then matches it with the preset instruction table. After successful matching, a wake-up message with an encryption key is sent. After the communication transfer board decrypts and verifies successfully and returns a success message, it is controlled to enter the upgrade state. This makes the upgrade process of the communication transfer board more secure and reliable. Through instruction matching and encryption verification, it can effectively prevent interference from illegal instructions and malicious attacks, ensuring that only legal and correct upgrade instructions can trigger the upgrade, and guaranteeing the smooth progress of the software upgrade of the communication transfer board and system security. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 FIG. is a schematic diagram of an application scenario of an applicable system architecture for the method of upgrading multi-level software in an embodiment of the present application;

[0036] Figure 2 FIG. is a schematic flowchart of a method for upgrading multi-level software in an embodiment of the present application;

[0037] Figure 3 FIG. is another schematic flowchart of a method for upgrading multi-level software in an embodiment of the present application;

[0038] Figure 4 FIG. is a schematic diagram of an exemplary hardware structure of a multi-level software upgrade system in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0039] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular forms "a", "an", "the", "above", "said", "this" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more of the listed items.

[0040] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0041] Figure 1 FIG. is a schematic diagram of an applicable application scenario of the method for upgrading multi-level software in an embodiment of the present application.

[0042] Please refer to Figure 1, in this application scenario, it includes a host computer 101, a communication adapter board 102, an electromagnetic flowmeter 104, and a waterproof protective cover 105. Among them, the electromagnetic flowmeter includes a main board 103.

[0043] The host computer 101 can be an industrial control computer, a server, etc., with strong data processing capabilities and a stable operating system, capable of running complex control software and data management programs. The host computer 101 is located at the control end of the entire system and is usually a computer or a device with control functions. It receives upgrade instructions from the outside, such as upgrade commands issued by the operator through management software, or upgrade instructions generated when the system automatically detects a new version of the software. The host computer prepares corresponding upgrade requirement instructions according to this instruction and exchanges data with the communication adapter board 102 through the set communication method.

[0044] On the one hand, the communication adapter board 102 receives the upgrade requirement instructions transmitted from the host computer 101, parses and judges the instructions to distinguish whether the instruction is an upgrade instruction or data for itself, or an instruction that needs to be forwarded to the main board 103. If it is an upgrade instruction for itself, it upgrades its own software; if not, it transmits the upgrade requirement instruction to the main board 103. On the other hand, it is also responsible for receiving the upgrade result information sent by the main board 103 and forwarding it to the host computer 101 to ensure the smooth flow of information in the system.

[0045] The electromagnetic flowmeter 104 is used to accurately measure the flow rate of the fluid in the pipeline and is widely used in industrial production, water conservancy monitoring and other fields. Through the principle of electromagnetic induction, the fluid flow rate is converted into an electrical signal, and the main board 103 processes, analyzes and calculates these electrical signals, and finally obtains accurate flow rate data, and can perform operations such as data storage and transmission according to requirements.

[0046] The main board 103 is usually composed of a CPU, memory, storage chips, and various control circuits. It realizes the control and data processing of the electromagnetic flowmeter through signal transmission and logical operations between circuits, and its operation depends on the coordinated work of hardware circuits and software programs. As the core control unit of the electromagnetic flowmeter 104, the main board 103 is responsible for the operation and data processing of the entire device.

[0047] The waterproof protective cover 105 provides waterproof protection for the electromagnetic flowmeter 104, ensuring that the main board 103 and other electronic components inside can work normally in a humid or waterlogged environment, avoiding faults such as short circuits and corrosion caused by water ingress, thereby extending the service life of the electromagnetic flowmeter and ensuring its measurement accuracy and stability.

[0048] In the related art, for an electromagnetic flowmeter with an IP68 waterproof rating structure, in order to cope with complex industrial production and harsh usage environments, the main body structure where the measurement main board is located is designed as a fully sealed structure. Although this design can effectively resist water and dust and ensure the stable operation of the internal circuit and data transmission, it brings difficulties in software upgrading. Due to the fully sealed structure restricting the direct software upgrading path of the main board, the software upgrading of the main board cannot be operated as conveniently as that of ordinary devices.

[0049] However, by adopting the multi-level software upgrading method in the embodiments of the present application, even in the face of the upgrading obstacles brought by the full sealing of the electromagnetic flowmeter with an IP68 waterproof rating structure, an adapted upgrading requirement instruction can still be generated by the host computer. At the communication adapter board, it is judged whether the instruction is for upgrading the communication adapter board or the main board. In the case of upgrading the corresponding communication adapter board, its own upgrading process is started; in the case of upgrading the corresponding main board, the upgrading instruction is transmitted to the main board, and the multi-level software update can be simply realized to ensure its continuous and stable operation in harsh environments.

[0050] Figure 2 It is a schematic flowchart of a process of using the multi-level software upgrading method in the embodiments of the present application, including the following steps:

[0051] S201. After receiving the upgrading instruction, control the host computer to prepare the corresponding upgrading requirement instruction according to the upgrading instruction;

[0052] When the host computer receives the upgrading instruction, this instruction may be manually triggered by the system administrator or generated after the software automatically detects a new version. The program pre-written in the host computer will parse this instruction to identify key contents such as the target device to be upgraded (whether it is the communication adapter board or the main board), the version information of the upgrade, and the type of software required for the upgrade. Then, according to these parsing results, in accordance with the established format and rules, an upgrading requirement instruction that meets the requirements of the communication adapter board or the main board is generated for subsequent transmission and execution of the upgrading operation.

[0053] S202. Control the host computer to transmit the upgrading requirement instruction to the communication adapter board;

[0054] The host computer usually converts the upgrading requirement instruction into corresponding electrical signals or optical signals by means of specific communication protocols, such as the RS485 protocol, the SPI protocol, or the wireless communication protocol. Through the hardware interface circuit, such as the serial port, the bus, etc., the signal is transmitted to the corresponding receiving interface of the communication adapter board. After the interface circuit of the communication adapter board receives the signal, it converts the signal into a recognizable digital signal, thus completing the transmission of the upgrading requirement instruction from the host computer to the communication adapter board.

[0055] S203. Judge whether the upgrading requirement instruction is the first instruction or the first data;

[0056] If so, execute the following step S204;

[0057] If not, execute the following step S213;

[0058] Specifically, the first instruction is the upgrade instruction corresponding to the communication adapter board; the first data is the upgrade data corresponding to the communication adapter board.

[0059] After the communication adapter board receives the upgrade requirement instruction from the host computer, the instruction recognition program inside it starts to work. The program will compare the received instruction content with the pre-stored first instruction characteristics to determine whether it is the first instruction; at the same time, it checks the data part carried by the instruction and matches it with the predefined first data format and content requirements to determine whether it is the first data. If either is satisfied, it is determined to be yes, and the following step S204 is executed, and the communication adapter board follows the upgrade requirement instruction to perform the process of self-software upgrade; if neither is satisfied, it is determined to be no, and this upgrade requirement instruction is the upgrade instruction or upgrade data corresponding to the main board, and the following step S213 is executed to transmit the instruction to the main board for the main board to perform software update.

[0060] S204. Determine whether the upgrade requirement instruction is the first instruction;

[0061] If so, execute the following step S205;

[0062] If not, execute the following step S208;

[0063] After the communication adapter board receives the upgrade requirement instruction, its internal program starts the instruction judgment process. First, the program compares the upgrade requirement instruction with the predefined first instruction to check whether the key identifiers, formats, and content characteristics of the instruction are the same. If it is determined to be the first instruction, step S205 is executed to match the instruction with the correct upgrade instructions for the corresponding communication adapter board in the preset instruction table one by one to confirm the legality and accuracy of the instruction; if it is not the first instruction, step S208 is executed to further check whether the communication adapter board has entered the upgrade state currently.

[0064] S205. Match the first instruction with the preset instruction table;

[0065] It can be understood that the preset instruction table contains various correct upgrade instructions for the corresponding communication adapter board.

[0066] After the communication transfer board determines that the received upgrade requirement instruction is the first instruction, it will match the first instruction with a preset instruction table. The instruction processing module inside the communication transfer board will extract the features of the first instruction, such as extracting key information like the keyword, instruction code, and instruction length of the instruction. Then, the extracted features are compared one by one with the corresponding features of each correct upgrade instruction in the preset instruction table. By looping through the preset instruction table, it checks whether there is an instruction that exactly matches the features of the first instruction. If a matching item is found, it indicates that the first instruction is a legal and valid upgrade instruction.

[0067] S206. After matching the first instruction in the preset instruction table, send a wake-up message with an encryption key to the communication transfer board;

[0068] Specifically, the wake-up message can be decrypted and verified by the communication transfer board, and after the decryption verification passes, a verification success message from the communication transfer board will be received.

[0069] When the first instruction is matched in the preset instruction table, the host computer will generate a wake-up message with an encryption key. The host computer uses a pre-set encryption algorithm to encrypt the encryption key with the core content of the wake-up message to generate an encrypted wake-up message. Then, the host computer sends this encrypted message through the communication link with the communication transfer board. After receiving the message, the communication transfer board uses the decryption algorithm and key stored in itself to decrypt and verify the message. If the decryption is successful and the message content conforms to the preset rules, the communication transfer board will send a verification success message to the host computer.

[0070] S207. After receiving the verification success message, control the communication transfer board to enter the upgrade state;

[0071] After the host computer receives the verification success message sent by the communication transfer board, the host computer will first generate a set of control instructions specifically used to control the communication transfer board to enter the upgrade state. Then, through the established communication link, these control instructions are accurately sent to the communication transfer board. After receiving the instructions, the internal control program of the communication transfer board will, according to the requirements of the instructions, pause the current regular tasks being executed, release system resources such as CPU resources and memory space, and at the same time initialize various parameters and environments required for the upgrade, so that the communication transfer board can smoothly enter the upgrade state.

[0072] The above steps S204 - S207 can effectively prevent interference from illegal instructions and malicious attacks through instruction matching and encryption verification, ensuring that only legal and correct upgrade instructions can trigger the upgrade, and guaranteeing the smooth progress of the software upgrade of the communication transfer board and system security.

[0073] S208. Send a status query request to the communication transfer board within the first time slice;

[0074] Specifically, after the communication transfer board receives the status query request, it will collect the status information of the communication transfer board and send it out; the status information includes the software version and the running status; the first time slice is the time slice corresponding to the communication transfer board.

[0075] When it is necessary to obtain the status information of the communication transfer board, the system will initiate an operation within the specific time period of the first time slice according to the pre-set rules. The host computer generates a status query request containing a specific format and content according to the communication protocol agreed with the communication transfer board. Then, through the corresponding communication link, such as a serial port, a bus, etc., the request is sent to the communication transfer board. After receiving the request, the internal program of the communication transfer board will immediately collect information such as its own software version and running status, and package and send this information according to the established communication format.

[0076] A time slice is a fixed-duration time period pre-divided by the system. In the scenario of this embodiment, the first time slice is a time interval specifically allocated for the communication transfer board to perform status query operations. It provides a time constraint and specification for the communication between the host computer and the communication transfer board, ensuring that the status query request can be initiated and processed within a specific time.

[0077] In a complex system, there may be multiple devices that need to perform information interaction and control. Using time slices can avoid communication conflicts and interference between different devices, and ensure that each device operates in accordance with the predetermined order and time. At the same time, for the communication transfer board, the time slice also provides a clear time window for it to process the status query request, enabling it to arrange its own work tasks in an orderly manner.

[0078] Using time slices to send status query requests improves the communication efficiency and reliability of the system. It reduces information loss or errors caused by communication conflicts, enabling the host computer to obtain the status information of the communication transfer board at the accurate time. In addition, the use of time slices also enhances the schedulability and manageability of the system, facilitating the overall planning and monitoring of the operation of the entire system.

[0079] S209. After receiving the status information of the communication transfer board, determine whether the communication transfer board enters the upgrade state;

[0080] Specifically, the upgrade state is that the software version is the un-upgraded version and the running state is the pause mode.

[0081] The host computer receives the status information fed back by the communication transfer board through the communication link, which includes the software version and the running status. It parses this information, extracts the software version number, compares it with the known latest version number, and determines whether it is an un-upgraded version. At the same time, it checks the running status parameters to confirm whether it is in the pause mode. When the software version is an un-upgraded version and the running status is the pause mode, the host computer determines that the communication transfer board enters the upgrade state.

[0082] S210. Store all the obtained data blocks into the preset data block circular linked list.

[0083] After the communication transfer board processes the first data into multiple data blocks according to the preset size, it will store these data blocks into the preset data block circular linked list.

[0084] First, the system initializes the pointer of the circular linked list to point to the starting position of the list. Then, each data block is encapsulated into a linked list node in turn. The node contains the specific content of the data block and a pointer to the next node. Next, these nodes are inserted into the circular linked list in sequence. When inserting the last data block node, its pointer points to the starting node of the list, forming a closed-loop structure, thus completing the storage of all data blocks.

[0085] In the scenario of this embodiment, the circular linked list is mainly used to store the data blocks required for the upgrade of the communication transfer board, and saves the first data after block processing in a certain order. The communication transfer board can take out the data blocks from the circular linked list in turn according to the order of data block storage for subsequent update operations, such as the checksum writing of the data in the data block, etc., to ensure that the upgrade data can be processed orderly.

[0086] The upgrade data blocks usually need to be processed in order, and the circular linked list can well meet this requirement. It allows the communication transfer board to start from the head of the list and traverse each data block in turn to achieve sequential access, which conforms to the logical process of the upgrade operation. When all the data blocks are processed, if it is necessary to process them again or new data blocks are added, the circular structure of the circular linked list can easily implement this circular operation without re-initializing the list, improving the processing efficiency. During the upgrade process, there may be situations where data blocks need to be added, deleted, or modified. The node insertion and deletion operations of the circular linked list are relatively simple, only need to adjust the pointer pointing between nodes, without a large amount of data movement like an array, and have high flexibility.

[0087] Through the circular linked list, the communication transfer board can quickly locate and obtain the next data block to be processed, reducing the time for data search and waiting, making the upgrade process smoother and more efficient. Since the circular linked list can flexibly handle the dynamic changes of data blocks, even in case of unexpected situations during the upgrade process, such as some data blocks need to be reprocessed or new data blocks are added, it can be adjusted through simple linked list operations to ensure the continuity of the upgrade process and enhance the stability of the system. Compared with other complex data structures, the implementation of the circular linked list is relatively simple and occupies less system resources. In a device with limited resources like the communication transfer board, using the circular linked list can effectively save memory and processing power and improve resource utilization.

[0088] S211. Control the communication transfer board to sequentially take out data blocks from the data block circular linked list in the storage order and perform update operations.

[0089] Specifically, the update operation includes data verification and writing in the data block.

[0090] When the communication transfer board starts the upgrade process, it will point the pointer to the starting position of the data block circular linked list and take out data blocks in the storage order from this starting point. For each taken-out data block, data verification is first performed. During verification, according to a preset verification algorithm, such as CRC verification, the verification value of the data block is calculated and compared with the verification value saved with the data block or specified in the instruction to ensure the accuracy of the data. In addition to the CRC verification algorithm, a hash verification algorithm can also be used to further ensure the accuracy of the data, which is not limited here.

[0091] After the verification passes, the data in the data block is written into the specified storage area of the communication transfer board to complete the update operation until all data blocks are processed.

[0092] S212. After each data block update operation is completed, control the communication transfer board to send feedback information to the host computer.

[0093] Specifically, the feedback information includes the number of the corresponding data block, the update status, and the operation status data of the corresponding data block.

[0094] When the communication transfer board completes an update operation (including data verification and writing) of a data block, its internal program will immediately trigger the feedback mechanism. First, the communication transfer board will generate a feedback information containing the update result of this data block, and the content includes key information such as whether the update is successful, the verification situation, and the writing position. Then, according to the communication protocol pre-agreed with the host computer, the feedback information is formatted, such as adding specific frame headers, frame tails, and verification codes. Finally, the processed feedback information is sent to the host computer through a communication interface (such as a serial port, a bus, etc.).

[0095] In the above steps S208 - S212, the upgrade can be carried out according to its actual state. When the communication adapter board is in the upgrade state, the upgrade data is processed in blocks for easy management. After the update operation of each block of data is completed, feedback is given in a timely manner to keep track of the upgrade situation and ensure the accuracy and reliability of the upgrade.

[0096] S213. Control the communication adapter board to spread the upgrade requirement instruction outward;

[0097] When the communication adapter board determines that the upgrade requirement instruction is not its first instruction or first data, it will spread the instruction outward by means of the wireless transmission method agreed with the main board. First, encode the upgrade requirement instruction to convert the digital information into a form suitable for the above wireless transmission method, such as using a specific pulse coding method. Then, send the encoded signal outward through the wireless transmission emission module.

[0098] In some embodiments of the present application, the wireless transmission method agreed between the communication adapter board and the main board can be Bluetooth, which is suitable for communication between devices at short distances; in other embodiments of the present application, the wireless transmission method agreed between the communication adapter board and the main board can also be Zigbee, a low - rate, low - power, and low - cost wireless communication technology, which is not limited here.

[0099] S214. After receiving the main board received information, control the main board to upgrade the main board software in combination with the upgrade requirement instruction;

[0100] Specifically, the main board received information is the information sent by the main board after receiving the upgrade requirement instruction.

[0101] The host computer receives the main board received information sent by the main board, which means that the main board has successfully received the upgrade requirement instruction. After the main board receives the control signal, it first parses the upgrade requirement instruction to clarify the specific content and requirements of the upgrade. Then, control the main board to pause the current non - critical tasks, release system resources, and write the upgrade data into the specified storage area according to the instruction requirements to replace the old version software, completing the upgrade operation of the main board software.

[0102] S215. Control the main board to send the upgrade result information outward;

[0103] When the main board completes the software upgrade, the internal upgrade management program will conduct a final check on the upgrade operation to determine whether the upgrade is successful.

[0104] If the upgrade is successful, the program will generate upgrade result information containing a success flag and relevant information (such as the software version number after the upgrade); if the upgrade fails, information containing a failure flag will be generated. Then, according to a pre-set communication protocol, the main board formats the upgrade result information, adding necessary header and footer identifiers, checksum, etc. Finally, the processed upgrade result information is sent out through the corresponding wireless communication interface module.

[0105] S216. After the communication transfer board receives the upgrade result information, it transmits the upgrade result information to the host computer;

[0106] The communication transfer board constantly monitors the receiving channel. Once it detects the upgrade result information sent by the main board, it immediately starts the receiving program. It parses the received information according to the established communication protocol, checks the integrity and accuracy of the information. After ensuring it is correct, it stores it in the temporary buffer.

[0107] Subsequently, according to the communication link settings with the host computer, the communication transfer board repackages the upgrade result information, adding identifiers and check information suitable for the host computer to receive. Finally, through the corresponding communication interface, such as a serial port, bus, etc., the processed upgrade result information is sent to the host computer.

[0108] S217. After the host computer receives the upgrade result information, it records the upgrade result information in the pre-set system log of the main board upgrade result.

[0109] The communication module of the host computer continuously monitors the receiving port. Once it captures the main board upgrade result information transmitted by the communication transfer board, it immediately triggers the information processing process.

[0110] The host computer first performs a legality verification on the received information, checking whether the data format, checksum, etc. are correct. After confirming it is correct, it extracts the key content in the upgrade result information, such as the status of successful or failed upgrade, the software version after the upgrade, etc. Then, according to the format requirements of the pre-set system log of the main board upgrade result, these information are recorded in the log file, and the recording will include information such as the timestamp, which is convenient for subsequent reference.

[0111] In the above steps S215 - S217, the upgrade result information is sent out through the main board, received by the communication transfer board and then transmitted to the host computer, and the host computer records the information in the pre-set system log of the main board upgrade result after receiving it. This makes the entire main board upgrade process form a complete information closed-loop, which is convenient for subsequent review and query.

[0112] In the above embodiments, the host computer receives the upgrade instruction, parses it and prepares the upgrade requirement instruction for transmission to the communication adapter board. After the communication adapter board determines the instruction type, if it is its own upgrade instruction, it will complete matching, verification and enter the upgrade state, process the data blocks in sequence and feed back after the update; if it is the main board instruction, it will propagate it outward, and the main board will receive and update its own software, so that the software upgrade efficiency of multi-level devices is improved, the upgrade security and stability are enhanced, the error risk is reduced, the resource utilization rate is increased, and the upgrade result can also be recorded for subsequent maintenance and problem troubleshooting. Compared with the related technologies, the communication adapter board is used to realize the transmission of the upgrade instruction from the host computer to the main board in a special communication mode, overcoming the limitation that the main board cannot be directly software-upgraded, and can simply realize the update of multi-level software.

[0113] In some other embodiments of the present application, when upgrading large software on the main board, it may cause lag or upgrade failure. By using the method for upgrading multi-level software provided by the present application, the storage device space area can be divided and the operation parameters of each area can be detected. According to the parameter difference situation, different strategies are adopted to allocate available resources. This enables the main board to dynamically adapt to different loads during the upgrade process and ensures the stable operation of the system.

[0114] As Figure 3 shown, it is another flow schematic diagram of the method for upgrading multi-level software provided by the embodiments of the present application. This method can be used in Figure 1 the application scenario shown, and includes the following steps:

[0115] S301. After receiving the upgrade instruction, control the host computer to prepare the corresponding upgrade requirement instruction according to the upgrade instruction;

[0116] S302. Control the host computer to transmit the upgrade requirement instruction to the communication adapter board;

[0117] S303. Determine whether the upgrade requirement instruction is the first instruction or the first data;

[0118] If so, execute the following step S304;

[0119] If not, execute the following step S309;

[0120] S304. Control the communication adapter board to upgrade the communication adapter board software in combination with the upgrade requirement instruction;

[0121] When the communication adapter board determines that the upgrade requirement instruction is the first instruction or the first data for itself, it will start the upgrade process.

[0122] First, put the communication transfer board into the upgrade state, pause current unnecessary regular tasks, and release system resources. Then, write the upgrade data into the corresponding software storage area in sequence to replace the old version software code. Monitor in real time during the writing process to ensure that the data is accurately written, and finally complete the software upgrade.

[0123] S305. After receiving the real-time feedback information, determine whether the update is successful;

[0124] The host computer continuously monitors the receiving port. Once it captures the real-time feedback information transmitted by the communication transfer board, it immediately starts the judgment process. First, the host computer parses the feedback information and extracts the key content regarding the update operation, such as the data block number, update status, running status data, etc. Then, according to the preset successful judgment rules, check whether the update status shows success and whether the relevant running status data is within the normal range. If the success conditions are met, it is determined that the update is successful; otherwise, it is determined that the update fails.

[0125] S306. In the case of an update failure, use the preset error type association mapping table to calculate the association degree between the real-time feedback information and each error type in the error type association mapping table;

[0126] Specifically, this association degree is the similarity between the running status data in the feedback information and the running status data of each error type in the error type association mapping table.

[0127] After the host computer determines that the update fails, it will call the preset error type association mapping table. This error type association mapping table stores various error types and their corresponding running status data characteristics.

[0128] The host computer first extracts the running status data from the real-time feedback information, and then compares these data with the running status data of each error type in the error type association mapping table. Through specific similarity calculation methods, such as the cosine similarity algorithm, Euclidean distance algorithm, etc., calculate the association degree between the real-time feedback information and each error type.

[0129] S307. Determine the error type and repair strategy corresponding to the maximum association degree value as the real-time error type and real-time repair strategy;

[0130] Specifically, this error type association mapping table records various combinations of running status data and their corresponding error types and corresponding repair strategies.

[0131] After calculating the association degree between the real-time feedback information and each error type in the error type association mapping table, the system starts to traverse all the association degree values. By comparing the sizes, find the maximum association degree value among them.

[0132] Since the error type association mapping table records various combinations of operating status data and the corresponding error types and repair strategies, the error type corresponding to the maximum association degree value is determined as the real-time error type of this update failure, and the corresponding repair strategy is determined as the real-time repair strategy.

[0133] S308. Execute the real-time repair strategy;

[0134] After determining the real-time error type and the corresponding real-time repair strategy, the system starts to execute the repair operation. First, according to the specific content of the real-time repair strategy, the required operation steps and resources are determined.

[0135] For example, if the repair strategy is to resend a specific data block, the system will locate and prepare the data block, and resend it to the communication transfer board through the corresponding communication interface according to the established communication protocol and process. If it is to adjust system parameters, the system will find the corresponding parameter setting module and modify it to the parameter value specified by the strategy to ensure the accurate execution of the repair operation.

[0136] In the above steps S307 - S308, by receiving the real-time feedback information from the communication transfer board, it is judged whether the update is successful. When the update fails, by means of the pre-set error type association mapping table, the association degree between the feedback information and each error type in the table is calculated, and the real-time error type and repair strategy are determined according to the maximum association degree and executed. This enables the rapid location of the problem root cause and the adoption of targeted repair measures when an error occurs during the upgrade of the communication transfer board, greatly improving the fault resolution efficiency.

[0137] S309. Control the communication transfer board to spread the upgrade requirement instruction outward;

[0138] S310. After receiving the main board reception information, judge whether the upgrade requirement instruction is the second instruction;

[0139] Specifically, the second instruction is the upgrade instruction corresponding to the main board;

[0140] If so, execute the following step S312;

[0141] If not, execute the following step S311;

[0142] When the host computer receives the main board reception information sent by the main board, it indicates that the main board has received the upgrade requirement instruction. At this time, the host computer starts to judge whether the upgrade requirement instruction is the second instruction, that is, the upgrade instruction corresponding to the main board. The host computer makes a judgment by comparing the key features such as the specific identifier, format, and content of the instruction with the pre-stored second instruction information. If it is judged to be the second instruction, the operation of controlling the main board to enter the upgrade state is executed; if not, it is judged whether the main board is currently in the upgrade state by checking the relevant status information fed back by the main board.

[0143] S311. Determine whether the main board is in the upgrade state;

[0144] It can be understood that if the upgrade requirement instruction is not the second instruction, it is the second piece of information, and the second piece of information is the upgrade information corresponding to the main board.

[0145] When it is determined that the upgrade requirement instruction is not the second instruction corresponding to the main board, the system needs to determine whether the main board is already in the upgrade state. The main board judges its own current status information and checks the identifiers or parameters related to the upgrade state therein, such as whether there is a flag indicating that an upgrade operation is in progress, the status code of a specific upgrade process, etc., so as to determine whether it is currently in the upgrade state.

[0146] S312. Control the main board to enter the upgrade state;

[0147] After it is determined that the upgrade requirement instruction is the second instruction corresponding to the main board, the host computer first generates an instruction set containing specific control information. These instruction sets include instructions such as pausing the current non-critical tasks of the main board and releasing system resources. Then, through the communication link established with the communication transfer board, such as serial communication or network communication, these instructions are sent to the communication transfer board, and the communication transfer board then sends them to the main board. After receiving the instructions, the internal control program of the main board pauses the regular service process according to the instruction requirements, allocates resources such as memory and CPU, and initializes the parameters required for the upgrade at the same time. After completion, it enters the upgrade state.

[0148] S313. In the case where the main board is in the upgrade state, slice the second piece of information according to the preset slicing rules to obtain multiple data slices;

[0149] Once it is determined that the main board is in the upgrade state, call the preset slicing rules, which may be set based on factors such as the amount of data, data type, or specific format. Then, according to these rules, divide the second piece of information into multiple smaller data units, that is, data slices.

[0150] For example, if the rule is set to slice by a fixed number of bytes, the system will start from the starting position of the second piece of information and divide it in sequence according to the set number of bytes to ensure that each data slice meets the preset requirements for subsequent orderly upgrade of the main board.

[0151] Slicing the second information according to the preset slicing rules can split a large amount of data into multiple smaller data slices. During data transmission, the smaller data slices are relatively less likely to be affected by interference and transmission errors. The storage and processing capabilities of the motherboard are limited. Slicing the second information can make the data better adapt to the storage and processing capabilities of the motherboard. Different motherboards have certain limitations on the amount of data that can be processed and stored at one time. By slicing, it can be ensured that each data slice is within the range that the motherboard can process and store, avoiding the motherboard being unable to process or store properly due to excessive data volume and ensuring the smooth progress of the upgrade process.

[0152] S314. Store each data slice in different physical storage areas of the motherboard;

[0153] After completing the slicing process of the second information to obtain multiple data slices, the system will plan the storage location of each data slice according to the characteristics and layout of the motherboard's physical storage areas. The physical storage areas of the motherboard usually have different partitions and address ranges. The system will pre-determine the data types and uses suitable for storage in each partition. Then, according to the planned scheme, each data slice is written into the corresponding physical storage area respectively. For example, using the interface provided by the storage controller, through specific write instructions, the data slice is stored in the specified storage address to ensure the orderly storage of the data slice.

[0154] The physical storage areas of the motherboard have different partitions and address ranges. Storing data slices in different physical storage areas can reasonably plan the storage location of each data slice according to the characteristics and layout of the storage areas, realizing the optimal utilization of storage resources.

[0155] S315. During the data writing process, every time a data slice is written, control the motherboard to add the hash value of the corresponding data slice to a temporary blockchain structure;

[0156] When the motherboard writes data slices to different physical storage areas, every time a data slice is successfully written, the computing module in the motherboard will calculate the data slice according to the hash algorithm to generate a uniquely corresponding hash value.

[0157] At the same time, the blockchain management program pre-set in the motherboard will add this hash value to the temporary blockchain structure. This blockchain structure consists of blocks, and each block contains information such as the hash value of the previous block and the timestamp. The newly generated hash value is added as the data part of the new block, thus forming a chain structure to record the process of data slice writing.

[0158] S316. After the motherboard completes the writing of all data slices, calculate the comprehensive hash value of the entire second information according to the hash values of each data slice recorded in the blockchain structure;

[0159] After the main board finishes writing all data slices, it will start to calculate the comprehensive hash value of the second information based on the hash values of each data slice recorded in the temporary blockchain structure. The main board first extracts the hash value corresponding to each data slice from the blockchain structure in sequence.

[0160] Next, these hash values are combined together according to certain rules, such as concatenating them in the order of data slice writing.

[0161] Then, using the pre-set hash algorithm, calculate the combined hash value, and finally obtain the comprehensive hash value of the entire second information, which can reflect the overall characteristics of the second information.

[0162] S317. In the case where there is a difference between the comprehensive hash value and the hash value of the second information, locate the incorrect data slice with the difference according to the blockchain structure;

[0163] Specifically, the hash value of the second information is the hash value calculated based on the second information before upgrading the main board.

[0164] After the main board finishes writing the data slices and calculates the comprehensive hash value, it will compare it with the hash value of the second information calculated based on the second information before upgrading. If there is a difference between the two, it means that there may be an error in a data slice during the writing process.

[0165] At this time, the system will use the blockchain structure to locate the problem. Since the hash value of each data slice is recorded in the blockchain, the system will recalculate the hash value of each data slice in sequence and compare it with the corresponding hash value recorded in the blockchain. When it is found that the recalculated hash value of a certain data slice is different from the recorded one, it can be determined that this data slice is the incorrect data slice.

[0166] S318. Retransmit the data of the incorrect data slice;

[0167] When the incorrect data slice is determined, the system starts the retransmission process.

[0168] First, accurately find the original data corresponding to the incorrect data slice according to the location information. Then, encapsulate the data according to a specific communication protocol, add information such as frame header, frame tail, and check code to ensure the reliability of transmission. Then write it into the corresponding physical storage area to overwrite the original incorrect data.

[0169] In the above steps S310 - S318, after receiving the main board receiving information, first judge the type of the upgrade requirement instruction. If it is an upgrade instruction, let the main board enter the upgrade state. If it is upgrade information, judge the state of the main board. Then slice and store the upgrade information, use the blockchain to record the hash value to calculate the comprehensive hash value, compare and locate the incorrect data slice and retransmit it. This makes the software upgrade of the main board more reliable, can timely detect and correct data writing errors, and ensure the accuracy and integrity of the upgrade data.

[0170] S319. During the motherboard upgrade process, monitor real-time operating parameters;

[0171] Specifically, the operating parameters include CPU usage rate, memory occupancy rate, and storage read / write speed;

[0172] During the motherboard upgrade process, the system will use the motherboard's own hardware detection module and corresponding software tools to monitor the operating parameters in real time. For the CPU usage rate, the system will read the performance counters inside the CPU and count the proportion of time the CPU is in a busy state within a certain time interval. The memory occupancy rate is obtained by querying the memory management module of the operating system to get the ratio of the currently used memory to the total memory. The monitoring of the storage read / write speed is achieved by sending specific read / write instructions to the storage device and recording the time required to complete the read / write operation, and then calculating the read / write speed. These monitored data will be continuously collected and fed back to keep track of the motherboard's operating status at any time.

[0173] S320. When the real-time operating parameters exceed the preset parameter range threshold, control the motherboard to start the preset multi-dimensional regulation matrix;

[0174] Specifically, the multi-dimensional regulation matrix is constructed in advance based on the correlation relationships between the operating parameters of the motherboard.

[0175] During the motherboard upgrade period, the system continuously collects real-time operating parameters, such as CPU usage rate, memory occupancy rate, and storage read / write speed.

[0176] The system will compare these real-time data with the preset parameter range threshold. Once it is found that one or more parameters exceed the threshold, the startup mechanism of the multi-dimensional regulation matrix will be triggered.

[0177] This multi-dimensional regulation matrix is constructed in advance according to the correlation relationships between the operating parameters of the motherboard. The system will call the preset regulation strategies within the matrix and automatically adjust the working mode, resource allocation, etc. of the motherboard for different parameter anomalies to restore the parameters to the normal range.

[0178] The multi-dimensional regulation matrix can comprehensively regulate multiple real-time operating parameters simultaneously, avoiding the situation where only a single parameter is adjusted and the mutual influence of other parameters may be ignored. By reasonably setting the matrix elements and weights, it is possible to select the optimal combination of regulation strategies according to different parameter combinations and actual situations, enabling the system to maintain good performance under various working conditions.

[0179] S321. Divide the storage device of the motherboard into multiple different spatial regions according to the preset storage device size;

[0180] When partitioning the mainboard storage device, the system first works according to the preset storage device partitioning size rules. These rules may be formulated based on factors such as the total capacity of the storage device and the storage requirements of different data types. Then, through the storage management program of the mainboard, the system starts from the starting address of the storage device and sequentially divides multiple different spatial regions according to the set size.

[0181] For example, if a large-capacity hard disk is to be partitioned into a system space, a data space, and a cache space, the system will define the start and end positions of each region on the hard disk according to the preset ratio or fixed size to complete the partitioning operation.

[0182] S322. For each spatial region, detect the operating parameters of each spatial region respectively;

[0183] After partitioning the mainboard storage device into multiple spatial regions, the system will sequentially perform the operation parameter detection work for each spatial region.

[0184] The system uses the mainboard storage controller and specialized monitoring software to achieve detection. For the storage capacity, it will count the currently used space and the remaining available space; for the read and write performance, it will send specific read and write instructions, record the time to complete the operation, and then calculate the read and write speed; for the data error rate, it will determine by comparing the consistency of the stored data and the original data through the verification mechanism. These operations are applied to each spatial region in a loop to obtain comprehensive operating parameters.

[0185] S323. If the numerical differences of the operating parameters of all spatial regions are within the preset operating parameter difference threshold range, the multi-dimensional regulation matrix will evenly distribute the available resources to each spatial region according to the number of partitioned spatial regions;

[0186] Specifically, the available resources include CPU resources, memory resources, and storage resources.

[0187] After completing the detection of the operating parameters of each spatial region of the mainboard, the system will obtain the numerical values of the operating parameters of each region, calculate the differences pairwise, and compare all the calculated differences with the preset operating parameter difference threshold.

[0188] If the numerical differences of the operating parameters of all spatial regions are within this threshold range, it indicates that the operating conditions of each region are relatively balanced. At this time, the multi-dimensional regulation matrix begins to play a role. It will calculate the available resources of the system, such as CPU resources, memory resources, and storage resources, according to the number of previously partitioned spatial regions. Then, according to the principle of average distribution, through the resource management mechanism of the operating system, these resources will be reasonably allocated to each spatial region.

[0189] S324. If there is a value outside the preset operating parameter difference threshold range among the numerical differences of the operating parameters in all spatial regions, the multi-dimensional control matrix will allocate available resources using a differentiated allocation strategy according to the actual requirements of each region.

[0190] When it is detected that there is a value exceeding the preset operating parameter difference threshold range among the numerical differences of the operating parameters in all spatial regions, it means that the operating conditions of each spatial region are unbalanced. At this time, the multi-dimensional control matrix will analyze the actual resource requirements of each region based on the operating parameters of each region, such as CPU usage rate, memory occupancy rate, storage read and write speed, etc. For example, if a region has frequent reads and writes, it indicates that it has a large demand for storage and CPU resources. Then, the multi-dimensional control matrix will initiate a differentiated allocation strategy, and allocate more resources from the available CPU resources, memory resources, and storage resources to the regions with large demand, and appropriately reduce the resource allocation to the regions with small demand, in order to achieve the purpose of optimizing resource utilization.

[0191] In the above steps S319 - S324, during the motherboard upgrade, the operating parameters are monitored in real time, and when an anomaly occurs, resources are allocated according to the actual situation, so that the motherboard can maintain stable and efficient operation during the upgrade process, promptly respond to resource anomalies, and optimize resource allocation.

[0192] Steps S301 - S303, S309 are Figure 2 similar to steps S201 - S203, S213 in the embodiment shown, and the descriptions in steps S201 - S203, S213 can be referred to, and will not be elaborated here.

[0193] In the above embodiment, after receiving the upgrade instruction, first prepare and transmit the upgrade requirement instruction, and determine the instruction type to upgrade the communication transfer board or the motherboard. During the motherboard upgrade process, slicing, blockchain verification, retransmission, etc. are used to ensure data accuracy; the operating parameters are monitored and the multi-dimensional control matrix is used to control resources. This makes the motherboard upgrade more stable and reliable, can promptly detect and solve upgrade problems, optimize resource allocation, improve the upgrade success rate, and ensure the stable and efficient operation of the system.

[0194] Next, an exemplary upgrade multi-level software system 400 provided by the embodiments of the present application will be introduced. Figure 4 It is an exemplary hardware structure diagram of the upgrade multi-level software system 400 provided by the embodiments of the present application.

[0195] In some embodiments, the upgraded multi-level software system 400 is a computer device or the upgraded multi-level software system 400 includes a computer device. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers through a network connection. In some embodiments, the network interface can be a wired network interface, and in some embodiments, the network interface can also be a wireless network interface. The computer program, when executed by the processor, implements the method in the embodiments of the present application.

[0196] Those skilled in the art can understand that Figure 4 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout.

[0197] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0198] As used in the above embodiments, depending on the context, the term "when..." can be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if detecting (the stated condition or event)" can be interpreted to mean "if determining..." or "in response to determining..." or "when detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)".

[0199] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.

[0200] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware with a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage medium includes: various media that can store program codes such as ROM or random access memory RAM, magnetic disks, or optical discs.

Claims

1. A method for upgrading multi-level software, characterized in that: include: After receiving the upgrade instruction, the host computer is controlled to prepare the corresponding upgrade requirement instruction according to the upgrade instruction; Controlling the host computer to transmit the upgrade requirement instruction to the communication adapter board; Determine whether the upgrade requirement instruction is a first instruction or a first data; the first instruction is an upgrade instruction corresponding to the communication adapter board; the first data is upgrade data corresponding to the communication adapter board; If so, controlling the communication adapter board to upgrade the communication adapter board software in combination with the upgrade requirement instruction; If not, controlling the communication adapter board to propagate the upgrade requirement instruction outwardly; After receiving the mainboard receiving information, the mainboard is controlled to upgrade the mainboard software in combination with the upgrade requirement instruction; the mainboard receiving information is information sent by the mainboard after receiving the upgrade requirement instruction.

2. The method according to claim 1, characterized in that When the mainboard is in an upgraded state, the second information is sliced ​​according to a preset slicing rule to obtain a plurality of data slices, and the method further includes: During the motherboard upgrade process, real-time operating parameters are monitored; the operating parameters include CPU usage, memory occupancy, and storage read and write speeds; When the real-time operating parameter exceeds a preset parameter range threshold, the mainboard is controlled to start a preset multi-dimensional control matrix; the multi-dimensional control matrix is ​​constructed in advance based on the correlation between the operating parameters of the mainboard; Dividing the storage device of the mainboard into a plurality of different spatial areas according to the preset storage device size; For each spatial region, the operating parameters of each spatial region are detected respectively; If the numerical differences of the operating parameters of all the spatial regions are within the preset operating parameter difference threshold range, the multidimensional control matrix evenly distributes the available resources to each spatial region according to the number of divided spatial regions; the available resources include CPU resources, memory resources and storage resources; If there are values ​​in the numerical differences of the operating parameters of all the spatial regions that are outside the preset operating parameter difference threshold range, the multidimensional control matrix will allocate the available resources using differentiated allocation strategies based on the actual needs of each region.

3. The method according to claim 1, characterized in that After receiving the mainboard receiving information, controlling the mainboard to upgrade the mainboard software in combination with the upgrade requirement instruction specifically includes: After receiving the mainboard reception information, determining whether the upgrade requirement instruction is a second instruction; the second instruction is an upgrade instruction corresponding to the mainboard; If yes, control the mainboard to enter an upgrade state; If not, the upgrade requirement instruction is the second information, which determines whether the motherboard is in an upgrade state; the second information is the upgrade information corresponding to the motherboard; When the mainboard is in an upgraded state, slicing the second information according to a preset slicing rule to obtain a plurality of data slices; Storing each data slice in different physical storage areas of the mainboard; During the data writing process, each time a data slice is written, the main board is controlled to add the hash value of the corresponding data slice to a temporary blockchain structure; After the mainboard completes writing of all data slices, the mainboard calculates the comprehensive hash value of the entire second information according to the hash value of each data slice recorded in the blockchain structure; In the case where there is a difference between the comprehensive hash value and the second information hash value, locating the different erroneous data piece according to the blockchain structure; the second information hash value is a hash value calculated according to the second information before upgrading the motherboard; The erroneous data slice data is retransmitted.

4. The method according to claim 1, characterized in that: If so, controlling the communication adapter board to upgrade the communication adapter board software in combination with the upgrade requirement instruction specifically includes: If the upgrade requirement instruction is a first instruction or first data, determining whether the upgrade requirement instruction is the first instruction; If yes, then the first instruction is matched with a preset instruction table; the preset instruction table contains a plurality of correct upgrade instructions corresponding to the communication adapter board; After the first instruction is matched in the preset instruction table, a wake-up message with an encryption key is sent to the communication adapter board; the wake-up message can be decrypted and verified by the communication adapter board, and a verification success message from the communication adapter board is received after the decryption verification passes; After receiving the verification success message, the communication adapter board is controlled to enter an upgrade state.

5. The method according to claim 4, characterized in that If the upgrade requirement instruction is the first instruction or the first data, after determining whether the upgrade requirement instruction is the first instruction, the method further includes: If not, a status query request is sent to the communication adapter board within the first time slice; after the communication adapter board receives the status query request, the communication adapter board status information is collected and sent out; the status information includes the software version and the running status; the first time slice is the time slice corresponding to the communication adapter board; After receiving the communication adapter board status information, determining whether the communication adapter board enters an upgrade state; the upgrade state is that the software version is a non-upgraded version and the running state is a pause mode; When the communication adapter board enters an upgrade state, the first data is processed in blocks according to a preset size to obtain a plurality of data blocks; Store all obtained data blocks into the preset data block circular linked list; Control the communication adapter board to sequentially take out data blocks from the data block circular linked list in the order in which they are stored, and perform an update operation; the update operation includes checking and writing the data in the data block; After each update operation of a data block is completed, the communication adapter board is controlled to send feedback information to the host computer; the feedback information includes the number of the corresponding data block, the update status and the operation status data of the corresponding data block.

6. The method according to claim 5, characterized in that After completing the update operation of each first data block, after sending the processing result to the host computer, it also includes: After receiving the first feedback information, determining whether the first data block is updated successfully; In the case where the first data block fails to be updated, using a preset error type association mapping table, calculating the association degree between the first data block and each error type in the error type association mapping table; the association degree is the similarity between the first operating state data in the first feedback information and the operating state data of each error type in the error type association mapping table; Determine that the error type and repair strategy corresponding to the maximum correlation value are the first data block error type and the first repair strategy; the error type association mapping table records various operation status data combinations and corresponding error types and corresponding repair strategies; The first repair strategy is executed.

7. The method according to claim 1, characterized in that After receiving the mainboard reception information, controlling the mainboard to upgrade the mainboard software in combination with the upgrade requirement instruction, further comprising: The control mainboard sends the upgrade result information to the outside; After the communication adapter board receives the upgrade result information, the upgrade result information is transmitted to the host computer; After the host computer receives the upgrade result information, the upgrade result information is recorded in a preset mainboard upgrade result system log.

8. An upgrade multi-level software system, characterized in that: The upgradeable multi-level software system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the upgradeable multi-level software system to execute the method described in any one of claims 1-7.

9. A computer program product comprising instructions, characterized in that When the computer program product is run on an upgraded multi-level software system, the upgraded multi-level software system is caused to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an upgraded multi-level software system, the upgraded multi-level software system is caused to execute the method as claimed in any one of claims 1 to 7.