Dynamic data processing method for configuration system and related device
By creating a text display in the configuration system and writing JavaScript scripts, using the JavaScript execution engine to process real-time data, the problem that traditional configuration systems cannot process and analyze data in real time is solved, and the system flexibility and scalability are improved.
Patent Information
- Application Number
- CN202510077591.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-25
AI Technical Summary
Traditional configuration systems require preset functions when processing complex logic, and do not support real-time custom scripts, which cannot meet the real-time processing and analysis requirements of data, which increases the difficulty of data processing and limits the flexibility and scalability of the system.
Create a text display in the configuration editor, write JavaScript scripts, use the pre-created JavaScript execution engine execution script to judge the real-time data of the to-process test points, obtain the data processing results, and display the results through the text display.
Real-time data processing and analysis of the system is realized, complex logic and algorithms are supported, the flexibility and scalability of the system are improved, the data processing process is simplified, and the development and maintenance costs are reduced.
Smart Images

Figure CN119883228A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer software and industrial automation, and in particular relates to a dynamic data processing method and related device for a configuration system. Background Art
[0002] Configuration systems are commonly used in industrial automation and control systems, which configure hardware and software parameters in a graphical manner. Currently, traditional configuration systems often require preset functions when processing complex logic. Especially in the data processing process, they do not support real-time custom scripts and cannot meet the real-time processing and analysis requirements of data, which increases the difficulty of data processing and severely limits the flexibility and scalability of the system. Summary of the invention
[0003] In view of the technical problems existing in the prior art, the present invention provides a dynamic data processing method and related devices for a configuration system to solve the technical problems that traditional configuration systems do not support real-time custom scripts, cannot meet the real-time processing and analysis requirements of data, increase the difficulty of data processing, and thus seriously limit the flexibility and scalability of the system.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is:
[0005] The present invention provides a dynamic data processing method for a configuration system, comprising:
[0006] In the configuration editor, a text display is created; wherein the text display is used to display the data processing result of the measurement point to be processed;
[0007] Write JavaScript scripts according to actual business needs;
[0008] Utilize the pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the measurement point to be processed, and obtain the data processing result of the measurement point to be processed;
[0009] The data processing result of the to-be-processed measuring point is monitored and displayed on the text display.
[0010] Furthermore, the JavaScript script includes a JavaScript conditional statement and a custom text statement; wherein the JavaScript conditional statement is used to perform conditional judgment on the real-time data of the measurement point to be processed; and the custom text statement is used to determine the text display form of the data processing result of the measurement point to be processed.
[0011] Furthermore, the custom text statement is implemented by an if-else statement.
[0012] Furthermore, the pre-created JavaScript execution engine is a JavaScript parser integrated into the back end of the configuration system.
[0013] Furthermore, the JavaScript parser is Nashorn.
[0014] Furthermore, the text display is bound to the measurement point to be processed.
[0015] The present invention also provides a dynamic data processing system for a configuration system, comprising:
[0016] A text display creation module is used to create a text display in the configuration editor; wherein the text display is used to display the data processing results of the measurement points to be processed;
[0017] Script writing module, used to write JavaScript scripts according to actual business needs;
[0018] An execution processing module is used to use a pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the measurement point to be processed and obtain the data processing result of the measurement point to be processed;
[0019] The dynamic display module is used to monitor the data processing results of the measurement points to be processed and display them on the text display.
[0020] The present invention also provides a dynamic data processing device for a configuration system, comprising:
[0021] a processor suitable for executing a computer program;
[0022] A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the dynamic data processing method for the configuration system is executed.
[0023] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the dynamic data processing method for a configuration system is implemented.
[0024] The present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the dynamic data processing method for a configuration system is implemented.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] The dynamic data processing method for a configuration system provided by the present invention executes the JavaScript script to judge the real-time data of the processing measuring point, and uses the created text display to display the data processing results of the processing measuring point. By allowing the user to directly write or introduce the JavaScript script, the system can process and analyze data in real time, thereby realizing complex logic and algorithms, thereby adapting to changing application requirements; the method effectively simplifies the data processing flow, improves efficiency, and provides an intuitive way for non-programmers to enhance the data processing capability of the system without having to delve into the internal structure of the system, reducing development and maintenance costs, thereby improving the flexibility and application scope of the configuration system.
[0027] The dynamic data processing system for a configuration system, the dynamic data processing device for a configuration system and the computer-readable storage medium provided by the present invention have all the advantages of the dynamic data processing method for a configuration system. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 A flow chart of a dynamic data processing method for a configuration system provided in Example 1;
[0030] Figure 2 A structural block diagram of a dynamic data processing system for a configuration system provided in Example 2;
[0031] Figure 3 This is a structural block diagram of a dynamic data processing device for a configuration system provided in Example 3. DETAILED DESCRIPTION
[0032] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention more clearly understood, the present invention is further described in detail in the following specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0033] Example 1
[0034] As attached Figure 1 As shown, this embodiment 1 provides a dynamic data processing method for a configuration system, comprising the following steps:
[0035] Step 1: In the configuration editor, create a text display and bind the text display to the measurement point to be processed. The text display is used to display the data processing results of the measurement point to be processed; after binding the text display to the measurement point to be processed, the text display can display the data from the measurement point to be processed.
[0036] It should be noted that the text display is also provided with interactive function buttons; wherein the interactive function buttons, such as click events, are further responsive to user operations.
[0037] When binding a text display to a measurement point to be processed, first determine the communication protocol used between the measurement point to be processed and the text display; wherein the communication protocol includes serial communication, network communication or wireless communication; then configure the measurement point to be processed to output data according to the communication protocol; wherein the process of configuring the measurement point to be processed includes setting the data output format and communication parameters of the measurement point to be processed and ensuring that the measurement point can send data according to a predetermined protocol; similarly, configure the text display to receive and display data according to the communication protocol; wherein the process of configuring the text display includes setting the communication parameters of the display and writing or selecting an appropriate display program or script to correctly parse and display data from the measurement point; finally, use a predetermined communication cable or wireless connection to connect the measurement point to the text display.
[0038] Step 2: Write a JavaScript script according to actual business needs. The JavaScript script includes JavaScript conditional statements and custom text statements. The JavaScript conditional statements are used to make conditional judgments on the real-time data of the measurement point to be processed; for example, to determine whether the real-time data of the measurement point to be processed exceeds a preset threshold. The custom text statement is used to determine the text display form of the data processing result of the measurement point to be processed; that is, the custom text statement is used to determine the text to be displayed in the text display; preferably, the custom text statement is implemented by an if-else statement.
[0039] Step 3: Create a JavaScript execution engine in the configuration system to obtain a pre-created JavaScript execution engine, wherein the JavaScript execution engine is a JavaScript parser integrated in the back end of the configuration system; preferably, the JavaScript parser is Nashorn.
[0040] Step 4: Use the pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the measurement point to be processed, and obtain the data processing result of the measurement point to be processed.
[0041] Specifically, the process of using the pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the to-be-processed measuring point and obtain the data processing result of the to-be-processed measuring point is as follows:
[0042] Step 41: Acquire real-time data of the measurement point to be processed from a sensor, a database or other data source in real time.
[0043] Step 42: Utilize the pre-created JavaScript execution engine to execute the JavaScript conditional statement in the JavaScript script to determine whether the real-time data of the measurement point to be processed exceeds a preset threshold value, and obtain the data processing result of the measurement point to be processed; and determine the text display form of the data processing result of the measurement point to be processed according to the custom text statement in the JavaScript script.
[0044] Step 5: Monitor the data processing results of the pending measurement points and display them in the text display. Specifically, the data processing results of the pending measurement points are monitored; if the latest data processing results of the pending measurement points are monitored, the display value in the text display is dynamically updated using the latest processing results of the pending measurement points, so that the latest data processing results of the pending measurement points are displayed in the text display.
[0045] It should be noted that the program code of the dynamic data processing method for the configuration system described in this embodiment 1 is specifically shown in the following Table 1:
[0046] Table 1 Program code for the dynamic data processing method used in the configuration system
[0047]
[0048]
[0049] In this embodiment 1, by writing JavaScript scripts according to actual business needs, integrating the JavaScript script execution environment, and dynamically displaying the results after executing the JavaScript script in a text display, the configuration system can perform complex data calculations and processing, thereby meeting the needs of high customization and real-time response, and has wide applications in monitoring, control and data processing; comprehensive functional testing is required before actual application to ensure that the JavaScript script can be executed correctly, so that the data can be displayed accurately; secondly, by monitoring the efficiency of script execution and resource consumption, timely optimization is performed to ensure the overall performance of the system.
[0050] Example 2
[0051] As attached Figure 2 As described above, this embodiment 2 provides a dynamic data processing system for a configuration system, including a text display creation module, a script writing module, an engine creation module, an execution processing module and a dynamic display module.
[0052] A text display creation module is used to create a text display in the configuration editor and bind the text display to the measurement point to be processed; a script writing module is used to write JavaScript scripts according to actual business needs; an engine creation module is used to create a JavaScript execution engine in the configuration system and obtain a pre-created JavaScript execution engine; an execution processing module is used to use the pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the measurement point to be processed and obtain the data processing results of the measurement point to be processed; a dynamic display module is used to monitor the data processing results of the measurement point to be processed and display them in the text display.
[0053] Example 3
[0054] As attached Figure 3 As shown, this embodiment 3 provides a dynamic data processing device for a configuration system, including: a memory for storing a computer program; a processor for implementing the steps of a dynamic data processing method for a configuration system when executing the computer program.
[0055] When the processor executes the computer program, the steps of the above-mentioned dynamic data processing method for a configuration system are implemented, for example:
[0056] In the configuration editor, a text display is created, and the text display is bound to the measurement point to be processed; according to actual business needs, a JavaScript script is written; in the configuration system, a JavaScript execution engine is created, and a pre-created JavaScript execution engine is obtained; using the pre-created JavaScript execution engine, the JavaScript script is executed to judge the real-time data of the measurement point to be processed, and the data processing result of the measurement point to be processed is obtained; the data processing result of the measurement point to be processed is monitored, and displayed in the text display.
[0057] Alternatively, when the processor executes the computer program, the functions of each module in the dynamic data processing system for the configuration system are realized, for example:
[0058] A text display creation module is used to create a text display in the configuration editor and bind the text display to the measurement point to be processed; a script writing module is used to write JavaScript scripts according to actual business needs; an engine creation module is used to create a JavaScript execution engine in the configuration system and obtain a pre-created JavaScript execution engine; an execution processing module is used to use the pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the measurement point to be processed and obtain the data processing results of the measurement point to be processed; a dynamic display module is used to monitor the data processing results of the measurement point to be processed and display them in the text display.
[0059] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing preset functions, and the instruction segments are used to describe the execution process of the computer program in the dynamic data processing device for configuring the system.
[0060] For example, the computer program can be divided into a text display creation module, a script writing module, an engine creation module, an execution processing module and a dynamic display module, and the specific functions of each module are as follows: a text display creation module is used to create a text display in a configuration editor and bind the text display to a measurement point to be processed; a script writing module is used to write a JavaScript script according to actual business needs; an engine creation module is used to create a JavaScript execution engine in a configuration system and obtain a pre-created JavaScript execution engine; an execution processing module is used to use the pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the measurement point to be processed and obtain the data processing results of the measurement point to be processed; a dynamic display module is used to monitor the data processing results of the measurement point to be processed and display them in the text display.
[0061] The dynamic data processing device for the configuration system may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The dynamic data processing device for the configuration system may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above are examples of dynamic data processing devices for the configuration system and do not constitute a limitation on the dynamic data processing device for the configuration system. More components than the above may be included, or some components may be combined, or different components may be included. For example, the dynamic data processing device for the configuration system may also include input and output devices, network access devices, buses, etc.
[0062] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the dynamic data processing device for the configuration system, and uses various interfaces and lines to connect various parts of the dynamic data processing device for the configuration system.
[0063] The memory can be used to store the computer program and / or module, and the processor implements various functions of the dynamic data processing device for the configuration system by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.
[0064] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0065] Example 4
[0066] This embodiment 4 also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the dynamic data processing method for a configuration system are implemented, for example:
[0067] In the configuration editor, a text display is created, and the text display is bound to the measurement point to be processed; according to actual business needs, a JavaScript script is written; in the configuration system, a JavaScript execution engine is created, and a pre-created JavaScript execution engine is obtained; using the pre-created JavaScript execution engine, the JavaScript script is executed to judge the real-time data of the measurement point to be processed, and the data processing result of the measurement point to be processed is obtained; the data processing result of the measurement point to be processed is monitored, and displayed in the text display.
[0068] The module / unit integrated into the dynamic data processing system for the configuration system, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium.
[0069] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned dynamic data processing method for configuration system, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned dynamic data processing method for configuration system can be implemented. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.
[0070] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0071] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.
[0072] Example 5
[0073] This embodiment 5 provides a computer product, which computer program product includes a computer program, which is stored in a computer-readable storage medium; the processor of the dynamic data processing device for the configuration system reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the dynamic data processing device for the configuration system can execute the dynamic data processing method for the configuration system described in embodiment 1, which will not be repeated here.
[0074] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0075] The dynamic data processing method for the configuration system of the present invention allows the user to directly write or introduce JavaScript scripts, so that the system can process and analyze data in real time, implement complex logic and algorithms, and thus adapt to changing application requirements. This method simplifies the data processing flow, improves efficiency, and provides an intuitive way for non-programmers to enhance the data processing capability of the system without having to delve into the internal structure of the system, thereby reducing development and maintenance costs.
[0076] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.
Claims
1. A dynamic data processing method for a configuration system, characterized in that: include: In the configuration editor, a text display is created; wherein the text display is used to display the data processing result of the measurement point to be processed; Write JavaScript scripts according to actual business needs; Utilize the pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the measurement point to be processed, and obtain the data processing result of the measurement point to be processed; The data processing result of the to-be-processed measuring point is monitored and displayed on the text display.
2. A dynamic data processing method for a configuration system according to claim 1, characterized in that: The JavaScript script includes a JavaScript conditional statement and a user-defined text statement; wherein the JavaScript conditional statement is used to perform conditional judgment on the real-time data of the measurement point to be processed; and the user-defined text statement is used to determine the text display form of the data processing result of the measurement point to be processed.
3. A dynamic data processing method for a configuration system according to claim 2, characterized in that: The custom text statement is implemented by an if-else statement.
4. A dynamic data processing method for a configuration system according to claim 1, characterized in that: The pre-created JavaScript execution engine is a JavaScript parser integrated in the back end of the configuration system.
5. A dynamic data processing method for a configuration system according to claim 4, characterized in that: The JavaScript parser is Nashorn.
6. A dynamic data processing method for a configuration system according to claim 1, characterized in that: The text display is bound to the measurement point to be processed.
7. A dynamic data processing system for a configuration system, characterized in that: include: A text display creation module is used to create a text display in the configuration editor; wherein the text display is used to display the data processing results of the measurement points to be processed; Script writing module, used to write JavaScript scripts according to actual business needs; An execution processing module is used to use a pre-created JavaScript execution engine to execute the JavaScript script to judge the real-time data of the measurement point to be processed and obtain the data processing result of the measurement point to be processed; The dynamic display module is used to monitor the data processing results of the measurement points to be processed and display them on the text display.
8. A dynamic data processing device for a configuration system, characterized in that: include: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the dynamic data processing method for a configuration system according to any one of claims 1 to 6 is executed.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the dynamic data processing method for a configuration system as described in any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the dynamic data processing method for a configuration system as claimed in any one of claims 1 to 6 is implemented.