A configuration batch replacement method based on hash cache technology and related device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN THERMAL POWER RES INST CO LTD
- Filing Date
- 2024-09-11
- Publication Date
- 2026-06-30
AI Technical Summary
In the configuration design and commissioning of large thermal power units, the existing technology involves a huge workload for manually replacing the measurement points KKS, which is prone to omissions or errors. Furthermore, the existing automation solutions have long replacement times and consume a lot of system resources under complex configurations, posing safety hazards.
A configuration batch replacement method based on hash caching technology is adopted. By reading the modified measurement point mapping table, the hash table in memory is updated, and the hash table is used to quickly find and replace the KKS in the configuration, including information on IO measurement points, global variable measurement points, and logical page reference measurement points, so as to achieve fast and accurate replacement.
It improves the speed of configuration replacement, reduces system resource consumption, ensures the accuracy and security of replacement, enhances configuration design efficiency, and avoids replacement errors and security risks.
Smart Images

Figure CN119025526B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automatic control technology for thermal power units, and specifically relates to a configuration batch replacement method and related device based on hash caching technology. Background Technology
[0002] Large thermal power units are characterized by complex configuration logic and numerous measurement points (for example, the number of measurement points for a typical 100MW unit can reach 20,000 to 30,000, and the configuration logic can be as many as several thousand pages). During the configuration design and commissioning of the unit (for example, such as the modification, upgrading or maintenance of power plant equipment and systems), global batch replacement of measurement point KKS (power plant unique identifier) or function block KKS is often involved.
[0003] Most existing technical solutions involve manual replacement by engineers to replace specific KKS within the configuration. However, thermal power units are characterized by numerous configuration measurement points, a huge number of logics, and complex control logic. The current manual replacement solution not only suffers from a huge workload but also is prone to omissions or errors in replacement. To further explain, incorrect configurations can lead to significant safety hazards during commissioning and operation of the unit.
[0004] In view of the above, it is imperative to develop an automated batch replacement solution for configuration. Existing batch replacement solutions (for example, replacement solutions based on text editors, replacement solutions based on dedicated software, script-based replacement solutions, etc.) still have the drawbacks of extremely long replacement time and consumption of a lot of system resources during the replacement process when there are a large number of measurement points and high configuration complexity. Summary of the Invention
[0005] The purpose of this invention is to provide a configuration batch replacement method and related apparatus based on hash caching technology to solve one or more of the aforementioned technical problems. The technical solution provided by this invention enables fast and accurate replacement of KKS within the configuration, helping engineers to perform efficient configuration design. Simultaneously, the technical solution disclosed in this invention solves the technical problems of slow configuration replacement speed and excessive system resource consumption in existing technologies, and has high engineering application value.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a configuration batch replacement method based on hash caching technology, comprising the following steps:
[0008] Read the modified measurement point mapping table to obtain all source KKS and target KKS; wherein, the modified measurement point mapping table stores the source KKS of the measurement points and the target KKS corresponding to the source KKS;
[0009] Based on the acquired source KKS and target KKS, the original hash table cached in memory is updated to obtain the updated hash table. The original hash table is obtained by merging the IO (input / output) test point mapping table, the global variable test point mapping table, and the logical page reference test point mapping table. The IO test point mapping table stores IO test point replacement information, the global variable test point mapping table stores global variable test point replacement information, and the logical page reference test point mapping table stores logical page reference test point replacement information. In the updated hash table, the target KKS is supplemented to the corresponding source KKS entry.
[0010] The updated hash table is traversed to perform batch configuration replacement. During configuration replacement, location information is obtained by measuring point type, and then the source KKS in the indexed variable is replaced with the target KKS by indexing the variable with the location information.
[0011] A further improvement to the method of the present invention is that,
[0012] The IO measurement point mapping table is a first hash table that caches IO measurement point replacement information; wherein...
[0013] Use the source KKS of the IO measurement points as the key of the first hash table;
[0014] Combine the node number, branch number, card number, channel number, channel type, and valid flag information of the IO measurement point into a structure, and use the pointer of the structure as the value of the first hash table.
[0015] A further improvement to the method of the present invention is that,
[0016] The global variable measurement point mapping table is a second hash table that caches global variable measurement point replacement information; wherein...
[0017] The source KKS of the global variable measurement point is used as the key of the second hash table;
[0018] The global variable measurement point number, page number, measurement point type, and measurement point validity flag information are combined into a structure, and the pointer of the structure is used as the value of the second hash table.
[0019] A further improvement to the method of the present invention is that,
[0020] The logical page reference test point mapping table is a third hash table that caches logical page reference test point replacement information; wherein...
[0021] The source KKS of the logical page reference test point is used as the key of the third hash table;
[0022] The task level, logical page number, symbol block number, and valid flag information of the test point referenced by the logical page are combined into a structure, and the pointer of the structure is used as the value of the third hash table.
[0023] A further improvement to the method of the present invention is that the step of updating the original hash table cached in memory based on the acquired source KKS and target KKS to obtain the updated hash table specifically includes:
[0024] Iterate through the obtained source KKS and target KKS, update and maintain the items in the original hash table stored in memory, and obtain the updated hash table; where...
[0025] For measurement points where the target KKS is empty, the corresponding measurement point valid flag is set to False;
[0026] For a test point whose target KKS is not empty, obtain the corresponding pointer from the index of the source KKS in the original hash table and obtain the structure storing the test point information based on the pointer. Read the test point type information in the structure and verify the content of the target KKS according to the test point type. If the verification passes, record the valid flag of the test point as True (correct) and write the target KKS into the structure. If the verification fails, record the valid flag of the test point as False (incorrect).
[0027] A further improvement to the method of the present invention is that, in the step of traversing the updated hash table and performing batch configuration replacement,
[0028] For measurement points where the valid flag is True, perform the following steps:
[0029] If the measurement point type is IO measurement point, then read the node number, branch number, card number, channel number and target KKS information of the IO measurement point from the structure, index the node number, branch number, card number and channel number in the read information, and replace the source KKS in the indexed variable with the target KKS;
[0030] If the measurement point type is a global variable measurement point, then read the global variable measurement point number, page number, and target KKS information from the structure, index it according to the number and page number in the read information, and replace the source KKS in the indexed variable with the target KKS.
[0031] If the test point type is a logical page reference test point, then the task level, logical page number, symbol block number, and target KKS information of the test point are read from the structure. Based on the task level, logical page number, and symbol block number read from the information, the source KKS in the indexed variable is replaced with the target KKS.
[0032] A further improvement to the method of the present invention is that, in the step of traversing the updated hash table and performing batch configuration replacement,
[0033] Store the measurement points whose valid flag is False in the error message list and output them.
[0034] A second aspect of the present invention provides a configuration batch replacement system based on hash caching technology, comprising:
[0035] The data reading module is used to read the modified measurement point mapping table and obtain all source KKS and target KKS; wherein, the modified measurement point mapping table stores the source KKS of the measurement points and the target KKS corresponding to the source KKS;
[0036] An update module is used to update the original hash table cached in memory based on the acquired source KKS and target KKS, to obtain an updated hash table. The original hash table is obtained by merging the IO test point mapping table, the global variable test point mapping table, and the logical page reference test point mapping table. The IO test point mapping table stores IO test point replacement information, the global variable test point mapping table stores global variable test point replacement information, and the logical page reference test point mapping table stores logical page reference test point replacement information. In the updated hash table, the target KKS is supplemented to the corresponding source KKS entry.
[0037] The replacement module is used to traverse the updated hash table and perform batch configuration replacement. During configuration replacement, the location information is obtained by the measurement point type, and then the source KKS in the indexed variable is replaced with the target KKS by the location information index variable.
[0038] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the configuration batch replacement method based on hash caching technology as described in any one of the first aspects of the present invention.
[0039] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the configuration batch replacement method based on hash caching technology as described in any one of the first aspects of the present invention.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] To address the challenges of complex logic configurations and massive data volumes in large-scale generator sets, this invention discloses a rapid configuration replacement scheme based on hash caching technology. After importing the user-modified measurement point mapping table, the information in the table is first read to obtain all source KKS and target KKS entries. Then, the source KKS in the measurement point mapping table are mapped to the information cached in memory and stored in the original hash table. The target KKS is used to supplement and update the original hash table, resulting in an updated hash table. Based on the updated hash table, rapid batch replacement of configurations can be achieved. Explained, the measurement point replacement information in this invention is stored using a hash table, enabling rapid updates of the target KKS in the modified measurement point mapping table to the measurement point replacement information in the original hash table. Furthermore, traversing the measurement point replacement data in the updated hash table allows the acquisition of information such as the source KKS, target KKS, and measurement point location for each measurement point. The obtained measurement point location allows direct replacement from source KKS to target KKS, avoiding the problem of repeatedly searching for measurement points in large amounts of data and significantly improving the speed of batch measurement point replacement. In summary, this invention solves the problem of slow configuration replacement speed in existing technical solutions, greatly reduces system resource consumption, and has engineering application value.
[0042] This invention specifically provides a high-information-density cached data format for each hash table. By leveraging the superior performance of hash tables in data insertion, data lookup, and data deletion, the speed of configuration lookup and replacement is greatly improved, while also saving a significant amount of computer resources. Compared with existing methods, the method of this invention has significantly improved operating efficiency and minimizes the use of computer resources. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0044] Figure 1 This is a flowchart illustrating a batch configuration replacement method based on hash caching technology in an embodiment of the present invention.
[0045] Figure 2 This is a schematic diagram of the overall process of a configuration batch replacement method based on hash caching technology in an embodiment of the present invention.
[0046] Figure 3 This is a schematic diagram of a configuration batch replacement system based on hash caching technology in an embodiment of the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0048] Please see Figure 1 In this embodiment of the invention, a configuration batch replacement method based on hash caching technology is provided, including the following steps:
[0049] Step 1: Read the modified measurement point mapping table to obtain all source KKS and target KKS; wherein, the modified measurement point mapping table stores the source KKS of the measurement points and the target KKS corresponding to the source KKS; specifically, the modified measurement point mapping table is a mapping table after the user supplements some or all of the source KKS with target KKS according to the original measurement point mapping table; the original measurement point mapping table only stores the source KKS of the measurement points;
[0050] Step 2: Based on the source KKS and target KKS obtained in Step 1, update the original hash table cached in memory to obtain the updated hash table cached in memory. The original hash table is obtained by merging the IO test point mapping table (i.e., the input / output test point mapping table), the global variable test point mapping table, and the logical page reference test point mapping table. The IO test point mapping table stores IO test point replacement information (i.e., input / output test point replacement information), the global variable test point mapping table stores global variable test point replacement information, and the logical page reference test point mapping table stores logical page reference test point replacement information. In the updated hash table, the target KKS is supplemented to the corresponding source KKS entry.
[0051] Step 3: Traverse the updated hash table obtained in Step 2 and perform batch configuration replacement; wherein, when performing configuration replacement, obtain location information through the measurement point type, and then replace the source KKS in the indexed variable with the target KKS through the location information index variable.
[0052] In this embodiment of the invention, a fast configuration replacement scheme based on hash caching technology is disclosed. After importing the user-modified measurement point mapping table, the information in the measurement point mapping table is first read to obtain all source KKS and target KKS in the table. Then, the source KKS in the measurement point mapping table is mapped to the measurement point replacement information cached in memory and stored in the original hash table. The target KKS is used to supplement and update the measurement point replacement data, resulting in an updated hash table. Based on the updated hash table, fast batch replacement of configurations is finally achieved. Since the measurement point replacement information is stored in a hash table, its lookup time complexity is O(1), which can quickly update the target KKS in the modified measurement point mapping table to the measurement point replacement information in the original hash table. Furthermore, by traversing the measurement point replacement data in the updated hash table, information such as the source KKS, target KKS, and measurement point location of the corresponding measurement point can be obtained. The obtained measurement point location allows for direct replacement from source KKS to target KKS, avoiding the problem of repeatedly searching for measurement points in a large amount of data, and greatly improving the speed of batch measurement point replacement. Specifically, as an example, the technical solution of the present invention can reduce the replacement time to about one-twentieth of the original time.
[0053] In one embodiment of the present invention, the step of obtaining the modified measurement point mapping table in step 1 may include:
[0054] The original measurement point mapping table is exported from the configuration tool, which stores the source KKS of the measurement points; in addition, the location information, type information, and source KKS information of the measurement points can be packaged into measurement point replacement information and cached in the original hash table in memory; interpretably, the original hash table is used for supplementary updates using the target KKS;
[0055] After the original measurement point mapping table is exported, it is modified by the user to specify which measurement points' source KKS should be replaced with the target KKS, resulting in the modified measurement point mapping table.
[0056] The technical solution provided by the embodiments of the present invention can directly realize the fast and accurate replacement of KKS within the configuration based on the modified measurement point mapping table obtained by the user, which can help engineers to carry out efficient configuration design.
[0057] In one embodiment of the present invention, the IO measurement point mapping table is a first hash table that caches IO measurement point replacement information; wherein, the source KKS of the IO measurement point is used as the key of the first hash table; the node number, branch number, card number, channel number, channel type and measurement point validity flag information of the IO measurement point are combined into a structure, and the pointer of the structure is used as the value of the first hash table.
[0058] In a specific and exemplary embodiment of the present invention, the step of obtaining the first hash table may specifically include:
[0059] Step 1: Traverse the devices in the current project. Assume the total number of devices is N1. Initial i1 as 0. i1 represents the i1-th device;
[0060] Step 2: Traverse the nodes under the device device[i1]. Assume the total number of nodes is M1. Initial j1 as 0. j1 represents the j1-th node;
[0061] Step 3: Traverse the branches under the node node[j1]. Assume the total number of measurement points of the branches is K1. Initial k1 as 0. k1 represents the k1-th measurement point;
[0062] Step 4: Traverse the modules under the branch branch[k1]. Assume the total number of modules is T1. Initial t1 as 0. t1 represents the t1-th module;
[0063] Step 5: Traverse all the measurement points under the module module[t1], read the KKS of the measurement points and record it as the source KKS, read the node number, branch number, module number, channel number and channel type where the IO measurement point is located, and cache all the above-mentioned measurement point information into the first hash table; among them, use the source KKS as the key of the first hash table, combine the node number, branch number, module number, channel number, channel type and the measurement point valid flag bit information into a structure, and use the pointer of the structure as the value of the first hash table;
[0064] Step 6: Execute t1 = t1 + 1. If t1 < T1, return to Step 5;
[0065] Step 7: Execute k1 = k1 + 1. If k1 < K1, execute Step 4;
[0066] Step 8: Execute j1 = j1 + 1. If j1 < M1, execute Step 3;
[0067] Step 9: Execute i1 = i1 + 1. If i1 < N1, execute Step 2;
[0068] Step 10: Mark the IO measurement point mapping table as Table1 and temporarily store it in the memory for later use.
[0069] In an embodiment of the present invention, the global variable measurement point mapping table is a second hash table cached with global variable measurement point replacement information; among them, use the source KKS of the global variable measurement point as the key of the second hash table; combine the number, page number, measurement point type and measurement point valid flag bit information of the global variable measurement point into a structure, and use the pointer of the structure as the value of the second hash table.
[0070] Specifically, in an exemplary embodiment of the present invention, the steps for obtaining the second hash table may include:
[0071] Step 1): Traverse the devices under the current project;
[0072] Step 2): Traverse all global variable measurement points under the device and cache the measurement point information of the global variable measurement points in the second hash table; wherein, read the KKS of the global variable measurement point and mark it as the source KKS, use the source KKS as the key of the second hash table, combine the number of the global variable measurement point, the page number, the global variable type and the measurement point validity flag information into a structure, and use the pointer of the structure as the value of the second hash table;
[0073] Step 3): Mark the global variable measurement point mapping table as Table2 and store it in memory for later use.
[0074] In one embodiment of the present invention, the logical page reference test point mapping table is a third hash table that caches logical page reference test point replacement information; wherein, the source KKS of the logical page reference test point is used as the key of the third hash table; the task level, logical page number, symbol block number and test point validity flag information of the logical page reference test point are combined into a structure, and the pointer of the structure is used as the value of the third hash table.
[0075] Specifically, in an exemplary embodiment of the present invention, the step of obtaining the third hash table may include:
[0076] Step (1): Traverse the devices under the current project. Assume the total number of devices is N2. Let i2 be 0 initially, where i2 represents the i2th device.
[0077] Step (2): Traverse the tasks under device[i2]. Assume the total number of tasks is M2. Let j2 be 0 initially, where j2 represents the j2th task.
[0078] Step (3): Traverse the logical pages under Task[j2]. Assume the total number of logical pages is T2. Let t2 be initially 0, where t2 represents the t2th logical page.
[0079] Step (4): Traverse all symbol blocks under logical page Page[t2] and determine whether the symbol block has a test point KKS; where,
[0080] If the measurement point KKS does not exist, continue to check the next symbol block;
[0081] If a test point KKS exists, read the test point KKS, task level, logical page number, symbol block number, and test point type. Mark the test point KKS as the source KKS. Use the source KKS as the key of the third hash table. Combine the task level, logical page number, symbol block number, and test point validity flag into a structure. Use the pointer of the structure as the value of the third hash table. Continue to check the next function block until the current logical page has been traversed.
[0082] Step (5): If t2 < T2, then set t2 = t2 + 1, and return to Step (4);
[0083] Step (6): If j2 < M2, then set j2 = j2 + 1, and return to Step (3);
[0084] Step (7): If i2 < N2, then set i2 = i2 + 1, and return to Step (2);
[0085] Step (8): Temporarily store the logical page reference measurement point mapping table as Table3 in the memory for future use.
[0086] In the technical solution provided by the embodiment of the present invention, a scheme for obtaining the original hash table is specifically given, which provides support for the subsequent fast replacement scheme. Explanatorily, the hash table can perform a hash operation on the key and a modulo operation, and then use the obtained hash value as the index value of the corresponding data. It is an excellent data structure that can achieve fast insertion, search, and deletion of data; the technical solution of the present invention, through reasonable abstraction of the configuration data, extracts the key information that can express the configuration elements, compresses it into bytes and stores it in the hash table, solving the problems of low efficiency, large memory resource occupation, and a large waste of computer system memory resources and computing resources in the previous configuration search and replacement methods.
[0087] Specifically exemplarily in the embodiment of the present invention, after merging the generated Table1, Table2, and Table3, the original hash table is obtained; among them, the original hash table can be exported as a mapping table, and each item in the mapping table is the key corresponding to the hash table, and it is necessary to perform a duplicate removal operation on the content in the mapping table.
[0088] In an embodiment of the present invention, Step 2 specifically includes the following steps:
[0089] Traverse the source KKS and the target KKS obtained in Step 1, and use the target KKS to update and maintain the items in the original hash table stored in the memory to obtain the updated hash table;
[0090] Among them,
[0091] For the measurement points with the target KKS being empty, record the measurement point valid flag corresponding to the measurement point as False;
[0092] For a test point whose target KKS is not empty, the corresponding pointer is obtained by indexing the source KKS in the original hash table, and the structure storing the test point information is obtained by the pointer. The test point type information in the structure is read, and the content of the target KKS is verified according to the test point type. If the verification passes, the valid flag of the test point is marked as True and the target KKS is written into the structure storing the test point information. If the verification fails, the valid flag of the test point is marked as False.
[0093] In one embodiment of the present invention, step 3 specifically includes the following steps:
[0094] Traverse the updated hash table and perform batch configuration replacement; wherein,
[0095] For measurement points where the valid flag is True, perform the following steps:
[0096] If the measurement point type is a global variable measurement point, then read the global variable measurement point number, page number, and target KKS from the structure storing measurement point information, index it according to the number and page number, and replace the indexed variable according to the target KKS.
[0097] If the measurement point type is IO measurement point, then read the node number, branch number, card number, channel number and target KKS information of the IO measurement point from the measurement point information structure, directly index according to the node number, branch number, card number and channel number information, and replace the indexed variables according to the target KKS.
[0098] If the measurement point type is a logical page reference measurement point, then the task level, logical page number, symbol block number, and target KKS information of the measurement point are read from the measurement point information structure, indexed according to the task level, logical page number, and symbol block number, and the indexed variables are replaced according to the target KKS.
[0099] Please see Figure 2 In a specific embodiment of the present invention, a configuration batch replacement method based on a hash cache model is provided, which specifically includes the following steps:
[0100] Generate an IO measurement point mapping table and save the IO measurement point information to the first hash table; generate a global variable measurement point mapping table and save the global variable measurement point information to the second hash table; generate a logical page reference measurement point mapping table and save the logical page reference measurement point information to the third hash table; merge the first hash table, the second hash table, and the third hash table to obtain the original hash table;
[0101] Read the modified mapping table modified by the user, and read all source KKS and target KKS items according to the mapping relationship in the mapping table; traverse the source KKS and target KKS, and update the original hash table; if the target KKS is empty, it means that the current test point will not be replaced, and the test point valid flag is recorded as False, and the next item is checked; if the target KKS is not empty, then according to the source KKS, index the pointer of the corresponding test point information in the original hash table (the time complexity of hash table lookup is O(1), which can ensure that the source KKS can quickly find the information of the replacement test point), and according to the found pointer, quickly obtain the result of storing the test point information in memory. The system reads the measurement point type field from the measurement point information structure and verifies the content of the target KKS based on the measurement point type. Explained, in the configuration design, different types of measurement points have different requirements for KKS length and format. If the measurement point KKS verification passes, the measurement point validity flag is set to True and the target KKS is written into the measurement point information structure; if the measurement point KKS verification fails, the measurement point validity flag is set to False. Furthermore, error messages can be cached in the error message queue. The system iterates through the measurement points in the original hash table, reads the mapping table, fully maintains the information of the original hash table in memory, and obtains the updated hash table.
[0102] Based on the updated hash table, batch configuration replacement is performed. If the valid flag of a measurement point is True, further replacement is performed according to the measurement type. Specifically, if the measurement point type is an IO measurement point, the node number, branch number, card number, channel number, and target KKS of the IO measurement point are read from the measurement point information structure. The indexed IO measurement points are then replaced according to the target KKS. If the measurement point type is a global variable measurement point, the global variable measurement point number, page number, and target KKS are read from the measurement point information structure. The variable is indexed directly according to its number and page number, and the indexed variable is replaced according to the target KKS. If the measurement point type is a logical page reference measurement point, the task level, logical page number, symbol block number, and target KKS of the measurement point are read from the measurement point information structure. The variable is indexed directly according to its task level, logical page number, and symbol block number, and the indexed variable is replaced according to the target KKS.
[0103] In a further optimized solution, it is determined whether the error message queue is empty. If it is not empty, the contents of the error message list are displayed to provide a prompt to the user.
[0104] The technical solution provided by this invention enables rapid and accurate replacement of KKS within the configuration, assisting engineers in efficient configuration design and avoiding the drawbacks of slow replacement processes, replacement errors, reduced configuration design efficiency, and compromised configuration security. While ensuring high replacement speed, the technical solution also guarantees that the target content being replaced conforms to the specifications of the logical configuration and system requirements, preventing the replacement of illegal content into the configuration and eliminating safety hazards. In summary, the technical solution of this invention can significantly improve the efficiency and accuracy of KKS replacement in the configuration design of large thermal power units, providing strong support for the safe and efficient operation of power plants. It is also of great significance for improving the configuration design efficiency of engineers and ensuring configuration security.
[0105] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments, please refer to the embodiments of the method of the present invention.
[0106] Please see Figure 3 In this embodiment of the invention, a configuration batch replacement system based on hash caching technology is provided, comprising:
[0107] The data reading module is used to read the modified measurement point mapping table and obtain all source KKS and target KKS; wherein, the modified measurement point mapping table stores the source KKS of the measurement points and the target KKS corresponding to the source KKS;
[0108] An update module is used to update the original hash table cached in memory based on the acquired source KKS and target KKS, to obtain an updated hash table. The original hash table is obtained by merging the IO test point mapping table, the global variable test point mapping table, and the logical page reference test point mapping table. The IO test point mapping table stores IO test point replacement information, the global variable test point mapping table stores global variable test point replacement information, and the logical page reference test point mapping table stores logical page reference test point replacement information. In the updated hash table, the target KKS is supplemented to the corresponding source KKS entry.
[0109] The replacement module is used to traverse the updated hash table and perform batch configuration replacement. During configuration replacement, the location information is obtained by the measurement point type, and then the source KKS in the indexed variable is replaced with the target KKS by the location information index variable.
[0110] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions from the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment can be used to execute a configuration batch replacement method based on hash caching technology.
[0111] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the operating system of the terminal. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the configuration batch replacement method based on hash caching technology in the above embodiments.
[0112] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0113] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0115] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A configuration batch replacement method based on hash caching technology, characterized in that, Includes the following steps: Read the modified measurement point mapping table to obtain all source KKS and target KKS; wherein, the modified measurement point mapping table stores the source KKS of the measurement points and the target KKS corresponding to the source KKS; Based on the acquired source KKS and target KKS, the original hash table cached in memory is updated to obtain the updated hash table. The original hash table is obtained by merging the IO test point mapping table, the global variable test point mapping table, and the logical page reference test point mapping table. The IO test point mapping table stores IO test point replacement information, the global variable test point mapping table stores global variable test point replacement information, and the logical page reference test point mapping table stores logical page reference test point replacement information. In the updated hash table, the target KKS is supplemented to the corresponding source KKS entry. The updated hash table is traversed to perform batch configuration replacement. During configuration replacement, location information is obtained by measuring point type, and then the source KKS in the indexed variable is replaced with the target KKS by indexing the variable with the location information.
2. The configuration batch replacement method based on hash caching technology according to claim 1, characterized in that, The IO measurement point mapping table is a first hash table that caches IO measurement point replacement information; wherein... Use the source KKS of the IO measurement points as the key of the first hash table; Combine the node number, branch number, card number, channel number, channel type, and valid flag information of the IO measurement point into a structure, and use the pointer of the structure as the value of the first hash table.
3. The configuration batch replacement method based on hash caching technology according to claim 2, characterized in that, The global variable measurement point mapping table is a second hash table that caches global variable measurement point replacement information; wherein... The source KKS of the global variable measurement point is used as the key of the second hash table; The global variable measurement point number, page number, measurement point type, and measurement point validity flag information are combined into a structure, and the pointer of the structure is used as the value of the second hash table.
4. The configuration batch replacement method based on hash caching technology according to claim 3, characterized in that, The logical page reference test point mapping table is a third hash table that caches logical page reference test point replacement information; wherein... The source KKS of the logical page reference test point is used as the key of the third hash table; The task level, logical page number, symbol block number, and valid flag information of the test point referenced by the logical page are combined into a structure, and the pointer of the structure is used as the value of the third hash table.
5. The configuration batch replacement method based on hash caching technology according to claim 4, characterized in that, The step of updating the original hash table cached in memory based on the obtained source KKS and target KKS to obtain the updated hash table specifically includes: Iterate through the obtained source KKS and target KKS, update and maintain the items in the original hash table stored in memory, and obtain the updated hash table; where... For measurement points where the target KKS is empty, the corresponding measurement point valid flag is set to False; For a test point whose target KKS is not empty, obtain the corresponding pointer from the index of the source KKS in the original hash table, and obtain the structure storing the test point information based on the pointer. Read the test point type information in the structure and verify the content of the target KKS according to the test point type. If the verification passes, mark the valid flag of the test point as True and write the target KKS into the structure. If the verification fails, mark the valid flag of the test point as False.
6. The configuration batch replacement method based on hash caching technology according to claim 5, characterized in that, In the step of traversing the updated hash table and performing batch configuration replacement... For measurement points where the valid flag is True, perform the following steps: If the measurement point type is IO measurement point, then read the node number, branch number, card number, channel number and target KKS information of the IO measurement point from the structure, index the node number, branch number, card number and channel number in the read information, and replace the source KKS in the indexed variable with the target KKS; If the measurement point type is a global variable measurement point, then read the global variable measurement point number, page number, and target KKS information from the structure, index it according to the number and page number in the read information, and replace the source KKS in the indexed variable with the target KKS. If the test point type is a logical page reference test point, then the task level, logical page number, symbol block number, and target KKS information of the test point are read from the structure. Based on the task level, logical page number, and symbol block number read from the information, the source KKS in the indexed variable is replaced with the target KKS.
7. The configuration batch replacement method based on hash caching technology according to claim 5, characterized in that, In the step of traversing the updated hash table and performing batch configuration replacement... Store the measurement points whose valid flag is False in the error message list and output them.
8. A configuration batch replacement system based on hash caching technology, characterized in that, include: The data reading module is used to read the modified measurement point mapping table and obtain all source KKS and target KKS; wherein, the modified measurement point mapping table stores the source KKS of the measurement points and the target KKS corresponding to the source KKS; An update module is used to update the original hash table cached in memory based on the acquired source KKS and target KKS, to obtain an updated hash table. The original hash table is obtained by merging the IO test point mapping table, the global variable test point mapping table, and the logical page reference test point mapping table. The IO test point mapping table stores IO test point replacement information, the global variable test point mapping table stores global variable test point replacement information, and the logical page reference test point mapping table stores logical page reference test point replacement information. In the updated hash table, the target KKS is supplemented to the corresponding source KKS entry. The replacement module is used to traverse the updated hash table and perform batch configuration replacement. During configuration replacement, the location information is obtained by the measurement point type, and then the source KKS in the indexed variable is replaced with the target KKS by the location information index variable.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the configuration batch replacement method based on hash caching technology as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the configuration batch replacement method based on hash caching technology as described in any one of claims 1 to 7.