A file relationship mining method and device

CN122946602APending Publication Date: 2026-10-20BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510458631.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2026-10-20

AI Technical Summary

Benefits of technology

[0024]根据本发明实施例的第五方面,提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现本发明实施例第一方面提供的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005357044830000172
    Figure BDA0005357044830000172
  • Figure BDA0005357044830000174
    Figure BDA0005357044830000174
  • Figure BDA0005357044830000181
    Figure BDA0005357044830000181
Patent Text Reader

Abstract

This invention discloses a method and apparatus for file relationship mining, relating to the field of computer technology. One specific implementation of the method includes: acquiring various files within the project development lifecycle; mapping each file to graph nodes, and determining the connecting edges between graph nodes based on the content of each file; constructing a graph structure corresponding to the project based on each graph node and the connecting edges between them; determining the search start and end graph nodes in the graph structure, performing path search on the graph structure to obtain multiple result paths; selecting key paths from the result paths based on the correlation between the file content corresponding to the graph nodes in each result path, and mining target files with correlation relationships based on the graph nodes and connecting edges of the key paths. This implementation achieves efficient and accurate file relationship mining, analyzing each file in a graph structure manner, thus improving the accuracy and efficiency of the mining process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for mining file relationships. Background Technology

[0002] Throughout the entire project development lifecycle, various design-related project documents (such as product requirements, technical designs, code modifications, and test cases) are crucial for ensuring team collaboration, process standardization, and project quality. Besides providing essential project information, these documents also exhibit complex interrelationships. For instance, product requirements may be implemented through multiple technical designs, and each technical design may correspond to multiple code modifications and test cases. Especially when the project is large-scale and involves numerous documents, accurately identifying the key relationships and related target documents allows developers to focus on these relationships and target documents from a holistic project perspective, enabling applications such as test coverage checks and design-requirement consistency checks. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a file relationship mining method and apparatus, which realizes efficient and accurate file relationship mining. By analyzing each file in a graph structure, it not only improves accuracy but also increases mining efficiency. This makes it easier for R&D personnel to grasp the key relationships and related target files throughout the entire project development process, thereby better ensuring development quality.

[0004] To achieve the aforementioned objective, according to one aspect of the present invention, a document relationship mining method is provided, comprising:

[0005] Retrieve all files throughout the project development lifecycle;

[0006] Each file is mapped to a graph node, and the connection edges between the graph nodes are determined based on the content of each file. The graph structure corresponding to the project is constructed based on each graph node and the connection edges between them.

[0007] The search start node and search end node in the graph structure are determined, and a path search is performed on the graph structure to obtain multiple result paths. Based on the correlation between the file contents corresponding to the graph nodes in each result path, a key path is selected from each result path. Based on the graph nodes and connecting edges contained in the key path, target files with correlation relationships are mined.

[0008] Optionally, each of the files is mapped to a graph node, and the connection edges between the graph nodes are determined according to the content of each of the files. The graph structure corresponding to the project is constructed based on each graph node and the connection edges between them, including: for each file: determining the corresponding graph node identifier based on the file identifier of the file, and mapping the file to a graph node with the graph node identifier; for each graph node: obtaining the associated file identifier of the file associated with the graph node from the file corresponding to the graph node; finding the associated graph node that matches the associated file identifier, and establishing the connection edges between the graph node and the associated graph node; and using the connection graph formed by each graph node and the connection edges between the graph nodes as the graph structure.

[0009] Optionally, based on the correlation between the file contents corresponding to the graph nodes in each of the result paths, key paths are selected from each of the result paths, including: for each result path: according to a preset path correlation scoring strategy, the correlation value between the file contents corresponding to each adjacent graph node in the result path is calculated, thereby obtaining the path value of the result path; the result paths are sorted in descending order according to their corresponding path values, and a specified number of result paths are selected as the key paths starting from the front.

[0010] Optionally, a path search is performed on the graph structure to obtain multiple result paths; based on the correlation between the file contents corresponding to the graph nodes in each result path, a key path is selected from each result path, including: inputting the graph structure, as well as the search start graph node and search end graph node in the graph structure, into a pre-trained path selection model, and using the path search capability and path correlation scoring strategy of the path selection model to obtain the key path output by the path selection model.

[0011] Optionally, the path selection model is constructed based on a graph neural network model; the path selection model is trained by: based on a pre-constructed training dataset, updating the parameters of the path selection model by calculating the binary cross-entropy loss function of the path selection model, and obtaining the trained path selection model; the path relevance scoring strategy includes at least one of the following: a path graph node similarity scoring strategy, a path graph node importance scoring strategy, and a path length scoring strategy.

[0012] Optionally, determining the search start graph node and search end graph node in the graph structure includes: obtaining the intent for file relationship mining, identifying files with sequential influence relationships from the intent, and then determining the corresponding start file and end file; using the graph node corresponding to the start file as the search start graph node, and the graph node corresponding to the end file as the search end graph node.

[0013] Optionally, after acquiring various files throughout the project development lifecycle, the method further includes: performing data cleaning on the contents of the files and converting each file into a unified data format; after identifying target files with interrelationships, the method further includes: displaying the target files with interrelationships in a graphical manner and providing interactive tools to enable users to analyze the relationships between the target files.

[0014] Optionally, the files include: requirement files, design files, code modification files, and test case files; when the intent of the file relationship mining is test coverage, the method further includes: checking whether test case files exist in the target files; if the test case files do not exist in the target files, identifying the target files with related relationships as test blind spots; and generating recommended test cases based on at least one of the requirement files, design files, and code modification files in the target files, and pushing them to the test task interface.

[0015] According to a second aspect of the present invention, a document relationship mining apparatus is provided, comprising:

[0016] The file acquisition module is used to acquire various files throughout the project development lifecycle.

[0017] The graph structure construction module is used to map each of the files to graph nodes, determine the connection edges between the graph nodes based on the content of each of the files, and construct the graph structure corresponding to the project based on the graph nodes and the connection edges between them.

[0018] The file relationship determination module is used to determine the search start graph node and search end graph node in the graph structure, perform path search on the graph structure to obtain multiple result paths; select key paths from the result paths based on the correlation between the file contents corresponding to the graph nodes in each result path, and mine target files with correlation based on the graph nodes and connecting edges contained in the key paths.

