Configuration human-computer interface real-time data updating method and device

By constructing a Trie dictionary tree and a Fail pointer, the difficulties in data integration and location during configuration HMI data updates are solved, enabling fast and real-time data updates and improving the data update efficiency of the configuration HMI.

CN120929660APending Publication Date: 2025-11-11CASCO SIGNAL LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511025517.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing configuration human-machine interface data update mechanisms face problems such as difficulty in data integration, update delays, and low efficiency. Especially in the case of multi-system data transmission and frequent updates, it is difficult to quickly locate the human-machine interface graphic elements that need to be updated, affecting the real-time operational control of dispatchers.

Method used

Construct a Trie tree and a Fail pointer, split the variable name string into pattern strings, use the common prefix of the Trie tree for fast matching, and use the Fail pointer to quickly jump when a match fails, thus realizing the matching and data updating of multiple pattern strings.

Benefits of technology

It improves the efficiency of data updates, reduces the time spent on repetitive calculations, and enables quick retrieval and location of data that needs updating, ensuring the real-time performance and accuracy of the configuration human-machine interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929660A_ABST
    Figure CN120929660A_ABST
Patent Text Reader

Abstract

The invention discloses a configuration human-computer interface real-time data updating method and device, and the method comprises the steps: obtaining a variable name character string configured by each graphic element in a configuration human-computer interface, and segmenting the variable name character string into a plurality of pattern strings through special characters; constructing a Trie dictionary tree according to the pattern strings, wherein the tail pattern string of each variable name character string is used as an end node of the Trie dictionary tree; binding graphic animation object information to the tail mode string; a Fail failure pointer is constructed and is used for rapid jumping when variable name character string matching fails; and when an external interface drives a value to change through the variable name character string, matching the variable name character string through the Trie dictionary tree and the Fail failure pointer, positioning graphic animation object information bound with the tail mode string in the variable name character string, and driving the configuration human-computer interface to update. According to the method, the data updating efficiency is improved, and the real-time requirement of configuration human-computer interface updating can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of urban rail transit data processing, and in particular to a method and apparatus for real-time data updating of a configuration human-machine interface. Background Technology

[0002] The configuration HMI (Human-Machine Interface) is the core window for dispatchers to interact with the entire operation system in an urban rail intelligent operation control system. Through this HMI, dispatchers can intuitively view detailed information about each line, train, and station, and issue control commands. However, due to the wide range of sources, complex formats, and frequent updates of urban rail data, the existing configuration HMI data update mechanism faces many challenges.

[0003] On the one hand, different devices and systems have different data transmission protocols and formats, such as Train Control System (TCMS), Signaling System (ATS), and Building Automation System (BAS), which makes data integration and updating extremely difficult. On the other hand, with large amounts of data, traditional data search and matching algorithms are inefficient and cannot quickly locate the human-machine interface graphic elements that need to be updated, resulting in delays and untimely data updates, which seriously affect the dispatchers' ability to monitor the operational status in real time.

[0004] The statements herein provide only background information in relation to this invention and do not necessarily constitute prior art. Summary of the Invention

[0005] The purpose of this invention is to provide a method and apparatus for real-time data update of a human-machine interface to meet the real-time requirements of interface data updates.

[0006] To achieve the above objectives, this invention provides a method for real-time data update of a configuration human-machine interface, comprising: obtaining variable name strings configured for each graphical element in the configuration human-machine interface; dividing the variable name strings into several pattern strings using special characters; constructing a Trie dictionary tree based on the pattern strings, with the last pattern string of each variable name string serving as an end node of the Trie dictionary tree; binding graphical animation object information to the last pattern string; constructing a Fail pointer for quick redirection when the variable name string fails to match; and when an external interface drives a value change through the variable name string, matching the variable name string using the Trie dictionary tree and the Fail pointer to locate the graphical animation object information bound to the last pattern string in the variable name string, thereby driving the configuration human-machine interface to update.

[0007] Optionally, the variable name strings configured for each graphic element in the configuration HMI are obtained, including: S11, starting the configuration HMI software and opening any configuration diagram; S12, traversing all graphic elements in the configuration diagram and recording the variable name strings configured for the graphic elements and the graphic animation object information associated with the variable name strings.

[0008] Optionally, the graphic animation object information includes variable name, canvas ID, graphic ID, and graphic attribute ID.

[0009] Optionally, each variable string is divided into substrings by the special character as a pattern string, and the pattern strings are arranged in order from left to right in the variable string to form a pattern string set; wherein the rightmost character in the variable string is the last pattern string.

[0010] Optionally, the special character is an underscore.

[0011] Optionally, constructing a Trie dictionary tree based on the pattern strings includes: S21, initializing the root node by creating a root node as the starting point of the Trie dictionary tree; S22, sequentially inserting the set of pattern strings formed by each variable name string into the Trie dictionary tree.

[0012] Optionally, step S22, inserting the pattern strings from the first pattern string set formed by the first variable name string into the Trie trie, specifically includes:

[0013] S221a. Starting from the root node, for the first pattern string in the first pattern string set, check if there is a node corresponding to the first pattern string among the child nodes of the root node. If not, create a first node and mark it as the first pattern string, and use the first node as a child node of the root node.

