A configuration picture processing method, device, equipment and medium
Patent Information
- Application Number
- CN202611210277.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-23
AI Technical Summary
然而,传统组态设计方式中画面对齐、布局调整等细节操作虽简单但耗时耗力;计算机辅助设计图纸转化为组态画面有固定规则,但只能由人工重复完成;画面数据的展示需要不断与内部数据源进行手动绑定;历史项目中已有的类似画面由于设计人员不同、缺乏有效检索手段,往往被忽略而导致重复设计
[0008]本发明的有益效果在于,本发明提供的上述组态画面处理方法,首先通过将组态画面存储时自动提取元数据并归档,更新用于检索的历史画面库,为后续的历史画面复用提供了数据基础;其次,在新建画布时通过信息提取识别用户需求中的目标设备特征信息,并基于该特征信息从历史画面库中自动检索匹配的候选历史画面,避免了人工逐一翻阅历史项目查找相似画面的繁琐过程,实现了历史画面的智能检索与复用;再次,在用户选定历史画面后自动创建其实例化画布,保证了原始模板的完整性,使同一模板可被多次复用而互不影响;最后,通过将编辑指令分解为多轮次子任务并循环执行与验证的机制,实现了复杂编辑任务的自动化执行,同时保证了每轮操作的准确性和可控性,直至编辑指令执行完成。上述各步骤依次执行,实现了组态画面从归档、检索、复用到编辑的自动化处理,显著提升了组态画面的制作效率,降低了人工重复劳动。
Smart Images

