Data, software and user association knowledge graph construction method
By constructing a knowledge graph linking data, software, and users, the problem of neglecting the relationship between software and data was solved, enabling a comprehensive understanding of the data that software depends on and system optimization, thereby improving maintenance efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINESE PEOPLES LIBERATION ARMY UNIT 91977
- Filing Date
- 2025-12-15
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, the relationship between software and data has not been adequately considered, resulting in a lack of clarity regarding which data the software uses and how users use the data. Data updates and software upgrades lack targeted testing, which affects the maintenance and optimization of software systems.
Construct a knowledge graph linking data, software, and users. By building a software module dataset, training a text recognition model for the software modules, obtaining target text data information, extracting entity, relationship, and attribute information, generating a software module tree, and displaying the relationships between data, software, and users.
It enables a comprehensive understanding of software dependency data, improves maintenance efficiency and system reliability, accurately locates faults, reduces training costs and the probability of online incidents, and drives system optimization.
Smart Images

Figure CN121880573A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data management and knowledge graph technology, and in particular to a method for constructing a knowledge graph that associates data, software, and users. Background Technology
[0002] With the rapid development of big data technology, the scale of industry data has grown exponentially, and various types of data have converged to form big data resource pools. Based on these pools, various data services and applications have become increasingly abundant. However, in practical use, software often focuses on improving software functionality, user experience, and user satisfaction. Big data resource pools, on the other hand, emphasize data governance to improve data quality and usability. Little attention is paid to the relationship between the software and the data used, or how users actually use the data. As the scale and types of software accessing data gradually increase, problems arise such as a lack of clarity regarding which data the software uses, how users use the software, and the baseline data usage. Furthermore, testing during data updates and software upgrades lacks specificity. Summary of the Invention
[0003] The technical problem to be solved by this invention is to provide a method for constructing a knowledge graph that associates data, software, and users. The method constructs a knowledge graph based on entity objects and information accessed by software, which supports the intuitive display of the relationship between data, software, and users. This helps to effectively understand which data the software uses and how users use the software and data, and provides effective support for the maintenance and optimization of complex software systems.
[0004] To address the aforementioned technical problems, this invention discloses a method for constructing a knowledge graph linking data, software, and users, the method comprising: S1, Construct a software module dataset; the software module dataset includes a training set, a validation set, and a test set; S2, using the software module dataset, train the preset pre-trained model to obtain the software module text recognition model; S3, acquire target text data information; the target text data information includes software design documents, user manuals, and programmer manuals; S4, using the text recognition model of the software module, the target text data information is processed to obtain the software module tree; S5, process the software module tree to obtain a knowledge graph relating data, software and users; S6. Display the data, software, and user-related knowledge graph to obtain a visual display result.
[0005] As an optional implementation, in this embodiment of the invention, the construction of the software module dataset includes: S11, Obtain relevant text data and information about industry software; The relevant textual data and information of the industry software include software design documents, user manuals, and programmer manuals for developers. S12, preprocess the relevant text data information of the industry software to obtain preprocessed text data information; S13, process the preprocessed text data to obtain the software module dataset.
[0006] As an optional implementation, in this embodiment of the invention, the preprocessing of the relevant text data information of the industry software to obtain preprocessed text data information includes: S121, perform data cleaning on the relevant text data information of the industry software to obtain cleaned text data information; S122, normalize the cleaned text data information to obtain normalized text data information; S123, perform structuring processing on the normalized text data information to obtain structured text data information; S124, the structured text data is segmented to obtain preprocessed text data.
[0007] As an optional implementation, in this embodiment of the invention, processing the preprocessed text data to obtain a software module dataset includes: S131, The preprocessed text data information is processed to obtain a tag vector; S132, using the label vector, the preprocessed text data information is labeled to obtain labeled text data information; S133, Integrate the labeled text data and the label vector to obtain the software module dataset; S134, the software module dataset is divided into training set, validation set and test set.
[0008] As an optional implementation, in this embodiment of the invention, training a pre-trained model using the software module dataset to obtain a software module text recognition model includes: S21, Process the labeled text data information in the training set of the software module to obtain word vectors; S22, Process the word vectors to obtain a tag matrix; S23, using the training set, train the preset pre-trained model to obtain the text recognition model of the software module.
[0009] As an optional implementation, in this embodiment of the invention, the step of processing the target text data information using the software module text recognition model to obtain a software module tree includes: S41, using the text recognition model of the software module, information processing is performed on the target text data to obtain multi-dimensional extracted information; the multi-dimensional extracted information includes entity information, relationship information and attribute information; S42, the multi-dimensional extracted information is processed in a structured manner to obtain a software module tree.
[0010] As an optional implementation, in this embodiment of the invention, the step of using the text recognition model of the software module to process the target text data information to obtain multi-dimensional extracted information includes: S411, Entity extraction is performed on the target text data information to obtain entity information; S412, perform relation extraction on the target text data information to obtain relation information; S413, extract attributes from the target text data to obtain attribute information.
[0011] As an optional implementation, in this embodiment of the invention, the step of structuring the multi-dimensional extracted information to obtain a software module tree includes: S421, The entity information is processed to obtain a software module tree node; the software module tree node includes a root node, first-level child nodes, second-level child nodes, and leaf nodes; S422, Match the software module tree nodes with the relationship information and the attribute information to obtain the software module tree.
[0012] As an optional implementation, in this embodiment of the invention, processing the software module tree to obtain a knowledge graph relating data, software, and users includes: S51, obtain user and software access information for data; S52, process the user and software access information to the data to obtain an entity set and a relationship set; the entity set includes data entities, software module entities, and user entities; the relationship set includes the association relationship between data and software functional modules, and the association relationship between users and software functional modules.
[0013] S53, process the software module tree, the entity set, and the relationship set to obtain a knowledge graph relating data, software, and users.
[0014] As an optional implementation, in this embodiment of the invention, the processing of the user and software access information to obtain an entity set and a relationship set includes: S521, Process the user and software access information to obtain data entities; S522, Process the nodes in the software module tree to obtain the software module entity; S523, extract user information from the user and software's access information to data to obtain user entities; the user information includes user name, user role and user ID; S524, based on the user and software's access information to the data, associate the data entity and the software module entity, and associate the software module entity with the software module tree as the connection node to obtain the association relationship between the data and the software functional modules; S525, based on the user and software's access information to data, associate the user entity and the software module entity, and associate the software module entity with the software module tree using the software module entity as the connection node, to obtain the association relationship between the user and the software functional module.
[0015] As an optional implementation, in this embodiment of the invention, processing the user and software's access information to obtain data entities includes: S5211, Identify the user and software's access information to the data to obtain a unique identifier for the data entity; S5212, Process the unique identifier of the data entity to obtain the attribute value of the data entity; S5213, Process the attribute values of the data entity to obtain the data entity.
[0016] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: 1. Achieve comprehensive control over "software-dependent data" to improve maintenance efficiency. Dependency visualization: The "dependency" or "call" relationship between "software" entities and "data" entities is made explicit and visualized through knowledge graphs.
[0017] Precise location and rapid troubleshooting: When the software encounters data-related faults or performance bottlenecks, the underlying data source that may be problematic can be quickly located based on the graph, which can greatly shorten the troubleshooting time.
[0018] Improved maintenance efficiency: When new members join the company or during system handover, they can quickly understand the system architecture, reducing the cost of personnel training and knowledge transfer.
[0019] 2. Enable precise analysis of the impact of data version changes, thereby improving system reliability. Proactive impact analysis: Before implementing changes, reverse tracing analysis can be performed on the data entities to be changed in the graph.
[0020] Precise communication and collaboration: Based on precise impact analysis, only the development teams that are truly affected can be notified, avoiding information overload and improving the efficiency of cross-team collaboration.
[0021] Reduce deployment risks: By identifying all potential risk points in advance, more comprehensive change and testing plans can be developed, significantly reducing the probability of online incidents caused by data changes, thereby improving the reliability of the entire software system.
[0022] 3. Achieve in-depth insights into "user access patterns" to drive system optimization. By introducing "user" (or user role) entities into the graph and associating them with the software and data they "access," we can analyze the usage habits and business operation processes of different user groups, identify the data and software modules that users access most frequently, and then perform targeted performance tuning and caching strategy optimization. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating a method for constructing a knowledge graph relating data, software, and users, as disclosed in an embodiment of the present invention. Figure 2 This is a flowchart illustrating another method for constructing a knowledge graph relating data, software, and users, as disclosed in an embodiment of the present invention. Figure 3 This is the model training and software module tree construction process disclosed in the embodiments of the present invention; Figure 4 This is the data-software-user association knowledge graph construction process disclosed in the embodiments of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0028] In all embodiments of the present invention, the variables involved in all computational expressions or mathematical functions are dimensionless before calculation. The values of the independent variables in all computational expressions or mathematical functions in these embodiments conform to the reasonable requirements of the input range of the computational expression or mathematical function, ensuring that the computational expression or mathematical function can be calculated smoothly without violating physical laws or mathematical rules.
[0029] This invention discloses a method for constructing a knowledge graph relating data, software, and users. The method includes: constructing a software module dataset; the software module dataset includes a training set, a validation set, and a test set; training a pre-trained model using the software module dataset to obtain a software module text recognition model; acquiring target text data information; the target text data information includes software design documents, user manuals, and programmer manuals; processing the target text data information using the software module text recognition model to obtain a software module tree; processing the software module tree to obtain a knowledge graph relating data, software, and users; and displaying the knowledge graph to obtain a visualization result. This invention significantly improves the efficiency and reliability of software maintenance and upgrade management, providing effective support for the maintenance and optimization of complex software systems. Detailed explanations follow.
[0030] Example 1 Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for constructing a knowledge graph relating data, software, and users, as disclosed in an embodiment of the present invention. Figure 1 The described method for constructing a knowledge graph relating data, software, and users is applied in the fields of big data management and knowledge graph technology, and the embodiments of this invention are not limited thereto. Figure 1 As shown, the method for constructing a knowledge graph linking data, software, and users can include the following operations: S1, Construct a software module dataset; the software module dataset includes a training set, a validation set, and a test set; S2, using the software module dataset, train the preset pre-trained model to obtain the software module text recognition model; S3, acquire target text data information; the target text data information includes software design documents, user manuals, and programmer manuals; S4, using the text recognition model of the software module, the target text data information is processed to obtain the software module tree; S5, process the software module tree to obtain a knowledge graph relating data, software and users; S6. Display the data, software, and user-related knowledge graph to obtain a visual display result.
[0031] Optionally, the software module dataset includes: S11, Obtain relevant text data and information about industry software; The relevant textual data and information of the industry software include software design documents, user manuals, and programmer manuals for developers. S12, preprocess the relevant text data information of the industry software to obtain preprocessed text data information; S13, process the preprocessed text data to obtain the software module dataset.
[0032] Optionally, the preprocessing of the relevant text data information of the industry software to obtain preprocessed text data information includes: S121, perform data cleaning on the relevant text data information of the industry software to obtain cleaned text data information; S122, normalize the cleaned text data information to obtain normalized text data information; S123, perform structuring processing on the normalized text data information to obtain structured text data information; S124, the structured text data is segmented to obtain preprocessed text data.
[0033] Optionally, the process of processing the preprocessed text data to obtain the software module dataset includes: S131, The preprocessed text data information is processed to obtain a tag vector; The preprocessed text data is labeled to obtain a set of positive label sequences Y; Perform hierarchical clustering (such as CF-IDF-based hierarchical clustering) on the positive label sequence to divide the positive label sequence into core labels and related labels; The Skip-gram model is used to train the label embeddings to obtain the label embedding vectors; each label is treated as a word, and the core labels in the label set sequence are regarded as its context. During training, the goal of the model is to minimize the loss function, which is defined as the negative log-likelihood function: The Sigmoid function maps input values to the (0,1) interval for probability calculation. This is the embedding vector corresponding to the current label (i.e., the vector representation of the trained label). To and Embedding vectors corresponding to positive sample labels in the same label sequence (i.e., other label vectors belonging to the same set of positive labels for text samples); for The semantic similarity between them can be calculated using cosine similarity. Let K be the embedding vector corresponding to the negative sample label (i.e., the label vector that does not belong to the set of positive labels of the current text sample), and K be the number of labels. express The semantic distance is not limited in its calculation in this embodiment; The model parameters are updated using gradient descent to minimize the loss function. Specifically, for each label, the model predicts its context label and calculates the predicted probability. Then, by comparing the predicted probability with the actual label, the loss is calculated and the model parameters are updated.
[0034] The input consists of a training dataset containing preprocessed text data and its corresponding tag set. Then, the co-occurrence frequency (CF) of each tag with other tags is calculated, i.e., the number of times they appear together in the same document. The inverse document frequency (IDF) of each tag is calculated, reflecting the rarity of the tag in the entire document set; subsequently, the CF and IDF are combined to obtain the CF-IDF value, which measures the relevance between tags. Let N be the number of times the tag appears in the same document, and let N be the total number of times. For tags j The number of times it appears in the entire document collection. For tags i , j CF-IDF value, For tags i , j CF value, For tags j The IDF value is obtained; the CF-IDF value is fused with the label embedding vector by weighted summation to obtain the label vector.
[0035] S132, using the label vector, the preprocessed text data information is labeled to obtain labeled text data information; S133, Integrate the labeled text data and the label vector to obtain the software module dataset; S134, the software module dataset is divided into training set, validation set and test set.
[0036] Optionally, the step of training a pre-trained model using the software module dataset to obtain a text recognition model for the software module includes: S21, Process the labeled text data information in the training set of the software module to obtain word vectors; S22, Process the word vectors to obtain a tag matrix; S23, using the training set, train the preset pre-trained model to obtain the text recognition model of the software module.
[0037] Optionally, the step of processing the target text data information using the software module text recognition model to obtain a software module tree includes: S41, using the text recognition model of the software module, information processing is performed on the target text data to obtain multi-dimensional extracted information; the multi-dimensional extracted information includes entity information, relationship information and attribute information; S42, the multi-dimensional extracted information is processed in a structured manner to obtain a software module tree.
[0038] Optionally, the step of using the text recognition model of the software module to process the target text data to obtain multi-dimensional extracted information includes: S411, Entity extraction is performed on the target text data information to obtain entity information; S412, perform relation extraction on the target text data information to obtain relation information; S413, extract attributes from the target text data to obtain attribute information.
[0039] Optionally, the step of structuring the extracted multi-dimensional information to obtain a software module tree includes: S421, The entity information is processed to obtain a software module tree node; the software module tree node includes a root node, first-level child nodes, second-level child nodes, and leaf nodes; S422, Match the software module tree nodes with the relationship information and the attribute information to obtain the software module tree.
[0040] Optionally, processing the software module tree to obtain a knowledge graph relating data, software, and users includes: S51, obtain user and software access information for data; S52, process the user and software access information to the data to obtain an entity set and a relationship set; the entity set includes data entities, software module entities, and user entities; the relationship set includes the association relationship between data and software functional modules, and the association relationship between users and software functional modules.
[0041] S53, process the software module tree, the entity set, and the relationship set to obtain a knowledge graph relating data, software, and users.
[0042] Optionally, the processing of the user and software's access information to the data to obtain an entity set and a relationship set includes: S521, Process the user and software access information to obtain data entities; S522, Process the nodes in the software module tree to obtain the software module entity; S523, extract user information from the user and software's access information to data to obtain user entities; the user information includes user name, user role and user ID; S524, based on the user and software's access information to the data, associate the data entity and the software module entity, and associate the software module entity with the software module tree as the connection node to obtain the association relationship between the data and the software functional modules; S525, based on the user and software's access information to data, associate the user entity and the software module entity, and associate the software module entity with the software module tree using the software module entity as the connection node, to obtain the association relationship between the user and the software functional module.
[0043] Optionally, the processing of the user and software's access information to obtain data entities includes: S5211, Identify the user and software's access information to the data to obtain a unique identifier for the data entity; S5212, Process the unique identifier of the data entity to obtain the attribute value of the data entity; S5213, Process the attribute values of the data entity to obtain the data entity.
[0044] As can be seen, the present invention designs and proposes a method for constructing a knowledge graph based on entity objects and related data, software, and users. This method can construct a knowledge graph with entity objects as the core and information based on software access data. It supports the intuitive display of the relationship between data, software, and users, and helps to effectively understand which data the software uses and how users use the software and data. This provides effective support for the maintenance and optimization of complex software systems.
[0045] Example 2 Please see Figure 2 , Figure 2 This is a flowchart illustrating another method for constructing a knowledge graph relating data, software, and users, as disclosed in an embodiment of the present invention. Figure 2 The described method for constructing a knowledge graph relating data, software, and users is applied in the fields of big data management and knowledge graph technology, and the embodiments of this invention are not limited thereto. Figure 2 As shown, the method for constructing a knowledge graph linking data, software, and users can include the following operations: The purpose of this invention is to provide a method for constructing a knowledge graph based on entity objects, relating data, software, and users, supporting the establishment of such a knowledge graph. Figure 2 As shown.
[0046] Step 1: Establish a training set for software modules. Collect comprehensive textual data related to industry software, standardize and annotate the raw text data, focusing the annotations on software module-related information to form a standardized training set of software module texts.
[0047] Step 2: Training the software module text recognition model. Considering the specialized characteristics of software-related text, a natural language processing model that has undergone large-scale pre-training on a general corpus is selected. Using the text training set obtained in Step 1 as input data, the selected pre-trained model is fine-tuned. After optimization through methods such as supplementing samples and adjusting parameters, a stable software module text recognition model is finally formed.
[0048] Step 3: Construct the software module tree. Input the target text, such as software design documents, user manuals, and programmer manuals, into the S2 software module text recognition model to complete entity extraction, relation extraction, and attribute extraction. The extracted software module entities, attribute information, and functional hierarchy relationships are then structured and organized to generate a software module tree.
[0049] Step 4: Collect user and software access information for the data. Deploy a data access middleware between the software accessing the data and the big data resource pool. The software calls this middleware, which collects and stores data access requests and related user information.
[0050] Step 5: Define data entities, software module entities, user entities, and their corresponding relationships. Define the data entities, software module entities, user entities, and the relationships between data and software functional modules, as well as the relationships between users and software functional modules, to represent information related to data, software, and users.
[0051] Step 6: Construct a data-software-user association knowledge graph. The data access information stored in Step 4 is parsed, and relevant entities and relationships are extracted. These are then associated with the software module tree to generate a data-software-user association knowledge graph.
[0052] Step 7: Visualization of the Data-Software-User Relationship Knowledge Graph. Data entities, software module entities, and user entities are represented using nodes in the knowledge graph, displayed with different colors, node sizes, and node properties. The relationships between data and software modules, and between users and software modules, are represented using edges in the knowledge graph, displayed with gradient colors and varying thicknesses. Figure 3is the model training and software module tree construction process of the present invention, Figure 4 is the data-software-user associated knowledge graph construction process of the present invention.
[0053] The specific implementation manner of the present invention includes the following steps: Step 1: Establish a software module training set (1) Wide text collection: Comprehensively collect relevant text materials of industry software, including software design documents (such as general design, detailed design, etc.), user-oriented operation manuals, programmer manuals for developers, etc., to ensure that the data can completely cover the descriptions related to the design, use, and development of software modules, and provide guarantee for the comprehensiveness of the training set.
[0054] (2) Data normalization and cleaning: Perform standardized preprocessing on the collected original text data to eliminate data noise and unify the data format. The specific cleaning operations include: removing duplicate documents and invalid documents (such as documents with damaged formats and incomplete contents); normalizing the text format, converting documents in different formats (such as PDF, Word, TXT) into a unified text format; performing basic natural language processing operations such as Chinese word segmentation, stop word removal (such as words without actual semantic meaning like "of", "and", etc.), and special character filtering (such as punctuation marks, format markers) to obtain structured pure text data; reasonably segmenting long texts to ensure that the semantic of a single segment is complete and the length is suitable for subsequent annotation and model input requirements.
[0055] (3) Manual annotation and establishment of the training set: Manually annotate the text, and the annotation content focuses on software module-related information, including software module entities, module attributes, and the association relationships between modules. Adopt a quality control mechanism of "double annotation + cross-verification", and conduct collective review on the samples with annotation differences to ensure that the annotation accuracy meets the requirements of model training (preferably not less than 95%). Divide the annotated text data into training set, validation set, and test set according to a preset ratio (such as 7:2:1), and finally form a standardized software module text training set.
[0056] Step 2: Training of the software module text recognition model (1) Selection and adaptation of the pre-trained model: In view of the professional characteristics of software domain texts, select natural language processing models (such as BERT, RoBERTa, etc.) that have completed large-scale pre-training on a general corpus as the basic model. Such models have strong semantic understanding and feature extraction capabilities and can be quickly adapted to specific tasks of software module recognition through subsequent fine-tuning.
[0057] (2) Model fine-tuning training implementation: Using the text training set obtained in step 1 as input data, fine-tuning training is performed using the selected pre-trained model. First, the labeled text is converted into an input format that the model can recognize (e.g., word vectors are generated through word segmentation and a label matrix is constructed by combining the labeled information); reasonable training parameters are set, and the prediction error is calculated using the cross-entropy loss function; the training process is monitored in real time using the validation set, and training is stopped when the model performance tends to stabilize or reaches the preset index, and the optimal model parameters are saved.
[0058] (3) Model evaluation and validation: The trained model was evaluated using a test set. The core evaluation metrics included accuracy and recall to ensure that the model met the performance standards for the software module recognition task. For the weaknesses found in the evaluation, optimization was carried out by supplementing samples and adjusting parameters, and finally a stable software module text recognition model was formed.
[0059] Step 3: Construct the software module tree (1) Multi-dimensional information extraction: Input the target texts such as software design documents, user manuals, and programmer manuals into the software module text recognition model in step 2, and automatically complete the three core extractions: 1) Entity extraction: Accurately identify entities in software modules (such as "login module" and "data analysis module"); 2) Relationship Extraction: Extract the hierarchical relationships between software modules (e.g., the "Data Governance Module" includes the "Data Processing Module" and the "Data Transformation Module"). 3) Attribute extraction: Obtain the core attributes of software module entities, including functional descriptions, dependent modules, etc.
[0060] (2) Software module tree generation: The extracted software module entities, attribute information and functional hierarchy relationships are structured and organized. The entire software is the root node, the top-level module is the first-level child node, the subordinate sub-modules are the second-level child nodes, and the bottom-level functions are the leaf nodes. The module attribute information is associated with the corresponding nodes to form complete node data of "node identifier-module name-functional description-hierarchical relationship".
[0061] Step 4: Collect user and software access information for the data A data access middleware is deployed between the software accessing the data and the big data resource pool. The software calls the middleware, providing data access requests and user information (user name, user role, user ID) of the software user. The middleware adapts and forwards the data access requests according to the storage characteristics of the big data resource pool being accessed, and collects and stores the data access requests and related user information.
[0062] Step 5: Define data entities, software module entities, user entities, and their corresponding relationships. Define data entities, software module entities, user entities, and the relationships between data and software functional modules, as well as the relationships between users and software functional modules, to represent relevant information about data, software, and users.
[0063] 1) Entity type Data entities: Describe the basic attributes of data, such as data name (e.g., table name, file name), data type (structured table, log file, etc.), and storage location (HDFS path, database instance).
[0064] Software module entity: Describes detailed information about the software's functional modules, such as module name, hierarchical position, etc.
[0065] User entity: Describes user information, such as user name, user role, user ID, etc.
[0066] 2) Types of Association The relationship between data and software functional modules: the data access to software functional modules, including the number of calls and the call time.
[0067] The relationship between users and software functional modules: information on user usage of software functional modules, including usage duration and frequency.
[0068] Step 6: Construct a knowledge graph linking data, software, and users. The data access information stored in step 4 is parsed and relevant entities and relationships are extracted. These are then associated with the software module tree to generate a data-software-user association knowledge graph.
[0069] (1) Data Entities The unique identifier of the data entity is identified from the data access information, and the relevant attribute values are extracted to generate the data entity.
[0070] 1) Unique identifier for identifying data entities Structured data (such as database tables and data warehouse tables): Extract the "storage location + data name" as a unique identifier from the access path or SQL statement. For example, extract the storage location mysql: / / dbhost / order_db and the data name t_order from jdbc:mysql: / / dbhost / order_db.t_order, and combine them into a unique identifier mysql: / / dbhost / order_db.t_order.
[0071] Unstructured data (such as files and logs): Use the complete storage path as a unique identifier. For example, directly extract the unique identifier hdfs: / / cluster / log / app / 20231001.log from hdfs: / / cluster / log / app / 20231001.log.
[0072] API returned data (such as datasets returned by REST interfaces): uniquely identified by the API path plus the data identifier. For example, extracting http: / / apihost / userinfo from http: / / apihost / userinfo?userid=1 as the data name, combined with the data source apihost, results in the unique identifier api: / / apihost / userinfo.
[0073] 2) Set the attribute values of the data entity The data name attribute in a data entity extracts the finest-grained name from the unique identifier as the attribute value (e.g., t_order, 20231001.log, userinfo).
[0074] The data type attribute in the data entity is set with corresponding values according to the access method or path characteristics: files with suffixes such as .csv, .json, and .log are set to "unstructured files"; database table names (such as db.t_table) are set to "structured tables"; and API interface paths are set to "API datasets".
[0075] The storage location attribute in a data entity uses the part of the unique identifier other than the data name as the attribute value, such as mysql: / / dbhost / order_db, hdfs: / / cluster / log / app, api: / / apihost.
[0076] (2) Software module entity The software module entity corresponds to the node in the software module tree in step 3. Its extraction requires combining the "access source identifier" captured by the middleware with the hierarchical structure of the software module tree to locate the module's position in the tree and fill in its attributes.
[0077] 1) Locating the node of the module in the software module tree If the access request captured by the middleware typically contains an identifier for a software module (such as the X-Module-Name header in an HTTP request or the module_id field in an RPC call), it can be directly matched with the "module name" in the software module tree to determine its position in the tree. For example, if the middleware captures an X-Module-Name: Order Query software module, and this node exists in the software module tree, then that node will be located.
[0078] If the access source does not have a direct module name, it can be deduced through the mapping relationship between the interface path and the software module tree. For example, if the interface path / order / manage / query corresponds to the node "e-commerce system → order system → order management module → query submodule" in the software module tree, then that node can be located.
[0079] 2) Populate the attributes of the software module entity. The data name attribute in the software module entity directly adopts the name of the node in the software module tree (such as "order query submodule").
[0080] The hierarchical position attribute in a software module entity is represented by the path "root node → parent node → current node", for example, "e-commerce system → transaction module → order management module → order query sub-module".
[0081] (3) User entity The software provides the middleware with the username, user role, and user ID as attributes.
[0082] (4) The relationship between data and software modules Based on data access information, relationships are established between corresponding data entities and software module entities, and these relationships are linked to the software module tree using software module entities as connection nodes. Relationship attributes include call count, single call duration, call success rate, and most recent call time. Weights are assigned to the relationships based on these attributes to reflect the "strength of dependency" or "tightness of access" of the software modules to the data. Weights Calculation method: =(Number of calls × 0.5) + (Total call duration × 0.3) + (Call frequency in the last 30 days × 0.2), where the coefficients 0.5, 0.3, and 0.2 can be adjusted according to the actual business situation.
[0083] (5) The relationship between users and software modules Based on data access information, establish relationships between corresponding user entities and software module entities, and associate them with the software module tree using the software module entity as the connection node. Relationship attributes include usage duration, usage frequency, operation type (e.g., query / modify), and last usage time. Weights are assigned to the relationships based on these attributes. This reflects the user's "dependency" or "activity" with the software module. The weighting method is as follows: =(Total usage time × 0.4) + (Usage frequency × 0.3) + (Operation complexity coefficient × 0.2) + (Number of uses in the last 7 days × 0.1), where the coefficients 0.4, 0.3, 0.2, and 0.1 can be adjusted according to the actual business situation.
[0084] The coefficient 1.2 can be adjusted according to actual business needs.
[0085] Step 7: Visualization of the Data-Software-User Related Knowledge Graph (1) Data entities, software module entities, and user entities are represented using knowledge graph nodes and displayed with different colors, node sizes, and node properties.
[0086] Node colors: Data entity nodes are displayed in blue, functional module nodes are displayed in green, and user entity nodes are displayed in orange.
[0087] Node size: The size of a node corresponds to the importance of the entity or how frequently it is accessed.
[0088] Node shape: Design different shapes for different entity types, such as circular for root nodes and rectangular for module nodes.
[0089] (2) The relationship between data and software modules, and the relationship between users and software modules are represented by the edges of the knowledge graph, and displayed using gradient colors and different thicknesses.
[0090] Edge color: Darker colors indicate more frequent use or access; Edge thickness: Edges that are called more frequently are thicker.
[0091] As can be seen, the present invention designs and proposes a method for constructing a knowledge graph based on entity objects and related data, software, and users. This method can construct a knowledge graph with entity objects as the core and information based on software access data. It supports the intuitive display of the relationship between data, software, and users, and helps to effectively understand which data the software uses and how users use the software and data. This provides effective support for the maintenance and optimization of complex software systems.
[0092] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0093] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0094] Finally, it should be noted that the method for constructing a knowledge graph related to data, software, and users disclosed in the embodiments of this invention is merely a preferred embodiment of the invention and is only used to illustrate the technical solutions of the invention, not to limit it. Although the invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this invention.
Claims
1. A method for constructing a knowledge graph relating data, software, and users, characterized in that, The method includes: S1, Construct a software module dataset; the software module dataset includes a training set, a validation set, and a test set; S2, using the software module dataset, train the preset pre-trained model to obtain the software module text recognition model; S3, acquire target text data information; the target text data information includes software design documents, user manuals, and programmer manuals; S4, using the text recognition model of the software module, the target text data information is processed to obtain the software module tree; S5, process the software module tree to obtain a knowledge graph relating data, software and users; S6. Display the data, software, and user-related knowledge graph to obtain a visual display result.
2. The method for constructing a knowledge graph relating data, software, and users according to claim 1, characterized in that, The dataset for constructing software modules includes: S11, Obtain relevant text data and information about industry software; The relevant textual data and information of the industry software include software design documents, user manuals, and programmer manuals for developers. S12, preprocess the relevant text data information of the industry software to obtain preprocessed text data information; S13, process the preprocessed text data to obtain the software module dataset.
3. The method for constructing a knowledge graph relating data, software, and users according to claim 2, characterized in that, The preprocessing of relevant text data information of the industry software to obtain preprocessed text data information includes: S121, perform data cleaning on the relevant text data information of the industry software to obtain cleaned text data information; S122, normalize the cleaned text data information to obtain normalized text data information; S123, perform structuring processing on the normalized text data information to obtain structured text data information; S124, the structured text data is segmented to obtain preprocessed text data.
4. The method for constructing a knowledge graph relating data, software, and users according to claim 2, characterized in that, The process of processing the preprocessed text data to obtain the software module dataset includes: S131, The preprocessed text data information is processed to obtain a tag vector; S132, using the label vector, the preprocessed text data information is labeled to obtain labeled text data information; S133, Integrate the labeled text data and the label vector to obtain the software module dataset; S134, the software module dataset is divided into training set, validation set and test set.
5. The method for constructing a knowledge graph relating data, software, and users according to claim 1, characterized in that, The step of training a pre-trained model using the software module dataset to obtain a text recognition model for the software module includes: S21, Process the labeled text data information in the training set of the software module to obtain word vectors; S22, Process the word vectors to obtain a tag matrix; S23, using the training set, train the preset pre-trained model to obtain the text recognition model of the software module.
6. The method for constructing a knowledge graph relating data, software, and users according to claim 1, characterized in that, The process of using the text recognition model of the software module to process the target text data information to obtain a software module tree includes: S41, using the text recognition model of the software module, information processing is performed on the target text data to obtain multi-dimensional extracted information; the multi-dimensional extracted information includes entity information, relationship information and attribute information; S411, Entity extraction is performed on the target text data information to obtain entity information; S412, perform relation extraction on the target text data information to obtain relation information; S413, extract attributes from the target text data information to obtain attribute information; S42, the multi-dimensional extracted information is processed in a structured manner to obtain a software module tree.
7. The method for constructing a knowledge graph relating data, software, and users according to claim 5, characterized in that, The step of structuring the extracted multi-dimensional information to obtain a software module tree includes: S421, The entity information is processed to obtain a software module tree node; the software module tree node includes a root node, first-level child nodes, second-level child nodes, and leaf nodes; S422, Match the software module tree nodes with the relationship information and the attribute information to obtain the software module tree.
8. The method for constructing a knowledge graph relating data, software, and users according to claim 1, characterized in that, The process of processing the software module tree to obtain a knowledge graph relating data, software, and users includes: S51, obtain user and software access information for data; S52, process the user and software access information to data to obtain an entity set and a relationship set; the entity set includes data entities, software module entities, and user entities; the relationship set includes the association relationship between data and software functional modules, and the association relationship between users and software functional modules; S53, process the software module tree, the entity set, and the relationship set to obtain a knowledge graph relating data, software, and users.
9. The method for constructing a knowledge graph relating data, software, and users according to claim 8, characterized in that, The process of processing the user and software access information to obtain an entity set and a relationship set includes: S521, Process the user and software access information to obtain data entities; S522, Process the nodes in the software module tree to obtain the software module entity; S523, extract user information from the user and software's access information to data to obtain user entities; the user information includes user name, user role and user ID; S524, Based on the user and software's access information to the data, associate the data entity and the software module entity, and associate the software module entity with the software module tree as the connection node to obtain the association relationship between the data and the software functional modules; S525, based on the user and software's access information to data, associate the user entity and the software module entity, and associate the software module entity with the software module tree using the software module entity as the connection node, to obtain the association relationship between the user and the software functional module.
10. The method for constructing a knowledge graph relating data, software, and users according to claim 9, characterized in that, The process of processing the user and software access information to obtain data entities includes: S5211, Identify the user and software's access information to the data to obtain a unique identifier for the data entity; S5212, Process the unique identifier of the data entity to obtain the attribute value of the data entity; S5213, Process the attribute values of the data entity to obtain the data entity.