Code submission quantity statistical platform construction method and related equipment

By using Node.js environment and data processing functions in software development projects, the data of the code hosting platform is automatically called and processed, and the problem of inefficiency of traditional methods is solved, and efficient code submission statistics and team management are achieved.

CN119149132APending Publication Date: 2024-12-17IOL WUHAN INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411275949.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In software development projects, team leaders need to monitor code submissions, but traditional methods are inefficient and prone to errors, and cannot effectively obtain code submissions.

Method used

Install the Node.js environment on the preset server, create a route and controller that implements interaction with the code hosting platform, and design data encapsulation and processing functions, generate API access tokens, and realize automatic call and processing of the code hosting platform data, including Filter, sort, aggregation and data format design, set logging and error tracking mechanisms.

Benefits of technology

It significantly improves the efficiency of obtaining code submission volume, reduces time overhead and human errors, provides real-time and accurate statistics on code submission volume, and enhances the transparency of team management and project management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149132A_ABST
    Figure CN119149132A_ABST
Patent Text Reader

Abstract

The invention provides a code submission quantity statistical platform construction method and related equipment.The code submission quantity statistical platform construction method comprises the steps that a Node.js environment is installed on a preset server, a target server is obtained, and a route and a controller for achieving interaction with a preset code hosting platform are created in the target server; designing a function of packaging data returned by the preset code hosting platform in the target server; and testing the target server in a development environment, and deploying the target server to an online environment after the test is passed to obtain a code submission quantity statistical platform. The code submission quantity statistical platform constructed by the method provided by the invention can automatically call the data in the preset code hosting platform and process the returned data, so that the time overhead and human errors are reduced, and the acquisition efficiency of the code submission quantity is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of development technology, and in particular to a method for constructing a code submission quantity statistics platform and related equipment. Background Art

[0002] In software development projects, team leaders often need to monitor code submissions from team members to assess workload and productivity. Traditional methods rely on manual reporting or directly using tools provided by version control systems, which are inefficient and may introduce errors. Summary of the invention

[0003] The present invention provides a code submission amount statistics platform construction method and related equipment, which are used to solve the defect of low efficiency in obtaining code submission status in the prior art and improve the efficiency of obtaining code submission amount.

[0004] The present invention provides a method for constructing a code submission amount statistics platform, comprising: Install the Node.js environment on the preset server, obtain the target server, and create routes and controllers in the target server to interact with the preset code hosting platform; Designing a function in the target server to encapsulate the data returned by the preset code hosting platform; The target server is tested in a development environment, and after the test passes, the target server is deployed to an online environment to obtain a code submission quantity statistics platform.

[0005] According to a method for constructing a code submission amount statistics platform provided by the present invention, before designing a function for encapsulating the data returned by the preset code hosting platform in the target server, the method further includes: An API access token is generated in the preset code hosting platform so that the code submission quantity statistics platform can access the preset code hosting platform.

[0006] According to a method for constructing a code submission quantity statistics platform provided by the present invention, the data returned by the preset code hosting platform includes code data obtained by querying the preset code hosting platform based on project parameters and / or time period parameters.

[0007] According to a method for constructing a code submission amount statistics platform provided by the present invention, before designing a function for encapsulating the data returned by the preset code hosting platform in the target server, the method further includes: A function for processing the data returned by the preset code hosting platform is designed in the target server.

[0008] According to a method for constructing a code submission volume statistics platform provided by the present invention, the data processing includes filtering, sorting, aggregating, and designing data formats; The filtering means filtering the code data corresponding to the project by namespace, and removing the merged submission records; The aggregation means counting the code submission amount based on the code submitters, and ranking the code submitters according to the code submission amount.

[0009] According to a method for constructing a code submission amount statistics platform provided by the present invention, after the test is passed, the target server is deployed to an online environment, and after the code submission amount statistics platform is obtained, the method further includes: A logging and error tracking mechanism is set up for the code submission statistics platform.