Figure CN122963531A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation monitoring technology, and in particular to a configuration screen processing method, apparatus, equipment and medium. Background Technology
[0002] Monitoring systems in industrial settings such as hydropower stations and substations typically require multiple user interfaces. Configuration design tools are commonly used to create these interfaces by dragging and dropping graphical and data controls. However, while simple, traditional configuration design methods are time-consuming and labor-intensive, particularly regarding details like screen alignment and layout adjustments. The conversion of computer-aided design drawings into configuration screens follows fixed rules, but these must be repeated manually. Displaying screen data requires constant manual binding to internal data sources. Furthermore, similar screens from previous projects are often overlooked due to different designers and a lack of effective retrieval methods, leading to redesigned systems. These issues result in low efficiency and high labor costs in creating configuration screens. Summary of the Invention
[0003] The purpose of this invention is to provide a configuration screen processing method, apparatus, device and medium that can realize intelligent reuse and automated editing of configuration screens, improve the production efficiency of configuration screens and reduce repetitive manual labor.
[0004] To address the aforementioned technical problems, this invention provides a configuration screen processing method, comprising: In response to the archiving command of the configuration screen, the metadata of the configuration screen is extracted and the metadata is associated with the configuration screen for archiving, so as to update the historical screen library; Information is extracted from the creation requirement description carried in the received new canvas request to obtain target device feature information, and at least one candidate historical image is retrieved from the historical image library based on the target device feature information and displayed. Once the candidate historical screen is selected, an instantiated canvas for the candidate historical screen is created. In response to an editing command, at least one subtask for the current round is generated and executed to edit the instantiated canvas, the execution results of each subtask for the current round are verified, and the generation and execution of the next round of subtasks are triggered based on the verification results, until the editing command is completed.
[0005] To address the aforementioned technical problems, the present invention also provides a configuration screen processing device, comprising: The archiving module is used to respond to the archiving command of the configuration screen, extract the metadata of the configuration screen, and archive the metadata with the configuration screen to update the historical screen library; The retrieval module is used to extract information from the creation requirement description carried in the received new canvas request to obtain target device feature information, and to retrieve and display at least one candidate historical image from the historical image library based on the target device feature information. An instantiation module is used to create an instantiated canvas for the candidate historical screen after it is selected. The editing module is used to respond to editing instructions, generate at least one subtask for the current round and execute it to edit the instantiated canvas, verify the execution results of each subtask for the current round, and trigger the generation and execution of the next round of subtasks based on the verification results, until the editing instructions are completed.
[0006] To address the aforementioned technical problems, the present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the above-described configuration screen processing method.
[0007] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described configuration screen processing method.
[0008] The beneficial effects of this invention are as follows: The configuration screen processing method provided by this invention firstly automatically extracts and archives metadata when storing configuration screens, updating the historical screen library for retrieval, thus providing a data foundation for subsequent reuse of historical screens; secondly, when creating a new canvas, it identifies the target device feature information in the user's needs through information extraction, and automatically retrieves matching candidate historical screens from the historical screen library based on this feature information, avoiding the tedious process of manually browsing through historical projects one by one to find similar screens, and realizing intelligent retrieval and reuse of historical screens; thirdly, it automatically creates an instantiated canvas after the user selects a historical screen, ensuring the integrity of the original template, allowing the same template to be reused multiple times without affecting each other; finally, by decomposing editing instructions into multiple rounds of sub-tasks and executing and verifying them in a loop, it realizes the automated execution of complex editing tasks, while ensuring the accuracy and controllability of each round of operation until the editing instructions are completed. The sequential execution of the above steps realizes the automated processing of configuration screens from archiving, retrieval, reuse to editing, significantly improving the production efficiency of configuration screens and reducing repetitive manual labor.
[0009] In addition, the present invention also provides a corresponding configuration screen processing device, electronic device and computer-readable storage medium for the configuration screen processing method, which have the same or corresponding technical features as the configuration screen processing method mentioned above, and have the same effect. Attached Figure Description
[0010] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart of a configuration screen processing method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the interaction between the main agent, sub-agent, and inspection agent provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of the configuration screen processing device provided in an embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0013] It should be noted that, in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0014] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0015] The specific application environment architecture or specific hardware architecture on which the execution of the configuration screen processing method depends is described here.
[0016] The embodiments of the present invention provide a configuration screen processing method, and the method is described in detail in conjunction with the execution flow of the configuration screen processing method. Figure 1 The flowchart of the configuration screen processing method provided in the embodiments of the present invention is as follows: Figure 1 As shown, the method includes: S101. In response to the archiving command of the configuration screen, extract the metadata of the configuration screen and archive the metadata with the configuration screen to update the historical screen library.
[0017] It should be noted that a configuration screen refers to a graphical user interface composed of visual components such as background images, text labels, data controls, and operation buttons arranged in a specific layout. It can be used in industrial monitoring systems to monitor and control the operating status of equipment. The historical screen library is a database or file directory collection used to store archived configuration screens and their metadata, supporting retrieval by dimensions such as device type, number of devices, and screen style.
[0018] When executing step S101, once a configuration screen is designed and stored, this invention can automatically parse the configuration screen in response to an archiving command. It extracts information about various components contained in the configuration screen from its underlying data file and generates metadata describing the screen content by analyzing this component information. Subsequently, the generated metadata is associated with the screen file and stored in a historical screen library, making the screen a historical resource that can be retrieved and reused later. By automatically completing the archiving process during storage, the tedious manual entry of screen information is avoided, establishing a data foundation for intelligent retrieval and reuse.
[0019] S102. Extract information from the creation requirement description carried in the received new canvas request to obtain target device feature information, and retrieve and display at least one candidate historical screen from the historical screen library based on the target device feature information.
[0020] It should be noted that the creation requirement description refers to the descriptive text entered by the user in natural language to describe the content of the new screen, such as: "Please create a new 110kV main wiring diagram containing two generating units." Candidate historical screens refer to archived screens retrieved from the historical screen library that match the user's creation requirement.
[0021] When performing step S102, if a user needs to create a new configuration screen, the present invention first receives the user's request to create a new canvas, obtains the creation requirement description carried in the request, extracts information from the creation requirement description to obtain target device feature information, and uses this target device feature information as a retrieval basis to search for historical screens in the historical screen library whose metadata matches the target device feature information. The found historical screens are then displayed as candidate historical screens. Users do not need to manually browse historical project files or memorize past screen content; they only need to input the creation requirement description to obtain candidate historical screens, reducing search costs.
[0022] S103. After a candidate historical screen is selected, create an instance of the candidate historical screen canvas.
[0023] When executing step S103, after the user selects a screen from the displayed candidate historical screens, the present invention uses the screen file of that candidate historical screen as a template to create an independent instantiated canvas in memory or storage space. An instantiated canvas refers to an independent, editable copy of a canvas created using a specific historical configuration screen as a template; it can be considered a concrete form of the configuration screen. This instantiated canvas is completely identical to the original template in visual layout and component composition, but exists as an independent data object. Any modifications made by the user to the instantiated canvas will not affect the integrity of the original template file or the independence of other instances. The same historical screen can be reused multiple times without interference, ensuring the reusability of template resources.
[0024] S104. In response to the editing command, generate and execute at least one subtask of the current round to edit the instantiated canvas, verify the execution results of each subtask of the current round, and trigger the generation and execution of the next round of subtasks based on the verification results, until the editing command is completed.
[0025] During step S104, the user can input editing instructions to the instantiated canvas. These instructions can be descriptions in natural language, such as "align the components of Unit 1," or they can be editing commands triggered by interface operations. When an editing instruction is received, the invention can generate and execute at least one subtask for the current round to edit the instantiated canvas. After execution, the results of each subtask in the current round are verified. If the verification passes and the editing instruction has not yet been completed, the subtask for the next round continues to be executed. If the verification passes and all subtasks in all rounds have been completed, the editing instruction is considered to have been completed. If the verification fails, the generation and execution of the next round of subtasks are directly triggered. This allows the editing task to be completed step by step in a controllable manner, and the results of each round of operation can be traced and corrected.
[0026] In the configuration screen processing method provided by this invention, firstly, metadata is automatically extracted and archived when the configuration screen is stored, updating the historical screen library for retrieval and providing a data foundation for subsequent reuse of historical screens. Secondly, when creating a new canvas, target device feature information in the user's needs is identified through information extraction, and matching candidate historical screens are automatically retrieved from the historical screen library based on this feature information, avoiding the tedious process of manually browsing through historical projects to find similar screens, thus realizing intelligent retrieval and reuse of historical screens. Thirdly, after the user selects a historical screen, its instantiated canvas is automatically created, ensuring the integrity of the original template and allowing the same template to be reused multiple times without affecting each other. Finally, by decomposing the editing instructions into multiple rounds of sub-tasks and executing and verifying them in a loop, the automated execution of complex editing tasks is realized, while ensuring the accuracy and controllability of each round of operation until the editing instructions are completed. The above steps are executed sequentially, realizing the automated processing of configuration screens from archiving, retrieval, reuse to editing, significantly improving the production efficiency of configuration screens and reducing repetitive manual labor.
[0027] It should be noted that the above-mentioned configuration screen processing method provided by the present invention can be applied to the configuration design software of industrial monitoring systems such as hydropower stations, substations, and thermal power plants, and is executed by electronic devices with computing capabilities (such as personal computers, servers, or embedded industrial control computers).
[0028] Furthermore, in a specific implementation, in the above-mentioned configuration screen processing method provided in the embodiments of the present invention, step S101 extracts the metadata of the configuration screen and archives the metadata with the configuration screen to update the historical screen library. Specifically, it may include: firstly, extracting the text content of the text controls in the configuration screen; generating screen content description information of the configuration screen according to the data binding relationship between the text content and the configuration screen; then identifying the device types contained in the configuration screen and the number of devices corresponding to each device type; finally, associating and storing the generated screen content description information, the identified device types and device numbers of the configuration screen with the screen file of the configuration screen respectively to update the historical screen library.
[0029] In implementation, the underlying data of the configuration screen is usually stored in JSON format, and each component in the screen (including text controls, rectangle controls, data-bound controls, etc.) corresponds to a JSON object. This invention first traverses the component list of the screen during the archiving stage, filters out controls of type "text" (type value "text"), and extracts their text content fields; simultaneously, for data-bound controls (such as data display controls), it extracts their bound data point information. All the extracted text content and data binding relationships are integrated and input into a natural language processing model for analysis, generating two aspects of content: first, the screen title, for example, automatically generating a main wiring diagram of a certain station based on the main text content of the screen as the screen name; second, a natural language description of the screen, used to describe the screen's style, function, and included data types, for example: Hydropower Station Main Wiring Diagram, Industrial Style, Black Theme, Includes Temperature Monitoring and Start / Stop Operations.
[0030] Furthermore, this invention can also identify the core equipment types (such as generating units, 110kV busbars, circuit breakers, etc.) and the quantity of each equipment type in the screen through model recognition, and generate structured tags for equipment and quantity. The aforementioned screen content description information (including title and introduction), equipment type, and the quantity of each equipment type are used as metadata for the configuration screen, and are associated with the screen's JSON configuration file and preview image file and stored in the historical screen library to form a complete archive record.
[0031] Through the above archiving method, each image in the historical image library is accompanied by metadata tags, which allows the subsequent retrieval process to directly perform precise matching based on device type and quantity, rather than relying solely on filenames or manual notes for fuzzy searching, significantly improving the accuracy and efficiency of retrieval.
[0032] In addition, step S101, which extracts metadata from the configuration screen, may also include: extracting the logic script from the configuration screen, replacing the variable names in the logic script with semantic placeholders, generating a logic description file, and associating and archiving the logic description file with the configuration screen.
[0033] It's important to note that semantic placeholders are symbols that replace project variable names with generic semantic identifiers. For example, replacing `Boiler_01_Temp` with `{Device}_Temp`, where `{Device}` is a semantic placeholder indicating that this position can be replaced by any device name. The logic description file is a configuration file (e.g., in JSON or XML format) that records the interaction rules and variable mapping relationships between controls. This file does not contain specific project variable names, but only the logical rules and generalized variable descriptions after placeholder replacement.
[0034] In implementation, controls (such as buttons, switches, indicator lights, etc.) in the configuration screen are associated with event scripts or logic configurations to implement interactive functions. For example, a start button control may be associated with the script logic Set(Motor_A_Start, 1), where Motor_A_Start is a specific project variable name. During the archiving phase, this invention can extract the event scripts or logic configurations contained in the screen, identify the hard-coded variable names in the scripts using a natural language processing model, and replace them with semantic placeholders. For example, Boiler_01_Temp is replaced with {Device}_Temp, and Motor_A_Start is replaced with {Motor}_Start. After the replacement, this invention can generate a logic description file that matches the screen file. This file records the interaction rules and variable mapping relationships between controls, but does not contain specific project variable names. This transforms the logic scripts bound to a specific project in the original screen into a general logic template decoupled from the specific project, which can be used during screen reuse.
[0035] Accordingly, when creating the instantiated canvas for the candidate historical screen in step S103, the process may also include: loading a logic description file, resolving semantic placeholders into corresponding specific variable names based on the project context corresponding to the instantiated canvas, and injecting the resolved logic script into the instantiated canvas.
[0036] In implementation, when a user chooses to reuse a historical screen, this invention can detect the existence of a logical description file corresponding to that historical screen while creating an instantiated canvas. If it exists, the logical description file is loaded, and the context information of the current new project is obtained, such as the name of the device the user is currently editing (e.g., Boiler No. 2 or Conveyor Motor). Based on the current project context, the semantic placeholders in the logical description file are automatically parsed into specific variable names. For example, if the current project context is Boiler No. 2, {Device}_Temp is parsed as Boiler_02_Temp; if the current project context is Conveyor Motor, {Motor}_Start is parsed as Conveyor_Motor_Start. After parsing, the logical script containing the specific variable names is injected into the corresponding control of the instantiated canvas, completing the automatic migration of the logic. This achieves dual reuse of visual elements and business logic, eliminating the need for users to enter the script editor for tedious searching, replacing, or reconfiguring, significantly shortening the development cycle.
[0037] Furthermore, in a specific implementation, in the above-mentioned configuration screen processing method provided in the embodiments of the present invention, step S102, which retrieves and displays at least one candidate historical screen from the historical screen library based on the target device feature information, may specifically include: determining the target device type and the number of target devices corresponding to each target device type based on the target device feature information; obtaining the device type and the number of devices corresponding to each device type from the metadata of each historical screen in the historical screen library; calculating the matching degree of each historical screen based on the obtained device type and number of devices of each historical screen and the determined target device type and number of target devices; and selecting at least one candidate historical screen from the historical screen library based on the matching degree and displaying the candidate historical screen.
[0038] In implementation, after extracting the target equipment feature information from the user's input creation requirement description, the target equipment type (e.g., generating unit, 110kV bus) and the corresponding target quantity for each equipment type (e.g., 2 generating units, 1 110kV bus) can be obtained. Then, each historical image in the historical image library is traversed, and the equipment type and the corresponding quantity for each equipment type are read from its metadata. The equipment type and quantity of each historical image are compared with the target equipment type and quantity, and the matching degree between the historical image and the user's requirement is calculated based on the comparison results. Finally, the historical images are sorted from high to low matching degree, and at least one candidate historical image with a high matching degree is selected and displayed to the user.
[0039] Furthermore, in specific implementation, in the above steps, the matching degree of each historical image is calculated based on the device type and number of devices acquired and the determined target device type and number of devices. Specifically, this may include: comparing the device type of each historical image acquired with the determined target device type; counting the number of matching items with the same device type and the same number of devices as the first value; counting the number of matching items with the same device type but different numbers of devices as the second value; obtaining the total number of target device types as the third value; calculating the first ratio of the first value and the third value, and calculating the second ratio of the second value and the third value; and weighting the first ratio and the second ratio according to preset weights to obtain the matching degree of the historical image.
[0040] In implementation, assuming the user requirement is 2 generating units and 110kV busbars, the target equipment types are generating units and 110kV busbars, with a total of C=2 types. For a historical screen A, its metadata records 3 generating units and 1 110kV busbar. The comparison results with the target equipment types are as follows: the generating unit types are the same but the quantities are different, so it is counted as the second value B=1; the 110kV busbar types are the same and the quantities are the same, so it is counted as the first value A_num=1. For another historical screen B, its metadata records 2 generating units and 1 110kV busbar. The generating unit types are the same and the quantities are the same, so it is counted as the first value A_num=1; the 110kV busbar types are the same and the quantities are the same, so it is counted as the first value A_num=2. Through the above statistics, the first, second, and third values required to calculate the matching degree are obtained.
[0041] The matching degree of historical images can be obtained using the following formula: p = (A + 0.8 × B) / C; Where A is the first value, B is the second value, and C is the third value.
[0042] In implementation, the matching degree *p* represents the degree of matching between historical screens and user needs, ranging from 0 to 1. A higher *p* value indicates a higher degree of matching. The first value, A, has a weight of 1, indicating that the number of items with completely matching device type and quantity contributes the most to the matching degree; that is, templates with a perfect match in device quantity are prioritized for recommendation. The second value, B, has a weight of 0.8, indicating that the number of items with the same device type but not a perfect match in quantity also contributes to the matching degree; that is, screens containing the same type of device but with slightly different quantities still have some reference value. The denominator *C* is the total number of different device types in the user's needs, used to normalize the matching degree to ensure that the matching degree is not affected by the number of device types.
[0043] For example: A user's requirement is 2 generating units and a 110kV busbar, with a total of 2 target equipment types (C=2). Candidate screen A has 3 generating units and 1 110kV busbar. The statistical results are A=1 (identical busbar quantity) and B=1 (identical generating unit type but inconsistent quantity), so the matching degree p=(1+0.8×1) / 2=0.9. Candidate screen B has 2 generating units and 1 110kV busbar. The statistical results are A=2 and B=0, so the matching degree p=(2+0.8×0) / 2=1.0. Candidate screen B has a higher matching degree than candidate screen A, therefore it ranks higher. This formula prioritizes recommending historical screens where both equipment type and quantity perfectly match the user's requirements, while also including screens with the same type but slightly different quantities, achieving a reasonable ranking of search results.
[0044] Furthermore, in specific implementation, in the above steps, at least one candidate historical image is selected from the historical image library based on the matching degree. Specifically, this may include: sorting the historical images in the historical image library in descending order of matching degree, and selecting historical images with a sorting number no greater than N as the initial selection result; where N is a preset positive integer; inputting the image content description information and / or preview image of each historical image in the initial selection result, together with the creation requirement description, into the re-sorting model to obtain the relevance score of each historical image output by the re-sorting model; re-sorting the historical images in the initial selection result in descending order of relevance score, and selecting historical images with a sorting number no greater than M after re-sorting as candidate historical images; where M is a preset positive integer, and M≤N.
[0045] In implementation, historical images are first sorted in descending order based on their matching degree p, and images with a ranking number no greater than N are selected as the initial results. The value of N can be flexibly configured according to the actual application scenario. For example, setting N=10 means that the top 10 images with the highest matching degree will proceed to the next round of filtering. Subsequently, a secondary ranking stage is entered: the image content description information (such as the Info field) and / or preview images of each of the 10 initial results are input into the re-ranking model along with the user's input creation requirement description. Based on semantic understanding capabilities, the re-ranking model evaluates the semantic relevance of each image to the user's needs and outputs a relevance score for each image. Finally, images are sorted in descending order according to their relevance scores, and images with a ranking number no greater than M are displayed to the user as the final candidate historical images. The value of M is also configurable, and M≤N. For example, setting M=3 means that the top 3 candidate images that best meet the user's needs will be displayed. This ensures both the recall rate of the search results and improves the relevance and accuracy of the final recommendation results through semantic re-ranking.
[0046] Furthermore, in a specific implementation, in the above-described configuration screen processing method provided in the embodiments of the present invention, step S104 generates and executes at least one subtask of the current round to edit the instantiated canvas. Specifically, it may include: generating at least one subtask of the current round, decomposing each subtask of the current round into at least one atomic operation; executing each atomic operation sequentially according to the execution order of each subtask of the current round to edit the instantiated canvas; recording each executed atomic operation to the operation history list; the operation history list is used to support the undoing or redoing of executed atomic operations.
[0047] It should be noted that an atomic operation refers to the smallest, indivisible editing action performed on a single component in the configuration screen. Examples include moving a component to a specified coordinate, adjusting the width of a component to a specific value, binding the data source of a component to a specific measurement point, deleting a component, or adding a component with specified attributes. An atomic operation is the smallest editable unit in configuration screen editing; any complex editing task can be broken down into a combination of atomic operations.
[0048] In implementation, user-inputted editing commands are typically high-level descriptions, such as: align the components of Unit 1; or automatically bind all data of Unit 1. These commands cannot be executed directly and need to be decomposed into low-level operations that the system can execute. Taking aligning the components of Unit 1 as an example, upon receiving the editing command, a subtask for the current round is first generated to align all components of Unit 1. Then, this subtask is decomposed into multiple atomic operations: First, locate all components of Unit 1 and obtain the current coordinates of each component; second, calculate the X-axis and Y-axis deviations of each component; third, move the components to be aligned one by one to the target coordinates. During the execution of the above atomic operations, each atomic operation is recorded in the operation history list. The operation history list records the execution order and specific content of each atomic operation, such as: move component ID_101 to coordinates (10,20), and adjust the width of component ID_102 to 100 pixels. When a user finds that an AI operation does not meet expectations, they can use the regular undo function to revert to the state before the operation was executed, or they can use the redo function to restore the undone operation. This achieves a seamless connection between AI-assisted editing and human intervention, avoiding the black-box errors caused by AI directly modifying the underlying JSON file in traditional solutions, which are difficult to troubleshoot and manually repair.
[0049] The atomic operations described above may include data binding operations. Accordingly, the execution of an atomic operation may include: obtaining data description information corresponding to the component to be bound; retrieving and obtaining at least one candidate test point from a preset data source based on the data description information; determining the target test point from the at least one candidate test point; and associating the component to be bound with the target test point.
[0050] In implementation, the component to be bound is typically a data display control (such as a data display box, dashboard, trend chart, etc.), and its corresponding data description information can come from the component's text label (such as the temperature of Unit 1 marked next to the control) or from the description in the user's editing instructions (such as binding the temperature data of Unit 1). After obtaining this data description information, this invention retrieves matching measurement points from a preset data source (i.e., the real-time database or historical database of the industrial monitoring system). The retrieval method can combine vector matching (calculating the semantic similarity between the data description information and the measurement point name and description) with keyword search to filter out at least one candidate measurement point. The optimal one from the candidate measurement points is determined as the target measurement point, and the component to be bound is associated with the target measurement point to complete the data binding operation. Users do not need to manually search and select from a massive list of measurement points one by one, greatly reducing the workload of data configuration.
[0051] Furthermore, in a specific implementation, in the configuration screen processing method provided in the embodiments of the present invention, step S104 generates and executes at least one subtask of the current round to edit the instantiated canvas, verifies the execution results of each subtask of the current round, and triggers the generation and execution of the next round of subtasks based on the verification results. Specifically, it may include: parsing the editing instructions through the main agent (Orchestrator Agent) to generate at least one subtask of the current round; executing each subtask of the current round through the sub-agents (Executor Agents) to edit the instantiated canvas; verifying the execution results of each subtask of the current round through the checker agent; if the checker agent verification passes, determining whether the editing instructions have been executed completely; if completed, determining that the editing instructions have been executed completely; if not completed, continuing to execute the subtasks of the next round; if the checker agent verification fails, triggering the main agent to generate the subtasks of the next round.
[0052] In implementation, the main agent is responsible for understanding the user's input editing instructions and breaking them down into a series of subtasks. For example, aligning the components of Unit 1 is broken down into subtasks such as locating the Unit 1 components, calculating coordinate deviations, and performing movement. Sub-agents are responsible for executing the atomic operations corresponding to each subtask. For example, executing the atomic operation of moving component A to the X coordinate directly modifies the instantiated canvas. The checking agent is responsible for collecting the execution results of each subtask after completion and determining whether the editing effect meets expectations, such as checking whether each component is aligned. If the checking agent's verification passes, it determines whether the editing instruction has been completed. If it has, the editing instruction is considered complete, and the process ends; otherwise, it continues to execute the next round of subtasks. If the checking agent's verification fails, it feeds back the verification result to the main agent, triggering the main agent to generate the next round of subtasks to correct or supplement any parts that did not meet expectations in the previous round. The system also has a loop count threshold (e.g., 10 times) and a timeout mechanism. When the loop count exceeds the limit or the execution time exceeds the timeout, the loop will automatically terminate and a prompt message will be generated to inform the user that the current editing command has failed to be completed automatically, in order to prevent the occurrence of an infinite loop.
[0053] Figure 2 This is a schematic diagram illustrating the interaction between the main agent, sub-agent, and inspection agent provided in an embodiment of the present invention. Figure 2 As shown, after the user's input editing command is received by the main agent, the main agent parses the command and generates at least one subtask for the current round, forming a subtask list. The sub-agent reads each subtask from the list, executes the corresponding atomic operations, and edits the instantiated canvas. The agent collects and verifies the execution results of each subtask. If verification passes, it checks whether the editing command has been completed; if so, it is considered complete. If not, it continues to execute the subtask for the next round. If verification fails, it checks whether the loop count has exceeded the limit; if not, it triggers the main agent to enter the next round and regenerate the subtask; if the limit has been exceeded, it generates a prompt message informing the user that the current editing command failed to complete automatically.
[0054] In the above implementation, the editing instruction first generates at least one subtask for the current round. Each subtask is further decomposed into executable atomic operations. After execution, the execution result is verified. Based on the verification result, it is determined whether to trigger the generation and execution of the next round of subtasks, until the editing instruction is completed. Through this layer-by-layer decomposition and iterative verification method, the execution effect of the editing instruction is continuously optimized, effectively ensuring the accuracy and controllability of automated editing. At the same time, the loop count limit and timeout mechanism prevent infinite loops and ensure the stable operation of the system.
[0055] Furthermore, in a specific implementation, the above-mentioned configuration screen processing method provided in the embodiments of the present invention may further include: evaluating the confidence level of the current operation during the execution of each sub-task; if the confidence level is lower than a preset threshold, pausing the current operation and generating a manual intervention interface, the manual intervention interface being used to display the predicted result of the current operation and at least one alternative solution; in response to the selection operation received through the manual intervention interface, continuing to execute the current operation or switching to an alternative solution based on the selection result.
[0056] In implementation, this invention introduces a real-time confidence assessment mechanism during the execution of subtasks. Confidence refers to a quantitative assessment value of the certainty of the current operation (such as data binding, component recognition, etc.), ranging from 0 to 1. Different operation types correspond to different confidence assessment methods: for data binding operations, confidence can be determined based on the matching scores of candidate test points; when the matching score of the top 1 candidate test point is higher than a preset threshold, the confidence is higher. For component recognition operations, confidence can be determined based on the probability values output by a visual recognition model or a semantic understanding model. For layout adjustment operations, confidence can be determined based on a quantitative assessment of the rationality of the layout before and after adjustment.
[0057] Taking data binding as an example, this invention combines vector matching and keyword search to filter candidate test points from the data source, and then re-ranks these candidate test points. The candidate test point ranked first after re-ranking has the highest matching score, which can be used as the confidence score, reflecting the degree of certainty that this candidate test point is the target test point. The confidence score is compared with a preset threshold, which can be pre-set by developers according to actual application scenarios and accuracy requirements and stored in a configuration file, or can be adjusted by users according to actual needs. If the confidence score is not lower than the preset threshold, binding is automatically performed; if the confidence score is lower than the preset threshold, for example, when the matching score of the ranked candidate test point is lower than 80%, the current operation is paused, and a manual intervention interface is generated. In this interface, the target test point and alternative solutions (such as a Top 5 candidate test point list) predicted by the system are displayed to the user. Users can click "Confirm" through this interface to accept the system recommendation, select the correct test point from the alternative solutions, or manually enter the correct test point name. In response to the user's selection operation, the current operation continues or switches to the alternative solutions based on the selection result.
[0058] Furthermore, the manual correction process is considered a high-quality labeled data, and this invention can capture user correction behavior and use it to update the knowledge base. Specifically, when a user revokes a certain type of AI operation, this invention marks that type of operation scenario as a negative sample, reducing the weight of related strategies in the future; when a user manually corrects an incorrect AI binding (such as changing temperature to pressure), this invention extracts the feature differences before and after the correction, updates the index weights of the vector database, and enables the model to output more accurate results when encountering similar contexts again. This maintains the high efficiency of automated editing, ensures the accuracy of key operations through manual verification, and simultaneously achieves continuous optimization and self-evolution of the system.
[0059] From the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0060] Embodiments of the present invention also provide a configuration screen processing device. Figure 3 This is a schematic diagram of the configuration screen processing device provided in an embodiment of the present invention. This embodiment is based on the perspective of functional modules, such as… Figure 3 As shown, the device includes: The archiving module 10 is used to respond to the archiving command of the configuration screen, extract the metadata of the configuration screen, and archive the metadata with the configuration screen to update the historical screen library. The retrieval module 11 is used to extract information from the creation requirement description carried in the received new canvas request to obtain target device feature information, and to retrieve and display at least one candidate historical image from the historical image library based on the target device feature information. Instantiation module 12 is used to create an instantiated canvas for the candidate historical screen after it has been selected. The editing module 13 is used to respond to the editing command, generate at least one subtask of the current round and execute it to edit the instantiated canvas, verify the execution results of each subtask of the current round, and trigger the generation and execution of the next round of subtasks based on the verification results, until the editing command is completed.
[0061] In the configuration screen processing device provided in this embodiment of the invention, the archiving module 10 automatically extracts and archives metadata during screen storage, constructing a searchable historical screen library; the retrieval module 11 extracts device feature information from the user's input natural language requirements and automatically retrieves matching candidate screens; the instantiation module 12 instantiates the selected historical screens into independent canvases; and the editing module 13 automatically executes editing instructions in a multi-round iterative manner. These four modules work together to achieve intelligent reuse and automated editing of configuration screens, significantly improving configuration design efficiency and reducing labor costs.
[0062] Since the embodiments of the configuration screen processing device and the configuration screen processing method correspond to each other, the descriptions of the features in the embodiments corresponding to the configuration screen processing device can be found in the relevant descriptions of the embodiments corresponding to the configuration screen processing method, and will not be repeated here. Furthermore, it has the same beneficial effects as the configuration screen processing method mentioned above.
[0063] Furthermore, in a specific implementation, in the configuration screen processing device provided in the embodiments of the present invention, the archiving module 10 can be specifically used to extract the text content of the text control in the configuration screen; generate screen content description information of the configuration screen according to the data binding relationship between the text content and the configuration screen; identify the device types contained in the configuration screen and the number of devices corresponding to each device type; and associate and store the generated screen content description information, the identified device types and the number of devices in the configuration screen with the screen file of the configuration screen respectively, so as to update the historical screen library.
[0064] Furthermore, in a specific implementation, in the above-described configuration screen processing device provided in the embodiments of the present invention, the retrieval module 11 can be specifically used to determine the target device type and the number of target devices corresponding to each target device type based on the target device feature information; obtain the device type and the number of devices corresponding to each device type from the metadata of each historical screen in the historical screen library; calculate the matching degree of each historical screen based on the obtained device type and number of devices of each historical screen and the determined target device type and number of target devices; filter out at least one candidate historical screen from the historical screen library based on the matching degree, and display the candidate historical screen.
[0065] The process involves comparing the device types of each acquired historical image with the determined target device types; counting the number of matches with the same device type and the same number of devices as the first value; counting the number of matches with the same device type but different numbers of devices as the second value; obtaining the total number of target device types as the third value; calculating the first ratio of the first value to the third value, and calculating the second ratio of the second value to the third value; and weighting the first ratio and the second ratio according to preset weights to obtain the matching degree of the historical images. The historical images in the historical image library are sorted in descending order of matching degree, and historical images with a sorting number no greater than N are selected as the initial selection results; where N is a preset positive integer; the image content description information and / or preview image of each historical image in the initial selection results, along with the creation requirement description, are input into the re-sorting model to obtain the relevance score of each historical image output by the re-sorting model; the historical images in the initial selection results are re-sorted in descending order of relevance score, and historical images with a re-sorting sorting number no greater than M are selected as candidate historical images; where M is a preset positive integer, and M≤N.
[0066] Furthermore, in a specific implementation, in the configuration screen processing device provided in the embodiments of the present invention, the editing module 13 can be specifically used to generate at least one sub-task of the current round, decompose each sub-task of the current round into at least one atomic operation; execute each atomic operation in sequence according to the execution order of each sub-task of the current round to edit the instantiated canvas; record each executed atomic operation to the operation history list; the operation history list is used to support the undoing or redoing of executed atomic operations.
[0067] Furthermore, in a specific implementation, in the configuration screen processing device provided in the embodiments of the present invention, the editing module 13 can be specifically used to parse the editing instructions through the main agent to generate at least one sub-task of the current round; execute each sub-task of the current round through the sub-agent to edit the instantiated canvas; verify the execution results of each sub-task of the current round through the checking agent; if the checking agent verification passes, determine whether the editing instructions have been executed completely; if it has been completed, determine that the editing instructions have been executed completely; if it has not been completed, continue to execute the sub-task of the next round; if the checking agent verification fails, trigger the main agent to generate the sub-task of the next round.
[0068] Embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described embodiments of the configuration screen processing method.
[0069] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described configuration screen processing method embodiments when it is run.
[0070] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0071] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described configuration screen processing method embodiments.
[0072] Embodiments of the present invention also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described configuration screen processing method embodiments.
[0073] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-chip (SoC), a complex programmable logic device (CPLD), a microcontroller unit (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or a combination thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0074] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0075] The above provides a detailed description of the configuration screen processing method, apparatus, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. A configuration screen processing method, characterized in that, include: In response to the archiving command of the configuration screen, the metadata of the configuration screen is extracted and the metadata is associated with the configuration screen for archiving, so as to update the historical screen library; Information is extracted from the creation requirement description carried in the received new canvas request to obtain target device feature information, and at least one candidate historical image is retrieved from the historical image library based on the target device feature information and displayed. Once the candidate historical screen is selected, an instantiated canvas for the candidate historical screen is created. In response to an editing command, at least one subtask for the current round is generated and executed to edit the instantiated canvas, the execution results of each subtask for the current round are verified, and the generation and execution of the next round of subtasks are triggered based on the verification results, until the editing command is completed.
2. The configuration screen processing method according to claim 1, characterized in that, Extract the metadata of the configuration screen and associate the metadata with the configuration screen for archiving, in order to update the historical screen library, including: Extract the text content of the text controls in the configuration screen; Based on the text content and the data binding relationship of the configuration screen, generate the screen content description information of the configuration screen; Identify the device types and the number of devices corresponding to each device type in the configuration screen; The generated screen content description information, the identified device type and number of devices in the configuration screen are associated with the screen file of the configuration screen and stored to update the historical screen library.
3. The configuration screen processing method according to claim 1, characterized in that, Based on the target device feature information, at least one candidate historical image is retrieved from the historical image library and displayed, including: The target device type and the number of target devices corresponding to each target device type are determined based on the target device feature information. Obtain the device type and the number of devices corresponding to each device type from the metadata of each historical video in the historical video library; The matching degree of each historical image is calculated based on the device type and number of devices obtained and the determined target device type and number of devices. Based on the matching degree, at least one candidate historical image is selected from the historical image library and displayed.
4. The configuration screen processing method according to claim 3, characterized in that, Based on the device type and number of devices acquired in each historical frame and the determined target device type and number of devices, the matching degree of each historical frame is calculated, including: The device type of each acquired historical image is compared with the determined target device type; The first value is the number of matches where the equipment type and quantity are the same. The number of matches with the same equipment type but different quantities is counted and used as the second value. The total number of types of the target device is obtained as a third value; Calculate a first ratio between the first value and the third value, and calculate a second ratio between the second value and the third value; The first ratio and the second ratio are weighted and summed according to preset weights to obtain the matching degree of the historical images.
5. The configuration screen processing method according to claim 3, characterized in that, At least one candidate historical image is selected from the historical image library based on the matching degree, including: The historical images in the historical image library are sorted in descending order of matching degree, and the historical images with a sorting number no greater than N are selected as the initial selection result; where N is a preset positive integer. The description information and / or preview image of each historical screen in the preliminary selection results are input together with the creation requirement description into the re-ranking model to obtain the relevance score of each historical screen output by the re-ranking model. The historical images in the preliminary selection results are reordered in descending order of relevance score, and the historical images with a reordered sequence number not greater than M are selected as candidate historical images; where M is a preset positive integer and M≤N.
6. The configuration screen processing method according to claim 1, characterized in that, Generate and execute at least one subtask for the current round to edit the instantiated canvas, including: Generate at least one subtask for the current round, and decompose each subtask of the current round into at least one atomic operation; According to the execution order of each subtask in the current round, each atomic operation is executed sequentially to edit the instantiated canvas; Each of the atomic operations that have been executed is recorded to an operation history list; the operation history list is used to support the undoing or redoing of the executed atomic operations.
7. The configuration screen processing method according to claim 1, characterized in that, Generate and execute at least one subtask for the current round to edit the instantiated canvas, verify the execution results of each subtask for the current round, and trigger the generation and execution of the next round of subtasks based on the verification results, including: The main agent parses the editing instructions to generate at least one subtask for the current round; The sub-tasks of the current round are executed by the sub-agent to edit the instantiated canvas; The execution results of each subtask in the current round are verified by checking the agent; If the verification by the agent passes, it is determined whether the editing instruction has been executed completely; if it has been completed, it is determined that the editing instruction has been executed completely; if it has not been completed, the next round of subtasks is executed. If the verification of the inspection agent fails, the main agent is triggered to generate the next round of subtasks.
8. A configuration screen processing device, characterized in that, include: The archiving module is used to respond to the archiving command of the configuration screen, extract the metadata of the configuration screen, and archive the metadata with the configuration screen to update the historical screen library; The retrieval module is used to extract information from the creation requirement description carried in the received new canvas request to obtain target device feature information, and to retrieve and display at least one candidate historical image from the historical image library based on the target device feature information. An instantiation module is used to create an instantiated canvas for the candidate historical screen after it is selected. The editing module is used to respond to editing instructions, generate at least one subtask for the current round and execute it to edit the instantiated canvas, verify the execution results of each subtask for the current round, and trigger the generation and execution of the next round of subtasks based on the verification results, until the editing instructions are completed.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the configuration screen processing method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the configuration screen processing method as described in any one of claims 1 to 7.