CN112882717B - Label name duplicate checking method and device, electronic equipment and storage medium - Google Patents

Label name duplicate checking method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112882717B
CN112882717B CN202110202623.7A CN202110202623A CN112882717B CN 112882717 B CN112882717 B CN 112882717B CN 202110202623 A CN202110202623 A CN 202110202623A CN 112882717 B CN112882717 B CN 112882717B
Authority
CN
China
Prior art keywords
label
kks
controller
file
tag
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.)
Active
Application number
CN202110202623.7A
Other languages
Chinese (zh)
Other versions
CN112882717A (en
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.)
China Southern Power Grid Peak Shaving And Frequency Modulation Guangdong Energy Storage Technology Co ltd
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
NR Electric Co Ltd
NR Engineering Co Ltd
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 NR Electric Co Ltd, NR Engineering Co Ltd filed Critical NR Electric Co Ltd
Priority to CN202110202623.7A priority Critical patent/CN112882717B/en
Publication of CN112882717A publication Critical patent/CN112882717A/en
Application granted granted Critical
Publication of CN112882717B publication Critical patent/CN112882717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a label name duplicate checking method and device, electronic equipment and a storage medium. The method comprises the following steps: in the process of compiling the global variable definition file, storing a KKS label corresponding to each global variable in at least one global variable into a label list file; under the condition that a first KKS label exists in the label list file of the global variable obtained through query, the first KKS label is stored in a label result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database; and modifying the first KKS label stored in the label result file under the condition that the label result file is not detected to be empty.

Description