[0010] The present invention also provides a device for constructing a code submission amount statistics platform, comprising: An installation module is configured to install a Node.js environment on a preset server, obtain a target server, and create a route and a controller in the target server to implement interaction with a preset code hosting platform; A design module, configured to design a function in the target server to encapsulate the data returned by the preset code hosting platform; The deployment module is configured to test the target server in a development environment, and deploy the target server to an online environment after the test passes, to obtain a code submission quantity statistics platform.

[0011] The present invention further provides a code submission amount statistics platform, which is obtained based on the code submission amount statistics platform construction method described in any one of the above items, and includes: The code submission statistics module is used to receive user input and display the data fed back by the server module; The server module is used to receive data returned by the preset code hosting platform, process the data returned by the preset code hosting platform, and feed back the processing result to the code submission quantity statistics module.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for constructing a code submission quantity statistics platform as described in any one of the above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for constructing a code submission quantity statistics platform.

[0014] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for constructing a code submission quantity statistics platform.

[0015] The code submission amount statistics platform construction method and related equipment provided by the present invention install a Node.js environment in a preset server, create routes and controllers for implementing interactions, and preset the function of encapsulating data returned by a code hosting platform, so that the constructed code submission amount statistics platform can automatically call the data in the preset code hosting platform and process the returned data, thereby reducing time expenditure and human errors and significantly improving the efficiency of obtaining code submission amounts. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flow chart of the method for constructing a code submission quantity statistics platform provided by the present invention.

[0018] Figure 2 It is a structural schematic diagram of the code submission volume statistics platform provided by the present invention.

[0019] Figure 3 It is a structural schematic diagram of a device for constructing a code submission quantity statistics platform provided by the present invention.

[0020] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] Combine the following Figure 1-Figure 4 The code submission amount statistics platform construction method and related equipment of the present invention are described.

[0023] Figure 1 FIG. 1 is a flowchart of a method for constructing a code submission statistics platform according to an exemplary embodiment. Figure 1As shown, in an exemplary embodiment, the method for constructing a code submission quantity statistics platform includes steps 110 to 130, which are described in detail as follows.

[0024] Step 110, installing the Node.js environment on the preset server, obtaining the target server, and creating a route and a controller in the target server for interacting with the preset code hosting platform.

[0025] In an embodiment of the present invention, a Node.js environment is installed on a preset server, a new Node.js project is initialized using npm, and necessary modules such as axios are installed, which is used for HTTP requests. After the Node.js environment is installed on the preset server, a target server, i.e., a Node.js server, is obtained. Routes and controllers for interacting with the API of a preset code hosting platform are created in the target server. The preset code hosting platform includes GitLab, GitHub, or Bitbucket, etc.

[0026] Step 120: Design a function in the target server to encapsulate the data returned by the preset code hosting platform.

[0027] In an embodiment of the present invention, a function of re-encapsulating the data returned by the API of the preset code hosting platform is designed in the target server. When applying the code submission volume statistics platform, the user can input a request in the application code submission volume statistics platform, and the application code submission volume statistics platform extracts the required data from the preset code hosting platform according to the request, such as a collection of all projects, including information such as project name and project ID, and code submission record information of each project, including code submitter, submission time, amount of new code, amount of deleted code, etc.

[0028] Step 130, testing the target server in a development environment, and deploying the target server to an online environment after the test passes, to obtain a code submission quantity statistics platform.

[0029] In the embodiment of the present invention, unit testing and integration testing are performed on the target server in the development environment, and further, user interface and user experience testing is performed on the application code submission quantity statistics platform.

[0030] Deploy the target server to the online environment, obtain the code submission volume statistics platform, and publish the tested data display interface in the application code submission volume statistics platform.

[0031] Traditionally, team leaders need to manually extract code submission records directly from preset code hosting platforms such as GitLab, or rely on developers to report themselves. This approach is not only time-consuming but also may introduce errors. The code submission volume statistics platform constructed by the above process in the present invention automatically calls the data in the preset code hosting platform and processes the returned data, reducing time overhead and human errors, and significantly improving data acquisition efficiency. Although the preset code hosting platform provides a wealth of APIs, they are usually more complex and require certain technical knowledge to use correctly. For team leaders with non-technical backgrounds, it may constitute an obstacle. The present invention performs secondary packaging on the data returned by the API of the preset code hosting platform, which simplifies the API interaction between the preset code hosting platform and the code submission volume statistics platform.

