An online monitoring method, system, device and medium of a lower computer
By comparing the consistency of syntax information of variables between upper and lower level machines in the PLC monitoring system, the security risks existing in the existing system are solved, the consistency verification of variable syntax information and intelligent upgrading are realized, and the system failure rate is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI BAOSIGHT SOFTWARE CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-05
AI Technical Summary
Existing PLC monitoring systems lack consistency in comparing the syntax information of variables between upper and lower level machines, which leads to security risks for maintenance personnel during debugging and cannot effectively limit erroneous read and write operations.
By displaying the syntax information of the same variable between the upper and lower level machines in the monitoring table, their consistency can be compared, and if there is a discrepancy, the operation and maintenance personnel will be reminded to replace or update the engineering software, and read and write permissions for inconsistent variables will be prohibited.
It achieves consistency verification of variable syntax information between upper and lower level machines, avoids security risks of inconsistent variables, reduces system failure rate, and improves the intelligence level of industrial monitoring system.
Smart Images

Figure CN122152677A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of PLC technology, specifically relating to an online monitoring method, system, device, and medium for a lower-level machine. Background Technology
[0002] A PLC (Programmable Logic Controller) is a computer specifically designed for industrial production environments. In practical applications, real-time monitoring of key variables within the PLC and performing point-based testing of the I / O devices connected to the PLC are essential. Therefore, major manufacturers have designed and developed corresponding online monitoring systems for PLC variables.
[0003] However, mainstream monitoring systems generally lack consistency comparison of the upper and lower variable syntax information for each variable, and also lack read and write permission restrictions for variables with inconsistent syntax information. This means that when maintenance personnel are debugging a variable, they are unaware of the consistency information of the upper and lower variable syntax information. Furthermore, erroneous read and write operations on variables with inconsistent syntax information are not prohibited, which poses certain security risks to debugging variables. Summary of the Invention
[0004] In view of the shortcomings of the prior art described above, the purpose of this invention is to compare the consistency of the variable by simultaneously displaying the syntax information of the upper and lower computers for the same variable in the monitoring table, thereby making up for the problem of missing variable comparison information in the monitoring table of the current mainstream monitoring system, so as to facilitate the operation and maintenance personnel to discover the consistency problem of the engineering software version more quickly and avoid the risk of variable writing caused by version inconsistency.
[0005] This invention provides an online monitoring method for a lower-level machine, applied to a higher-level machine. The method includes: after logging into both the lower and upper-level machines, obtaining a first engineering software installed on the lower-level machine; analyzing the compilation product of the first engineering software to identify the first syntax information defined by each code variable therein; wherein the code variables compiled by the first engineering software use their own variable names as unique identifiers; based on a pre-imported second engineering software, analyzing the compilation product of the second engineering software to identify the second syntax information defined by each code variable therein; wherein the code variables compiled by the second engineering software use their own variable names as unique identifiers; comparing the first syntax information and second syntax information of code variables with the same identifier based on the unique identifier of the code variables, and confirming whether the first engineering software and the second engineering software are consistent based on the comparison results of all code variables, so as to remind maintenance personnel to replace the second engineering software after confirming inconsistency.
[0006] In one embodiment of the present invention, the step of confirming whether the versions of the first engineering software and the second engineering software are consistent based on the comparison results of all code variables, so as to remind the operation and maintenance personnel to replace the second engineering software after confirming inconsistency, includes: when there is inconsistency between the first syntax information and the second syntax information of at least one code variable, identifying that the first engineering software and the second engineering software are inconsistent, and reminding the operation and maintenance personnel to replace the second engineering software through the monitoring table; when the first syntax information and the second syntax information of all code variables are consistent, identifying that the first engineering software and the second engineering software are completely consistent, and reminding the operation and maintenance personnel that read and write operations on the code variables can be performed through the monitoring table.
[0007] In one embodiment of the present invention, when there is inconsistency between the first and second syntax information of at least one code variable, the inconsistency between the first and second engineering software is identified, and the maintenance personnel are reminded to replace the second engineering software through a monitoring table. This includes: if the number of code variables with inconsistent first and second syntax information exceeds a preset threshold, an import error in the second engineering software is identified, and the maintenance personnel are reminded to replace the second engineering software through a monitoring table; if the number of code variables with inconsistent first and second syntax information does not exceed the preset threshold, an abnormal version of the second engineering software is identified, and the maintenance personnel are reminded to update the version of the second engineering software through a monitoring table.
[0008] In one embodiment of the present invention, after confirming that the first engineering software and the second engineering software are consistent, the method further includes: displaying each code variable of the first engineering software in a tabular form on a monitoring table, so that maintenance personnel can perform read and write operations on the code variables.
[0009] This invention provides an online monitoring system for a lower-level machine, comprising: a communication module for acquiring first engineering software installed in the lower-level machine after logging into the upper and lower-level machines; a lower-level machine language service module for analyzing the compilation products of the first engineering software to identify the first syntax information defined by each code variable therein; wherein the code variables compiled by the first engineering software use their own variable names as unique identifiers; an upper-level machine language service module for analyzing the compilation products of the second engineering software based on pre-imported second engineering software to identify the second syntax information defined by each code variable therein; wherein the code variables compiled by the second engineering software use their own variable names as unique identifiers; and a monitoring table service module for comparing the first syntax information and second syntax information of code variables with the same unique identifier based on the unique identifier of the code variables, and confirming whether the first engineering software and the second engineering software are consistent based on the comparison results of all code variables, so as to remind maintenance personnel to replace the second engineering software after confirming inconsistency.
[0010] This invention provides an online monitoring method for a lower-level machine, applied to a higher-level machine. The method includes: acquiring operation instructions input by maintenance personnel to confirm code variables requesting read / write access; obtaining first syntax information of the same code variable from the compilation product of a first engineering software based on the unique identifier of the code variable; wherein the first engineering software is acquired from the lower-level machine after logging into both the upper and lower-level machines, and each code variable of the first engineering software uses its own variable name as a unique identifier; obtaining second syntax information of the same code variable from the compilation product of a second engineering software based on the unique identifier of the code variable; wherein the second engineering software is pre-imported, and each code variable of the second engineering software uses its own variable name as a unique identifier; comparing the first syntax information and the second syntax information of the code variable, and prohibiting read / write permissions for the code variable after confirming that the comparison results are inconsistent.
[0011] In one embodiment of the present invention, the step of obtaining an operation instruction input by an operations and maintenance personnel to confirm a code variable requested for reading or writing includes: obtaining a first operation instruction input by the operations and maintenance personnel to confirm a code variable requested for reading or writing; identifying whether the code variable is a nested structure, and after confirming that the code variable is a nested structure, displaying all child members of the code variable in pages to wait for a second operation instruction from the operations and maintenance personnel, and confirming the child members of the code variable requested for reading or writing according to their confirmation.
[0012] This invention provides an online monitoring system for a lower-level machine, characterized by comprising: an instruction reading module, used to acquire operation instructions input by maintenance personnel to confirm code variables requested for reading and writing; a lower-level machine language service module, used to acquire first syntax information of the same code variable from the compilation product of a first engineering software based on the unique identifier of the code variable; wherein the first engineering software is acquired from the lower-level machine after logging into the upper and lower-level machines, and each code variable of the first engineering software uses its own variable name as a unique identifier; an upper-level machine language service module, used to acquire second syntax information of the same code variable from the compilation product of a second engineering software based on the unique identifier of the code variable; wherein the second engineering software is pre-imported, and each code variable of the second engineering software uses its own variable name as a unique identifier; and a monitoring table service module, used to compare the first syntax information and the second syntax information of the code variable, and prohibit the read and write permissions of the code variable after confirming that the comparison results are inconsistent.
[0013] An electronic device includes a processor coupled to a memory storing program instructions that, when executed by the processor, implement the method described above.
[0014] A computer-readable storage medium includes a program that, when run on a computer, causes the computer to perform the methods described above.
[0015] The beneficial effects of this invention are as follows: By using the variable name as the unique identifier of the variable, this invention can perform consistency verification on the syntax information of the same variable in the upper and lower computers. When maintenance personnel need to debug variables under different engineering software versions in the upper and lower computers, it can help them know the consistency of the variables written in the upper and lower computers, avoid the security risks of operating on inconsistent variables, realize the intelligent upgrade of the industrial monitoring system, and greatly reduce the system failure rate. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0017] Figure 1 This is a flowchart illustrating an online monitoring method for a lower-level machine provided in one embodiment of the present invention;
[0018] Figure 2 This is a schematic diagram of the structure of an online monitoring system for a lower-level machine provided in one embodiment of the present invention; Figure 3 This is a flowchart illustrating an online monitoring method for a lower-level machine provided in one embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an online monitoring system for a lower-level machine provided in one embodiment of the present invention; Figure 5 This is a structural block diagram of an electronic device provided in one embodiment of the present invention. Detailed Implementation
[0019] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings, which illustrate embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of this application will be thorough and complete.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0021] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0022] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0023] Example 1 Please see Figure 1 As shown, an online monitoring method for a lower-level machine, applied to a higher-level machine, includes: Step S110: After logging into the upper and lower level machines, obtain the first engineering software installed in the lower level machine.
[0024] As we can understand, the host computer refers to the monitoring software running on a PC or industrial control computer, while the slave computer refers to the PLC in the field, which can execute corresponding control logic, such as collecting field signals and driving the operation of field machines / equipment. Therefore, maintenance personnel can log into the slave computer through the host computer to control the field machines / equipment, monitor the PLC's operating status, or test the PLC, etc.
[0025] Furthermore, the PLC will download and install the corresponding engineering software as its control logic (such as ladder diagrams, ST language, etc.). In practical applications, the PLC debugging process often generates several versions of engineering software. Before debugging the PLC, maintenance personnel need to ensure that the engineering software imported into the host computer is consistent with the version of the engineering software installed in the PLC. This avoids situations where the PLC is still using an older version, thus ensuring that the syntax information for the same variable in the host computer and the slave computer is consistent. Otherwise, production accidents can easily occur.
[0026] For example, if maintenance personnel add a new variable through the host computer, and the host computer writes it according to the v2.1 version of the engineering software, which is 12 bytes, and synchronizes it to the PLC, but the PLC is using the v2.0 version of the engineering software, the variable being written may be only 8 bytes. Consequently, write failure, overwriting of other variables, or PLC crash may occur.
[0027] Therefore, in this embodiment, when the maintenance personnel log in to the PLC through the host computer, the host computer will obtain the engineering software currently installed on the PLC, namely the first engineering software mentioned above, and perform a consistency check with the engineering software that it was previously imported, namely the second engineering software, so as to identify whether the engineering software versions of the host computer and the slave computer are consistent.
[0028] Step S120: Analyze the compilation output of the first engineering software to identify the first syntax information defined by each code variable therein; wherein, the code variables compiled by the first engineering software are uniquely identified by their own variable names.
[0029] Step S130: Analyze the compilation output of the pre-imported second engineering software to identify the second syntax information defined by each code variable therein; wherein, the code variables compiled by the second engineering software are uniquely identified by their own variable names.
[0030] It should be noted that existing monitoring systems only require successful login to the PLC to read and write variables, regardless of whether the upper / lower-level engineering software versions are consistent. The restrictions on reading and writing are relatively lenient. Firstly, "consistency verification" is not a necessary procedure in PLC debugging; it's merely to avoid inconsistencies in variable syntax between the upper / lower-level machines, thus reducing debugging time and troubleshooting difficulty. Secondly, existing monitoring systems define variables using logical addresses as unique identifiers. Since the definitions of variable logical addresses in the upper / lower-level machines are inevitably different, it's impossible to compare variables by associating them with the same variable in the upper / lower-level machines based on their logical addresses.
[0031] Therefore, considering the shortcomings of the existing technology, in this embodiment, the variable name will be used as the unique identifier of the variable, instead of the logical address of the variable.
[0032] Step S140: Based on the unique identifier of the code variable, compare the first syntax information and the second syntax information of the code variable with the same identifier, and confirm whether the first engineering software and the second engineering software are consistent based on the comparison results of all code variables, so as to remind the operation and maintenance personnel to replace the second engineering software after confirming that they are inconsistent.
[0033] Specifically, since the syntax information (first syntax information) of each code variable in the engineering software (first engineering software) installed on the PLC and the syntax information (second syntax information) of each code variable in the engineering software (second engineering software) installed on the host computer have been predetermined, the same code variable can be indexed in the first and second engineering software according to the unique identifier (variable name) of the code variable, thereby enabling comparison.
[0034] In response, when there is an inconsistency between the first and second syntax information of at least one code variable, and the number of code variables with inconsistent first and second syntax information exceeds a preset threshold, due to the large number of erroneous variable syntax information, it may be that the host computer has mistakenly imported other engineering software, i.e., the second engineering software has been imported incorrectly. Accordingly, the monitoring table can be used to remind the maintenance personnel to replace the engineering software on the host computer.
[0035] When there is a discrepancy between the first and second syntax information of at least one code variable, and the number of code variables with discrepancies between the first and second syntax information does not exceed a preset threshold, it may simply be that the engineering software (first engineering software) in the PLC is inconsistent with the engineering software (second engineering software) of the host computer. Accordingly, the monitoring table can be used to remind maintenance personnel to update the engineering software version of the host computer.
[0036] It is understandable that this issue often arises because the PLC's engineering software is an older version, leading to inconsistencies between the newer version of the engineering software installed on the host computer and the PLC, resulting in inconsistent variable syntax information. Therefore, maintenance personnel can either downgrade the host computer's engineering software to an older version or control the PLC to download the newer version of the engineering software via the host computer to resolve the problem. There are no restrictions on the method; both methods are acceptable, as long as the variable syntax information on the host and slave computers is consistent. Modifications and refinements made to the embodiments of this invention by those skilled in the art without departing from the spirit of this invention still fall within the scope of this invention's patent application.
[0037] Furthermore, when the first and second syntax information of all code variables are consistent, it can be considered that the engineering software in the PLC (first engineering software) and the engineering software in the host computer (second engineering software) are completely consistent. Accordingly, the monitoring table can be used to remind the operation and maintenance personnel that they can perform read and write operations on the code variables.
[0038] It should also be noted that the monitoring table mentioned above is the operation panel for maintenance personnel, i.e., the physical form of the host computer. In practical applications, when maintenance personnel log in to the PLC online through the monitoring table and click the monitoring button, the monitoring table will simultaneously obtain all variables of the first and second engineering software and display them in the same column of the table, making it convenient for maintenance personnel to know the consistency of variables in the host / slave computers.
[0039] In addition, the consistency verification operations for each variable can be visualized through the monitoring table for maintenance personnel to view. If the consistency verification passes, maintenance personnel can then perform read and write operations on the variables to debug the PLC.
[0040] It should be noted that the steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0041] Example 2 Please see Figure 2 As shown, this application provides an online monitoring system for a lower-level machine, comprising: The communication module 10 is used to obtain the first engineering software installed in the lower-level machine after logging into the upper and lower-level machines.
[0042] The lower-level language service module 20 is used to analyze the compilation output of the first engineering software to identify the first syntax information defined by each code variable therein; wherein, the code variables compiled by the first engineering software are uniquely identified by their own variable names.
[0043] The host computer language service module 30 is used to analyze the compilation product of the second engineering software based on the pre-imported second engineering software, so as to identify the second syntax information defined by each code variable therein; wherein, the code variables compiled by the second engineering software are uniquely identified by their own variable names.
[0044] The monitoring table service module 40 is used to compare the first and second syntax information of code variables with the same unique identifier based on the unique identifier of the code variable, and to confirm whether the first engineering software and the second engineering software are consistent based on the comparison results of all code variables, so as to remind the operation and maintenance personnel to replace the second engineering software after confirming that they are inconsistent.
[0045] In addition, there are subscription modules, which can be used to incrementally subscribe to the actual values of lower-level machine variables; IEC61131-3-based converters, which can be used to convert the implicit type of legal literals into a specific data type display format; IEC61131-3-based display format analyzers, which can be used to analyze the display format of literals; IEC61131-3-based data type analyzers, which can be used to analyze the possible data types of literals; IEC61131-3-based validators, which can be used to verify whether the literals are legal; IEC61131-3-based formatters, which can be used to format literals, and other functional modules. These are not limited, and any modifications and refinements made by those skilled in the art to the embodiments of this invention without departing from the spirit of this invention still fall within the scope of the invention application patent.
[0046] It should be noted that the online monitoring system for the lower-level machine provided in the above embodiments and the online monitoring method for the lower-level machine provided in Embodiment 1 belong to the same concept. The specific methods by which each module and unit performs operations have been described in detail in the method embodiments and will not be repeated here. In practical applications, the online monitoring method for the lower-level machine provided in Embodiment 1 can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0047] Example 3 Please see Figure 3 As shown, this application also provides an online monitoring method for a lower-level machine, including: Step S210: Obtain the operation instructions input by the operation and maintenance personnel to confirm the code variables requested for reading and writing.
[0048] Step S220: Obtain the first syntax information of the same code variable from the compilation product of the first engineering software according to the unique identifier of the code variable; wherein, the first engineering software is obtained from the lower-level machine after logging into the upper and lower-level machines, and each code variable of the first engineering software uses its own variable name as a unique identifier.
[0049] Step S230: Obtain the second syntax information of the same code variable from the compilation product of the second engineering software according to the unique identifier of the code variable; wherein, the second engineering software is pre-imported, and each code variable of the second engineering software uses its own variable name as a unique identifier.
[0050] Step S240: Compare the first syntax information and the second syntax information of the code variable, and prohibit the read and write permissions of the code variable after confirming that the comparison results are inconsistent.
[0051] It is understood that the online monitoring method provided in Embodiment 1 above is automatically triggered after the host computer logs into the PLC to prevent the initial inconsistency between the host and slave software. However, the online monitoring method provided in this embodiment is actually triggered after any read / write operation on any variable. The execution logic of the two methods is not the same. Accordingly, the online monitoring method provided in this embodiment can be deployed simultaneously with the online monitoring method provided in Embodiment 1 to achieve dual protection, or only one set can be deployed. There is no limitation on this. Modifications and refinements made by those skilled in the art to the embodiments of this invention without departing from the spirit of this invention still fall within the scope of the invention application patent of this invention.
[0052] It is understandable that in practical applications, due to the different division of labor in editing and debugging engineering software, different maintenance personnel may only be responsible for editing and defining a part of the program and its variables.
[0053] Therefore, based on the online monitoring method described in Embodiment 1 above, after the host computer logs into the PLC and the software verification passes, the online monitoring method provided in this embodiment can achieve decoupling between reading and writing different variables by performing individual verification for any variable.
[0054] Correspondingly, during the debugging process, there may be variables with consistent and inconsistent syntax information at the same time. As long as the syntax information is consistent, they can be read and written, while inconsistent variables cannot be read and written.
[0055] Specifically, when maintenance personnel trigger a read / write operation on any variable through the monitoring table, the monitoring table will obtain the syntax information (first syntax information) of the variable from the PLC's engineering software (first engineering software) and the syntax information (second syntax information) of the variable from the host computer's engineering software (second engineering software) according to the corresponding operation instructions, thereby performing consistency verification.
[0056] It should be noted that in medium to large-scale projects, PLC programs frequently use complex data structures, such as multi-level nested structures and array types. However, existing monitoring systems generally lack pagination for structures and arrays with a large number of member variables in their monitoring tables. This often results in member variables filling the entire screen when expanding such arrays or structures, leading to low information density in the monitoring table. Maintenance personnel often need to frequently scroll up and down to debug different variables, resulting in low debugging efficiency.
[0057] Therefore, in this embodiment, the monitoring table will display the sub-members of each code variable in a paginated manner, avoiding the problem of a complex nested structure variable filling the entire screen after expansion, improving the information density of the monitoring table, and significantly improving the situation where maintenance personnel repeatedly scroll up and down to debug variables.
[0058] Accordingly, the monitoring table will first confirm the code variable to be read or written based on the first operation instruction entered by the operations and maintenance personnel, and then display all the sub-members of the code variable in pages, thus waiting for the second operation instruction from the operations and maintenance personnel, that is, which sub-member of the variable the subsequent read or write operation is specifically targeting.
[0059] Finally, after performing a consistency check on the code variable, if the upper / lower machine syntax information is consistent, the operation and maintenance personnel can be allowed to read and write all sub-members of the variable; otherwise, the read and write permissions of the variable are prohibited. This will not be described in detail here, but you can refer to the above embodiment 1.
[0060] It should be noted that the steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0061] Example 4 Accordingly, please see Figure 4 As shown, this application also provides an online monitoring system for a lower-level machine, comprising: The instruction reading module 50 is used to obtain the operation instructions input by the operation and maintenance personnel to confirm the code variables requested for reading and writing; The lower-level machine language service module 20 is used to obtain the first syntax information of the same code variable from the compilation product of the first engineering software according to the unique identifier of the code variable; wherein, the first engineering software is obtained from the lower-level machine after logging into the upper and lower-level machines, and each code variable of the first engineering software uses its own variable name as a unique identifier. The host computer language service module 30 is used to obtain the second syntax information of the same code variable from the compilation product of the second engineering software according to the unique identifier of the code variable; wherein, the second engineering software is pre-imported, and each code variable of the second engineering software uses its own variable name as a unique identifier; The monitoring table service module 40 is used to compare the first syntax information and the second syntax information of the code variable, and to prohibit the read and write permissions of the code variable after confirming that the comparison results are inconsistent.
[0062] In addition, there is a communication module 10; a subscription module, which can be used to incrementally subscribe to the actual values of lower-level machine variables; an IEC61131-3 based converter, which can be used to convert the implicit type of a legal literal into a display format of a specific data type; an IEC61131-3 based display format analyzer, which can be used to analyze the display format of literals; an IEC61131-3 based data type analyzer, which can be used to analyze the possible data types of literals; an IEC61131-3 based verifier, which can be used to verify whether the literal is legal; an IEC61131-3 based formatter, which can be used to format literals, and other functional modules. These are not limited in scope. Modifications and refinements made by those skilled in the art to the embodiments of this invention without departing from the spirit of this invention still fall within the scope of the invention application patent.
[0063] It should be noted that the online monitoring system for the lower-level machine provided in the above embodiments and the online monitoring method for the lower-level machine provided in Embodiment 1 belong to the same concept. The specific methods by which each module and unit performs operations have been described in detail in the method embodiments and will not be repeated here. In practical applications, the online monitoring method for the lower-level machine provided in Embodiment 1 can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0064] Example 5 Please see Figure 5 As shown, embodiments of this application also provide an electronic device, including a memory 2, a processor 1, and a program stored in the memory and executable on the processor, wherein the processor executes the steps of any of the methods described above.
[0065] The memory includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory can include both internal and external storage units of the electronic device. The memory can be used not only to store application software and various types of data installed on the electronic device, but also to temporarily store data that has been output or will be output.
[0066] In some embodiments, a processor may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions. This includes combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor is the control unit of the electronic device, connecting various components of the device via various interfaces and lines. It executes programs or modules stored in the memory and calls data stored in the memory to perform various functions and process data within the electronic device.
[0067] The processor executes the operating system of the electronic device and various installed applications. The processor executes the applications to implement the steps in the above method embodiments.
[0068] For example, the program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of program instruction segments capable of performing a specific function, which describe the execution process of the program in the electronic device.
[0069] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute some of the functions of the various embodiments of the present invention.
[0070] In summary, this invention uses variable names as unique identifiers to verify the consistency of syntax information for the same variable in upper and lower computers. When maintenance personnel need to debug variables under different engineering software versions in upper and lower computers, it can help them know the consistency of the variables written in upper and lower computers, avoid security risks associated with inconsistent variables, realize the intelligent upgrade of industrial monitoring systems, and greatly reduce the system failure rate.
[0071] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. An online monitoring method for a lower-level machine, characterized in that, Applied to a host computer, the method includes: After logging into the upper and lower level machines, obtain the first engineering software installed in the lower level machine; The compilation output of the first engineering software is analyzed to identify the first syntax information defined by each code variable therein; wherein, the code variables compiled by the first engineering software are uniquely identified by their own variable names; Based on the pre-imported second engineering software, analyze the compilation output of the second engineering software to identify the second syntax information defined by each code variable; wherein, the code variables compiled by the second engineering software are uniquely identified by their own variable names; Based on the unique identifier of the code variable, the first syntax information and the second syntax information of the code variable with the same identifier are compared, and the consistency between the first engineering software and the second engineering software is confirmed according to the comparison results of all code variables. If the inconsistency is confirmed, the operation and maintenance personnel are reminded to replace the second engineering software.
2. The online monitoring method for a lower-level machine according to claim 1, characterized in that, The steps for confirming whether the versions of the first and second engineering software are consistent based on the comparison results of all code variables, and for reminding maintenance personnel to replace the second engineering software after confirming inconsistency, include: When there is a discrepancy between the first and second syntax information of at least one code variable, the inconsistency between the first and second engineering software is identified, and the maintenance personnel are reminded to replace the second engineering software by displaying the information in the monitoring table. When the first and second syntax information of all code variables are consistent, the first engineering software and the second engineering software are identified as completely identical, and the monitoring table will display a reminder to the operation and maintenance personnel that they can perform read and write operations on the code variables.
3. The online monitoring method for the lower-level machine according to claim 2, characterized in that, When there is a discrepancy between the first and second syntax information of at least one code variable, the system identifies the inconsistency between the first and second engineering software and alerts maintenance personnel to replace the second engineering software via a monitoring table. This includes: If the number of code variables that are inconsistent between the first and second syntax information exceeds a preset threshold, the second engineering software import error will be identified, and the maintenance personnel will be reminded to replace the second engineering software through the monitoring table. If the number of code variables that are inconsistent between the first and second syntax information does not exceed a preset threshold, the second engineering software version is identified as abnormal, and the monitoring table is used to remind the operation and maintenance personnel to update the version of the second engineering software.
4. The online monitoring method for a lower-level machine according to claim 1, characterized in that, After confirming that the first engineering software and the second engineering software are consistent, the process further includes: The various code variables of the first engineering software are displayed in tabular form on the monitoring table so that maintenance personnel can read and write the code variables.
5. An online monitoring system for a lower-level machine, characterized in that, include: The communication module is used to obtain the first engineering software installed in the lower-level machine after logging into the upper and lower-level machines; The lower-level language service module is used to analyze the compilation output of the first engineering software to identify the first syntax information defined by each code variable therein; wherein, the code variables compiled by the first engineering software are uniquely identified by their own variable names; The host computer language service module is used to analyze the compilation product of the pre-imported second engineering software to identify the second syntax information defined by each code variable therein; wherein, the code variables compiled by the second engineering software are uniquely identified by their own variable names; The monitoring table service module is used to compare the first and second syntax information of code variables with the same unique identifier based on the unique identifier of the code variable, and to confirm whether the first engineering software and the second engineering software are consistent based on the comparison results of all code variables, so as to remind the operation and maintenance personnel to replace the second engineering software after confirming that they are inconsistent.
6. An online monitoring method for a lower-level machine, characterized in that, Applied to a host computer, the method includes: Obtain the operation instructions input by the operation and maintenance personnel to confirm the code variables requested for reading and writing; The first syntax information of the same code variable is obtained from the compilation product of the first engineering software according to the unique identifier of the code variable; wherein, the first engineering software is obtained from the lower-level machine after logging into the upper and lower-level machines, and each code variable of the first engineering software uses its own variable name as a unique identifier. The second syntax information of the same code variable is obtained from the compilation product of the second engineering software according to the unique identifier of the code variable; wherein, the second engineering software is pre-imported, and each code variable of the second engineering software uses its own variable name as a unique identifier; The first and second syntax information of the code variable are compared, and read and write permissions of the code variable are prohibited after confirming that the comparison results are inconsistent.
7. The online monitoring method for a lower-level machine according to claim 6, characterized in that, The steps for obtaining operation commands input by operations and maintenance personnel to confirm the code variables requested for reading or writing include: Obtain the first operation command input by the operation and maintenance personnel to confirm the code variable requested for reading or writing; The system identifies whether the code variable is a nested structure. After confirming that the code variable is a nested structure, it displays all the child members of the code variable in pages to await the second operation instruction from the operation and maintenance personnel, and reads and writes the child members of the code variable according to their confirmation request.
8. An online monitoring system for a lower-level machine, characterized in that, include: The instruction reading module is used to obtain the operation instructions input by the operation and maintenance personnel in order to confirm the code variables requested for reading and writing; The lower-level machine language service module is used to obtain the first syntax information of the same code variable from the compilation product of the first engineering software according to the unique identifier of the code variable; wherein, the first engineering software is obtained from the lower-level machine after logging into the upper and lower-level machines, and each code variable of the first engineering software uses its own variable name as a unique identifier. The host computer language service module is used to obtain the second syntax information of the same code variable from the compilation product of the second engineering software according to the unique identifier of the code variable; wherein, the second engineering software is pre-imported, and each code variable of the second engineering software uses its own variable name as a unique identifier; The monitoring table service module is used to compare the first syntax information and the second syntax information of the code variable, and to prohibit the read and write permissions of the code variable after confirming that the comparison results are inconsistent.
9. An electronic device, characterized in that, The method includes a processor coupled to a memory storing program instructions, which, when executed by the processor, implement the method of any one of claims 1-4 or 6-7.
10. A computer-readable storage medium, characterized in that, Includes a program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-4 or 6-7.