Label name duplicate checking method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of industrial control, and in particular, to a method and an apparatus for searching duplicate label names, an electronic device, and a storage medium.
Background
In the configuration development process of large industrial control engineering, development is usually performed in a multi-person parallel mode. Each industrial controller defines global variables, each uniquely identified by a plant identification System (KKS, Kraft werk Kennzeichen System) tag. If the labels of different controllers are repeated, the data interaction based on the labels as keywords can be caused to have conflict. In the engineering development and maintenance process, the controller is always in a running state, and whether the label names of the global variables are duplicated or not needs to be identified in order to ensure the normal running of the controller. In the related art, whether the tag signature is duplicated or not is detected in the compiling process, and an accurate tag name duplication checking result cannot be obtained.
Disclosure of Invention
In view of the above, embodiments of the present disclosure provide a method and an apparatus for tag name duplication checking, an electronic device, and a storage medium, so as to solve the technical problem of low accuracy of the duplicate checking result of the signature in the related art.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
the embodiment of the application provides a method for searching for duplicate label names, which comprises the following steps:
in the process of compiling the global variable definition file, storing a KKS label corresponding to each global variable in at least one global variable into a label list file;
under the condition that a first KKS label exists in the label list file of the global variable obtained through query, the first KKS label is stored in a label result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database;
and modifying the first KKS label stored in the label result file under the condition that the label result file is not detected to be empty.
In the above scheme, after the modifying the first KKS tag stored in the tag result file, the method further includes:
The global variable definition file is recompiled based on the modified first KKS tag.
In the above solution, when compiling the global variable definition file, the method further includes:
and detecting whether the KKS label corresponding to the global variable in the global variable definition file has naming repetition in the corresponding controller.
In the foregoing solution, the method further includes:
and under the condition that the label result file is detected to be empty, downloading a data instruction file obtained by compiling the global variable definition file to each controller in at least one controller.
In the foregoing solution, after the downloading the data instruction file obtained by compiling the global variable definition file to each controller of the at least one controller, the method further includes:
receiving a first message sent by a first controller in the at least one controller; the first message is sent when the first controller detects that the downloaded data instruction file is inconsistent with Cyclic Redundancy Check (CRC) of the data instruction file stored in the first controller;
detecting whether a KKS label corresponding to the first controller in the label list file is consistent with a KKS label in a data table corresponding to the first controller in the set database or not based on the first message to obtain a detection result;
And under the condition that the detection result represents that the KKS label corresponding to the first controller in the label list file is inconsistent with the KKS label in the data table corresponding to the first controller in the setting database, updating the KKS label corresponding to the first controller in the label list file.
In the foregoing solution, the updating the KKS tag corresponding to the first controller in the tag list file includes:
deleting a second KKS label corresponding to the first controller in the label list file; the second KKS label represents a KKS label which does not exist in a data table corresponding to the first controller in the setting database;
and/or the presence of a gas in the gas,
adding a third KKS label corresponding to the first controller in the label list file; and the third KKS label represents a KKS label in a data table corresponding to the first controller in the setting database.
In the foregoing solution, after the KKS tag corresponding to the first controller in the tag list file is updated, the method further includes:
the global variable definition file is recompiled based on the updated tag list file.
The embodiment of the present application further provides a device for searching and rewriting a tag name, the device includes:
The first saving unit is used for saving the KKS label corresponding to each global variable in at least one global variable to a label list file in the process of compiling the global variable definition file;
the second saving unit is used for saving the first KKS label to the label result file under the condition that the first KKS label exists in the label list file of the global variable obtained through query; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database;
and the modifying unit is used for modifying the first KKS label stored in the label result file under the condition that the label result file is not detected to be empty.
An embodiment of the present application further provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor, wherein,
the processor is adapted to perform the steps of any of the above methods when running the computer program.
Embodiments of the present application further provide a storage medium on which a computer program is stored, where the computer program is executed by a processor to implement the steps of any one of the above methods.
In the embodiment of the application, in the process of compiling the global variable definition file, the KKS label corresponding to each global variable in at least one global variable is saved in a label list file; under the condition that a first KKS label exists in the label list file of the global variable obtained through query, the first KKS label is stored in a label result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database; and under the condition that the label result file is not detected to be empty, modifying the first KKS label stored in the label result file, namely, storing the KKS labels corresponding to all global variables into a label list file in the compiling process, after the compiling is finished, checking and verifying each KKS label in the label list file again, and modifying the repeated KKS label when the repeated KKS label is detected to exist. Due to the fact that the duplicate checking and checking are carried out after the compiling is completed, the fact that the checking of each KKS label is effective is guaranteed, and the accuracy of the duplicate checking result of the KKS label is improved. And when the repeated KKS label is detected to exist, the repeated KKS label is modified, so that the influence of the repeated KKS label on the data interaction of the controller can be avoided, and the stability and the reliability of industrial control engineering are improved.
Drawings
Fig. 1 is a schematic flowchart illustrating an implementation process of a tag name duplication checking method according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating an implementation of a tag name duplication checking method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a tag name duplication apparatus according to an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware component structure of an electronic device according to an embodiment of the present application.
Detailed Description
In the related art, whether the tag name is duplicated or not is checked in the compiling process of the global variable definition file, however, a part of the tag names generated in the compiling process may be only the tag names in the intermediate step and not the finally determined tag names, and the duplication checking is performed on the part of the tag names which are not finally confirmed after compiling, so that the obtained detection result is invalid, and an accurate tag name duplication checking result cannot be obtained in the compiling process.
Based on this, the embodiment of the application provides a method and a device for searching for duplicate label names, an electronic device and a storage medium, wherein in the process of compiling a global variable definition file, a KKS label corresponding to each global variable in at least one global variable is saved in a label list file; under the condition that a first KKS label exists in the label list file of the global variable obtained through query, the first KKS label is stored in a label result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database; the method comprises the steps of detecting that a label result file is not empty, modifying a first KKS label stored in the label result file, namely, storing KKS labels corresponding to all global variables to a label list file in the compiling process, after the compiling is completed, checking each KKS label in the label list file again, modifying the KKS labels with repetition when the repeated KKS labels are detected, and ensuring that the checking of each KKS label is effective and the accuracy of the result of checking the repeated KKS labels is improved because the repeated KKS labels are checked again after the compiling is completed. And when the repeated KKS label is detected to exist, the repeated KKS label is modified, so that the influence of the repeated KKS label on the data interaction of the controller can be avoided, and the stability and the reliability of industrial control engineering are improved.
The present application will be described in further detail with reference to the following drawings and examples.
Fig. 1 is a schematic flow chart illustrating an implementation process of a tag name duplication checking method according to an embodiment of the present application. As shown in fig. 1, the method includes:
step 101: and in the process of compiling the global variable definition file, storing the KKS label corresponding to each global variable in at least one global variable into a label list file.
Here, during the engineering configuration development, each controller defines a global variable, that is, each controller includes a global variable definition file. In the process that the compiling tool compiles the global variable definition file into the data instruction file, a label list file with an extension name of LST is generated, and KKS labels corresponding to all global variables are stored in the label list file, so that all KKS labels in the label list file can be checked and verified in the following process.
Step 102: under the condition that a first KKS label exists in the label list file of the global variable obtained through query, the first KKS label is stored in a label result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database.
Here, the compiling of the global variable definition file of the controller is to compile each global variable in the global variable definition file into a corresponding data instruction file. Generally, the global variable definition file of each controller has a large number of global variables, and the compilation information of the global variables stored in each page of data instruction file is limited, so that the compilation information of the global variables of one controller needs at least one page of data instruction file to be stored. For example, 2560 global variables are defined in a global variable definition file of a controller, preferably, the global variables stored in the global variable definition file are arranged in an ascending order of global variable sequence numbers, and one page of data instruction file can only store the compilation information of 256 global variables, so that 10 pages of data instruction files are required to store the compilation information of all global variables of the controller. Preferably, the page numbers of the 10-page data instruction file can be named 1001, 1002, …, 1010.
And after the global variable definition file of each controller is compiled, creating a data table corresponding to each controller in a setting database, wherein the data table is created according to the serial number of the controller, the page number corresponding to the compiling information of the global variable corresponding to the KKS label in the data instruction file and the KKS label name corresponding to the page number. It should be noted that each global variable corresponds to one KKS tag, and each global variable corresponds to one compilation information in the data instruction file, and therefore, the KKS tag corresponds to the compilation information of the global variable in the data instruction file. Since the global variable definition file of each controller corresponds to at least one page of data instruction file after being compiled, that is, at least one page number exists, each controller corresponds to at least one data table in the setting database.
The same KKS tag exists in at least two data tables in the setting database, which indicates that the KKS tag name appears at least twice in the setting database and indicates that the KKS tag name appears repeatedly, and at the moment, the KKS tag with the repetition appears as a first KKS tag to be saved in a tag result file.
It should be noted that, in the tag list file, the KKS tag information is stored in the corresponding page number in the data instruction file and the KKS tag name corresponding to the page number in a row according to the controller number and the compiling information of the global variable corresponding to the KKS tag.
In practical application, the monitoring background reads the tag list file by using a database duplicate checking tool, and performs traversal search in a set database according to the KKS tag name and the page number corresponding to the compiling information of the global variable corresponding to the KKS tag in the data instruction file. Normally, there is no duplication of the KKS tag name in the same controller, and if the same KKS tag name and page number appear in at least two data tables in the setting database, it indicates that the KKS tag name and page number exist in different controllers, respectively, that is, there is naming duplication of the KKS tag name in at least two controllers, so that the KKS tag name is output to the tag result file.
Illustratively, a portion of the KKS tag information stored in the tag list file is as follows:
1;1001;DAPC_E001
1;1001;DAPC_E002
1;1001;DAPC_Y080
in the setting database, a part of KKS tag information stored in the data table 1 corresponding to the controller with the number 1 is as follows:
1;1001;DAPC_E001
1;1001;DAPC_E002
1;1001;DAPC_Y080
in the setting database, a part of KKS tag information stored in the data table 2 corresponding to the controller with the number 2 is as follows:
2;1001;DAPC_E001
2;1001;DAPC_E003
2;1001;DAPC_Y080
for the first piece of label information in the label list file, according to 1001; the DAPC _ E001 searches in a set database, and finds that the data table 1 and the data table 2 have the same 1001; DAPC _ E001, indicating that DAPC _ E001 this KKS tag is present in both controller 1 and controller 2, there is a duplicate naming, therefore, 1 in the tag list file; 1001; the tag information DAPC _ E001 is stored as a first KKS tag in a tag result file showing the number of times the tag name of the first KKS tag appears in the setting database, and therefore the tag information stored in the tag result file is as follows:
1;1001;DAPC_E001;2
according to 1001, the second piece of label information in the label list file is processed; DAPC _ E002 was looked up in the setup database and found that 1001 appeared only in Table 1; DAPC _ E002, but not found in table 2, indicates that DAPC _ E002 KKS tag is only found in one table of the setup database, there is no duplicate naming, and therefore, 1 in the tag list file is not used; 1001; DAPC _ E002 this tag information is stored to the tag result file.
By analogy, the third piece of label information in the label list file is according to 1001; DAPC _ Y080 searches in a setting database and finds that the data table 1 and the data table 2 have the same 1001; DAPC _ Y080 indicating that DAPC _ Y080 this KKS tag name is present in both controller 1 and controller 2, there is a duplicate naming, and therefore, 1 in the tag list file; 1001; the tag information of DAPC _ Y080 is stored as a first KKS tag in a tag result file, and the tag result file shows the number of times the tag name of the first KKS tag appears in the setting database, and at this time, the tag result file is:
1;1001;DAPC_E001;2
1;1001;DAPC_Y080;2
step 103: and modifying the first KKS label stored in the label result file under the condition of detecting that the label result file is not empty.
Here, if it is detected that the tag result file is not empty, it indicates that there are repeatedly named tags between different controllers, and in order to ensure that data interaction between the controllers is normal, the first KKS tag stored in the tag result file is modified.
In practical application, when the monitoring background detects that the tag result file is not empty, the first KKS tag name stored in the tag result file is transmitted to the configuration tool as an error item, the configuration tool displays the error information, and the controller is prohibited from downloading the data instruction file corresponding to the first KKS tag.
In an embodiment, after said modifying the first KKS tag saved in the tag result file, the method further comprises:
the global variable definition file is recompiled based on the modified first KKS tag.
After the first KKS tag stored in the tag result file is modified, the global variable definition file corresponding to the modified KKS tag is stored, and after the global variable definition file is stored, the compiling tool is started to compile the stored global variable definition file.
In practical application, when it is detected that a save button is clicked on the global variable definition file or the view of the global variable definition file is switched to other views to automatically trigger saving, a compiling tool is started to compile the saved global variable definition file, and a KKS tag name duplication process is triggered.
By saving the global variable definition file corresponding to the modified first KKS tag and recompiling the saved global variable definition file, whether the tag name of the modified first KKS tag has repeated naming can be detected, and the working stability of the controller is improved.
In an embodiment, when compiling the global variable definition file, the method further comprises:
and detecting whether the KKS label corresponding to the global variable in the global variable definition file has naming repetition in the corresponding controller.
Here, when compiling a global variable definition file of a controller, the compiling tool detects whether a KKS tag corresponding to a global variable currently being compiled exists in the controller or not.
Whether there is the name repetition through the KKS label that detects in the controller, can in time discover that there is the repeated KKS label name in the controller, avoid causing the influence to the operation of controller, can also get rid of the inside repeated interference that causes of label name of controller when detecting whether there is label name repetition between controller and the controller.
In an embodiment, the method further comprises:
and downloading a data instruction file obtained by compiling the global variable definition file to each controller in at least one controller under the condition that the label result file is detected to be empty.
Here, if it is detected that the tag result file is empty, indicating that there is no naming duplicate KKS tag in the tag list file, that is, there is no naming duplicate KKS tag between controllers, at this time, a data instruction file obtained by compiling the global variable definition file is downloaded to each controller of at least one controller.
The data instruction file stores the compiling information of the global variables in a paging mode according to the page number, and a single page stores the compiling information of N global variables, wherein N is a positive integer.
The data instruction file comprises a file header, compiling information of a plurality of global variables and a character string storage area. The header includes a page number, a variable number, and 32-bit CRC data.
The variable compilation information includes a variable number, a KKS tag name length, a start position of the KKS tag name storage, a variable type, a set value, a minimum value, and a maximum value.
The character string storage area stores character contents of the KKS tag name.
By downloading the data instruction file when the label result file is detected to be empty, the compiled data instruction file can be downloaded to the corresponding controller under the condition that KKS label naming repetition does not exist between the controllers, and the working stability of the industrial control engineering system is improved.
In an embodiment, after downloading the data instruction file obtained by compiling the global variable definition file to each controller of the at least one controller, the method further includes:
receiving a first message sent by a first controller in the at least one controller; the first message is sent when the first controller detects that the downloaded data instruction file is inconsistent with the CRC of the data instruction file stored in the first controller;
Detecting whether a KKS label corresponding to the first controller in the label list file is consistent with a KKS label in a data table corresponding to the first controller in the set database or not based on the first message to obtain a detection result;
and under the condition that the detection result represents that the KKS label corresponding to the first controller in the label list file is inconsistent with the KKS label in the data table corresponding to the first controller in the setting database, updating the KKS label corresponding to the first controller in the label list file.
After the data instruction file is downloaded to the corresponding controller, when the first controller detects that the downloaded data instruction file is inconsistent with the CRC of the data instruction file stored in the controller, it indicates that an error occurs in the data instruction file downloaded by the first controller, and at this time, the first controller may send a first message to the monitoring background to notify the monitoring background that the data instruction file corresponding to the page number has changed. The CRC is a calculation method for checking data transmission accuracy, and is mainly used to detect errors that may occur after data transmission or storage, and make an error determination by using the principles of division and remainder.
And after receiving the first message sent by the first controller, the monitoring background detects whether the KKS label corresponding to the first controller in the label list file is consistent with the KKS label in the data table corresponding to the first controller in the set database, and obtains a detection result.
If the KKS tag corresponding to the first controller in the tag list file is inconsistent with the KKS tag in the data table corresponding to the first controller in the setting database, when the KKS tag of the first controller is checked based on the tag list file at this time, an obtained check result is inaccurate, and therefore, when the detection result represents inconsistency, the KKS tag corresponding to the first controller in the tag list file needs to be updated.
By timely detecting the KKS label of the corresponding controller when the data instruction file is found to be abnormal, the abnormal condition can be timely processed, and the normal operation of the controller is ensured. When the detection result is inconsistent in representation, the KKS label corresponding to the first controller in the label list file is updated, and the accuracy of the repeated checking result of the KKS label corresponding to the first controller can be improved.
In an embodiment, the updating the KKS tag corresponding to the first controller in the tag list file includes:
Deleting a second KKS label corresponding to the first controller in the label list file; the second KKS tag represents a KKS tag which does not exist in a data table corresponding to the first controller in the setting database;
and/or the presence of a gas in the atmosphere,
adding a third KKS label corresponding to the first controller in the label list file; and the third KKS label represents a KKS label in a data table corresponding to the first controller in the setting database.
Through the comparison with the KKS label in the data table corresponding to the first controller in the set database, the excess KKS label is deleted and/or the nonexistent KKS label is added in the label list file, so that the KKS label corresponding to the first controller in the label list file is consistent with the KKS label in the data table corresponding to the first controller in the set database, and the accuracy of the repeated checking result of the KKS label corresponding to the first controller is improved.
In an embodiment, after said updating the KKS tag corresponding to the first controller in the tag list file, the method further comprises:
the global variable definition file is recompiled based on the updated tag list file.
Here, after the global variable definition file corresponding to the KKS tag corresponding to the first controller in the tag list file is updated, the global variable definition file corresponding to the KKS tag corresponding to the first controller in the updated tag list file is saved, and after the global variable definition file is saved, the compiling tool is started to compile the saved global variable definition file.
By saving the global variable definition file corresponding to the KKS label corresponding to the first controller in the updated label list file and recompiling the saved global variable definition file, whether the label name of the KKS label corresponding to the updated first controller is repeated or not can be detected, and the working stability of the controller is improved.
Fig. 2 is a schematic flow chart of an implementation process of a tag name duplication checking method provided in an embodiment of the present application, and as shown in fig. 2, the method includes:
and when the global variable view is clicked to be stored or leaves the global variable view, calling a compiling tool to compile the global variable, wherein the compiled and output data instruction file contains CRC, and naming the data instruction file according to the page number.
Collecting KKS label names of the global variable definition files to form LST files; and calling a database service process of a monitoring background, reading the LST file, performing KKS duplicate checking, and outputting the label name reference times exceeding 1 to the RES file. The LST file represents a tag list file, and the RES file represents a tag result file. The tag name reference times exceeding 1 represents that the same tag name appears in at least two data tables in the setting database.
And under the condition that the RES file is not empty, modifying the KKS label stored in the RES file according to the prompt, and recompiling the corresponding global variable after modifying and storing.
And downloading the data instruction file to the controller under the condition that the RES file is empty. And comparing whether the CRC in the data instruction file before and after downloading is consistent, and if so, ending the tag name duplication checking process. If the data instruction files are inconsistent, the controller sends a message to the monitoring background to inform the data instruction file corresponding to the page number of the change.
And the monitoring background acquires the tag list file of the page number, compares the tag list file with the tag name corresponding to the page number in the real-time library, and updates the LST file if the tag list file is inconsistent with the tag name corresponding to the page number. Wherein the real-time library represents a set database.
In the embodiment of the application, in the process of compiling the global variable definition file, the KKS label corresponding to each global variable in at least one global variable is saved in a label list file; under the condition that a first KKS label exists in the label list file of the global variable obtained through query, the first KKS label is stored in a label result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database; the method comprises the steps of detecting that a label result file is not empty, modifying a first KKS label stored in the label result file, namely, storing KKS labels corresponding to all global variables to a label list file in the compiling process, after the compiling is completed, checking each KKS label in the label list file again, modifying the KKS labels with repetition when the repeated KKS labels are detected, and ensuring that the checking of each KKS label is effective and the accuracy of the result of checking the repeated KKS labels is improved because the repeated KKS labels are checked again after the compiling is completed. And when the repeated KKS label is detected to exist, the repeated KKS label is modified, so that the influence of the repeated KKS label on the data interaction of the controller can be avoided, and the stability and the reliability of industrial control engineering are improved.
In order to implement the method of the embodiment of the present application, an embodiment of the present application further provides a tag name duplication checking apparatus, and fig. 3 is a schematic diagram of the tag name duplication checking apparatus provided in the embodiment of the present application, as shown in fig. 3, the apparatus includes:
the first saving unit 301 is configured to save, in the process of compiling the global variable definition file, the KKS tag corresponding to each global variable in the at least one global variable to the tag list file.
A second saving unit 302, configured to, when a first KKS tag exists in the tag list file of the global variable obtained through query, save the first KKS tag to a tag result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database.
A modifying unit 303, configured to modify the first KKS tag stored in the tag result file when it is detected that the tag result file is not empty.
In one embodiment, the apparatus further comprises: and the first compiling unit is used for recompiling the global variable definition file based on the modified first KKS label.
In one embodiment, the apparatus further comprises: the first detection unit is used for detecting whether the KKS tags corresponding to the global variables in the global variable definition file have naming repetition in the corresponding controllers.
In one embodiment, the apparatus further comprises: and the downloading unit is used for downloading the data instruction file obtained by compiling the global variable definition file to each controller in at least one controller under the condition that the label result file is detected to be empty.
In one embodiment, the apparatus further comprises: the device comprises a receiving unit, a second detecting unit and an updating unit; the receiving unit is configured to receive a first packet sent by a first controller of the at least one controller; the first message is sent when the first controller detects that the downloaded data instruction file is inconsistent with the CRC of the data instruction file stored in the first controller;
the second detection unit is configured to detect whether the KKS tag corresponding to the first controller in the tag list file is consistent with the KKS tag in the data table corresponding to the first controller in the setting database based on the first message, and obtain a detection result;
The updating unit is configured to update the KKS tag corresponding to the first controller in the tag list file when the detection result indicates that the KKS tag corresponding to the first controller in the tag list file is inconsistent with the KKS tag in the data table corresponding to the first controller in the setting database.
In one embodiment, the apparatus further comprises: a deletion unit and/or an addition unit; the deleting unit is configured to delete a second KKS tag corresponding to the first controller in the tag list file; the second KKS label represents a KKS label which does not exist in a data table corresponding to the first controller in the setting database;
the adding unit is used for adding a third KKS label corresponding to the first controller in the label list file; and the third KKS label represents a KKS label in a data table corresponding to the first controller in the setting database.
In one embodiment, the apparatus further comprises: and the second compiling unit is used for recompiling the global variable definition file based on the updated label list file.
In practical applications, the first saving Unit 301, the second saving Unit 302, the modifying Unit 303, the first compiling Unit, the first detecting Unit, the downloading Unit, the receiving Unit, the second detecting Unit, the updating Unit, the deleting Unit, the adding Unit, and the second compiling Unit may be implemented by a Processor in an electronic device, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Micro Control Unit (MCU) or a Programmable Gate Array (FPGA), or the like.
It should be noted that: the label name searching and rewriting device provided in the above embodiments is only exemplified by the division of the above program modules when displaying information, and in practical applications, the above processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules to complete all or part of the above-described processing. In addition, the tag name duplication checking device provided by the above embodiment and the tag name duplication checking method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Based on the hardware implementation of the program module, in order to implement the method of the embodiment of the present application, an embodiment of the present application further provides an electronic device. Fig. 4 is a schematic diagram of a hardware component structure of an electronic device according to an embodiment of the present application, and as shown in fig. 4, the electronic device includes:
a communication interface 401 capable of performing information interaction with other devices such as network devices and the like;
and the processor 402 is connected with the communication interface 401 to implement information interaction with other devices, and is used for executing the method provided by one or more technical schemes of the terminal side when running a computer program. And the computer program is stored on the memory 403.
Specifically, the processor 402 is configured to, in the process of compiling the global variable definition file, store the KKS tag corresponding to each global variable in at least one global variable to a tag list file; under the condition that the first KKS label exists in the label list file of the global variable obtained through query, the first KKS label is stored in a label result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database; and modifying the first KKS label stored in the label result file under the condition of detecting that the label result file is not empty.
In an embodiment, after the modifying the first KKS tag saved in the tag result file, the processor 402 is further configured to recompile the global variable definition file based on the modified first KKS tag.
In one embodiment, when compiling the global variable definition file, the processor 402 is further configured to detect whether a KKS tag corresponding to a global variable in the global variable definition file has a naming duplicate in a corresponding controller.
In an embodiment, the processor 402 is further configured to download, to each of the at least one controller, a data instruction file obtained by compiling the global variable definition file in case that the tag result file is detected to be empty.
In an embodiment, after the data instruction file obtained by compiling the global variable definition file is downloaded to each controller of the at least one controller, the processor 402 is further configured to receive a first packet sent by a first controller of the at least one controller; the first message is sent when the first controller detects that the downloaded data instruction file is inconsistent with the CRC of the data instruction file stored in the first controller; detecting whether a KKS label corresponding to the first controller in the label list file is consistent with a KKS label in a data table corresponding to the first controller in the set database or not based on the first message to obtain a detection result; and under the condition that the detection result represents that the KKS label corresponding to the first controller in the label list file is inconsistent with the KKS label in the data table corresponding to the first controller in the setting database, updating the KKS label corresponding to the first controller in the label list file.
In an embodiment, the processor 402 is further configured to update the KKS tag corresponding to the first controller in the tag list file, including:
deleting a second KKS label corresponding to the first controller in the label list file; the second KKS label represents a KKS label which does not exist in a data table corresponding to the first controller in the setting database;
and/or the presence of a gas in the gas,
adding a third KKS label corresponding to the first controller in the label list file; and the third KKS label represents a KKS label in a data table corresponding to the first controller in the setting database.
In an embodiment, after the KKS tag corresponding to the first controller in the tag list file is updated, the processor 402 is further configured to recompile a global variable definition file based on the updated tag list file.
Of course, in practice, the various components in the electronic device are coupled together by the bus system 404. It is understood that the bus system 404 is used to enable communications among the components. The bus system 404 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 404 in FIG. 4.
The memory 403 in the embodiments of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device.
It will be appreciated that the memory 403 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 403 described in embodiments herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiments of the present application may be applied to the processor 402, or implemented by the processor 402. The processor 402 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 402. The processor 402 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 402 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 403, and the processor 402 reads the program in the memory 403 and performs the steps of the aforementioned method in conjunction with its hardware.
The processor 402 executes the program to implement the corresponding flow in the methods of the embodiments of the present application.
In an exemplary embodiment, the present application further provides a storage medium, specifically a computer-readable storage medium, for example, a memory 403 storing a computer program, which can be executed by the processor 402 to perform the steps of the foregoing method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, terminal and method may be implemented in other manners. The above-described device embodiments are only illustrative, for example, the division of the unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in the form of hardware, or in the form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Alternatively, the integrated unit described above may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media capable of storing program code.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of tag name duplication checking, the method comprising:
in the process of compiling the global variable definition file, a power plant identification system KKS label corresponding to each global variable in at least one global variable is stored in a label list file;
under the condition that the first KKS label exists in the label list file of the global variable obtained through query, the first KKS label is stored in a label result file; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database;
and modifying the first KKS label stored in the label result file under the condition of detecting that the label result file is not empty.
2. The tag name duplication method of claim 1 wherein, after said modifying the first KKS tag saved in said tag result file, said method further comprises:
the global variable definition file is recompiled based on the modified first KKS tag.
3. The tag name duplication method of claim 1 wherein, in compiling a global variable definition file, the method further comprises:
And detecting whether the KKS label corresponding to the global variable in the global variable definition file has naming repetition in the corresponding controller.
4. The method for tag name duplication checking according to any one of claims 1 to 3, further comprising:
and under the condition that the label result file is detected to be empty, downloading a data instruction file obtained by compiling the global variable definition file to each controller in at least one controller.
5. The tag name duplication method of claim 4 wherein, after downloading the data instruction file resulting from compiling the global variable definition file to each of the at least one controller, the method further comprises:
receiving a first message sent by a first controller in the at least one controller; the first message is sent when the first controller detects that the downloaded data instruction file is inconsistent with the Cyclic Redundancy Check (CRC) of the data instruction file stored in the first controller;
detecting whether a KKS label corresponding to the first controller in the label list file is consistent with a KKS label in a data table corresponding to the first controller in the set database or not based on the first message to obtain a detection result;
And under the condition that the detection result represents that the KKS label corresponding to the first controller in the label list file is inconsistent with the KKS label in the data table corresponding to the first controller in the setting database, updating the KKS label corresponding to the first controller in the label list file.
6. The tag name duplication method of claim 5 wherein said updating the KKS tag corresponding to the first controller in the tag list file comprises:
deleting a second KKS label corresponding to the first controller in the label list file; the second KKS label represents a KKS label which does not exist in a data table corresponding to the first controller in the setting database;
and/or the presence of a gas in the atmosphere,
adding a third KKS label corresponding to the first controller in the label list file; and the third KKS label represents a KKS label in a data table corresponding to the first controller in the setting database.
7. The method of claim 5, wherein after said updating the KKS tag corresponding to the first controller in the tag list file, the method further comprises:
The global variable definition file is recompiled based on the updated tag list file.
8. A tag name duplication apparatus, comprising:
the first saving unit is used for saving the KKS label corresponding to each global variable in at least one global variable to a label list file in the process of compiling the global variable definition file;
the second saving unit is used for saving the first KKS label to the label result file under the condition that the first KKS label exists in the label list file of the global variable obtained through query; the first KKS label is a KKS label existing in at least two data tables in a set database; each controller of the at least one controller corresponds to at least one data table in the setting database;
and the modifying unit is used for modifying the first KKS label stored in the label result file under the condition that the label result file is not detected to be empty.
9. An electronic device, comprising: a processor and a memory for storing a computer program capable of running on the processor, wherein,
the processor is adapted to perform the steps of the method of any one of claims 1 to 7 when running the computer program.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the method of any one of claims 1 to 7.
CN202110202623.7A 2021-02-23 2021-02-23 Label name duplicate checking method and device, electronic equipment and storage medium Active CN112882717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110202623.7A CN112882717B (en) 2021-02-23 2021-02-23 Label name duplicate checking method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110202623.7A CN112882717B (en) 2021-02-23 2021-02-23 Label name duplicate checking method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112882717A CN112882717A (en) 2021-06-01
CN112882717B true CN112882717B (en) 2022-06-28