[0019] According to a third aspect of the present invention, an electronic device for document relationship mining is provided, comprising:

[0020] One or more processors;

[0021] Storage device for storing one or more programs.

[0022] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiments of the present invention.

[0023] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the present invention.

[0024] According to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method provided in the first aspect of the present invention.

[0025] One embodiment of the invention has the following advantages or beneficial effects: It acquires various files throughout the project development lifecycle; maps each file to a graph node; determines the connecting edges between graph nodes based on the content of each file; constructs a graph structure corresponding to the project based on each graph node and the connecting edges between them; determines the search start and end graph nodes in the graph structure; performs path search on the graph structure to obtain multiple result paths; selects key paths from the result paths based on the correlation between the file content corresponding to the graph nodes in each result path; and mines target files with related relationships based on the graph nodes and connecting edges contained in the key paths. This technical solution achieves an efficient and accurate file relationship mining method. Analyzing each file in a graph structure not only improves accuracy but also increases mining efficiency, making it easier for R&D personnel to grasp the key relationships and related target files throughout the entire project development process, thereby better ensuring development quality. Attached Figure Description

[0026] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:

[0027] Figure 1 This is a schematic diagram of the main process of the document relationship mining method according to an embodiment of the present invention;

[0028] Figure 2 This is a flowchart of a document relationship mining method according to a possible embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of the diagram structure of an embodiment of the present invention;

[0030] Figure 4 This is a flowchart of a document relationship mining method according to another possible embodiment of the present invention;

[0031] Figure 5 This is a schematic diagram of the composition of a graph neural network according to an embodiment of the present invention;

[0032] Figure 6 This is a schematic diagram of the training process of the path selection model according to an embodiment of the present invention;

[0033] Figure 7 This is a schematic diagram of the overall process of file relationship mining according to an embodiment of the present invention;

[0034] Figure 8 This is a flowchart illustrating how an embodiment of the present invention applies target files with known relationships to a test coverage check.

[0035] Figure 9 This is a schematic diagram of the main modules of the document relationship mining device according to an embodiment of the present invention;

[0036] Figure 10 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0037] Figure 11 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation

[0038] It should be noted that the collection, updating, analysis, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate and reasonable purposes, and are not shared, disclosed, or sold outside of these legitimate uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken to selectively block the use or access to personal information data to prevent unauthorized access to such personal information data, ensure that personnel authorized to access personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Furthermore, once this user personal information data is no longer needed, the risk should be minimized by restricting or even prohibiting data collection and / or deleting the data.

[0039] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0040] To accurately uncover key relationships between files and their associated target files, this invention proposes a file relationship mining method. Leveraging the efficiency and convenience of graph structure-based relationship filtering, a graph structure representing the relationships between files is generated based on their content throughout the project development lifecycle. Path searching is then performed on this graph structure, and path filtering is conducted using the correlation between the content of files corresponding to graph nodes along the path. Ultimately, key paths are identified, and target files with associated relationships are discovered. This method achieves efficient and accurate file relationship mining. Analyzing files using a graph structure not only improves accuracy but also increases mining efficiency. It allows developers or project stakeholders to grasp key relationships and associated target files throughout the entire project development process, thereby better ensuring development quality.

[0041] Figure 1 This is a schematic diagram of the main flow of the document relationship mining method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the file relationship mining method of this invention includes the following steps S101 to S103.

[0042] Step S101: Obtain all files throughout the project development lifecycle.

[0043] Specifically, in the process of project development and management, project documents are a crucial carrier throughout the entire lifecycle, used to standardize processes, record decisions, ensure collaboration, and control quality. When the project is large in scale, in order to facilitate project stakeholders to focus on the target documents with relatively important and critical relationships from a holistic perspective, this embodiment of the invention first needs to identify the project to which the document relationships to be explored belong. By using the project number, all documents with that project number are searched from the document resource library, such as various application documents from the project initiation stage and proposal documents from the project review stage.

[0044] According to one embodiment of the present invention, after obtaining various files throughout the project development lifecycle, the method further includes: performing data cleaning on the contents of the files and converting each file into a unified data format.

[0045] Specifically, considering the possibility of duplicate files among the obtained files—for example, different project participants creating two files with similar content, or two identical files existing due to changes in file template requirements—this invention first checks for duplicate files by comparing filenames and content. If duplicate files are found, they are deleted. Furthermore, this embodiment pre-configures necessary file attributes for each file, such as creation time and execution status, verifying that each file contains the necessary attributes. If any attributes are missing, default values ​​are used, or the creator adds the missing attributes to ensure the integrity of each file's content. Finally, the file format needs to be standardized for easier subsequent processing. This embodiment uses JSON format as the unified data format, converting each file into JSON data.

[0046] Step S102: Map each of the files to graph nodes, determine the connection edges between each graph node based on the content of each of the files, and construct the graph structure corresponding to the project based on each graph node and the connection edges between each graph node.

[0047] Specifically, this embodiment of the invention, based on a graph structure, facilitates the rapid and accurate discovery of hidden key and important relationships. Therefore, each file and its relationships are mapped to a graph structure. Each file serves as a node in the graph structure to be generated. By extracting the content from the files, the relationships between them are determined, and these relationships are graphically represented as connecting edges. These connecting edges have directions, the specific direction of which is determined based on the relationships between the files. For example, if file 3 is an implementation of file 1, then there is a connecting edge between the graph nodes of file 3 and the graph nodes of file 1, with the direction of the connecting edge pointing from file 1 to file 3. Finally, after traversing all the files, the resulting graph composed of nodes and connecting edges represents the graph structure representing the relationships between files throughout the entire project process.

[0048] Step S103: Determine the search start graph node and search end graph node in the graph structure, perform path search on the graph structure to obtain multiple result paths; select key paths from each result path based on the correlation between the file contents corresponding to the graph nodes in each result path, and mine target files with correlation based on the graph nodes and connecting edges contained in the key paths.

[0049] Specifically, before or after constructing the graph structure representing the relationships between the files, the project stakeholders (users) configured the scope of this relationship mining, which is the search start node and search end node in the graph structure, so that subsequent mining searches can be carried out with a focus and emphasis.