[0014] S222a. For the nth pattern string in the first pattern string set, check if there is a corresponding node for the nth pattern string among the child nodes of the (n-1)th node. If not, create an nth node and mark it as the nth pattern string, and use the nth node as a child node of the (n-1)th node; where n is the order of the pattern strings in the first pattern string set, n = 2, 3 ... N, and N is the total number of pattern strings in the first pattern string set; repeat step S222a until all N pattern strings in the first pattern string set are inserted into the Trie tree;

[0015] S223a. Mark the last node corresponding to the last pattern string as the end node of the first pattern string set.

[0016] Optionally, step S22, inserting the pattern string from the set of pattern strings formed by the m-th variable name string into the Trie dictionary tree, where m ≥ 2, specifically includes:

[0017] Step S221b: According to the order of the pattern strings in the m-th pattern string set, sequentially search whether the i-th pattern string has a child node with the same pattern string in the Trie dictionary. If it exists, search down along the path already created in the Trie dictionary for the (i+1)-th pattern string; if it does not exist, execute step S222b.

[0018] Step S222b: Create the (i+1)th node and mark it as the (i+1)th pattern string, and use the (i+1)th node as the child node of the ith node; where i is the order of the pattern string in the m-th pattern string set, i = 1, 2, ..., M, and M is the number of pattern strings in the m-th pattern string set;

[0019] S223b, Mark the last node corresponding to the last pattern string as the end node of the m-th pattern string set;

[0020] Repeat steps S221b to S223b until all the M pattern string sets formed by all variable strings are inserted into the Trie dictionary tree.

[0021] Optionally, the graphic animation object information is bound to the end node, and a Boolean variable is used to mark the end node so that the path from the root node to the end node constitutes a complete variable name string.

[0022] Optionally, one of the attributes of the end node is isEnd, which is a boolean type. The isEND attribute is set to true. When checking whether the variable name string exists, the node corresponding to the end pattern string of the variable name string is found along the path of the Trie tree, and the isEND attribute of the node is true. Then it is determined that the variable name string exists in the Trie tree.

[0023] Optionally, the Fail pointer can be constructed using a breadth-first search algorithm.

[0024] Optionally, constructing the Fail pointer includes: S31, initializing the queue: pointing the failure pointer of the root node to itself, and putting the root node into a queue; S32, using the breadth-first search algorithm to process the nodes in the queue.

[0025] Optionally, in step S32, the breadth-first search algorithm is used to process the nodes in the queue. A node is taken out from the queue, and each child node of that node is judged as follows: if the node is a direct child of the root node, its failure pointer points to the root node; if the node is not a direct child of the root node, a child node with the same character as the node pointed to by the failure pointer of its parent node is found; if a child node with the same character exists, the failure pointer of the current node is pointed to that child node; if no child node with the same character exists, the failure pointer of the current node is pointed to the root node, and the currently processed child node is added to the queue.

[0026] Optionally, when an external interface drives a value change via a variable name string, the variable name string is matched using the Trie dictionary and the Fail pointer, specifically including:

[0027] S41. Divide the variable name string into several pattern strings according to special characters, and set the current state pointer as the root node starting from the first pattern string;

[0028] S42. For each pattern string of the variable string, make a judgment: if the pattern string is not in the child node of the current node, jump according to the failure pointer corresponding to the current node; if the pattern string is in the child node of the current node, update the current state pointer to the child node and continue to judge the next pattern string; if the current node is the last pattern string, record the matching position and the last pattern string.

[0029] Optionally, the real-time data update method for the configuration human-machine interface further includes: determining whether the node where the last pattern string recorded in step S42 is located is marked as an end node; if the node is an end node, then the configuration human-machine interface is updated through the graphic animation object information bound to the node.

[0030] The present invention also provides a configuration human-machine interface real-time data update device, applicable to the configuration human-machine interface real-time data update method as described above, comprising:

[0031] The acquisition module is used to traverse the graphic elements on the configuration diagram and obtain the variable name string corresponding to the graphic element and the graphic animation object information associated with the variable name string;

[0032] The construction module constructs a Trie dictionary and a Fail pointer based on the variable name string and the graphic animation object information associated with the variable name string, thus forming an AC automaton module;

[0033] The external interface module drives value changes by setting a variable name string;

[0034] The AC automaton module is connected to the external interface module and is used to segment the variable name string and match it according to the Trie dictionary and the Fail pointer. If the match is successful, the configuration human-machine interface is updated according to the graphic animation object information bound to the end node of the Trie dictionary corresponding to the variable name string.

[0035] Compared with existing technologies, the real-time data update method and apparatus for configuring human-machine interfaces provided by this invention have at least the following beneficial effects:

[0036] This invention, by constructing a Trie tree and a Fail pointer, not only enables multi-pattern matching, which can handle the matching of multiple pattern strings at once, greatly reducing the time spent on repeated calculations, but also allows for the rapid search and location of data that needs to be updated in large amounts of data.

[0037] Secondly, the Trie structure utilizes the common prefixes of strings, allowing the search process to proceed quickly along the tree branches, reducing unnecessary character comparisons. When a search in the Trie fails, the Fail pointer guides a quick jump to other possible matching positions to continue the search, avoiding a restart from the beginning. This significantly improves the speed of finding and locating data, thereby increasing the efficiency of data updates.

