Search

CN-122018976-A - Automatic statistical method, statistical system and equipment for code line differences

CN122018976ACN 122018976 ACN122018976 ACN 122018976ACN-122018976-A

Abstract

The invention provides an automatic counting method, a counting system and equipment for code line differences, which comprises the steps of structurally analyzing a multi-library engineering architecture, extracting current dictionary library data of each code warehouse, inputting multi-version engineering identification parameters of the code line differences to be counted according to target engineering configuration rules, obtaining corresponding dictionary library data to be counted, carrying out homologous matching comparison on a plurality of groups of dictionary library data to be counted, classifying according to version difference scenes, associatively calling corresponding code resources, calculating quantitative data of each unit identification code line according to preset rules and associatively storing the quantitative data, and integrally deploying the processes on an automatic execution platform to realize standardized presentation and interactive display of cross-version engineering line difference data.

Inventors

  • LI YUEHUA

Assignees

  • 宁波均联智行科技股份有限公司

Dates

Publication Date
20260512
Application Date
20260104

Claims (10)

  1. 1. An automatic statistical method for code line differences, which is used for counting code line differences among different versions of a multi-library project, comprises the following steps: s1, carrying out structural analysis on an architecture system of the multi-library engineering to refine current dictionary library data of current code warehouses; s2, inputting a plurality of identification parameters corresponding to a plurality of version projects of code line differences to be counted according to configuration rules of target projects, and acquiring a plurality of dictionary library data corresponding to the plurality of version projects by using the method in the step S1; S3, performing homologous matching comparison on the dictionary database data to be counted, and performing differential classification processing according to the differential scene among the version projects; S4, based on the plurality of dictionary database data to be counted, code resources corresponding to the plurality of version projects are called in an associated mode, code line quantized data corresponding to each unit identifier are calculated through a preset statistical rule, and code line data of different unit identifiers in the plurality of version projects are stored in an associated mode; S5, integrating and deploying the statistical processes in the steps S1-S4 on an automatic execution platform, and carrying out standardized presentation and interactive presentation on cross-version engineering line difference data corresponding to the identification parameters; wherein the plurality of version projects includes at least two version projects.
  2. 2. The automated statistical method according to claim 1, wherein the step S1 specifically comprises: And constructing an automatic statistics script according to a preset universal standardized interface, counting all code warehouses of the current version engineering, and storing the counted current dictionary database data by using a dictionary structure.
  3. 3. The automated statistical method of claim 1, wherein the dictionary library data comprises warehouse paths and hash values for the code warehouses.
  4. 4. The automated statistical method of claim 3, wherein the plurality of version projects comprises a first version project and a second version project, and wherein step S3 comprises: judging whether a first warehouse path corresponding to the first version engineering and a second warehouse path corresponding to the second version engineering exist in the dictionary database data at the same time; If the first warehouse path and the second warehouse path both exist, comparing the first hash value of the first version engineering with the second hash value of the second version engineering; And if the first hash value is consistent with the second hash value, not marking the first version engineering and the second version engineering.
  5. 5. The automated statistical method of claim 4, wherein, And if the first hash value is inconsistent with the second hash value, marking the first warehouse path and the second warehouse path as update warehouses.
  6. 6. The automated statistical method of claim 4, wherein, And if only the first warehouse path exists in the dictionary database data, marking the first warehouse path as an updated warehouse.
  7. 7. The automated statistical method of claim 4, wherein, And if only the second warehouse path exists in the dictionary database data, marking the second warehouse path as a newly added warehouse.
  8. 8. The automated statistical method according to any one of claims 4 to 7, wherein step S4 comprises in particular: Acquiring the first warehouse path corresponding to the first version engineering and the first hash value related to the first warehouse path, and taking the first hash value as an index to call a first version code corresponding to the first version engineering; Acquiring a second warehouse path corresponding to a second version project and the second hash value related to the second warehouse path, and calling a second version code corresponding to the second version project by taking the second hash value as an index; Based on the first warehouse path value and the first hash value, the second warehouse path value and the second hash value, the number of first code lines corresponding to the first warehouse path value and the number of second code lines corresponding to the second warehouse path value are counted; And establishing a warehouse path value mapping relation between the first version engineering and the second version engineering, and carrying out association storage on the code line numbers corresponding to the same warehouse path value in different version engineering.
  9. 9. An automatic statistics system for code line differences, characterized in that the automatic statistics system is used for the automatic statistics method according to any one of claims 1-8, the automatic statistics system comprising: The structure analysis module (100) is used for carrying out structural analysis on the architecture system of the multi-library engineering so as to refine the current dictionary library data of each current code warehouse; The data acquisition module (200) is used for inputting a plurality of identification parameters corresponding to a plurality of version projects of code line differences to be counted according to configuration rules of target projects, and acquiring a plurality of dictionary library data to be counted corresponding to the plurality of version projects by using the method in the step S1; the differentiation processing module (300) is used for performing homologous matching comparison on the dictionary library data to be counted, and performing differentiation classification processing according to a difference scene among the version projects; The quantization statistics module (400) is used for calling code resources corresponding to the plurality of version projects based on the plurality of dictionary library data association to be counted, calculating code row quantization data corresponding to each unit identifier through a preset statistics rule, and storing code row data of different unit identifiers in the plurality of version projects in an association mode; The automatic integration module (500) is used for integrating and deploying the statistical processes of the steps S1-S4 on an automatic execution platform, and carrying out standardized presentation and interactive display on cross-version engineering line difference data corresponding to the identification parameters.
  10. 10. An automatic statistics apparatus for code line differences, the automatic statistics apparatus comprising: The automatic statistical method comprises a processor, a storage medium and a communication interface, wherein the storage medium stores computer executable instructions, the communication interface is used for establishing data connection with a code storage unit and an automatic execution platform of multi-library engineering, and the automatic statistical method is realized according to any one of claims 1-8 when the processor executes the computer executable instructions in the storage medium.