[0050] Furthermore, based on the determined start and end graph nodes, this embodiment of the invention invokes path search algorithms, such as Dijkstra's path planning algorithm based on a greedy strategy, or the A* sampling search algorithm, to perform path search on the graph structure, obtaining all connection paths from the start to the end graph node, which are the multiple result paths. For each result path, the closeness of the relationships between the contents of the files corresponding to the graph nodes within it is compared. Specifically, the repetition rate between file contents can be compared; for example, plagiarism detection software can be used to compare the closeness of the relationships between file contents. A higher repetition rate indicates a greater correlation between the two files. Finally, the correlation between graph nodes within each result path is compared, and a specified number of highly correlated result paths are selected as critical paths. The graph nodes and connecting edges contained in the critical paths are then translated into corresponding files, yielding target files with key and important relationships throughout the project process. This allows users to focus on analyzing key points requiring more attention in the project based on the discovered key relationships and target files, thereby better ensuring project quality.

[0051] According to one embodiment of the present invention, after mining target files that have a relationship, the method further includes: displaying the target files that have a relationship in a graphical manner and providing interactive tools to enable users to analyze the relationship between the target files.

[0052] Specifically, to further enhance the user experience and facilitate quick understanding of the discovered key relationships and target files, this embodiment of the invention, after identifying related target files, uses visualization tools to graphically display the key relationships in the discovered graph structure and the corresponding related target files on the user's page, thereby improving the visualization of the mining results. Furthermore, considering the potential for relatively complex relationships, this embodiment of the invention also provides users with corresponding interactive tools, such as selection and highlighting. Through these interactive tools, users can directly perform online visual analysis of the discovered key relationships and corresponding target files, providing a more user-friendly and visually intuitive experience.

[0053] This invention leverages the efficiency and convenience of graph structure-based relationship filtering. It transforms individual files and their relationships into a corresponding graph structure, then uses a graph path search method to identify multiple result paths. After filtering these paths, the key paths and their corresponding target files are finally obtained. Combined with file cleaning and standardization, and the visualization of the mining results, this invention provides users with a comprehensive, efficient, and accurate method for file relationship mining. Analyzing files using a graph structure not only improves accuracy but also increases mining efficiency. This allows developers to grasp key relationships and associated target files throughout the entire project development process, thereby better ensuring development quality.

[0054] Figure 2 This is a flowchart of a document relationship mining method according to a possible embodiment of the present invention. As another embodiment of the present invention, such as... Figure 2 As shown, the file relationship mining method may include:

[0055] Step S201: Obtain all files throughout the project development lifecycle.

[0056] Step S202: For each file: Determine the corresponding graph node identifier based on the file identifier of the file, and map the file to a graph node with the graph node identifier.

[0057] Specifically, based on the files obtained during the project development cycle, for each file, a file identifier ID is retrieved from the file's relevant information. Typically, the file identifier ID is a unique identifier for the file; however, there may be special cases. For example, in some management systems, different types of files may have duplicate identifiers, such as design scheme files and test files having the same file ID. Therefore, this embodiment of the invention directly uses the file identifier as the graph node identifier for unique file identifiers. For non-unique file identifiers, a hash function is called to generate a unique identifier based on the file identifier and its corresponding file type. This generated unique identifier is then used as the graph node identifier. The determined graph node identifier is used to name the graph node, thus achieving the mapping from files to graph nodes and obtaining the graph nodes corresponding to each file.

[0058] To enhance the visualization of the generated graph structure, this embodiment of the invention further defines the type of graph node according to the type of each file, and attaches the type of graph node to the graph node to enrich the representation information of the graph node. For example, product requirement documents, product design plan documents, etc., can be attached to the graph node in a specific way, either by text or by graphics, such as by using graph nodes of different colors or shapes to represent the corresponding types, so that users can clearly understand the type of file it represents through the graph node.

[0059] According to one embodiment of the present invention, the documents include: requirements documents, design documents, code modification documents, and test case documents.

[0060] For example, this embodiment of the invention takes four main types of files in the software project development lifecycle as examples: product requirement files for collecting product requirements and requirement change records; technical design files for collecting technical design schemes and design change records; code modification files for collecting commit records and code review records of the code version control system; and test case files for collecting test plans, test cases, and test results. Correspondingly, the mapped graph nodes are divided into requirement graph nodes, design graph nodes, code modification graph nodes, and test graph nodes.

[0061] Step S203: For each graph node: obtain the associated file identifier of the file associated with the graph node from the file corresponding to the graph node; find the associated graph node that matches the associated file identifier, and establish the connection edge between the graph node and the associated graph node.

[0062] Specifically, based on the graph nodes representing each file constructed above, this embodiment of the invention provides a method for determining the connection relationships between graph nodes. For each graph node, which represents a corresponding file, metadata such as information related to other files, a summary of the file, creation time, and file status are preferably represented as node attributes in the corresponding graph node. This facilitates quick determination of the connection relationships between graph nodes and improves the readability of the entire graph structure. Understandably, the graph node identifier mentioned above can also be considered an attribute of the graph node. The following examples, using requirement files, design files, code modification files, and test case files as examples, illustrate the attributes contained in the corresponding graph nodes.

[0063] For example, for a product requirement document, the corresponding graph node is a requirement class graph node. The node attributes of the requirement class graph node include: a unique requirement document identifier ID; requirement description (textual description of the requirement content); creation time (the creation time of the requirement document); status (the status of the requirement, such as pending, in progress, completed); priority (the priority of the requirement, such as high, medium, low).

[0064] For technical design documents, the corresponding diagram nodes are design class diagram nodes. The node attributes of design class diagram nodes include: a unique design document identifier ID; a design description (text describing the content of the design); a creation time (the creation time of the design document); a status (the status of the design, such as draft, under review, or approved); and the ID of the associated requirement document (the product requirement document ID corresponding to this design document).

[0065] For code modification files, the corresponding graph node is the code modification class graph node. The node attributes of the code modification class graph node include: a unique code modification file identifier ID; a submission description (text describing the purpose and content of this code modification submission); a submission time (the time when the code modification was submitted); a list of modified files (a list of modified files involved in this code modification submission); an associated design file ID (the design file ID corresponding to this code modification submission); and the number of code changes (the number of lines of code changed in this submission).