[0038] Furthermore, when the system initializes or the data update rules change, the real-time data update device of the configuration HMI can preprocess the data pattern and reconstruct data structures such as the Trie dictionary and Fail pointers. Once constructed, subsequent data update operations can directly utilize these existing structures for rapid matching and updating, avoiding the complex calculation and construction process for each update, thus saving a significant amount of time and computing resources. Attached Figure Description

[0039] Figure 1 This is a flowchart of the real-time data update method for the configuration human-machine interface of the present invention;

[0040] Figure 2 This is an example diagram of constructing a Trie tree using the substrings of the variable name string as the pattern string in an embodiment of the present invention;

[0041] Figure 3 This is an example diagram illustrating the construction of a Fail pointer based on a Trie in an embodiment of the present invention;

[0042] Figure 4 This is an example diagram illustrating the fast matching of variable name strings using a Trie tree and Fail pointers in an embodiment of the present invention;

[0043] Figure 5 This is a schematic diagram of the module of the real-time data update device for the configuration human-machine interface of the present invention. Detailed Implementation

[0044] The following detailed description, in conjunction with the accompanying drawings and specific embodiments, further illustrates the real-time data update method and apparatus for configuring human-machine interfaces proposed in this invention. The advantages and features of this invention will become clearer from the following description. It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions, intended only to facilitate and clearly illustrate the embodiments of this invention. Please refer to the accompanying drawings to make the objectives, features, and advantages of this invention more apparent and understandable. It should be understood that the structures, proportions, sizes, etc., depicted in the accompanying drawings are only for illustrative purposes to aid those skilled in the art and are not intended to limit the implementation conditions of this invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to the size, without affecting the effects and objectives achieved by this invention, should still fall within the scope of the technical content disclosed in this invention.

[0045] To meet the real-time requirements of configuration human-machine interface data updates, embodiments of the present invention provide a method for real-time data updates of configuration human-machine interfaces, such as... Figure 1 As shown, it includes: obtaining variable name strings configured for each graphical element in the configuration HMI; dividing the variable name strings into several pattern strings using special characters; constructing a Trie dictionary tree based on the pattern strings, with the last pattern string of each variable name string serving as an end node of the Trie dictionary tree; binding graphical animation object information to the last pattern string; constructing a Fail pointer for quick redirection when the variable name string fails to match; when an external interface drives a value change through the variable name string, matching the variable name string using the Trie dictionary tree and the Fail pointer to locate the graphical animation object bound to the last pattern string in the variable name string, and driving the configuration HMI interface to update.

[0046] The embodiments of this invention, by constructing a Trie (prefix tree) and a fail pointer, can quickly locate and update data in large amounts of data. Furthermore, the Trie structure utilizes the common prefix of variable name strings, allowing the search process to proceed quickly along the branches of the Trie, reducing unnecessary character comparisons. Secondly, when a search in the Trie fails, the fail pointer can guide a quick jump to other possible matching positions to continue the search, avoiding a re-search from the beginning. This significantly improves the speed of finding and locating data, thereby increasing the efficiency of data updates.

[0047] The step of obtaining the variable name strings configured for each graphical element in the configuration HMI includes the following steps: S11, starting the configuration HMI software and opening any configuration diagram; S12, traversing all graphical elements in the configuration diagram and recording the variable name strings configured for each graphical element and the graphical animation object information associated with those variable name strings. The graphical animation object information includes the variable name (i.e., the name of the variable), canvas ID, graphic ID, and graphic attribute ID. It should be noted that the variable name strings obtained in step S12 are arranged according to the traversal order.

[0048] In one specific embodiment, the variable name strings obtained by traversing the graphical elements on a configuration diagram in step S12 include: the first variable name string "WSLZ_PSCADA_BREAKER_201_POS", the second variable name string "WSLZ_PSCADA_BREAKER_201_LIFESPAN", the third variable name string "WSLZ_PSCADA_BREAKER_211_POS", the fourth variable name string "WSLZ_PSCADA_BREAKER_211_LIFESPAN", the fifth variable name string "WSLZ_PSCADA_TROLLEY_101_POS", the sixth variable name string "WSLZ_PSCADA_TROLLEY_102_POS", the seventh variable name string "WSLZ_BAS_BLOWER_101_MODE", and the eighth variable name string "SHMXCZ_PSCADA_BREAKER_201_POS", where "first to eighth" means the order in which the variable string is obtained by traversing.

[0049] Furthermore, each variable string, after being split by the special character, serves as a pattern string. The pattern strings are arranged sequentially from left to right within the variable string to form a pattern string set; the rightmost character in the variable string is designated as the final pattern string. The special character can be customized according to the application; as an optional embodiment, the special character is an underscore. For example, taking the first variable name string "WSLZ_PSCADA_BREAKER_201_POS" as an example, and using an underscore as the delimiter for string splitting, the resulting substrings of the first variable string are "WSLZ", "PSCADA", "BREAKER", "201", and "POS". These substrings are then arranged sequentially from left to right to form a pattern string set of ["WSLZ", "PSCADA", "BREAKER", "201", "POS"].