Family

ID=76054299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110202623.7A Active CN112882717B (en) 2021-02-23 2021-02-23 Label name duplicate checking method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112882717B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113741411B (en) * 2021-11-08 2022-02-01 西安热工研究院有限公司 Generation method and system of global variable point product file of distributed control system
CN113779324B (en) * 2021-11-15 2022-03-01 西安热工研究院有限公司 Cross reference synchronous processing method, system, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237350A (en) * 2008-02-27 2008-08-06 中兴通讯股份有限公司 Global variant exception alteration and positioning method for multi-task environment single board machine
CN106777644A (en) * 2016-12-08 2017-05-31 华能国际电力股份有限公司 Automatic generation method and device for power plant identification system code
CN109145001A (en) * 2018-08-16 2019-01-04 北京奥技异科技发展有限公司 Real-time data-coding method based on KKS coding rule

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237350A (en) * 2008-02-27 2008-08-06 中兴通讯股份有限公司 Global variant exception alteration and positioning method for multi-task environment single board machine
CN106777644A (en) * 2016-12-08 2017-05-31 华能国际电力股份有限公司 Automatic generation method and device for power plant identification system code
CN109145001A (en) * 2018-08-16 2019-01-04 北京奥技异科技发展有限公司 Real-time data-coding method based on KKS coding rule