[0032] The present invention is designed with compatibility and extensibility in mind, so that it is not limited to GitLab, but can also adapt to other version control and project management tools, such as GitHub or Bitbucket. By modifying or extending the API encapsulation logic on the server side, the platform can be easily applied to other similar tools.

[0033] In an exemplary embodiment of the present invention, before designing a function for encapsulating the data returned by the preset code hosting platform in the target server, the method further includes: An API access token is generated in the preset code hosting platform so that the code submission quantity statistics platform can access the preset code hosting platform.

[0034] In the embodiment of the present invention, a preset code hosting platform account is logged in, and an API access token (Private Token) is generated from the user settings of the preset code hosting platform, so that the code submission quantity statistics platform can access the preset code hosting platform.

[0035] In an exemplary embodiment of the present invention, the data returned by the preset code hosting platform includes code data obtained by querying the preset code hosting platform based on project parameters and / or time period parameters.

[0036] In an embodiment of the present invention, the data returned by the preset code hosting platform includes, but is not limited to, code data obtained by querying the preset code hosting platform based on project parameters and / or time period parameters. The project parameters and time parameters are obtained based on the request input by the user. If the user only inputs one of the project parameters and the time parameter, the other parameter is automatically completed. That is, if the project parameter is not entered, the project parameter is defined as all projects, that is, the submission records under all projects are queried. If the user does not enter the time parameter, the time parameter is defined as yesterday, that is, the submission record of the corresponding project yesterday is queried.

[0037] In an exemplary embodiment of the present invention, before designing a function for encapsulating the data returned by the preset code hosting platform in the target server, the method further includes: A function for processing the data returned by the preset code hosting platform is designed in the target server.

[0038] In the embodiment of the present invention, a function is written to process the data returned by the preset code hosting platform, including filtering, sorting, aggregation operations and designing data formats, so that the code submission volume statistics platform can easily parse and display it.

[0039] In an exemplary embodiment of the present invention, the data processing includes filtering, sorting, aggregating, and designing data formats; The filtering means filtering the code data corresponding to the project by namespace, and removing the merged submission records; The aggregation means counting the code submission amount based on the code submitters, and ranking the code submitters according to the code submission amount.

[0040] In the embodiment of the present invention, filtering is to filter the code data of the project corresponding to the non-project parameter through the namespace, and to remove the merged submission records. Namespace is a mechanism for distinguishing different identifiers such as variables, functions, and classes with the same name to avoid naming conflicts.

[0041] Aggregation is based on counting the code submission volume by the code submitter, sorting the code submitters according to the code submission volume, and generating a corresponding table so that the project leader can directly understand the code submission volume of each code submitter based on the table.

[0042] In an embodiment of the present invention, the visualization of the constructed code submission volume statistics platform is used to convert the data obtained from the preset code hosting platform into charts, dashboards and reports, so that the management can easily understand the various indicators and make more information-based management decisions accordingly.

[0043] In an exemplary embodiment of the present invention, after the test is passed, the target server is deployed to an online environment, and after the code submission amount statistics platform is obtained, the method further includes: A logging and error tracking mechanism is set up for the code submission statistics platform.

[0044] In the embodiment of the present invention, a log recording and error tracking mechanism is set to ensure stable operation of the system and timely respond to possible problems.

[0045] In an exemplary embodiment of the present invention, see Figure 2 , Figure 2 A code submission amount statistics platform is shown according to an exemplary embodiment. The code submission amount statistics platform is obtained based on any of the above code submission amount statistics platform construction methods, including: The code submission statistics module is used to receive user input and display the data fed back by the server module.

[0046] The server module is used to receive data returned by the preset code hosting platform, process the data returned by the preset code hosting platform, and feed back the processing result to the code submission quantity statistics module.

[0047] In the embodiment of the present invention, the code submission amount statistics module receives the user's input and displays the data fed back by the server module. The code submission amount statistics module builds an interactive and friendly page, on which the user can select time parameters and project parameters for query, and displays the code submission amount of each code submitter in the form of a table, and at the same time displays all the relevant information of the submitted code under the screening conditions, including name, amount of new code, amount of deleted code, total and major investment project information.

[0048] In the code submission statistics module, an animation loading screen is displayed when requesting data. The page supports single selection, multiple selection, and all selection items for querying. All selection is selected by default. The maximum time limit for the time information selected by the user on the page is today, and the maximum span is 1 month. To avoid excessive data volume causing the request to take too long, the time information on the page defaults to yesterday. A reset button is provided on the page to delete all selected filter conditions.

[0049] The server module receives the data returned by the preset code hosting platform, and processes the data returned by the preset code hosting platform, namely the aforementioned filtering, sorting, aggregation, designing data format, etc. The processing result is fed back to the code submission amount statistics module.

[0050] In an embodiment of the present invention, the code submission volume is monitored in real time through a code submission volume statistics platform, which not only provides instant feedback on workload saturation, but also enhances the transparency of team management. Project leaders can quickly identify which members may be facing overload, or which tasks require reallocation of resources, thereby promoting the efficiency of teamwork and project management. With real-time and accurate data, project leaders can better allocate resources and adjust workflows. For example, if it is found that a team member's code submission volume is abnormally low, it may mean that additional support or training is needed. On the contrary, if a member's submission volume is consistently higher than the average, then it may be necessary to re-evaluate their workload to prevent fatigue and overwork.

[0051] In one embodiment of the present invention, the code submission quantity statistics platform further includes a database module and / or an alarm module.

[0052] Database module, used to record operation logs; The alarm module is used to generate an alarm message when an error is received.

[0053] In the embodiment of the present invention, when requesting the server interface, the request parameters and results are recorded in the database module.

[0054] When the system sends an error, the error information is pushed to the alarm module through the communication robot, so that the corresponding operation information can be found from the operation log, the error can be reproduced, and the error can be solved in time.

[0055] The following is a description of the device for constructing a code submission volume statistics platform provided by the present invention. The device for constructing a code submission volume statistics platform described below and the method for constructing a code submission volume statistics platform described above can be referred to each other. It should be noted that the device provided in the following embodiment and the method provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, which will not be repeated here.

[0056] In an exemplary embodiment of the present invention, see Figure 3 , Figure 3 A device for constructing a code submission amount statistics platform according to an exemplary embodiment includes the following modules: An installation module 310 is configured to install a Node.js environment on a preset server, obtain a target server, and create a route and a controller in the target server to implement interaction with a preset code hosting platform; A design module 320, configured to design a function in the target server to encapsulate the data returned by the preset code hosting platform; The deployment module 330 is configured to test the target server in a development environment, and deploy the target server to an online environment after the test passes, to obtain a code submission quantity statistics platform.

[0057] In an exemplary embodiment of the present invention, the device for constructing a code submission quantity statistics platform further includes: The generation submodule is configured to generate an API access token in the preset code hosting platform so that the code submission quantity statistics platform can access the preset code hosting platform.

[0058] In an exemplary embodiment of the present invention, the data returned by the preset code hosting platform includes code data obtained by querying the preset code hosting platform based on project parameters and / or time period parameters.

[0059] In an exemplary embodiment of the present invention, the device for constructing a code submission quantity statistics platform further includes: The data processing submodule is configured to design a function in the target server to process the data returned by the preset code hosting platform.

[0060] In an exemplary embodiment of the present invention, the data processing includes filtering, sorting, aggregating, and designing data formats; The filtering means filtering the code data corresponding to the project by namespace, and removing the merged submission records; The aggregation means counting the code submission amount based on the code submitters, and ranking the code submitters according to the code submission amount.

[0061] In an exemplary embodiment of the present invention, the device for constructing a code submission quantity statistics platform further includes: A setting submodule is configured to set a logging and error tracking mechanism for the code submission volume statistics platform.

