An operation information processing method and device applied to configuration software
By adopting universal operation event entries and record format key-value pairs in the configuration software, the problem of low development efficiency in the operation recording process is solved, the operation records are generalized and simplified, development efficiency is improved and the cost of multi-language switching is reduced.
Patent Information
- Application Number
- CN202311242474.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-09-25
AI Technical Summary
In configuration software, the recording of operation information is hampered by an excessive number of predefined operation event entries, leading to low development efficiency and increased costs when switching between multiple languages.
Using generic operation event entries, operation information is processed through record format key-value pairs to generate operation record data in a generic record format. An operation record data queue is then generated based on timestamps to display the target operation record data.
It has achieved the standardization and simplification of operation records, improved development efficiency, and reduced the cost of switching between multiple languages.
Smart Images

Figure CN117251497B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of configuration software technology, and in particular to a method and apparatus for processing operation information in configuration software. Background Technology
[0002] In the field of industrial control, configuration software collects and processes information, and displays various information in the industrial production process to operators in a graphical way, so that corresponding control commands can be issued based on this information, and ultimately respond to various situations on site.
[0003] To prevent operators from generating incorrect control commands and to ensure the traceability of operational information, it is usually necessary to record operator actions. Manually recording this information would be extremely labor-intensive. Therefore, automatic recording and generation of corresponding information based on operator actions is preferable. However, the recording process involves processing each action as a predefined operation event entry. As the software configuration expands, the number of operations increases, leading to a greater number of predefined operation event entries. This necessitates matching the corresponding functions with the operation objects, resulting in a significant workload. Furthermore, industrial control systems often contain numerous technical terms, reducing development efficiency when implementing multilingual switching. Summary of the Invention
[0004] To address the aforementioned issues, this application provides a method and apparatus for processing operation information in configuration software, thereby improving development efficiency.
[0005] To achieve the above objectives, this application provides the following technical solution:
[0006] A method for processing operation information in configuration software, comprising:
[0007] Obtain operation information;
[0008] Based on preset general operation event entries, the operation information is processed to obtain operation record data. The general operation event entries include multiple record format key-value pairs, and each record format key-value pair is used to represent the general record format of operation record data for different functions or different objects.
[0009] Display the target operation record data.
[0010] Optionally, the method further includes:
[0011] The default symbol field for the operation record fields in the preset configuration function area;
[0012] Based on the general symbol field and object identification information, a record format key-value pair is generated. The key in the record format key-value pair represents the object identification information, and the value in the record format key-value pair represents the general symbol field of the operation action.
[0013] Define the set of key-value pairs of each record format as a generic operation event entry.
[0014] Optionally, the step of processing the operation information based on preset general operation event entries to obtain operation record data includes:
[0015] Obtain the operation object corresponding to the operation information, and construct all key-value pairs of the current object's operation objects based on all parent-related information of the operation object;
[0016] Obtain the operation action corresponding to the operation information, and generate an action object key-value pair based on the type corresponding to the operation action;
[0017] Based on the record format key-value pairs, the operation object key-value pairs and the action object key-value pairs are matched to obtain operation record data.
[0018] Optionally, the method further includes:
[0019] Based on the timestamp corresponding to each operation record data, an operation record data queue is generated, and the operation record data queue includes multiple operation record data recorded according to the timestamp.
[0020] Save the operation record data queue.
[0021] Optionally, the display of target operation record data includes:
[0022] Obtain historical operation record data;
[0023] The historical operation record data and the currently cached operation record data are merged to obtain the target operation record data;
[0024] Determine the display mode corresponding to the target operation record data, and display the target operation record data based on the display mode.
[0025] An operation information processing device for configuration software, comprising:
[0026] The acquisition unit is used to acquire operation information;
[0027] The processing unit is used to process the operation information based on a preset general operation event entry to obtain operation record data. The general operation event entry includes multiple record format key-value pairs, and each record format key-value pair is used to represent the general record format of operation record data for different functions or different objects.
[0028] The display unit is used to display the target operation record data.
[0029] Optionally, the device further includes:
[0030] The preset unit is used to preset the common symbol field of all configuration function area operation record fields;
[0031] The generation unit is used to generate record format key-value pairs based on the general symbol field and object identification information, wherein the key in the record format key-value pair represents the object identification information, and the value in the record format key-value pair represents the general symbol field of the operation action;
[0032] The defining unit is used to define the set of each record format key-value pair as a generic operation event entry.
[0033] Optionally, the processing unit is specifically used for:
[0034] Obtain the operation object corresponding to the operation information, and construct all key-value pairs of the current object's operation objects based on all parent-related information of the operation object;
[0035] Obtain the operation action corresponding to the operation information, and generate an action object key-value pair based on the type corresponding to the operation action;
[0036] Based on the record format key-value pairs, the operation object key-value pairs and the action object key-value pairs are matched to obtain operation record data.
[0037] Optionally, the device further includes:
[0038] A queue generation unit is used to generate an operation record data queue based on the record timestamp corresponding to each operation record data. The operation record data queue includes multiple operation record data recorded according to the record timestamp.
[0039] A storage unit is used to store the operation record data queue.
[0040] Optionally, the display unit is specifically used for:
[0041] Obtain historical operation record data;
[0042] The historical operation record data and the currently cached operation record data are merged to obtain the target operation record data;
[0043] Determine the display mode corresponding to the target operation record data, and display the target operation record data based on the display mode.
[0044] Compared to existing technologies, this application provides a method and apparatus for processing operation information in configuration software. The method includes: acquiring operation information; processing the operation information based on preset general operation event entries to obtain operation record data, wherein each general operation event entry includes multiple record format key-value pairs, and each record format key-value pair represents a general record format for the operation record data; and displaying the target operation record data. This application can record operation information using preset general record format key-value pairs, achieving generalization of operation data recording and improving development efficiency. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0046] Figure 1 A flowchart illustrating an operation information processing method for configuration software provided in an embodiment of this application;
[0047] Figure 2 A schematic diagram of an operation record management module provided in an embodiment of this application;
[0048] Figure 3 A flowchart of operation record processing is provided for an embodiment of this application;
[0049] Figure 4 This is a schematic diagram of an operation information processing device for configuration software provided in an embodiment of this application. Detailed Implementation
[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0051] The terms "first" and "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units may include steps or units not listed, but rather not listed.
[0052] This application provides a method for processing operation information in configuration software. This method can record and save user operations such as configuration (add, delete, modify), compilation, and downloading in the configuration software. The operation record consists of at least three parts: user, time, and operation log. In industrial control systems, different roles are assigned different permissions; therefore, it is necessary to record what kind of operation each role performs at what time. A complete configuration consists of multiple functional areas (hardware configuration, variable configuration, control logic configuration, etc.), each containing different sub-functional areas, which are further divided into different components or operation objects. Therefore, operation records for something like operator xxx adding (deleting, modifying) xxx in sub-functional area xxx of functional area xxx at xxx time will differ between functional areas. This results in a large number of predefined operation event entries, low development efficiency, and additional costs when switching between multiple languages. This application defines several general formats based on the operation methods of different functional areas. By predefining wildcards for each functional area and component, during the implementation phase, it is only necessary to pass the object name and wildcard key-value pair to the operation record management module. When displaying the operation record, it is only necessary to concatenate the operation record wildcard key-value pairs. This simplifies and generalizes the operation record fields.
[0053] See Figure 1 This is a flowchart illustrating an operation information processing method for configuration software provided in an embodiment of this application. The method may include the following steps:
[0054] S101. Obtain operation information.
[0055] S102. Based on preset general operation event entries, the operation information is processed to obtain operation record data.
[0056] S103. Display the target operation record data.
[0057] The general operation event entry includes multiple record format key-value pairs, each of which is used to represent a general record format for different functions or different object operation record data.
[0058] In this embodiment, the operation information refers to the operation information generated when the current user performs configuration (add, delete, modify), compilation, and download operations in the configuration software. Then, by loading preset general operation event entries, i.e., loading record format key-value pairs, the configuration software can automatically load built-in general operation event entries.
[0059] Since user-generated operation information can be based on different operation function areas or different operation languages, to facilitate recording and subsequent information traceability, the operation information can be processed based on preset universal operation event entries to obtain operation record data, i.e., this operation record data is a universally formatted data. During the generation of operation record data, developers can assemble the current operation into operation record data according to the user's on-site process and cache it in an operation record queue. Further, based on the recording timestamp corresponding to each operation record data, an operation record data queue is generated, comprising multiple operation record data entries recorded according to the recording timestamp; the operation record data queue is then saved.
[0060] Then, the generated operation log data can be displayed and saved. Furthermore, the configuration software can format and output the cached record data queue according to the user's selection, or save the generated operation log data to the corresponding storage area, such as saving it locally. In order to ensure data security, the operation log data can also be encrypted before saving.
[0061] In this embodiment of the application, it also includes:
[0062] Pre-configure a common symbol field for all operation record fields in the configuration function area;
[0063] Based on the general symbol field and object identification information, a record format key-value pair is generated. The key in the record format key-value pair represents the object identification information, and the value in the record format key-value pair represents the general symbol field of the operation action.
[0064] Define the set of key-value pairs of each record format as a generic operation event entry.
[0065] Specifically, when executing the loading record format key-value pairs, the common operation events built into the various functions of the configuration software are first developed. The record format key-value pairs consist of key-value pairs, where the key is the object ID (object identification information), and the record format value represents the wildcard field represented by the current object ID. For example, the record format definitions in the hardware configuration function area are as follows: CS: "[%s] control station", RACK: "[%s] rack", SLOT: "[%s] slot", MODULE: "[%s] module", DEVICE: "[%s] device". Operation (action) record format definitions include: ADD: "Add", DEL: "Delete", MODIFY: "%Old to %New", IMPORT: "Import [%s]", and EXPORT: "Export [%s]", etc. The loaded record format key-value pairs are then cached in the operation record management module.
[0066] In one implementation, processing the operation information based on preset general operation event entries to obtain operation record data includes: obtaining the operation object corresponding to the operation information, and constructing all operation object key-value pair data of the current object based on all parent-related information of the operation object; obtaining the operation action corresponding to the operation information, and generating action object key-value pairs based on the type corresponding to the operation action; matching the operation object key-value pair data and the action object key-value pair based on the record format key-value pair to generate operation record data of the current operation object. In this embodiment, obtaining all parent-related information of the operation object means being able to reverse-engineer all related information of the current operation object's parent nodes. These parent nodes can be the current operation object's parent node, or their parent-parent node (the parent node's parent node, which can be called a grandparent node), or their grandparent node's parent node (the great-grandparent node). That is, in this embodiment, all parent nodes corresponding to the current operation can be obtained. These parent nodes can be the current operation object's direct parent node, or its parent-parent node, etc.
[0067] When executing record operation data, the development team utilizes the operation record management module's function to construct operation object key-value pairs. This retrieves all operation object key-value pairs from the parent node of the current operation object. The key of each operation object key-value pair is the object ID, and the value is the name of the respective object. Furthermore, the operation record management module adds operation format specifier key-value pairs based on the passed operation (action) of the current object, and finally caches these in the operation record queue. The operation record queue is arranged sequentially, and each operation record consists of multiple operation object key-value pairs.
[0068] Furthermore, the display of target operation record data in the embodiments of this application includes:
[0069] Obtain historical operation record data;
[0070] The historical operation record data and the currently cached operation record data are merged to obtain the target operation record data;
[0071] Determine the display mode corresponding to the target operation record data, and display the target operation record data based on the display mode.
[0072] The display mode can be determined based on the selected compilation language or the user-selected operation record data. Specifically, the function of displaying historical operation records to the user first loads the saved historical operation records and merges them with the currently cached operation records. The operation record management module then loops through all operation object key-value pairs, matching the keys with the record format key-value pairs. After matching, the values of the record format key-value pairs are formatted using the values of the operation object key-value pairs. Finally, all the formatted output data is concatenated, and the display can switch languages according to the actual language type.
[0073] When performing a save operation, the real-time cached operation record data is saved locally. For example, the operation record data can be saved as a single file up to 20,000 records. If the data exceeds this limit, it will be saved in multiple files.
[0074] In this application's embodiments, the generic record format key-value pairs and the constructed operation object key-value pairs greatly reduce the definition of operation record events, and eliminate the need for manual formatting and outputting of record times based on the current operation. Furthermore, the streamlined generic record format key-value pairs significantly reduce development costs and improve development efficiency.
[0075] See Figure 2 This is a schematic diagram of an operation record management module provided in an embodiment of this application. In this operation record management module, the operation record format management unit includes multiple record format key-value pairs, the operation object key-value pair management unit may include multiple operation object key-value pairs, and the operation record data queue includes multiple operation record data.
[0076] See Figure 3This document provides a flowchart of an operation record processing method, including operation record assembly and display. When a user performs an operation, the information is converted into operation record data. Then, operation object key-value pairs are generated based on the operation object key-value pair management unit, and record format key-value pairs are generated based on the operation record format management unit, resulting in formatted operation record data, which is then cached. Multiple operation record data entries are cached in an operation record data queue. During visualization, historical operation record data and cached operation record data are merged and displayed.
[0077] In another embodiment of this application, an operation information processing device for configuration software is also provided, see [link to relevant documentation]. Figure 4 ,include:
[0078] Acquisition unit 201 is used to acquire operation information;
[0079] The processing unit 202 is used to process the operation information based on a preset general operation event entry to obtain operation record data. The general operation event entry includes multiple record format key-value pairs, and each record format key-value pair is used to represent the general record format of operation record data for different functions or different objects.
[0080] Display unit 203 is used to display target operation record data.
[0081] Optionally, the device further includes:
[0082] The preset unit is used to preset the common symbol field of all configuration function area operation record fields;
[0083] The generation unit is used to generate record format key-value pairs based on the general symbol field and object identification information, wherein the key in the record format key-value pair represents the object identification information, and the value in the record format key-value pair represents the general symbol field of the operation action;
[0084] The defining unit is used to define the set of each record format key-value pair as a generic operation event entry.
[0085] Optionally, the processing unit is specifically used for:
[0086] Obtain the operation object corresponding to the operation information, and construct all key-value pairs of the current object's operation objects based on all parent-related information of the operation object;
[0087] Obtain the operation action corresponding to the operation information, and generate an action object key-value pair based on the type corresponding to the operation action;
[0088] Based on the record format key-value pairs, the operation object key-value pairs and the action object key-value pairs are matched to obtain operation record data.
[0089] Optionally, the device further includes:
[0090] A queue generation unit is used to generate an operation record data queue based on the record timestamp corresponding to each operation record data. The operation record data queue includes multiple operation record data recorded according to the record timestamp.
[0091] A storage unit is used to store the operation record data queue.
[0092] Optionally, the display unit is specifically used for:
[0093] Obtain historical operation record data;
[0094] The historical operation record data and the currently cached operation record data are merged to obtain the target operation record data;
[0095] Determine the display mode corresponding to the target operation record data, and display the target operation record data based on the display mode.
[0096] Based on the foregoing embodiments, embodiments of this application provide a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement an operation information processing method for configuration software as described in any of the above claims.
[0097] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements an operation information processing method applied to configuration software.
[0098] It should be noted that the aforementioned processor or CPU can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), controller, microcontroller, and microprocessor. Understandably, the electronic device implementing the above processor function can also be other types, and this application does not specifically limit its capabilities.
[0099] It should be noted that the aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; it can also be various terminals that include one or any combination of the above-mentioned memory, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0101] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0102] Furthermore, in the various embodiments of this application, all functional units can be integrated into one processing module, or each unit can be a separate unit, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0103] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0104] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0105] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0106] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0107] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0108] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing operation information applied to configuration software, characterized in that, include: Obtain operation information; Based on preset general operation event entries, the operation information is processed to obtain operation record data. The general operation event entries include multiple record format key-value pairs, and each record format key-value pair is used to represent the general record format of operation record data for different functions or different objects. Display the target operation record data; The operation information is processed based on preset general operation event entries to obtain operation record data, including: Obtain the operation object corresponding to the operation information, and construct all key-value pairs of the current object's operation objects based on all parent-related information of the operation object; Obtain the operation action corresponding to the operation information, and generate an action object key-value pair based on the type corresponding to the operation action; Based on the record format key-value pairs, the operation object key-value pairs and the action object key-value pairs are matched to obtain operation record data.
2. The method according to claim 1, characterized in that, The method further includes: Pre-configure a common symbol field for all operation record fields in the configuration function area; Based on the general symbol field and object identification information, a record format key-value pair is generated. The key in the record format key-value pair represents the object identification information, and the value in the record format key-value pair represents the general symbol field of the operation action. Define the set of key-value pairs of each record format as a generic operation event entry.
3. The method according to claim 1, characterized in that, The method further includes: Based on the timestamp corresponding to each operation record data, an operation record data queue is generated, and the operation record data queue includes multiple operation record data recorded according to the timestamp. Save the operation record data queue.
4. The method according to claim 1, characterized in that, The displayed target operation record data includes: Obtain historical operation record data; The historical operation record data and the currently cached operation record data are merged to obtain the target operation record data; Determine the display mode corresponding to the target operation record data, and display the target operation record data based on the display mode.
5. An operation information processing device for configuration software, characterized in that, include: The acquisition unit is used to acquire operation information; The processing unit is used to process the operation information based on a preset general operation event entry to obtain operation record data. The general operation event entry includes multiple record format key-value pairs, and each record format key-value pair is used to represent the general record format of operation record data for different functions or different objects. The display unit is used to display the target operation record data; The processing unit is specifically used for: Obtain the operation object corresponding to the operation information, and construct all key-value pair data of the current object's operation objects based on all parent-related information of the operation object; Obtain the operation action corresponding to the operation information, and generate an action object key-value pair based on the type corresponding to the operation action; Based on the record format key-value pairs, the operation object key-value pairs and the action object key-value pairs are matched to obtain operation record data.
6. The apparatus according to claim 5, characterized in that, The device further includes: The preset unit is used to preset the common symbol field of all configuration function area operation record fields; The generation unit is used to generate record format key-value pairs based on the general symbol field and object identification information, wherein the key in the record format key-value pair represents the object identification information, and the value in the record format key-value pair represents the general symbol field of the operation action; The defining unit is used to define the set of each record format key-value pair as a generic operation event entry.
7. The apparatus according to claim 5, characterized in that, The device further includes: A queue generation unit is used to generate an operation record data queue based on the record timestamp corresponding to each operation record data. The operation record data queue includes multiple operation record data recorded according to the record timestamp. A storage unit is used to store the operation record data queue.
8. The apparatus according to claim 5, characterized in that, The display unit is specifically used for: Obtain historical operation record data; The historical operation record data and the currently cached operation record data are merged to obtain the target operation record data; Determine the display mode corresponding to the target operation record data, and display the target operation record data based on the display mode.
Citation Information
Patent Citations
Method and device for converting configuration file into XML file, equipment and storage medium
CN113221511A