A blood relationship analysis method, device and system for software system development
By building the kinship of software systems, the problem of reduced design and development quality caused by frequent iterations of requirements and changes in project team members in agile development is solved, and the accuracy and efficiency of developers are improved.
Patent Information
- Application Number
- CN202411053178.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-08-02
AI Technical Summary
Under the agile development model, during the software system development process, due to frequent iterations of requirements and changes in project team members, it is difficult for new members to understand the basis for the development of some functions, resulting in a decline in the quality of software system design and development.
By obtaining the original requirements documents and design documents of the software system, the first-level relationship is constructed, including the hierarchical relationship between original requirements, sub-requirements and function points, the correspondence between function points and function entry functions, and the relationship between original requirements. Timing dependencies between functions, and constructing second-level kinship relationships based on the call chain of function entry functions, providing kinship analysis methods, devices and systems to help developers understand demand relationships.
It improves the accuracy of software system design and development by developers, improves the quality of software system design and development, ensures that new members can quickly understand functions and relationships, and adapts to scenarios where project team members change frequently.
Smart Images

Figure CN118567713B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis technology, and in particular to a blood relationship analysis method, device and system for software system development. Background Art
[0002] In software system development, developers are often required to adapt to the ever-changing user needs and market changes. Agile development model came into being. Agile development takes the evolution of user needs as the core and adopts an iterative and step-by-step approach to software development. In agile development, the development project of the software system is divided into multiple sub-projects at the beginning of the construction. In other words, agile development is to divide a large project into multiple small projects that are interconnected but can also run independently, and complete them separately.
[0003] In the agile development model, the software system development process faces frequent demand iterations, especially for large systems, which involve extensive development requirements, many documents, long cycles, complex functions, fast iterations, and many project team members. As time goes by, in the middle and late stages of the software system development process, some functions have multiple iterations, and project team members (such as developers, testers, requirements personnel, etc.) have also changed multiple times, resulting in new members often being unable to understand the basis and background of the development of some functions. In this case, the quality of software system design and development will be seriously affected. Summary of the invention
[0004] Based on the above problems, the present application provides a bloodline analysis method, device and system for software system development, with the aim of adapting to the characteristics of agile development mode by analyzing bloodline relationships, so as to facilitate developers to accurately design and develop software systems.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] In a first aspect, the present application provides a blood relationship analysis method for software system development, comprising:
[0007] Obtaining original requirement documents and design documents of the software system; in the original requirement documents and the design documents, one original requirement is implemented by one or more sub-requirements; in the design document, one sub-requirement is implemented by one or more function points, and one function point is implemented by a function entry function; the original requirement document also records the submission time of the original requirement;
[0008] A first-level blood relationship is established according to the original requirement document and the design document; the first-level blood relationship includes a hierarchical relationship among the original requirement, the sub-requirement and the function point, a corresponding relationship between the function point and the function entry function, and a temporal dependency relationship between the original requirements;
[0009] Performing call analysis on the function entry function in the code base of the software system to obtain a call chain of the function entry function;
[0010] A second level of blood relationship is constructed based on the call chain and the first level of blood relationship.
[0011] Optionally, in the method described above, the hierarchical relationship between the original requirement, the sub-requirement and the function point in the first level of blood relationship is stored in a tree structure; wherein the original requirement with the hierarchical relationship serves as the parent node of the sub-requirement, and the function point with the hierarchical relationship serves as the child node of the sub-requirement;
[0012] If the call chain is implemented by the first function entry function calling the second function entry function, the step of constructing the second level of blood relationship according to the call chain and the first level of blood relationship includes:
[0013] Determine, according to the correspondence between function points and function entry functions, a first function point corresponding to the first function entry function and a second function point corresponding to the second function entry function;
[0014] Based on the tree structure to which the first function point belongs, the tree structure to which the second function point belongs, and the call chain, a second-level blood relationship is constructed between the second function entry function and the first original requirement corresponding to the first function point, between the second function point and the first original requirement, between the first function entry function and the second original requirement corresponding to the second function point, between the first function point and the second original requirement, and between the first original requirement and the second original requirement.
[0015] Optionally, the method as described above further includes:
[0016] Monitoring changes in code files in the code repository;
[0017] When a change in the target code file is detected, determining whether the first level of blood relationship contains a function entry function associated with the target code file;
[0018] If yes, re-call and parse the function entry function associated with the target code file to obtain a new call chain;
[0019] A second level of blood relationship is constructed based on the new call chain and the first level of blood relationship.
[0020] Optionally, the method as described above further includes:
[0021] Establish the corresponding relationship between each functional entry function and the code file name;
[0022] When a change in the target code file is detected, determining whether the first level of blood relationship includes a function entry function associated with the target code file includes:
[0023] When a change in the target code file is detected, determining the file name of the target code file;
[0024] According to the correspondence between each function entry function and the code file name, determine the target function entry function corresponding to the file name of the target code file;
[0025] Determine whether the first level of blood relationship includes the target function entry function.
[0026] Optionally, in the above method, the step of constructing the first-level blood relationship according to the original requirement document and the design document includes:
[0027] Input the original requirement document and the design document into a pre-trained information extraction model respectively, and obtain the first metadata and the second metadata output by the information extraction model; the first metadata includes the key value information of the original requirement number, the sub-requirement number and the original requirement submission time in the original requirement document; the second metadata includes the key value information of the original requirement number, the sub-requirement number, the function point number and the function entry function in the design document;
[0028] A tree structure is constructed from top to bottom according to the original requirement number, sub-requirement number and function point number in the second metadata; the tree structure is used to represent the hierarchical relationship between the original requirement, sub-requirement and function point; in the tree structure, the function point number is connected to the function entry function corresponding to the function point represented by itself;
[0029] In the tree structure, a temporal dependency relationship between the original requirements is constructed based on the temporal sequence of the key value information of the submission time of each original requirement in the first metadata.
[0030] Optionally, in the above method, the step of constructing a second-level blood relationship according to the call chain and the first-level blood relationship includes:
[0031] Determining, according to the call chain, a call relationship of each function involved in the call chain;
[0032] Construct a two-dimensional array between functions according to the calling relationship; wherein a value of 1 in the two-dimensional array indicates that there is a direct calling relationship between the function represented by the row corresponding to the value and the function represented by the column corresponding to the value;
[0033] The second level of blood relationship is constructed based on the two-dimensional array and the first level of blood relationship.
[0034] Optionally, the method as described above further includes:
[0035] Obtaining a data lineage query instruction, wherein the data lineage query instruction includes an element to be queried of the software system, wherein the element to be queried includes at least one of an original requirement number, a sub-requirement number, a function point number, and a function entry function;
[0036] Querying the elements having the first level of blood relationship with the element to be queried, and / or querying the elements having the second level of blood relationship with the element to be queried;
[0037] Display the queried features.
[0038] In a second aspect, the present application provides a blood relationship analysis device for software system development, comprising:
[0039] A document acquisition module is used to acquire the original requirement document and design document of the software system; in the original requirement document and the design document, one original requirement is realized by one or more sub-requirements; in the design document, one sub-requirement is realized by one or more function points, and one function point is realized by one function entry function; the original requirement document also records the submission time of the original requirement;
[0040] A first analysis module is used to construct a first-level blood relationship according to the original requirement document and the design document; the first-level blood relationship includes a hierarchical relationship between the original requirement, the sub-requirement and the function point, a corresponding relationship between the function point and the function entry function, and a temporal dependency relationship between the original requirements;
[0041] A call chain acquisition module, used to perform call analysis on the function entry function in the code library of the software system to obtain a call chain of the function entry function;
[0042] The second analysis module is used to construct a second level of blood relationship according to the call chain and the first level of blood relationship.
[0043] In a third aspect, the present application provides a lineage analysis system for software system development, comprising: a lineage analysis device and a call chain analysis device connected to each other; wherein:
[0044] The lineage analysis device is used to obtain the original requirement document and design document of the software system, and to construct a first-level lineage relationship based on the original requirement document and the design document; in the original requirement document and the design document, an original requirement is implemented by one or more sub-requirements; in the design document, a sub-requirement is implemented by one or more function points, and a function point is implemented by a function entry function; the original requirement document also records the submission time of the original requirement; the first-level lineage relationship includes the hierarchical relationship between the original requirement, the sub-requirement and the function point, the corresponding relationship between the function point and the function entry function, and the temporal dependency relationship between the original requirements;
[0045] The call chain analysis device is used to perform call analysis on the function entry function under the code base of the software system, obtain the call chain of the function entry function, and feed the call chain back to the lineage analysis device;
[0046] The blood relationship analysis device is also used to construct a second-level blood relationship based on the call chain and the first-level blood relationship.
[0047] Optionally, the system as described above further comprises: an artificial intelligence middle station; the artificial intelligence middle station is connected to the blood relationship analysis device; the artificial intelligence middle station is configured with a pre-trained information extraction model;
[0048] The blood relationship analysis device is specifically used to call the artificial intelligence middle platform to input the original requirement document and the design document into the pre-trained information extraction model respectively;
[0049] The artificial intelligence middle station is used to extract key information from the original requirement document and the design document through the information extraction model, output the first metadata and the second metadata and provide them to the blood relationship analysis device; the first metadata includes the key value information of the original requirement number, sub-requirement number and original requirement submission time in the original requirement document; the second metadata includes the key value information of the original requirement number, sub-requirement number, function point number and function entry function in the design document;
[0050] The bloodline analysis device is specifically used to construct a top-down tree structure based on the original requirement number, sub-requirement number and function point number in the second metadata; in the tree structure, the temporal dependency relationship between the original requirements is constructed based on the temporal sequence of the key value information of the submission time of each original requirement in the first metadata; the tree structure is used to represent the hierarchical relationship between the original requirements, sub-requirements and function points; in the tree structure, the function point number is connected to the function entry function corresponding to the function point represented by itself.
[0051] Compared with the prior art, this application has the following beneficial effects:
[0052] This application constructs a first-level lineage relationship by acquiring the original requirement documents and design documents of the software system, including the hierarchical relationship between the original requirements, sub-requirements and function points, the correspondence between function points and function entry functions, and the timing dependency between the original requirements; and then constructs a second-level lineage relationship based on the first-level lineage relationship and the call chain obtained by parsing the function entry function in the code library, so that developers can obtain the first-level lineage relationship and the second-level lineage relationship corresponding to the requirements through the constructed acquisition, so that developers can design and develop the software system more accurately, thereby improving the quality of software system design and development. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0054] Figure 1A A flowchart of an embodiment of a blood relationship analysis method for software system development provided in an embodiment of the present application;
[0055] Figure 1B Schematic diagram of the call chain of the functional entry function in this embodiment;
[0056] Figure 1C This is a flow chart for constructing the first level of blood relationship in this embodiment;
[0057] Figure 1D This is a schematic diagram of the first-level blood relationship tree structure constructed in this embodiment;
[0058] Figure 2A A flowchart of another embodiment of a blood relationship analysis method for software system development provided in an embodiment of the present application;
[0059] Figure 2B This is a schematic diagram of the second-level blood relationship tree structure constructed in this embodiment;
[0060] Figure 3A A flowchart of another embodiment of a blood relationship analysis method for software system development provided in an embodiment of the present application;
[0061] Figure 3B This is a flow chart of updating the second level blood relationship in this embodiment;
[0062] Figure 4A A flowchart of another embodiment of a blood relationship analysis method for software system development provided in an embodiment of the present application;
[0063] Figure 4B This is a schematic diagram of the blood relationship tree structure constructed in this embodiment;
[0064] Figure 5 A flowchart of another embodiment of a blood relationship analysis method for software system development provided in an embodiment of the present application;
[0065] Figure 6 A schematic diagram of the structure of a blood relationship analysis device for software system development provided in an embodiment of the present application;
[0066] Figure 7 A structural diagram of a blood relationship analysis system for software system development provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] As described above, in the current agile development environment, the construction process of software systems is often accompanied by highly dynamic requirements. In the process of project management and advancement, faced with extensive and changing requirements, numerous documents, long development cycles, complex functional implementations, fast iteration cycles, and project team changes, it is difficult for new members to quickly integrate and understand project details, which in turn affects the overall design and development quality of the software.
[0068] After research, the inventor provides a bloodline analysis method, device and system for software system development to solve the technical problems in the prior art such as wide development requirements, high frequency of function iterations, changes in project team members, which lead to new members being unable to quickly understand the basis for the development of some functions, and reduced quality of software system design and development.
[0069] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0070] See also Figure 1A , which is a flow chart of an embodiment of a method for blood relationship analysis for software system development provided by an embodiment of the present application. The method includes:
[0071] S101: Obtain the original requirement documents and design documents of the software system.
[0072] Among them, in the original requirement document and the design document, an original requirement is implemented through one or more sub-requirements; in the design document, a sub-requirement is implemented through one or more function points, and a function point is implemented through a function entry function; the original requirement document also records the submission time of the original requirement.
[0073] In this embodiment, the original requirement document and design document are edited and generated by the user according to the pre-established original requirement document specification and detailed design document specification, so as to be used for the subsequent extraction of structured key value information of the original requirement document and design document and to construct the first-level blood relationship.
[0074] Specifically, the original requirement document includes but is not limited to the following elements: original requirement number, original requirement name, original requirement submission time, sub-requirement number and sub-requirement name, etc. The following is an example of the content of the original requirement document:
[0075] Original Requirement Number: IR-2024-0001
[0076] Original requirement name: Loan application process requirements
[0077] Original demand submission time: 2024-01-01
[0078] Original demand department: Product R&D department
[0079] Original request submitter: ***
[0080] Original demand keywords: loan application, loan disbursement, repayment***
[0081] Sub-requirement number: SR-2024-0001-01
[0082] Sub-requirement name: Registration process
[0083] Sub-requirement content: *******
[0084] Sub-requirement number: SR-2024-0001-02
[0085] Sub-requirement name: Loan process
[0086] Sub-requirement content: *******.
[0087] Specifically, the design document includes but is not limited to the following elements: original requirement number, sub-requirement number, function point number, detailed design content of function point, function entry function, etc. The following is an example of the content of the design document:
[0088] Original Requirement Number: IR-2024-0001
[0089] Sub-requirement number: SR-2024-0001-01
[0090] Function point number: FUN-REG-01
[0091] Detailed design content: *******
[0092] Function entry function: package1.class1.fun1
[0093] Function point number: FUN-REG-02
[0094] Detailed design content: *******
[0095] Function entry function: package1.class1.fun3.
[0096] S102: Construct the first level of blood relationship based on the original requirement document and design document.
[0097] The first-level blood relationship includes the hierarchical relationship between the original requirements, sub-requirements and function points, the corresponding relationship between function points and function entry functions, and the temporal dependency relationship between the original requirements. In the embodiment of the present application, the above-mentioned first-level blood relationship can be constructed by combining the key information contained in the original requirement document and the design document.
[0098] In this embodiment, the hierarchical relationship of "original requirement→sub-requirement→function point" is constructed according to the original requirement number, sub-requirement number and function point number in the original requirement document and the design document, as shown in Table 1. According to the characteristic that the same function point corresponds to the same function entry function, the corresponding relationship between the function point number and the function entry function is constructed; then, according to the original requirement submission time in the original requirement document, the temporal dependency relationship between the original requirements is constructed according to the time series, and this strong blood relationship that can be directly determined according to the original requirement document and the design document is called the first-level blood relationship.
[0099] Table 1 The hierarchical relationship between original requirements, sub-requirements, and function points
[0100]
[0101] The requirement number shown in Table 1 can be an original requirement number (for example, IR-2024-0001 in Table 1 is the original requirement number) or a sub-requirement number (for example, SR-2024-0001-01 and SR-2024-0001-02 in Table 1 are sub-requirement numbers). It can be understood that the superior requirement number corresponding to the sub-requirement number should be the original requirement number corresponding to the sub-requirement number, such as shown in the second, third and fourth rows in Table 1. As for the original requirement number, since it does not have a superior requirement number, the superior requirement number is represented by 0 in Table 1, which means "none", as shown in the first row in Table 1.
[0102] The function point numbers shown in Table 1 refer to the numbers corresponding to the function points that implement the current numbered requirements (listed in the "Requirement Number" of Table 1). As shown in the second and third rows of Table 1, the sub-requirement numbered SR-2024-0001-01 depends on the implementation of the function points numbered FUN-REG-01 and FUN-REG-02. Combined with Table 1, the hierarchical relationship between the original requirements, sub-requirements, and function points can be clearly and intuitively known. In addition, the hierarchical relationship can also be displayed through a tree structure, for example, the original requirements, sub-requirements, and function points are set at different levels in the tree structure.
[0103] S103: performing call analysis on the function entry function in the code base of the software system to obtain a call chain of the function entry function.
[0104] The code base of the software system contains the functions required to implement the requirements. Under the preconfigured code base of the software system, all function entry functions in the design document can be called and parsed to obtain the call chain of the function entry function. The call chain of the function entry function obtained under the preconfigured code base of the software system is as follows: Figure 1BAs shown, the function entry function package1.class1.fun1 is implemented by calling package1.class2.fun1, package1.class1.fun2 and package1.class2.fun2; further, the function package1.class2.fun2 is implemented by calling package1.class3.fun1 and package1.class3.fun2. This operation of obtaining the call chain can be triggered according to a preset time interval, for example, obtaining a call chain once every preset time. In other possible implementations, the acquisition of the call chain can be triggered by monitoring file changes. It should be noted that based on the connection between the functions implemented by the functions at the code level, in the acquired call chain, the functions in the entire call chain may be function entry functions, or some functions in the call chain may be function entry functions, and the other functions may not be function entry functions. The type and composition of the functions in the call chain are not specifically limited here.
[0105] S104: Construct a second-level blood relationship according to the call chain and the first-level blood relationship.
[0106] In a software system, the function entry function is usually the starting point for other parts of the system to request services. Complex functions can be implemented through a series of function calls to the function entry function, so it is possible to track which function points have a certain blood relationship through the calling relationship of the function entry function. Therefore, in this embodiment, the calling relationship between the function entry functions corresponding to the function point is determined based on the call chain of the acquired function entry function. Furthermore, based on the constructed first-level blood relationship of "function entry function → function point → sub-requirement → original requirement", a second-level blood relationship with a relatively weaker blood relationship can be constructed.
[0107] In this embodiment, the first-level blood relationship is constructed through the relationship between an original requirement in the original requirement document and the design document of the software system and realized by one or more sub-requirements; the relationship between a sub-requirement realized by one or more function points, the relationship between a function point realized by a function entry function, and the original requirement submission time. Among them, the first-level blood relationship includes the hierarchical relationship between the original requirement, the sub-requirement and the function point, the corresponding relationship between the function point and the function entry function, and the temporal dependency relationship between the original requirements. Under the code base of the software system, the function entry function is called and parsed to obtain the call chain of the function entry function. The second-level blood relationship is constructed according to the call chain and the first-level blood relationship. Compared with the prior art, the method of the present application constructs the first-level blood relationship by parsing the original requirement document and the design document of the software system, and then constructs the second-level blood relationship by combining the call chain of the function entry function obtained by calling and parsing the function entry function, so that developers can quickly trace the blood relationship between different requirements to improve the quality of software system design and development.
[0108] Furthermore, the present solution provides a method for extracting key data from a document through a pre-built information extraction model to construct a first-level blood relationship. Figure 1C The flow chart for the first level of blood relationship in this embodiment is constructed by combining Figure 1C As shown, based on the above embodiment, a specific implementation of "building a first-level blood relationship according to the original requirement document and the design document" in S102 includes:
[0109] The original requirement document and the design document are respectively input into the pre-trained information extraction model to obtain the first metadata and the second metadata output by the information extraction model.
[0110] The pre-trained information extraction model is obtained by using a natural language processing (NLP) model to train a large number of original requirement documents and design documents that meet the document development specifications.
[0111] In this embodiment, the original requirement document and the design document that meet the document formulation specification are sequentially input into the NLP model for information extraction, and the first metadata and the second metadata output by the information extraction model are obtained for the construction of the tree structure.
[0112] Among them, the first metadata includes the key value information of the original requirement number, sub-requirement number and original requirement submission time in the original requirement document; the second metadata includes the key value information of the original requirement number, sub-requirement number, function point number and function entry function in the design document.
[0113] For example, the structure of the first metadata is: {Original requirement number: IR-2024-0001, original requirement name: loan application process requirement, original requirement submission time: 2024-01-01...[{Sub-requirement number: SR-2024-0001-01, Sub-requirement name: registration process, Sub-requirement content: *******},...]...}. The structure of the second metadata is: {Original requirement number: IR-2024-0001, [{Sub-requirement number: SR-2024-0001-01, [{Function point number: FUN-REG-01, Function entry function: package1.class1.fun1},...]}...]...}.
[0114] A top-down tree structure is constructed according to the original requirement number, sub-requirement number and function point number in the second metadata.
[0115] Among them, the tree structure is used to represent the hierarchical relationship between the original requirements, sub-requirements and function points; in the tree structure, the function point number is connected to the function entry function corresponding to the function point represented by itself.
[0116] In this embodiment, for example, see Figure 1D , which is a schematic diagram of the first-level blood relationship tree structure constructed in this embodiment. A top-down tree structure is constructed based on the original requirement number IR-2024-0001, the sub-requirement number SR-2024-0001-01 and the function point number FUN-REG-01 extracted from the second metadata; and the function point number FUN-REG-01 is connected to its corresponding function entry function package1.class1.fun1 under the tree structure.
[0117] In the tree structure, a temporal dependency relationship between the original requirements is constructed based on the temporal sequence of the key value information of the submission time of each original requirement in the first metadata.
[0118] In this embodiment, the time sequence relationship of the submission of each original requirement is determined according to the original requirement submission time in the extracted first metadata, so as to construct the time sequence dependency relationship between the original requirements. Figure 1D , the submission time of the original requirement extracted from the original requirement document A (the original requirement number is IR-2024-0001) is 2024-01-01, which is earlier than the original requirement submission time of the original requirement extracted from the original requirement document B (the original requirement number is IR-2024-0002) 2024-01-02, then IR-2024-0002 depends on IR-2024-0001.
[0119] In this embodiment, the original requirement document and the design document are respectively input into a pre-trained information extraction model to extract the first metadata and the second metadata; a top-down tree structure is constructed according to the original requirement number, sub-requirement number and function point number in the second metadata; and then the temporal dependency relationship between the original requirements is constructed based on the temporal relationship of the submission time of each original requirement in the first metadata. Compared with the prior art, the method of the present application extracts key information from the original requirement document and the design document through a pre-trained information extraction model, thereby improving the accuracy and efficiency of extracting key information from the document; and a tree structure is used to characterize the hierarchical relationship between the original requirements, sub-requirements and function points, making the complex information structure clear and easy to understand. Development members can quickly browse and understand the associations and dependencies between various requirements, sub-requirements and function points, thereby improving the efficiency and quality of software system development.
[0120] See also Figure 2A , which is a flowchart of another embodiment of a blood relationship analysis method for software system development provided by an embodiment of the present application. Figure 1A ,exist Figure 2A It shows a specific way to build a second-level blood relationship, combining Figure 2A Introduced in S1041-S1042.
[0121] The hierarchical relationship among the original requirement, the sub-requirement and the function point in the first-level blood relationship is stored in a tree structure; wherein the original requirement with the hierarchical relationship is used as the parent node of the sub-requirement, and the function point with the hierarchical relationship is used as the child node of the sub-requirement; if the call chain is implemented by calling the second function entry function for the first function entry function, a specific implementation method of "constructing the second-level blood relationship according to the call chain and the first-level blood relationship" in S104 may include:
[0122] S1041: Determine, according to the correspondence between the function points and the function entry functions, a first function point corresponding to the first function entry function and a second function point corresponding to the second function entry function.
[0123] In this embodiment, for example, according to the correspondence between function points and function entry functions, it is determined that the first function point corresponding to the first function entry function package1.class1.fun1 is FUN-REG-01, and the second function point corresponding to the second function entry function package1.class1.fun2 is FUN-MS-01.
[0124] S1042: Based on the tree structure to which the first function point belongs, the tree structure to which the second function point belongs, and the call chain, construct a second-level blood relationship between the second function entry function and the first original requirement corresponding to the first function point, between the second function point and the first original requirement, between the first function entry function and the second original requirement corresponding to the second function point, between the first function point and the second original requirement, and between the first original requirement and the second original requirement.
[0125] In the embodiment of the present application, the second-level blood relationship specifically refers to: a blood relationship that cannot be directly established through the original requirement document and the design document, but can be indirectly analyzed through the code library and the call chain. Since the construction of the second-level blood relationship is indirect and depends on the code library, rather than being directly constructed by analyzing the original requirement document and the design document, the second-level blood relationship is considered to be weaker than the first-level blood relationship.
[0126] In this embodiment, for example, see Figure 2B , which is a schematic diagram of the second-level blood relationship tree structure constructed in this embodiment. In the figure, the solid line connects the elements with the first-level blood relationship, and the second-level blood relationship is connected by a dotted line. To facilitate the understanding of the second-level blood relationship, two different functional points are used as examples for introduction. The functional points involved are Figure 2B The function point numbered FUN-REG-01 (referred to as the first function point) and the function point numbered FUN-MS-01 (referred to as the second function point) are shown in FIG. Here, for the sake of convenience, the function entry function connected to the first function point is referred to as the first function entry function, and the function entry function connected to the second function point is referred to as the second function entry function. The original requirement in the tree structure to which the first function point belongs is referred to as the first original requirement, and the original requirement in the tree structure to which the second function point belongs is referred to as the second original requirement.
[0127] like Figure 2B In the example shown in , the first function entry function is represented as package1.class1.fun1, and the second function entry function is represented as package1.class1.fun2. In the example, according to the call chain, the first function entry function package1.class1.fun1 is implemented by calling the second function entry function package1.class1.fun2. Based on this connection, and in combination with the tree structure to which the first function point and the second function point belong, one or more second-level blood relations can be constructed as follows:
[0128] The second-level lineage relationship between the second function entry function package1.class1.fun2 and the first original requirement IR-2024-0001, the second-level lineage relationship between the second function point FUN-MS-01 and the first original requirement IR-2024-0001, the second-level lineage relationship between the first function entry function package1.class1.fun1 and the second original requirement IR-2024-0003, the second-level lineage relationship between the first function point FUN-REG-01 and the second original requirement IR-2024-0003, and the second-level lineage relationship between the first original requirement IR-2024-0001 and the second original requirement IR-2024-0003.
[0129] In addition, the second-level blood relationship may also be the relationship between the sub-requirements in the tree structure to which the first function point belongs and the nodes in the tree structure to which the second function point belongs, or the second-level blood relationship may also be the relationship between the sub-requirements in the tree structure to which the second function point belongs and the nodes in the tree structure to which the first function point belongs. Figure 2B The display capacity is limited, so not all possible second-level blood relationships are displayed one by one with dotted lines.
[0130] Combination Figure 2A As shown, before executing S1041-S1042, refer to the previous embodiment and execute S101-S103 to realize the construction of the first level of blood relationship and the acquisition of the call chain of the function entry function.
[0131] In this embodiment, according to the correspondence between the function point and the function entry function, the first function point corresponding to the first function entry function and the second function point corresponding to the second function entry function are determined; based on the tree structure to which the first function point belongs, the tree structure to which the second function point belongs, and the call chain, the second level of blood relationship between the second function entry function and the first original requirement corresponding to the first function point, between the second function point and the first original requirement, between the first function entry function and the second original requirement corresponding to the second function point, between the first function point and the second original requirement, and between the first original requirement and the second original requirement is constructed. Compared with the prior art, the method of the present application establishes the second level of blood relationship between elements through the correspondence between the function point and the function entry function, combined with the call relationship between the function entry functions and the constructed first level of blood relationship, and realizes the construction of a complete blood relationship. The influence of the code level on the blood relationship is taken into account. By constructing the first level of blood relationship and the second level of blood relationship, it is convenient for developers to quickly understand the blood relationship between various requirements in the development of software systems, and to query, analyze and apply the blood relationship. By applying the technical solution provided in the embodiments of the present application, even if the software project team members change frequently, new members can quickly learn the starting point of the software function requirements and understand the relationship between requirements, functions and functions.
[0132] See also Figure 3A , which is a flow chart of another embodiment of a blood relationship analysis method for software system development provided by the embodiment of the present application. When the blood relationship is constructed, if a function entry function is changed or the call relationship is changed, the constructed second-level blood relationship does not match the actual situation, resulting in errors in the blood relationship. Therefore, different from Figure 1A , Figure 3A This demonstrates a specific implementation method for updating the second-level blood relationship by monitoring changes in code files. Figure 3A S301-S304 and Figure 3B The second level blood relationship update process is introduced. Based on the above embodiment, the method also includes:
[0133] S301: Monitor changes in code files in the code base.
[0134] In this embodiment, whether the code files in the code library are changed, such as adding code, deleting code and modifying code, is monitored in real time.
[0135] S302: When a change in the target code file is detected, it is determined whether the first level of blood relationship contains a function entry function associated with the target code file.
[0136] In this embodiment, the function entry function is stored in the target code file. When the target code file is detected to have changed, it is determined whether the function entry function has a first-level blood relationship according to the function entry function in the target code file. If the function entry function has a first-level blood relationship, S303 is executed; if the function entry function does not have a first-level blood relationship, the process is terminated.
[0137] S303: If yes, re-call and parse the function entry function associated with the target code file to obtain a new call chain.
[0138] In this embodiment, when it is determined that the function entry function has a first-level blood relationship, all function entry functions in the design document are re-called and parsed under the code library preconfigured by the software system to obtain the call chain of the new function entry function based on the call link stack under the returned function entry function.
[0139] S304: Construct a second-level blood relationship according to the new call chain and the first-level blood relationship.
[0140] In this embodiment, the calling relationship between each function entry function and the constructed first-level blood relationship of "function entry function → function point → sub-requirement → original requirement" are extracted according to the calling chain of the updated function entry function, and the second-level blood relationship is constructed.
[0141] In this embodiment, by monitoring the changes of code files in the code library; when the target code file is detected to have changed, if it is determined through judgment that the first-level blood relationship contains the function entry function associated with the target code file, the function entry function associated with the target code file is re-called and parsed to obtain a new call chain; a second-level blood relationship is constructed based on the new call chain and the first-level blood relationship. Compared with the prior art, the method of the present application monitors the code files in the code library, and when it is determined that the function entry function with the first-level blood relationship has changed, a new call chain is obtained in time and the second-level blood relationship is updated, thereby ensuring the timeliness of the blood relationship, avoiding the problem of blood relationship mismatch due to code modification, and improving the accuracy of the blood relationship.
[0142] Furthermore, the present solution provides an implementation method for determining whether the first-level blood relationship contains a function entry function associated with the target code file by constructing a correspondence between the function entry function and the code file name. Based on the above embodiment, the method further includes:
[0143] Establish the correspondence between each functional entry function and the code file name.
[0144] In this embodiment, a correspondence between each functional entry function and a code file name is established as shown in Table 2. The class field in the function represents the same class, and functions of the same class are usually stored in the same code file.
[0145] Table 2 Correspondence between function entry functions and code file names
[0146]
[0147] A specific implementation of "when a change in the target code file is detected, determining whether the first level of blood relationship contains a function entry function associated with the target code file" in S302 includes:
[0148] When a change in the target code file is detected, the file name of the target code file is determined.
[0149] In this embodiment, when it is determined that an update of the target code file is monitored, the file name of the updated target code file is determined.
[0150] According to the correspondence between each function entry function and the code file name, the target function entry function corresponding to the file name of the target code file is determined.
[0151] In this embodiment, the target function entry function corresponding to the file name is determined according to the correspondence between each function entry function and the code file name in Table 2. For example, if the file name of the target code file to be updated is file1, then according to Table 2, it can be determined that the target function entry functions corresponding to the file name file1 are package1.class1.fun1 and package1.class1.fun2.
[0152] Determine whether the target function entry function is included in the first level blood relationship.
[0153] In this embodiment, it can be determined based on the constructed first-level blood relationship whether the target function entry function is included in the first-level blood relationship, so as to determine whether it is necessary to re-acquire the call chain to update the second-level blood relationship.
[0154] In this embodiment, by establishing a correspondence between each function entry function and the code file name; when a change in the target code file is detected, the file name of the target code file is determined; and the target function entry function is determined according to the established correspondence; and it is determined whether the first-level blood relationship contains the target function entry function. Compared with the prior art, the method of the present application monitors the target code, and when the target code changes, it determines whether the first-level blood relationship contains the target function entry function according to the correspondence between the function entry function and the code file name, so as to update the first-level blood relationship in time when the function entry function changes, thereby improving the timeliness of blood relationship updates, thereby ensuring the quality of software development and improving the accuracy of the provided blood relationship.
[0155] See also Figure 4A , which is a flow chart of another embodiment of a method for lineage analysis for software system development provided by an embodiment of the present application. Based on the above embodiment, a specific implementation of "constructing a second-level lineage relationship based on the call chain and the first-level lineage relationship" in S104 includes:
[0156] S401: Determine the calling relationship of each function involved in the calling chain according to the calling chain.
[0157] In this embodiment, for example, the call chain of the function entry function can be stored in a preconfigured database table in a tree structure, as shown in Table 2, where "0" in the function entry function field is a non-function entry function, and "1" is a function entry function. The parent function of the function entry function package1.class3.fun2 is the non-function entry function package1.class2.fun2, and the parent function of the non-function entry function package1.class2.fun2 is the function entry function package1.class1.fun1; the parent function of the function entry function package1.class1.fun2 is also the function entry function package1.class1.fun1.
[0158] S402: Construct a two-dimensional array between functions according to the calling relationship.
[0159] Among them, the value 1 in the two-dimensional array represents that there is a direct calling relationship between the function represented by the row corresponding to the value and the function represented by the column corresponding to the value.
[0160] For example, combining Figure 1BThe displayed call chain is shown in Table 3. A[0][1]=1, A[0][2]=1, which means that the function entry function package1.class1.fun1 corresponding to row 0 needs to call package1.class1.fun2 in the first column and package1.class3.fun2 in the second column.
[0161] Table 3 Function entry function call relationship table
[0162]
[0163] S403: Construct a second level blood relationship based on the two-dimensional array and the first level blood relationship.
[0164] In this embodiment, for example, based on the two-dimensional array, it can be determined that the function entry function package1.class1.fun1 is composed of package1.class1.fun2 and package1.class3.fun2; and the function point number of the first-level blood relationship of the function entry function package1.class1.fun1 is FUN-REG-01, the sub-requirement number is SR-2024-0001-01, and the original requirement number is SR-2024-0001; the function point number of the first-level blood relationship of the function entry function package1.class1.fun2 is FUN-MS-01, the sub-requirement number is SR-2024-0003-01, and the original requirement number is SR-2024-0003; the function point number of the first-level blood relationship of the function entry function package1.class3.fun2 is FUN-MS-02, the sub-requirement number is SR-2024-0004-01, and the original requirement number is SR-2024-0004.
[0165] See also Figure 4B , which is a schematic diagram of the blood relationship tree structure constructed in this embodiment; the second-level blood relationship is constructed based on the calling relationship represented by the above two-dimensional array and the first-level blood relationship. For example, the original requirement number SR-2024-0001 has a second-level blood relationship with SR-2024-0003 and SR-2024-0004 respectively.
[0166] Combination Figure 4A As shown, before executing S401-S403, referring to the previous embodiment, S101-S103 are executed to realize the construction of the first level of blood relationship and the acquisition of the call chain of the function entry function.
[0167] In this embodiment, the calling relationship of each function involved in the calling chain is determined according to the calling chain; a two-dimensional array between functions is constructed according to the calling relationship; and a second-level blood relationship is constructed based on the two-dimensional array and the first-level blood relationship. Compared with the prior art, the method of the present application constructs a two-dimensional array to represent the calling relationship between the function entry functions, making the calling relationship more intuitive and easy to understand; and on the basis of the existing first-level blood relationship, the two-dimensional data is combined with the first-level blood relationship to construct the second-level blood relationship, thereby realizing a clear and hierarchical representation of the blood relationship and improving the efficiency of blood relationship query and analysis.
[0168] Furthermore, based on the above embodiments, the method can also construct the first-level blood relationship and the second-level blood relationship in different dimensions by using a two-dimensional array.
[0169] For example, according to the above embodiment Figure 4B As shown in the figure, the tree structure of the first-level blood relationship and the second-level blood relationship between the function entry function and the original requirement is constructed, and a two-dimensional array of the function entry function and the original requirement is constructed to represent the blood relationship (where element 0 represents no blood relationship, 1 represents the first-level blood relationship, and 2 represents the second-level blood relationship). As shown in Table 4, by querying the row array elements, you can find out which original requirements a certain function entry function is related to. For example, taking array A[0], you will get that the function entry function package1.class1.fun1 has a first-level blood relationship with IR-2024-0001 and IR-2024-0002. Similarly, a two-dimensional array can be used to represent the blood relationship between function points and original requirements and the blood relationship between original requirements.
[0170] Table 4 The relationship between the entry function and the original requirement
[0171]
[0172] It should be noted that the value 2 in Table 4 indicates the calling relationship of the function entry function. If the function is connected to the original requirement by 1 in Table 4, it means that the function is the function entry function of the original requirement, and the two have a strong blood relationship, that is, a first-level blood relationship. For example, in combination with the value 2 in Table 4, package1.class1.fun2 is connected to IR-2024-0001 by 2, indicating that package1.class1.fun2 is called by the function entry function of the original requirement numbered IR-2024-0001; similarly, package1.class3.fun2 is connected to IR-2024-0001 by 2, indicating that package1.class3.fun2 is called by the function entry function of the original requirement numbered IR-2024-0001.
[0173] For example, according to the tree structure of the first-level blood relationship and the second-level blood relationship between the function entry function and the original demand constructed in the above embodiment, a two-dimensional array of function points (FUN-REG-01, FUN-REG-02, FUN-REG-10...) and original requirements (IR-2024-0001, IR-2024-0002, IR-2024-0003...) is constructed to represent the blood relationship. As shown in Table 5, it is similar to the construction method of the above-mentioned "first-level blood relationship and second-level blood relationship between the function entry function and the original demand", so that the influence range of the original demand can be retrieved through the function point, and the influence range of the function point can be retrieved through the original demand, which will not be repeated here.
[0174] Table 5 The relationship between function points and original requirements
[0175]
[0176] For example, a two-dimensional array of original requirements (IR-2024-0001, IR-2024-0002, IR-2024-0003…) and original requirements (IR-2024-0001, IR-2024-0002, IR-2024-0003…) is constructed to represent the blood relationship. The first-level blood relationship and the second-level blood relationship with the original requirements are shown in Table 6. Similar to the construction method of the above-mentioned "first-level blood relationship and second-level blood relationship between the function entry function and the original requirements", Table 6 can be constructed quickly according to Table 4. For example, to construct the blood relationship between IR-2024-0001 and other original requirements, you can find the column A[0..N][0] where "IR-2024-0001" is located in Table 4, traverse all elements in this column, and check whether the function entry function corresponding to this element has a blood relationship with other requirements based on non-zero elements. If there is a blood relationship, the blood relationship and type between "IR-2024-0001" and other requirements can be obtained based on this relationship. The blood relationship between each other can be retrieved through the original requirements, which will not be repeated here.
[0177] Table 6 The blood relationship between primitive needs and primitive needs
[0178]
[0179] See also Figure 5 , which is a flow chart of another embodiment of a method for blood relationship analysis for software system development provided by an embodiment of the present application. Based on the above embodiment, the method further includes:
[0180] S501: Obtain data lineage query instructions.
[0181] The data lineage query instruction includes elements to be queried of the software system, and the elements to be queried include at least one of the original requirement number, the sub-requirement number, the function point number and the function entry function.
[0182] S502: Querying elements that have a first-level blood relationship with the element to be queried, and / or querying elements that have a second-level blood relationship with the element to be queried.
[0183] In this embodiment, a query is performed based on the first-level blood relationship and the second-level blood relationship between the elements to be queried and the constructed original requirements, sub-requirements, function points, and function entry functions to obtain elements that have a first-level blood relationship and / or a second-level blood relationship with the elements to be queried.
[0184] For example, if Figure 4BAs shown, if the input element to be queried is the function entry function package1.class1.fun1, the function point with the first-level blood relationship with the entry function is FUN-REG-01, the corresponding sub-requirements are SR-2024-0002-01 and SR-2024-0001-01, and the corresponding original requirements are IR-2024-0002 and IR-2024-0001. The function entry functions with the second-level blood relationship with the entry function are package1.class1.fun2 and package1.class3.fun2, the corresponding function points are FUN-MS-01 and FUN-MS-02, the corresponding sub-requirements are SR-2024-0003-01 and SR-2024-0004-01, and the corresponding original requirements are IR-2024-0003 and IR-2024-0004.
[0185] S503: Display the queried elements.
[0186] In this embodiment, the queried elements that have a blood relationship with the element to be queried are displayed on the user interface.
[0187] In this embodiment, by obtaining a data lineage query instruction containing the elements to be queried of the software system, elements with a first-level lineage relationship with the elements to be queried are queried, and / or elements with a second-level lineage relationship with the elements to be queried are queried, and the queried elements are displayed. Compared with the prior art, the method of the present application performs a query based on the input elements to be queried by constructing a first-level lineage relationship and a second-level lineage relationship to obtain related elements with a lineage relationship with the elements to be queried and display them, which can quickly locate elements with a lineage relationship with the elements to be queried, and help developers quickly understand the source and association of data, so as to better understand the data structure and logic of the software system, thereby improving the efficiency of software system development.
[0188] See also Figure 6 , which is a schematic diagram of the structure of a blood relationship analysis device for software system development provided by an embodiment of the present application. The device 60 includes: a document acquisition module 61, a first analysis module 62, a call chain acquisition module 63 and a second analysis module 64.
[0189] Among them, the document acquisition module 61 is used to obtain the original requirement document and design document of the software system; in the original requirement document and design document, an original requirement is realized by one or more sub-requirements; in the design document, a sub-requirement is realized by one or more function points, and a function point is realized by a function entry function; the original requirement document also records the submission time of the original requirement.
[0190] The first analysis module 62 is used to construct the first-level blood relationship based on the original requirement document and the design document; the first-level blood relationship includes the hierarchical relationship between the original requirement, sub-requirement and function points, the corresponding relationship between the function point and the function entry function, and the temporal dependency between the original requirements.
[0191] The call chain acquisition module 63 is used to perform call analysis on the function entry function in the code library of the software system to obtain the call chain of the function entry function.
[0192] The second analysis module 64 is used to construct a second level of blood relationship based on the call chain and the first level of blood relationship.
[0193] The embodiment of the present application provides a blood relationship analysis device for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0194] Further, based on the above embodiment, the hierarchical relationship between the original requirement, the sub-requirement and the function point in the first level of blood relationship is stored in a tree structure; wherein the original requirement with the hierarchical relationship is the parent node of the sub-requirement, and the function point with the hierarchical relationship is the child node of the sub-requirement. If the call chain is implemented by calling the second function entry function for the first function entry function, the second analysis module 64 is specifically used to determine the first function point corresponding to the first function entry function and the second function point corresponding to the second function entry function according to the corresponding relationship between the function point and the function entry function.
[0195] The second analysis module 64 is further specifically used to construct a second-level blood relationship between the second function entry function and the first original requirement corresponding to the first function point, between the second function point and the first original requirement, between the first function entry function and the second original requirement corresponding to the second function point, between the first function point and the second original requirement, and between the first original requirement and the second original requirement based on the tree structure to which the first function point belongs, the tree structure to which the second function point belongs, and the call chain.
[0196] The embodiment of the present application provides a blood relationship analysis device for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0197] Further, based on the above embodiment, the device 60 further includes: a monitoring module 65 .
[0198] The monitoring module 65 is specifically used to monitor the changes of the code files in the code library; when the target code file is detected to have changed, it is determined whether the first-level blood relationship contains the function entry function associated with the target code file; if so, the function entry function associated with the target code file is re-called and parsed to obtain a new call chain; and a second-level blood relationship is constructed based on the new call chain and the first-level blood relationship.
[0199] The embodiment of the present application provides a blood relationship analysis device for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0200] Further, based on the above embodiments, the monitoring module 65 is specifically used to establish a correspondence between each function entry function and the code file name; when a change in the target code file is detected, the file name of the target code file is determined; based on the correspondence between each function entry function and the code file name, the target function entry function corresponding to the file name of the target code file is determined; and it is determined whether the target function entry function is included in the first-level blood relationship.
[0201] The embodiment of the present application provides a blood relationship analysis device for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0202] Further, based on the above embodiments, the first analysis module 62 is specifically used to input the original requirement document and the design document into a pre-trained information extraction model respectively to obtain the first metadata and the second metadata output by the information extraction model; the first metadata includes the key value information of the original requirement number, sub-requirement number and original requirement submission time in the original requirement document; the second metadata includes the key value information of the original requirement number, sub-requirement number, function point number and function entry function in the design document.
[0203] The first analysis module 62 is also specifically used to construct a top-down tree structure based on the original requirement number, sub-requirement number and function point number in the second metadata; the tree structure is used to represent the hierarchical relationship between the original requirements, sub-requirements and function points; in the tree structure, the function point number connects the function entry function corresponding to the function point represented by itself.
[0204] The first analysis module 62 is further specifically used to construct a time sequence dependency relationship between the original requirements in the tree structure based on the time sequence relationship of the key value information of the submission time of each original requirement in the first metadata.
[0205] The embodiment of the present application provides a blood relationship analysis device for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0206] Further, based on the above embodiment, the second analysis module 64 is specifically used to determine the calling relationship of each function involved in the calling chain according to the calling chain.
[0207] The second analysis module 64 is also specifically used to construct a two-dimensional array between functions according to the calling relationship; wherein a value of 1 in the two-dimensional array indicates that there is a direct calling relationship between the function represented by the row corresponding to the value and the function represented by the column corresponding to the value.
[0208] The second analysis module 64 is further specifically configured to construct a second level of blood relationship based on the two-dimensional array and the first level of blood relationship.
[0209] The embodiment of the present application provides a blood relationship analysis device for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0210] Further, based on the above embodiment, the device may further include: an instruction acquisition module 66 , a query module 67 and a display module 68 .
[0211] Among them, the instruction acquisition module 66 is used to obtain data lineage query instructions, which contain the elements to be queried of the software system, and the elements to be queried include at least one of the original requirement number, sub-requirement number, function point number and function entry function.
[0212] The query module 67 is used to query the elements that have a first-level blood relationship with the element to be queried, and / or query the elements that have a second-level blood relationship with the element to be queried.
[0213] The display module 68 is used to display the queried elements.
[0214] The embodiment of the present application provides a blood relationship analysis device for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0215] See also Figure 7 , which is a schematic diagram of the structure of a blood relationship analysis system for software system development provided by an embodiment of the present application. The system 70 includes: a blood relationship analysis device 60 and a call chain analysis device 71 connected to each other. Among them,
[0216] The lineage analysis device 60 is used to obtain the original requirement document and design document of the software system, and to construct the first-level lineage relationship based on the original requirement document and the design document; in the original requirement document and the design document, an original requirement is realized by one or more sub-requirements; in the design document, a sub-requirement is realized by one or more function points, and a function point is realized by a function entry function; the original requirement document also records the submission time of the original requirement; the first-level lineage relationship includes the hierarchical relationship between the original requirement, the sub-requirement and the function point, the corresponding relationship between the function point and the function entry function, and the temporal dependency between the original requirements.
[0217] The call chain analysis device 71 is used to perform call analysis on the function entry function in the code library of the software system, obtain the call chain of the function entry function, and feed the call chain back to the lineage analysis device 70.
[0218] The blood relationship analysis device 60 is also used to construct a second-level blood relationship based on the call chain and the first-level blood relationship.
[0219] The embodiment of the present application provides a blood relationship analysis system for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0220] Furthermore, a blood relationship analysis system 70 for software system development further includes: an artificial intelligence middle station 72. The artificial intelligence middle station 72 is connected to the blood relationship analysis device 60; the artificial intelligence middle station 72 is configured with a pre-trained information extraction model.
[0221] Among them, the blood relationship analysis device 60 is specifically used to call the artificial intelligence middle platform 72 to input the original requirement document and the design document into the pre-trained information extraction model respectively.
[0222] The artificial intelligence middle platform 72 is specifically used to extract key information from the original requirement document and the design document through an information extraction model, output the first metadata and the second metadata and provide them to the bloodline analysis device 60; the first metadata includes the key value information of the original requirement number, sub-requirement number and the original requirement submission time in the original requirement document; the second metadata includes the key value information of the original requirement number, sub-requirement number, function point number and function entry function in the design document.
[0223] The lineage analysis device 60 is also specifically used to construct a top-down tree structure based on the original requirement number, sub-requirement number and function point number in the second metadata; in the tree structure, the temporal dependency relationship between the original requirements is constructed based on the temporal sequence of the key value information of the submission time of each original requirement in the first metadata; the tree structure is used to represent the hierarchical relationship between the original requirements, sub-requirements and function points; in the tree structure, the function point number is connected to the function entry function corresponding to the function point represented by itself.
[0224] The embodiment of the present application provides a blood relationship analysis system for software system development that can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0225] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0226] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A lineage analysis method for software system development, It is characterized in that include: Obtaining original requirement documents and design documents of the software system; in the original requirement documents and the design documents, one original requirement is implemented by one or more sub-requirements; in the design document, one sub-requirement is implemented by one or more function points, and one function point is implemented by a function entry function; the original requirement document also records the submission time of the original requirement; A first-level blood relationship is established according to the original requirement document and the design document; the first-level blood relationship includes a hierarchical relationship among the original requirement, the sub-requirement and the function point, a corresponding relationship between the function point and the function entry function, and a temporal dependency relationship between the original requirements; Performing call analysis on the function entry function in the code base of the software system to obtain a call chain of the function entry function; A second-level blood relationship is constructed according to the call chain and the first-level blood relationship; the second-level blood relationship specifically refers to: a blood relationship that cannot be directly established through the original requirement document and the design document, but can be indirectly analyzed through the code base and the call chain; The step of constructing a second-level blood relationship according to the call chain and the first-level blood relationship includes: Determining, according to the call chain, a call relationship of each function involved in the call chain; Construct a two-dimensional array between functions according to the calling relationship; wherein a value of 1 in the two-dimensional array indicates that there is a direct calling relationship between the function represented by the row corresponding to the value and the function represented by the column corresponding to the value; constructing the second-level blood relationship based on the two-dimensional array and the first-level blood relationship; In the method, a first-level blood relationship and a second-level blood relationship are constructed in different dimensions by using a two-dimensional array, including: Constructing a two-dimensional array of a functional entry function and an original requirement with different values to represent the first-level blood relationship and the second-level blood relationship; and / or, Construct a two-dimensional array of function points and original requirements with different values to represent the first-level blood relationship and the second-level blood relationship; and / or, Constructing the original demand and the two-dimensional array of the original demand to represent the first-level blood relationship and the second-level blood relationship with different numerical values.
2. The method according to claim 1, It is characterized in that The hierarchical relationship among the original requirement, the sub-requirement and the function point in the first-level blood relationship is stored in a tree structure; wherein the original requirement with the hierarchical relationship is used as the parent node of the sub-requirement, and the function point with the hierarchical relationship is used as the child node of the sub-requirement; If the call chain is implemented by the first function entry function calling the second function entry function, the step of constructing the second level of blood relationship according to the call chain and the first level of blood relationship includes: Determine, according to the correspondence between function points and function entry functions, a first function point corresponding to the first function entry function and a second function point corresponding to the second function entry function; Based on the tree structure to which the first function point belongs, the tree structure to which the second function point belongs, and the call chain, a second-level blood relationship is constructed between the second function entry function and the first original requirement corresponding to the first function point, between the second function point and the first original requirement, between the first function entry function and the second original requirement corresponding to the second function point, between the first function point and the second original requirement, and between the first original requirement and the second original requirement.
3. The method according to claim 1, It is characterized in that Also includes: Monitoring changes in code files in the code repository; When a change in the target code file is detected, determining whether the first level of blood relationship contains a function entry function associated with the target code file; If yes, re-call and parse the function entry function associated with the target code file to obtain a new call chain; A second level of blood relationship is constructed based on the new call chain and the first level of blood relationship.
4. The method according to claim 3, It is characterized in that Also includes: Establish the corresponding relationship between each functional entry function and the code file name; When a change in the target code file is detected, determining whether the first level of blood relationship includes a function entry function associated with the target code file includes: When a change in the target code file is detected, determining the file name of the target code file; According to the correspondence between each function entry function and the code file name, determine the target function entry function corresponding to the file name of the target code file; Determine whether the first level of blood relationship includes the target function entry function.
5. The method according to claim 1, It is characterized in that The step of constructing a first-level blood relationship according to the original requirement document and the design document includes: Input the original requirement document and the design document into a pre-trained information extraction model respectively, and obtain the first metadata and the second metadata output by the information extraction model; the first metadata includes the key value information of the original requirement number, the sub-requirement number and the original requirement submission time in the original requirement document; the second metadata includes the key value information of the original requirement number, the sub-requirement number, the function point number and the function entry function in the design document; A tree structure is constructed from top to bottom according to the original requirement number, sub-requirement number and function point number in the second metadata; the tree structure is used to represent the hierarchical relationship between the original requirement, sub-requirement and function point; in the tree structure, the function point number is connected to the function entry function corresponding to the function point represented by itself; In the tree structure, a temporal dependency relationship between the original requirements is constructed based on the temporal sequence of the key value information of the submission time of each original requirement in the first metadata.
6. The method according to claim 1, It is characterized in that Also includes: Obtaining a data lineage query instruction, wherein the data lineage query instruction includes a to-be-queried element of the software system, wherein the to-be-queried element includes at least one of an original requirement number, a sub-requirement number, a function point number, and a function entry function; Querying the elements having the first level of blood relationship with the element to be queried, and / or querying the elements having the second level of blood relationship with the element to be queried; Display the queried features.
7. A blood relationship analysis device for software system development, It is characterized in that include: A document acquisition module is used to acquire the original requirement document and design document of the software system; in the original requirement document and the design document, one original requirement is realized by one or more sub-requirements; in the design document, one sub-requirement is realized by one or more function points, and one function point is realized by one function entry function; the original requirement document also records the submission time of the original requirement; A first analysis module is used to construct a first-level blood relationship according to the original requirement document and the design document; the first-level blood relationship includes a hierarchical relationship between the original requirement, the sub-requirement and the function point, a corresponding relationship between the function point and the function entry function, and a temporal dependency relationship between the original requirements; A call chain acquisition module, used to perform call analysis on the function entry function in the code library of the software system to obtain a call chain of the function entry function; A second analysis module is used to construct a second-level blood relationship according to the call chain and the first-level blood relationship; the second-level blood relationship specifically refers to: a blood relationship that cannot be directly established through the original requirement document and the design document, but can be indirectly analyzed through the code base and the call chain; The second analysis module is specifically used to determine the calling relationship of each function involved in the calling chain according to the calling chain; construct a two-dimensional array between functions according to the calling relationship; wherein a value of 1 in the two-dimensional array indicates that there is a direct calling relationship between the function represented by the row corresponding to the value and the function represented by the column corresponding to the value; and construct the second-level blood relationship based on the two-dimensional array and the first-level blood relationship; The device further includes an array construction module, which is used to construct the first-level blood relationship and the second-level blood relationship in different dimensions by using a two-dimensional array; the array construction module is specifically used to: Constructing a two-dimensional array of a functional entry function and an original requirement with different values to represent the first-level blood relationship and the second-level blood relationship; and / or, Construct a two-dimensional array of function points and original requirements with different values to represent the first-level blood relationship and the second-level blood relationship; and / or, Constructing the original demand and the two-dimensional array of the original demand to represent the first-level blood relationship and the second-level blood relationship with different numerical values.
8. A blood relationship analysis system for software system development, It is characterized in that include: A blood relationship analysis device and a call chain analysis device are interconnected; wherein, The lineage analysis device is used to obtain the original requirement document and design document of the software system, and to construct a first-level lineage relationship based on the original requirement document and the design document; in the original requirement document and the design document, an original requirement is implemented by one or more sub-requirements; in the design document, a sub-requirement is implemented by one or more function points, and a function point is implemented by a function entry function; the original requirement document also records the submission time of the original requirement; the first-level lineage relationship includes the hierarchical relationship between the original requirement, the sub-requirement and the function point, the corresponding relationship between the function point and the function entry function, and the temporal dependency relationship between the original requirements; The call chain analysis device is used to perform call analysis on the function entry function under the code base of the software system, obtain the call chain of the function entry function, and feed the call chain back to the lineage analysis device; The blood relationship analysis device is further used to construct a second-level blood relationship according to the call chain and the first-level blood relationship; the second-level blood relationship specifically refers to: a blood relationship that cannot be directly established through the original requirement document and the design document, but can be indirectly analyzed through the code library and the call chain; The blood relationship analysis device is specifically used to determine the calling relationship of each function involved in the calling chain according to the calling chain; construct a two-dimensional array between functions according to the calling relationship; wherein the value 1 in the two-dimensional array represents that there is a direct calling relationship between the function represented by the row corresponding to the value and the function represented by the column corresponding to the value; construct the second-level blood relationship based on the two-dimensional array and the first-level blood relationship; The blood relationship analysis device is also used to construct the first-level blood relationship and the second-level blood relationship in different dimensions by using a two-dimensional array, and the specific method includes: Constructing a two-dimensional array of a functional entry function and an original requirement with different values to represent the first-level blood relationship and the second-level blood relationship; and / or, Construct a two-dimensional array of function points and original requirements with different values to represent the first-level blood relationship and the second-level blood relationship; and / or, Constructing the original demand and the two-dimensional array of the original demand to represent the first-level blood relationship and the second-level blood relationship with different numerical values.
9. The system according to claim 8, It is characterized in that The system further comprises: an artificial intelligence middle station; the artificial intelligence middle station is connected to the blood relationship analysis device; the artificial intelligence middle station is configured with a pre-trained information extraction model; The blood relationship analysis device is specifically used to call the artificial intelligence middle platform to input the original requirement document and the design document into the pre-trained information extraction model respectively; The artificial intelligence middle station is used to extract key information from the original requirement document and the design document through the information extraction model, output the first metadata and the second metadata and provide them to the blood relationship analysis device; the first metadata includes the key value information of the original requirement number, sub-requirement number and original requirement submission time in the original requirement document; the second metadata includes the key value information of the original requirement number, sub-requirement number, function point number and function entry function in the design document; The bloodline analysis device is specifically used to construct a top-down tree structure based on the original requirement number, sub-requirement number and function point number in the second metadata; in the tree structure, the temporal dependency relationship between the original requirements is constructed based on the temporal sequence of the key value information of the submission time of each original requirement in the first metadata; the tree structure is used to represent the hierarchical relationship between the original requirements, sub-requirements and function points; in the tree structure, the function point number is connected to the function entry function corresponding to the function point represented by itself.