[0062] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communications interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a method for constructing a code submission quantity statistics platform, the method comprising: installing a Node.js environment on a preset server, obtaining a target server, and creating a route and a controller in the target server for interacting with a preset code hosting platform; Designing a function in the target server to encapsulate the data returned by the preset code hosting platform; The target server is tested in a development environment, and after the test passes, the target server is deployed to an online environment to obtain a code submission quantity statistics platform.

[0063] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0064] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the code submission volume statistics platform construction method provided by the above methods, the method comprising: installing a Node.js environment on a preset server, obtaining a target server, and creating a route and a controller in the target server for interacting with a preset code hosting platform; Designing a function in the target server to encapsulate the data returned by the preset code hosting platform; The target server is tested in a development environment, and after the test passes, the target server is deployed to an online environment to obtain a code submission quantity statistics platform.

[0065] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the code submission volume statistics platform construction method provided by the above methods, the method comprising: installing a Node.js environment on a preset server, obtaining a target server, and creating a route and a controller in the target server for interacting with a preset code hosting platform; Designing a function in the target server to encapsulate the data returned by the preset code hosting platform; The target server is tested in a development environment, and after the test passes, the target server is deployed to an online environment to obtain a code submission quantity statistics platform.

[0066] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for constructing a code submission statistics platform, characterized in that: include: Install the Node.js environment on the preset server, obtain the target server, and create routes and controllers in the target server to interact with the preset code hosting platform; Designing a function in the target server to encapsulate the data returned by the preset code hosting platform; The target server is tested in a development environment, and after the test passes, the target server is deployed to an online environment to obtain a code submission quantity statistics platform.

2. The method for constructing a code submission volume statistics platform according to claim 1, characterized in that: Before designing a function for encapsulating the data returned by the preset code hosting platform in the target server, the method further includes: An API access token is generated in the preset code hosting platform so that the code submission quantity statistics platform can access the preset code hosting platform.

3. The method for constructing a code submission volume statistics platform according to claim 1, characterized in that: The data returned by the preset code hosting platform includes code data obtained by querying the preset code hosting platform based on project parameters and / or time period parameters.

4. The method for constructing a code submission volume statistics platform according to claim 1, characterized in that: Before designing a function for encapsulating the data returned by the preset code hosting platform in the target server, the method further includes: A function for processing the data returned by the preset code hosting platform is designed in the target server.

5. The method for constructing a code submission volume statistics platform according to claim 4, characterized in that: The data processing includes filtering, sorting, aggregation, and designing data formats; The filtering means filtering the code data corresponding to the project by namespace, and removing the merged submission records; The aggregation means counting the code submission amount based on the code submitters, and ranking the code submitters according to the code submission amount.

6. The method for constructing a code submission volume statistics platform according to any one of claims 1 to 5, characterized in that: After the test is passed, the target server is deployed to the online environment, and after the code submission amount statistics platform is obtained, the method further includes: A logging and error tracking mechanism is set up for the code submission statistics platform.

7. A device for constructing a code submission statistics platform, characterized in that: include: An installation module is configured to install a Node.js environment on a preset server, obtain a target server, and create a route and a controller in the target server to implement interaction with a preset code hosting platform; A design module, configured to design a function in the target server to encapsulate the data returned by the preset code hosting platform; The deployment module is configured to test the target server in a development environment, and deploy the target server to an online environment after the test passes, to obtain a code submission quantity statistics platform.

8. A code submission statistics platform, characterized in that: The code submission amount statistics platform is obtained based on the code submission amount statistics platform construction method according to any one of claims 1 to 6, and includes: The code submission statistics module is used to receive user input and display the data fed back by the server module; The server module is used to receive data returned by the preset code hosting platform, process the data returned by the preset code hosting platform, and feed back the processing result to the code submission quantity statistics module.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for constructing a code submission volume statistics platform as described in any one of claims 1 to 6 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for constructing a code submission volume statistics platform as described in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Open source software project pull request prediction method based on deep learning model

    CN119902745A