[0050] Based on the pattern strings obtained by segmenting the variable name string, a Trie tree is constructed, such as... Figure 2 As shown, the process includes: S21, initializing the root node by creating a root node (ROOT), which does not represent any specific substring but only serves as the starting point of the Trie trie; S22, sequentially inserting the pattern string set formed by each variable name string into the Trie trie. Specifically, inserting the pattern string from the first pattern string set formed by the first variable name string obtained through step S12 into the Trie trie includes:

[0051] S221a. Starting from the root node, for the first pattern string in the first pattern string set, check if there is a node corresponding to the first pattern string among the child nodes of the root node. If not, create a first node and mark it as the first pattern string, and use the first node as a child node of the root node.

[0052] S222a. For the nth pattern string in the first pattern string set, check if there is a corresponding node for the nth pattern string among the child nodes of the (n-1)th node. If not, create an nth node and mark it as the nth pattern string, and use the nth node as a child node of the (n-1)th node; where n is the order of the pattern strings in the first pattern string set, n = 2, 3 ... N, and N is the total number of pattern strings in the first pattern string set; repeat step S222a until all N pattern strings in the first pattern string set are inserted into the Trie tree;

[0053] S223a. Mark the last node corresponding to the last pattern string as the end node of the first pattern string set.

[0054] Specifically, taking the first variable name string "WSLZ_PSCADA_BREAKER_201_POS" as an example, the first pattern string set obtained by splitting the first variable name string "WSLZ_PSCADA_BREAKER_201_POS" is ["WSLZ", "PSCADA", "BREAKER", "201", "POS"]:

[0055] Step S221a: Starting from the root node, for the first pattern string "WSLZ" in the first pattern string set, check if there is a node corresponding to the first pattern string "WSLZ" among the child nodes of the root node. If not, create a first node and mark it as the first pattern string, and use this first node as a child node of the root node, such as... Figure 2 As shown;

[0056] S222a: For the second pattern string "PSCADA" in the first pattern string set, check if there is a node corresponding to the second pattern string among the child nodes of the first node (i.e., the node corresponding to "WSLZ"). If not, create a second node and mark it as the second pattern string, and make this second node a child node of the first node. Repeat step S222a, and so on, to insert the third to fifth pattern strings ["BREAKER", "201", "POS"] sequentially into the Trie dictionary.

[0057] S223a. Mark the last node corresponding to the ending pattern string "POS" as the end node of the first pattern string set.

[0058] Furthermore, for the pattern strings in the set of pattern strings formed by the m-th variable name string (i.e., not the first variable name string) obtained through step S12, insert them into the Trie dictionary tree, where m≥2, specifically including:

[0059] Step S221b: According to the order of the pattern strings in the m-th pattern string set, sequentially search whether the i-th pattern string has a child node with the same pattern string in the Trie dictionary. If it exists, search down along the path already created in the Trie dictionary for the (i+1)-th pattern string; if it does not exist, execute step S222b.

[0060] Step S222b: Create the (i+1)th node and mark it as the (i+1)th pattern string, and use the (i+1)th node as the child node of the ith node; where i is the order of the pattern string in the m-th pattern string set, i = 1, 2, ..., M-1, and M is the number of pattern strings in the m-th pattern string set.

[0061] S223b, Mark the last node corresponding to the last pattern string as the end node of the m-th pattern string set;

[0062] Repeat steps S221b to S223b until all the M pattern string sets formed by all variable strings are inserted into the Trie dictionary tree.

[0063] Specifically, taking the second variable name string as an example, the set of second pattern strings obtained by splitting the second variable name string "WSLZ_PSCADA_BREAKER_201_LIFESPAN" is ["WSLZ", "PSCADA", "BREAKER", "201", "LIFESPAN"]:

[0064] Step S221b: According to the order of the pattern strings in the second pattern string set, sequentially search whether the i-th pattern string has a child node with the same pattern string in the Trie dictionary. In this embodiment, since the first pattern string "WSLZ" has a child node with the same pattern string in the Trie dictionary, search downwards along the path already created in the Trie dictionary for the second pattern string "PSCADA" and the third pattern string "BREAKER". As for the fourth pattern string "201", since the child node of the fourth pattern string "201" does not have a node corresponding to the fifth pattern string "LIFESPAN", step S222b is executed.

[0065] Step S222b: Create the 5th node and mark it as the 5th pattern string "LIFESPAN";

[0066] Since the fifth pattern string "LIFESPAN" is the last pattern string in the second pattern string set, step S223b is executed: the fifth node corresponding to the fifth pattern string is marked as the end node of the second pattern string set.

[0067] Further, repeat steps S221b to S223b, sequentially inserting the third variable name string “WSLZ_PSCADA_BREAKER_211_POS”, the fourth variable name string “WSLZ_PSCADA_BREAKER_211_LIFESPAN”, the fifth variable name string “WSLZ_PSCADA_TROLLEY_101_POS”, the sixth variable name string “WSLZ_PSCADA_TROLLEY_102_POS”, the seventh variable name string “WSLZ_BAS_BLOWER_101_MODE”, and the eighth variable name string “SHMXCZ_PSCADA_BREAKER_201_POS” into the Trie dictionary tree, thus completing the creation of the Trie dictionary tree. Figure 2 As shown.

