Feedback method based on data management and control
By adopting a feedback method based on data control in a high-real-time environment, using prefix tree structure feedback and positioning node abnormalities, the problem of lack of intuitive visual prompts and difficulty in fault positioning in existing systems is solved, and efficient early warning and equipment data control are achieved.
Patent Information
- Application Number
- CN202510056470.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-13
Smart Images

Figure CN119996152A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a feedback method based on data management and control. Background Art
[0002] In a high-real-time environment, real-time monitoring and anomaly detection of equipment data are crucial. In order to ensure the continuity of working equipment and the reliability of equipment, a variety of technologies and systems have been developed and applied to achieve this goal. For example, through a system composed of data acquisition terminals, gateway devices, equipment management system software and data presentation terminals, real-time monitoring and data analysis can be achieved to detect and handle faults in a timely manner. However, there are the following defects and shortcomings: 1) The existing system relies on text and lists to display abnormal information, lacks intuitive and effective visual prompts, resulting in slow operator response and increased system error probability; 2) Complex operating procedures may lead to misoperation, increase training costs and difficulty of use, and in the case of multiple concurrent faults, it is difficult to accurately locate and distinguish faults. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a feedback method based on data control.
[0004] The object of the present invention is achieved through the following technical solution: A feedback method based on data control comprises the following steps:
[0005] S1: Each node stores NodeKey, RedNum and Children, and initially the RedNum of all nodes is 0;
[0006] S2: When a node fails, update the RedNum of the node;
[0007] S3: When the RedNum of a child node changes, the parent node needs to recalculate RedNum;
[0008] S4: Synchronize and update the data;
[0009] S5: When the RedNum of a child node changes, the data in the prefix tree is automatically updated. After the red number of the node is updated, all affected parent nodes are updated accordingly.
[0010] S6: Locate the status of a node through the prefix tree and update it dynamically.
[0011] Preferably, in step S3, the recursive calculation formula for the number of red points of a node is:
[0012]
[0013] Among them, RedNum(X) is the number of red points of node X, Children(X) is the collection of all direct child nodes of node X, and RedNum(Y) is the number of red points of child node Y.
[0014] Preferably, in step S4, the rules for synchronously updating data include:
[0015] Rule 1: When the RedNum of a child node is updated, the parent node must be updated synchronously;
[0016] Rule 2: The RedNum of a parent node is the sum of the RedNums of all direct child nodes;
[0017] Rule 3: When the RedNum of all child nodes is 0, the parent node does not show any exception.
[0018] Preferably, in step S5, the update rule of the number of red points of the root node Root is:
[0019]
[0020] Among them, Child i are all direct child nodes of the Root node, n is the number of red dots of the child nodes, and RedNum(Root) is the number of red dots of the root node.
[0021] The present invention has the following advantages: the present invention uses a prefix tree structure to feedback node abnormalities, locates the state of a certain node in combination with the prefix tree, and performs dynamic updates, thereby being able to efficiently feedback the location of the abnormal point to the operator, thereby improving the timeliness and accuracy of the early warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the prefix tree structure-red dot feedback anomaly;
[0023] Figure 2 A schematic diagram of adding, deleting, and searching for nodes. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0025] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0027] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0028] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the product of the invention is usually placed when in use, or the positions or positional relationships commonly understood by those skilled in the art, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0029] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0030] In this embodiment, all data parameters in any type of high real-time platform will involve basic data structure definition. According to the application field of this solution and the method of applying prefix tree to run through function nodes, the basic structure of the early prefix tree node class data is defined as follows:
[0031] 1. NodeKey: string type, unique identifier of the current node.
[0032] 2. RedNum: int type, records the number of red dots of the current node (indicating the number of faults of the node). This field will affect the number of red dots of each node.
[0033] 3. Children: Dictionary type, representing the child nodes of the current node. The structure of each child node contains its unique identifier (NodeKey) and the number of red points (RedNum), which can form a tree structure. By formulating the basic data structure, it is convenient to perform subsequent operations such as searching, adding, and counting red points of node data.
[0034] In this embodiment, if Figure 1 As shown, the feedback method based on data control includes the following steps:
[0035] S1: Each node stores NodeKey, RedNum, and Children, and initially the RedNum of all nodes is 0, indicating no faults.
[0036] S2: When a node fails, update the RedNum of the node; for example, set it to 1 to indicate a failure.
[0037] S3: When the RedNum of a child node changes, the parent node needs to recalculate RedNum; specifically, the following example illustrates:
[0038] (1) If the number of red dots of child node A1 is 1, the number of red dots of its parent node A is also 1:
[0039] RedNum(A)=RedNum(A1)=1
[0040] (2) If the number of red dots of child nodes B1 and B2 is 1 and 2 respectively, then the number of red dots of their parent node B is:
[0041] RedNum(B)=RedNum(B1)+RedNum(B2)=1+2=3
[0042] It can be seen that the child node A of the root node currently has 1 fault point, and the child node B has 3, so the number of red points of the root node Root is:
[0043] RedNum(Root)=RedNum(A)+RedNum(B)=1+3=4
[0044] Therefore, the final number of red points of the Root node can also be understood as the sum of the red points of all its child nodes: 1+2+1=4. Therefore, the recursive calculation formula for the number of red points of a node can be obtained as follows:
[0045]
[0046] Among them, RedNum(X) is the number of red points of node X, Children(X) is the collection of all direct child nodes of node X, and RedNum(Y) is the number of red points of child node Y.
[0047] S4: Synchronize and update the data; further, the rules for synchronously updating the data include: Rule 1: When the RedNum of the child node is updated, the parent node must be updated synchronously; Rule 2: The RedNum of the parent node is the sum of the RedNum of all direct child nodes; Rule 3: When the RedNum of all child nodes is 0, the parent node does not show any abnormality.
[0048] S5: When the RedNum of a child node changes, the data in the prefix tree is automatically updated. After the red number of the node is updated, all affected parent nodes are updated accordingly. Furthermore, in step S5, the update rule of the red number of the root node Root is:
[0049]
[0050] Among them, Child i are all direct child nodes of the Root node, n is the number of red dots of the child nodes, and RedNum(Root) is the number of red dots of the root node. Specifically, let the number of red dots of the parent nodes be RedNum(A) and RedNum(B). Assuming that the parent node A is still 1 and the parent node B is reduced from fault 3 to 1, the number of red dots of the Root node will be updated from 4 to 2. If the number of red dots of all child nodes is 0, the Root node RedNum will also become 0 and no red dots will be displayed.
[0051] S6: Locate the state of a node through the prefix tree and dynamically update it. Specifically, the specific steps for querying, adding, and reducing the required nodes are as follows:
[0052] The process of querying a node is:
[0053] 1. Pass in the key to be searched;
[0054] 2. Traverse each path and check whether the child node exists. If it does not exist, return null, indicating that the path is invalid. If it exists, update the node to the currently found node and continue to process the next path part;
[0055] 3. Update the UI interface to keep it synchronized with the operator / user interface;
[0056] 4. After the traversal is completed, the final node found is returned;
[0057] 5. End.
[0058] The process of adding a node is as follows:
[0059] 1. Pass in the key to be added;
[0060] 2. Traverse each path part and check whether the child node exists. If so, end the process directly, indicating that the node already exists. If not, split the key and divide the path to create a new node;
[0061] 3. Update the number of nodes and update the UI interface to keep it synchronized with the operator / user interface;
[0062] 4. End.
[0063] The process of reducing nodes is:
[0064] 1. Pass in the key to be deleted;
[0065] 2. Traverse each path part and check whether the child node exists. If not, end the process directly, indicating that the node does not exist. If it does exist, split the key and divide the path, and delete the node;
[0066] 3. Update the number of nodes and update the UI interface to keep it synchronized with the operator / user interface;
[0067] 4. End. The prefix tree structure is used to feedback node abnormalities, and the prefix tree is combined to locate the status of a node and dynamically update it, so that the location of the abnormal point can be efficiently fed back to the operator, improving the timeliness and accuracy of early warning, improving the efficiency and reliability of equipment data management, and ensuring work continuity and reliability of equipment abnormality feedback.
[0068] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A feedback method based on data control, characterized in that: The following steps are involved: S1: Each node stores NodeKey, RedNum and Children, and initially the RedNum of all nodes is 0; S2: When a node fails, update the RedNum of the node; S3: When the RedNum of a child node changes, the parent node needs to recalculate RedNum; S4: Synchronize and update the data; S5: When the RedNum of a child node changes, the data in the prefix tree is automatically updated. After the red number of the node is updated, all affected parent nodes are updated accordingly. S6: Locate the status of a node through the prefix tree and update it dynamically.
2. The feedback method based on data control according to claim 1, characterized in that: In step S3, the recursive calculation formula for the number of red points of a node is: Among them, RedNum(X) is the number of red points of node X, Children(X) is the collection of all direct child nodes of node X, and RedNum(Y) is the number of red points of child node Y.
3. The feedback method based on data control according to claim 2, characterized in that: In step S4, the rules for synchronously updating data include: Rule 1: When the RedNum of a child node is updated, the parent node must be updated synchronously; Rule 2: The RedNum of a parent node is the sum of the RedNums of all direct child nodes; Rule 3: When the RedNum of all child nodes is 0, the parent node does not show any exception.
4. The feedback method based on data control according to claim 3, characterized in that: In step S5, the update rule of the number of red points of the root node Root is: Among them, Child i are all direct child nodes of the Root node, n is the number of red dots of the child nodes, and RedNum(Root) is the number of red dots of the root node.