[0066] For test case files, the corresponding graph nodes are test class graph nodes. The node attributes of test class graph nodes include: a unique test case file identifier ID; a case description (a textual description of the content and steps of the test cases involved in the test case); a creation time (the creation time of the test case file); an associated requirement file ID (the requirement file ID corresponding to the test case in this test case); an associated design file ID (the technical design file ID corresponding to the test case in this test case); and a status (the status of the test cases in the test case, such as pending execution, executing, passed, failed, etc.).

[0067] Based on the node attributes of each graph node identified above, the associated file identifier of the file associated with the node is directly found through the node attribute. Then, the associated graph node matching the associated file identifier is found among other graph nodes, thus establishing the connection relationship between graph nodes. For example, in the "Associated Requirement File ID" attribute of the graph node corresponding to the technical design document mentioned above, the target graph node matching the "Associated Requirement File ID" is the graph node of the requirement file that has a connection relationship with the graph node of the technical design document.

[0068] Understandably, embodiments of the present invention define the type of corresponding connection edge based on the type of graph node. For example, the connection edge between the graph node in the requirements document and the graph node in the technical design document in the above example is defined as a requirements-design edge. Accordingly, the edge attributes assigned to this requirements-design edge include: connection type (indicating the relationship between requirements and design, such as implementation or reference), and the creation time of the connection edge. It is also specified that the edge direction of the requirements-design edge is from the requirements graph node to the design graph node.

[0069] Similarly, there may be a connection between design graph nodes and code modification graph nodes. In this case, the type of connection edge is design-code edge. Accordingly, its edge attributes include: connection type (indicating the relationship between design and code modification, such as implementation or reference), and the creation time of the connection edge. It is also clear that the edge direction of the design-code edge is from the design graph node to the code modification graph node.

[0070] Similarly, there may be a connection between code modification graph nodes and test case graph nodes. In this case, the type of connection edge is code-test edge. Accordingly, its edge attributes include: connection type (indicating the relationship between code modification and test, such as verification and testing), and the creation time of the connection edge. It is also clear that the edge direction of the code-test edge is from the code modification graph node to the test case graph node.

[0071] In addition, there may be a connection relationship between requirement graph nodes and test case graph nodes. In this case, the type of connection edge is requirement-test edge. Accordingly, its edge attributes include: connection type (indicating the relationship between requirement and test, such as: verification, test), and the creation time of the connection edge. It is also clear that the edge direction of the requirement-test edge is from the requirement graph node to the test graph node.

[0072] Step S204: The connection graph formed by each graph node and the connecting edges between the graph nodes is taken as the graph structure.

[0073] Specifically, based on the graph nodes obtained from the file mapping and the connecting edges between the graph nodes determined by the associated file identifiers, a graph structure representing the relationships between the various files in the project is constructed.

[0074] Figure 3 This is a schematic diagram of the graph structure of an embodiment of the present invention. The diagram uses four types of graph nodes—product requirement graph nodes, technical design graph nodes, code modification graph nodes, and test case graph nodes—as examples to illustrate the types and directions of the connecting edges between various graph nodes. These graph nodes and connecting edges constitute the graph structure of an embodiment of the present invention.

[0075] For example, a project's lifecycle might include 100 product requirements, 50 technical design documents, 1000 code modification commits, and 200 test cases. Based on these documents, the data is first cleaned to remove duplicates and fill in missing file attributes (e.g., creation time, status). Then, all documents are converted to a unified JSON format. Each document is mapped to a graph node, resulting in 100 product requirement graph nodes, 50 technical design graph nodes, 1000 code modification graph nodes, and 200 test case graph nodes. Next, based on the relationships between the documents, connections are constructed between the 100 product requirement graph nodes and the 50 technical design graph nodes, between the 50 technical design graph nodes and the 1000 code modification graph nodes, between the 1000 code modification graph nodes and the 200 test case graph nodes, and again between the 100 product requirement graph nodes and the 200 test case graph nodes. Finally, the NetworkX language development library is used to construct the graph structure and visualize it. In addition, to ensure accuracy, the constructed graph structure can be checked for integrity to ensure the correctness of all graph nodes and connecting edges.

[0076] This invention maps various entities and their relationships in the software development process to corresponding graph nodes and connecting edges, constructing a graph structure that is clear and consistent with the entity relationships. This structure is not only easy to extend and supports more node and edge types to adapt to changes in the software development process, but also facilitates the subsequent mining of key relationships.

[0077] Step S205: Determine the search start graph node and search end graph node in the graph structure, perform path search on the graph structure, and obtain multiple result paths.

[0078] Step S206: For each of the result paths: according to the preset path correlation scoring strategy, calculate the correlation value between the file contents corresponding to each adjacent graph node in the result path, and then obtain the path value of the result path.

[0079] Specifically, for each of the multiple result paths obtained from the path search, according to a preset path relevance scoring strategy, such as a content duplication rate strategy, the duplication rate between the file content corresponding to each adjacent graph node in the result path is calculated. The higher the duplication rate, the stronger the correlation between the two adjacent graph nodes, and the larger the correlation value. For example, if graph node 2 and graph node 6 are adjacent, and the content duplication rate between files 2 and 6 corresponding to graph nodes 2 and 6 reaches 40%, then the correlation value between graph node 2 and graph node 6 is 0.4. Finally, the correlation values ​​of each adjacent graph node are weighted and summed to obtain the path value of the entire result path. It is understood that the weighted summation mentioned here is only a specific calculation method for fusion; a product calculation method can also be used, and this embodiment of the invention does not specifically limit the method.

[0080] The path relevance scoring strategy includes at least one of the following: a path graph node similarity scoring strategy, a path graph node importance scoring strategy, and a path length scoring strategy.

[0081] Specifically, the path relevance scoring strategy in this embodiment of the invention can be a similarity scoring strategy that calculates the content similarity between adjacent graph nodes in the resulting path, a path graph node importance scoring strategy that superimposes the importance levels of each graph node in the resulting path, or a path length scoring strategy that calculates the path length by counting the number of graph nodes contained in the path. Alternatively, at least two of these three strategies can be combined (addition, multiplication, weighted summation, etc.) to obtain the path value of the resulting path; this embodiment of the invention does not impose specific limitations.

[0082] Step S207: Sort each of the result paths in descending order according to its corresponding path value, and select a specified number of result paths from the beginning as the key paths.