[0068] The construction of the Trie dictionary tree further includes: binding the graphic animation object information (e.g., variable name, canvas ID, graphic ID, graphic attribute ID, etc.) to the end node, and using a Boolean variable to mark the end node, so as to indicate that the path from the root node to the end node constitutes a complete variable name string. In a specific embodiment, such as Figure 2As shown, taking the end node "POS" in the Trie trie as an example, one of the attributes of the "POS" end node is isEnd, which is a boolean type. When checking whether the variable name string exists, the node corresponding to the end pattern string of the variable name string is found along the path of the Trie trie, and the attribute isEND of the node is true. Then it is determined that the variable name string exists in the Trie trie.

[0069] As an optional embodiment, the failure pointer is constructed using a breadth-first search (BFS) algorithm, which includes: S31, initializing the queue: setting the failure pointer of the root node (ROOT) to itself, and placing the root node into a queue; S32, processing the nodes in the queue using the breadth-first search algorithm. Further, in step S32, processing the nodes in the queue using the breadth-first search algorithm (BFS) involves taking a node from the queue and performing the following checks on each of its child nodes: if the node is a direct child of the root node, its failure pointer points to the root node; if the node is not a direct child of the root node, find a child node with the same character as the node pointed to by its parent node's failure pointer; if a child node with the same character exists, set the failure pointer of the current node to that child node; if no child node with the same character exists, set the failure pointer of the current node to the root node, and add the currently processed child node to the queue.

[0070] by Figure 2 Taking the Trie shown as an example, the detailed process of constructing the Fail pointer is as follows:

[0071] Initialization: The failure pointer of the root node points to itself, queue: [ROOT].

[0072] Round 1: Remove the "ROOT" node from the queue. For the "WSLZ" node (a child of "ROOT"): Since it is a direct child of the root node, the failure pointer of "WSLZ" points to "ROOT". For the "SHMXCZ" node (a child of "ROOT"): Since "SHMXCZ" is a direct child of the root node, the failure pointer of "SHMXCZ" points to "ROOT". Queue: [WSLZ, SHMXCZ]. Because a queue is a computer data structure with the characteristics of First-In-First-Out (FIFO) and Last-In-Last-Out (LIFO), "WSLZ" comes before "SHMXCZ" in the queue.

[0073] Round 2: Remove the "WSLZ" node from the queue. For the "PSCADA" node (a child of "WSLZ"): Since the "PSCADA" node is a direct child of the "WSLZ" node, the failure pointer of "PSCADA" points to "ROOT". Queue: [SHMXCZ, PSCADA].

[0074] Round 3: Remove the node "SHMXCZ" from the queue. For the node "PSCADA" (a child node of "SHMXCZ"): Since the failure pointer of "SHMXCZ" is "ROOT", we search for "PSCADA" among the child nodes of "ROOT". Since it does not exist, the failure pointer of "PSCADA" points to "ROOT". Queue: [PSCADA, PSCADA].

[0075] Round 4: Retrieve the first "PSCADA" node (a child of "WSLZ") from the queue. For the "BREAKER" node (a child of "PSCADA"): Since "BREAKER" is a direct child of "PSCADA", its failure pointer points to "ROOT". For the "BAS" node (a child of "PSCADA"): Since "BAS" is a direct child of "PSCADA", its failure pointer points to "ROOT". Queue: [PSCADA, BREAKER, BAS].

[0076] Round 5: Retrieve the second "PSCADA" node (a child node of "SHMXCZ") from the queue. For the "BREAKER" node (a child node of "PSCADA"): Because the failure pointer of "PSCADA" points to "ROOT", we search for the "BREAKER" node among the child nodes of "ROOT", but it does not exist. Therefore, the failure pointer of "BREAKER" points to "ROOT". Queue: [BREAKER, BAS, BREAKER].

[0077] Round 6: Remove the "BREAKER" node (a child node of "WSLZ" -> "PSCADA") from the queue. For node "201" (a child node of "BREAKER"): Since node "201" is a direct child of "BREAKER", the failure pointer of "201" points to "ROOT". For node "211" (a child node of "BREAKER"): Since node "211" is a direct child of "BREAKER", the failure pointer of "211" points to "ROOT". Queue: [BAS, BREAKER, 201, 211].

[0078] Round 7: Remove the "BAS" node from the queue. For the "BLOWER" node (a child of "BAS"): Since the "BLOWER" node is a direct child of "BAS", the failure pointer of "BLOWER" points to "ROOT". Queue: [BREAKER, 201, 211, BLOWER].

[0079] Round 8: Remove the "BREAKER" node (a child node of "SHMXCZ" -> "PSCADA") from the queue. For the "201" node (a child node of "BREAKER"): Since the failure pointer of "BREAKER" points to "ROOT", we search for the "201" node among the child nodes of "ROOT", but it does not exist. Therefore, the failure pointer of "201" points to "ROOT". Queue: [201, 211, BLOWER, 201].

[0080] Round 9: Remove node "201" (a child node of "WSLZ" -> "PSCADA" -> "BREAKER") from the queue. For node "POS" (a child node of "201"): Since node "POS" is a direct child of node "201", the failure pointer of "POS" points to "ROOT". For node "LIFESPAN" (a child node of "201"): Since node "LIFESPAN" is a direct child of node "201", the failure pointer of "LIFESPAN" points to "ROOT". Queue: [211, BLOWER, 201, POS, LIFESPAN].

