Configuration data infinite hierarchical logic nesting visualization method based on real-time cache
Through real-time caching and two-way binding of Vue components, the infinite-level logical nesting visualization method of configuration data solves the complex storage and display problems of substation equipment health assessment results, improves the flexibility and maintainability of the system, and adapts to business changes without the need for Modify the code.
Patent Information
- Application Number
- CN202410745152.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-10-15
AI Technical Summary
Existing technology is difficult to effectively organize, store and display complex, multi-level substation equipment health assessment results, and the business configuration interaction method is hard-coded, resulting in poor system flexibility and maintainability, making it difficult to adapt to business changes.
Adopting the infinite-level logical nesting visualization method of configuration data based on real-time caching, the evaluation results are dynamically generated through real-time caching of the configuration model, and bidirectionally bound with the Vue component to achieve synchronous configuration of the configuration model and evaluation results, adapting to business changes without modifying the code. .
It improves the maintainability and scalability of the system, realizes flexible and efficient business configuration, and improves user experience and data utilization.
Smart Images

Figure CN118779012A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of business configuration interaction, and in particular to a method for visualizing infinite-level logical nesting of configuration data based on real-time cache. Background Art
[0002] In the power system, the health status of substation equipment directly affects the stability and reliability of the power grid. At present, the health assessment method of substation equipment has gradually applied machine learning models for intelligent identification. However, the health assessment results of substation equipment output by machine learning models are usually complex, multi-level structured data. How to effectively organize, store and display the health assessment results of substation equipment is an urgent problem to be solved. The existing data processing methods mainly use relational databases and static pages, which not only cannot meet the dynamic and interactive requirements of data, but also lead to low data utilization and poor user experience. In addition, in terms of business configuration interaction, the existing data processing methods mainly use hard coding to couple business logic and interface display together, resulting in poor flexibility and maintainability of the system. When business requirements change, a large amount of code needs to be modified, which is a large workload and easy to introduce errors, affecting the stability of the system. Summary of the invention
[0003] The purpose of the present invention is to provide a visualization method for infinite-level logical nesting of configuration data based on real-time caching. It caches the dynamically generated evaluation results in real time through the configuration model, and performs two-way binding with the Vue component, thereby realizing the synchronous configuration of the configuration model and the evaluation results, making the business configuration more flexible and efficient, and adapting to business changes without modifying the code, greatly improving the maintainability and scalability of the system.
[0004] The embodiments of the present invention are implemented by the following technical solutions:
[0005] A method for visualizing infinite-level logical nesting of configuration data based on real-time caching, the method comprising the following steps:
[0006] Obtain the healthy business logic configuration requirements of substation equipment;
[0007] Collect substation equipment-related data according to business logic configuration requirements, and establish an equipment health assessment model based on the substation equipment-related data to obtain substation equipment health assessment results;
[0008] A configuration model is created according to the health assessment results of the substation equipment. The configuration model encapsulates the health assessment results of the substation equipment into a data structure in a specific format, and bidirectionally binds the health assessment results of the substation equipment to the configuration model through the Vue component. The configuration model caches the dynamically generated health assessment results of the substation equipment in a specific format in real time.
[0009] The configuration model caches the dynamically generated health assessment results of the substation equipment in real time to achieve synchronous configuration of the configuration model and the health assessment results of the substation equipment.
[0010] Optionally, the data structure in the specific format is specifically in JSON format.
[0011] Optionally, the data related to the substation equipment is collected by deploying a variety of sensors at the substation equipment, the multiple sensors respectively collect operating data and environmental data of the substation equipment, and the operating data and environmental data of the substation equipment are aggregated to constitute the data related to the substation equipment.
[0012] Optionally, the equipment health assessment model is constructed based on a random forest classifier.
[0013] Optionally, the training process of the equipment health assessment model is as follows:
[0014] Obtain historical operation data and environmental data of substation equipment;
[0015] Clean and convert the historical operation data and environmental data of the substation equipment, and divide the historical operation data and environmental data of the substation equipment into training sets and test sets;
[0016] Perform feature extraction on the training set and the test set, and normalize the extracted feature vectors. The processed feature vectors and the corresponding health status labels form the training data set and the test data set.
[0017] The training data set is input into the equipment health assessment model for training. Multiple decision trees are constructed through self-service sampling and random feature selection. During the training process, the weight of each decision tree is calculated according to the loss function, and the parameters of the decision tree are iteratively updated until the maximum number of iterations is reached.
[0018] The test data set is input into the equipment health assessment model to obtain the health assessment results of the substation equipment and verify whether the health assessment results of the substation equipment reach the expected values. If not, the hyperparameters are adjusted and retrained; if so, the trained equipment health assessment model is output.
[0019] Optionally, the loss function is calculated as follows:
[0020]
[0021] Where D is the dataset of the current node, K is the number of categories, N is the number of samples in the training dataset D, and w i is the weight of the i-th sample, I(y i =k) is the indicator function. When the category of the i-th sample is k, I(y i=k) takes the value of 1, otherwise I(y i = k) is 0, M is the number of features, f j is the importance weight of the jth feature, I(x ij =1) is the indicator function. When the jth feature value of the i-th sample is 1, I(x ij =1) takes the value of 1, otherwise I(x ij =1) is 0.
[0022] Optionally, the creation of the configuration model includes:
[0023] Create a form hierarchy structure of the configuration model according to the hierarchical relationship of the health assessment results of the substation equipment;
[0024] Generate corresponding form items according to the fields of the substation health assessment results, and define the display method and interactive behavior of the form items according to the field type and constraints.
[0025] Optionally, the form hierarchical structure of the configuration model is created according to the hierarchical relationship of the health assessment results of the substation equipment, which is specifically:
[0026] The health assessment results of the substation equipment encapsulated in JSON format are structured in the order of priority levels, and a structure tree is created with the level index as the identifier;
[0027] Perform a depth-first traversal of the structure tree to generate a unique identifier for each leaf node, create a form DOM element of the corresponding configuration model based on the generated unique identifier, bind the corresponding Vue component to each form DOM element, and assign parameters.
[0028] The technical solution of the embodiment of the present invention has at least the following advantages and beneficial effects:
[0029] The embodiment of the present invention caches the dynamically generated evaluation results in real time through the configuration model, and performs two-way binding with the Vue component, thereby realizing the synchronous configuration of the configuration model and the evaluation results, making the business configuration more flexible and efficient, and adapting to business changes without modifying the code, thereby greatly improving the maintainability and scalability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic flow chart of a method for visualizing infinite-level logical nesting of configuration data based on real-time caching provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] 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.
[0032] like Figure 1 As shown, the present invention provides one embodiment: a method for visualizing infinite-level logical nesting of configuration data based on real-time caching, the steps of the method comprising:
[0033] Obtain the healthy business logic configuration requirements of substation equipment;
[0034] Collect substation equipment-related data according to business logic configuration requirements, and establish an equipment health assessment model based on the substation equipment-related data to obtain substation equipment health assessment results;
[0035] A configuration model is created according to the health assessment results of the substation equipment. The configuration model encapsulates the health assessment results of the substation equipment into a data structure in a specific format, and bidirectionally binds the health assessment results of the substation equipment to the configuration model through the Vue component. The configuration model caches the dynamically generated health assessment results of the substation equipment in a specific format in real time.
[0036] The configuration model caches the dynamically generated health assessment results of the substation equipment in real time to achieve synchronous configuration of the configuration model and the health assessment results of the substation equipment.
[0037] Specifically, the data structure in the specific format is in JSON format.
[0038] In this embodiment, the data related to the substation equipment is collected by deploying a variety of sensors at the substation equipment, and the various sensors respectively collect the operating data and environmental data of the substation equipment. The operating data and environmental data of the substation equipment are aggregated to constitute the data related to the substation equipment.
[0039] During the implementation, a variety of sensors are used to collect voltage, current, temperature, vibration and other sensor data according to the corresponding characteristics of the substation equipment, and the maintenance records and fault records of the substation equipment are obtained at the same time.
[0040] In this embodiment, the equipment health assessment model is constructed based on a random forest classifier.
[0041] In the specific application of this embodiment, the training process of the equipment health assessment model is as follows:
[0042] Obtain historical operation data and environmental data of substation equipment;
[0043] Clean and convert the historical operation data and environmental data of the substation equipment, and divide the historical operation data and environmental data of the substation equipment into training sets and test sets;
[0044] Perform feature extraction on the training set and the test set, and normalize the extracted feature vectors. The processed feature vectors and the corresponding health status labels form the training data set and the test data set.
[0045] The training data set is input into the equipment health assessment model for training. Multiple decision trees are constructed through self-service sampling and random feature selection. During the training process, the weight of each decision tree is calculated according to the loss function, and the parameters of the decision tree are iteratively updated until the maximum number of iterations is reached.
[0046] The test data set is input into the equipment health assessment model to obtain the health assessment results of the substation equipment and verify whether the health assessment results of the substation equipment reach the expected values. If not, the hyperparameters are adjusted and retrained; if so, the trained equipment health assessment model is output.
[0047] Specifically, the calculation formula of the loss function is:
[0048]
[0049] Where D is the dataset of the current node, K is the number of categories, N is the number of samples in the training dataset D, and w i is the weight of the i-th sample, I(y i =k) is the indicator function. When the category of the i-th sample is k, I(y i =k) takes the value of 1, otherwise I(y i = k) is 0, M is the number of features, f j is the importance weight of the jth feature, I(x ij =1) is the indicator function. When the jth feature value of the i-th sample is 1, I(x ij =1) takes the value of 1, otherwise I(x ij =1) is 0.
[0050] In this embodiment, the creation of the configuration model includes:
[0051] Create a form hierarchy structure of the configuration model according to the hierarchical relationship of the health assessment results of the substation equipment;
[0052] Generate corresponding form items according to the fields of the substation health assessment results, and define the display method and interactive behavior of the form items according to the field type and constraints.
[0053] This part is the core operation of the visualization configuration of infinite nested forms. The logic of its implementation is to maintain a unified structure tree as the core, and then expand and maintain the trunk relationship and leaf nodes. At the beginning of creation, there is only one trunk. No matter which level of form is added or deleted later, branches are added or removed on the trunk. Each branch will generate an index value. The leaves on the branch (that is, the form item) inherit the index of the parent branch to dynamically render the DOM, generate and bind the DOM's porp and v-model, thereby realizing VUE's dynamic two-way binding management, and each leaf node element (form item) can customize the form content of the current node by selecting type, formula, configuration, etc. No matter how complex the customized form is, it is associated with the entire structure tree through the parent index.
[0054] Specifically, the configuration model created in this embodiment includes three main points: unlimited creation of form levels (unlimited nesting levels: customized nesting levels, such as any level can customize the descendants without limit on the number; unlimited association relationships: in addition to the parent-child nested relationship, each level can also customize the operation logic relationship, such as AND-NOT or addition and subtraction, etc.); customized form items (form item type customization: as marked with a red box in the figure, selecting a value is a text box, selecting an attribute is a selection box, selecting an entity is a pop-up window edit, and the form type is completely customized; form item preset value customization: as marked with a red box in the figure, if a property is selected, the value comes from a formula or a property value of a model, if an entity is selected, the value can be another dynamic unlimited form set); implementation of VUE two-way binding (two-way binding of data is realized without a fixed DOM).
[0055] Furthermore, the form hierarchical structure of the configuration model is created according to the hierarchical relationship of the health assessment results of the substation equipment, which is specifically:
[0056] The health assessment results of the substation equipment encapsulated in JSON format are structured in the order of priority levels, and a structure tree is created with the level index as the identifier;
[0057] Perform a depth-first traversal of the structure tree to generate a unique identifier for each leaf node, create a form DOM element of the corresponding configuration model based on the generated unique identifier, bind the corresponding Vue component to each form DOM element, and assign parameters.
[0058] During implementation, JSON data is structured through a step-by-step decomposition method (first hierarchy and then content), a structure tree is formed with hierarchical indexes as identifiers, and then the leaf nodes on the branches (corresponding to all form DOMs of JSON content) are traversed and output, and the DOM ID is generated with the parent index value as the prefix, and porp and v-mode l are bound, and the parameters are assigned. The saving and editing of configuration content mainly rely on the following two technical implementations: dynamic generation of JSON data and real-time caching (under the premise of unlimited real-time operation of the form, JSON data is generated and cached while operating, and the whole process must ensure the real-time, integrity and logical correctness of the JSON data); generating forms based on complex JSON data and echoing values (it is necessary to strip the hierarchical relationship according to the complex JSON data, analyze the data structure, and then render and generate a DOM that conforms to the form hierarchy and form type of the source data, and perform two-way binding and assignment of VUE to achieve the echo shown in the figure below).
[0059] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An infinite level logical nesting visualization method for configuration data based on real-time cache, It is characterized in that The steps of the method include: Obtain the healthy business logic configuration requirements of substation equipment; Collect substation equipment-related data according to business logic configuration requirements, and establish an equipment health assessment model based on the substation equipment-related data to obtain substation equipment health assessment results; A configuration model is created according to the health assessment results of the substation equipment. The configuration model encapsulates the health assessment results of the substation equipment into a data structure in a specific format, and bidirectionally binds the health assessment results of the substation equipment to the configuration model through the Vue component. The configuration model caches the dynamically generated health assessment results of the substation equipment in a specific format in real time. The configuration model caches the dynamically generated health assessment results of the substation equipment in real time to achieve synchronous configuration of the configuration model and the health assessment results of the substation equipment.
2. According to claim 1, the infinite-level logical nesting visualization method of configuration data based on real-time cache, It is characterized in that The data structure in the specific format is specifically in JSON format.
3. The method for infinite-level logical nesting and visualization of configuration data based on real-time caching according to claim 2, It is characterized in that The data related to the substation equipment is collected by deploying a variety of sensors at the substation equipment. The various sensors collect the operation data and environmental data of the substation equipment respectively. The operation data and environmental data of the substation equipment are aggregated to form the data related to the substation equipment.
4. The method for visualizing infinite-level logical nesting of configuration data based on real-time caching according to claim 3, It is characterized in that The equipment health assessment model is constructed based on a random forest classifier.
5. The method for visualizing infinite-level logical nesting of configuration data based on real-time caching according to claim 4, It is characterized in that The training process of the equipment health assessment model is as follows: Obtain historical operation data and environmental data of substation equipment; Clean and convert the historical operation data and environmental data of the substation equipment, and divide the historical operation data and environmental data of the substation equipment into training sets and test sets; Perform feature extraction on the training set and the test set, and normalize the extracted feature vectors. The processed feature vectors and the corresponding health status labels form the training data set and the test data set. The training data set is input into the equipment health assessment model for training. Multiple decision trees are constructed through self-service sampling and random feature selection. During the training process, the weight of each decision tree is calculated according to the loss function, and the parameters of the decision tree are iteratively updated until the maximum number of iterations is reached. The test data set is input into the equipment health assessment model to obtain the health assessment results of the substation equipment and verify whether the health assessment results of the substation equipment reach the expected values. If not, the hyperparameters are adjusted and retrained; if so, the trained equipment health assessment model is output.
6. The method for visualizing infinite-level logical nesting of configuration data based on real-time caching according to claim 5, It is characterized in that The calculation formula of the loss function is: Where D is the dataset of the current node, K is the number of categories, N is the number of samples in the training dataset D, and w i is the weight of the i-th sample, I(y i =k) is the indicator function. When the category of the i-th sample is k, I(y i =k) takes the value of 1, otherwise I(y i = k) is 0, M is the number of features, f j is the importance weight of the jth feature, I(x ij =1) is the indicator function. When the jth feature value of the i-th sample is 1, I(x ij =1) takes the value of 1, otherwise I(x ij =1) is 0.
7. The method for visualizing infinite-level logical nesting of configuration data based on real-time caching according to any one of claims 1 to 6, It is characterized in that The creation of the configuration model includes: Create a form hierarchy structure of the configuration model according to the hierarchical relationship of the health assessment results of the substation equipment; Generate corresponding form items according to the fields of the substation health assessment results, and define the display method and interactive behavior of the form items according to the field type and constraints.
8. The method for visualizing infinite-level logical nesting of configuration data based on real-time caching according to claim 7, It is characterized in that The form hierarchical structure of the configuration model is created according to the hierarchical relationship of the health assessment results of the substation equipment, which is specifically: The health assessment results of the substation equipment encapsulated in JSON format are structured in the order of priority levels, and a structure tree is created with the level index as the identifier; Perform a depth-first traversal of the structure tree to generate a unique identifier for each leaf node, create a form DOM element of the corresponding configuration model based on the generated unique identifier, bind the corresponding Vue component to each form DOM element, and assign parameters.
