Software development workload checking method and device, equipment and storage medium
By using difference analysis and semantic extraction, the problem of consistency verification between code implementation and design document changes was solved, enabling automated and objective evaluation of software development workload and generating efficient and accurate verification reports.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies struggle to automate and accurately verify the consistency between code implementation and design document changes, making it impossible to objectively assess the workload of software development.
By analyzing the differences and extracting semantics from design documents and source code, improvement item descriptions and code modification descriptions are generated. Furthermore, by establishing a difference mapping relationship through correlation analysis, a workload verification report is generated.
It enables automated and objective verification of software development workload, generates verification reports with appropriate detail, and provides efficient, accurate, and reliable decision-making basis for workload assessment.
Smart Images

Figure CN121786769A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, and storage medium for verifying software development workload. Background Technology
[0002] In software development projects, the client (the requesting party) needs to effectively verify the actual workload of the developer (the vendor) to ensure that the project cost is reasonable and the software implementation meets design expectations. Traditional methods mainly rely on manual code review and functional testing, which are inefficient and highly subjective. In particular, it is difficult to systematically verify the logical correspondence between code modifications and design document changes, thus failing to achieve objective and automated workload assessment. Summary of the Invention
[0003] This invention provides a method, apparatus, device, and storage medium for verifying software development workload, in order to solve the problem in the prior art that it is difficult to automate and accurately verify the consistency between code implementation and design document changes, thus making it impossible to objectively assess the true workload of development work.
[0004] According to one aspect of the present invention, a method for verifying software development workload is provided, the method comprising:
[0005] Obtain the first design document version and the second design document version of the project to be verified, as well as the first source code version and the second source code version associated with the first design document version and the second design document version, respectively;
[0006] Based on the first and second design document versions, difference analysis and semantic extraction are performed to obtain the corresponding improvement item descriptions;
[0007] Based on the first and second source code versions, we perform difference analysis and semantic extraction to obtain the corresponding code modification descriptions;
[0008] A correlation analysis was performed between the descriptions of improvement items and the descriptions of code modifications to determine the difference mapping relationship;
[0009] Based on the descriptions of improvement items, code modifications, and difference mappings, a workload verification report is generated.
[0010] According to another aspect of the present invention, a software development workload verification device is provided, the device comprising:
[0011] The data acquisition module is used to acquire the first design document version and the second design document version of the project to be verified, as well as the first source code version and the second source code version associated with the first design document version and the second design document version, respectively.
[0012] The document analysis module is used to perform difference analysis and semantic extraction based on the first design document version and the second design document version to obtain the corresponding improvement item descriptions;
[0013] The code analysis module is used to perform difference analysis and semantic extraction based on the first source code version and the second source code version to obtain the corresponding code modification description;
[0014] The correlation analysis module is used to perform correlation analysis between improvement item descriptions and code modification descriptions to determine the difference mapping relationship;
[0015] The report generation module is used to generate a workload verification report based on the improvement item description, code modification description, and difference mapping relationship.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the software development workload verification method according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the software development workload verification method according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the software development workload verification method described in any embodiment of the present invention.
[0022] The technical solution of this invention involves obtaining a first design document version and a second design document version of the project to be verified, as well as a first source code version and a second source code version associated with the first and second design document versions, respectively. Based on the first and second design document versions, difference analysis and semantic extraction are performed to obtain corresponding improvement item descriptions. Based on the first and second source code versions, difference analysis and semantic extraction are performed to obtain corresponding code modification descriptions. Association analysis is performed on the improvement item descriptions and code modification descriptions to determine the difference mapping relationship. Based on the improvement item descriptions, code modification descriptions, and difference mapping relationship, a workload verification report is generated. This solution can automatically acquire and analyze different versions of design documents and source code, extracting semantic improvement item descriptions and code modification descriptions respectively. Through intelligent association analysis, a precise mapping relationship between the two is established, thereby objectively verifying the authenticity of the development work. Finally, a verification report with appropriate detail is automatically generated, providing an efficient, accurate, and reliable decision-making basis for workload assessment.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart of a software development workload verification method provided in Embodiment 1 of the present invention;
[0026] Figure 2 This is a flowchart of a software development workload verification method provided in Embodiment 2 of the present invention;
[0027] Figure 3 This is a schematic diagram of the workload verification process provided in Embodiment 2 of the present invention;
[0028] Figure 4 This is a schematic diagram of a software development workload verification device according to Embodiment 3 of the present invention;
[0029] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the software development workload verification method of this invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] Example 1
[0033] Figure 1 This is a flowchart of a software development workload verification method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where the actual workload of software developers is verified by detecting the consistency between code and design documents. This method can be executed by a software development workload verification device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown in the figure, the software development workload verification method provided in this embodiment includes the following steps:
[0034] S110. Obtain the first design document version and the second design document version of the project to be verified, as well as the first source code version and the second source code version associated with the first design document version and the second design document version, respectively.
[0035] Among them, the projects to be verified can refer to software development projects that require software development workload calculation, progress verification, results verification, or cost assessment.
[0036] The first design document version and the second design document version can refer to design documents saved at different points in time during the software development process. The design document version can be a file that describes the design content such as software development requirements, architecture, functions, and interface, and can be uniquely identified by information such as version number, timestamp, or submission record.
[0037] The first source code version and the second source code version can refer to the complete set of program code files written to implement software functions at a specific point in time, and are associated with the first design document version and the second design document version respectively. They can be uniquely identified by information such as submission hash, tag name, branch name or build number.
[0038] In this embodiment of the invention, the scope and objectives of the project to be checked can be defined first, and the first design document version and the second design document version to be compared can be determined. Then, for each design document version, the corresponding source code version can be located and obtained in the version control system (such as Git) or code repository of the same project based on its version number, timestamp and other information, so as to obtain the first source code version associated with the first design document version and the second source code version associated with the second design document version.
[0039] S120. Based on the first design document version and the second design document version, perform difference analysis and semantic extraction to obtain the corresponding improvement item descriptions.
[0040] The improvement description can refer to a structured and generalized textual statement formed after semantic extraction of the differences between the first and second design document versions. It is used to clearly describe the specific functions, performance points or other technical requirements added, optimized or fixed in the new version of the software.
[0041] In this embodiment of the invention, after obtaining the first design document version and the second design document version, a comprehensive comparison of the text content and non-text content of the two versions can be carried out to identify various additions, deletions, changes and modifications, and to integrate and filter out effective document differences with substantial design significance. Then, keywords, core intents and related information are extracted from the effective document differences through semantic parsing. Finally, a standardized improvement item description is generated according to the preset specifications to ensure that the improvement item description is clear, unambiguous and can directly reflect the substantial content of the design change and the workload related attributes.
[0042] S130. Based on the first and second source code versions, perform difference analysis and semantic extraction to obtain the corresponding code modification descriptions.
[0043] In this context, code modification descriptions can refer to structured descriptions of changes to the source code, presented in natural language or highly generalized terms. They not only indicate where the changes were made, but more importantly, explain what functionality the changes implemented, what defects were fixed, or what optimizations were made.
[0044] In this embodiment of the invention, after obtaining the first source code version and the second source code version, static differences between the two versions in terms of syntax structure, function definition, etc. can be identified through static analysis (such as syntax tree parsing). At the same time, the two versions are executed in a secure operating environment to obtain dynamic differences such as runtime performance and output results. Then, the static and dynamic difference data are merged, invalid differences are eliminated and the data is organized in a structured manner according to the change type. Then, the core semantic features of the differences are extracted based on code domain knowledge or semantic analysis models, and finally, a standardized code modification description is generated to fully cover the core connotation, implementation method and scope of impact of the code change.
[0045] S140. Perform correlation analysis on the description of improvement items and the description of code modifications to determine the difference mapping relationship.
[0046] Among them, correlation analysis can refer to the process of semantically understanding and comparing the description of improvement items and the description of code modifications, and quantitatively evaluating and judging whether there is a logical correspondence between the two, such as implementation, correction or optimization.
[0047] A difference mapping relationship can refer to a structured set of information representing the correspondence between improvement item descriptions and code modification descriptions. Each correspondence can include matching pair information (identifiers of both parties), quantitative indicators representing the strength of the association (such as relationship score, similarity score), etc. This mapping relationship will serve as the core basis for generating the final workload verification report. For example, suppose an improvement item (description) A is generated through document difference detection, and three code modification descriptions X, Y, and Z are generated through code difference detection. Then, by performing association analysis on improvement item A with code modification descriptions X, Y, and Z respectively, the similarity scores between each pair are found to be 0.96, 0.64, and 0.45, respectively. Based on this, it can be determined that improvement item (description) A and code modification description X have a strong association relationship, that is, code modification X implements the core function described by improvement item A.
[0048] In this embodiment of the invention, after generating improvement item descriptions from the document side and code modification descriptions from the code side, different improvement item descriptions and code modification descriptions can be analyzed and compared based on multiple dimensions such as semantic consistency, functional module relevance, and change type correspondence, and the functional implementation correlation strength between the two pairs can be quantified (such as relationship score, similarity score); then, based on the correlation strength, the mapping relationship between the two descriptions and the matching type (such as exact implementation, partial implementation, etc.) are determined; finally, the determined mapping relationship is standardized and structured, integrating the unique identifier, correlation strength, matching type and other information of the two descriptions, thereby establishing a difference mapping relationship between improvement item descriptions and code modification descriptions.
[0049] S150. Based on the description of improvement items, code modification description, and difference mapping relationship, generate a workload verification report.
[0050] The workload verification report can be a comprehensive document generated by integrating the analysis results of improvement items, code modifications and their mapping relationships. It reflects the rationality of software development workload and the consistency of design code. The document may include information such as workload statistics, mapping details, risk warnings, and verification conclusions, and is presented in the form of text, visual charts, etc. It aims to provide conclusive evidence for the review and evaluation of software development workload.
[0051] In this embodiment of the invention, by integrating the above-generated improvement item descriptions, code modification descriptions, and difference mapping relationships, a workload verification report containing natural language descriptions, visual charts, workload statistics summaries, and risk warnings can be generated, thereby providing users with a reliable basis for workload verification and realizing the automation, objectification, and intelligence of software development workload verification.
[0052] The technical solution of this invention involves obtaining a first design document version and a second design document version of the project to be verified, as well as a first source code version and a second source code version associated with the first and second design document versions, respectively. Based on the first and second design document versions, difference analysis and semantic extraction are performed to obtain corresponding improvement item descriptions. Based on the first and second source code versions, difference analysis and semantic extraction are performed to obtain corresponding code modification descriptions. Association analysis is performed on the improvement item descriptions and code modification descriptions to determine the difference mapping relationship. Based on the improvement item descriptions, code modification descriptions, and difference mapping relationship, a workload verification report is generated. This solution can automatically acquire and analyze different versions of design documents and source code, extracting semantic improvement item descriptions and code modification descriptions respectively. Through intelligent association analysis, a precise mapping relationship between the two is established, thereby objectively verifying the authenticity of the development work. Finally, a verification report with appropriate detail is automatically generated, providing an efficient, accurate, and reliable decision-making basis for workload assessment.
[0053] Furthermore, based on the above embodiments of the invention, S110 specifically includes:
[0054] S1101. Determine the first and second design document versions selected for the project to be verified;
[0055] S1102. Based on the attribute information of the first design document version and the second design document version, obtain the corresponding first source code version and the second source code version in the preset project version control system.
[0056] The attribute information can refer to metadata associated with the design document version, such as the document's creation / modification date, version number, associated commit hash, project build number, or any tag information that can identify its time and status.
[0057] A pre-defined project version control system can refer to a tool or platform used to manage and track the change history of project source code and design documents. It has functions such as version storage, commit record tracing, version matching query, and relationship management. For example, it may include, but is not limited to, Git, Mercurial, Subversion (SVN), and Perforce.
[0058] In this embodiment of the invention, the specific process of obtaining two design document versions and source code versions of the project to be verified includes:
[0059] (1) For a project to be verified, two specific design document versions can be actively selected from the project's design document history for comparison. For example, the initial design document of the project to be verified can be selected as the first design document version, and the final design document before project acceptance can be selected as the second design document version.
[0060] (2) Obtain the attribute information of the selected first and second design document versions, such as the release date, last commit identifier, and associated project build number. Then, based on this information as query clues or time anchors, automatically search and locate the source code versions built and committed under the same time point or logical relationship in the preset version control system (such as Git or SVN repository). That is, obtain the first source code version associated with the first design document version and the second source code version associated with the second design document version. For example, based on the release date of design document V2.0, find the last successful code build version before that date and mark it as the second source code version.
[0061] Furthermore, based on the above embodiments of the invention, S120 specifically includes:
[0062] S1201. Compare and analyze the text content in the first design document version and the second design document version to generate text difference information;
[0063] S1202. Identify and compare the non-text content in the first design document version and the second design document version, and generate non-text difference information.
[0064] S1203. Merge textual difference information and non-textual difference information to generate document difference information;
[0065] S1204. Perform semantic analysis on the document difference information and extract the keyword set;
[0066] S1205. Match the keyword set with the preset software domain knowledge graph to obtain decision support information;
[0067] S1206. Input the document difference information, keyword set and decision support information into the preset text semantic understanding model to generate the corresponding improvement item description.
[0068] Among them, text difference information can refer to structured data records that identify text additions, deletions, modifications and their specific locations by comparing the text content of two versions of design documents.
[0069] Non-textual difference information can refer to a structured description of changes in the content, location, or status of images, charts, and other non-textual content generated by identifying and comparing two versions of design documents.
[0070] Document difference information can refer to a structured information set that comprehensively covers the differences between design document versions after associating, deduplicating, and integrating textual and non-textual difference information.
[0071] A keyword set can refer to a collection of information extracted from document difference information, which includes core elements such as technical terms, functional module names, change actions, and key parameters.
[0072] A pre-built software domain knowledge graph can refer to a data system that organizes and stores knowledge in the software engineering domain in a graphical structure. Nodes represent entities such as technical concepts, tools, and modules, while edges represent various relationships between entities (such as dependency, implementation, and belonging).
[0073] Decision support information can refer to relevant background knowledge and related information obtained by matching a set of keywords with a pre-defined software domain knowledge graph, which can help understand the context, assess the impact, or make judgments. For example, it can include auxiliary information used for classifying improvement items, assessing workload, and determining invalid differences.
[0074] A pre-trained text semantic understanding model can refer to an artificial intelligence model that is pre-trained and can generate standardized improvement item descriptions by integrating multi-dimensional inputs (document difference information, keyword set and decision support information). For example, a pre-trained text semantic understanding model can include at least a Bidirectional Encoder Representations from Transformers (BERT) model.
[0075] In this embodiment of the invention, the specific process of document difference detection and improvement item description extraction includes:
[0076] (1) For the first and second design document versions of the project to be verified, a pre-configured text comparison algorithm or model can be used to perform a fine comparison of the text content between the two, accurately identify all text-level changes, and generate structured text difference information; among them, the comparison dimensions may include, but are not limited to, text addition and deletion, sentence modification, paragraph replacement, word order adjustment, numerical / parameter changes, etc.
[0077] (2) For non-text content other than plain text in two design document versions, such as flowcharts, system architecture diagrams, module interaction diagrams, data tables, schematic diagrams, formulas, and charts, corresponding recognition methods can be used to detect the differences between the two and generate structured non-textual difference information. For example, for graphic non-text content, the differences can be determined by extracting graphic features (such as lines, nodes, layout, and color) and calculating structural similarity; for table non-text content, the differences can be determined by verifying the consistency of the number of rows and columns, cell data, and table header information; for formula / chart non-text content, the differences can be determined by comparing core features such as parameters, coordinates, and trends.
[0078] (3) According to the pre-set fusion rules or weights, the aforementioned generated text difference information and non-text difference information are fused and analyzed to comprehensively judge the changes in document content, and finally generate a unified document difference information containing multi-dimensional change descriptions. In one embodiment, the position and semantic relationship between text difference information and non-text difference information in the design document can be analyzed. For example, the newly added "user password retrieval" text paragraph can be matched with the newly added corresponding button image to establish a mapping relationship between the two types of information. Then, based on factors such as the length and keyness of the text change and the importance of non-text elements, the fusion weight representing the overall impact of the change is calculated. Finally, all the associated and quantified difference information is synthesized into a unified structured data object, namely document difference information, thereby forming a complete, coherent and quantitatively evaluated panoramic view of document changes, laying a solid foundation for subsequent in-depth semantic understanding.
[0079] (4) Using natural language processing technology, identify key entities, technical terms, functional modules, descriptions of change actions, and other core information in the document difference information, and extract a set of keywords that can represent the essence of document changes to provide structured input for subsequent in-depth understanding.
[0080] (5) The extracted keyword set is matched with a pre-built knowledge graph that covers concepts, technologies, functional modules and their relationships in the field of software engineering. By retrieving entity nodes (such as technical components, functional modules, common problems or optimization patterns) associated with these keywords in the knowledge graph and traversing the semantic relationship paths between nodes (such as implementation, dependency, belonging), deep contextual information such as technical background, typical implementation schemes, potential impact and best practices related to the current document change is obtained. Finally, the retrieved and integrated knowledge is transformed into structured decision support information output, providing key knowledge support for the subsequent model to accurately understand the complete intent and importance of the improvement items.
[0081] (6) Input the obtained document difference information, keyword set and decision support information into a pre-trained preset text semantic understanding model. The model will integrate this information to deeply understand the complete functional requirements, performance optimization points or problem repair intentions expressed by the document changes, and automatically generate accurate, concise and easy-to-understand descriptions of the improvements.
[0082] This invention, by integrating multimodal information and domain knowledge, achieves a precise understanding and automated summary of the design intent behind document changes. This not only significantly improves the efficiency and scope of analysis (covering text and images), but more importantly, greatly enhances the quality and depth of understanding of the changes. It provides direct, reliable, and high-value input for subsequent code consistency checks, workload assessments, and other processes, fundamentally improving the automation level and objectivity of software project management and auditing.
[0083] Furthermore, based on the above embodiments of the invention, S130 specifically includes:
[0084] S1301. Perform static syntax structure analysis on the first source code version and the second source code version to generate structural difference data;
[0085] S1302. Call the preset machine learning model to classify the structural difference data and generate code difference information;
[0086] S1303. Input the code difference information into the preset code semantic understanding model to generate an initial code modification description;
[0087] S1304. Dynamically run the first source code version and the second source code version respectively, obtain and compare runtime performance indicators to generate performance difference information;
[0088] S1305. Based on the performance difference information, determine the code difference impact index corresponding to each initial code modification description;
[0089] S1306. Based on the code difference impact index, the initial code modification descriptions are filtered and ranked by importance to obtain the corresponding code modification descriptions.
[0090] Static syntax analysis refers to the technical means of identifying and comparing the differences in syntax elements (such as function signatures, class definitions, loop structures, conditional branches, etc.) and their organizational relationships between different versions of source code by parsing the abstract syntax tree (AST), control flow graph (CFG), or data flow graph (DFG) of the source code without actually executing the program.
[0091] Structural difference data can refer to a collection of information derived from static syntactic structure analysis, used to systematically describe changes such as additions, deletions, and modifications that exist between two source code versions at the syntactic structure level. For example, it can include detailed information such as the type of change, the location of the change, and code snippets before and after the change.
[0092] A pre-set machine learning model can refer to an artificial intelligence model that has been trained in advance using sample data and is used to classify and identify data with differences in code structure. It can include, but is not limited to, classifiers, neural network models, deep learning models, etc.
[0093] Code difference information can refer to code change description information that is more structured and easier to understand semantically after being classified by a preset machine learning model, and has difference classification labels.
[0094] A pre-defined code semantic understanding model can refer to an artificial intelligence model specifically trained for code semantics, capable of converting structured code differences into code modifications described in natural language. For example, a pre-defined code semantic understanding model may include at least the CodeBERT model.
[0095] The initial code modification description can refer to the unfiltered and unoptimized code difference description in natural language form output by the preset code semantic understanding model. It can include information such as the state before and after the code change and the differences between the code.
[0096] Dynamic execution can refer to the process of actually executing a source code version or core functional module in a real or simulated software and hardware environment, and observing and recording its runtime behavior (such as output results, performance indicators, resource consumption, etc.).
[0097] Runtime performance metrics can refer to key data that are collected in real time during the execution of source code and reflect the system's operating status. These metrics may include execution time, CPU utilization, memory usage, and the number of function calls.
[0098] Performance difference information can refer to structured data that characterizes performance changes by comparing runtime performance metrics of two source code versions. For example, it can include information such as benchmark values, target values, and rates of change.
[0099] Code difference impact metrics can refer to indicators that quantify the impact of code differences on system operation based on performance difference information. They are used to measure the magnitude or importance of the impact of a specific code modification on the overall or specific aspects of the program's runtime performance.
[0100] In this embodiment of the invention, the specific process of code difference detection and code modification description extraction includes:
[0101] (1) Perform static syntax structure analysis on the first and second source code versions, independent of program execution. This involves analyzing and comparing the syntactic components (such as functions, classes, control flow statements, data structure definitions, etc.) and their organizational relationships to identify all changes at the programming language syntax level and generate detailed structural difference data, i.e., code difference information. This step ensures that code change detection reaches the logical structure level, avoiding interference from non-substantial changes such as code formatting adjustments and comment modifications.
[0102] (2) Call a pre-trained machine learning model to automatically analyze the aforementioned structural difference data. The model can classify each difference point into a predefined category based on the characteristics of the difference (such as the location of the change, the pattern of the change, the language elements involved, etc.), such as new features, defect fixes, performance optimizations, code refactoring, or no substantial changes, thereby generating code difference information with category labels.
[0103] (3) Input the generated code difference information into a pre-defined code semantic understanding model (such as CodeBERT) that is specifically designed to understand the semantics of programming languages. This model can integrate the context of the code difference, category labels, and its own code knowledge to generate an initial code modification description in natural language for each important difference point. This description can include the location of the code modification and the function it implements or the problem it fixes.
[0104] (4) Build an independent preset running environment (such as a sandbox environment, test server environment, etc.) to ensure that the running process is not affected by external interference; then run the first source code version and the second source code version of the program completely in this environment; collect and record the key runtime performance indicators of the two versions during the running process through monitoring tools, such as the number of calls to specific functions, the execution time of key processes, the memory usage of the system, etc.; finally, by comparing the performance indicator data of the two versions, identify the magnitude of indicator changes, trend differences and abnormal fluctuations, and generate corresponding performance difference information to quantify the impact of code changes on the actual running behavior of the program.
[0105] (5) Based on the generated performance difference information, extract the relevant performance index change rate for each initial code modification description in the aforementioned output, and perform comprehensive calculation using preset calculation rules (such as weighted summation formula) to determine the code difference impact index corresponding to each initial code modification description. This index can be used to quantify the comprehensive impact of the code modification on the system runtime performance.
[0106] (6) Based on the calculated code difference impact index, all initial code modification descriptions are processed. For example, initial code modification descriptions with low code difference impact index (i.e., negligible impact on runtime) can be filtered out according to a pre-set threshold. Then, the remaining initial code modification descriptions are sorted by importance from high to low according to the code difference impact index, and finally, the filtered and sorted code modification descriptions (set) are output to ensure that the final output code modification information is high-quality, focuses on substantial and significant changes, and provides a refined core basis for subsequent workload assessment.
[0107] This invention combines static syntax analysis and dynamic runtime verification to discover all changes in code structure and quantify the impact of these changes on the actual program operation. This avoids the bias and subjectivity of relying solely on text comparison or manual review. By utilizing machine learning models and code semantic understanding models, it automatically completes difference classification and natural language description generation, greatly improving processing efficiency and consistency and reducing reliance on professional personnel. Through a screening and ranking mechanism based on quantitative impact indicators, it can automatically filter out a large number of trivial or insignificant modifications, allowing the analysis conclusions to focus directly on the most critical and labor-intensive code changes. This provides highly reliable, automated, and semantically-understanding core technical support for accurately assessing software development workload.
[0108] Furthermore, based on the above embodiments of the invention, S1305 specifically includes:
[0109] S13051. Extract the rate of change of multiple runtime performance metrics from performance difference information; runtime performance metrics include at least: function call count, execution time, and memory usage;
[0110] S13052. Multiply each rate of change by a preset weighting coefficient and sum them to obtain the code difference impact index.
[0111] In this embodiment of the invention, the rate of change of multiple runtime performance indicators, such as function call count, execution time, and memory usage, can be extracted from the performance difference data obtained from dynamic code execution. Then, based on project characteristics and evaluation objectives, a preset weight coefficient is assigned to the rate of change of each selected runtime indicator. This weight coefficient reflects the relative importance of different performance dimensions in this evaluation. For example, in a scenario of optimizing response speed, execution time has a higher weight; in a scenario of resolving memory leaks, memory usage has a higher weight. Finally, the rate of change of each indicator is multiplied by its corresponding weight coefficient, and all products are summed to calculate a unified code difference impact indicator. The higher the value of this indicator, the greater the overall impact of the code change on the system's runtime behavior.
[0112] This invention integrates multi-dimensional dynamic operational data that is difficult to compare directly into an intuitive quantitative indicator, thereby automatically identifying key code changes that truly have a significant impact on the behavior of the software system, greatly improving the objectivity, accuracy, and decision support value of the verification results.
[0113] Furthermore, based on the above embodiments of the invention, S140 specifically includes:
[0114] S1401. Input the improvement item description and code modification description into the preset joint analysis model to determine the relationship score between each improvement item description and each code modification description;
[0115] S1402. Based on relationship scores, establish a difference mapping relationship between improvement item descriptions and code modification descriptions.
[0116] The pre-trained joint analysis model can refer to an AI model that has been pre-trained and possesses multi-dimensional feature matching and quantitative analysis capabilities. Its core function is to compare the core features of the improvement item description and the code modification description, and output the quantitative result of their correlation, i.e., the relationship score. For example, the pre-trained joint analysis model can be composed of BERT and CodeBERT models.
[0117] In this embodiment of the invention, establishing a difference mapping relationship between the improvement item descriptions in the design document and the code modification descriptions in the source code specifically includes the following steps:
[0118] (1) Preprocess each improvement item description and each code modification description separately, including operations such as word segmentation and encoding.
[0119] (2) Input the pre-processed improvement item description and code modification description into the pre-trained preset joint analysis model. The model performs correlation analysis on each pair of improvement item description and code modification description and calculates a quantitative relationship score for each pair. The score directly reflects the degree of functional semantic matching or implementation possibility between the design improvement point and the corresponding code modification.
[0120] (3) Based on the relationship scores corresponding to each pair of descriptions generated above, an association matrix containing the relationship scores between all improvement item descriptions and code modification descriptions is constructed; then, based on preset decision rules (such as selecting the code modification with the highest score for each improvement item, setting a minimum score threshold for filtering, or resolving the conflict of multiple improvement items competing for the same code modification), the matrix is intelligently analyzed and adjudicated, and a definite correspondence is automatically assigned to each meaningful association, thereby finally constructing and outputting a structured difference mapping relationship, which clearly defines which specific code modifications are implemented by each functional improvement item.
[0121] This invention, through semantic understanding and quantitative scoring, automates and accurately establishes the relationship between improvement item descriptions and code modification descriptions. This solves the problems of low efficiency, strong subjectivity, and error-proneness in traditional manual correlation analysis. Furthermore, through quantitative relationship scores and clear mapping types, the correlation logic between design changes and code implementation is traceable and verifiable, effectively improving the accuracy and efficiency of software development workload verification.
[0122] Furthermore, based on the above embodiments of the invention, S150 specifically includes:
[0123] S1501. Input the improvement item description, code modification description, and difference mapping relationship into the preset report generation model to obtain the initial verification report;
[0124] S1502. Determine the information density of the initial verification report;
[0125] S1503. Optimize the level of detail in the initial verification report based on information density to obtain a workload verification report.
[0126] The preset report generation model can refer to a pre-trained or configured model with functions such as data integration, workload calculation, and structured report output. It can automatically generate a well-formatted, fluent, and visually appealing draft document based on structured input data. For example, the preset report generation model can be a system that integrates a large language model and visualization tools / engines.
[0127] Information density can be a comprehensive indicator used to quantitatively evaluate the level of detail and efficiency of a document's information. It can be calculated by analyzing the number, distribution, redundancy, and proportional relationship between the core information points in the report content and the display medium (such as pages and word count). This can be used to objectively judge whether a report is too long and cumbersome or too brief and obscure.
[0128] In this embodiment of the invention, the process of generating a workload verification report specifically includes:
[0129] (1) The results of semantic extraction and correlation analysis of the upstream output, namely the description of improvement items, the description of code modification and their difference mapping relationship, are input into the pre-trained preset report generation model. The model understands the domain knowledge and report paradigm of software development workload verification and can automatically integrate, organize and transform these input data. Based on the parsing of data structure and the understanding of content semantics, the model will automatically write text descriptions, arrange logical order and generate or insert relevant visualization charts (such as relationship diagrams, change heatmaps, etc.) to output an initial verification report that is complete but may not be verified and optimized.
[0130] (2) After generating the initial verification report, the system does not directly use it as the final output. Instead, it performs an information density assessment step, which uses a preset algorithm or formula to quantitatively analyze the quality of the report and obtain its corresponding information density. In one embodiment, the information content of the improvement item descriptions, code modification descriptions, and their difference mapping relationships in the initial verification report can be comprehensively considered, and then combined with the total information content of the entire report to obtain a quantitative information density evaluation value, which is used to objectively judge whether the report is appropriately detailed and whether the information expression is efficient.
[0131] (3) Based on the determined information density, determine whether the initial verification report needs to be optimized, and output the final workload verification report. Specifically, if the information density is too low, it indicates that the report may be too lengthy or scattered, and the system will automatically trigger simplification operations, such as merging repetitive arguments, simplifying minor details, and extracting core conclusions; if the information density is too high, it indicates that the report may be too condensed and obscure, and the system will perform refinement operations, such as adding explanatory descriptions to key conclusions, decomposing complex charts, and supplementing background information. Finally, output a workload verification report with a reasonable information density, appropriate level of detail, and easy for the target user to read and make decisions. It should be understood that the above optimization process can be iterative, or it can be achieved by adjusting the parameters of the report generation model and regenerating it; this embodiment does not impose specific limitations on this.
[0132] This invention, by introducing a report generation model to replace manual work, greatly improves the speed and consistency of report production. More importantly, by introducing information density as an objective quantitative indicator and a closed-loop optimization mechanism, it can proactively ensure and improve the intrinsic quality of the report, enabling the final generated report to adaptively adjust its level of detail. This provides clear, accurate, and efficient decision support in various application scenarios, significantly improving the reliability and practical value of the entire workload verification process.
[0133] Example 2
[0134] Figure 2 This is a flowchart of a software development workload verification method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment provides an implementation method for verifying software development workload, which can automatically and intelligently verify the consistency between code implementation and design documents, and accurately assess the actual workload of developers. Figure 2 As shown in Embodiment 2 of the present invention, a method for verifying software development workload specifically includes the following steps:
[0135] S210. Obtain the first design document version and the second design document version for the project to be verified, as well as the associated first source code version and second source code version.
[0136] In this embodiment of the invention, two key design document versions of the project to be verified can be determined, such as a first design document version and a second design document version selected based on project milestones. Subsequently, based on the metadata of these two design document versions (such as version tags, commit times, or release dates), the source code commit versions that correspond to them in time or logic, namely the first source code version and the second source code version, are automatically located and obtained in the Git version control system as the basis for subsequent analysis.
[0137] Furthermore, before conducting software development workload verification, a version control preparation process is included. This involves using version control systems such as Git to manage project code and design documents. Whenever modifications are made to code or design documents, these changes must be committed to the Git repository, clearly stating the purpose and main content of the changes. This ensures that all code and design documents are properly stored and that every modification is recorded. It ensures that changes to each version are traceable, facilitating rollback and debugging. In collaborative projects, it helps avoid conflicts and clearly shows each person's contribution.
[0138] In collaborative projects, developers create their own independent branches for development. When a branch needs to be merged into the main branch, the `pull` command in Git is first used to retrieve the latest state of the main branch, and then the `merge` tool is used to merge it. If conflicts occur, Git will explicitly mark the conflicting files and locations, allowing developers to manually resolve the conflicts before committing. The commit log should detail the specific paths to the modified code files, such as ` / src / modules / userManagement.py`, and the functions or modules involved, such as `'modified the getUserInfo function in the UserManagement module'`, to facilitate better traceability and review later.
[0139] Furthermore, an intelligent version recommendation system can be introduced. This system analyzes characteristics such as the frequency of changes in historical versions of a project, the functional modules involved, and the scale of modifications, combined with the specific content of the current modification, to intelligently recommend version branching strategies to developers. For example, when it detects that the current modification may have a significant impact on multiple functional modules, the system will prompt the creation of a new major branch for development to avoid excessive interference with the existing stable version. This intelligent recommendation mechanism can improve the efficiency and accuracy of version control and better adapt to complex software development projects. Simultaneously, the following Version Branching Strategy Evaluation Metric (VBSI) is used to quantify the rationality of branches:
[0140]
[0141] In the formula, PC represents project complexity, which can be comprehensively evaluated by factors such as the number of functional modules, lines of code, and technical difficulty; TCE represents team collaboration efficiency, which can be comprehensively evaluated by factors such as conflict resolution time and code merging success rate; HFC represents historical branch success frequency, which is the frequency of use of successful branch strategies in past projects. , and These are weighting coefficients, which can be adjusted according to actual circumstances.
[0142] S220. Perform difference detection on the first design document version and the second design document version to obtain document difference information.
[0143] In this embodiment of the invention, the text content and non-text content in the two versions of the design document can be comprehensively compared to obtain the corresponding text difference information and non-text difference information. Then, the two are fused to form comprehensive document difference information.
[0144] In one embodiment, a T5 (Text-To-Text Transfer Transformer) model can be used to extract textual difference information from two versions of a design document. The T5 model can automatically detect differences in the documents without manual comparison, enabling rapid document difference detection. Multiple versions of the design document can be pre-collected, and the differences between each version can be labeled (e.g., which paragraphs are newly added, which are modified, and which are deleted) to construct a training dataset. This dataset can then be used to train the T5 model, enabling it to identify document differences.
[0145] The dataset was collected by gathering different versions of design documents from multiple real-world software development projects, ensuring these documents covered different types of software functions and scales to improve the representativeness of the dataset. When labeling differences, the following standards were followed: newly added paragraphs were indicated with '+', followed by a brief description of the new content, such as '+ added a detailed description of the user permission management process'; modified content was indicated with '~', along with the specific parts and reasons for the modification, such as '~ modified the description of the data storage architecture because a new database technology was adopted'; deleted content was indicated with '-', specifying the deleted paragraph or section. Each sample contained a pair of documents (old and new), and labeled differences. Labels could be text markers, such as + for addition, - for deletion, and ~ for modification.
[0146] Next, the T5 model is trained using the labeled dataset, and the backpropagation algorithm is used to update the model parameters and minimize the loss function. Cross-entropy loss is used to measure the difference between the model's predicted labels and the true labels.
[0147]
[0148] In the formula, Cross-entropy loss; The probability distribution of the true labels is usually one-hot encoded; represents the probability distribution predicted by the model; n is the number of samples.
[0149] Furthermore, a multimodal information fusion approach is employed for document difference detection. In addition to comparing text content, comparisons of images, charts, and other multimodal information are also introduced. For image information in design documents, such as flowcharts and architecture diagrams, image recognition technology is used to compare the differences between different versions. Then, the image differences are fused and analyzed with the text differences to comprehensively determine the changes in the document. This multimodal information fusion method can more comprehensively detect changes in design documents.
[0150] For document difference detection based on multimodal information fusion, the following formula for calculating fusion weights can be used:
[0151]
[0152] In the formula, FW is the fusion weight; TD is the text difference weight, which can be calculated through text similarity, keyword matching degree, etc.; ID is the image difference weight, which can be calculated through image feature similarity, structural similarity, etc.; GD is the difference weight of other modalities such as charts. , and These are the weighting coefficients for the corresponding modes.
[0153] S230. Perform semantic analysis on the document difference information to generate improvement item descriptions.
[0154] In this embodiment of the invention, a set of keywords can be extracted from the above-mentioned document difference information, and semantic enhancement can be performed by combining it with a software domain knowledge graph. Finally, the keywords are input into a preset text semantic understanding model, which automatically summarizes and outputs a structured description of the improvements.
[0155] In one embodiment, the BERT model can be used to extract improvement item descriptions from document difference information. Leveraging its powerful semantic understanding capabilities, it can accurately identify improvement items, reducing false positives and false negatives. Document difference data can be pre-collected and labeled to identify improvement points, thus constructing a training dataset. Each sample contains document differences and their labeled improvement item descriptions. The labeling criteria for improvement points are as follows:
[0156] Document differences involving new feature additions, performance optimizations, and bug fixes are labeled as improvement points. For example, '+ added user feedback function' and '~ optimized data loading speed' are both improvement points. To improve the accuracy and reliability of the BERT model, keyword extraction techniques from natural language processing can be used. First, keywords are extracted from the document differences to filter out keywords related to software functions and performance. Then, these keywords are input into the BERT model, allowing the model to extract improvement items by combining the keywords with the document differences. This improves the model's accuracy in identifying improvement points and reduces false positives and false negatives.
[0157] Next, the BERT model is trained using the labeled dataset, and the backpropagation algorithm is used to update the model parameters and minimize the loss function. Binary cross-entropy loss is used to measure the difference between the model's predicted labels and the true labels.
[0158]
[0159] In the formula, y is the binary cross-entropy loss; y is the true label, which takes the value 0 or 1. For example, 0 means it is not an improvement item, and 1 means it is an improvement item. This represents the probability value predicted by the model.
[0160] Furthermore, knowledge graph technology can be used to assist the BERT model in extracting improvement items. A knowledge graph for the software domain can be constructed, associating technical terms, functional modules, and other elements in document discrepancies with nodes within the knowledge graph. When the BERT model processes document discrepancies, it can refer to relevant information in the knowledge graph to more accurately understand the meaning of the discrepancies and extract more valuable improvement items. For example, when "database connection optimization" appears in a document, the knowledge graph can provide information on relevant database connection technologies, common problems, and optimization methods, assisting the BERT model in extracting specific improvement item descriptions.
[0161] When combining knowledge graphs to assist in the extraction of improved items, the following formula for calculating knowledge relevance can be used:
[0162]
[0163] In the formula, KAR represents the knowledge relevance; m represents the number of nodes in the knowledge graph that are related to document differences; The association strength of the j-th related node can be calculated by comprehensively considering factors such as the node's degree centrality and proximity centrality. By utilizing knowledge association, general natural language understanding capabilities can be combined with in-depth knowledge of specialized software engineering domains, thereby significantly improving the system's accuracy and depth of understanding in recognizing design document change intentions.
[0164] S240. Perform difference detection on the first source code version and the second source code version to obtain code difference information.
[0165] In this embodiment of the invention, static analysis tools (such as abstract syntax tree-based analysis) can be used to compare two source code versions, generate structural difference data at the syntax level, and classify them using machine learning models, thereby generating code difference information.
[0166] In one implementation, the Git command `git diff` is used to view the differences between two versions. For example, to compare the differences between the current branch `feature_branch` and the main branch `main_branch`, you can execute:
[0167] git diff main_branch feature_branch > code_diff.txt
[0168] This command will output the difference information to a file named code_diff.txt.
[0169] Git provides detailed diff reports, including additions, deletions, and modifications. These reports are presented in a human-readable format for easy processing. The generated code diff file (code_diff.txt) uses a uniform format, including the file path, modification type (addition, deletion, or modification), and specific line changes. For example, ' / src / components / LoginForm.js+10,11Addednewvalidationlogic' indicates that lines 10 and 11 were added to the file ' / src / components / LoginForm.js', introducing new validation logic. Dedicated code diff analysis tools, such as DiffMerge, can be used to visually analyze this file for a more intuitive view of the code changes.
[0170] By combining code semantic analysis techniques and utilizing Abstract Syntax Tree (AST) analysis tools, the structural differences between two versions of code can be compared. Analyzing the AST provides a deeper understanding of the code's semantic structure and functional logic, accurately detecting differences in functional implementation even with minor textual changes. Simultaneously, machine learning algorithms are used to categorize code differences, such as those related to feature enhancements, bug fixes, and performance optimizations. This provides more detailed and accurate information for subsequent workload reviews.
[0171] In code semantic analysis, the following formula can be used to calculate code semantic similarity:
[0172]
[0173] In the formula, CSS represents the semantic similarity of the code; n represents the number of code features; The weight of the i-th feature; The similarity value between two versions of code on the i-th feature can be calculated by combining factors such as word vector similarity and function call relationship similarity. By utilizing code semantic similarity, the degree of similarity between two code submissions at the functional logic and business intent level can be accurately quantified. This effectively overcomes the limitations of traditional text difference comparison tools, achieving a leap from surface-level syntactic difference comparison to deep functional semantic consistency analysis. Consequently, it significantly improves the accuracy of judgment in automated verification and provides high-quality, semantically understood code change features for correlation analysis.
[0174] S250. Perform semantic analysis on the code difference information to generate a code modification description.
[0175] In this embodiment of the invention, code difference information can be input into a preset code semantic understanding model to generate an initial code modification description. Simultaneously, the old and new versions of the code are run separately in a controlled environment to monitor and record changes in runtime performance indicators such as key function calls, execution time, and memory usage. Based on this performance difference information, a quantified code difference impact indicator is calculated for each initial code modification description. Finally, the initial descriptions are filtered and ranked by importance based on the impact indicator to output the final code modification description.
[0176] In one embodiment, the CodeBERT model's code difference information can be used for semantic parsing to output initial code modification descriptions, such as the specific location and description of the code modifications. This model possesses strong code understanding capabilities, able to identify the meaning and context of modifications, and reduce errors that may arise from manual parsing. Code difference data can be pre-collected, and key modifications can be identified to construct a training dataset, where each sample contains code difference information and its labeled key modifications (i.e., code modification descriptions). The labeled code modification descriptions include code changes that significantly impact software functionality, modifications involving core algorithms or data structures, etc. For example, 'adding a new encryption algorithm' or 'modifying database query statements to improve performance' are both considered key modifications. The labeling method can be manual by experienced developers, combined with the analysis results from code review tools for confirmation. The output of the CodeBERT model can be further analyzed and processed. For example, the output modification locations and descriptions can be correlated with the software's functional modules to analyze the impact of code differences on each module. Simultaneously, version control system commit logs and developer comments can be used to better understand the background and purpose of code differences.
[0177] Next, the CodeBERT model is trained using the labeled dataset, and the backpropagation algorithm is used to update the model parameters and minimize the loss function. The multi-class cross-entropy loss is used to measure the difference between the model's predicted labels and the true labels.
[0178]
[0179] In the formula, For multi-class cross-entropy loss; C is the total number of classes; The probability distribution of the true labels is usually one-hot encoded; This represents the probability distribution predicted by the model.
[0180] In addition, dynamic code execution analysis technology is introduced and combined with the CodeBERT model for code difference analysis. Building upon static code difference analysis, different versions of the code are dynamically executed to record changes in runtime performance metrics such as function call counts, execution time, and memory usage. The relationship between these runtime performance metric changes and code differences is analyzed to gain a deeper understanding of the actual impact of code differences and provide more comprehensive information for workload auditing.
[0181] When combining code dynamic execution analysis, the following formula is defined to represent the impact of code differences on the index:
[0182]
[0183] In the formula, CDII is the code difference impact index; FC is the function call change rate; ET is the execution time change rate; MC is the memory usage change rate. , and This represents the weighting coefficient. By utilizing the impact of code differences on metrics, objective performance data obtained from dynamic execution (such as changes in function calls, execution time, and memory usage) can be quantified into a comparable comprehensive score, thereby automatically and objectively distinguishing the substantial impact of different code modifications.
[0184] S260. Perform intelligent association mapping between the improvement item description and the code modification description to generate difference mapping relationships.
[0185] In this embodiment of the invention, the obtained improvement item description and code modification description can be input into a preset joint analysis model. This model converts both into high-dimensional semantic vectors and calculates the similarity between the vectors as a relationship score. Based on this score, one or more code modification descriptions with the highest relevance are matched to each improvement item description to establish a clear difference mapping relationship. For descriptions that cannot establish a valid association, the system will mark them as unmatched items.
[0186] In one embodiment, a joint analysis model consisting of BERT and CodeBERT outputs a similarity score (i.e., a score representing the relationship between improvement item descriptions and code modification descriptions) to characterize the mapping relationship between them. Data on the mapping relationships between different improvement item descriptions, code modification descriptions, and their annotations can be pre-collected to construct a training dataset, where each sample contains an improvement item description, a code modification description, and their annotated mapping relationship. Then, the annotated dataset is used to jointly train the BERT and CodeBERT models, as follows:
[0187] First, the improvement item descriptions and code modification descriptions are preprocessed, including word segmentation and encoding. Then, the processed data is input into the BERT and CodeBERT models respectively, and the models are trained simultaneously. During training, an alternating training approach is used: the BERT model is trained for a period, followed by the CodeBERT model, and so on, to fully utilize the advantages of both models. To evaluate the effectiveness of joint training, metrics such as accuracy, recall, and F1 score can be used. Specifically, the mapping relationship between the labeled improvement item descriptions and code modification descriptions is used as the ground truth labels, and the mapping relationship output by the model is used as the predicted labels. Accuracy, recall, and F1 score are then calculated. If the evaluation results are unsatisfactory, optimization can be achieved by adjusting the model's hyperparameters, increasing the amount of training data, and improving the data preprocessing methods. During training, cosine similarity can be used to measure the similarity score between the improvement item descriptions and code modification descriptions.
[0188]
[0189] In the formula, similarity is cosine similarity; a is the embedding vector of the improvement term description, a high-dimensional numerical vector representing the semantics of the improvement term generated by the BERT model; b is the embedding vector of the code modification description, a high-dimensional numerical vector representing the semantics of the code modification generated by the CodeBERT model. It is the Euclidean norm.
[0190] The goal of model training is to minimize 1−similarity, making the similarity as close to 1 as possible.
[0191] By combining the capabilities of both models, it can intelligently match document improvement descriptions with code modification descriptions. Calculating relationship scores improves the accuracy and reliability of the matching.
[0192] Alternatively, deep reinforcement learning algorithms can be used for association analysis between improvement item descriptions and code modification descriptions. Specifically, the improvement item descriptions and code modification descriptions can be considered as state spaces, and the establishment of mapping relationships as action spaces. By continuously trying different mapping strategies and optimizing them based on reward functions (such as association accuracy and completeness metrics), the optimal association scheme can be found. This method can automatically learn and optimize the association process, improving the accuracy and efficiency of association analysis.
[0193] For association analysis using deep reinforcement learning algorithms, the reward function is defined as follows:
[0194]
[0195] In the formula, R is the reward function value; AC is the association accuracy, which can be calculated by the ratio of the number of correctly associated items to the total number of associated items; IC is the association integrity, which measures whether the association results cover all important improvements and code differences; and SC is the association stability, which evaluates the consistency of the association results under different inputs. , and The weighting coefficients are used. This reward function guides the deep reinforcement learning algorithm to continuously optimize the association analysis between the improvement item description and the code modification description, in order to find the best association scheme and improve the accuracy and reliability of the association analysis.
[0196] S270. Based on the description of improvement items, code modification description, and difference mapping relationship, generate a workload verification report.
[0197] In this embodiment of the invention, the improved item descriptions, code modification descriptions, and difference mapping relationships obtained above can be input into a large language model such as GPT-3 to output a corresponding workload verification report. Specifically, the report generated by the GPT-3 model can adopt a structured format, including a title, table of contents, introduction, specific improved points and code difference analysis, and conclusions. In terms of content structure, each improved point and code difference has a detailed description and explanation, while listing the corresponding functional modules and scope of impact. To customize the report format and content according to different needs, specific instructions and parameters can be input into the GPT-3 model. For example, the report's language style, level of detail, and key functional modules can be specified. To ensure the accuracy and readability of the report, after generation, it can be reviewed and revised by professional technicians to check whether the content accurately reflects the analysis results and whether the language is clear and easy to understand. Simultaneously, syntax checking and error correction tools in natural language processing can be used to further optimize the report. The GPT-3 model can automatically generate detailed reports, improving work efficiency, while producing high-quality, clearly structured reports that are easy to read and understand. Different report formats, such as HTML or PDF, can be generated as needed.
[0198] In addition, reports can be generated by combining natural language generation technology with visualization technology. Besides using the GPT-3 model to generate text reports, visualization tools can be used to display improvement descriptions, code modification descriptions, and difference mapping relationships in the form of charts, flowcharts, etc. For example, a relationship diagram between functional modules and code differences can be drawn, intuitively presenting the code changes of each functional module. This approach makes reports more vivid and intuitive, facilitating user understanding and analysis.
[0199] In visual report generation, the following information density calculation formula can be used to evaluate the clarity and information content of the report:
[0200]
[0201] In the formula, ID represents information density; ICD is the sum of information content in the description of improvement items, code modification descriptions, and difference mapping relationships, which can be calculated comprehensively based on factors such as the number of features and description length; AR is an indicator representing the report's display space, such as the report page area or the number of characters. The information density indicator allows for the evaluation of the report's information density, enabling optimization during report generation to ensure the report has sufficient information without being overly lengthy or complex, thus improving readability and usability.
[0202] like Figure 3As shown, it clearly demonstrates the key implementation process of this solution, namely, document / code difference detection → joint analysis → report generation. The specific implementation process can be referred to the above embodiment, and will not be repeated here.
[0203] This invention provides an end-to-end automated solution that organically combines multimodal difference detection in design documents, in-depth analysis of source code combining static and dynamic elements, intelligent cross-modal semantic association, and adaptive optimization of report generation. This achieves accurate and efficient traceability and quantitative assessment of the entire software development workload chain, from "requirement changes" to "code implementation," significantly improving the objectivity, automation, and credibility of the verification process. Simultaneously, it generates a clearly structured and appropriately detailed verification report, greatly reducing reliance on manual professional review and significantly enhancing the transparency, accuracy, and decision support capabilities of project audits.
[0204] Example 3
[0205] Figure 4 This is a schematic diagram of a software development workload verification device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes:
[0206] The data acquisition module 31 is used to acquire the first design document version and the second design document version of the project to be verified, as well as the first source code version and the second source code version associated with the first design document version and the second design document version, respectively.
[0207] The document analysis module 32 is used to perform difference analysis and semantic extraction based on the first design document version and the second design document version to obtain the corresponding improvement item descriptions;
[0208] The code analysis module 33 is used to perform difference analysis and semantic extraction based on the first source code version and the second source code version to obtain the corresponding code modification description;
[0209] The correlation analysis module 34 is used to perform correlation analysis on the description of improvement items and the description of code modifications to determine the difference mapping relationship;
[0210] The report generation module 35 is used to generate a workload verification report based on the improvement item description, code modification description, and difference mapping relationship.
[0211] Furthermore, based on the above embodiments of the invention, the data acquisition module 31 includes:
[0212] The document version determination unit is used to determine the first and second design document versions selected for the project to be verified.
[0213] The code acquisition unit is used to acquire the corresponding first source code version and second source code version from the preset project version control system based on the attribute information of the first design document version and the second design document version.
[0214] Furthermore, based on the above embodiments of the invention, the document analysis module 32 includes:
[0215] The text comparison unit is used to compare and analyze the text content in the first design document version and the second design document version, and generate text difference information.
[0216] The non-text comparison unit is used to identify and compare the non-text content in the first design document version and the second design document version, and generate non-text difference information.
[0217] The information fusion unit is used to fuse textual difference information and non-textual difference information to generate document difference information;
[0218] The keyword extraction unit is used to perform semantic analysis on document difference information and extract a set of keywords;
[0219] The graph matching unit is used to match the keyword set with a preset software domain knowledge graph to obtain decision support information;
[0220] The improvement item description generation unit is used to input document difference information, keyword set and decision support information into a preset text semantic understanding model to generate corresponding improvement item descriptions.
[0221] Furthermore, based on the above embodiments of the invention, the code analysis module 33 includes:
[0222] The static syntax analysis unit is used to perform static syntax structure analysis on the first source code version and the second source code version to generate structural difference data.
[0223] The classification unit is used to call a preset machine learning model to classify structural difference data and generate code difference information;
[0224] The code semantic understanding unit is used to input code difference information into a preset code semantic understanding model and generate an initial code modification description.
[0225] The dynamic execution unit is used to dynamically run the first source code version and the second source code version respectively, obtain and compare runtime performance indicators, and generate performance difference information.
[0226] The indicator determination unit is used to determine the code difference impact indicator corresponding to each initial code modification description based on the performance difference information.
[0227] The code modification description generation unit is used to filter and prioritize initial code modification descriptions based on code difference impact metrics, and obtain corresponding code modification descriptions.
[0228] Furthermore, based on the above embodiments of the invention, the index determination unit is specifically used for:
[0229] Extract the rate of change of multiple runtime performance metrics from the performance difference information; runtime performance metrics include at least: function call count, execution time, and memory usage;
[0230] The code difference impact index is obtained by multiplying each rate of change by a preset weighting coefficient and then summing the results.
[0231] Furthermore, based on the above embodiments of the invention, the correlation analysis module 34 includes:
[0232] The joint analysis unit is used to input improvement item descriptions and code modification descriptions into a preset joint analysis model to determine the relationship score between each improvement item description and each code modification description.
[0233] The relationship establishment unit is used to establish a difference mapping relationship between improvement item descriptions and code modification descriptions based on relationship scores.
[0234] Furthermore, based on the above embodiments of the invention, the report generation module 35 includes:
[0235] The initial report generation unit is used to input the improvement item description, code modification description, and difference mapping relationship into the preset report generation model to obtain the initial verification report;
[0236] Information density determination unit, used to determine the information density of the initial verification report;
[0237] The report optimization unit is used to optimize the level of detail in the initial verification report based on information density to obtain the workload verification report.
[0238] The software development workload verification device provided in this embodiment of the invention can execute the software development workload verification method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0239] Example 4
[0240] Figure 5A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0241] like Figure 5 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from storage unit 48 into the RAM 43. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0242] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0243] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as methods for verifying software development workload.
[0244] In some embodiments, the software development effort verification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the software development effort verification method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the software development effort verification method by any other suitable means (e.g., by means of firmware).
[0245] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0246] In some embodiments, the software development workload verification method can be implemented as a computer program, which is implicitly included in a computer program product. When executed by a processor, the computer program implements the software development workload verification method of the present invention. The computer program product can be understood as a software product that primarily implements its solution through a computer program. The computer program used to implement the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer program causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a standalone software package, or entirely on a remote machine or server.
[0247] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0248] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0249] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0250] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0251] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0252] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for verifying software development workload, characterized in that, The method includes: Obtain the first design document version and the second design document version of the project to be verified, as well as the first source code version and the second source code version associated with the first design document version and the second design document version, respectively; Based on the first design document version and the second design document version, difference analysis and semantic extraction are performed to obtain the corresponding improvement item descriptions; Based on the first source code version and the second source code version, difference analysis and semantic extraction are performed to obtain the corresponding code modification description; A correlation analysis is performed between the description of the improvement items and the description of the code modifications to determine the difference mapping relationship; Based on the description of the improvement items, the description of the code modifications, and the difference mapping relationship, a workload verification report is generated.
2. The method according to claim 1, characterized in that, The acquisition of the first and second design document versions of the project to be verified, as well as the first and second source code versions associated with the first and second design document versions respectively, includes: Determine the first design document version and the second design document version selected for the project to be verified; Based on the attribute information of the first design document version and the second design document version, the corresponding first source code version and the second source code version are obtained from the preset project version control system.
3. The method according to claim 1, characterized in that, The step involves performing difference analysis and semantic extraction based on the first and second design document versions to obtain corresponding improvement item descriptions, including: The text content in the first design document version and the second design document version is compared and analyzed to generate text difference information; The non-text content in the first design document version and the second design document version is identified and compared to generate non-text difference information. The text difference information and the non-text difference information are fused together to generate document difference information; Semantic analysis is performed on the document differences to extract a set of keywords; The keyword set is matched with a preset software domain knowledge graph to obtain decision support information; The document difference information, the keyword set, and the decision support information are input into a preset text semantic understanding model to generate the corresponding improvement item description.
4. The method according to claim 1, characterized in that, The step involves performing difference analysis and semantic extraction based on the first source code version and the second source code version to obtain the corresponding code modification description, including: Static syntax structure analysis is performed on the first source code version and the second source code version to generate structural difference data; A preset machine learning model is invoked to classify the structural difference data and generate code difference information; The code difference information is input into a preset code semantic understanding model to generate an initial code modification description; The first source code version and the second source code version are run dynamically respectively to obtain and compare runtime performance indicators in order to generate performance difference information; Based on the performance difference information, determine the code difference impact index corresponding to each initial code modification description; Based on the code difference impact index, the initial code modification descriptions are filtered and ranked by importance to obtain the corresponding code modification descriptions.
5. The method according to claim 4, characterized in that, The step of determining the code difference impact index corresponding to each initial code modification description based on the performance difference information includes: The rate of change of multiple runtime performance metrics is extracted from the performance difference information; the runtime performance metrics include at least: function call count, execution time, and memory usage. The code difference impact index is obtained by multiplying each rate of change by a preset weighting coefficient and then summing the results.
6. The method according to claim 1, characterized in that, The step of performing correlation analysis between the description of the improvement item and the description of the code modification to determine the difference mapping relationship includes: The improvement item description and the code modification description are input into a preset joint analysis model to determine the relationship score between each improvement item description and each code modification description; Based on the relationship score, a difference mapping relationship is established between the description of the improvement item and the description of the code modification.
7. The method according to claim 1, characterized in that, The process of generating a workload verification report based on the description of the improvement items, the description of the code modifications, and the difference mapping relationship includes: The descriptions of the improvements, the code modifications, and the difference mapping relationships are input into a preset report generation model to obtain an initial verification report. Determine the information density of the initial verification report; The level of detail in the initial verification report is optimized based on the information density to obtain the workload verification report.
8. A device for verifying software development workload, characterized in that, The device includes: The data acquisition module is used to acquire a first design document version and a second design document version of the project to be verified, as well as a first source code version and a second source code version associated with the first design document version and the second design document version, respectively. The document analysis module is used to perform difference analysis and semantic extraction based on the first design document version and the second design document version to obtain the corresponding improvement item descriptions; The code analysis module is used to perform difference analysis and semantic extraction based on the first source code version and the second source code version to obtain the corresponding code modification description; The correlation analysis module is used to perform correlation analysis between the description of the improvement item and the description of the code modification to determine the difference mapping relationship; The report generation module is used to generate a workload verification report based on the description of the improvement items, the description of the code modifications, and the difference mapping relationship.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the software development workload verification method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the software development workload verification method according to any one of claims 1-7.