[0081] Round 10: Remove node "211" (a child node of "WSLZ" -> "PSCADA" -> "BREAKER") from the queue. For node "POS" (a child node of "211"): Since node "POS" is a direct child of node "211", the failure pointer of "POS" points to ROOT. For node "LIFESPAN" (a child node of "211"): Since node "LIFESPAN" is a direct child of node "211", the failure pointer of "LIFESPAN" points to "ROOT". Queue: [BLOWER, 201, POS, LIFESPAN, POS, LIFESPAN].

[0082] Round 11: Remove the "BLOWER" node from the queue. For node "101" (a child of "BLOWER"): Since node "101" is a direct child of "BLOWER", the failure pointer of "101" points to "ROOT". Queue: [201,POS,LIFESPAN,POS,LIFESPAN,101].

[0083] Round 12: Remove node "201" from the queue (a child node of "SHMXCZ" -> "PSCADA" -> "BREAKER"). For node "POS" (a child node of "201"): Since node "POS" is a direct child of "201", the failure pointer of "POS" points to "ROOT". Queue: [POS, LIFESPAN, POS, LIFESPAN, 101, POS].

[0084] Round 13: Remove the node “POS” (a child node of “WSLZ”->“PSCADA”->“BREAKER”->“201”) from the queue. No new child nodes, skip. Queue: [LIFESPAN,POS,LIFESPAN,101,POS].

[0085] Round 14: Remove the node “LIFESPAN” (a child node of “WSLZ”->“PSCADA”->“BREAKER”->“201”) from the queue. No new child nodes, skip. Queue: [POS,LIFESPAN,101,POS].

[0086] Round 15: Remove the node “POS” (a child node of “WSLZ”->“PSCADA”->“BREAKER”->“211”) from the queue. No new child nodes, skip. Queue: [LIFESPAN,101,POS].

[0087] Round 16: Remove the node “LIFESPAN” (a child node of “WSLZ”->“PSCADA”->“BREAKER”->“211”) from the queue. No new child nodes, skip. Queue: [101, POS].

[0088] Round 17: Remove node "101" (a child node of "WSLZ" -> "BAS" -> "BLOWER") from the queue. For node "MODE" (a child node of "101"): Since node "MODE" is a direct child of "101", the failure pointer of "MODE" points to "ROOT". Queue: [POS, MODE].

[0089] Round 18: Retrieve the node “POS” (a child node of “SHMXCZ”->“PSCADA”->“BREAKER”->“201”) from the queue. No new child nodes, skip. Queue: [MODE].

[0090] Round 19: Remove the "MODE" node (a child node of "WSLZ"->"BAS"->"BLOWER"->"101") from the queue. No new child nodes are found, skip this step.

[0091] At this point, the failure pointers for all nodes in this specific embodiment have been constructed, as follows: Figure 3 As shown.

[0092] Once the Trie dictionary and the Fail pointer are constructed, when an external interface drives a value change via a variable name string, the variable name string is matched using the Trie dictionary and the Fail pointer. Specifically, this includes:

[0093] S41. Divide the variable name string into several pattern strings according to special characters, and set the current state pointer as the root node starting from the first pattern string;

[0094] S42. For each pattern string in the variable string, perform the following judgment: If the pattern string is not in a child node of the current node, jump according to the failure pointer corresponding to the current node; if the pattern string is in a child node of the current node, update the current state pointer to that child node and continue judging the next pattern string; if the current node is the last pattern string, record the matching position and the last pattern string. Further, the real-time data update method for the configuration HMI also includes: determining whether the node where the last pattern string recorded in step S42 is located is marked as an end node; if the node is an end node, drive the configuration HMI update through the graphic animation object information bound to that node.

[0095] In a specific embodiment, taking the third variable name string "WSLZ_PSCADA_BREAKER_211_POS" as an example, the detailed process of processing the Trie dictionary tree and the Fail pointer constructed in the above steps is as follows:

[0096] initialization:

[0097] The third variable name string "WSLZ_PSCADA_BREAKER_211_POS" is split into 5 substrings "WSLZ", "PSCADA", "BREAKER", "211", and "POS", and these substrings are sequentially formed into a third pattern string set ["WSLZ", "PSCADA", "BREAKER", "211", "POS"]. Matching starts from the root node "ROOT" of the Trie tree, and the current state pointer is set to the root node.

[0098] Variable name string matching process:

[0099] First, process the first pattern string, "WSLZ". Check if there is a node marked "WSLZ" among the child nodes of the current state pointer (i.e., the root node "ROOT"). Since the "WSLZ" node part was already included when constructing the Trie, the corresponding node can be found, the match is successful, and the current state pointer is moved to the "WSLZ" node. Then process the second character pattern string, "PSCADA". Check if there is a node marked "PSCADA" among the child nodes of the current state pointer (now the "WSLZ" node). If found, the current state pointer is moved to the "PSCADA" node.

[0100] Repeat this process, processing the pattern strings "BREAKER", "211", and "POS" in sequence. At each step, move the current state pointer down the Trie tree until the last pattern string "POS" is processed. Move the state pointer to the corresponding node and check if the current state pointer is marked as the end node of the pattern string.