Also Published As

Publication number Publication date
CN112882717A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN112882717B (en) Label name duplicate checking method and device, electronic equipment and storage medium
CN113609139A (en) Monitoring data management method and device, electronic equipment and storage medium
CN103440196B (en) A kind of operating-system resources failure detecting method
CN113377661A (en) Interface testing method and device, electronic equipment and storage medium
JP2018028905A (en) Electronic device and method for executing data scrubbing, and data scrubbing device
CN112416957A (en) Data increment updating method and device based on data model layer and computer equipment
CN114661423A (en) Cluster configuration detection method and device, computer equipment and storage medium
CN107621945A (en) A kind of method and device for the mark for determining ios device
CN111400128A (en) Log management method and device, computer equipment and storage medium
CN117130618A (en) Incremental compiling method, device and equipment for executable file of intelligent card
CN114727100B (en) Joint debugging method and device for monitoring equipment
CN116841635A (en) Parameter configuration method, device, equipment and storage medium
CN113158177A (en) Dynamic measurement method, device, equipment and storage medium
CN115687129A (en) Coverage rate report generation method and device, storage medium and computer equipment
CN114936111A (en) Front-end variable anomaly detection and restoration method, device, equipment and storage medium
US11256602B2 (en) Source code file retrieval
CN114237991A (en) Main/standby service switching method, device, equipment and medium based on cold standby mode
CN115705297A (en) Code call detection method, device, computer equipment and storage medium
CN113835731A (en) Method and device for prompting error according to updated component, electronic equipment and storage medium
CN111562940B (en) Project data construction method and device
CN115002241B (en) Control method and system of intelligent instrument, electronic equipment and medium thereof
CN111726373B (en) Communication link construction method, device and equipment
CN114443617B (en) Intelligent verification processing method and device for migration exception
CN115129355B (en) Page repair method, system and computer equipment thereof
US20230324878A1 (en) Information processing device, information processing method, and computer program product

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220802

Address after: 211102, No. 69, Su Yuan Avenue, Jiangning District, Jiangsu, Nanjing

Patentee after: NR ELECTRIC Co.,Ltd.

Patentee after: NR ENGINEERING Co.,Ltd.

Patentee after: China Southern power grid peak shaving and frequency modulation (Guangdong) energy storage technology Co.,Ltd.

Address before: 211102, No. 69, Su Yuan Avenue, Jiangning District, Jiangsu, Nanjing

Patentee before: NR ELECTRIC Co.,Ltd.

Patentee before: NR ENGINEERING Co.,Ltd.