[0083] Specifically, based on the path values ​​of each result path obtained from the above calculation, each path value is sorted in descending order from largest to smallest. According to the sorting result, the top K (first K) result paths are selected from front to back. K is a specified number, that is, the result paths with a specified number of high path values ​​are selected as the critical paths of this embodiment of the invention. The critical paths of this embodiment of the invention are the most relevant connection relationships among all the connection relationships of all files, that is, the most important and critical connection relationships.

[0084] Step S208: Based on the graph nodes and connecting edges contained in the critical path, mine the target files that have related relationships.

[0085] Based on file metadata and other information, this invention identifies corresponding graph nodes, node attributes, connecting edges, and edge attributes, constructing a complete graph structure consistent with the actual file relationships. This facilitates the use of graph structure analysis methods to search and filter out key paths, thereby uncovering target files with associated relationships. This achieves efficient and accurate file relationship mining, helping developers to accurately grasp the key points and concerns of project development and ensure project development quality by utilizing the uncovered key relationships and associated target files.

[0086] Figure 4 This is a flowchart of a document relationship mining method according to another possible embodiment of the present invention. As another embodiment of the present invention, such as... Figure 4 As shown, the file relationship mining method may include:

[0087] Step S401: Obtain all files throughout the project development lifecycle.

[0088] Step S402: Map each of the files to graph nodes, determine the connection edges between the graph nodes based on the content of each of the files, and construct the graph structure corresponding to the project based on the graph nodes and the connection edges between them.

[0089] Step S403: Obtain the intent for file relationship mining, identify files with sequential influence relationships from the intent, and then determine the corresponding start file and end file; use the graph node corresponding to the start file as the search start graph node, and use the graph node corresponding to the end file as the search end graph node.

[0090] Specifically, the file relationship mining in this embodiment of the invention supports mining various requirement relationships, such as the implementation relationship between technical design and code, and the verification relationship between product requirements and test cases. In some scenarios, users may not specify the specific start and end nodes of the search graph in the constructed graph structure. In such cases, it is necessary to obtain the user's intent for this file relationship mining.

[0091] Furthermore, the LLM (Large Language Model) is used to segment, semantically analyze, and identify user intent, determining word pairs with an influence relationship within the intent and establishing the sequential relationship between the two word segments within each pair. Then, each word segment is matched against the filenames of various files, and the filename with the closest match is selected as the file with a sequential influence relationship in the identification results. For example, "requirements" and "tests" are word pairs with a sequential influence relationship identified by the LLM. The direction of influence between these two words is "requirements" affecting "tests." Therefore, through matching, the files with a sequential influence relationship can be determined as the product requirement file and the test case file, with the product requirement file as the starting file and the test case file as the ending file. Finally, the graph node corresponding to the identified starting file is used as the search start graph node, and the graph node corresponding to the ending file is used as the search end graph node. For example, in the above example, the starting file is the product requirement file, and the ending file is the test case file. Therefore, the search start graph node is the product requirement graph node, and the search end graph node is the test case file graph node.

[0092] Of course, the search start graph node and search end graph node can also be other types of graph nodes in the graph structure. For example, if the user is concerned about how code changes affect test cases, then the code modification graph node can be used as the search start graph node and the test case graph node can be used as the search end graph node. This scenario helps to identify which test cases need to be updated or re-executed to reflect the latest code changes.

[0093] This invention identifies the intent of file relationship mining, determines the corresponding search start graph node and search end graph node, and supports mining different relationships between files according to user needs, so as to be applicable to more scenarios and better meet the individual needs of users.

[0094] Step S404: Input the graph structure, as well as the search start graph node and search end graph node in the graph structure, into the pre-trained path selection model, and use the path search capability and path relevance scoring strategy of the path selection model to obtain the key path output by the path selection model.

[0095] Specifically, to improve the efficiency of critical path selection, and considering the development of machine learning technology in recent years, a large model approach is used to efficiently obtain critical paths in a graph structure. A training sample set is pre-constructed, and a transformer model based on a self-attention mechanism is selected to construct the path selection model of this embodiment. The path search capability and path relevance scoring strategy of the path selection model are trained using the training sample set, resulting in the trained path selection model. The constructed graph structure, along with the determined search start and end nodes, are then input into the path selection model to directly obtain the critical paths in the graph structure output by the path selection model.

[0096] According to one embodiment of the present invention, the path selection model is constructed based on a graph neural network model; the path selection model is trained in the following manner: based on a pre-constructed training dataset, the parameters of the path selection model are updated by calculating the binary cross-entropy loss function of the path selection model to obtain the trained path selection model.

[0097] Specifically, given that this embodiment of the invention transforms file relationships into a graph structure representation, a graph neural network model is chosen for the path selection model in order to analyze the graph structure more efficiently. A graph neural network (GNN) is a deep learning model specifically designed for processing graph structure data. In the software development process of this embodiment, the graph neural network model can learn and discover the complex relationships between various files.

[0098] Figure 5 This is a schematic diagram of the graph neural network in an embodiment of the present invention. The graph neural network mainly consists of several hidden layer structures and the ReLU activation function. It updates the node representation in the current structure by aggregating information from its internal neighbor nodes, and combines the nonlinear activation function ReLU to efficiently learn the features of the received graph structure, thereby outputting the key path within it.

[0099] This invention selects to use a graph convolutional network from existing graph neural network models because graph convolutional networks perform well in node classification and connection prediction tasks and have high computational efficiency.

[0100] Before training the path selection model based on a graph neural network, a training dataset (i.e., a training graph structure) needs to be constructed, and features of each graph node need to be extracted. Specifically, feature extraction involves extracting textual features from the descriptive items (requirement description, design description, submission description, and case description) of each graph node's attributes using word embeddings (e.g., Word2Vec, BERT) to convert the descriptive items into vectors. Simultaneously, structural features of the entire graph structure need to be extracted, obtaining the type of each graph node, its creation or modification time, and the number of connections (connectivity) between each node and other graph nodes. Additionally, code features need to be extracted; for code modification graph nodes, the modified file list item and code change amount item need to be extracted from their attributes.

[0101] The extracted features are then used as the initial representations for each corresponding graph node. Selecting a portion of the training dataset for forward propagation, based on the message passing principle in each graph convolutional layer of a graph convolutional network, can be expressed by the following formula:

[0102]

[0103] Among them, among them, Let N(i) be the representation of node i at level l, and let N(i) be the set of neighboring nodes of node i. ij It is the normalization coefficient, W l This is the weight matrix, and σ is the activation function (such as ReLU). Then, through multi-layer message passing, it is aggregated into a richer information representation. Finally, the output layer outputs the specific task result, such as the critical path in this embodiment of the invention.

[0104] Next, based on the pre-configured initial parameters of the path selection model, the loss function of the path selection model is calculated using the backpropagation algorithm. The parameters of the path selection model are then updated using the calculated loss function, thus obtaining the trained path selection model. This embodiment of the invention selects to use the binary cross-entropy loss function to calculate the loss of the path selection model:

[0105]

[0106] Where E is the set of edges, y ij p is the label indicating whether an edge exists between node i and node j. ij It represents the probability that the edge exists as predicted by the model.

[0107] The binary cross-entropy loss function is chosen in this embodiment of the invention because conventional cross-entropy loss is usually used for node classification, while this embodiment of the invention is mainly used for edge analysis. Therefore, the binary cross-entropy loss function, which focuses more on edge analysis, is more suitable for the current scenario.

[0108] Figure 6 This is a schematic diagram of the training process of the path selection model according to an embodiment of the present invention. First, the parameter variables of the path selection model are initialized, and the number of training iterations is set to 0. A portion of the training data, i.e., the training graph structure, is selected from the training dataset. Features of the training graph structure are extracted and input into the path selection model. Through forward propagation, the predicted values ​​output by the model are obtained. Next, the binary cross-entropy loss function of the path selection model is calculated. Through the backpropagation algorithm, the gradient of the loss function with respect to the model parameter variables is calculated, and the parameter variables of the path selection model are updated, completing one training iteration. The above steps of forward propagation, loss function calculation, and backpropagation are repeated until the training objective (path selection model convergence) is achieved or the preset number of training iterations is reached.

[0109] Based on the trained path selection model, the graph structure of this embodiment, along with the search start node and search end node in the graph structure, are input into the path selection model. The path selection model uses graph traversal algorithms, such as breadth-first search and depth-first search, to progressively search along the connecting edges from the search start node, generating all paths (result paths) between the search start node and the search end node. Then, based on a similarity scoring strategy, the path selection model of this embodiment selects to use the similarity between the representation vectors of adjacent graph nodes in the result path to calculate the path value of the result path, and then determines the key path based on the path value. The specific calculation formula for the path value is as follows:

[0110]

[0111] Where P is a path, similarity(h i ,h j ) is the similarity (e.g., cosine similarity) between the representation vectors of graph node i and graph node j.

[0112] The reasons for the preferred similarity scoring strategy in this invention embodiment can be explained from the following aspects: First, project consistency: Similar graph nodes usually indicate that they are related in content, purpose, or function, meaning they revolve around the same project or requirement. For example, if a product requirement graph node and a test case graph node have high similarity, it indicates that the test case is likely to verify functions related to that requirement, thus ensuring project consistency. Second, association strength: The association between highly similar graph nodes may be stronger. In the software development process, the close association between requirements, design, code, and test cases is key to ensuring software quality. By prioritizing paths to similar graph nodes, these close relationships can be identified more accurately. Third, information retention: In graph neural networks, the representation (feature vector) of a graph node contains information related to that node. Highly similar graph node pairs mean they are closer in the feature space, which may mean they share more information or context, which is beneficial for understanding and predicting the relationships between them. Fourth, reduce noise: In the actual software development process, there may be some less important correlations or noisy data. By filtering paths based on similarity, the impact of this noise can be reduced, and the focus can be placed on those correlations that are more likely to contribute to the success of the project.

[0113] Step S405: Based on the graph nodes and connecting edges contained in the critical path, mine the target files that have related relationships.

[0114] This invention utilizes a graph neural network model, which is more suitable for analyzing graph structures, to learn the relationships between graph nodes in the graph structure, thereby achieving the goal of efficiently and accurately obtaining the critical path in the graph structure.

[0115] Figure 7 This is a schematic diagram of the overall process of file relationship mining according to an embodiment of the present invention. First, the data acquisition module acquires various files throughout the project development lifecycle: product requirement documents, technical design documents, code modification documents, and test case documents. Then, the data preprocessing module cleans, standardizes, and unifies the data formats of each file. Next, the graph construction module maps each file to corresponding graph nodes and determines the connecting edges between graph nodes based on the content of each file, constructing a graph structure. Then, based on a path selection model built from a graph neural network, the graph nodes and connecting edges in the graph structure are converted into vector representations. A graph convolutional layer is used to learn the graph structure, capturing the relationships between graph nodes and extracting features. Finally, the path selection model is used for relationship mining. Specifically, a path search is performed on the graph structure to obtain result paths. Then, a similarity scoring strategy is used to score the paths, calculate the path value of each result path, filter out key paths, and verify the rationality of the key paths. Finally, the results are displayed, visualizing the critical paths and the target files with interrelationships in a graph for easy understanding and application. Interactive exploration services are also provided, allowing users to analyze the relationships between target files using interactive tools. Detailed file relationship reports are also generated, summarizing the discovered file relationships and their application value.

[0116] When a user's intention in mining file relationships is to test coverage, based on the target files with relationships discovered above, this embodiment of the invention proposes a method to apply the mining results to specific test coverage checks.

[0117] Figure 8 This is a flowchart illustrating how an embodiment of the present invention applies the discovered related target files to test coverage checks, such as... Figure 8 The above includes:

[0118] Step S801: Check whether there is a test case file in the target file. If there is no test case file in the target file, identify the target file with the relationship as a test blind spot.

[0119] Specifically, in this embodiment of the invention, the mining results are applied to test coverage checks. After mining the critical path and related target files according to the above method, it is checked whether there are test case files among the related target files. If there is at least one test case file, that is, at least one test case graph node in the critical path, it means that the mined critical path is covered by test cases, that is, at least one test case corresponds to the target file. If there are no test case files in the target files, that is, no test case graph node in the critical path, then this path is considered a test blind spot, that is, no graph node on the path is covered by any test case, and there may be undiscovered defects or problems.

[0120] Step S802: Based on at least one of the requirement file, design file, and code modification file in the target file, generate recommended test cases and push them to the test task interface.