[0101] At this point, the processing of the third variable name string "WSLZ_PSCADA_BREAKER_211_POS" is complete, as shown in the attached file. Figure 4 As shown.

[0102] Because the above steps have completely constructed the path of the pattern string, and the "POS" node will be marked as the end node of the pattern string, it can be determined that the third variable name string "WSLZ_PSCADA_BREAKER_211_POS" in this specific embodiment is successfully matched. After the end node of the variable name is matched, the configuration human-machine interface can be updated through the graphic animation object information bound to that node.

[0103] Accordingly, embodiments of the present invention also provide a real-time data update device for a configuration human-machine interface, applicable to the real-time data update method for a configuration human-machine interface as described in the above embodiments, such as... Figure 5 As shown, the configuration human-machine interface real-time data update device 100 includes:

[0104] The acquisition module 101 is used to traverse the graphic elements on the configuration diagram and acquire the variable name string corresponding to the graphic element and the graphic animation object information associated with the variable name string;

[0105] Construction module 102 constructs a Trie dictionary and a Fail pointer based on the variable name string and the graphic animation object information associated with the variable name string, forming AC automaton module 103;

[0106] External interface module 104 drives value changes by setting a variable name string;

[0107] The AC automaton module 103 is connected to the external interface module 104 and is used to segment the variable name string and match it according to the Trie dictionary and the Fail pointer. If the match is successful, the configuration human-machine interface is updated according to the graphic animation object information bound to the end node of the Trie dictionary corresponding to the variable name string.

[0108] In summary, the real-time data update method and apparatus for configuration human-machine interface provided by this invention, compared with traditional data update methods which require matching and processing one by one when facing multiple data patterns or rules, resulting in low efficiency, not only can multi-pattern matching be achieved by constructing a Trie dictionary tree and a Fail pointer, thus handling the matching problem of multiple pattern strings at once and greatly reducing the time of repeated calculations, but it can also quickly find and locate the data that needs to be updated in a large amount of data.

[0109] Secondly, the Trie structure utilizes the common prefixes of strings, allowing the search process to proceed quickly along the tree branches, reducing unnecessary character comparisons. When a search in the Trie fails, the Fail pointer guides a quick jump to other possible matching positions to continue the search, avoiding a restart from the beginning. This significantly improves the speed of finding and locating data, thereby increasing the efficiency of data updates.

[0110] Furthermore, when the system initializes or the data update rules change, the real-time data update device of the configuration HMI can preprocess the data pattern and reconstruct data structures such as the Trie dictionary and Fail pointers. Once constructed, subsequent data update operations can directly utilize these existing structures for rapid matching and updating, avoiding the complex calculation and construction process for each update, thus saving a significant amount of time and computing resources.

[0111] It should be noted that, in this document, 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. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0112] In the description of this invention, it should be understood that the terms "center," "height," "thickness," "upper," "lower," "vertical," "horizontal," "top," "bottom," "inner," "outer," "axial," "radial," and "circumferential," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0113] In the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0114] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0115] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A method for real-time data update of a configured human-machine interface, characterized in that, include: Obtain the variable name strings configured for each graphical element in the configuration human-machine interface, and split the variable name strings into several pattern strings using special characters; A Trie dictionary is constructed based on the pattern string, with the end of the pattern string of each variable name string serving as an end node of the Trie dictionary. Bind the graphic animation object information to the end pattern string; Construct a Fail pointer for quick jump when the variable name string fails to match; When the external interface drives the value change through the variable name string, the variable name string is matched with the Trie dictionary and the Fail pointer to locate the graphic animation object information bound to the end pattern string in the variable name string, thereby driving the configuration human-machine interface to update.

2. The real-time data update method for configuring human-machine interface as described in claim 1, characterized in that, Retrieve the variable name strings configured for each graphical element in the HMI configuration interface, including: S11. Start the configuration HMI software and open any configuration diagram; S12. Traverse all graphic elements in the configuration diagram and record the variable name strings configured for the graphic elements and the graphic animation object information associated with the variable name strings.

3. The real-time data update method for a configuration human-machine interface as described in claim 1, characterized in that, The graphic animation object information includes variable name, canvas ID, graphic ID, and graphic attribute ID.

4. The real-time data update method for a configuration human-machine interface as described in claim 1, characterized in that, Each variable string is divided by the special character into substrings, which are then used as pattern strings. The pattern strings are arranged in order of the substrings in the variable string from left to right to form a pattern string set. in The rightmost character in the variable string is used as the final pattern string.

5. The real-time data update method for a configuration human-machine interface as described in claim 1, characterized in that, The special character is the underscore.

6. The real-time data update method for configuring human-machine interface as described in claim 4, characterized in that, Constructing a Trie dictionary tree based on the pattern string includes: S21. Initialize the root node by creating a root node as the starting point of the Trie tree; S22. Insert the pattern string set formed by each variable name string into the Trie dictionary tree in sequence.

