Code change information processing method and device, equipment, storage medium and program product
By combining file change logs and call chain graphs, the impact path of code changes and the responsible parties can be dynamically analyzed, which solves the problem of incomplete testing scope, improves testing efficiency and accuracy, and optimizes resource allocation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PEOPLE'S INSURANCE COMPANY OF CHINA
- Filing Date
- 2025-12-17
- Publication Date
- 2026-05-08
AI Technical Summary
In modern enterprise systems, the impact of code changes on the entire call chain cannot be dynamically analyzed, leading to unreasonable allocation of test resources, increased testing costs, and difficulty in quickly identifying the person responsible for the code.
By acquiring file change records and call chain graphs, we can dynamically analyze the affected paths and responsible parties for code changes. Using information such as the modifier, time, and content, combined with weighted summation or neural network models, we can determine the responsible party.
It achieves comprehensive coverage of the testing scope, improves testing efficiency and accuracy, reduces the risk of omissions, and optimizes the allocation of testing resources.
Smart Images

Figure CN121996540A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, device, storage medium, and program product for processing code change information. Background Technology
[0002] In the field of software development, especially in modern enterprise systems that adopt microservice architecture and agile development models, frequent code iteration and collaborative development by multiple developers have become the norm. Taking enterprise application systems (such as marketing management platforms) as an example, they typically adopt a layered architecture design (front-end, middle platform, and back-end). The front-end is responsible for user interaction, the middle platform handles core business logic, and the back-end manages data storage.
[0003] Currently, in related technologies, testers typically rely on manual experience or simple submission record queries to determine the scope of testing, resulting in low testing efficiency and a high risk of omissions.
[0004] However, the inventors have found that the related technology has at least the following technical problems: it is currently impossible to dynamically analyze the impact of code changes on the entire call chain, which leads to unreasonable allocation of test resources, significantly increased test costs, and difficulty in quickly locating the person responsible for the code. Summary of the Invention
[0005] This application provides a method, apparatus, device, storage medium, and program product for processing code change information, in order to solve the problems of unreasonable allocation of test resources, significantly increased test costs, and difficulty in quickly locating the person responsible for the code.
[0006] In a first aspect, embodiments of this application provide a code change information processing method, comprising: in response to receiving a test information acquisition request for a modified file, acquiring a file change record, wherein the file change record includes the modifier, modification time, and modification content corresponding to the modified file; acquiring a call chain graph, wherein the call chain graph includes the call relationship of methods in the code; determining the affected path and corresponding responsible person of the code change based on the call relationship of methods in the code and the modifier, modification time, and modification content corresponding to each modification of the modified file; and outputting the affected path and responsible person of the code change.
[0007] In one possible implementation, the affected paths and responsible parties for code changes are determined based on the method call relationships in the code and the modifier, modification time, and modification content corresponding to each modification of the modified file. This includes: finding the call relationships based on the modification content corresponding to the modified file to obtain the affected paths; and determining the responsible parties based on the modifier, modification time, and modification content corresponding to the modified file.
[0008] In one possible implementation, the responsible party is determined based on the modifier, modification time, and modification content of the modified file. This includes: counting the number of modifications made by the modifier; and determining the responsible party based on the number of modifications made by the modifier, modification time, and modification content.
[0009] In one possible implementation, the responsible party is determined based on the number of modifications, modification time, and modification content of the modifier. This includes: determining the submission time value of the modifier based on the modification time; determining the number of modifications based on the number of modifications; counting the number of lines modified in the modification content; determining the line value of the modifier based on the number of lines modified; determining the overall score of the modifier based on the submission time value, number of modifications, and line value; and identifying the modifier with the highest overall score as the responsible party.
[0010] In one possible implementation, the submission time value corresponding to the modifier is determined based on the modification time corresponding to the modifier, including: if the modification time corresponding to the target modifier is the earliest, then the creator's score is determined as the submission time value corresponding to the target modifier; if the modification time corresponding to the target modifier is the latest, then the final modifier's score is determined as the submission time value corresponding to the target modifier; if the modification time corresponding to the target modifier is neither the earliest nor the latest, then the ordinary modifier's score is determined as the submission time value corresponding to the target modifier.
[0011] In one possible implementation, the overall score for the modifier is determined based on the submission time value, number of submissions, and number of lines, including: weighted summation of the submission time value, number of submissions, and number of lines to obtain the overall score for the modifier.
[0012] In one possible implementation, the submission time value, number of submissions, and line count are weighted and summed to obtain the comprehensive score corresponding to the modifier. This includes: obtaining the project risk level and team collaboration mode corresponding to the modified file; and determining the submission time weight corresponding to the submission time value based on the project risk level and team collaboration mode.
[0013] Secondly, embodiments of this application provide a code change information processing apparatus, comprising: a record acquisition module, configured to acquire file change records in response to receiving a test information acquisition request for a modified file, wherein the file change records include the modifier, modification time, and modification content corresponding to the modified file; a graph acquisition module, configured to acquire a call chain graph, wherein the call chain graph includes the call relationship of methods in the code; an information determination module, configured to determine the affected paths and corresponding responsible persons of the code change based on the call relationship of methods in the code and the modifier, modification time, and modification content corresponding to each modification of the modified file; and an information output module, configured to output the affected paths and responsible persons of the code change.
[0014] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0016] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0017] The code change information processing method, apparatus, device, storage medium, and program product provided in this application solve the problem of incomplete test scope analysis in the prior art by dynamically associating file change records with call chain graphs. Specifically, file change records provide information such as the modifier, modification time, and modification content, while the call chain graph describes the call relationships between methods. The combination of the two enables the system to recursively analyze the propagation path of file changes in the call chain. For example, when a service layer method is modified, the system can automatically identify that it is called by a controller layer method and further trace its impact on persistent layer methods, thereby generating a complete cross-module impact chain. This avoids the limitations of static analysis and ensures that the test scope covers all affected file paths. In addition, the topology of the call chain graph supports efficient recursive analysis, adapts to the needs of large-scale file libraries, and significantly improves testing efficiency and accuracy. Through the dynamic mapping mechanism, the system can respond to file changes in real time, reduce manual intervention, reduce the risk of test omissions, and optimize test resource allocation. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] Figure 1 A schematic diagram illustrating the scenario of the code change information processing method provided in this application;
[0020] Figure 2 A flowchart illustrating the code change information processing method provided in this application embodiment;
[0021] Figure 3 This is a schematic diagram of the structure of the code change information processing device provided in the embodiments of this application;
[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0023] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0025] In the field of software development, especially in modern enterprise systems that adopt microservice architecture and agile development models, high-frequency code iteration and multi-person collaborative development have become the norm. Taking marketing management platforms and other typical enterprise applications as examples, such systems generally adopt a layered architecture of front-end, middle-end, and back-end: the front-end focuses on implementing user interaction functions, the middle-end carries out the processing and scheduling of core business logic, and the back-end is responsible for the persistent storage and management of data.
[0026] In the current technological system, testers rely heavily on human experience or simple queries of code commit records to determine the scope of testing. This approach not only leads to low testing efficiency but also easily introduces the risk of missing test points.
[0027] The inventors discovered through research that the relevant technical solutions have the following urgent technical problems: they cannot dynamically analyze the impact of code changes on the entire system's call chain, which leads to an unreasonable allocation of test resources, a significant increase in test costs, and difficulty in quickly and accurately locating the responsible party for code changes.
[0028] Figure 1 This is a schematic diagram illustrating a scenario for the code change information processing method provided in this application. For example... Figure 1 In this scenario, the following components are included: terminal device 101 and server 102.
[0029] In the specific implementation process, the terminal device 101 may include a computer, server, tablet, mobile phone, PDA (Personal Digital Assistant), and laptop, etc., which can input data.
[0030] Server 102 can be implemented using a single server or a cluster of multiple servers with more powerful processing capabilities and higher security. Where possible, it can also be replaced by a computer or laptop with strong computing power.
[0031] The connection between server 102 and terminal device 101 can be either wired or wireless.
[0032] Server 102 is used to receive test information acquisition requests sent by terminal device 101, acquire file change records and call chain graphs, determine the affected paths of code changes and the responsible persons of code changes based on the call relationships in the file change records and call chain graphs, and output the affected paths and corresponding responsible persons.
[0033] It is understood that the scenarios illustrated in the embodiments of this application do not constitute a specific limitation on the code change information processing method. In other feasible embodiments of this application, the above scenarios may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and are not limited here. Figure 1 The scenario shown can be implemented by hardware, software, or a combination of both.
[0034] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0035] Figure 2 This is a flowchart illustrating the code change information processing method provided in an embodiment of this application. The execution entity of this embodiment may be... Figure 1 The server in this example can be a computer or / or mobile phone, etc., and this embodiment does not impose any particular limitations on it. Figure 2 As shown, the method includes:
[0036] S201: In response to receiving a request to obtain test information for a modified file, obtain the file change record, wherein the file change record includes the person who modified the file, the modification time, and the modification content.
[0037] In this step, test information retrieval requests can be received by receiving data packets sent by the terminal device. File change records can be obtained by reading the commit records associated with the source code repository.
[0038] S202: Obtain the call chain graph, which includes the call relationships between methods in the code.
[0039] The call chain graph can be a directed graph structure generated by parsing source code, representing the call relationships between methods. The call chain graph can be obtained by analyzing the source code library using a third-party interpreter to derive the call relationships between the controller layer, service layer, and persistence layer. The call correspondences at these three levels can be one-to-one, one-to-many, or many-to-one, depending on the actual business requirements.
[0040] S203: Based on the method call relationships in the code and the modifier, modification time, and modification content of each modified file, determine the affected paths and corresponding responsible persons for the code changes.
[0041] In this step, based on the modifications, the call relationships of methods in the code can be identified, and the parts involved in these call relationships can be determined as the affected paths of the code changes. The responsible party can be identified based on the person who made the modification, the time of modification, and the content of the modification for each change.
[0042] The affected path refers to the path through which code changes propagate in the call chain, including the affected methods and their callers.
[0043] S204: Affected paths and responsible parties for output code changes.
[0044] In this step, the affected paths and responsible parties for the code changes can be displayed or sent to the terminal device.
[0045] As described in the above embodiments, this disclosure solves the problem of incomplete test scope analysis in the prior art by dynamically associating file change records and call chain graphs. Specifically, file change records provide information such as the modifier, modification time, and modification content, while the call chain graph describes the call relationships between methods. The combination of the two enables the system to recursively analyze the propagation path of file changes in the call chain. For example, when a service layer method is modified, the system can automatically identify that it is called by a controller layer method and further trace its impact on persistent layer methods, thereby generating a complete cross-module impact chain. This avoids the limitations of static analysis and ensures that the test scope covers all affected file paths. In addition, the topology of the call chain graph supports efficient recursive analysis, adapts to the needs of large-scale file libraries, and significantly improves testing efficiency and accuracy. Through the dynamic mapping mechanism, the system can respond to file changes in real time, reduce manual intervention, reduce the risk of test omissions, and optimize test resource allocation.
[0046] In one possible implementation, step S203 above determines the affected paths and corresponding responsible parties for code changes based on the method call relationships in the code and the modifier, modification time, and modification content of each modification to the modified file, including:
[0047] S2031: Based on the modifications to the file, find the call relationships and obtain the affected paths.
[0048] In this step, we can find the call relationships based on the methods in the modified content, obtain other methods associated with the methods in the modified content, associate these methods, and obtain the affected paths.
[0049] S2032: Determine the responsible party based on the person who modified the document, the time of modification, and the content of the modification.
[0050] In this step, the file being modified can have been modified at least once, with each modification having a corresponding modifier, modification time, and modification content. The modification content can include a range of modified lines. This step counts the number of modifications by the modifier based on the modification time of the file being modified, and determines the time parameter corresponding to the modifier, based on the number of modifications and the modification content.
[0051] As can be seen from the description of the above embodiments, the embodiments of this disclosure can accurately locate the code range that may be affected by the file modification by finding the calling relationship according to the modified content, and determine the responsible person according to the modifier, modification time and modification content of the modified file, so as to accurately locate the responsible person by combining multiple factors.
[0052] In one possible implementation, step S2032 above determines the responsible party based on the modifier, modification time, and modification content of the modified file, including:
[0053] S321: Count the number of modifications made by the person making the modification.
[0054] In this step, since the modifier, modification time, and modification content of the modified file can be recorded multiple times, the number of records of the target modifier can be counted to obtain the number of modifications.
[0055] S322: Determine the responsible party based on the number of modifications made by the person making the modification, the time of modification, and the content of the modification.
[0056] This step includes: finding the correspondence between the number of modifications and their corresponding values to obtain the number of modifications; determining whether the modifier is the first creator or the last modifier based on the modification time, and determining the corresponding modification time value based on the determination result; reading the number of modified lines corresponding to the modified content; and determining the corresponding modified line value based on the number of modified lines. The number of modifications, modification time value, and modified line value are then weighted and summed, or the number of modifications, modification time value, and modified line value are input into a pre-trained neural network model to obtain a comprehensive score. The modifier with the highest comprehensive score is identified as the responsible party.
[0057] As can be seen from the description of the above embodiments, the embodiments of this disclosure determine the corresponding person in charge by counting the number of modifications made by the person making the modification, and combining the number of modifications, the modification time, and the modification content, thereby achieving a comprehensive judgment of the person in charge from multiple dimensions.
[0058] In one possible implementation, in step S322 above, the responsible party is determined based on the number of modifications made by the modifier, the modification time, and the modification content, including:
[0059] S3221: Determine the submission time value corresponding to the modifier based on the modification time corresponding to the modifier.
[0060] In this step, the modifiers can be sorted according to their modification time. The modifier at the top of the list is identified as the file creator, and the modifier at the bottom of the list is identified as the final modifier. Different preset commit time values are assigned to the file creator, the final modifier, and other modifiers.
[0061] S3222: Determine the number of modifications made by the person making the modification based on the number of modifications made by that person.
[0062] In this step, you can find the preset correspondence between the number of modifications and the corresponding value, based on the number of modifications. Alternatively, you can multiply the number of modifications by a preset coefficient to obtain the value.
[0063] S3223: Count the number of modified lines in the content corresponding to the modifier.
[0064] In this step, you can compare the modified content with the unmodified content to identify the different rows, and then count them to get the number of modified rows. Alternatively, you can directly count the number of rows with modified content to get the total number of modified rows.
[0065] S3224: Determine the row number corresponding to the person who made the modification based on the number of rows modified.
[0066] This step is similar to step S3222 above. You can find the corresponding relationship or multiply it by the coefficient to get the row value.
[0067] S3225: Determine the overall score for the person making the modification based on the submission time, number of submissions, and number of lines.
[0068] This step involves weighted summation of the submission time, number of submissions, and number of rows to obtain a comprehensive score. Alternatively, the submission time, number of submissions, and number of rows can be input into a pre-trained neural network model to obtain the comprehensive score output by the neural network model.
[0069] S3226: The person who made the modification with the highest overall score shall be identified as the person responsible.
[0070] In this step, the overall scores can be sorted from largest to smallest, and the person who made the modification at the top of the list can be identified as the person responsible.
[0071] As can be seen from the description of the above embodiments, the embodiments of this disclosure determine the submission time value, number of times value, and line value based on the number of modifications, modification time, and modification content, and then determine the comprehensive score by combining the submission time value, number of times value, and line value. The person who modifies the document with the highest comprehensive score is designated as the person responsible, thereby accurately locating the person who modifies the document with the greatest impact.
[0072] In one possible implementation, step S3221 above, determining the submission time value corresponding to the modifier based on the modification time corresponding to the modifier, includes:
[0073] S2211: If the modification time corresponding to the target modifier is the earliest, then the creator's score will be determined as the submission time value corresponding to the target modifier.
[0074] In this step, the person who made the earliest modification is the creator.
[0075] The creator's score can be preset by staff based on experimental data or experience.
[0076] S2212: If the modification time corresponding to the target modifier is the latest, then the final modifier's score will be determined as the submission time value corresponding to the target modifier.
[0077] In this step, the person who made the last modification is the final modifier.
[0078] The final modifier's score can be preset by staff based on experimental data or experience. The final modifier's score can be greater than the creator's score.
[0079] S2213: If the modification time corresponding to the target modifier is neither the earliest nor the latest, then the score of the ordinary modifier shall be determined as the submission time value corresponding to the target modifier.
[0080] Among them, since the creator and the final modifier have a greater impact on the correctness of the file, the score of the ordinary modifier can be less than the score of the creator and the final modifier.
[0081] As can be seen from the description of the above embodiments, the embodiments of this disclosure differentiate the importance of modifications based on the modification time by assigning different scores to different modifiers based on the modification time.
[0082] In one possible implementation, step S3225 above determines the overall score for the person making the modification based on the submission time value, the number of submissions, and the number of lines, including:
[0083] S32251: The submission time value, number value, and line value are weighted and summed to obtain the comprehensive score corresponding to the modifier.
[0084] In this step, the weights corresponding to the submission time value, number of submissions, and row number can be preset by the staff based on the experimental data.
[0085] As can be seen from the description of the above embodiments, the embodiments of this disclosure obtain the comprehensive score corresponding to the modifier by weighted summing of the submission time value, number value and line value, which facilitates the accurate identification of the responsible person in the future.
[0086] In one possible implementation, step S32251 above involves a weighted sum of the submission time value, frequency value, and line value to obtain the comprehensive score corresponding to the modifier, including:
[0087] S2511: Obtain the project risk level and team collaboration mode corresponding to the modified file.
[0088] In this step, you can read the name of the modified file, find the corresponding project based on the name, read the attributes of the project, and obtain the project risk level and team collaboration mode.
[0089] S2512: Determine the submission time weight corresponding to the submission time value based on the project risk level and team collaboration mode.
[0090] In this step, based on the project risk level and team collaboration mode, the preset correspondence between risk level, collaboration mode, and submission time weight can be found to obtain the submission time weight. Alternatively, the preset correspondence between risk level and risk weight can be found based on the project risk level to obtain the target risk weight. Based on the team collaboration mode and the value of the submission time value (the submission time value is the creator's score, the final modifier's score, or the ordinary modifier's score), the preset correspondence between team collaboration mode, submission time value, and collaboration weight can be found to obtain the target collaboration weight. Multiplying the target risk weight by the target collaboration weight yields the submission time weight.
[0091] Among the relationships between risk level, collaboration mode and submission time weight, the higher the risk level, the higher the submission time weight. Low-frequency collaboration teams have a greater submission time weight (preferring to identify the creator or final modifier as the responsible party), while high-frequency collaboration teams have a smaller submission time weight.
[0092] As can be seen from the description of the above embodiments, this disclosure embodiment obtains the project risk level and team collaboration mode corresponding to the modified file, and determines the submission time weight corresponding to the submission time value based on the project risk level and team collaboration mode, thereby increasing the accuracy of the submission time weight and accurately locating the responsible party.
[0093] Figure 3 This is a schematic diagram of the structure of the code change information processing device provided in an embodiment of this application. Figure 3 As shown, the code change information processing device 300 includes: a record acquisition module 301, a map acquisition module 302, an information determination module 303, and an information output module 304.
[0094] The record acquisition module 301 is used to respond to a request to acquire test information for a modified file and acquire the file change record, wherein the file change record includes the modifier, modification time and modification content of the modified file;
[0095] The graph acquisition module 302 is used to acquire the call chain graph, which includes the call relationship of methods in the code;
[0096] The information determination module 303 is used to determine the affected paths and corresponding responsible persons of code changes based on the calling relationship of methods in the code and the modifier, modification time, and modification content of each modification to the modified file;
[0097] Information output module 304 is used to output the affected paths and responsible persons for code changes.
[0098] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0099] In one possible implementation, the information determination module 303 is used to find the call relationship and obtain the affected path based on the modification content corresponding to the modified file; and to determine the responsible person based on the modifier, modification time and modification content corresponding to the modified file.
[0100] In one possible implementation, the information determination module 303 is used to count the number of modifications corresponding to the modifier; and to determine the responsible person based on the number of modifications, modification time, and modification content corresponding to the modifier.
[0101] In one possible implementation, the information determination module 303 is used to determine the submission time value corresponding to the modifier based on the modification time corresponding to the modifier; determine the number of modifications corresponding to the modifier based on the number of modifications corresponding to the modifier; count the number of modified lines in the modification content corresponding to the modifier; determine the line value corresponding to the modifier based on the number of modified lines; determine the comprehensive score corresponding to the modifier based on the submission time value, the number of modifications value, and the line value; and determine the modifier with the highest comprehensive score as the responsible person.
[0102] In one possible implementation, the information determination module 303 is used to determine the creator's score as the submission time value corresponding to the target modifier if the modification time corresponding to the target modifier is the earliest; if the modification time corresponding to the target modifier is the latest, the final modifier's score is determined as the submission time value corresponding to the target modifier; if the modification time corresponding to the target modifier is neither the earliest nor the latest, the ordinary modifier's score is determined as the submission time value corresponding to the target modifier.
[0103] In one possible implementation, the information determination module 303 is used to perform a weighted summation of the submission time value, the number of submissions, and the number of lines to obtain the comprehensive score corresponding to the modifier.
[0104] In one possible implementation, the information determination module 303 is used to obtain the project risk level and team collaboration mode corresponding to the modified file; and to determine the submission time weight corresponding to the submission time value based on the project risk level and team collaboration mode.
[0105] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0106] To implement the above embodiments, this application also provides an electronic device.
[0107] refer to Figure 4 The diagram illustrates a structural schematic of an electronic device 400 suitable for implementing embodiments of this application. The electronic device 400 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0108] like Figure 4As shown, the electronic device 400 may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 401 and a memory 402 communicatively connected to the processor. The processor can perform various appropriate actions and processes based on programs stored in the memory 402, computer-executed instructions, or programs loaded from storage device 408 into random access memory (RAM) 403, implementing the code change information processing method in any of the above embodiments. The memory may be a read-only memory (ROM). The RAM 403 also stores various programs and data required for the operation of the electronic device 400. The processing device 401, the memory 402, and the RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0109] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0110] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from memory 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this application.
[0111] It should be noted that the computer-readable storage medium described above in this application can be a computer-readable signal medium, a computer storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0112] The aforementioned computer-readable storage medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0113] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.
[0114] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0116] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the units do not necessarily limit the module itself.
[0117] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0118] This application also provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the technical solution of the code change information processing method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the code change information processing method. Please refer to the implementation principle and beneficial effects of the code change information processing method. It will not be repeated here.
[0119] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. 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 of the foregoing.
[0120] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the technical solution of the code change information processing method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the code change information processing method, and can be found in the implementation principle and beneficial effects of the code change information processing method, which will not be repeated here.
[0121] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
[0122] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0123] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for processing code change information, characterized in that, include: In response to receiving a request to obtain test information for a modified file, the file change record is obtained, wherein the file change record includes the modifier, modification time, and modification content of the modified file; Obtain a call chain graph, wherein the call chain graph includes the call relationships of methods in the code; Based on the method call relationships in the code and the modifier, modification time, and modification content of each modification to the modified file, determine the affected paths and corresponding responsible persons for the code changes; Output the affected paths of the code change and the responsible parties.
2. The method according to claim 1, characterized in that, The step of determining the affected paths and corresponding responsible parties for code changes based on the method call relationships in the code and the modifier, modification time, and modification content of each modification to the modified file includes: Based on the modifications to the modified file, the call relationship is located to obtain the affected path; The responsible party is determined based on the person who modified the file, the time of modification, and the content of the modification.
3. The method according to claim 2, characterized in that, The process of determining the responsible party based on the modifier, modification time, and modification content of the modified file includes: Count the number of modifications made by the person making the modification; The responsible person is determined based on the number of modifications made by the person making the modification, the time of modification, and the content of the modification.
4. The method according to claim 3, characterized in that, The determination of the responsible person based on the number of modifications, modification time, and modification content of the person making the modification includes: Based on the modification time corresponding to the modifier, determine the submission time value corresponding to the modifier; The number of modifications made by the person making the modification is determined based on the number of modifications made by that person. Count the number of lines modified in the content corresponding to the person making the modification; Based on the number of modified lines, determine the line value corresponding to the person making the modification; The overall score corresponding to the modifier is determined based on the submission time value, the number of submissions, and the number of rows. The person who made the modification with the highest overall score will be identified as the responsible party.
5. The method according to claim 4, characterized in that, The step of determining the submission time value corresponding to the modifier based on the modification time corresponding to the modifier includes: If the modification time corresponding to the target modifier is the earliest, then the creator's score will be determined as the submission time value corresponding to the target modifier; If the modification time corresponding to the target modifier is the latest, then the final modifier's score will be determined as the submission time value corresponding to the target modifier; If the modification time corresponding to the target modifier is neither the earliest nor the latest, then the score for ordinary modifiers will be determined as the submission time value corresponding to the target modifier.
6. The method according to claim 4, characterized in that, The process of determining the overall score corresponding to the modifier based on the submission time value, the number of submissions, and the number of lines includes: The submission time value, the number of submissions, and the number of rows are weighted and summed to obtain the comprehensive score corresponding to the modifier.
7. The method according to claim 6, characterized in that, The step of weighted summing of the submission time value, the number of submissions, and the number of lines to obtain the comprehensive score corresponding to the modifier includes: Obtain the project risk level and team collaboration mode corresponding to the modified file; Based on the project risk level and the team collaboration mode, determine the submission time weight corresponding to the submission time value.
8. A code change information processing device, characterized in that, include: The record acquisition module is used to respond to a test information acquisition request for a modified file and acquire the file change record, wherein the file change record includes the modifier, modification time and modification content corresponding to the modified file; The graph acquisition module is used to acquire the call chain graph, wherein the call chain graph includes the call relationship of methods in the code; The information determination module is used to determine the affected paths and corresponding responsible persons of the code changes based on the calling relationships of the methods in the code and the modifier, modification time, and modification content of each modification to the modified file. The information output module is used to output the affected paths of the code change and the responsible persons.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 7.