[0121] Specifically, for identified testing blind spots, based on at least one of the requirement documents, design documents, and code modification documents in the target file, the intelligent test case recommendation module generates corresponding recommended test cases for testers and pushes the generated recommended test cases to the test task interface so that testers can obtain and use the recommended test cases, thereby improving testing efficiency and quality.

[0122] This invention utilizes the results of file relationship mining to check test coverage. Since file relationship mining is based on the entire project lifecycle, it uncovers file relationships from a holistic, end-to-end perspective, providing a prerequisite for comprehensive test coverage checks. Furthermore, the mining results can accurately identify test blind spots, improving test coverage and reducing the risk of missed defects. Moreover, it provides testers with intelligent test case recommendations, enhancing testing efficiency and quality.

[0123] Figure 9 This is a schematic diagram of the main modules of a document relationship mining device according to an embodiment of the present invention. Figure 9 As shown, the file relationship mining device 900 mainly includes a file acquisition module 901, a graph structure construction module 902, and a file relationship determination module 903.

[0124] File acquisition module 901 is used to acquire various files throughout the project development lifecycle;

[0125] Graph structure construction module 902 is used to map each of the files to graph nodes, determine the connection edges between the graph nodes based on the content of each of the files, and construct the graph structure corresponding to the project based on the graph nodes and the connection edges between the graph nodes.

[0126] The file relationship determination module 903 is used to determine the search start graph node and search end graph node in the graph structure, perform path search on the graph structure to obtain multiple result paths; select key paths from the result paths according to the correlation between the file contents corresponding to the graph nodes in each result path, and mine target files with correlation relationships based on the graph nodes and connecting edges contained in the key paths.

[0127] According to an embodiment of the present invention, the graph structure construction module 902 is further configured to: for each file: determine the corresponding graph node identifier according to the file identifier of the file, and map the file to a graph node having the graph node identifier; for each graph node: obtain the associated file identifier of the file associated with the graph node from the file corresponding to the graph node; find the associated graph node that matches the associated file identifier, and establish the connection edge between the graph node and the associated graph node; and use the connection graph composed of each graph node and the connection edge between the graph nodes as the graph structure.

[0128] According to another embodiment of the present invention, the file relationship determination module 903 is further configured to: for each of the result paths: calculate the association value between the file contents corresponding to each adjacent graph node in the result path according to a preset path association scoring strategy, and then obtain the path value of the result path; sort each of the result paths in descending order according to its corresponding path value, and select a specified number of result paths as the key paths starting from the front.

[0129] According to another embodiment of the present invention, the file relationship determination module 903 is further configured to: input the graph structure, as well as the search start graph node and search end graph node in the graph structure, into a pre-trained path selection model, and use the path search capability and path relevance scoring strategy of the path selection model to obtain the key path output by the path selection model.

[0130] According to another embodiment of the present invention, the path selection model is constructed based on a graph neural network model; the path selection model is trained by: based on a pre-constructed training dataset, updating the parameters of the path selection model by calculating the binary cross-entropy loss function of the path selection model, thereby obtaining the trained path selection model; the path relevance scoring strategy includes at least one of the following: a path graph node similarity scoring strategy, a path graph node importance scoring strategy, and a path length scoring strategy.

[0131] According to another embodiment of the present invention, the file relationship determination module 903 is further configured to: obtain the intent of file relationship mining, identify files with sequential influence relationships from the intent, and then determine the corresponding start file and end file; use the graph node corresponding to the start file as the search start graph node, and use the graph node corresponding to the end file as the search end graph node.

[0132] According to another embodiment of the present invention, the file relationship mining device 900 further includes a data cleaning module (not shown in the figure), used to: after acquiring various files within the project development lifecycle, perform data cleaning on the contents of the files, and convert each file into a unified data format; the file relationship mining device 900 further includes a result display module (not shown in the figure), used to: after mining target files with related relationships, display the target files with related relationships in a graphical manner, and provide interactive tools to enable users to analyze the relationships between the target files.

[0133] According to another embodiment of the present invention, the files include: a requirements file, a design file, a code modification file, and a test case file; when the intent of the file relationship mining is test coverage, the file relationship mining device 900 further includes a test coverage checking module (not shown in the figure), used to: check whether there is a test case file in the target file; if there is no test case file in the target file, identify the target file with the relationship as a test blind spot; and generate recommended test cases based on at least one of the requirements file, design file, and code modification file in the target file, and push them to the test task interface.

[0134] Figure 10 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied.

[0135] like Figure 10 As shown, system architecture 1000 may include terminal devices 1001, 1002, and 1003, network 1004, and server 1005. Network 1004 is used as a medium to provide communication links between terminal devices 1001, 1002, and 1003 and server 1005. Network 1004 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0136] Users can use terminal devices 1001, 1002, and 1003 to interact with server 1005 via network 1004 to receive or send messages, etc. Various communication client applications, such as file relationship mining applications, can be installed on terminal devices 1001, 1002, and 1003 (for example only).

[0137] Terminal devices 1001, 1002, and 1003 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0138] Server 1005 can be a server providing various services, such as a backend management server supporting file relationship mining performed by users using terminal devices 1001, 1002, and 1003 (for example only). The backend management server can obtain various files throughout the project development lifecycle; map each file to a graph node; determine the connection edges between the graph nodes based on the content of each file; construct the graph structure corresponding to the project based on the graph nodes and the connection edges between them; determine the search start and end graph nodes in the graph structure; perform path search on the graph structure to obtain multiple result paths; select key paths from the result paths based on the correlation between the file content corresponding to the graph nodes in each result path; mine target files with correlation relationships based on the graph nodes and connection edges contained in the key paths; and feed back the processing results (e.g., target files with correlation relationships – for example only) to the terminal devices.

[0139] It should be noted that the file relationship mining method provided in this embodiment of the invention is generally executed by server 1005, and correspondingly, the file relationship mining device is generally set in server 1005.

[0140] It should be understood that Figure 10 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0141] The following is for reference. Figure 11 , Figure 11 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Figure 11 The terminal device or server shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0142] like Figure 11As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1102 or programs loaded from storage section 1108 into random access memory (RAM) 1103. The RAM 1103 also stores various programs and data required for the operation of the system 1100. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0143] The following components are connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. Removable media 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1110 as needed so that computer programs read from them can be installed into storage section 1108 as needed.

[0144] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by central processing unit (CPU) 1101, it performs the functions defined above in the system of this invention.

[0145] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0146] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0147] The units described in the embodiments of the present invention can be implemented in software or in hardware. The described units can also be housed in a processor; for example, a processor can be described as including: a file acquisition module, a graph structure construction module, and a file relationship determination module.

[0148] In some cases, the names of these modules do not constitute a limitation on the module itself. For example, a file acquisition module can also be described as "a module used to acquire various files throughout the project development lifecycle".

[0149] On the other hand, the present invention also provides a computer-readable medium, which may be included in the device described in the embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: acquiring various files within the project development lifecycle; mapping each file to a graph node, and determining the connection edges between the graph nodes based on the content of each file; constructing a graph structure corresponding to the project based on the graph nodes and the connection edges between them; determining the search start node and search end node in the graph structure, performing a path search on the graph structure to obtain multiple result paths; selecting a key path from the result paths based on the correlation between the file contents corresponding to the graph nodes in each result path, and mining target files with correlation relationships based on the graph nodes and connection edges contained in the key path.

[0150] The technical solution of the present invention has the following advantages or beneficial effects: by acquiring various files within the project development lifecycle; mapping each file to a graph node; determining the connection edges between each graph node based on the content of each file; constructing a graph structure corresponding to the project based on each graph node and the connection edges between each graph node; determining the search start graph node and search end graph node in the graph structure; performing path search on the graph structure to obtain multiple result paths; selecting key paths from each result path based on the correlation between the file content corresponding to the graph nodes in each result path; and mining target files with related relationships based on the graph nodes and connection edges contained in the key path, this technical solution achieves an efficient and accurate file relationship mining. Analyzing each file in a graph structure not only improves accuracy but also increases mining efficiency, making it easier for R&D personnel to grasp the key relationships and related target files throughout the entire project development process, thereby better ensuring development quality.

[0151] The specific embodiments described herein do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for mining document relationships, characterized in that, include: Retrieve all files throughout the project development lifecycle; Each file is mapped to a graph node, and the connection edges between the graph nodes are determined based on the content of each file. The graph structure corresponding to the project is constructed based on each graph node and the connection edges between them. The search start node and search end node in the graph structure are determined, and a path search is performed on the graph structure to obtain multiple result paths. Based on the correlation between the file contents corresponding to the graph nodes in each result path, a key path is selected from each result path. Based on the graph nodes and connecting edges contained in the key path, target files with correlation relationships are mined.

2. The method according to claim 1, characterized in that, Each of the files is mapped to a graph node, and the connection edges between the graph nodes are determined based on the content of each of the files. Based on each graph node and the connecting edges between them, construct the graph structure corresponding to the project, including: For each file: Based on the file identifier of the file, determine the corresponding graph node identifier, and map the file to a graph node with the graph node identifier; For each graph node: obtain the associated file identifier of the file associated with the graph node from the file corresponding to the graph node; find the associated graph node that matches the associated file identifier, and establish the connection edge between the graph node and the associated graph node; The connection graph formed by the graph nodes and the connecting edges between the graph nodes is used as the graph structure.

3. The method according to claim 1, characterized in that, Based on the correlation between the file contents corresponding to the graph nodes in each of the aforementioned result paths, key paths are selected from each of the aforementioned result paths, including: For each of the resulting paths: according to the preset path correlation scoring strategy, calculate the correlation value between the file contents corresponding to each adjacent graph node in the resulting path, and then obtain the path value of the resulting path; Sort each of the result paths in descending order according to its corresponding path value, and select a specified number of result paths from the beginning as the critical paths.

4. The method according to claim 1, characterized in that, A path search is performed on the graph structure to obtain multiple result paths; based on the correlation between the file contents corresponding to the graph nodes in each result path, a key path is selected from each result path, including: The graph structure, along with the search start and search end nodes in the graph structure, are input into a pre-trained path selection model. The path selection model's path search capability and path relevance scoring strategy are then used to obtain the critical path output by the path selection model.

5. The method according to claim 3 or 4, characterized in that, The path selection model is constructed based on a graph neural network model; The path selection model is trained in the following way: based on a pre-built training dataset, the parameters of the path selection model are updated by calculating the binary cross-entropy loss function of the path selection model, and the trained path selection model is obtained. The path relevance scoring strategy includes at least one of the following: a path graph node similarity scoring strategy, a path graph node importance scoring strategy, and a path length scoring strategy.

6. The method according to claim 1, characterized in that, Determining the search start graph node and search end graph node in the graph structure includes: The intent of file relationship mining is obtained, files with sequential influence relationships are identified from the intent, and then the corresponding start file and end file are determined; The graph node corresponding to the starting file is used as the search start graph node, and the graph node corresponding to the ending file is used as the search end graph node.

7. The method according to claim 1, characterized in that, After acquiring all files from the project development lifecycle, the method further includes: The contents of the files are cleaned to convert each file into a unified data format. After identifying target files with related relationships, the method further includes: The related target files are displayed graphically, and interactive tools are provided to allow users to analyze the relationships between the target files.

8. The method according to claim 6, characterized in that, The documents include: requirements documents, design documents, code modification documents, and test case documents; When the intent of the file relationship mining is to test coverage, the method further includes: Check if a test case file exists in the target file. If the test case file does not exist in the target file, identify the related target file as a test blind spot. Based on at least one of the requirement file, design file, and code modification file in the target file, generate recommended test cases and push them to the test task interface.

9. A document relationship mining device, characterized in that, include: The file acquisition module is used to acquire various files throughout the project development lifecycle. The graph structure construction module is used to map each of the files to graph nodes, determine the connection edges between the graph nodes based on the content of each of the files, and construct the graph structure corresponding to the project based on the graph nodes and the connection edges between them. The file relationship determination module is used to determine the search start graph node and search end graph node in the graph structure, perform path search on the graph structure to obtain multiple result paths; select key paths from the result paths based on the correlation between the file contents corresponding to the graph nodes in each result path, and mine target files with correlation based on the graph nodes and connecting edges contained in the key paths.

10. A mobile electronic device terminal, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-8.

11. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-8.