7. The real-time data update method for a configuration human-machine interface as described in claim 6, characterized in that, Step S22, inserting the pattern strings from the first pattern string set formed by the first variable name string into the Trie trie, specifically includes: S221a. Starting from the root node, for the first pattern string in the first pattern string set, check if there is a node corresponding to the first pattern string among the child nodes of the root node. If not, create a first node and mark it as the first pattern string, and use the first node as a child node of the root node. S222a. For the nth pattern string in the first pattern string set, check if there is a corresponding node for the nth pattern string among the child nodes of the (n-1)th node. If not, create an nth node and mark it as the nth pattern string, and use the nth node as a child node of the (n-1)th node; where n is the order of the pattern strings in the first pattern string set, n = 2, 3 ... N, and N is the total number of pattern strings in the first pattern string set; repeat step S222a until all N pattern strings in the first pattern string set are inserted into the Trie tree; S223a. Mark the last node corresponding to the last pattern string as the end node of the first pattern string set.

8. The real-time data update method for a configuration human-machine interface as described in claim 7, characterized in that, Step S22 involves inserting the pattern string from the set of pattern strings formed by the m-th variable name string into the Trie trie, where m ≥ 2, specifically including: Step S221b: According to the order of the pattern strings in the m-th pattern string set, sequentially search whether the i-th pattern string has a child node with the same pattern string in the Trie dictionary. If it exists, search down along the path already created in the Trie dictionary for the (i+1)-th pattern string; if it does not exist, execute step S222b. Step S222b: Create the (i+1)th node and mark it as the (i+1)th pattern string, and use the (i+1)th node as the child node of the ith node; where i is the order of the pattern string in the m-th pattern string set, i = 1, 2, ..., M, and M is the number of pattern strings in the m-th pattern string set; S223b, Mark the last node corresponding to the last pattern string as the end node of the m-th pattern string set; Repeat steps S221b to S223b until all the M pattern string sets formed by all variable strings are inserted into the Trie dictionary tree.

9. The real-time data update method for a configuration human-machine interface as described in claim 7 or 8, characterized in that, The graphic animation object information is bound to the end node, and a Boolean variable is used to mark the end node so that the path from the root node to the end node constitutes a complete variable name string.

10. The real-time data update method for a configuration human-machine interface as described in claim 9, characterized in that, One of the attributes of the end node is isEnd, which is a boolean type. When checking whether the variable name string exists, the node corresponding to the end pattern string of the variable name string is found along the path of the Trie tree, and the attribute isEND of the node is true. Then it is determined that the variable name string exists in the Trie tree.

11. The real-time data update method for a configuration human-machine interface as described in claim 1, characterized in that, The Fail pointer is constructed using a breadth-first search algorithm.

12. The real-time data update method for a configuration human-machine interface as described in claim 11, characterized in that, Constructing the Fail pointer includes: S31. Initialize the queue: Set the failure pointer of the root node to itself and put the root node into a queue; S32. The nodes in the queue are processed using the breadth-first search algorithm.

13. The real-time data update method for a configuration human-machine interface as described in claim 12, characterized in that, Step S32 involves using the breadth-first search algorithm to process the nodes in the queue, retrieving a node from the queue, and performing the following judgments on each of the node's child nodes: If the node is a direct child of the root node, its failure pointer points to the root node; If the node is not a direct child of the root node, find the child node with the same character pointed to by the failure pointer of its parent node. If a child node with the same character exists, point the failure pointer of the current node to that child node; If no child node with the same character exists, set the failure pointer of the current node to the root node and add the currently processed child node to the queue.

14. The real-time data update method for a configuration human-machine interface as described in claim 1, characterized in that, When an external interface drives a value change via a variable name string, the variable name string is matched using the Trie dictionary and the Fail pointer, specifically including: S41. Divide the variable name string into several pattern strings according to special characters, and set the current state pointer as the root node starting from the first pattern string; S42. Perform a judgment on each pattern string of the variable string: If the pattern string is not in the child node of the current node, jump according to the failure pointer corresponding to the current node; If the pattern string is in a child node of the current node, then update the current state pointer to that child node and continue to judge the next pattern string; If the current node is the end of the pattern string, then record the matching position and the end of the pattern string.

15. The real-time data update method for a configuration human-machine interface as described in claim 14, characterized in that, Also includes: Determine whether the node containing the last pattern string recorded in step S42 is marked as the end node; If the node is an end node, the configuration human-machine interface will be updated through the information of the graphical animation object bound to the node.

16. A real-time data update device for a configuration human-machine interface, applicable to the real-time data update method for a configuration human-machine interface as described in any one of claims 1 to 15, characterized in that, include: The acquisition module is used to traverse the graphic elements on the configuration diagram and obtain the variable name string corresponding to the graphic element and the graphic animation object information associated with the variable name string; The construction module constructs a Trie dictionary and a Fail pointer based on the variable name string and the graphic animation object information associated with the variable name string, thus forming an AC automaton module; The external interface module drives value changes by setting a variable name string; The AC automaton module is connected to the external interface module and is used to segment the variable name string and match it according to the Trie dictionary and the Fail pointer. If the match is successful, the configuration human-machine interface is updated according to the graphic animation object information bound to the end node of the Trie dictionary corresponding to the variable name string.

Citation Information

Patent Citations

  • Mode matching method based on ordering binary tree

    CN101425084A

  • Character string multimode fuzzy matching method based on AC automaton

    CN112100361A

  • Client multi-source data subscription updating method of rail transit operation control system

    CN114398382A

  • Industrial configuration state indicating device based on Internet of Things

    CN115202540A

  • Data processing method and device, equipment, storage medium and computer program product

    CN116955720A