CN113900853A - Method, device and equipment for checking direct current control protection program and storage medium - Google Patents

Method, device and equipment for checking direct current control protection program and storage medium Download PDF

Info

Publication number
CN113900853A
CN113900853A CN202111292935.8A CN202111292935A CN113900853A CN 113900853 A CN113900853 A CN 113900853A CN 202111292935 A CN202111292935 A CN 202111292935A CN 113900853 A CN113900853 A CN 113900853A
Authority
CN
China
Prior art keywords
program
page
target program
linked list
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111292935.8A
Other languages
Chinese (zh)
Inventor
张子聪
孙豪
杨光
丁丙侯
李少森
朱盛强
黄剑湘
刘超
付天乙
梁钰华
何照能
孙靖铷
赵世伟
王加磊
敬官欣
崔萌
李荣涛
任君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunming Bureau of Extra High Voltage Power Transmission Co
Original Assignee
Kunming Bureau of Extra High Voltage Power Transmission Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kunming Bureau of Extra High Voltage Power Transmission Co filed Critical Kunming Bureau of Extra High Voltage Power Transmission Co
Priority to CN202111292935.8A priority Critical patent/CN113900853A/en
Publication of CN113900853A publication Critical patent/CN113900853A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a method, a device, equipment and a storage medium for checking a direct current control protection program, and belongs to the technical field of power grid control. The direct current control protection method comprises the following steps: acquiring a target program and a reference program of the target program, wherein the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules; aiming at each function module in each program page in the target program and the reference program, sequencing each function module and constructing a topological structure of each function module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables; and calling a preset check script, determining a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determining difference information in the difference page. The method for verifying the direct-current control protection program can improve the efficiency and accuracy of verifying the direct-current control protection program.

Description

