Code review method and device, computer equipment, readable storage medium and program product

By integrating the code review method of the review plug-in in the development environment, the problem of inefficient code review in the existing technology is solved, and a faster and more efficient code review process is achieved.

CN119473433APending Publication Date: 2025-02-18CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411670594.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing code review technology has problems such as inconvenience in communication and inefficiency.

Method used

Provide a code review method, by integrating review plug-ins in the development environment, displaying the code to be reviewed and obtaining relevant information, editing review opinions and personnel information, sending them to the server to trigger modification prompts, and receiving opinions and obtaining requests in the second terminal to get the modification results.

Benefits of technology

Code interaction is carried out through the review plug-in, which significantly accelerates the review speed and improves the efficiency of code review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473433A_ABST
    Figure CN119473433A_ABST
Patent Text Reader

Abstract

The invention relates to a code review method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps that a to-be-reviewed code is displayed, in response to a selection operation for the to-be-reviewed code, relevant information of the selected code is obtained under the condition that a review plug-in is triggered, and the review plug-in is integrated in a development environment corresponding to the to-be-reviewed code; in response to an editing operation for editing the review opinions, obtaining the review opinions of the selected codes and information of personnel needing to modify the selected codes; sending the related information, the review opinions and the personnel information to a server side to indicate the server side to send a modification prompt to a second terminal corresponding to the personnel information, and sending the related information and the review opinions to the second terminal under the condition that an opinion acquisition request of the second terminal is received; and after the second terminal submits the modification result, displaying the modification result. And the code interaction operation is performed through the review plug-in, so that the code review efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a code review method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of social digitalization, software development is also constantly developing, and code review is a very important part of the software development process. Through systematic inspection and review of the code, it aims to discover potential problems, provide feedback and ensure code quality.

[0003] Common code review techniques include using version control systems, such as Git, to manage code changes. Submitters initiate merge requests, and approvers review the submitter's code. Static analysis tools can also be used, that is, running static code analysis tools before code submission to detect potential code quality issues, such as code duplication, security vulnerabilities, performance issues, etc. Therefore, existing code review technologies have problems such as inconvenient communication and low efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a code review method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve review efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a code review method, applied to a first terminal, comprising:

[0006] Display the code to be reviewed, and in response to a selection operation on the code to be reviewed, obtain relevant information of the selected code when a review plug-in is triggered, wherein the review plug-in is integrated in a development environment corresponding to the code to be reviewed;

[0007] In response to an editing operation for editing the review comments, obtaining the review comments for the selected code and the information of the person who needs to modify the selected code;

[0008] Sending the relevant information, the review opinion and the personnel information to the server to instruct the server to send a modification prompt to the second terminal corresponding to the personnel information, and sending the relevant information and the review opinion to the second terminal upon receiving the opinion acquisition request sent by the second terminal;

[0009] After the second terminal submits the modification result, the modification result is displayed.

[0010] In one embodiment, in response to a selection operation on the code to be reviewed, when a review plug-in is triggered, obtaining relevant information of the selected code includes:

[0011] In response to the selection operation on the code to be reviewed, when the review plug-in is triggered, a review opinion window is displayed;

[0012] In the information column of the review opinion window, relevant information of the selected code is automatically filled in.

[0013] In one embodiment, the relevant information includes the project name and project address corresponding to the code to be reviewed, the file branch name, file path and location information of the code to be reviewed.

[0014] In a second aspect, the present application provides a code review method, applied to a second terminal, comprising:

[0015] Receiving a modification prompt sent by the server, wherein the modification prompt is triggered after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in;

[0016] Sending an opinion acquisition request to the server, and receiving the relevant information and the review opinion returned by the server;

[0017] Obtain a modification result of the selected code based on the relevant information and the review opinion, and send the modification result to the server to instruct the server to send the modification result to the first terminal for display by the first terminal.

[0018] In one embodiment, the relevant information includes the project name and project address corresponding to the code to be reviewed, the file branch name, file path and location information of the code to be reviewed.

[0019] In one embodiment, before sending the opinion acquisition request to the server, the method further includes:

[0020] In the case of a logged-in user account, the server is connected based on the address of the server to enable the corresponding function of the review plug-in.

[0021] In a third aspect, the present application further provides a code review device, applied to a first terminal, comprising:

[0022] A display module, used for displaying the code to be reviewed, and in response to a selection operation on the code to be reviewed, obtaining relevant information of the selected code when a review plug-in is triggered, wherein the review plug-in is integrated in a development environment corresponding to the code to be reviewed;

[0023] A response module, for obtaining, in response to an editing operation for editing review comments, review comments for the selected code and information about a person who needs to modify the selected code;

[0024] a sending module, configured to send the relevant information, the review opinion and the personnel information to a server, so as to instruct the server to send a modification prompt to a second terminal corresponding to the personnel information, and, upon receiving an opinion acquisition request sent by the second terminal, send the relevant information and the review opinion to the second terminal;

[0025] The display module is further used to display the modification result after the second terminal submits the modification result.

[0026] In a fourth aspect, the present application further provides a code review device, applied to a second terminal, comprising:

[0027] A receiving module, configured to receive a modification prompt sent by the server, wherein the modification prompt is triggered after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in;

[0028] A sending module, used to send an opinion acquisition request to the server, and receive the relevant information and the review opinion returned by the server;

[0029] The acquisition module is used to obtain the modification result of the selected code based on the relevant information and the review opinion, and send the modification result to the server to instruct the server to send the modification result to the first terminal for display by the first terminal.

[0030] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps described in the first aspect or the second aspect when executing the computer program.

[0031] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps described in the first aspect or the second aspect.

[0032] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, which implements the steps described in the first aspect or the second aspect when executed by a processor.

[0033] The above-mentioned code review method, apparatus, computer equipment, computer-readable storage medium and computer program product first display the code to be reviewed, and in response to the selection operation of the code to be reviewed, obtain the relevant information of the selected code when the review plug-in is triggered, and the review plug-in is integrated in the development environment corresponding to the code to be reviewed; in response to the editing operation for editing the review opinion, obtain the review opinion for the selected code and the personnel information who need to modify the selected code; send the relevant information, review opinion and personnel information to the server to instruct the server to send a modification prompt to the second terminal corresponding to the personnel information, and send the relevant information and review opinion to the second terminal when receiving the opinion acquisition request sent by the second terminal; after the second terminal submits the modification result, display the modification result. A series of code interaction operations are performed through the review plug-in in the development environment, which speeds up the review and improves the efficiency of code review. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0035] FIG1 is an application environment diagram of a code review method in one embodiment;

[0036] FIG2 is a schematic diagram of a flow chart of a code review method application and a first terminal in one embodiment;

[0037] FIG3 is a schematic diagram of automatically filling in relevant information of a code to be reviewed in one embodiment;

[0038] FIG4 is a schematic diagram of a personal account login interface in one embodiment;

[0039] FIG5 is a schematic diagram of a flow chart of a code review method application and a second terminal in one embodiment;

[0040] FIG6 is a schematic diagram of downloading a code review plug-in in one embodiment;

[0041] FIG7 is a structural block diagram of a code review device applied to a first terminal in one embodiment;

[0042] FIG8 is a structural block diagram of a code review device applied to a second terminal in one embodiment;

[0043] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] The code review method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. Among them, the terminals 102 and 104 communicate with the server 106 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 106, or it can be placed on the cloud or other network servers. Among them, the first terminal 102 and the second terminal 104 can be, but are not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 106 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0046] In an exemplary embodiment, as shown in FIG2 , a code review method is provided, which is described by taking the method applied to the first terminal 102 in FIG1 as an example, and includes the following steps 202 to 208. Among them:

[0047] Step 202, displaying the code to be reviewed, in response to the selection operation on the code to be reviewed, in the case of triggering the review plug-in, obtaining the relevant information of the selected code, the review plug-in being integrated in the development environment corresponding to the code to be reviewed.

[0048] Among them, the review plug-in is an IDE plug-in. IDE is an environment for developing software, which provides tools and functions for writing, debugging and testing code. Plug-ins can extend the functions of IDE and provide additional features, such as syntax highlighting, auto-completion, code checking, version control integration, etc.

[0049] In some embodiments, the first terminal displays the code to be reviewed, and in response to the selection operation for the code to be reviewed, when the review plug-in is triggered in the development environment, the relevant information of the selected code is obtained. The code to be reviewed can be any code in any code project.

[0050] Step 204 , in response to an editing operation for editing the review opinion, obtaining the review opinion for the selected code and the information of the person who needs to modify the selected code.

[0051] In actual implementation, the code to be reviewed is edited to give review opinions, and after the review is completed, the person who needs to modify the code is selected. The first terminal responds to the editing operation of editing the review opinions and obtains the review opinions for the selected code and the information of the person who needs to modify the selected code. Among them, the person who needs to modify the selected code can be the author of the selected code, or other persons who can modify it, and this embodiment does not limit this.

[0052] Furthermore, the first terminal may also respond to the deletion action on the code to be reviewed and reselect a new code to be reviewed.

[0053] Step 206, sending the relevant information, review opinions and personnel information to the server to instruct the server to send a modification prompt to the second terminal corresponding to the personnel information, and sending the relevant information and review opinions to the second terminal when receiving the opinion acquisition request sent by the second terminal.

[0054] In some embodiments, after the reviewer completes the review of the code to be reviewed, the first terminal sends the relevant information of the code to be reviewed, the review opinions and the information of the personnel who need to modify the code to the server. After receiving the information sent by the first terminal, the server sends a modification prompt to the second terminal. When receiving the opinion acquisition request sent by the second terminal, the server sends the relevant information and review opinions to the second terminal.

[0055] The modification prompt may be sent in the form of a series of notification messages, such as emails and text messages, which are not limited in this embodiment.

[0056] Step 208: After the modification result is submitted at the second terminal, the modification result is displayed.

[0057] In some embodiments, after the modification personnel corresponding to the personnel information completes the code modification and submits it to the server, the modification prompt sent by the server is received, and the modification result is displayed on the first terminal.

[0058] In the above code review method, the code to be reviewed is displayed, and in response to the selection operation for the code to be reviewed, the relevant information of the selected code is obtained when the review plug-in is triggered, and the review plug-in is integrated in the development environment corresponding to the code to be reviewed; in response to the editing operation for editing the review opinion, the review opinion for the selected code and the personnel information that needs to modify the selected code are obtained; the relevant information, review opinion and personnel information are sent to the server to instruct the server to send a modification prompt to the second terminal corresponding to the personnel information, and in the case of receiving the opinion acquisition request sent by the second terminal, the relevant information and review opinion are sent to the second terminal; after the second terminal submits the modification result, the modification result is displayed. A series of code interaction operations are performed through the review plug-in in the development environment, which speeds up the review and improves the efficiency of code review.

[0059] In an exemplary embodiment, in response to a selection operation on the code to be reviewed, when a review plug-in is triggered, relevant information of the selected code is obtained, including: in response to a selection operation on the code to be reviewed, when the review plug-in is triggered, a review opinion window is displayed; in the information bar of the review opinion window, relevant information of the selected code is automatically filled in.

[0060] In actual implementation, the first terminal will respond to the selection operation for the review code, trigger the review plug-in in the integrated environment, display the review opinion window, and automatically fill in the relevant information of the selected code in the information column of the review opinion window. Among them, the selection operation for the review code can be selected by mouse or triggered by a shortcut key, which is not limited in the embodiment of the present application.

[0061] In the above embodiment, by automatically filling in the relevant information of the selected code, the subsequent operations of the reviewer are made easier, thereby improving the efficiency of code review.

[0062] In some exemplary embodiments, the relevant information includes the project name and project address corresponding to the code to be reviewed, the file branch name, file path and location information of the code to be reviewed.

[0063] In actual implementation, the relevant information of the code to be reviewed automatically filled in by the first terminal includes the project name corresponding to the code to be reviewed, the project address, the file branch name where the code to be reviewed is located, the file path and location information. The specific information is shown in Figure 3. The service name is the project name corresponding to the code to be reviewed, the warehouse address is the project address, the branch name is the file branch name where the code to be reviewed is located, and the code line number and code snippet constitute the location information.

[0064] Among them, the project name is the name of the project where the code to be reviewed is located; the project address is the remote server address where the code is stored; the file branch name where the code to be reviewed is located is the code branch corresponding to the corresponding number of modifications; the file path is the location of the code file in the computer file system; the location information is the starting position and line number of the code to be reviewed.

[0065] In the above embodiment, by automatically filling in the detailed information of the code to be reviewed, the person who modifies the code can more quickly find the location of the code to be reviewed, thereby speeding up the review process.

[0066] In some exemplary embodiments, before displaying the code to be reviewed, the process further includes: in the case where the user account has been logged in, connecting to the server based on the address of the server to enable the corresponding function of the review plug-in.

[0067] In actual implementation, before displaying the code to be reviewed, the first terminal needs to log in to a personal account, the login interface is shown in FIG4 , and based on the address of the server, connect to the server, and enable the corresponding function of the review plug-in in the integrated environment.

[0068] In the above embodiment, in actual application, a personal account is required to connect to the server, and the review plug-in is used to ensure the security of the code review process.

[0069] In an exemplary embodiment, as shown in FIG5 , a code review method is provided, which is described by taking the method applied to the second terminal 104 in FIG1 as an example, and includes the following steps 502 to 506. Among them:

[0070] Step 502, receiving a modification prompt sent by the server, wherein the modification prompt is triggered after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in.

[0071] The modification prompt may be sent in the form of a series of notification messages, such as emails and text messages, which are not limited in this embodiment.

[0072] In some embodiments, the second terminal receives a modification prompt triggered by the first terminal after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in.

[0073] Step 504, sending an opinion acquisition request to the server, and receiving relevant information and review opinions returned by the server.

[0074] Specifically, after receiving the modification prompt sent by the server, the second terminal sends an opinion acquisition request to the server, and receives relevant information and review opinions returned by the server.

[0075] Step 506, obtaining the modification result after modifying the selected code based on the relevant information and the review comments, and sending the modification result to the server to instruct the server to send the modification result to the first terminal, and the first terminal displays it.

[0076] In some embodiments, after the modification personnel corresponding to the personnel information that needs to modify the selected code completes the code modification, the second terminal obtains the modification result of the selected code based on the relevant information and review opinions, and sends the modification result to the server to instruct the server to send the modification result to the first terminal, and the first terminal displays it.

[0077] In an exemplary embodiment, the relevant information includes the project name and project address corresponding to the code to be reviewed, the file branch name, file path and location information of the code to be reviewed.

[0078] In some embodiments, the second terminal obtains relevant information about the code to be reviewed including the project name and project address corresponding to the code to be reviewed, the file branch name, file path and location information of the code to be reviewed.

[0079] In the above embodiment, by automatically acquiring comprehensive relevant information of the code to be reviewed, the manual processing process is reduced and the efficiency of code modification is improved.

[0080] In some exemplary embodiments, before sending an opinion acquisition request to the server, the process also includes: in the case of a logged-in user account, connecting to the server based on the server address to enable corresponding functions of the review plug-in.

[0081] In actual implementation, after receiving the modification prompt, the second terminal will log in to the personal account on the second terminal, and connect to the server through the personal account based on the server address to enable the corresponding function of the review plug-in, so as to make corresponding modifications to the code to be reviewed according to the review opinions.

[0082] In the above embodiment, the editor needs to connect to the server through a personal account, which ensures the security of the modification process and prevents the leakage of the code.

[0083] To explain the code review method in the present application in detail, an embodiment is used for explanation below. By way of example, the present application is explained with a code review method in a specific scenario.

[0084] First, download the code review plug-in on the first terminal. The specific download instructions are shown in Figure 6. Download the code review plug-in according to the specific operation instructions. After the download is complete, log in to your personal account. The first terminal displays the code to be reviewed. In response to the selection operation for the code to be reviewed, when the review plug-in is triggered in the development environment, relevant information of the selected code is obtained. The code to be reviewed can be any code in any code project.

[0085] The reviewer edits the code to be reviewed and gives review opinions. After the review is completed, the person who needs to modify the code is selected. The first terminal responds to the editing operation of editing the review opinions and obtains the review opinions for the selected code and the information of the person who needs to modify the selected code.

[0086] After the reviewer completes the review of the code to be reviewed, the first terminal sends the relevant information of the code to be reviewed, the review opinions and the information of the personnel who need to modify the code to the server. After receiving the information sent by the first terminal, the server sends a modification prompt to the second terminal. When receiving the opinion acquisition request sent by the second terminal, the server sends the relevant information and the review opinions to the second terminal.

[0087] Download the code review plug-in on the second terminal and log in to your personal account. The second terminal will receive the modification prompt triggered by the first terminal after obtaining the review opinions, relevant information, and personnel information of the selected code to be reviewed based on the review plug-in. After receiving the modification prompt sent by the server, the second terminal sends an opinion acquisition request to the server and receives the relevant information and review opinions returned by the server.

[0088] After the modifier corresponding to the personnel information that needs to modify the selected code completes the code modification, the second terminal obtains the modification result of the selected code based on the relevant information and review opinions, and sends the modification result to the server to instruct the server to send the modification result to the first terminal, and the first terminal displays it.

[0089] After the modification personnel corresponding to the personnel information completes the code modification and submits it to the server, the modification prompt sent by the server is received, and the modification result is displayed on the first terminal.

[0090] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0091] Based on the same inventive concept, the embodiment of the present application also provides a code review device for implementing the code review method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more code review device embodiments provided below can refer to the limitations of the code review method above, and will not be repeated here.

[0092] In an exemplary embodiment, as shown in FIG. 7 , a code review device is provided, which is applied to a first terminal and includes: a display module 701, a response module 702 and a sending module 703, wherein:

[0093] A display module, used for displaying the code to be reviewed, and in response to a selection operation on the code to be reviewed, obtaining relevant information of the selected code when a review plug-in is triggered, wherein the review plug-in is integrated in a development environment corresponding to the code to be reviewed;

[0094] A response module, for obtaining, in response to an editing operation for editing review comments, review comments for the selected code and information about a person who needs to modify the selected code;

[0095] a sending module, configured to send the relevant information, the review opinion and the personnel information to a server, so as to instruct the server to send a modification prompt to a second terminal corresponding to the personnel information, and, upon receiving an opinion acquisition request sent by the second terminal, send the relevant information and the review opinion to the second terminal;

[0096] The display module is further used to display the modification result after the second terminal submits the modification result.

[0097] In some embodiments, the response module is further configured to display a review opinion window in response to a selection operation on the code to be reviewed and when the review plug-in is triggered;

[0098] In the information column of the review window, relevant information of the selected code is automatically filled in.

[0099] In some embodiments, the above-mentioned device also includes an acquisition module for acquiring relevant information including the project name, project address, file branch name, file path and location information of the code to be reviewed corresponding to the code to be reviewed.

[0100] In some embodiments, the above-mentioned device also includes a connection module, which is used to connect to the server based on the address of the server when the user account is logged in, so as to enable the corresponding function of the review plug-in.

[0101] In an exemplary embodiment, as shown in FIG8 , a code review device is provided, which is applied to a second terminal and includes: a receiving module 801, a sending module 802 and an acquiring module 803, wherein:

[0102] A receiving module, configured to receive a modification prompt sent by the server, wherein the modification prompt is triggered after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in;

[0103] A sending module, used to send an opinion acquisition request to the server, and receive the relevant information and the review opinion returned by the server;

[0104] The acquisition module is used to obtain the modification result of the selected code based on the relevant information and the review opinion, and send the modification result to the server to instruct the server to send the modification result to the first terminal for display by the first terminal.

[0105] In some embodiments, the acquisition module is further used to acquire relevant information including the project name and project address corresponding to the code to be reviewed, the file branch name, file path and location information of the code to be reviewed.

[0106] In some embodiments, the above-mentioned device also includes a login module, which is used to connect to the server based on the address of the server when the user account is logged in, so as to enable the corresponding function of the review plug-in.

[0107] Each module in the above-mentioned code review device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0108] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store code data for review. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a code review method is implemented.

[0109] The display unit of the computer device is used to form a visually visible picture, and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball, or touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.

[0110] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0111] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0112] Display the code to be reviewed, and in response to a selection operation on the code to be reviewed, obtain relevant information of the selected code when a review plug-in is triggered, wherein the review plug-in is integrated in a development environment corresponding to the code to be reviewed;

[0113] In response to an editing operation for editing the review comments, obtaining the review comments for the selected code and the information of the person who needs to modify the selected code;

[0114] Sending the relevant information, the review opinion and the personnel information to the server to instruct the server to send a modification prompt to the second terminal corresponding to the personnel information, and sending the relevant information and the review opinion to the second terminal upon receiving the opinion acquisition request sent by the second terminal;

[0115] After the second terminal submits the modification result, the modification result is displayed.

[0116] In one embodiment, the processor further implements the following steps when executing the computer program:

[0117] Receiving a modification prompt sent by the server, wherein the modification prompt is triggered after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in;

[0118] Sending an opinion acquisition request to the server, and receiving the relevant information and the review opinion returned by the server;

[0119] Obtain a modification result of the selected code based on the relevant information and the review opinion, and send the modification result to the server to instruct the server to send the modification result to the first terminal for display by the first terminal.

[0120] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0121] Display the code to be reviewed, and in response to a selection operation on the code to be reviewed, obtain relevant information of the selected code when a review plug-in is triggered, wherein the review plug-in is integrated in a development environment corresponding to the code to be reviewed;

[0122] In response to an editing operation for editing the review comments, obtaining the review comments for the selected code and the information of the person who needs to modify the selected code;

[0123] Sending the relevant information, the review opinion and the personnel information to the server to instruct the server to send a modification prompt to the second terminal corresponding to the personnel information, and sending the relevant information and the review opinion to the second terminal upon receiving the opinion acquisition request sent by the second terminal;

[0124] After the second terminal submits the modification result, the modification result is displayed.

[0125] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0126] Receiving a modification prompt sent by the server, wherein the modification prompt is triggered after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in;

[0127] Sending an opinion acquisition request to the server, and receiving the relevant information and the review opinion returned by the server;

[0128] Obtain a modification result of the selected code based on the relevant information and the review opinion, and send the modification result to the server to instruct the server to send the modification result to the first terminal for display by the first terminal.

[0129] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0130] Display the code to be reviewed, and in response to a selection operation on the code to be reviewed, obtain relevant information of the selected code when a review plug-in is triggered, wherein the review plug-in is integrated in a development environment corresponding to the code to be reviewed;

[0131] In response to an editing operation for editing the review comments, obtaining the review comments for the selected code and the information of the person who needs to modify the selected code;

[0132] Sending the relevant information, the review opinion and the personnel information to the server to instruct the server to send a modification prompt to the second terminal corresponding to the personnel information, and sending the relevant information and the review opinion to the second terminal upon receiving the opinion acquisition request sent by the second terminal;

[0133] After the second terminal submits the modification result, the modification result is displayed.

[0134] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0135] Receiving a modification prompt sent by the server, wherein the modification prompt is triggered after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in;

[0136] Sending an opinion acquisition request to the server, and receiving the relevant information and the review opinion returned by the server;

[0137] Obtain a modification result of the selected code based on the relevant information and the review opinion, and send the modification result to the server to instruct the server to send the modification result to the first terminal for display by the first terminal.

[0138] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0139] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0141] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A code review method, characterized in that: Applied to a first terminal, the method includes: Display the code to be reviewed, and in response to a selection operation on the code to be reviewed, obtain relevant information of the selected code when a review plug-in is triggered, wherein the review plug-in is integrated in a development environment corresponding to the code to be reviewed; In response to an editing operation for editing the review comments, obtaining the review comments for the selected code and the information of the person who needs to modify the selected code; Sending the relevant information, the review opinion and the personnel information to the server to instruct the server to send a modification prompt to the second terminal corresponding to the personnel information, and sending the relevant information and the review opinion to the second terminal when receiving the opinion acquisition request sent by the second terminal; After the second terminal submits the modification result, the modification result is displayed.

2. The method according to claim 1, characterized in that In response to the selection operation on the code to be reviewed, when the review plug-in is triggered, obtaining relevant information of the selected code includes: In response to the selection operation on the code to be reviewed, when the review plug-in is triggered, a review opinion window is displayed; In the information column of the review opinion window, relevant information of the selected code is automatically filled in.

3. The method according to claim 1 or 2, characterized in that: The relevant information includes the project name and project address corresponding to the code to be reviewed, the file branch name, file path and location information of the code to be reviewed.

4. The method according to claim 1, characterized in that: Before displaying the code to be reviewed, the following is also included: In the case of a logged-in user account, the server is connected based on the address of the server to enable the corresponding function of the review plug-in.

5. A code review method, characterized in that: Applied to the second terminal, the method includes: Receiving a modification prompt sent by the server, wherein the modification prompt is triggered after the first terminal obtains the review opinions, related information, and information of personnel who need to modify the selected code to be reviewed based on the review plug-in; Sending an opinion acquisition request to the server, and receiving the relevant information and the review opinion returned by the server; Obtain a modification result of the selected code based on the relevant information and the review opinion, and send the modification result to the server to instruct the server to send the modification result to the first terminal for display by the first terminal.

6. The method according to claim 5, characterized in that The relevant information includes the project name and project address corresponding to the code to be reviewed, the file branch name, file path and location information of the code to be reviewed.

7. The method according to claim 5, characterized in that Before sending the opinion acquisition request to the server, the method further includes: In the case of a logged-in user account, the server is connected based on the address of the server to enable the corresponding function of the review plug-in.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.