Method and system for matching responsible person of code static analysis problem

By establishing integration between the code version control system and the business system, and using code static analysis tools and API interactions to automatically match the responsible persons of code problems, the problems of insufficient integration and low accuracy of matching the responsible persons in the existing technology are solved, and the efficiency of code problem repair and team collaboration are improved.

CN119885174APending Publication Date: 2025-04-25VISION MICROSYST (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411938084.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing technology has problems such as insufficient integration and low matching accuracy in matching code problem tracking and responsible persons, resulting in inefficient repair of code problem problems.

Method used

By establishing the integration of the business system and the code version control system, collecting and organizing the development member account information, using the code static analysis tool to discover code problems, and interacting with the code version control system through the API to obtain the code writer information of the code problem, and automatically compare and assign the responsible person in the responsible person information database.

Benefits of technology

It realizes automatic tracking of code problems and matching responsible persons, significantly improves team collaboration efficiency and problem solving speed, and reduces the risk of manual intervention and errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885174A_ABST
    Figure CN119885174A_ABST
Patent Text Reader

Abstract

The invention provides a responsible person matching method for a code static analysis problem, which comprises the following steps of: establishing integration between a service system and a code version control system, and performing user management in the code version control system by the service system; establishing a responsible person information base in the business system, and collecting and sorting account information of development members in the software development team; a code static analysis tool is used for conducting static analysis on a code warehouse in the code version control system, potential code problems are found, scanning results are analyzed, and detailed information of each code problem is extracted; based on the analyzed detailed information of the code problem, interacting with a code version control system through an API (Application Program Interface) to obtain code submitter information of the code problem; and the information of the code submitter is compared in the responsible person information base, and the responsible person is identified and automatically allocated. According to the invention, through integration of the business system and the code version control system, automatic tracking and responsible person matching of code problems are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development and maintenance, and in particular to a method and system for matching responsible persons for code static analysis problems. Background Art

[0002] In the software development process, the quality and security of the code are of vital importance. However, as the scale of software continues to expand and the complexity of the code increases, the problems in the code (such as security vulnerabilities, logical errors, etc.) are also increasing. Traditional methods of tracking code problems and matching responsible persons mostly rely on manual review and assignment, which is not only time-consuming and labor-intensive, but also prone to errors, resulting in inefficient repair of code problems.

[0003] To meet this challenge, the industry has begun to explore the use of automated tools and technologies to assist in tracking code issues and matching responsible persons. Despite this, existing solutions still have some shortcomings. On the one hand, many tools can only provide code scanning and problem analysis functions, but cannot be seamlessly integrated with business systems and code version control systems, making it impossible to obtain the latest code submission records and responsible person information in real time. On the other hand, even if some tools support integration, they often rely on simple rule matching or keyword searches for responsible person matching, resulting in low accuracy of matching results and difficulty in effectively guiding subsequent code problem repair work.

[0004] A code management method and device are disclosed in a patent document with publication number CN111435306A, which relates to the field of computer technology. A specific implementation of the method includes: obtaining the user's code integration application information; determining the test process of the code according to the code integration application information, the test process includes at least one test node, and sending a test notification to each of the test nodes; obtaining the test results of each of the test nodes, and determining whether the test status of the code is a test pass according to the test results of each of the test nodes; when the test status of the code is a pass, applying to provide the user with code integration permissions. This implementation can automatically realize centralized management of code information, code test management, and code integration.

[0005] In a software development team, the efficiency of collaboration between members also directly affects the speed of fixing code problems. If the responsible person is not matched accurately or the notification is not timely, the problem will often be delayed or ignored, which will affect the progress and quality of the entire project.

[0006] Therefore, it is necessary to propose a new technical solution to improve the above technical problems. Summary of the invention

[0007] In view of the defects in the prior art, the purpose of the present invention is to provide a method and system for matching responsible persons for code static analysis problems.

[0008] A method for matching responsible persons for code static analysis problems provided by the present invention comprises the following steps:

[0009] Step S1: Establish integration between the business system and the code version control system. The business system manages users in the code version control system and obtains the latest code submission records, code change details, and version control information.

[0010] Step S2: Establish a responsible person information database in the business system, collect and organize the account information of the development members in the software development team; first of all, it is necessary to clarify that the goal of establishing the responsible person information database is to associate the user member information of the business system with the users in the code version control system, and then collect the data elements required to establish the association relationship. With the business system as the main system, the user information is obtained and saved through manual entry or code version control system to form a responsible person information database;

[0011] Step S3: Use a code static analysis tool to perform static analysis on the code repository in the code version control system to discover potential code problems, and parse the scan results to extract detailed information about each code problem; based on the code static analysis tool, check the code according to its predefined coding rules, identify the code segments that violate these rules, and generate a code quality report;

[0012] Step S4: Based on the parsed detailed information of the code problem, the code version control system is interacted with through the API to obtain the code submitter information of the code problem; the code version control system has the ability to integrate with the outside world, and provides the API to the outside world in an open authorization manner. The business system performs system integration according to the API to obtain the required data in the code version control system;

[0013] Step S5: Compare the code submitter information in the responsible person information database, identify and automatically assign the responsible person.

[0014] Preferably, the integration method of the business system and the code version control system in step S1 includes: integrating with the business system through an API interface provided by the code version control system, or developing middleware or plug-ins to embed the code version control system function in the business system.

[0015] Preferably, the responsible person information database in step S2 includes the user name and email account information of the development member, and the unique identifier of the user in the code version control system.

[0016] Preferably, the detailed information of the code problem parsed in step S4 includes: the code repository, code branch, code tag, code file address, code problem line number, code problem solution and code version record number.

[0017] Preferably, the method further comprises the steps of: generating a responsible person problem report based on the code problem matched by the responsible person, and sending the report to the responsible person via a message notification method; the message notification method comprises an email or an in-site message.

[0018] Preferably, the method further comprises the steps of: configuring API call credential information in the code version control system, and storing the credential information in the business system, wherein the business system performs identity authentication through the credential information to make API calls to the code version control system.

[0019] The present invention also provides a system for matching responsible persons for code static analysis problems. The system implements the above-mentioned method for matching responsible persons for code static analysis problems, including:

[0020] Integration module: used to establish integration between business systems and code version control systems;

[0021] Information database module: used to establish a responsible person information database in the business system;

[0022] Analysis module: used to use code static analysis tools to perform static analysis on the code repository in the code version control system and parse the scan results;

[0023] Assignment module: It is used to interact with the code version control system through the API based on the parsed code problem details, obtain the code submitter information of the code problem, and compare and identify and automatically assign the responsible person in the responsible person information database.

[0024] Preferably, it also includes a reporting module, which is used to generate a responsible person problem report based on the code problem matched by the responsible person, and send it to the responsible person through a message notification.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] 1. The present invention realizes the automatic tracking of code problems and matching of responsible persons through the integration of business system and code version control system;

[0027] 2. The present invention can automatically determine the person responsible for the code problem through the software development team responsible person information database, code scanning result analysis, and accurate matching of code problem data elements, thereby significantly improving team collaboration efficiency and problem solving speed;

[0028] 3. By automatically assigning responsible persons, the present invention allows developers to start work faster, reduces waiting time, promotes the rapid resolution of code problems, and helps keep the code repository clean and orderly;

[0029] 4. The present invention can establish a complete set of automated processes from code scanning, problem analysis, responsibility allocation to problem notification by adopting an automatic method of assigning responsibilities, which reduces manual intervention, reduces the risk of human errors, and improves the efficiency and accuracy of teamwork. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0031] Figure 1 It is a general example diagram of the present invention;

[0032] Figure 2 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0033] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0034] Embodiment 1:

[0035] Reference Figure 1 and Figure 2 According to a method for matching responsible persons for code static analysis problems provided by the present invention, the method comprises the following steps:

[0036] Step S1: Establish integration between the business system and the code version control system. The business system manages users in the code version control system and obtains the latest code submission records, code change details, and version control information. The integration methods of the business system and the code version control system include: integrating with the business system through the API interface provided by the code version control system, or developing middleware or plug-ins to embed the code version control system function in the business system.

[0037] Step S2: Establish a responsible person information database in the business system to collect and organize the account information of the development members in the software development team; the responsible person information database includes the user name and email account information of the development members, as well as the unique identifier of the user in the code version control system. First of all, it is necessary to clarify that the goal of establishing the responsible person information database is to associate the user member information of the business system with the user in the code version control system. Secondly, collect the data elements required to establish the association, such as name, email address, user unique identifier, etc., with the business system as the main system, and obtain user information through manual entry or code version control system for storage to form a responsible person information database.

[0038] Step S3: Use a code static analysis tool to perform static analysis on the code repository in the code version control system to discover potential code problems, and parse the scan results to extract detailed information about each code problem; based on the code static analysis tool, check the code according to its predefined coding rules, identify the code segments that violate these rules, and generate a code quality report;

[0039] Step S4: Based on the parsed code problem details, interact with the code version control system through the API to obtain the code submitter information of the code problem; the parsed code problem details include: the code repository to which it belongs, the code branch, the code tag, the code file address, the code problem line number, the code problem solution, and the code version record number. The code version control system has the ability to integrate with the outside world, and provides an API to the outside world in an open authorization manner. The business system performs system integration based on the API to obtain the required data in the code version control system; common process: 1. Login, use the login API to log in to the code version control system in interface-free mode, and obtain the authorization token of the currently logged-in user. 2. Data acquisition, obtain the required code submitter data through the authorization token and the code submission record API.

[0040] Step S5: Compare the code submitter information in the responsible person information database, identify and automatically assign the responsible person.

[0041] Step S6: Generate a responsible person problem report based on the code problem matched by the responsible person, and send it to the responsible person via a message notification method; the message notification method includes email and in-site letter.

[0042] Step S7: configure API call credential information in the code version control system, and save the credential information in the business system. The business system performs identity authentication through the credential information to make API calls to the code version control system.

[0043] The present invention also provides a system for matching responsible persons for code static analysis problems. The system implements the above-mentioned method for matching responsible persons for code static analysis problems, including:

[0044] Integration module: used to establish integration between business systems and code version control systems;

[0045] Information database module: used to establish a responsible person information database in the business system;

[0046] Analysis module: used to use code static analysis tools to perform static analysis on the code repository in the code version control system and parse the scan results;

[0047] Assignment module: It is used to interact with the code version control system through the API based on the parsed code problem details, obtain the code submitter information of the code problem, and compare and identify and automatically assign the responsible person in the responsible person information database.

[0048] Report module: used to generate a responsible person problem report based on the code problems matched by the responsible person, and send it to the responsible person through message notification.

[0049] Embodiment 2:

[0050] The present invention provides a method for matching responsible persons for code static analysis problems, comprising the following steps:

[0051] Step 1: Establish integration between business system and code version control system.

[0052] Establishing a close connection between the business system and the code version control system enables direct user management in the code version control system in the business system, while supporting the acquisition of the latest code submission records, code change details, and version control information.

[0053] There are roughly two ways of integration: one is to integrate with the business system through the API interface provided by the code version control system; the other is to develop middleware or plug-ins to embed the code version control system function in the business system.

[0054] Based on the code version control system, an API interface is provided, which is specifically implemented as follows:

[0055] The first step is to have an in-depth understanding of the API interfaces provided by the code version control system, especially interfaces such as user information, code repository information, code submission records, branches, and tags.

[0056] The second step is to preset the business system to synchronize the credential information with the code version control system. Configure the API call credential information in the code version control system and save the credential information in the business system. The subsequent business system uses the credential information for identity authentication to make API calls to the code version control system.

[0057] Step 2: Establish a responsible person information database.

[0058] Collect and organize the account information of the development members in the software development team in the business system, including user name, email address, etc. Based on the implementation of step 1, the business system synchronizes the user information of the software development team to the code version control system through the API interface in real time and asynchronously, records the user's unique identifier in the code version control system, and then realizes the user binding of both systems. At the same time, the user information in the code version control system is managed, and the development members of the software team can directly submit the code to the code warehouse using the account information in the business system.

[0059] Step 3: Code static analysis and problem analysis.

[0060] In the actual software development process, developers continuously submit code to the code repository, and use code static analysis tools to perform static analysis on the code repository in the code version control system to find potential code problems (such as security vulnerabilities, code problems, etc.). Then, the scan results are parsed to extract detailed information for each code problem, including the code repository, code branch, code tag, code file address, code problem line number, code problem solution, and code version record number. The above information is pushed to the business system for storage.

[0061] Step 4: Responsible persons are automatically assigned.

[0062] Based on the implementation of step 3, the code repository, code branch, code tag, code file address, line number, and code version record number data elements of the code issue can be obtained. Based on the implementation of step 1, the above data elements interact with the code version control system through the API to obtain the unique identifier of the code submitter information of the code issue. Based on the implementation of step 2, the responsible person information database is used to identify the person in charge of the code issue in the business system and automatically assign the responsible person.

[0063] Step 5: Responsible person problem report.

[0064] Based on the implementation of step 4, the responsible person is matched with the code problem to generate a responsible person problem report. The report lists each code problem information in detail, including code repository, code branch, code tag, code file address, code problem line number, code problem solution, code version record number, etc. The report can be sent to the responsible person through message notification (email, internal message), etc., so that the code problem can be fixed in time.

[0065] In the software development process, the continuous integration / continuous deployment system can automatically build, test and deploy code, thereby significantly improving development efficiency and code quality. The responsible person matching method for code static analysis problems is integrated with the continuous integration / continuous deployment system to ensure that each code submission can receive timely analysis and feedback, and can automatically match the responsible person, reduce manual intervention, and improve problem handling efficiency. The following steps are included:

[0066] Step S1: Establish a suitable continuous integration / continuous deployment system, such as Jenkins, GitLab CI / CD, CircleCI, etc., and configure the system according to the needs of the team;

[0067] Step S2: Configure the integration of the code repository (such as Git) and the continuous integration / continuous deployment system to ensure that the code module content can be included in the continuous integration / continuous deployment process;

[0068] Step S3: Configure static analysis tools, such as SonarQube, Checkstyle, etc., and use the code static analysis tools to perform static analysis on the code repository in the code version control system to find potential code problems, and parse the scan results to extract detailed information for each code problem;

[0069] Step S4: Integrate the API or middleware of the responsible person matching method into the continuous integration / continuous deployment system. This usually involves writing or configuring appropriate scripts and plug-ins to call the responsible person matching service in the continuous integration / continuous deployment process. Configure API call credential information, including API key, username and password, to ensure that the continuous integration / continuous deployment system can securely access the responsible person matching service; perform responsible person matching based on the code problem data scanned in step S3.

[0070] Step S5: Configure automated notification functions in the continuous integration / continuous deployment system, such as emails, internal messages, etc., so that the responsible person can be notified in a timely manner when problems are found. Ensure that the notification content contains a detailed description of the problem, information about the responsible person, and solution suggestions.

[0071] When integrated with a continuous integration / continuous deployment system, the following integration effects and advantages can be achieved:

[0072] Automated analysis and feedback: After each code submission, the continuous integration / continuous deployment system will automatically trigger code static analysis and generate a problem report. The responsible person matching module will automatically match the responsible person based on the problem report and send the problem report through automated notification.

[0073] Improve problem handling efficiency: Responsible people can understand and handle problems in the code in a timely manner, reducing manual intervention and communication costs. At the same time, the automated building and testing functions of the continuous integration / continuous deployment system can ensure that problems are solved in a timely manner, improving code quality and development efficiency.

[0074] Enhance team collaboration: By integrating the continuous integration / continuous deployment system and the responsible person matching method, team members can have a clearer understanding of their respective responsibilities and tasks, which promotes team collaboration and communication.

[0075] Project management tools also play an important role in the software development process. They can help teams better track and manage tasks, defects, requirements, etc. Integrating the responsible person matching method for code static analysis problems with project management tools can synchronize problem information to project management tools, making it easier for project managers to track and monitor the progress of problem handling. The following steps are included:

[0076] Step S1: Establish a suitable project management tool system, such as Jira, Trello, Worktile, etc., and configure the system according to the needs of the team;

[0077] Step S2: Configure the integration of the project management tool with the code version control system and the continuous integration / continuous deployment system to ensure smooth data communication of problem information;

[0078] Step S3: Integrate the API or middleware of the responsible person matching method into the project management tool. This usually involves writing or configuring appropriate plug-ins and scripts to call the responsible person matching service in the project management tool. Configure API call permissions and authentication information to ensure that the project management tool can securely access the responsible person matching service;

[0079] Step S4: Configure the continuous integration / continuous deployment system or code static analysis tool to synchronize problem information to the project management tool. This usually involves writing or configuring appropriate scripts and plug-ins to automatically add problem information to the project management tool when a problem is discovered, and add the person responsible for the problem based on step S3.

[0080] Step S5: Configure automated tasks in the project management tool, such as issue status update notifications, responsible person change notifications, etc. This can help team members keep abreast of the latest progress and changes of the issue.

[0081] When integrated with project management tools, the following integration effects and advantages can be achieved:

[0082] Problem information synchronization: By integrating project management tools and responsible person matching methods, problem information can be automatically synchronized to project management tools, making it easier for project managers to track and monitor the progress of problem handling.

[0083] Improve team collaboration efficiency: Team members can view and manage issues in project management tools, reducing communication costs and time waste. At the same time, automated tasks can help team members keep abreast of the latest progress and changes in issues.

[0084] Enhanced project management capabilities: By integrating project management tools and responsible person matching methods, project managers can have a more comprehensive understanding of the status and progress of projects and make more informed decisions.

[0085] Those skilled in the art may understand this embodiment as a more specific description of Embodiment 1.

[0086] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0087] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A method for matching responsible persons for code static analysis problems, characterized in that: The following steps are involved: Step S1: Establish integration between the business system and the code version control system. The business system manages users in the code version control system and obtains the latest code submission records, code change details, and version control information. Step S2: Establish a responsible person information database in the business system, collect and organize the account information of the development members in the software development team; first of all, it is necessary to clarify that the goal of establishing the responsible person information database is to associate the user member information of the business system with the users in the code version control system, and then collect the data elements required to establish the association relationship. With the business system as the main system, the user information is obtained and saved through manual entry or code version control system to form a responsible person information database; Step S3: Use a code static analysis tool to perform static analysis on the code repository in the code version control system to discover potential code problems, and parse the scan results to extract detailed information about each code problem; based on the code static analysis tool, check the code according to its predefined coding rules, identify the code segments that violate these rules, and generate a code quality report; Step S4: Based on the parsed detailed information of the code problem, interact with the code version control system through the API to obtain the code submitter information of the code problem; The code version control system has the ability to integrate with external systems and provides APIs to external systems through open authorization. Business systems can integrate systems based on the APIs and obtain the data required by the code version control system. Step S5: Compare the code submitter information in the responsible person information database, identify and automatically assign the responsible person.

2. The method for matching responsible persons for code static analysis problems according to claim 1, characterized in that: The integration method of the business system and the code version control system in step S1 includes: integrating with the business system through the API interface provided by the code version control system, or developing middleware or plug-ins to embed the code version control system function in the business system.

3. The method for matching responsible persons for code static analysis problems according to claim 1, characterized in that: The responsible person information database in step S2 includes the user name and email account information of the development member, and the unique identifier of the user in the code version control system.

4. The method for matching responsible persons for code static analysis problems according to claim 1, characterized in that: The detailed information of the code problem parsed in step S4 includes: the code repository to which it belongs, the code branch, the code tag, the code file address, the code problem line number, the code problem solution and the code version record number.

5. The method for matching responsible persons for code static analysis problems according to claim 1, characterized in that: The method also includes the steps of: generating a responsible person problem report based on the code problem matched by the responsible person, and sending the report to the responsible person via a message notification method; the message notification method includes email and in-site letter.

6. The method for matching responsible persons for code static analysis problems according to claim 1, characterized in that: The method also includes the steps of configuring API call credential information in the code version control system, and storing the credential information in the business system, and the business system performs identity authentication through the credential information to make API calls to the code version control system.

7. A system for matching responsible persons for code static analysis problems, the system implementing the method for matching responsible persons for code static analysis problems according to any one of claims 1 to 6, characterized in that: include: Integration module: used to establish integration between business systems and code version control systems; Information database module: used to establish a responsible person information database in the business system; Analysis module: used to use code static analysis tools to perform static analysis on the code repository in the code version control system and parse the scan results; Assignment module: It is used to interact with the code version control system through the API based on the parsed code problem details, obtain the code submitter information of the code problem, and compare and identify and automatically assign the responsible person in the responsible person information database.

8. The responsible person matching system for code static analysis problems according to claim 7 is characterized in that: It also includes a reporting module for generating a responsible person problem report based on the code problems matched by the responsible person, and sending the report to the responsible person via a message notification.

Citation Information

Patent Citations

  • Code management method and device

    CN111435306A