Method, device and equipment for checking direct current control protection program and storage medium
Technical Field
The invention relates to the field of power grid control, in particular to a method, a device, equipment and a storage medium for checking a direct current control protection program.
Background
At present, a dc control protection program in a dc control protection system is large in scale and complex in logic, and in order to adapt to the ever-evolving actual requirements, the dc control protection program needs to be modified and updated, and details of each program will have a great influence on the whole system. Therefore, the dc control protection program needs to be verified to obtain specific modification details of the dc control protection program, so as to ensure the normal operation of the dc control protection system.
In the prior art, the comparison and verification are generally performed manually according to the program modification records. However, the manual verification method consumes a large amount of human resources on one hand; on the other hand, the manual operation is easily affected by environmental factors or personal factors, which causes conditions such as version rollback, additional modification, missing modification, and the like, thereby causing verification errors.
Therefore, how to provide a method for checking a dc control protection program, which can improve the efficiency and accuracy of checking the dc control protection program, is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
Based on the above, the invention provides a method, a device, equipment and a storage medium for checking a direct current control protection program, which can improve the efficiency and accuracy of checking the direct current control protection program.
In a first aspect of the embodiments of the present application, a method for checking a dc control protection program is provided, where the method includes: acquiring a target program and a reference program of the target program, wherein the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules;
aiming at each function module in each program page in the target program and the reference program, sequencing each function module and constructing a topological structure of each function module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables;
and calling a preset check script, determining a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determining difference information in the difference page.
In one embodiment, for each function module in each program page in the target program and the reference program, sorting the function modules and constructing a topology structure of each function module to obtain a plurality of target program page linked lists and a plurality of reference program page linked lists, the method includes:
acquiring the coordinate position of each functional module on the program page to which the functional module belongs, and sequencing each functional module according to the coordinate position of the functional module;
and aiming at the sequenced functional modules, acquiring the connection relation of the functional modules, constructing a topological structure among the functional modules, and acquiring a plurality of target program page chain tables and a plurality of reference program page chain tables.
In one embodiment, the determining the difference page of the target program according to whether the corresponding position data of the target program page linked list and the reference program page linked list is the same includes:
calling a first pre-stored verification script, and determining a matching page pair according to the corresponding relation between the target identification information of each target program page and the reference identification information of each reference program page;
and calling a pre-stored second check script, and determining a difference page of the target program according to whether corresponding position data of the page chain table of the target program and the page chain table of the reference program are the same in the same matching page pair.
In one embodiment, calling a second pre-stored check script, and determining a difference page of the target program according to whether corresponding position data of the page chain table of the target program and the page chain table of the reference program are the same in the same matching page pair, includes:
calling a pre-stored second check script, and respectively calculating a CRC (cyclic redundancy check) code of a target program page linked list and a CRC code of a reference program page linked list;
and in the same matching page pair, judging whether the CRC check code of the target program page linked list is the same as the CRC check code of the reference program page linked list, and if not, determining the target program page as a difference page.
In one embodiment, the page data linked list includes a plurality of character strings, and the calculating of the CRC check code of the target program page linked list and the CRC check code of the reference program page linked list respectively includes:
selecting a character string to be verified aiming at a target program page linked list and a reference program page linked list;
and converting the character string to be checked into arrays with bytes as units, and respectively calculating the CRC check code of the page linked list of the target program and the CRC check code of the page linked list of the reference program according to the arrays.
In one embodiment, determining difference information in a difference page includes:
according to the page chain table of the difference page and the page chain table of the reference program corresponding to the difference page, splitting the page chain table into a plurality of sub-chain tables according to the connection relation of each functional module;
matching the sublinks in the same matching page according to a preset matching model to obtain a sublink pair;
and comparing the data in the matched sublink list pair to determine the difference information of the target program.
In one embodiment, the method further comprises: and marking the difference information, and storing the difference information in a classified manner.
In a second aspect of the embodiments of the present application, a device for checking a dc control protection program is provided, where the device includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a target program and a reference program of the target program, the target program and the reference program both comprise a plurality of program pages, and each program page comprises a plurality of functional modules;
the processing module is used for sequencing the functional modules and constructing a topological structure of the functional modules aiming at the functional modules in the program pages in the target program and the reference program to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables;
and the determining module is used for calling a preset checking script, determining a difference page of the target program according to whether the corresponding position data of the target program page linked list and the reference program page linked list are the same or not, and determining difference information in the difference page.
A third aspect of the embodiments of the present application provides a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, implements the method for checking the dc control protection program according to the first aspect of the embodiments of the present application.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, may implement the method for checking a dc control protection program according to the first aspect of the embodiments of the present application.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
according to the verification method for the direct-current control protection program, the target program and the reference program of the target program are obtained, the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules; aiming at each function module in each program page in the target program and the reference program, sequencing each function module and constructing a topological structure of each function module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables; and calling a preset check script, determining a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determining difference information in the difference page. According to the method for checking the direct current control protection program, the pre-stored check script is called to check the direct current control protection program, compared with the mode that the direct current control protection program is checked manually in the prior art, the method can improve the checking efficiency, can avoid checking errors caused by self or environmental influences in the manual checking process, and can save a large amount of human resources.
Drawings
Fig. 1 is a flowchart of a method for checking a dc control protection program according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a technical process of ordering the function modules and constructing a topology structure of the function modules to obtain a plurality of target program page links and a plurality of reference program page links for each function module in each program page in the target program and the reference program according to the embodiment of the present application;
FIG. 3 is a logic diagram of a sorting method according to an embodiment of the present application;
fig. 4 is a flowchart of a technical process for determining a difference page of a target program according to whether corresponding position data of a page chain table of the target program and a page chain table of a reference program are the same according to an embodiment of the present application;
fig. 5 is a flowchart of a technical process of calling a pre-stored second check script to determine a difference page of a target program according to whether corresponding position data of a page chain table of the target program and a page chain table of a reference program are the same in the same matching page pair according to an embodiment of the present application;
fig. 6 is a flowchart of a technical process for calculating a CRC check code of a page chain table of a target program and a CRC check code of a page chain table of a reference program respectively according to an embodiment of the present application;
FIG. 7 is a flowchart of a technical process for determining difference information in a difference page according to an embodiment of the present application;
fig. 8 is a flowchart illustrating a design of a page check code of a dc control protection program according to an embodiment of the present application;
fig. 9 is a schematic diagram illustrating a comparison of difference information according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a difference information display provided by an embodiment of the present application;
fig. 11 is a structural diagram of a verification apparatus for a dc control protection program according to an embodiment of the present application;
fig. 12 is a schematic internal structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
At present, a dc control protection program in a dc control protection system is large in scale and complex in logic, and in order to adapt to the ever-evolving actual requirements, the dc control protection program needs to be modified and updated, and details of each program will have a great influence on the whole system. Therefore, the dc control protection program needs to be verified to obtain specific modification details of the dc control protection program, so as to ensure the normal operation of the dc control protection system.
In the prior art, the comparison and verification are generally performed manually according to the program modification records. However, the manual verification method consumes a large amount of human resources on one hand; on the other hand, the manual operation is easily affected by environmental factors or personal factors, which causes conditions such as version rollback, additional modification, missing modification, and the like, thereby causing verification errors.
Therefore, how to provide a method for checking a dc control protection program, which can improve the efficiency and accuracy of checking the dc control protection program, is a technical problem that needs to be solved by those skilled in the art.
Based on this, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for checking a dc control protection program, which can improve checking efficiency and accuracy of the dc control protection program.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 1, a method for checking a dc control protection program according to an embodiment of the present application is shown, where the method includes the following steps:
and step 101, acquiring a target program and a reference program of the target program.
The target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules. The target program is the updated direct current control protection program, and the reference program is the direct current control protection program before updating.
Optionally, the direct current control protection program may be a Viget software, and the accuracy verification of the vidps format program of the Viget software in the downloading and installing process can be realized according to the application.
It can be understood that the dc control protection program in the dc control protection system is huge in scale, and can be generally divided into thousands of program pages, each program page has tens of functional modules, and each functional module has an internal function.
And 102, aiming at each function module in each program page in the target program and the reference program, sequencing each function module and constructing a topological structure of each function module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables.
And according to the input and output numbers among the internal functions in each functional module and the corresponding connection relation, corresponding to the directed connecting lines of each functional module, so that the functional modules in each program page are connected into a topological structure. That is, the whole dc control protection program is set as a topology structure composed of a large-scale functional module and a directed connection line, each functional module is a vertex combination of the topology structure, and a plurality of target program page link lists and a plurality of reference program page link lists are obtained according to the topology structures of the target program and the reference program.
Step 103, calling a preset verification script, determining a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determining difference information in the difference page.
And judging whether the corresponding position data of the target program page linked list and the reference program page linked list are the same or not through a preset check script, if the corresponding position data of the target program page linked list and the reference program page linked list are different, determining the program page as a difference page, and determining the target program information in the position as difference information.
According to the verification method for the direct-current control protection program, the target program and the reference program of the target program are obtained, the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules; aiming at each function module in each program page in the target program and the reference program, sequencing each function module and constructing a topological structure of each function module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables; and calling a preset check script, determining a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determining difference information in the difference page. According to the method for checking the direct current control protection program, the pre-stored check script is called to check the direct current control protection program, compared with the mode that the direct current control protection program is checked manually in the prior art, the method can improve the checking efficiency, can avoid checking errors caused by self or environmental influences in the manual checking process, and can save a large amount of human resources.
As shown in fig. 2, an embodiment of the present application provides a technical process for sequencing function modules and constructing a topology structure of the function modules for each function module in each program page in a target program and a reference program to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables, where the technical process includes the following steps:
step 201, obtaining the coordinate position of each function module on the program page to which the function module belongs, and sequencing each function module according to the coordinate position of the function module.
Step 202, aiming at the sorted functional modules, obtaining the connection relation of each functional module, and constructing a topological structure between each functional module to obtain a plurality of target program page linked lists and a plurality of reference program page linked lists.
By acquiring the coordinate position of each function module on a program page, sequencing each function module according to the coordinate position of the function module, acquiring the connection relation of each function module for the sequenced function modules, and constructing the topological structure among the function modules, a plurality of program page chain tables and a plurality of reference program page chain tables can be obtained.
The conventional topological sorting adopts a traversal method based on breadth-first or depth-first to sort the nodes of the graph, and classical topological sorting algorithms include a Kahn algorithm, a kruskal algorithm and the like. Compared with a conventional graph traversal sorting algorithm, the topological sorting algorithm based on position vision and data flow dependence is designed according to the characteristics of a visual page program, the method is firstly based on the initial sorting of symbols at the coordinate position of a page, then the sorting is carried out according to the dependency relationship of data flows among the symbols in a breadth-first traversal principle, the logic sequence of the sorting is shown in figure 3, and the sorting efficiency can be improved through the method.
As shown in fig. 4, an embodiment of the present application provides a technical process for determining a difference page of a target program according to whether corresponding position data of a target program page linked list and a reference program page linked list are the same, where the target program page includes target identification information, and the reference program page includes reference identification information, and the technical process includes the following steps:
step 401, calling a first pre-stored verification script, and determining a matching page pair according to a corresponding relationship between the target identification information of each target program page and the reference identification information of each reference program page.
In the verification process, the pages of the reference program corresponding to the pages in the target program respectively need to be determined, so that the matching page pairs can be determined according to the corresponding relation between the target identification information of the pages of the target program and the reference identification information of the pages of the reference program by calling the pre-stored first verification script.
And step 402, calling a pre-stored second check script, and determining a difference page of the target program according to whether corresponding position data of the target program page chain table and the reference program page chain table are the same in the same matching page pair.
And after the matched page pair is determined, calling a pre-stored second check script, and determining a difference page of the target program according to whether corresponding position data of the page chain table of the target program and the page chain table of the reference program are the same in the same matched page pair.
According to the method and the device, the pre-stored check script is called, the matching page pair can be determined through the pre-stored first check script, then the difference page of the target program is determined in the matched page pair through the pre-stored second check script, compared with a mode that the check is carried out on the DC control protection program manually in the prior art, the method and the device can improve the check efficiency, check errors caused by self or environmental influences in the manual check process can be avoided, and meanwhile, a large amount of human resources can be saved.
As shown in fig. 5, an embodiment of the present application provides a technical process for calling a pre-stored second check script, and determining a difference page of a target program according to whether corresponding position data of a target program page chain table and a reference program page chain table are the same in a same matching page pair, where the technical process includes the following steps:
and step 501, calling a pre-stored second check script, and respectively calculating the CRC check code of the target program page linked list and the CRC check code of the reference program page linked list.
Step 502, in the same matching page pair, judging whether the CRC check code of the target program page linked list is the same as the CRC check code of the reference program page linked list, if not, determining the target program page as a difference page.
It should be noted that, in the process of determining the difference page, the difference page may be determined by respectively calculating the CRC check code of the page linked list of the target program and the CRC check code of the page linked list of the reference program, and comparing whether the CRC check codes in the matched page pair are the same, so that the determination efficiency of the difference page may be improved.
As shown in fig. 6, an embodiment of the present application provides a technical process for calculating a CRC check code of a target program page linked list and a CRC check code of a reference program page linked list, respectively, where the technical process includes the following steps:
601, selecting character strings to be checked aiming at a target program page linked list and a reference program page linked list;
step 602, converting the character string to be checked into arrays with bytes as units, and respectively calculating the CRC check code of the page linked list of the target program and the CRC check code of the page linked list of the reference program according to the arrays.
Optionally, the generated check code may be stored in a list file according to a specific format, so that a user may visually compare whether the check code is consistent to check whether the programs loaded in different CPUs are completely consistent.
It should be noted that, in the process of verifying the target program page, not all data in the program page are verified, but a specific character string is selected for verification according to a preset selection rule. The factors influencing the verification result in the verification code generation process are shown in the following tables 1 and 2, respectively.
TABLE 1 factors affecting the verification results
Figure BDA0003335567180000091
TABLE 2 factors not affecting the verification results
Figure BDA0003335567180000092
Figure BDA0003335567180000101
As shown in fig. 7, an embodiment of the present application provides a technical process for determining difference information in a difference page, where the technical process includes the following steps:
and 701, splitting the page linked list into a plurality of sub-link lists respectively according to the connection relation of each functional module aiming at the page linked list of the difference page and the page linked list of the reference program corresponding to the difference page.
And step 702, performing matching processing on the sublinks in the same matching page pair according to a preset matching model to obtain a sublink pair.
And step 703, comparing the data in the sublink pairs to determine the difference information of the target program.
When the difference information is compared through the page linked list, the page linked list can be split into a plurality of sub-link list pairs according to the direct connection relation of the functional modules, the split sub-link list pairs are matched according to a preset matching model to obtain the matched sub-link list pairs, the data in the sub-link list pairs are compared, the difference information of the target program is determined, and therefore the data comparison efficiency can be improved.
In one embodiment, the method further comprises: and marking the difference information, and storing the difference information in a classified manner.
In practical application, the searched difference information is also marked and classified and stored according to the marked category, so that subsequent data searching is facilitated.
The whole difference, the local difference, the addition and the deletion of the nodes, the difference between the substructures and the change of the attribute value of the entity object of each program structure are compared in sequence, the same degrees of page numbers, function blocks and pin connections are compared in sequence, the program difference is stored in an EXCEL table according to a specific content format, field program maintenance personnel are helped to compare the program difference visually, the workload of the field working personnel is greatly reduced, the working efficiency is improved, the correctness of a check result is ensured, the power failure window time applied for program updating is shortened, and the maintenance cost of a direct current power transmission system is saved.
The embodiment of the application also provides a method for checking the direct current control protection program, which comprises the following steps:
(1) the method comprises the steps of obtaining a target program and a reference program of the target program, wherein the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules.
(2) And acquiring the coordinate position of each function module in the program page to which each function module belongs aiming at each function module in each program page in the target program and the reference program, and sequencing each function module according to the coordinate position of each function module.
(3) And aiming at the sequenced functional modules, acquiring the connection relation of the functional modules, constructing a topological structure among the functional modules, and acquiring a plurality of target program page chain tables and a plurality of reference program page chain tables.
(4) And calling a first pre-stored verification script, and determining a matching page pair according to the corresponding relation between the target identification information of each target program page and the reference identification information of each reference program page.
(5) And calling a pre-stored second check script, and selecting a character string to be checked aiming at the target program page linked list and the reference program page linked list.
(6) And converting the character string to be checked into arrays with bytes as units, and respectively calculating the CRC check code of the page linked list of the target program and the CRC check code of the page linked list of the reference program according to the arrays.
(7) And in the same matching page pair, judging whether the CRC check code of the target program page linked list is the same as the CRC check code of the reference program page linked list, and if not, determining the target program page as a difference page.
(8) And splitting the page linked list into a plurality of sub-link lists respectively according to the connection relation of each functional module aiming at the page linked list of the difference page and the page linked list of the reference program corresponding to the difference page.
(9) And matching the sublinks in the same matching page pair according to a preset matching model to obtain a sublink pair.
(10) And comparing the data in the sublink pairs to determine the difference information of the target program.
(11) And marking the difference information, and storing the difference information in a classified manner.
In practical application, a data file of an application program page is read into a memory to form a memory data structure. The method comprises the steps of establishing calling relations among modules and between variables and modules, then comprehensively considering the calling relations, constructing a model structure for realizing the whole function, obtaining a linear relation between input variables and output variables, then reading a visual page, analyzing a data flow relation among symbols, and carrying out topological sequencing on the symbols in the page, wherein the step is a precursor step of consistency check and difference analysis.
By analyzing key factors influencing the logic of the application program, including the execution sequence of the function blocks, the attributes of the function blocks, the increase and decrease of the function blocks and the like, which are all factors influencing the behavior logic of the program, the factors which do not influence the application logic are removed, on the basis, a general intermediate code without influence factors is generated according to the ordered data linked list, and the characteristic analysis and calculation are carried out on the intermediate code, so that a unique check code of the program page is generated; externally connecting an input/output call relation based on a control logic module, constructing a model structure which embodies the whole function of a visual page of a control and protection program, and mapping between module nodes and the connection relation thereof in the visual page and a directed acyclic graph data structure; and based on a topological sorting algorithm of the directed acyclic graph, sorting the logical module connection relation adaptive to uniqueness check is realized, and an execution sequence table for representing the logical module connection relation is formed. And extracting a module with an externally connected output point in the page as an end point module of the data chain. And sequentially traversing each terminal module in the page by adopting a breadth-first traversal method, backtracking to the precursor module through a connecting line of the module input points, and summarizing all traversed modules to form a complete data chain of the current program.
In the process of calculating the CRC, summarizing the module name and the initial value of the module pin variable in each data chain path to obtain the calling logic operation expression and the attribute setting information of the output variable, and combining to form a character string containing specific data information.
Converting the character string and outputting a check code: firstly, the character string is converted into an array with bytes as units, each byte is respectively output to carry out cyclic check one by one, and finally the CRC check code is exclusive OR (exclusive OR result is set as n) with the byte after the high 8-bit left shift of the source CRC check code (initially 0, which can be regarded as 0000, 0000, 0000 and 0000). The 16 bits obtained by looking up the table to obtain the exclusive or of the value of the nth bit (the value is 16 bits) and the "source CRC check code" are the "CRC check code", the "CRC check code" just obtained is assigned to the "source CRC check code", the check of the next byte is continued until the check of the last byte is completed to obtain the "CRC check code", which is the "final CRC check code" of the character string, and finally the CRC is formed as the check code of the control protection program page, and the design flow chart is shown in fig. 8.
In the comparison of the direct current control protection program, the overall difference and the local difference of the structure, the addition and deletion of the nodes, the difference between the substructures and the change of the attribute value of the entity object are analyzed, and the acquisition of difference information is realized; firstly, determining a node matching principle of an ultra-high voltage direct current control protection program visual page, and analyzing a data chain based on a binary decomposition tree structure in comparison of control protection programs of different versions to obtain overall differences, local differences, differences among node addition, node deletion and substructures and attribute value changes of entity objects; on the basis of the page ordered data list, according to the logical relationship between the modules, the binary decomposition tree structure of one page is divided into one or a plurality of independent execution call chains without logical relationship, the matching degree of the execution call chains of two pages to be compared is analyzed, the weighted calculation is carried out according to the preset weight, and the execution matching chains which correspond to each other and are optimal are found. Comparing the elements of the optimally matched execution call chain, sequentially comparing the attributes, variables, connection relations, execution orders and the like of the elements, and setting difference marks according to the comparison result, wherein a difference information comparison schematic diagram is shown in fig. 9.
And realizing difference verification according to the data storage structure of the user function block. Determining an organization method and an organization mode of a direct current control protection program, analyzing associated characteristic information between a macro structure and a microscopic attribute according to membership between each hierarchy, wherein each hierarchy is provided with a plurality of nodes, each node comprises a plurality of child nodes, and when the check code of one layer of node changes, the check code of a father node of the node changes; by combining with the direct current control protection program algorithm, key information influencing control protection behaviors in each level, such as the user function block and the page to which the user function block belongs, is analyzed, effective attribute information of each level node is extracted, and the effective attribute information is associated with a verification result of a corresponding level, so that verification information of the user function block is realized, and specifically, a difference information display schematic diagram is shown in fig. 10.
According to the verification method for the direct-current control protection program, the target program and the reference program of the target program are obtained, the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules; aiming at each function module in each program page in the target program and the reference program, sequencing each function module and constructing a topological structure of each function module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables; and calling a preset check script, determining a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determining difference information in the difference page. According to the method for checking the direct current control protection program, the pre-stored check script is called to check the direct current control protection program, compared with the mode that the direct current control protection program is checked manually in the prior art, the method can improve the checking efficiency, can avoid checking errors caused by self or environmental influences in the manual checking process, and can save a large amount of human resources.
As shown in fig. 11, an embodiment of the present application further provides a verification apparatus for a dc control protection program, where the apparatus includes: an acquisition module 11, a processing module 12 and a determination module 13.
The acquiring module 11 is configured to acquire a target program and a reference program of the target program, where the target program and the reference program both include multiple program pages, and each program page includes multiple function modules;
the processing module 12 is configured to sort the function modules and construct a topology structure of the function modules for each function module in each program page in the target program and the reference program, so as to obtain a plurality of target program page linked lists and a plurality of reference program page linked lists;
the determining module 13 is configured to call a preset verification script, determine a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determine difference information in the difference page.
In one embodiment, the processing module 12 is specifically configured to: acquiring the coordinate position of each functional module on the program page to which the functional module belongs, and sequencing each functional module according to the coordinate position of the functional module; and aiming at the sequenced functional modules, acquiring the connection relation of the functional modules, constructing a topological structure among the functional modules, and acquiring a plurality of target program page chain tables and a plurality of reference program page chain tables.
In one embodiment, the target program page includes target identification information, the reference program page includes reference identification information, and the determining module 13 is specifically configured to: calling a first pre-stored verification script, and determining a matching page pair according to the corresponding relation between the target identification information of each target program page and the reference identification information of each reference program page; and calling a pre-stored second check script, and determining a difference page of the target program according to whether corresponding position data of the page chain table of the target program and the page chain table of the reference program are the same in the same matching page pair.
In one embodiment, the determining module 13 is specifically configured to: calling a pre-stored second check script, and respectively calculating a CRC (cyclic redundancy check) code of a target program page linked list and a CRC code of a reference program page linked list; and in the same matching page pair, judging whether the CRC check code of the target program page linked list is the same as the CRC check code of the reference program page linked list, and if not, determining the target program page as a difference page.
In one embodiment, the page data linked list includes a plurality of character strings, and the determining module 13 is specifically configured to: selecting a character string to be verified aiming at a target program page linked list and a reference program page linked list; and converting the character string to be checked into arrays with bytes as units, and respectively calculating the CRC check code of the page linked list of the target program and the CRC check code of the page linked list of the reference program according to the arrays.
In one embodiment, the determining module 13 is further configured to: according to the page chain table of the difference page and the page chain table of the reference program corresponding to the difference page, splitting the page chain table into a plurality of sub-chain tables according to the connection relation of each functional module; matching the sub-link tables in the same matching page pair according to a preset matching model to obtain a sub-link table pair; and comparing the data in the sublink pairs to determine the difference information of the target program.
In one embodiment, the apparatus further includes a storage module 14, configured to perform a labeling process on the difference information and perform classified storage.
The verification device for the direct current control protection program provided by the embodiment of the application can realize the method embodiment, the realization principle and the technical effect are similar, and the details are not repeated here.
For the specific limitation of the check device of the dc control protection program, reference may be made to the above limitation on the data processing method, which is not described herein again. All or part of each module in the checking device of the direct current control protection program can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or be independent of a processor of the computer device, and can also be stored in a memory of the computer device in a software form, so that the computer device can call and execute operations corresponding to the modules.
Fig. 12 is a schematic internal structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 12, the computer device includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole terminal. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor to implement a method for checking a dc control protection program provided in the above embodiments. The internal memory provides a cached execution environment for the operating system and computer programs in the non-volatile storage medium.
Those skilled in the art will appreciate that the architecture shown in fig. 12 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment of the present application, there is provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the following steps when executing the computer program: acquiring a target program and a reference program of the target program, wherein the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules; aiming at each function module in each program page in the target program and the reference program, sequencing each function module and constructing a topological structure of each function module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables; and calling a preset check script, determining a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determining difference information in the difference page.
In one embodiment, the processor, when executing the computer program, performs the steps of: acquiring the coordinate position of each functional module on the program page to which the functional module belongs, and sequencing each functional module according to the coordinate position of the functional module; and aiming at the sequenced functional modules, acquiring the connection relation of the functional modules, constructing a topological structure among the functional modules, and acquiring a plurality of target program page chain tables and a plurality of reference program page chain tables.
In one embodiment, the processor, when executing the computer program, performs the steps of: calling a first pre-stored verification script, and determining a matching page pair according to the corresponding relation between the target identification information of each target program page and the reference identification information of each reference program page; and calling a pre-stored second check script, and determining a difference page of the target program according to whether corresponding position data of the page chain table of the target program and the page chain table of the reference program are the same in the same matching page pair.
In one embodiment, the processor, when executing the computer program, performs the steps of: calling a pre-stored second check script, and respectively calculating a CRC (cyclic redundancy check) code of a target program page linked list and a CRC code of a reference program page linked list;
and in the same matching page pair, judging whether the CRC check code of the target program page linked list is the same as the CRC check code of the reference program page linked list, and if not, determining the target program page as a difference page.
In one embodiment, the processor, when executing the computer program, performs the steps of: selecting a character string to be verified aiming at a target program page linked list and a reference program page linked list;
and converting the character string to be checked into arrays with bytes as units, and respectively calculating the CRC check code of the page linked list of the target program and the CRC check code of the page linked list of the reference program according to the arrays.
In one embodiment, the processor, when executing the computer program, performs the steps of: according to the page chain table of the difference page and the page chain table of the reference program corresponding to the difference page, splitting the page chain table into a plurality of sub-chain tables according to the connection relation of each functional module;
matching the sub-link tables in the same matching page pair according to a preset matching model to obtain a sub-link table pair;
and comparing the data in the sublink pairs to determine the difference information of the target program.
In one embodiment, the processor, when executing the computer program, performs the steps of: and marking the difference information, and storing the difference information in a classified manner.
The implementation principle and technical effect of the computer device provided in this embodiment are similar to those of the method embodiments described above, and are not described herein again.
In an embodiment of the application, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of: acquiring a target program and a reference program of the target program, wherein the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules; aiming at each function module in each program page in the target program and the reference program, sequencing each function module and constructing a topological structure of each function module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables; and calling a preset check script, determining a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, and determining difference information in the difference page.
In one embodiment, the computer program when executed by the processor implements the steps of: acquiring the coordinate position of each functional module on the program page to which the functional module belongs, and sequencing each functional module according to the coordinate position of the functional module; and aiming at the sequenced functional modules, acquiring the connection relation of the functional modules, constructing a topological structure among the functional modules, and acquiring a plurality of target program page chain tables and a plurality of reference program page chain tables.
In one embodiment, the computer program when executed by the processor implements the steps of: calling a first pre-stored verification script, and determining a matching page pair according to the corresponding relation between the target identification information of each target program page and the reference identification information of each reference program page; and calling a pre-stored second check script, and determining a difference page of the target program according to whether corresponding position data of the page chain table of the target program and the page chain table of the reference program are the same in the same matching page pair.
In one embodiment, the computer program when executed by the processor implements the steps of: calling a pre-stored second check script, and respectively calculating a CRC (cyclic redundancy check) code of a target program page linked list and a CRC code of a reference program page linked list; and in the same matching page pair, judging whether the CRC check code of the target program page linked list is the same as the CRC check code of the reference program page linked list, and if not, determining the target program page as a difference page.
In one embodiment, the computer program when executed by the processor implements the steps of: selecting a character string to be verified aiming at a target program page linked list and a reference program page linked list;
and converting the character string to be checked into arrays with bytes as units, and respectively calculating the CRC check code of the page linked list of the target program and the CRC check code of the page linked list of the reference program according to the arrays.
In one embodiment, the computer program when executed by the processor implements the steps of: according to the page chain table of the difference page and the page chain table of the reference program corresponding to the difference page, splitting the page chain table into a plurality of sub-chain tables according to the connection relation of each functional module;
matching the sub-link tables in the same matching page pair according to a preset matching model to obtain a sub-link table pair;
and comparing the data in the sublink pairs to determine the difference information of the target program.
In one embodiment, the computer program when executed by the processor implements the steps of: and marking the difference information, and storing the difference information in a classified manner.
The implementation principle and technical effect of the computer-readable storage medium provided by this embodiment are similar to those of the above-described method embodiment, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in M forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (SyMchliMk) DRAM (SLDRAM), RaMbus (RaMbus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for checking a DC control protection program, the method comprising:
acquiring a target program and a reference program of the target program, wherein the target program and the reference program both comprise a plurality of program pages, and each program page comprises a plurality of functional modules;
for each functional module in each program page in the target program and the reference program, sequencing each functional module and constructing a topological structure of each functional module to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables;
and calling a preset check script, determining a difference page of the target program according to whether corresponding position data of the page linked list of the target program and the page linked list of the reference program are the same, and determining difference information in the difference page.
2. The method according to claim 1, wherein the step of, for each functional module in each program page in the target program and the reference program, sorting the functional modules and constructing a topology of the functional modules to obtain a plurality of target program page linked lists and a plurality of reference program page linked lists comprises:
acquiring the coordinate position of each functional module on the program page to which the functional module belongs, and sequencing each functional module according to the coordinate position of the functional module;
and aiming at the sequenced functional modules, acquiring the connection relation of each functional module, constructing a topological structure between each functional module, and obtaining a plurality of target program page linked lists and a plurality of reference program page linked lists.
3. The method according to claim 1, wherein the target program page includes target identification information, the reference program page includes reference identification information, the calling a preset verification script determines a difference page of the target program according to whether corresponding position data of the target program page linked list and the reference program page linked list are the same, including:
calling a first pre-stored verification script, and determining a matching page pair according to the corresponding relation between the target identification information of each target program page and the reference identification information of each reference program page;
and calling a pre-stored second check script, and determining a difference page of the target program according to whether corresponding position data of the page chain table of the target program and the page chain table of the reference program are the same in the same matching page pair.
4. The method of claim 3, wherein said invoking a second pre-stored check-up script to determine a difference page of the target program according to whether corresponding location data of the target program page linked list and the reference program page linked list are the same in the same matching page pair comprises:
calling a pre-stored second check script, and respectively calculating the CRC check code of the target program page linked list and the CRC check code of the reference program page linked list;
and in the same matching page pair, judging whether the CRC check code of the target program page linked list is the same as the CRC check code of the reference program page linked list, and if not, determining the target program page as a difference page.
5. The method of claim 4, wherein the page data linked list includes a plurality of strings, and wherein separately calculating the CRC check code of the target program page linked list and the CRC check code of the reference program page linked list includes:
selecting a character string to be verified aiming at the target program page linked list and the reference program page linked list;
and converting the character string to be checked into arrays with bytes as units, and respectively calculating the CRC check code of the page linked list of the target program and the CRC check code of the page linked list of the reference program according to the arrays.
6. The method of claim 4, wherein the determining the difference information in the difference page comprises:
according to the page linked list of the difference page and the page linked list of the reference program corresponding to the difference page, splitting the page linked list into a plurality of sub-link lists respectively according to the connection relation of each functional module;
matching the sub-link tables in the same matching page pair according to a preset matching model to obtain a sub-link table pair;
and comparing the data in the sublink pairs to determine the difference information of the target program.
7. The method of claim 6, further comprising: and marking the difference information, and storing the difference information in a classified manner.
8. A verification apparatus for a dc control protection program, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a target program and a reference program of the target program, the target program and the reference program respectively comprise a plurality of program pages, and each program page comprises a plurality of functional modules;
the processing module is used for sequencing the functional modules and constructing a topological structure of the functional modules aiming at the functional modules in the program pages in the target program and the reference program to obtain a plurality of target program page chain tables and a plurality of reference program page chain tables;
and the determining module is used for calling a preset checking script, determining a difference page of the target program according to whether the corresponding position data of the target program page linked list and the reference program page linked list are the same or not, and determining difference information in the difference page.
9. A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, implements a method of checking a dc control protection program according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method for checking a dc control protection program according to any one of claims 1 to 7.
CN202111292935.8A 2021-11-03 2021-11-03 Method, device and equipment for checking direct current control protection program and storage medium Pending CN113900853A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111292935.8A CN113900853A (en) 2021-11-03 2021-11-03 Method, device and equipment for checking direct current control protection program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111292935.8A CN113900853A (en) 2021-11-03 2021-11-03 Method, device and equipment for checking direct current control protection program and storage medium

Publications (1)

Publication Number Publication Date
CN113900853A true CN113900853A (en) 2022-01-07

Family

ID=79027418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111292935.8A Pending CN113900853A (en) 2021-11-03 2021-11-03 Method, device and equipment for checking direct current control protection program and storage medium

Country Status (1)

Country Link
CN (1) CN113900853A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868043A (en) * 2016-03-25 2016-08-17 南京南瑞继保电气有限公司 Visualization page program modification consistency verification method
CN105930174A (en) * 2016-05-22 2016-09-07 南京南瑞继保电气有限公司 Difference comparison method and system for graphical page programs
CN108920435A (en) * 2018-06-29 2018-11-30 南京南瑞继保电气有限公司 A kind of visualization procedure page data node matching method
CN110069279A (en) * 2019-04-29 2019-07-30 南方电网科学研究院有限责任公司 Method and device for checking direct current control protection program and storage medium
CN111460763A (en) * 2020-03-02 2020-07-28 南京南瑞继保电气有限公司 Method, device and equipment for marking file differences and computer-readable storage medium
CN113238748A (en) * 2021-06-17 2021-08-10 南方电网科学研究院有限责任公司 Method, device, terminal and medium for modifying and checking direct current control security program page

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868043A (en) * 2016-03-25 2016-08-17 南京南瑞继保电气有限公司 Visualization page program modification consistency verification method
CN105930174A (en) * 2016-05-22 2016-09-07 南京南瑞继保电气有限公司 Difference comparison method and system for graphical page programs
CN108920435A (en) * 2018-06-29 2018-11-30 南京南瑞继保电气有限公司 A kind of visualization procedure page data node matching method
CN110069279A (en) * 2019-04-29 2019-07-30 南方电网科学研究院有限责任公司 Method and device for checking direct current control protection program and storage medium
CN111460763A (en) * 2020-03-02 2020-07-28 南京南瑞继保电气有限公司 Method, device and equipment for marking file differences and computer-readable storage medium
CN113238748A (en) * 2021-06-17 2021-08-10 南方电网科学研究院有限责任公司 Method, device, terminal and medium for modifying and checking direct current control security program page

Similar Documents

Publication Publication Date Title
JP6567114B2 (en) System and method for classifying software defect reports
CN111459799B (en) Software defect detection model establishing and detecting method and system based on Github
US11775414B2 (en) Automated bug fixing using deep learning
Balci Credibility assessment of simulation results
WO2022227314A1 (en) Method and apparatus for dynamic synchronous testing, device, and storage medium
CN110955608B (en) Test data processing method, device, computer equipment and storage medium
US20220019413A1 (en) Architecture diagram analysis tool for software development
CN113221960B (en) Construction method and collection method of high-quality vulnerability data collection model
CN112036172B (en) Entity identification method and device based on abbreviated data of model and computer equipment
Shahzad et al. On 0‐Complete Partial Metric Spaces and Quantitative Fixed Point Techniques in Denotational Semantics
CN105022824A (en) Method and device for recognizing invalid link
CN117873839A (en) Fault detection method, device, equipment and storage medium of complex computing system
CN113505078B (en) Configuration file updating method, device, equipment and storage medium
JP2018092361A (en) Test script correction apparatus and test script correction program
CN112307169B (en) Address data matching method and device, computer equipment and storage medium
CN111159424B (en) Method and device for labeling knowledge graph entity, storage medium and electronic equipment
CN113900853A (en) Method, device and equipment for checking direct current control protection program and storage medium
CN111178407A (en) Road condition data screening method and device, computer equipment and storage medium
CN115167868A (en) Code compiling method, device, equipment and computer storage medium
CN111309572B (en) Test analysis method and device, computer equipment and storage medium
CN117421565B (en) Markov blanket-based equipment assessment method and device and computer equipment
Selvi et al. Fault Prediction for Large Scale Projects Using Deep Learning Techniques
CN113568662B (en) Code change influence range analysis method and system based on calling relation
CN113014582B (en) Distributed DNS traffic monitoring method, system, electronic device and medium
CN114721716A (en) Model transplanting method, system and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination