Interface updating method and device, computer equipment and storage medium
By establishing a mapping relationship between variable names and variable values in the human -machine interface, the mapping relationship between the variable name and the node is quickly updated, the method of HMI response is low, and the efficient interface update and response are achieved.
Patent Information
- Application Number
- CN202411564434.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-04
AI Technical Summary
In the field of industrial automation control, human-machine interface (HMI) is prone to slow page rendering or page stuck due to large data updates and fast speed, resulting in low response speed.
By obtaining the buffer queue and node indexing relationship of the simulation data in the human -machine interface, establish the mapping relationship between variable names and variable values and the mapping relationship between the variable name and node, so as to quickly find and update related nodes and variable values to complete the human -machine value Update of the interface.
Improve the response speed and update efficiency of the human -machine interface, reduce waste of resources, optimize the rendering process, and improve system performance.
Smart Images

Figure CN119356786A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an interface updating method, device, computer equipment and storage medium. Background Art
[0002] Human Machine Interface (HMI) refers to the way people interact with machines, as well as how people acquire and manage information. HMI technology enables effective interaction between the physical world and computer systems, enabling fast interaction between people and machines.
[0003] In the field of industrial automation control, HMI technology has become an important means of machine operation and monitoring. HMI can realize the interaction and control between users and industrial automation equipment through a graphical interface or touch screen. The data update volume in the industrial field is generally large and the data update speed is fast, which is prone to slow page rendering or page jamming.
[0004] Therefore, how to improve the response speed of HMI is an urgent problem to be solved. Summary of the invention
[0005] Based on this, it is necessary to provide an interface updating method, apparatus, computer device and storage medium to address the above technical problems, which can improve the response speed of the human-computer interface.
[0006] In a first aspect, the present application provides an interface updating method, comprising:
[0007] Obtaining a buffer queue of simulation data to be updated in the human-machine interface, and obtaining a node index relationship of the human-machine interface; the buffer queue represents a mapping relationship between a variable name of the simulation data to be updated and a corresponding variable value; the node index relationship represents a mapping relationship between a node where the simulation data is located in the human-machine interface and a variable name of the simulation data;
[0008] Update the human-machine interface according to the buffer queue and node index relationship.
[0009] In the interface update method provided in the embodiment of the present application, a buffer queue of simulation data to be updated in the human-machine interface is obtained, and a node index relationship of the human-machine interface is obtained, and then the human-machine interface is updated according to the buffer queue and the node index relationship, wherein the buffer queue represents a mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value, and the node index relationship represents a mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data. In the method, when the human-machine interface needs to be updated, the human-machine interface is updated through the buffer queue of the simulation data to be updated in the human-machine interface and the node index relationship of the human-machine interface, and the buffer queue of the simulation data to be updated includes the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value, and the node index relationship of the human-machine interface includes the mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data. In this way, there is a mapping between the variable name and the variable value, and there is a mapping between the variable name and the node. According to the two mapping relationships, the relevant nodes and the corresponding variable values can be quickly found, and the update of the simulation data in the human-machine interface can be quickly completed, and then the update of the human-machine interface can be completed. This is equivalent to establishing a mapping relationship between the variable name and the variable value and a mapping relationship between the variable name and the node, so that the relevant node can be quickly located when searching and updating the node, thereby improving the query efficiency, quickly completing the update of the human-machine interface, and improving the response speed of the human-machine interface.
[0010] In one embodiment, obtaining a buffer queue of simulation data to be updated in a human-machine interface includes:
[0011] Obtain at least one variable value updated in the update cycle of the simulation data to be updated and the variable name of the simulation data to be updated;
[0012] The mapping relationship between each variable value and the variable name is stored to obtain a buffer queue.
[0013] In the interface update method provided in the embodiment of the present application, by obtaining at least one variable value updated in the update cycle of the simulation data to be updated and the variable name of the simulation data to be updated, and then storing the mapping relationship between each variable value and the variable name, a buffer queue is obtained. In this method, an optional way to quickly obtain the buffer queue is provided; by obtaining multiple variable values updated in the update cycle of the simulation data to be updated, a mapping relationship between each variable value and the variable name of the simulation data to be updated can be established, and the multiple mapping relationships constitute the buffer queue of the simulation data to be updated, laying a foundation for updating the data query of the human-computer interface.
[0014] In one embodiment, obtaining the node index relationship of the human-machine interface includes:
[0015] Obtain multiple specific tags in the simulation data, and separate multiple variable names from each specific tag;
[0016] Each variable name and the node information corresponding to each variable name are stored in the form of key-value pairs to obtain the node index relationship of the human-computer interface.
[0017] In the interface updating method provided in the embodiment of the present application, multiple specific tags in the simulation data are obtained, and multiple variable names are separated from each specific tag, and then each variable name and the node information corresponding to each variable name are stored in the form of a key-value pair to obtain the node index relationship of the human-computer interface. In this method, multiple variable names in the simulation data can be quickly separated from the simulation data through specific tags, laying the foundation for quickly and accurately constructing the node index relationship, and then each variable name and the corresponding node information are stored in the form of a key-value pair, which can quickly construct the node index relationship and provide data support for the rapid response of the human-computer interface.
[0018] In one embodiment, each variable name and the node information corresponding to each variable name are stored in the form of a key-value pair to obtain a node index relationship of a human-computer interface, including:
[0019] Get the historical node index relationship;
[0020] If each variable name exists in the historical node index relationship, each node information is added to the position of the value corresponding to each variable name to obtain the node index relationship;
[0021] If each variable name does not exist in the historical node index relationship, each variable name is used as a key, and the node information corresponding to each variable name is used as a value, and is stored in the historical node index relationship to obtain a node index relationship.
[0022] In the interface update method provided in the embodiment of the present application, the historical node index relationship is obtained. If the variable name exists in the historical node index relationship, the node information is added to the position of the value corresponding to each variable name to obtain the node index relationship. If the variable name does not exist in the historical node index relationship, each variable name is used as a key, and the node information corresponding to each variable name is used as a value to store it in the historical node index relationship to obtain the node index relationship. In this method, by obtaining the historical node index relationship, the relationship between each variable name and the node can continue to establish a mapping relationship on the basis of the historical node index relationship, which provides an optional way to quickly determine the node index relationship; when each variable name exists in the historical node index relationship, the node information corresponding to each variable name can be added to the historical node index relationship. When each variable name does not exist in the historical node index relationship, the new variable name and the corresponding node information are stored in the historical node index relationship in the form of key-value pairs, that is, the node index relationship is obtained, which provides data support for the rapid query of nodes.
[0023] In one embodiment, the method further comprises:
[0024] Get multiple rectangles generated in the new canvas, and determine each rectangle as a node of multiple devices corresponding to the human-machine interface;
[0025] According to the device data corresponding to each node, obtain the variable name corresponding to each node;
[0026] Bind each variable name to the attributes of each node to generate simulation data.
[0027] In the interface update method provided in the embodiment of the present application, multiple rectangles generated in the newly created canvas are obtained, and each rectangle is determined as a node of multiple devices corresponding to the human-machine interface, and then the variable name corresponding to each node is obtained according to the device data corresponding to each node, and then each variable name is bound to the attribute of each node to generate simulation data. In this method, an optional way to quickly generate simulation data is provided; by generating a rectangle as a node in the newly created canvas, and then obtaining the variable name corresponding to each node according to the device data corresponding to each node, the variable name is bound to the attribute of the node so that each variable name belongs to the corresponding device node, and based on this, the simulation data of the human-machine interface is generated to provide data support for the construction of the human-machine interface.
[0028] In one embodiment, updating the human-machine interface according to the relationship between the buffer queue and the node index includes:
[0029] According to the buffer queue, the latest variable value of the simulation data to be updated is obtained;
[0030] Update the human-machine interface based on the latest variable values and node index relationships.
[0031] In the interface update method provided in the embodiment of the present application, the latest variable value of the simulation data to be updated is obtained according to the buffer queue, and then the human-machine interface is updated according to the latest variable value and the node index relationship. In this method, an optional way to quickly update the human-machine interface is provided; by obtaining the latest variable value of the simulation data to be updated, the corresponding node can be quickly queried from the node index relationship based on the latest variable value, and the variable value can be updated to achieve the update of the human-machine interface, and the update is only based on the latest variable value, which reduces resource waste, improves the response speed of the human-machine interface, and improves system performance.
[0032] In one embodiment, updating the human-machine interface according to the latest variable value and node index relationship includes:
[0033] According to the variable name and node index relationship corresponding to the latest variable value, multiple nodes matching the variable name are obtained;
[0034] The latest variable value replaces the variable value corresponding to the variable name under each node to obtain the updated simulation data;
[0035] The updated simulation data is re-rendered to obtain an updated human-computer interface.
[0036] In the interface updating method provided in the embodiment of the present application, multiple nodes matching the variable name are obtained according to the variable name corresponding to the latest variable value and the node index relationship, and then the variable value corresponding to the variable name under each node is replaced by the latest variable value to obtain the updated simulation data, and then the updated simulation data is re-rendered to obtain the updated human-computer interface. In this method, multiple nodes that need to be updated can be matched in the node index relationship through the variable name corresponding to the latest variable value, and then the latest variable value is replaced in each node that needs to be updated, so that the update of the human-computer interface can be completed quickly, and the update efficiency of the human-computer interface is improved.
[0037] In a second aspect, the present application further provides an interface updating device, comprising:
[0038] The relationship acquisition module is used to obtain the buffer queue of the simulation data to be updated in the human-machine interface, and to obtain the node index relationship of the human-machine interface; the buffer queue represents the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value; the node index relationship represents the mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data;
[0039] The interface update module is used to update the human-machine interface according to the buffer queue and the node index relationship.
[0040] In a third aspect, the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in any one of the embodiments of the first aspect when executing the computer program.
[0041] In a fourth aspect, the embodiments of the present application further provide a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps in any one of the embodiments of the first aspect are implemented.
[0042] In a fifth aspect, the embodiments of the present application further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in any one of the embodiments in the first aspect are implemented.
[0043] The above-mentioned interface updating method, apparatus, computer equipment and storage medium obtain the buffer queue of the simulation data to be updated in the human-computer interface, and obtain the node index relationship of the human-computer interface, and then update the human-computer interface according to the buffer queue and the node index relationship, wherein the buffer queue represents the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value, and the node index relationship represents the mapping relationship between the node where the simulation data is located in the human-computer interface and the variable name of the simulation data. In the method, when the human-machine interface needs to be updated, the human-machine interface is updated through the buffer queue of the simulation data to be updated in the human-machine interface and the node index relationship of the human-machine interface, and the buffer queue of the simulation data to be updated includes the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value, and the node index relationship of the human-machine interface includes the mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data. In this way, there is a mapping between the variable name and the variable value, and there is a mapping between the variable name and the node. According to the two mapping relationships, the relevant nodes and the corresponding variable values can be quickly found, and the update of the simulation data in the human-machine interface can be quickly completed, and then the update of the human-machine interface can be completed. This is equivalent to establishing a mapping relationship between the variable name and the variable value and a mapping relationship between the variable name and the node, so that the relevant node can be quickly located when searching and updating the node, thereby improving the query efficiency, quickly completing the update of the human-machine interface, and improving the response speed of the human-machine interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are 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.
[0045] FIG1 is a diagram of an application environment of an interface updating method according to an embodiment;
[0046] FIG2 is a schematic diagram of a flow chart of an interface updating method in one embodiment;
[0047] FIG3 is a schematic diagram of a process of obtaining a buffer queue in one embodiment;
[0048] FIG4 is a schematic diagram of a process of obtaining a node index relationship in one embodiment;
[0049] FIG5 is a schematic diagram of a process of obtaining a node index relationship in another embodiment;
[0050] FIG6 is a schematic diagram of a process for generating simulation data in one embodiment;
[0051] FIG7 is a schematic diagram of a process for updating a human-machine interface in one embodiment;
[0052] FIG8 is a schematic diagram of a process for updating a human-machine interface in one embodiment;
[0053] FIG9 is a flow chart of an interface updating method in another embodiment;
[0054] FIG10 is a schematic diagram of the structure of an interface updating device in one embodiment;
[0055] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] The interface update method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Optionally, a human-machine interface is integrated in the terminal 102 for displaying the human-machine interface. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0058] The technical background of this application is described below.
[0059] Human Machine Interface (HMI) refers to the way people interact with machines, as well as how people acquire and manage information. HMI technology enables effective interaction between the physical world and computer systems, enabling fast interaction between people and machines.
[0060] In industrial control and related fields, it is very common to use legends to simulate the actual operating status of industrial equipment. Usually, the interaction and control between users and industrial automation equipment can be achieved through legends in the human-machine interface. Since the amount of data updated in the industrial field is generally large and the data update speed is fast, in order to avoid slow page rendering or page jamming, it is very important to choose an efficient data-driven method to improve the response speed of the human-machine interface.
[0061] Based on this, an embodiment of the present application provides an interface update method. When the human-machine interface needs to be updated, the human-machine interface is updated through the buffer queue of the simulation data to be updated in the human-machine interface and the node index relationship of the human-machine interface. The buffer queue of the simulation data to be updated includes the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value. The node index relationship of the human-machine interface includes the mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data. In this way, there is a mapping between the variable name and the variable value, and there is a mapping between the variable name and the node. According to the two mapping relationships, the relevant nodes and the corresponding variable values can be quickly found, and the update of the simulation data in the human-machine interface can be quickly completed, and then the update of the human-machine interface can be completed. This is equivalent to establishing a mapping relationship between the variable name and the variable value and a mapping relationship between the variable name and the node, so that the relevant nodes can be quickly located when searching and updating the nodes, thereby improving the query efficiency, quickly completing the update of the human-machine interface, and improving the response speed of the human-machine interface.
[0062] In an exemplary embodiment, as shown in FIG. 2 , an interface updating method is provided, which is described by taking the method applied to the server 104 in FIG. 1 as an example, and includes the following steps 201 to 202 . Among them:
[0063] S201, obtaining a buffer queue of simulation data to be updated in the human-machine interface, and obtaining a node index relationship of the human-machine interface; the buffer queue represents a mapping relationship between a variable name of the simulation data to be updated and a corresponding variable value; the node index relationship represents a mapping relationship between a node where the simulation data is located in the human-machine interface and a variable name of the simulation data.
[0064] The human-machine interface is the interface for interaction between humans and machines, and is the medium for information exchange and command transmission between humans and machines. The human-machine interface includes not only hardware parts, such as touch screens, buttons, etc., but also software parts, which establish a connection between operators and machines through visual means to exchange information. The design of the human-machine interface aims to create a user-friendly and easy-to-operate interface, improve the efficiency and reliability of the control system, and reduce the occurrence of operating errors and accidents.
[0065] The functions of the human-machine interface include displaying the control system's status, parameters and other information in front of the operator in an intuitive and friendly manner, and transmitting the operator's instructions to the control system to achieve control and adjustment of the control system. The components of the human-machine interface include hardware and software. The hardware part includes touch screens, buttons, indicator lights, etc., which are physical devices that directly interact with users. The software part is implemented through computer programs and provides functions such as user interface design, information display and instruction processing.
[0066] Human-machine interface is widely used in industrial control, medical equipment, household appliances and other fields. Taking the industrial control field as an example, human-machine interface is widely used in various control systems, providing intuitive operation interface and status display.
[0067] Simulation data refers to the data required to build a human-machine interface, which is used to simulate the operating environment and data flow of an actual industrial control system. Among them, simulation data can include data uploaded by real devices in an actual industrial control system, as well as canvas data generated when building a human-machine interface. Pending simulation data refers to data generated by real-time updates of real devices, but the data has not yet been updated to the human-machine interface.
[0068] There are two basic elements in the human-machine interface: nodes and variables. Nodes correspond to real devices, and one real device can correspond to multiple nodes. For example, if a real device such as an industrial machine includes three screens, one of the screens can correspond to one node. Variables refer to the data updated by the real device, which includes variable names and variable values. For example, the speed data of a real device is updated in real time, then the speed data is a variable, the variable name can be speed, and the variable value can be the corresponding specific value, such as 1000rpm (revolutions per minute).
[0069] The buffer queue stores the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value. Usually, data updates are very fast. Within the preset time, a variable data may be updated multiple times, that is, one variable corresponds to a variable name and multiple variable values. These variable values are the values or data updated each time within the preset time.
[0070] In one embodiment, the data of the real device can be collected by a data collection device, and the collected data can be used to build a buffer queue. For example, the data collection device will collect corresponding data every time the data changes, and the data collected each time within the preset time can be sent to the server, and the server will establish a mapping relationship for the updated data within the preset time to obtain a buffer queue. For example, if a certain data is updated 5 times within the preset time, a mapping relationship can be established for the data updated multiple times within the preset time. At this time, the data has a variable name and 5 variable values, and a mapping relationship can be established between the variable name and the corresponding 5 variable values to obtain a buffer queue.
[0071] In another embodiment, a buffer queue can be constructed by using the update data in the database. For example, each updated data is stored in the database, and the time corresponding to each update is also stored in the database. According to the preset time, multiple update data can be searched in the update time in the database. The multiple update data only have different variable values, but different variable names. For example, they are all speed data of the same device. After finding multiple update data, a mapping relationship is established between the multiple update data. The multiple update data correspond to a variable name and multiple variable values. A mapping relationship is established between the one variable name and the corresponding multiple variable values to obtain a buffer queue.
[0072] The node index relationship stores the mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data. When the human-machine interface is initially constructed, an index relationship is established between the node corresponding to the simulation data and the variable name corresponding to the simulation data. For example, when constructing the human-machine interface, a node corresponding to each real device is first established in the canvas, and the data of each real device at this time is also uploaded to the server, and the server establishes a mapping relationship between the variable name corresponding to each data and the node where it is located. Among them, when the real device uploads data, it also uploads the data of the corresponding node. For example, a real device includes three screens, and the data corresponding to the three screens are uploaded to the server respectively. In this way, the server can determine that the data of one screen corresponds to the data of one node, that is, the node where the data is located is clear, and it can quickly determine which data corresponds to which node, and then quickly and accurately establish a mapping relationship between the variable name of the data and the node where it is located.
[0073] In this embodiment, when obtaining the node index relationship between the buffer queue of the simulation data to be updated and the human-machine interface, it can be obtained under certain conditions or requirements, and the human-machine interface can be updated.
[0074] In an implementable manner, when an update requirement of a human-machine interface is detected, a buffer queue of simulation data to be updated in the human-machine interface is obtained, and a node index relationship of the human-machine interface is obtained.
[0075] The requirement for updating the human-machine interface may be triggered according to a preset automatic program. For example, when the data uploaded by the simulation data reaches a preset threshold, the requirement for updating the human-machine interface is triggered according to a preset automatic program.
[0076] In another possible implementation, when a preset update cycle is currently reached, a buffer queue of simulation data to be updated in the human-machine interface is obtained, and a node index relationship of the human-machine interface is obtained.
[0077] The preset update cycle is a preset cycle for updating the human-machine interface. When the update cycle is not reached, the server can continuously collect data that is continuously updated during this period and construct a buffer queue.
[0078] In this embodiment, the relationship between variables and nodes is managed through two mapping relationships, which reduces direct coupling relationships and facilitates maintenance and modification.
[0079] S202, updating the human-machine interface according to the buffer queue and the node index relationship.
[0080] After obtaining the relationship between the buffer queue and the node index, the node and data to be updated can be quickly located according to the mapping relationship between the buffer queue and the node index, so as to quickly implement the update of the human-machine interface.
[0081] Exemplarily, the variable name of the simulation data to be updated can be obtained based on the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value in the buffer queue, and then the node corresponding to the variable name is matched based on the variable name and the mapping relationship between the node where the simulation data is located and the variable name of the simulation data in the node index relationship, and the matched node is determined as the node that needs to be updated, and then the variable value in the buffer queue is updated to the matched node. In this way, the simulation data corresponding to the node that needs to be updated is updated, and then the updated simulation data is re-rendered, and the human-computer interface is also updated.
[0082] In the interface update method provided in the embodiment of the present application, a buffer queue of simulation data to be updated in the human-machine interface is obtained, and a node index relationship of the human-machine interface is obtained, and then the human-machine interface is updated according to the buffer queue and the node index relationship, wherein the buffer queue represents a mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value, and the node index relationship represents a mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data. In the method, when the human-machine interface needs to be updated, the human-machine interface is updated through the buffer queue of the simulation data to be updated in the human-machine interface and the node index relationship of the human-machine interface, and the buffer queue of the simulation data to be updated includes the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value, and the node index relationship of the human-machine interface includes the mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data. In this way, there is a mapping between the variable name and the variable value, and there is a mapping between the variable name and the node. According to the two mapping relationships, the relevant nodes and the corresponding variable values can be quickly found, and the update of the simulation data in the human-machine interface can be quickly completed, and then the update of the human-machine interface can be completed. This is equivalent to establishing a mapping relationship between the variable name and the variable value and a mapping relationship between the variable name and the node, so that the relevant node can be quickly located when searching and updating the node, thereby improving the query efficiency, quickly completing the update of the human-machine interface, and improving the response speed of the human-machine interface.
[0083] Based on the above embodiment, an embodiment is provided to illustrate the process of obtaining the buffer queue of simulation data to be updated in the human-machine interface.
[0084] In an exemplary embodiment, as shown in FIG3 , obtaining a buffer queue of simulation data to be updated in a human-machine interface includes:
[0085] S301, obtaining at least one variable value updated in an update cycle of simulation data to be updated and a variable name of the simulation data to be updated.
[0086] A simulation data can be updated at least once in an update cycle. Each updated data is uploaded by the real device to the server, and the server stores it in the update database. At least one variable value updated in the simulation data to be updated in the update cycle can be determined based on the update database.
[0087] For example, after each data is updated in the previous update cycle, all updated data in the update database is deleted to store the updated data in the next update cycle. In this way, the update database does not include the updated data of the previous update cycle, and the updated data at this time can be directly obtained from the update database, and the updated data at this time is the data to be updated to the human-machine interface.
[0088] Still taking the speed data as an example, assuming that every 500ms is an update cycle, within the update cycle, the speed data changes three times, and the updated data are 800rpm, 810rpm, and 820rpm respectively, then 800rpm, 810rpm, and 820rpm are the simulation data to be updated. Among them, the update cycle can be set according to actual needs, and the embodiment of the present application does not limit this.
[0089] After obtaining the simulation data to be updated from the update database, the variable value and variable name are obtained according to the simulation data to be updated. Taking the above 800rpm, 810rpm, and 820rpm simulation data to be updated as an example, the corresponding variable values are 800, 810, and 820 respectively, and the corresponding variable name is speed.
[0090] S302, storing a mapping relationship between each variable value and the variable name to obtain a buffer queue.
[0091] After obtaining the variable value and variable name of the data to be updated, a mapping relationship is established between the variable name and the variable value to obtain a buffer queue.
[0092] In the embodiment of the present application, each variable value is stored as a mapping relationship with the variable name to obtain a buffer queue. Still taking the above-mentioned 800rpm, 810rpm, and 820rpm simulation data to be updated as an example, the mapping relationships in the buffer queue are speed-800, speed-810, and speed-820, respectively. Among them, the mapping relationship can be stored in a Map structure. For example, before constructing the buffer queue, a Map structure is preset to store the corresponding relationship between the variable name and the variable value.
[0093] In the interface update method provided in the embodiment of the present application, by obtaining at least one variable value updated in the update cycle of the simulation data to be updated and the variable name of the simulation data to be updated, and then storing the mapping relationship between each variable value and the variable name, a buffer queue is obtained. In this method, an optional way to quickly obtain the buffer queue is provided; by obtaining multiple variable values updated in the update cycle of the simulation data to be updated, a mapping relationship between each variable value and the variable name of the simulation data to be updated can be established, and the multiple mapping relationships constitute the buffer queue of the simulation data to be updated, laying a foundation for updating the data query of the human-computer interface.
[0094] Based on the above embodiment, an embodiment is provided to illustrate the process of obtaining the node index relationship of the human-machine interface.
[0095] In an exemplary embodiment, as shown in FIG4 , obtaining the node index relationship of the human-machine interface includes:
[0096] S401, obtaining multiple specific tags in simulation data, and separating multiple variable names from each specific tag.
[0097] As mentioned above, the simulation data includes the canvas data generated when building the human-machine interface. Before generating the canvas data, multiple specific tags are added. In this way, the simulation data carries multiple specific tags. Among them, the specific tag is a tag added to the variable name, which is used to quickly locate the variable name. For example, the data added with the specific tag is %_VarName_%, where %_ _% is the specific tag and VarName is the variable name.
[0098] The simulation data includes multiple specific tags. You can traverse the entire simulation data and search for %_ _% specific tags in the simulation data. When a specific tag is found, the variable name is separated from the data of the specific tag. For example, when traversing the entire simulation data, you find node data such as %_VarName_% and separate the VarName between the specific tags %_ _%, which is the variable name.
[0099] S402, storing each variable name and the node information corresponding to each variable name in the form of a key-value pair, and obtaining a node index relationship of the human-computer interface.
[0100] After the variable names are obtained, a mapping relationship is established between each variable name and the node information corresponding to each variable name to obtain a node index relationship of the human-computer interface.
[0101] Before building the human-computer interface and generating canvas data, the nodes and corresponding variable names have been bound, so the node information corresponding to each variable name can be directly obtained.
[0102] In an embodiment of the present application, the key-value pair may also be in the form of a Map structure. When constructing a node index relationship, a Map structure is generated in advance, with each variable name as the key and the node information corresponding to each variable name as the value, which is stored in the Map structure to obtain the node index relationship of the human-computer interface.
[0103] In the interface updating method provided in the embodiment of the present application, multiple specific tags in the simulation data are obtained, and multiple variable names are separated from each specific tag, and then each variable name and the node information corresponding to each variable name are stored in the form of a key-value pair to obtain the node index relationship of the human-computer interface. In this method, multiple variable names in the simulation data can be quickly separated from the simulation data through specific tags, laying the foundation for quickly and accurately constructing the node index relationship, and then each variable name and the corresponding node information are stored in the form of a key-value pair, which can quickly construct the node index relationship and provide data support for the rapid response of the human-computer interface.
[0104] Based on the above embodiment, an embodiment is provided to illustrate the process of storing each variable name and the node information corresponding to each variable name in the form of key-value pairs to obtain the node index relationship of the human-computer interface.
[0105] In an exemplary embodiment, as shown in FIG5 , each variable name and the node information corresponding to each variable name are stored in the form of a key-value pair to obtain a node index relationship of a human-computer interface, including:
[0106] S501, obtaining the historical node index relationship.
[0107] The index relationship between nodes and variable names is stored one by one. If before this, the mapping relationship between multiple variable names and corresponding node information has been stored, it can be used as a historical node index relationship. When there are other mapping relationships between variable names and nodes that have not been stored, the mapping relationship can continue to be stored based on the historical node index relationship to form a complete node index relationship.
[0108] S502: If each variable name exists in the historical node index relationship, each node information is added to the position where the value corresponding to each variable name is located to obtain the node index relationship.
[0109] For any variable name, first compare the variable name with the variable name in the historical node index relationship. If the variable name exists in the historical node index relationship, that is, the historical node index relationship has stored the mapping relationship between the variable name and some nodes, then the node information corresponding to the variable name is added to the position of the value corresponding to the variable name, and the mapping relationship between all variable names and nodes is stored in the historical node index relationship to obtain the node index relationship.
[0110] S503, if each variable name does not exist in the historical node index relationship, then each variable name is used as a key, and the node information corresponding to each variable name is used as a value, and is stored in the historical node index relationship to obtain a node index relationship.
[0111] For any variable name, if the variable name does not exist in the historical node index relationship, the variable name is used as the key and the node information corresponding to the variable name is used as the value and stored in the historical node index relationship. The mapping relationship between all variable names and nodes is stored in the historical node index relationship to obtain the node index relationship.
[0112] In the interface update method provided in the embodiment of the present application, the historical node index relationship is obtained. If the variable name exists in the historical node index relationship, the node information is added to the position of the value corresponding to each variable name to obtain the node index relationship. If the variable name does not exist in the historical node index relationship, each variable name is used as a key, and the node information corresponding to each variable name is used as a value to store it in the historical node index relationship to obtain the node index relationship. In this method, by obtaining the historical node index relationship, the relationship between each variable name and the node can continue to establish a mapping relationship on the basis of the historical node index relationship, which provides an optional way to quickly determine the node index relationship; when each variable name exists in the historical node index relationship, the node information corresponding to each variable name can be added to the historical node index relationship. When each variable name does not exist in the historical node index relationship, the new variable name and the corresponding node information are stored in the historical node index relationship in the form of key-value pairs, that is, the node index relationship is obtained, which provides data support for the rapid query of nodes.
[0113] Based on the above embodiment, an embodiment is provided to illustrate the generation process of the above simulation data.
[0114] In an exemplary embodiment, as shown in FIG6 , the method further includes:
[0115] S601, obtaining multiple rectangles generated in the new canvas, and determining each rectangle as a node of multiple devices corresponding to the human-machine interface.
[0116] In the embodiment of the present application, when constructing a human-computer interface, a new canvas is first created, and then a new node is created in the new canvas.
[0117] For example, a new canvas can be created in the graph editing engine, and then a rectangle is generated in the canvas. A rectangle represents a node. A device can correspond to multiple nodes. Multiple rectangles are generated in the new canvas as nodes of multiple devices. The device refers to the aforementioned real device.
[0118] S602, obtaining the variable name corresponding to each node according to the device data corresponding to each node.
[0119] In the embodiment of the present application, the device data corresponding to each node is uploaded to the server through each device.
[0120] Each data has a variable name, and the variable name corresponding to each node is obtained according to the device data corresponding to each node. For example, keyword extraction can be performed on the device data corresponding to each node to obtain the variable name corresponding to each node from the keyword.
[0121] S603, binding each variable name with the attribute of each node to generate simulation data.
[0122] In the embodiment of the present application, each node includes multiple attributes, such as size, position, content, etc.
[0123] After obtaining the variable name of each node, each variable name can be bound to one of the attributes of each node, and a specific tag can be added, and then the canvas data is exported, that is, the simulation data is generated.
[0124] In the interface update method provided in the embodiment of the present application, multiple rectangles generated in the newly created canvas are obtained, and each rectangle is determined as a node of multiple devices corresponding to the human-machine interface, and then the variable name corresponding to each node is obtained according to the device data corresponding to each node, and then each variable name is bound to the attribute of each node to generate simulation data. In this method, an optional way to quickly generate simulation data is provided; by generating a rectangle as a node in the newly created canvas, and then obtaining the variable name corresponding to each node according to the device data corresponding to each node, the variable name is bound to the attribute of the node so that each variable name belongs to the corresponding device node, and based on this, the simulation data of the human-machine interface is generated to provide data support for the construction of the human-machine interface.
[0125] Based on the above embodiment, an embodiment is provided to illustrate the process of updating the human-machine interface according to the buffer queue and the node index relationship.
[0126] In an exemplary embodiment, as shown in FIG7 , updating the human-machine interface according to the buffer queue and the node index relationship includes:
[0127] S701, obtaining the latest variable value of the simulation data to be updated according to the buffer queue.
[0128] The latest variable value of the simulation data to be updated refers to the variable value in the buffer queue that is closest to the current time.
[0129] Still taking the aforementioned simulation data of 800rpm, 810rpm, and 820rpm to be updated as an example, the third data 820rpm is the updated data closest to the current data, and its corresponding variable value is 820, then the latest variable value of the simulation data to be updated is 820.
[0130] When storing the mapping relationship between variable names and variable values, the above-mentioned buffer queue is stored in the order of updated data. Taking the simulation data to be updated at 800rpm, 810rpm, and 820rpm as an example, 800rpm is the first updated data, 810rpm is the later updated data, and 820rpm is the last updated data. In the buffer queue, speed -800 is the first, speed -810 is the next, and speed -820 is the last. When obtaining the latest variable value of the simulation data to be updated, the variable value in the last mapping relationship in the buffer queue can be used as the latest variable value of the simulation data to be updated.
[0131] S702, updating the human-machine interface according to the latest variable value and node index relationship.
[0132] In an embodiment of the present application, after obtaining the latest variable value of the simulation data to be updated, the node related to the latest variable value is obtained from the node index relationship, and then the latest variable value is updated to the node related to the latest variable value to obtain the updated simulation data, and then the updated simulation data is re-rendered to achieve the update of the human-computer interface.
[0133] In this embodiment, whenever the data changes, the human-computer interface is not updated directly, but is updated based on the latest variable value, that is, multiple updates in a short period of time are combined into one, ensuring that only necessary update operations are performed in the case of high-frequency updates, reducing resource waste, and there is no need to render the data every time it is updated, which reduces the number of renderings, optimizes rendering, and improves the response speed of the human-computer interface, thereby improving system performance.
[0134] In the interface update method provided in the embodiment of the present application, the latest variable value of the simulation data to be updated is obtained according to the buffer queue, and then the human-machine interface is updated according to the latest variable value and the node index relationship. In this method, an optional way to quickly update the human-machine interface is provided; by obtaining the latest variable value of the simulation data to be updated, the corresponding node can be quickly queried from the node index relationship based on the latest variable value, and the variable value can be updated to achieve the update of the human-machine interface, and the update is only based on the latest variable value, which reduces resource waste, improves the response speed of the human-machine interface, and improves system performance.
[0135] Based on the above embodiment, an embodiment is provided to illustrate the process of updating the human-machine interface according to the latest variable value and the node index relationship.
[0136] In an exemplary embodiment, as shown in FIG8 , updating the human-machine interface according to the latest variable value and the node index relationship includes:
[0137] S801, according to the variable name corresponding to the latest variable value and the node index relationship, obtain multiple nodes matching the variable name.
[0138] The node index relationship includes mapping relationships between multiple variable names and nodes. According to the variable name corresponding to the latest variable value, multiple nodes having mapping relationships with the variable name corresponding to the latest variable value can be matched in the node index relationship.
[0139] Exemplarily, the variable name corresponding to the latest variable value is compared with multiple variable names in the node index relationship, and multiple nodes in the node index relationship that match the variable name that is the same as the variable name corresponding to the latest variable value are obtained. These multiple nodes are the nodes that need to be updated.
[0140] S802, replacing the variable value corresponding to the variable name under each node with the latest variable value to obtain updated simulation data.
[0141] Each node has a variable name corresponding to the node and a variable value corresponding to the variable name. When updating the variable value, for any node, the variable value corresponding to the variable name under the node is replaced by the latest variable value. After the variable value corresponding to each node is replaced with the latest variable value, the updated simulation data is obtained.
[0142] S803, re-rendering the updated simulation data to obtain an updated human-machine interface.
[0143] After obtaining the updated simulation data, the updated simulation data is re-rendered to obtain an updated human-machine interface, that is, the updating of the human-machine interface is completed.
[0144] In addition, the node index relationship in the above embodiment is a mapping relationship constructed with the variable name as the key and the node as the value. When updating the human-machine interface, all nodes affected by a variable data are queried, and multiple nodes are updated at one time. Alternatively, the node index relationship can also be constructed with the node as the key and the variable name as the value. When updating the human-machine interface, all affected data in a node are integrated through the node, and all updated data in a node are modified uniformly, which can also reduce the number of renderings, optimize rendering, and improve the response speed of the human-machine interface.
[0145] In the interface updating method provided in the embodiment of the present application, multiple nodes matching the variable name are obtained according to the variable name corresponding to the latest variable value and the node index relationship, and then the variable value corresponding to the variable name under each node is replaced by the latest variable value to obtain the updated simulation data, and then the updated simulation data is re-rendered to obtain the updated human-computer interface. In this method, multiple nodes that need to be updated can be matched in the node index relationship through the variable name corresponding to the latest variable value, and then the latest variable value is replaced in each node that needs to be updated, so that the update of the human-computer interface can be completed quickly, and the update efficiency of the human-computer interface is improved.
[0146] In addition, in an exemplary embodiment, the present application also provides an interface updating method, as shown in FIG9 , which may include the following steps:
[0147] S901, obtaining multiple rectangles generated in the new canvas, and determining each rectangle as a node of multiple devices corresponding to the human-machine interface.
[0148] S902, obtaining the variable name corresponding to each node according to the device data corresponding to each node.
[0149] S903, binding each variable name with the attribute of each node to generate simulation data.
[0150] S904, obtaining multiple specific tags in the simulation data, and separating multiple variable names from each specific tag.
[0151] S905 , storing each variable name and the node information corresponding to each variable name in the form of a key-value pair, and obtaining a node index relationship of the human-computer interface.
[0152] S906, obtaining at least one variable value updated in the update cycle of the simulation data to be updated and the variable name of the simulation data to be updated.
[0153] S907, storing a mapping relationship between each variable value and the variable name to obtain a buffer queue.
[0154] S908, obtaining the latest variable value of the simulation data to be updated according to the buffer queue.
[0155] S909, according to the variable name corresponding to the latest variable value and the node index relationship, obtain multiple nodes matching the variable name.
[0156] S910, replacing the variable value corresponding to the variable name under each node with the latest variable value to obtain updated simulation data.
[0157] S911, re-rendering the updated simulation data to obtain an updated human-machine interface.
[0158] The above-mentioned process of S901-S911 can refer to the description of the above-mentioned method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0159] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0160] Based on the same inventive concept, the embodiment of the present application also provides an interface update device for implementing the interface update method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more interface update device embodiments provided below can refer to the limitations of the interface update method above, and will not be repeated here.
[0161] In an exemplary embodiment, as shown in FIG10 , an interface updating device 1 is provided, comprising: a relationship acquisition module 10 and an interface updating module 20, wherein:
[0162] The relationship acquisition module 10 is used to acquire the buffer queue of the simulation data to be updated in the human-machine interface, and to acquire the node index relationship of the human-machine interface; the buffer queue represents the mapping relationship between the variable name of the simulation data to be updated and the corresponding variable value; the node index relationship represents the mapping relationship between the node where the simulation data is located in the human-machine interface and the variable name of the simulation data;
[0163] The interface updating module 20 is used to update the human-machine interface according to the buffer queue and the node index relationship.
[0164] In one embodiment, the relationship acquisition module 10 is further used for:
[0165] At least one variable value updated in the update cycle of the simulation data to be updated and the variable name of the simulation data to be updated are obtained; a mapping relationship is stored between each variable value and the variable name to obtain a buffer queue.
[0166] In one embodiment, the relationship acquisition module 10 is further used for:
[0167] A plurality of specific tags in the simulation data are obtained, and a plurality of variable names are separated from each specific tag; each variable name and the node information corresponding to each variable name are stored in the form of a key-value pair to obtain a node index relationship of a human-machine interface.
[0168] In one embodiment, the relationship acquisition module 10 is further used for:
[0169] Get the historical node index relationship; if each variable name exists in the historical node index relationship, add each node information to the position of the value corresponding to each variable name to obtain the node index relationship; if each variable name does not exist in the historical node index relationship, use each variable name as the key and the node information corresponding to each variable name as the value, store them in the historical node index relationship to obtain the node index relationship.
[0170] In one embodiment, the interface updating device 1 further includes:
[0171] A node acquisition module, used to acquire multiple rectangles generated in the newly created canvas, and determine each rectangle as a node of multiple devices corresponding to the human-machine interface;
[0172] The variable name acquisition module is used to obtain the variable name corresponding to each node according to the device data corresponding to each node;
[0173] The data generation module is used to bind each variable name with the attributes of each node to generate simulation data.
[0174] In one embodiment, the interface updating module 20 is further used for:
[0175] According to the buffer queue, the latest variable value of the simulation data to be updated is obtained; according to the latest variable value and the node index relationship, the human-machine interface is updated.
[0176] In one embodiment, the interface updating module 20 is further used for:
[0177] According to the variable name corresponding to the latest variable value and the node index relationship, multiple nodes matching the variable name are obtained; the variable value corresponding to the variable name under each node is replaced by the latest variable value to obtain updated simulation data; the updated simulation data is re-rendered to obtain an updated human-computer interface.
[0178] Each module in the above interface updating device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0179] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store interface update data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an interface update method is implemented.
[0180] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0181] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0182] Obtaining a buffer queue of simulation data to be updated in the human-machine interface, and obtaining a node index relationship of the human-machine interface; the buffer queue represents a mapping relationship between a variable name of the simulation data to be updated and a corresponding variable value; the node index relationship represents a mapping relationship between a node where the simulation data is located in the human-machine interface and a variable name of the simulation data;
[0183] Update the human-machine interface according to the buffer queue and node index relationship.
[0184] The implementation principles and technical effects of each step implemented by the processor in the embodiment of the present application are similar to the principles of the above-mentioned interface update method, and will not be repeated here.
[0185] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0186] Obtaining a buffer queue of simulation data to be updated in the human-machine interface, and obtaining a node index relationship of the human-machine interface; the buffer queue represents a mapping relationship between a variable name of the simulation data to be updated and a corresponding variable value; the node index relationship represents a mapping relationship between a node where the simulation data is located in the human-machine interface and a variable name of the simulation data;
[0187] Update the human-machine interface according to the buffer queue and node index relationship.
[0188] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned interface updating method and will not be repeated here.
[0189] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0190] Obtaining a buffer queue of simulation data to be updated in the human-machine interface, and obtaining a node index relationship of the human-machine interface; the buffer queue represents a mapping relationship between a variable name of the simulation data to be updated and a corresponding variable value; the node index relationship represents a mapping relationship between a node where the simulation data is located in the human-machine interface and a variable name of the simulation data;
[0191] Update the human-machine interface according to the buffer queue and node index relationship.
[0192] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned interface updating method and will not be repeated here.
[0193] It should be noted that the personnel information (including but not limited to personnel equipment information, personnel personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the personnel or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0194] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0195] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0196] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An interface updating method, characterized in that: The method comprises: Obtaining a buffer queue of simulation data to be updated in a human-machine interface, and obtaining a node index relationship of the human-machine interface; the buffer queue represents a mapping relationship between a variable name of the simulation data to be updated and a corresponding variable value; the node index relationship represents a mapping relationship between a node where the simulation data is located in the human-machine interface and a variable name of the simulation data; The human-machine interface is updated according to the buffer queue and the node index relationship.
2. The method according to claim 1, characterized in that The step of obtaining a buffer queue of simulation data to be updated in the human-machine interface includes: Acquire at least one variable value updated in a preset update cycle of the simulation data to be updated and a variable name of the simulation data to be updated; The mapping relationship between each variable value and the variable name is stored to obtain the buffer queue.
3. The method according to claim 1 or 2, characterized in that: The obtaining of the node index relationship of the human-machine interface includes: Acquire multiple specific tags in the simulation data, and separate multiple variable names from each of the specific tags; The variable names and the node information corresponding to the variable names are stored in the form of key-value pairs to obtain the node index relationship of the human-computer interface.
4. The method according to claim 3, characterized in that The storing of each variable name and the node information corresponding to each variable name in the form of a key-value pair to obtain a node index relationship of the human-computer interface includes: Get the historical node index relationship; If each of the variable names exists in the historical node index relationship, each of the node information is added to the position of the value corresponding to each of the variable names to obtain the node index relationship; If the variable names do not exist in the historical node index relationship, each variable name is used as a key, and the node information corresponding to each variable name is used as a value, and is stored in the historical node index relationship to obtain the node index relationship.
5. The method according to claim 3, characterized in that: The method further comprises: Acquire multiple rectangles generated in the newly created canvas, and determine each of the rectangles as a node of multiple devices corresponding to the human-machine interface; According to the device data corresponding to each of the nodes, obtain the variable name corresponding to each of the nodes; Bind each of the variable names with the attributes of each of the nodes to generate the simulation data.
6. The method according to claim 1 or 2, characterized in that: The updating of the human-machine interface according to the buffer queue and the node index relationship comprises: According to the buffer queue, obtaining the latest variable value of the simulation data to be updated; The human-machine interface is updated according to the latest variable value and the node index relationship.
7. The method according to claim 6, characterized in that The updating of the human-machine interface according to the latest variable value and the node index relationship comprises: According to the variable name corresponding to the latest variable value and the node index relationship, a plurality of nodes matching the variable name are obtained; The latest variable value replaces the variable value corresponding to the variable name under each node to obtain updated simulation data; The updated simulation data is re-rendered to obtain an updated human-computer interface.
8. An interface updating device, characterized in that: The device comprises: A relationship acquisition module is used to acquire a buffer queue of simulation data to be updated in a human-machine interface, and to acquire a node index relationship of the human-machine interface; the buffer queue represents a mapping relationship between a variable name of the simulation data to be updated and a corresponding variable value; the node index relationship represents a mapping relationship between a node where the simulation data is located in the human-machine interface and a variable name of the simulation data; An interface updating module is used to update the human-machine interface according to the buffer queue and the node index relationship.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Page rendering method and device
CN106202529A
Resource online management method and device, computer equipment and storage medium
CN110716916A
Implementation method and device of vehicle network integrated simulation human-computer interface system
CN115329463A
Implementation method, device and equipment for simulating man-machine interaction of target system
CN115421819A
Content display method, device and equipment, computer readable storage medium and product
CN118779552A