Knowledge graph adaptive construction method based on hierarchical representation and deep learning model
By adopting the knowledge graph adaptive construction method based on hierarchical representation and deep learning models in the BS system architecture, the problem of difficult knowledge graphs to be intelligent, personalized and efficient in the existing technology is solved, and the dynamic construction and optimization of the knowledge graphs are realized, improving user experience and system efficiency.
Patent Information
- Application Number
- CN202510026722.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-05-09
AI Technical Summary
It is difficult for the prior art to realize the intelligence, personalization and efficiency of the knowledge graph in the BS system architecture, especially when facing dynamic adjustments of the system architecture, changes in business requirements or diversified user demand scenarios, the display content cannot be automatically adjusted to fit the actual situation.
Adaptive knowledge graph construction method based on hierarchical representation and deep learning model is adopted. By obtaining the target user terminal data and knowledge graph data, the trained hierarchical prediction model, user terminal performance prediction model and knowledge graph construction method prediction model are input after preprocessing, and the display method of knowledge graph is dynamically adjusted to adapt to the performance and needs of user terminals.
The dynamic construction and optimization of the knowledge graph is realized, the adaptability and flexibility of the system is enhanced, the user experience and overall system efficiency are improved, especially on resource-constrained terminals, performance is improved by reducing the computing and rendering burden.
Smart Images