Description

Automatic statistical method, statistical system and equipment for code line differences Technical Field The invention relates to the technical field of development and management of software codes, in particular to an automatic statistical method, an automatic statistical system and automatic statistical equipment for code line differences. Background Code line statistics is a technical means of software project management, and can evaluate project scale, quantify team workload, advance development progress and optimize resource investment. The accurate statistical result can help the manager to master the complexity of the module and the yield of the personnel, and provides a basis for plan adjustment, performance assessment and the like. The software architecture is evolved to modularization nowadays, multi-warehouse cooperation becomes a main stream of large projects, and each warehouse is explicitly and mutually dependent in labor division and supports engineering operation together. The existing code line statistics scheme is mainly designed for a single warehouse, has the functions of scanning, analyzing and counting the number of lines of code files under a specified path, does not conduct targeted development on the engineering attributes of multi-warehouse cooperation, and cannot adapt to the statistical requirements of multi-warehouse large projects. However, the related art has at least one problem that the existing code line statistics lacks a multi-warehouse identification mechanism, so that the code line statistics system cannot accurately divide the code boundaries of each warehouse, and thus the respective statistics of the code lines of each warehouse cannot be realized, and the pertinence and the usability of the code line data are affected. Disclosure of Invention The invention solves the technical problem that the existing code line statistics lacks a multi-warehouse identification mechanism, so that a code line statistics system cannot accurately divide the code boundaries of all warehouses, and therefore, the respective statistics of the code lines of all warehouses cannot be realized, and the pertinence and the usability of code line data are affected. In order to solve the above problems, in a first aspect, an embodiment of the present invention provides an automatic statistical method for code line differences, where the automatic statistical method is used to count code line differences between different versions of a multi-library project, and the automatic statistical method includes the following steps: S1, carrying out structural analysis on a multi-library engineering architecture system to refine current dictionary library data of current code warehouses; s2, inputting a plurality of identification parameters corresponding to a plurality of version projects of code line differences to be counted according to configuration rules of target projects, and acquiring a plurality of dictionary library data corresponding to the plurality of version projects by using the method in the step S1; S3, performing homologous matching comparison on the dictionary database data to be counted, and performing differential classification processing according to the differential scene among the version projects; S4, based on a plurality of dictionary database data to be counted, correspondingly retrieving code resources corresponding to a plurality of version projects, calculating code line quantized data corresponding to each unit identifier through a preset statistical rule, and correspondingly storing the code line data of different unit identifiers in the plurality of version projects; s5, integrating and deploying the statistical processes in the steps S1-S4 on an automatic execution platform, and carrying out standardized presentation and interactive display on cross-version engineering line difference data corresponding to a plurality of identification parameters; wherein the plurality of version projects includes at least two version projects. Compared with the prior art, the technical effect achieved by adopting the technical scheme is that the dictionary library data is extracted by carrying out structural analysis on the multi-library engineering framework, a multi-warehouse intelligent recognition mechanism is constructed, each warehouse code boundary is accurately divided, and the problems that the code line statistics system in the prior art cannot respectively count each warehouse code line, and the pertinence and the usability of the data are insufficient are solved. Furthermore, through identification parameter input, multi-version dictionary library homologous matching comparison and difference classification processing, code line data corresponding to each unit identification is calculated in a quantitative mode through combination with a preset statistical rule and stored in an associated mode, accuracy of cross-version code line difference statistics is improved, and statist