Figure CN119962643A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and more specifically to a method for adaptively constructing a knowledge graph based on hierarchical representation and a deep learning model. Background Art
[0002] With the rapid development of science and technology, the field of artificial intelligence has achieved remarkable achievements and has become a key force in promoting social progress and industrial transformation. Among the many technical branches of artificial intelligence, knowledge graph technology has emerged in recent years, showing great development potential and application value. By constructing a semantic network of entities, relationships and attributes, knowledge graph technology provides a new and more efficient way for the organization, retrieval and understanding of information, greatly improving the utilization efficiency and value mining capabilities of data. In the power industry, knowledge graphs and their visualization technology play a vital role and have strongly promoted the development of related fields and businesses in the industry.
[0003] The internal systems of the power industry are mainly based on the BS (Browser / Server) system architecture, and the system structure (architecture) information presents complex characteristics of multi-level, multi-dimensional and closely related. This information not only includes the overall system architecture layout from the macro level to the various functional modules and their internal logic details at the micro level, but also the relationships between different levels are intricate and intertwined. Therefore, there is an urgent need for an efficient and intelligent technical means to clearly present and accurately manage these architectural information.
[0004] Visualization technology plays a pivotal role in this process. It can transform abstract system architecture data into an intuitive and easy-to-understand graphical interface, greatly helping developers to deeply understand the operating logic of the system architecture and promptly detect potential architectural design defects or logical loopholes. With the help of visualization technology, the various capabilities of the system can be meticulously displayed and scientifically and effectively managed, such as real-time monitoring of the data flow trend within the system, the load of functional modules, and the execution status of business processes, which is indispensable for ensuring the stable and reliable operation of the BS system architecture, improving system performance, and optimizing user experience.
[0005] However, the visualization technology currently used in BS system architecture applications still has many shortcomings. The layout methods and traditional algorithms of many visualization components lack the necessary flexibility and adaptability. When faced with dynamic adjustments to the system architecture, frequent changes in business requirements, or diversified user demand scenarios, they often cannot automatically adjust the display content to fit the actual situation. For example, when the system architecture status changes during business peaks or when upgrading functions, it is difficult for existing visualization technologies to quickly highlight key architecture change information; in display devices with different resolutions or terminal environments with different performance, it is impossible to automatically optimize the display effect to match the device characteristics, affecting the user's intuitive understanding of the system architecture; for the personalized needs of different types of developers or user roles (such as front-end developers focusing on the page interaction function module architecture, back-end developers focusing on the data processing logic architecture, and architects focusing on the scalability of the overall system architecture), it is also impossible to flexibly switch the display mode to provide targeted architecture views. These problems seriously restrict the visualization technology from playing a greater role in the field of BS system architecture and urgently need to be improved. Therefore, how to realize the intelligence, personalization and efficiency of knowledge graph construction and application, and how to adjust the knowledge graph display in a targeted manner according to the actual situation of the display terminal, are problems that technical personnel in this field urgently need to solve. Summary of the invention
[0006] In view of the above problems, the present invention provides a method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model to at least solve some of the technical problems mentioned in the above background technology.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] The present invention provides a method for adaptively constructing a knowledge graph based on hierarchical representation and a deep learning model, comprising:
[0009] Acquire target user terminal data, wherein the target user terminal data includes software configuration information and component performance data of the target user terminal;
[0010] Acquire knowledge graph data from the constructed hierarchical knowledge graph model; the knowledge graph data includes entities and relationships, as well as user query patterns;
[0011] Preprocessing the target user terminal data and the knowledge graph data respectively;
[0012] Input the preprocessed target user terminal data into the trained level prediction model to obtain the knowledge graph level suitable for displaying the target user terminal;
[0013] Inputting the preprocessed target user terminal data into the trained user terminal performance prediction model to obtain the terminal performance level corresponding to the target user terminal;
[0014] Input the preprocessed knowledge graph data and the terminal performance level into the trained knowledge graph construction mode prediction model to obtain the corresponding knowledge graph construction mode;
[0015] Determining a display strategy corresponding to the knowledge graph level according to the terminal performance level;
[0016] adjusting display parameters according to the display strategy;
[0017] Based on the display parameters, the knowledge graph is constructed through the knowledge graph construction mode.
[0018] Furthermore, it also includes: dynamically adjusting the display strategy based on the target user terminal data obtained in real time.
[0019] Furthermore, it also includes: obtaining feedback information from users during use; analyzing the feedback information, and optimizing the display strategy, hierarchical prediction model, user terminal performance prediction model and knowledge graph construction method prediction model based on the feedback information analysis results.
[0020] Further:
[0021] The software configuration information includes operation event type data, operation time series data, and operation source and target data;
[0022] The component performance data includes network request and response data and page performance index data;
[0023] The network request and response data include request type and frequency data, request response time data, and request data volume and return data volume data;
[0024] The page performance indicator data includes page loading time data, page resource usage data, and page error and exception data.
[0025] Furthermore, the hierarchical knowledge graph model includes a system layer, a component layer and an indicator layer;
[0026] In the system layer, the entire system is taken as a node, the system name, business coverage, user scale and operation status are taken as attributes, and the interaction between the system and the external interface is taken as a relationship to construct a macro subgraph;
[0027] In the component layer, the meso-subgraph is constructed by taking the function module as the node, the module name, the business domain to which it belongs, the module call frequency, and the module stability index as the attributes, and the inter-module call relationship, the data transmission volume, and the inter-module dependency relationship as the relationship;
[0028] In the indicator layer, the operation or data processing module is taken as the node, the operation type, data format, performance indicator, and running status are taken as attributes, and the module data transmission, logical dependency, and communication relationship between the operation module and the monitoring or scheduling module are taken as relationships to construct a micro subgraph.
[0029] Further:
[0030] Establishing an inclusion relationship or energy transmission relationship between the system-level node and the subsystem-level node between the system layer and the component layer;
[0031] Between the component layer and the indicator layer, an ownership relationship or an operation control relationship between the subsystem-level nodes and the component nodes is established.
[0032] Furthermore, the target user terminal data and the knowledge graph data are preprocessed respectively, specifically including:
[0033] Removing invalid data, denoising and normalizing the software configuration information and component performance data;
[0034] The knowledge graph data is converted into vector form.
[0035] Furthermore, the training steps of the hierarchical prediction model include:
[0036] Obtain software configuration information and component performance data of a large number of user terminals, as well as basic data of the hierarchical knowledge graph model; the software configuration information and component performance data of each user terminal corresponds to a knowledge graph level;
[0037] Preprocessing the acquired data;
[0038] The preprocessed software configuration information and component performance data of all user terminals are taken as input, and the corresponding knowledge graph levels are used as labels to train the hierarchical prediction model.
[0039] Furthermore, the training step of the user terminal performance prediction model includes:
[0040] Obtain software configuration information and component performance data for a large number of user terminals;
[0041] Preprocessing the acquired data;
[0042] Obtaining a terminal performance level corresponding to each user terminal according to the preprocessed software configuration information and component performance data of each user terminal;
[0043] The preprocessed software configuration information and component performance data are used as input, and the corresponding terminal performance level is used as a label to train the user terminal performance prediction model.
[0044] Furthermore, the training steps of the prediction model of the knowledge graph construction method include:
[0045] Obtain terminal performance results corresponding to a large number of user terminals;
[0046] Acquire knowledge graph data from the constructed hierarchical knowledge graph model; the knowledge graph data includes entities and relationships, as well as user query patterns;
[0047] Determine the knowledge graph construction mode corresponding to each user terminal based on the acquired data;
[0048] The terminal performance results and knowledge graph data are used as input, and the knowledge graph construction mode is used as a label to train the knowledge graph construction mode prediction model.
[0049] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model, which has the following beneficial effects:
[0050] The present invention realizes the dynamic construction and optimization of knowledge graphs by combining hierarchical representation technology and deep learning models. Hierarchical representation technology enables the knowledge graph to display different levels of details according to the resolution and performance requirements of different terminals, enhancing the adaptability and flexibility of the system. The deep learning model is responsible for processing complex language structures and providing powerful representation learning capabilities. This combination makes the knowledge graph more effective in processing large-scale, dynamically changing data.
[0051] The present invention innovatively proposes an intelligent judgment and adaptive display technology, which dynamically adjusts the display mode of the knowledge graph according to the performance prediction results of the user terminal. Through the deep learning model, it intelligently judges whether to use a top-down construction method or a bottom-up construction method to construct the knowledge graph. This technology not only improves the user experience, but also improves the overall efficiency of the system, especially on resource-constrained terminals, by reducing the computing and rendering burden to improve performance, and can be optimized according to different application scenarios and user needs.
[0052] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0054] Figure 1 A schematic flowchart of a method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning models provided in an embodiment of the present invention.
[0055] Figure 2 A schematic diagram of user interaction provided by an embodiment of the present invention.
[0056] Figure 3 A schematic diagram of a knowledge graph construction model provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0058] The embodiment of the present invention discloses a method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model, see Figure 1 As shown, the following steps are included:
[0059] S1. Acquire target user terminal data, where the target user terminal data includes software configuration information and component performance data of the target user terminal;
[0060] S2. Obtain knowledge graph data from the constructed hierarchical knowledge graph model; the knowledge graph data includes entities and relationships, as well as user query patterns;
[0061] S3, pre-processing the target user terminal data and knowledge graph data respectively;
[0062] S4, inputting the preprocessed target user terminal data into the trained hierarchical prediction model to obtain the knowledge graph hierarchy suitable for displaying the target user terminal;
[0063] S5. Input the preprocessed target user terminal data into the trained user terminal performance prediction model to obtain the terminal performance level corresponding to the target user terminal;
[0064] S6. Input the preprocessed knowledge graph data and the terminal performance level into the trained knowledge graph construction method prediction model to obtain the corresponding knowledge graph construction mode;
[0065] S7. Determine the display strategy corresponding to the knowledge graph level according to the terminal performance level;
[0066] S8, adjusting display parameters according to the display strategy;
[0067] S9. Based on the display parameters, the knowledge graph is constructed through the knowledge graph construction mode.
[0068] The method further includes: S10, dynamically adjusting the display strategy based on the software configuration information and component performance data of the target user terminal acquired in real time;
[0069] It also includes: S11, obtaining feedback information from users during use; analyzing the feedback information, and optimizing the display strategy, hierarchical prediction model, user terminal performance prediction model and knowledge graph construction method prediction model based on the feedback information analysis results.
[0070] The above-mentioned marks S1-S10 are only for the convenience of explanation, and do not limit the specific execution order of each step. Next, each of the above-mentioned steps will be described in detail.
[0071] In the above step S1, target user terminal data is obtained, and the target user terminal data includes software configuration information and component performance data of the target user terminal; wherein:
[0072] (1) Software configuration information is functional operation information, including:
[0073] ① Operation event type data, that is, operation behavior data; specifically: through the front-end monitoring and collection of user operations on the BS system functional modules on the browser side, such as page loading, clicking, input, form submission, selection, etc., record the operation type, element identification and timestamp to analyze the interaction mode and determine the key functional modules.
[0074] ② Operation time series data, specifically: count the frequency of users’ operation of system functions in different time periods on the server side, accurately record the time points of operation events, form a time series, so as to gain insight into the operation process and rhythm, and assist in optimizing the system response speed and interactive experience.
[0075] ③ Operation path tracking data: Record the sequence and process of users jumping between functional pages on the server side. The operation path tracking data includes the operation source and target data; the operation source and target data clearly define the operation trigger source and target location, build the functional module navigation and data flow relationship, and clearly present the connection method and interaction path.
[0076] (2) Component performance data includes network request and response data and page performance index data, specifically:
[0077] ① Network request and response data:
[0078] Request type and frequency data: Collect network request types and frequencies to understand the use of network resources by functional modules, allocate resources reasonably and highlight the data interaction relationship between key modules.
[0079] Request response time data: measures the request response time, locates the slow response module or interface, optimizes the server and network configuration, and serves as an indicator for evaluating the performance of functional modules.
[0080] Request data volume and return data volume data: record the size of request and return data volume, optimize data transmission efficiency, discover complex areas of data processing, and assist in analysis and optimization when building knowledge graphs.
[0081] ②Page performance index data
[0082] Page loading time data: Statistics on the time it takes for a page to load and become interactive, analyze influencing factors, and optimize the loading order and method as a performance evaluation indicator for page-level functional modules.
[0083] Page resource usage data: monitor the memory, network bandwidth and other resource usage when the page is running, understand the degree of resource consumption, and assist in resource allocation and optimization.
[0084] Page error and exception data: Captures error and exception information during page operation, records type, location, and frequency, locates and repairs problems, and identifies the health status of functional modules.
[0085] In the above step S2, knowledge graph data is obtained from the constructed hierarchical knowledge graph model, and the knowledge graph data includes entities and relationships, as well as user query patterns;
[0086] Among them, the hierarchical knowledge graph model simply divides the knowledge graph into multiple layers, each layer is used to represent a different level of detail. For example, layer 1 (top layer) contains the main entities and relationships, layer 2 contains secondary entities and relationships, and layer 3 (bottom layer) contains more detailed sub-entities and sub-relationships. Entities and relationships are assigned to different levels according to the importance of entities and relationships, user query frequency, and data complexity. Let E be the entity set, R be the relationship set, and L be the level set. For each entity e∈E and relationship r∈R, assign a level l∈L: e.layer=l, r.layer=l, and for each level l, construct a subgraph G l , contains all entities and relationships at this level. Subgraph G l It can be expressed as: G l =(V l ,El ), where V l is the set of vertices at level l, E l is the set of edges at level l.
[0087] In an embodiment of the present invention, the steps of constructing a hierarchical knowledge graph model include:
[0088] (1) Determine the level of the hierarchical knowledge graph model:
[0089] The appropriate number of layers is determined by comprehensively considering the scale and complexity of the BS system and the differences in the requirements of different developers for architectural information during system development, maintenance and optimization. In the embodiment of the present invention, the system is divided into three layers, from the macro-architecture layer (i.e., the system layer), the functional module layer (i.e., the component layer) to the operation detail layer (i.e., the indicator layer) to ensure that the hierarchical model can comprehensively and accurately present the system architecture and operation logic. The details are as follows:
[0090] ① System layer (top layer): This layer focuses on showing the overall architecture outline and core architecture information of the BS system, covering the system's architecture mode (such as MVC, MVVM, etc.), the main technology stack (such as front-end framework, back-end language and database type), the overall business process overview of the system, and the interactive interface with external systems (such as third-party login interface, payment platform interface, etc.). Take the BS system as a whole as a node, take the system name, business coverage, user scale and operating status as attributes, and take the interaction between the system and the external interface (such as interface type, frequency, data flow calling method, data interaction format, etc.) as a relationship to construct a macro subgraph. At the same time, this level generally reflects the division of the main functional modules of the system and their approximate interactive relationship, providing developers with a macro perspective of the system architecture.
[0091] ② Component layer (middle layer): This layer focuses on the architecture design and operation mechanism of each functional module within the system, including the internal structure of the functional module (such as the sub-modules, classes, functions and other components contained in the module), the calling relationship and data transmission process between modules, and the role and responsibilities of the module in the business scenario (such as user authentication, data management, business logic processing, etc.). Each functional module is taken as a node, the module name, business field, module function description (such as module calling frequency), module stability indicators (such as error rate, average response time, etc.) as attributes, and the calling relationship between modules (synchronous or asynchronous call), data transmission volume, and module dependency (strong dependency, weak dependency) as relationships. A meso-subgraph is constructed to help developers deeply understand the collaborative relationship between functional modules and the internal logic of the system.
[0092] ③Indicator layer (bottom layer): This layer goes deep into the specific operations and data processing details during system operation, involving the operation logic of page elements (such as event processing after button clicks, data verification and storage process of form submission), the operation of data processing modules (such as data query statements, data update operations, algorithm implementation details), and the relationship between each operation and system monitoring and scheduling mechanisms. With various operations or data processing modules as nodes, operation types (such as data reading, writing, calculation, etc.), data formats, performance indicators (such as operation execution time, resource usage), module operation status (normal, abnormal, busy) as attributes, operation module data transmission, logical dependencies (such as the output of one operation as the input of another operation), communication methods between operation modules and system monitoring modules (recording operation logs, performance indicator monitoring) and business scheduling modules (controlling operation execution order, resource allocation) and data interaction content as relationships, a micro subgraph is constructed to assist developers in troubleshooting system runtime problems and optimizing system performance and operation logic.
[0093] (2) Define the scope and responsibilities of each level:
[0094] ① Classification based on system operation logic:
[0095] The overall system architecture, including architecture patterns (such as MVC, etc.), main technology stacks (front-end and back-end technologies and databases), business process overviews, and external system interaction interfaces (interface definitions, protocols, data formats, etc.) are classified into the system layer. These contents related to the overall system architecture design and external interaction are classified into the system layer.
[0096] The internal architecture and operation mechanism of functional modules, including the internal structure of modules (sub-modules, classes, function relationships), interactions between modules (calling methods, data transmission, dependencies), and module business responsibilities (such as authentication, management, logical processing, etc.), are divided into the component layer.
[0097] The system operation details, including page element operation logic (button clicks, form processing), data processing module operations (query, update, algorithm) and association with the monitoring and scheduling mechanism (logging, performance monitoring, scheduling control), are included in the indicator layer to help developers troubleshoot problems and optimize performance.
[0098] ②Classification based on data management and application requirements:
[0099] System-level management and overall strategic decision-making, architecture planning-related data. Architecture mode and technology stack affect technology selection and architecture evolution; business process overview guides data flow strategy; external interface conditions determine the data interaction specifications between systems. Overall information provides architecture-level data support for high-level decision-making, and clarifies the scope of system data management and external interaction requirements.
[0100] The component layer focuses on data processing and resource management of functional modules in specific business areas. The internal structure determines the organization and operation of data within the module; the call relationship and transmission process ensure accurate and efficient interaction of data between modules; and the role responsibilities define the scope of data types to be processed. Module attributes and relationships help developers analyze module-level requirements, allocate resources reasonably, and ensure correct data transmission based on dependency relationships to meet business operation requirements.
[0101] The indicator layer focuses on data monitoring, problem troubleshooting and performance optimization at the runtime operation level. The page operation logic optimizes user interaction and data verification; the data processing module operation information monitoring optimizes efficiency and finds bottlenecks; the module relationship helps track links and troubleshoot anomalies; and the data interaction with the monitoring and scheduling module provides real-time feedback and control methods to meet monitoring and operation and maintenance needs. (3) Constructing hierarchical structures and connection relationships:
[0102] ①Build the internal structure of the hierarchy: In each hierarchy, build a complete subgraph structure based on the internal logic and business processes between entities and relationships. Set rich and targeted attributes for nodes and relationships in each hierarchy to accurately describe their characteristics and behaviors.
[0103] ② Establish connections between levels: By defining clear connections, subgraphs at different levels are organically integrated into a complete hierarchical model. This integration ensures that information flow and interaction between levels from macro to micro can be reflected.
[0104] Build affiliation or logical association between the system layer and the component layer. The system node governs the subsystem node, and the latter interacts with the former through data links and logical signals. The relationship attributes include data flux, service indicators, and degree of dependence, presenting macro and meso information interaction and constraint relationships, helping developers understand the hierarchical collaboration mechanism.
[0105] Establish the relationship of belonging or instruction transmission between the component layer and the indicator layer. The business module node includes the execution component node, which is controlled by the subsystem node and feedbacks the operation status. The attributes include instruction format, response time, and permission level, realizing the information fusion and collaborative management from system to component, helping developers to master the component collaborative relationship and optimize the system.
[0106] (4) Using the graph database Neo4j to store multi-resolution data of the hierarchical knowledge graph model:
[0107] According to the data model constructed by the hierarchical model, the node and relationship types of the graph database are designed to create indexes for each level to optimize query performance. lStore in a graph database. Set appropriate properties for each node and relationship to store additional metadata. Implement adaptive query parameters to control the amount of data returned and the level of detail based on the resolution and performance requirements of the user's terminal. Design a query function that accepts terminal attributes as input and returns the appropriate level of terminal attributes.
[0108] (5) Implementing an adaptive query mechanism:
[0109] According to the result of the query function Q, the data of the corresponding level is retrieved from the graph database. For example, if the user terminal has high resolution and high performance, the data of the top and bottom layers are retrieved; if the user terminal has low resolution or low performance, only the data of the top layer is retrieved.
[0110] Based on the above, the hierarchical knowledge graph model in the embodiment of the present invention adopts a hierarchical representation technology. This hierarchical mode enables the knowledge graph to flexibly display information of the corresponding level according to the system operation status and user needs. For example, when the system is running normally, it provides users with a concise and clear overview of the overall operation; when a fault occurs, it quickly switches to a level containing detailed faulty equipment and surrounding related information to help operation and maintenance personnel quickly locate the root cause of the problem, greatly improving the flexibility and practicality of information display. The embodiment of the present invention presents the performance information of the distributed system architecture based on a hierarchical knowledge graph model, which not only improves the understanding and monitoring capabilities of the system performance, but also enhances the system's adaptability and user experience. This innovative approach provides a new solution for performance optimization and management of distributed systems.
[0111] In the above step S3, the target user terminal data and the knowledge graph data are preprocessed respectively; (1) the software configuration information and component performance data are processed to remove invalid data, denoise the data and normalize the data; specifically:
[0112] 1) Identify and remove invalid data (i.e. duplicate data):
[0113] ① Use database queries (such as SQL's "GROUP BY" and "HAVING" clauses) or programming languages (such as Python's pandas library) to identify and remove duplicate data records;
[0114] ② Correct incorrect data input: Check the outliers and missing values in the data set and use statistical analysis or data filling techniques (such as mean filling and interpolation methods) to correct them;
[0115] ③ Delete incomplete data records: Review the data set and delete data records that are missing key information to ensure the integrity of the data set;
[0116] 2) Data denoising:
[0117] ① Identify noisy data: Use statistical methods (such as Z-score, IQR) or machine learning algorithms (such as isolation forest) to identify outliers;
[0118] ② Reduce noise data: For the identified noise data, decide whether to delete or retain it based on business logic and statistical analysis results;
[0119] 3) Data Normalization:
[0120] ① Format unification: All collected data is converted into a unified data format, for example, the date and time format is unified into the ISO 8601 standard, and the numerical units are unified into the International System of Units;
[0121] ②Data type conversion: convert non-numeric data into numeric data, for example, use one-hot encoding or label encoding to process categorical data;
[0122] ③Data standardization / normalization; the specific formula is as follows:
[0123] Standardization:
[0124]
[0125] Among them, Z is the data after standardization; X is the original data; μ is the mean; σ is the standard deviation.
[0126] Normalization (Min-Max Scaling) processing:
[0127]
[0128] Among them, X norm is the normalized data; X is the original data; X min is the minimum value of the feature; X max is the maximum value;
[0129] 4) Consider data security and privacy protection simultaneously: ensure compliance with relevant data protection regulations during data collection and processing; desensitize sensitive data, such as anonymizing or encrypting, to protect user privacy.
[0130] (2) Convert knowledge graph data into vector form.
[0131] In the above step S4, the pre-processed target user terminal data is input into the trained level prediction model to obtain the knowledge graph level suitable for displaying the target user terminal;
[0132] The training steps of the hierarchical prediction model include:
[0133] (1) Obtain software configuration information and component performance data of a large number of user terminals, as well as basic data of a hierarchical knowledge graph model; the software configuration information and component performance data of each user terminal corresponds to a knowledge graph level;
[0134] (2) Preprocess the acquired data according to the above preprocessing method to ensure the consistency and applicability of the data;
[0135] (3) The preprocessed software configuration information and component performance data of all user terminals are used as input, and the corresponding knowledge graph levels are used as labels to train the hierarchical prediction model. Specifically:
[0136] ① Divide the above data into training set, validation set and test set in a ratio of 8:1:1;
[0137] ②Model initialization: Initialize the parameters of the hierarchical prediction model, such as weights and biases.
[0138] ③ Use the training set data to train the model, use the back propagation algorithm to adjust the model parameters, and minimize the loss function;
[0139] ④ Hyperparameter tuning: Adjust the model’s hyperparameters, such as learning rate, batch size, number of layers, and number of nodes, to optimize model performance;
[0140] ⑤Model validation: Use validation set data to evaluate the performance of the model, adjust the model structure and hyperparameters, and prevent overfitting or underfitting;
[0141] ⑥Model testing: Use test set data to evaluate the generalization ability of the model and ensure the applicability of the model under different conditions.
[0142] (4) After the model is trained, the model performance needs to be evaluated: Use evaluation indicators (such as mean square error, accuracy, recall, etc.) to evaluate the performance of the model. Based on the evaluation results, further optimize the model structure and parameters to improve the prediction accuracy and generalization ability of the model. Finally, deploy the trained hierarchical prediction model to the actual system to predict the performance of the user terminal in real time.
[0143] In the above step S5, the pre-processed target user terminal data is input into the trained user terminal performance prediction model to obtain the terminal performance level corresponding to the target user terminal;
[0144] The training steps of the user terminal performance prediction model include:
[0145] (1) Obtain software configuration information and component performance data of a large number of user terminals;
[0146] (2) Preprocess the acquired data using the preprocessing methods mentioned above to ensure the consistency and applicability of the data;
[0147] (3) obtaining a terminal performance level corresponding to each user terminal based on the preprocessed software configuration information and component performance data of each user terminal;
[0148] (4) The preprocessed software configuration information and component performance data are used as input, and the corresponding terminal performance level is used as a label to train the user terminal performance prediction model.
[0149] The remaining training steps of the user terminal performance prediction model can refer to the above-mentioned hierarchical prediction model.
[0150] In the above step S6, the preprocessed knowledge graph data and the terminal performance level are input into the trained knowledge graph construction mode prediction model to obtain the corresponding knowledge graph construction mode;
[0151] Among them, the training steps of the knowledge graph construction prediction model include:
[0152] (1) Obtaining terminal performance results corresponding to a large number of user terminals;
[0153] Acquire knowledge graph data from the constructed hierarchical knowledge graph model; the knowledge graph data includes entities and relationships, as well as user query patterns;
[0154] (2) Determine the knowledge graph construction mode (top-down or bottom-up) corresponding to each user terminal based on the acquired data; where:
[0155] Top-down construction: Suitable for knowledge graphs that need to respond quickly to user queries, with priority given to building main entities and relationships.
[0156] Bottom-up construction: Applicable to scenarios that require in-depth analysis and detailed data mining, with priority given to building detailed sub-entities and sub-relationships.
[0157] (3) Taking the terminal performance results and knowledge graph data as input, and the knowledge graph construction mode as the label, the knowledge graph construction mode prediction model is trained.
[0158] The remaining training steps of the prediction model for this knowledge graph construction method can refer to the above-mentioned hierarchical prediction model.
[0159] In the embodiment of the present invention, the hierarchical prediction model, the user terminal performance prediction model and the knowledge graph construction method prediction model are all deep learning models. The core advantage of the deep learning model in the present invention is its strong adaptability, which can better adapt to the changing user needs and terminal environment. In terms of user needs, the deep learning model can accurately understand the needs and preferences of different users in different scenarios by learning a large amount of user interaction data. Whether it is the precise query of equipment details by professional operation and maintenance personnel, or the macro grasp of the overall performance indicators of the system by managers, the deep learning model can intelligently adjust the display content and interaction mode of the knowledge graph according to the user's operating habits and demand intentions, and provide users with a highly personalized visualization experience. In terms of terminal environment adaptation, the deep learning model can perceive the terminal software in real time and automatically optimize the display effect of the knowledge graph based on this information. On low-performance terminals, smooth display is ensured by simplifying the graphic structure and reducing the amount of data transmission; on high-performance terminals, the advantages of the equipment are fully utilized to display richer details and interactive functions. At the same time, the deep learning model can also dynamically adjust the layout and element presentation mode of the knowledge graph according to the display ratio of the terminal device and the user's operating habits, so as to improve the convenience and comfort of user operation.
[0160] In the above step S7, the display strategy and display parameters corresponding to the knowledge graph level are determined according to the terminal performance level; specifically:
[0161] If the prediction result shows that the user terminal has high performance, a display strategy that displays more details and interactive functions is selected. If the prediction result shows that the user terminal has low performance, a display strategy that simplifies the display and reduces the computation and rendering burden is selected.
[0162] In the above step S8, the display parameters of the knowledge graph are adjusted according to the selected display strategy, such as the number of nodes and edges, the level of detail displayed, the complexity of the interactive functions, etc.
[0163] In the above step S9, the knowledge graph is constructed through the knowledge graph construction mode based on the display parameters; the constructed knowledge graph is presented at the user terminal to ensure that the best knowledge graph display effect can be provided on different terminals.
[0164] Among them, according to the adjusted display parameters, the knowledge graph can be rendered in real time to ensure that users can view and interact smoothly.
[0165] In the above step S10, the display strategy is dynamically adjusted based on the software configuration information and component performance data of the target user terminal obtained in real time, ensuring that the knowledge graph finally presented can adapt to the performance changes of the user terminal.
[0166] In the above step S11, the feedback information of the user during use is obtained; the feedback information is analyzed to understand the user's satisfaction with the display effect and interactive experience. And based on the analysis results of the feedback information, the display strategy, the hierarchical prediction model, the user terminal performance prediction model and the knowledge graph construction method prediction model are optimized to improve the response speed and accuracy of the knowledge graph displayed on the user terminal during the construction process.
[0167] In summary, the knowledge graph adaptive construction method based on hierarchical representation and deep learning model provided by the present invention needs to train three models before it is officially used, namely: A prediction model of the level suitable for display by the user terminal: used to predict the level of the knowledge graph suitable for display by the user terminal. User terminal performance prediction model: used to predict the performance of the user terminal, which may include network communication conditions (network bandwidth, network stability, data transmission speed, etc.) and device compatibility (degree of adaptation to the BS system, support for different technology stacks, etc.). Knowledge graph construction method prediction model: used to predict the construction method of the knowledge graph, that is, top-down or bottom-up.
[0168] Next, the training process of the above three models and the formal use process are further described in detail through a specific user interaction embodiment. Figure 2 shown.
[0169] 1. Data collection and preprocessing
[0170] Obtain the software configuration information and component performance data of the user terminal; and remove invalid data, denoise the data, and normalize the data.
[0171] 2. Layered representation design
[0172] 2.1 Hierarchical model construction
[0173] 2.1.1. Define the hierarchy
[0174] In the embodiment of the present invention, the level of the knowledge graph needs to be defined according to the performance information of the distributed architecture. Assume that a knowledge graph including three levels needs to be constructed: system level, component level and indicator level.
[0175] (1) Define the hierarchy
[0176] ① System layer (L1): This layer presents a comprehensive and high-level overview of the BS system, including the system name, architecture mode, main business module division, key performance indicators and external interface information. The system as a whole is the node, the relevant information is the attribute, and special identification attributes are added to the top-level status.
[0177] ② Component layer (L2): This layer focuses on the detailed architecture of functional modules, including module name, functional description, technical implementation, interaction relationship and business positioning. Functional modules are nodes, information is used as attributes, and associated attributes pointing to system layer nodes are added to clarify the hierarchical relationship.
[0178] ③Indicator layer (L3): This layer goes into the details of operation and data processing, including operation name, code logic, data correlation, performance indicators and monitoring scheduling relationship. Operation or module is a node, information is an attribute, and associated attributes pointing to the function module layer node are added to build a complete hierarchical structure.
[0179] Three levels are defined, and nodes are created for each level. In addition, a parent attribute is added to each node to indicate the hierarchical relationship between them.
[0180] 2.2.2 Storing Multi-resolution Data
[0181] In this step, you need to store performance data at different levels in the graph database. Specifically, you will use a CSV file as the data source, which contains data on components and performance indicators.
[0182] (1) Prepare data files:
[0183] Prepare a CSV file containing component and performance indicator data. The functional operation data section records information related to user operations, such as user ID, session ID, operation type (such as clicking a button, entering text, submitting a form, etc.), operation time, URL of the page where the operation is located, and the name of the functional module to which it belongs. The page performance data section records the page loading time, CPU resource usage, memory usage, error type (such as no error, image loading failure, script error, etc.), error message (such as detailed error information when there is an error), and timestamp. These data will be used for subsequent analysis and processing to build a hierarchical knowledge graph model and support system optimization and improvement. You can adjust the data content and format according to actual conditions to adapt to specific BS system requirements.
[0184] (2) Import data into Neo4j:
[0185] Use Neo4j's LOAD CSV command to import the data in the CSV file into the graph database. The code is as follows:
[0186] cypher
[0187] / / Create component nodes
[0188] LOAD CSV WITH HEADERS FROM'file: / / / performance_data.csv'AS row
[0189] MATCH(c:Component{name:row.component_name})
[0190] MERGE(pm:PerformanceMetric{name:row.performance_metric})
[0191] MERGE(c)-[:HAS]->(pm)
[0192] SETpm.value=row.value,pm.timestamp=row.timestamp
[0193] In this example, the CSV file is first loaded using the LOAD CSV command. Then the MATCH and MERGE commands are used to find or create component and performance indicator nodes. Finally, the relationship between the component and the performance indicator is created, and the value and timestamp of the performance indicator are set.
[0194] 2.1.3. Constructing hierarchical representation
[0195] Build a knowledge graph of distributed architecture performance. Suppose there is a distributed system that contains multiple components, such as database servers, application servers, and cache servers. It is necessary to collect performance data of these components and build a knowledge graph to represent the relationships and performance indicators between them.
[0196] (1) Using Neo4j graph database: Open Neo4j Desktop or Neo4j Browser. Create a new graph database instance to store data related to the BS system architecture. Define nodes and edges: In Neo4j Browser, use Cypher query language to define the following nodes and edges. The code example is as follows:
[0197] cypher
[0198] / / Create system architecture related nodes
[0199] CREATE(system:System{name:'BS system',architecture_type:'Microservice architecture',main_tech_stack:'React+Node.js+MongoDB'})
[0200] CREATE(userModule:Module{name:'User management module',function_description:'Handles user registration, login, information management and other functions',implementation_detail:'Developed using React components and interacts with the backend user service interface'})
[0201] CREATE(productModule:Module{name:'Product Management Module',function_description:'Responsible for adding, deleting, modifying and checking product information, inventory management, etc.',implementation_detail:'Use Node.js to write backend logic and interact with the database product table'})
[0202] CREATE(orderModule:Module{name:'Order management module',function_description:'Handles order creation, query, payment and other processes',implementation_detail:'Integrates third-party payment interface and works with user and product modules'})
[0203] CREATE(loginOperation:Operation{name:'User login operation',code_logic:'Call the backend user authentication interface, verify the username and password, and return the login result',data_source:'User input form data',performance_metric:'Average response time 500ms'})
[0204] CREATE(productQueryOperation:Operation{name:'Product query operation',code_logic:'Query the database product table according to the user input conditions and return the product list',data_source:'Database query results',performance_metric:'Average query time 300ms'})
[0205] CREATE(orderCreateOperation:Operation{name:'Order creation operation',code_logic:'Collect user order information, call the payment interface to complete payment, update order status and inventory',data_source:'User input and product inventory data',performance_metric:'Average processing time 1000ms'})
[0206] / / Create relationships between nodes
[0207] CREATE(system)-[:CONTAINS]->(userModule)
[0208] CREATE(system)-[:CONTAINS]->(productModule)
[0209] CREATE(system)-[:CONTAINS]->(orderModule)
[0210] CREATE(userModule)-[:HAS_OPERATION]->(loginOperation)
[0211] CREATE(productModule)-[:HAS_OPERATION]->(productQueryOperation)
[0212] CREATE(orderModule)-[:HAS_OPERATION]->(orderCreateOperation)
[0213] CREATE(orderCreateOperation)-[:DEPENDS_ON]->(productQueryOperation)
[0214] CREATE(orderCreateOperation)-[:DEPENDS_ON]->(loginOperation)
[0215] In this example, a node (system) representing the entire BS system is first created, with attributes such as system name, architecture type, and main technology stack. Then three function module nodes (userModule, productModule, orderModule) are created, each of which contains attributes such as name, function description, and implementation details to describe the characteristics of each function module. Then three operation nodes (loginOperation, productQueryOperation, orderCreateOperation) are created, covering attributes such as operation name, code logic, data source, and performance indicators to describe specific operation details. Then, the inclusion relationship (CONTAINS) between the system and the function module is created, indicating that the function module is part of the overall architecture of the system; the inclusion operation relationship (HAS_OPERATION) between the function module and the operation is created, which clarifies that the operation is the specific execution module of the function module; and the dependency relationship (DEPENDS_ON) between the operations, for example, the order creation operation depends on the product query operation and the user login operation, which reflects the logical association between the operations. Through the creation of these nodes and relationships, a knowledge graph model reflecting the BS system architecture can be constructed in the Neo4j graph database, providing strong support for subsequent system analysis, optimization, and development. You can further expand and refine the definitions of these nodes and relationships based on the specific architecture and functional requirements of the actual system.
[0216] 2.2 Graph Database Storage
[0217] 2.2.1. Choosing a graph database
[0218] Install and configure Neo4j
[0219] (1) Download and install Neo4j:
[0220] Visit the Neo4j official website (https: / / neo4j.com / download / ) and download the Neo4j version that suits your operating system. Install Neo4j and follow the instructions of the installation wizard to complete the installation.
[0221] (2) Configure Neo4j:
[0222] Open Neo4j Desktop, select "AddDatabase" and configure a new graph database instance. Set the database name, password, and other configuration options.
[0223] 2.2.2. Storing multi-resolution data:
[0224] Importing distributed architecture performance data into Neo4j
[0225] (1) Prepare data files:
[0226] Prepare a file containing component and performance indicator data, such as CSV or JSON format. The code is:
[0227] csv
[0228] / / Component data
[0229] name,type,location
[0230] "Database Server","Database","Data Center 1"
[0231] "Application Server","Application","Data Center 2"
[0232] "Cache Server","Cache","Data Center 1"
[0233] / / Performance indicator data
[0234] name, description
[0235] "Response Time","Average response time in milliseconds"
[0236] "Throughput","Requests per second"
[0237] (2) Import data using the Neo4j Import tool:
[0238] In Neo4j Browser, use the :schema command to create indexes to optimize query performance. Use the :load csv command to import data files. The code is as follows:
[0239] cypher
[0240] / / Create index
[0241] CREATE INDEX ON:Component(name);
[0242] CREATE INDEX ON:PerformanceMetric(name);
[0243] / / Import CSV file
[0244] LOAD CSV WITH HEADERS FROM'file: / / / Components.csv'AS line
[0245] CREATE(:Component{name:line.name,type:line.type,location:line.location});
[0246] LOAD CSV WITH HEADERS FROM'file: / / / PerformanceMetrics.csv'AS line
[0247] CREATE(:PerformanceMetric{name:line.name,description:line.description});
[0248] In this example, the LOAD CSV command is used to import a CSV file from the local file system and create corresponding component nodes and performance indicator nodes.
[0249] 2.2.3. Design query parameters
[0250] (1) Define the query function:
[0251] In Neo4j Browser, define a query function to return appropriate component and performance indicator data based on the data level requested by the user. Depending on the user request, different component names can be passed to retrieve the corresponding component and performance indicator data.
[0252] 2.2.4. Implementing an adaptive query mechanism
[0253] In this step, an adaptive query mechanism needs to be designed and implemented according to the performance and resolution requirements of the user terminal in order to retrieve data at the corresponding level from the graph database.
[0254] (1) Define query parameters:
[0255] Suppose there is a function getLayerData, which accepts a parameter layerLevel, which represents the data level requested by the user.
[0256] (2) Writing adaptive queries:
[0257] In Neo4j Browser, write a Cypher query to dynamically return data at different levels based on the layerLevel parameter. This can be expressed in code as follows:
[0258] cypher
[0259] / / Adaptive query function, returns data according to the level
[0260] MATCH(n:Layer)
[0261] WHERE n.level=$layerLevel
[0262] OPTIONAL MATCH(n)-[:CONTAINS*]-(data)
[0263] RETURN n,data
[0264] In this example, $layerLevel is a parameter that indicates the data level requested by the user. The query will return all nodes (n) at the specified level and all the data they contain (data).
[0265] (3) Implement adaptive query logic: In the application, call the getLayerData function and pass the appropriate layerLevel parameter based on the performance and resolution of the user terminal, then connect to the Neo4j database and perform adaptive queries based on the layerLevel in the user terminal information.
[0266] (4) Processing query results:
[0267] Based on the query results, the application can further process the data, such as formatting the data, generating charts, or providing other user interface elements.
[0268] 3. Machine Learning Model Selection and Training
[0269] 3.1. Obtain software configuration information and component performance data of a large number of user terminals, as well as basic data (such as entities, relationships, and attributes) of the hierarchical knowledge graph model; and preprocess the acquired data.
[0270] The basic data of the knowledge graph model mentioned above is stored in the graph database (Neo4j), and these data exist in the form of a data structure constructed by a hierarchical model. When training a deep learning model, the required entity, relationship, and attribute data are obtained from the graph database and converted into a format suitable for model training (such as vector form) to provide the model with rich and structured training data. These training data participate in the model training process in the form of labels. For example, when obtaining information about a certain terminal device, the level suitable for display on this terminal device is used as the label of the terminal device. The purpose of training is to make the level predicted by the model consistent with its label, so as to accurately output the level suitable for display on the terminal.
[0271] The training process includes the following:
[0272] (1) Data partitioning: Divide the above dataset into training set, validation set, and test set, usually in a ratio of 8:1:1.
[0273] (2) Model architecture: Design a neural network model, including an input layer, two hidden layers, and an output layer. The input layer has 10 neurons (assuming there are 10 features). The first hidden layer has 64 neurons, and the second hidden layer has 32 neurons. The number of neurons in the output layer depends on the task. For regression tasks, the output layer has 1 neuron.
[0274] (3) Activation function: The hidden layer uses the ReLU activation function, and the output layer uses the linear activation function for regression tasks.
[0275] (4) Learning rate and optimizer: Set the initial learning rate to 0.001 and select the Adam optimizer.
[0276] (5) Batch size and training cycle: Set the batch size to 32 and the training cycle to 100.
[0277] (6) Batch normalization and dropout: Batch normalization is applied after each hidden layer, and the dropout rate is set to 0.2 to prevent overfitting.
[0278] (7) Early stopping method: Monitor the loss on the validation set and stop training if there is no improvement for 10 consecutive epochs.
[0279] 3.4 Model Evaluation and Optimization
[0280] (1) Performance evaluation: The mean square error (MSE) or mean absolute error (MAE) is used as the performance evaluation indicator for regression tasks.
[0281] (2) Model optimization: Based on the evaluation results, the model structure and parameters are further optimized to improve the model’s prediction accuracy and generalization ability.
[0282] (3) Model deployment: Deploy the trained model to the actual system to predict the performance of the user terminal in real time.
[0283] 3.5. Continuous monitoring and updating
[0284] (1) Real-time monitoring: Monitor the predictive performance of the model in real time and collect new performance data.
[0285] (2) Model update: Regularly retrain the model using new data to maintain the accuracy and applicability of the model.
[0286] (3) Feedback mechanism: Continuously optimize the model and adaptive algorithm based on user feedback and system performance.
[0287] 3.6. 3.1-3.5 above are examples of the specific training steps for the hierarchical prediction model. For the user terminal performance prediction model, the software configuration information and component performance data are used as input, and the corresponding terminal performance level is used as a label for training; for the knowledge graph construction method prediction model, the terminal performance results and knowledge graph data are used as input, and the knowledge graph construction mode is used as a label for training.
[0288] 4. Adaptive display and interaction
[0289] 4.1 Performance Prediction
[0290] (1) Input feature collection: collect software configuration information and component performance data of the target user terminal in real time;
[0291] (2) Data preprocessing: Preprocess the collected performance data, including normalization or standardization, to ensure the consistency and applicability of the data. Use the same data normalization method used in model training to ensure consistency in the preprocessing steps.
[0292] (3) Model input: The preprocessed performance data is input into the trained user terminal performance prediction model.
[0293] (4) Performance prediction: Use the user terminal performance prediction model to predict the performance indicators of the target user terminal, such as response time, processing power, etc.
[0294] 4.2 Dynamic Adjustment
[0295] Analyze the prediction results of the neural network model to determine the performance level of the user terminal.
[0296] (1) High-performance terminal strategy
[0297] 1) Display strategy
[0298] Understanding system architecture for developers
[0299] ① Detailed display of architectural elements: presenting the functional module architecture (class structure, function relationship, etc.) and the interfaces and data interactions between modules to help them understand the architectural composition and interactions.
[0300] ② Visualization of code logic and data flow: Graphically display the code logic and data flow path of the business process to facilitate tracking, troubleshooting and optimization.
[0301] ③Architecture evolution history and version comparison: Provide architecture change records, support comparative analysis, and provide reference for optimization and upgrades.
[0302] Analyzing system performance for developers
[0303] ① Performance indicator aggregation and decomposition display: Aggregate and decompose performance indicators, present correlation relationships, and help locate bottlenecks.
[0304] ②Performance hotspot and trend analysis: highlight hotspots, analyze historical trends, predict problems, and analyze causes.
[0305] ③Resource usage and performance correlation analysis: Display the relationship between resource usage and performance indicators to help optimize resource allocation.
[0306] Troubleshooting system issues for developers
[0307] ① Integration of error logs and exception information: Categorize and organize error logs, provide query filtering, and help locate and analyze problems.
[0308] ②Problem tracking and impact scope analysis: Establish tracking links, analyze the impact scope, and assist in evaluation and strategy formulation.
[0309] ③Display of debugging auxiliary information: Provides runtime variables, call stack and other information to help locate the root cause and improve efficiency.
[0310] 2) Display parameter adjustment
[0311] ① Detailed information of nodes and edges: Display more properties for each component node, such as current load, health status, configuration parameters, etc. Display more properties for the relationship edges between components, such as data transmission rate, latency, etc.
[0312] ②Interactive charts and dashboards: Provide interactive charts and dashboards that allow users to customize views and select different time frames.
[0313] ③ Dynamic update and real-time feedback: Realize real-time data update and instant feedback of user operations, such as query results and analysis reports.
[0314] (2) Low-Performance Terminal Strategy
[0315] 1) Display strategy
[0316] ①Core performance indicator summary: only the most critical performance indicators are displayed.
[0317] ②Simplified monitoring view: Provide a simplified monitoring view to avoid complex charts and animation effects.
[0318] ③ Basic component information: Display basic component information, hide or not display secondary components and complex dependencies.
[0319] ④Basic query function: Provides basic query function, allowing users to view the performance data of specific components.
[0320] 2) Parameter adjustment
[0321] ① Reduce the number of nodes and edges: only display the main component nodes and the core relationship edges between them.
[0322] ② Reduce data update frequency: Reduce data update frequency to reduce computing and network burden.
[0323] ③Simplified visuals: Use simplified visuals such as monochrome icons and basic text labels.
[0324] ④ Offline data and cache: Use offline data and cache strategies to reduce dependence on real-time data.
[0325] 4.3 Real-time monitoring and feedback
[0326] (1) Performance monitoring: Continuously monitor the performance of user terminals and network conditions, and collect the latest performance data.
[0327] (2) Dynamic adjustment: Based on real-time monitoring data, the display strategy of the knowledge graph is dynamically adjusted to ensure that the system can adapt to performance changes of user terminals.
[0328] (3) User feedback collection: Collect user feedback during use to understand user satisfaction with display effects and interactive experience.
[0329] (4) Feedback analysis and optimization: Analyze user feedback, optimize display strategies and neural network models, and improve the system’s response speed and accuracy.
[0330] 5. Knowledge Graph Construction Method
[0331] 5.1. Construction method decision
[0332] (1) Input feature collection: Collect data related to the construction method decision, including the importance of entities and relationships, user query patterns, system performance prediction results, etc.
[0333] (2) Data preprocessing: Normalize or standardize the collected data to ensure data consistency and applicability. Use the same data normalization method used in model training to ensure consistency in the preprocessing steps.
[0334] (3) Model input: The preprocessed data is input into the trained knowledge graph construction prediction model.
[0335] (4) Construction method prediction: Use the knowledge graph construction method prediction model to predict the optimal knowledge graph construction mode. The model may output a probability distribution indicating the possibility of each construction method. The above construction methods can be found in Figure 3As shown, specifically including:
[0336] 1) Top-down construction: The top-down construction method starts from the top or core part of the knowledge graph and gradually expands downward to more detailed levels. This method is suitable for scenarios that require quick response to user queries because it can quickly display core information. Specific implementation steps:
[0337] ① Determine core entities: Identify and select the most core and important entities in the knowledge graph. These entities are usually the hot spots of queries or the parts most relevant to user needs.
[0338] ②Build the core layer: Build a subgraph containing core entities and their direct relationships, which constitute the top layer of the knowledge graph.
[0339] ③User query response: Optimize query performance to ensure that users can quickly obtain information related to core entities.
[0340] ④Gradually refine: According to the specific needs and interactions of users, gradually add more details and levels to expand the knowledge graph.
[0341] ⑤Performance optimization: During the build process, we continuously optimize performance to ensure that it remains responsive even as more details are added.
[0342] 2) Bottom-up construction: Applicable to scenarios that require in-depth analysis and detailed data mining, giving priority to building detailed sub-entities and sub-relationships. The bottom-up construction method starts from the lowest level or the most detailed part of the knowledge graph and gradually builds up to higher-level entities and relationships. This method is suitable for scenarios that require in-depth analysis and detailed data mining. Specific implementation steps:
[0343] ① Collect detailed data: Collect as much underlying detail data as possible from the data source, including sub-entities and sub-relationships.
[0344] ②Build the base layer: Build a subgraph containing detailed sub-entities and sub-relationships, which constitute the bottom layer of the knowledge graph.
[0345] ③Identify patterns and associations: Through pattern recognition and association analysis, discover potential connections and important patterns in the underlying data.
[0346] ④ Aggregation and generalization: Aggregate and generalize the underlying data to form higher-level entities and relationships.
[0347] ⑤ Iterative construction: Through iteration, gradually build a higher-level knowledge graph until the top level is reached.
[0348] ⑥Flexibility and scalability: Ensure the flexibility and scalability of the construction process so that the structure of the knowledge graph can be adjusted according to new data and needs.
[0349] In actual operation, the knowledge graph construction method prediction model will predict which construction method is more suitable for the current scenario based on the input features (such as the importance of entities and relationships, user query patterns, system performance prediction results, etc.). For example, if the user query pattern shows that users often query specific core entities, the model may predict that a top-down construction method is more appropriate. On the contrary, if the system performance prediction results show a scenario that requires in-depth analysis, the model may tend to prefer a bottom-up construction method.
[0350] 5.2. Knowledge Graph Construction Method Prediction Model Iterative Optimization
[0351] (1) Data feedback collection: Collect user query behavior and system response in real time, and record the effect of the construction method.
[0352] (2) Model evaluation: Use the collected feedback data to evaluate the prediction accuracy and applicability of the deep learning model.
[0353] (3) Model optimization: Based on the evaluation results, adjust the model structure and parameters to optimize the model’s predictive performance.
[0354] (4) Continuous training: Regularly retrain the deep learning model using the latest feedback data to ensure that the model can adapt to changing data and environment.
[0355] (5) Iterative update: Through continuous iterative optimization, the accuracy and timeliness of knowledge graph construction are maintained and the overall performance of the system is improved.
[0356] 6. Real-time monitoring and feedback
[0357] 6.1 Real-time monitoring
[0358] (1) System status monitoring: Continuously monitor the system's key performance indicators, such as memory usage, network bandwidth, and latency.
[0359] (2) Use monitoring tools (such as Prometheus, Grafana, etc.) to collect and visualize performance data.
[0360] (3) Performance data collection: Performance data of user terminals and distributed system components are collected in real time. The real-time and accuracy of data collection must be ensured in this process to quickly respond to performance changes.
[0361] (4) User behavior records: record user interaction behaviors, such as clicks, queries, browsing, and other operations, as well as system responses.
[0362] (5) Use a logging system (such as ELK Stack) to collect and analyze user behavior data.
[0363] 6.2 Feedback Mechanism
[0364] (1) Data analysis: Analyze the collected user interaction behavior and system performance data to identify potential performance bottlenecks and user experience issues. Use data analysis tools (such as Python's Pandas library, R language, etc.) to perform data mining and pattern recognition.
[0365] (2) Feedback processing: Based on the analysis results, feedback information is generated to point out the parts that need to be optimized. Determine which functions need to be improved and which performance indicators need attention.
[0366] (3) Algorithm optimization: Utilize feedback information to optimize the adaptive algorithm, adjust the neural network model and hierarchical representation strategy, and regularly update model parameters and structure to adapt to new data and user needs.
[0367] (4) Neural network model adjustment: Retrain or fine-tune the neural network model (i.e., the hierarchical prediction model, user terminal performance prediction model, and knowledge graph construction prediction model mentioned above) based on the latest performance data and user feedback to improve prediction accuracy. Use cross-validation and A / B testing to evaluate the effect of model adjustment.
[0368] (5) Adjustment of hierarchical representation strategy: Dynamically adjust the hierarchical representation strategy of the knowledge graph according to the performance and interaction requirements of the user terminal to ensure the best display effect on different terminals. Adjust display parameters such as the number of nodes and edges, resolution, and detail level.
[0369] (6) System Update: Apply optimized algorithms and models to the system to improve the system's response speed and accuracy. Quickly deploy updates through automated deployment processes (such as CI / CD pipelines)
[0370] 6.3 Continuous Improvement
[0371] (1) Regular evaluation: Regularly evaluate the overall performance of the system and user experience to ensure the effectiveness of optimization measures. Use performance indicators and user satisfaction surveys to measure system performance.
[0372] (2) Iterative optimization: Based on the latest monitoring data and user feedback, we continuously iterate and optimize adaptive algorithms and models to maintain efficient operation of the system. We adopt agile development methods to respond to changes quickly and continuously deliver value.
[0373] (3) User feedback collection: Actively collect user feedback to understand user satisfaction with the system and their suggestions for improvement. User feedback is collected through channels such as questionnaires, user interviews, and community forums.
[0374] 7. Model self-iteration
[0375] 7.1 Update the model regularly
[0376] (1) Data collection: Continuously collect the latest performance data and user feedback to ensure the timeliness and accuracy of the data. Collect data through log systems, monitoring tools, and user feedback channels.
[0377] (2) Data preprocessing: Clean and normalize the collected data to ensure data quality and consistency, including removing outliers, filling missing values, format conversion, and normalization.
[0378] (3) Model retraining: Use the latest performance data and user feedback to regularly retrain the neural network model and optimize the model parameters and structure. This may involve adjusting the number of layers, number of neurons, activation function, etc.
[0379] (4) Model evaluation: Evaluate the performance of the updated model to ensure its applicability and accuracy under different conditions. Use the validation set and test set to evaluate the model’s performance indicators, such as accuracy, recall, and F1 score.
[0380] (5) Model deployment: Deploy the updated model to the system, replacing the old model, and ensuring that the system can utilize the latest optimization results. Ensure a smooth transition of model updates through an automated deployment process.
[0381] 7.2 Self-iteration
[0382] (1) Adaptive adjustment: Combining the adaptive adjustment algorithm and the neural network model, the display and interaction mode of the knowledge graph are dynamically adjusted according to real-time monitoring data and user feedback. A feedback loop is implemented so that the system can automatically respond to data changes and user behavior.
[0383] (2) Feedback mechanism: Utilize real-time monitoring and user feedback information to continuously optimize the adaptive algorithm and improve the system’s response speed and accuracy. Through continuous monitoring and feedback collection, we can identify system performance bottlenecks and user experience deficiencies.
[0384] (3) Continuous optimization: Through the combination of adaptive adjustment algorithms and neural network models, the knowledge graph can be self-optimized and continuously improved. Regular review and adjustment of optimization strategies can ensure continuous improvement of system performance and user experience.
[0385] (4) Iterative updates: Regularly evaluate and update adaptive algorithms and models to ensure that the system can adapt to changing data and environments and maintain efficient operation. Adopt agile development and continuous integration methods to quickly iterate and deploy updates.
[0386] (5) Performance monitoring and tuning: Monitor the performance of the model in actual operation and adjust and optimize the model parameters in a timely manner. Use performance monitoring tools to track the model's prediction accuracy and response time.
[0387] (6) Improve user satisfaction: Continue to pay attention to user satisfaction and use it as an important indicator for model and algorithm optimization. Through user research and testing, collect user feedback on new features and continuously improve the user interface and experience.
[0388] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0389] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A knowledge graph adaptive construction method based on hierarchical representation and deep learning model, characterized in that: include: Acquire target user terminal data, wherein the target user terminal data includes software configuration information and component performance data of the target user terminal; Acquire knowledge graph data from the constructed hierarchical knowledge graph model; the knowledge graph data includes entities and relationships, as well as user query patterns; Preprocessing the target user terminal data and the knowledge graph data respectively; Input the preprocessed target user terminal data into the trained level prediction model to obtain the knowledge graph level suitable for displaying the target user terminal; Inputting the preprocessed target user terminal data into the trained user terminal performance prediction model to obtain the terminal performance level corresponding to the target user terminal; Input the preprocessed knowledge graph data and the terminal performance level into the trained knowledge graph construction mode prediction model to obtain the corresponding knowledge graph construction mode; Determining a display strategy corresponding to the knowledge graph level according to the terminal performance level; adjusting display parameters according to the display strategy; Based on the display parameters, the knowledge graph is constructed through the knowledge graph construction mode.
2. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 1, characterized in that: Also includes: The display strategy is dynamically adjusted based on the target user terminal data acquired in real time.
3. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 1, characterized in that: Also includes: Obtain user feedback during use; The feedback information is analyzed, and the display strategy, hierarchical prediction model, user terminal performance prediction model and knowledge graph construction method prediction model are optimized according to the feedback information analysis results.
4. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 1, characterized in that: The software configuration information includes operation event type data, operation time series data, and operation source and target data; The component performance data includes network request and response data and page performance index data; The network request and response data include request type and frequency data, request response time data, and request data volume and return data volume data; The page performance indicator data includes page loading time data, page resource usage data, and page error and exception data.
5. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 1, characterized in that: The hierarchical knowledge graph model includes a system layer, a component layer and an indicator layer; In the system layer, the entire system is taken as a node, the system name, business coverage, user scale and operation status are taken as attributes, and the interaction between the system and the external interface is taken as a relationship to construct a macro subgraph; In the component layer, the meso-subgraph is constructed by taking the function module as the node, the module name, the business domain to which it belongs, the module call frequency, and the module stability index as the attributes, and the inter-module call relationship, the data transmission volume, and the inter-module dependency relationship as the relationship; In the indicator layer, the operation or data processing module is taken as a node, the operation type, data format, performance indicator, and running status are taken as attributes, and the module data transmission, logical dependency, and communication relationship between the operation module and the monitoring or scheduling module are taken as relationships to construct a micro subgraph.
6. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 5, characterized in that: Establishing an inclusion relationship or energy transmission relationship between the system-level node and the subsystem-level node between the system layer and the component layer; Between the component layer and the indicator layer, an ownership relationship or an operation control relationship between the subsystem-level nodes and the component nodes is established.
7. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 1, characterized in that: Preprocessing the target user terminal data and the knowledge graph data respectively includes: Removing invalid data, denoising and normalizing the software configuration information and component performance data; The knowledge graph data is converted into vector form.
8. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 1, characterized in that: The training steps of the hierarchical prediction model include: Obtain software configuration information and component performance data of a large number of user terminals, as well as basic data of the hierarchical knowledge graph model; the software configuration information and component performance data of each user terminal corresponds to a knowledge graph level; Preprocessing the acquired data; The preprocessed software configuration information and component performance data of all user terminals are taken as input, and the corresponding knowledge graph levels are used as labels to train the hierarchical prediction model.
9. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 1, characterized in that: The training step of the user terminal performance prediction model includes: Obtain software configuration information and component performance data for a large number of user terminals; Preprocessing the acquired data; Obtaining a terminal performance level corresponding to each user terminal according to the preprocessed software configuration information and component performance data of each user terminal; The preprocessed software configuration information and component performance data are used as input, and the corresponding terminal performance level is used as a label to train the user terminal performance prediction model.
10. The method for adaptively constructing a knowledge graph based on hierarchical representation and deep learning model according to claim 1, characterized in that: The training steps of the prediction model of the knowledge graph construction method include: Obtain terminal performance results corresponding to a large number of user terminals; Acquire knowledge graph data from the constructed hierarchical knowledge graph model; the knowledge graph data includes entities and relationships, as well as user query patterns; Determine the knowledge graph construction mode corresponding to each user terminal based on the acquired data; The terminal performance results and knowledge graph data are used as input, and the knowledge graph construction mode is used as a label to train the knowledge graph construction mode prediction model.
Citation Information
Cited By
Knowledge graph-based low-code data configuration and interaction method and system
CN121300843A