A data statistics method, device, apparatus and medium
By using automated statistical methods based on computer equipment and employing various statistical parameters to calculate the workload of software projects under a distributed active-active architecture, the problems of low efficiency and high cost in existing technologies are solved, and efficient and accurate software project workload statistics are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CCB FINTECH CO LTD
- Filing Date
- 2022-12-15
- Publication Date
- 2026-06-09
AI Technical Summary
In a distributed active-active architecture, the workload of statistical software development projects is inefficient and costly, and it is difficult to achieve accurate and efficient statistics through manual calculation.
By using automated statistical methods on computer equipment, statistical instructions are obtained to determine the first workload (development program), the second workload (functional testing), and the third workload (performance testing) of the software project. Various statistical parameters are used to calculate each workload, including the number of SQL statements, the number of DDL statements, and the number of stored procedure lines, to comprehensively determine the total workload of the software project.
It achieves automated statistics without human intervention, improving statistical efficiency and accuracy, reducing labor costs, and ensuring the objectivity and reliability of statistical results.
Smart Images

Figure CN115994703B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a data statistics method, apparatus, device, and medium. Background Technology
[0002] In banking operations, traditional centralized architectures lack flexible horizontal scalability and high concurrency handling capabilities, leading to the replacement of centralized architectures by distributed active-active architectures. Distributed active-active architectures involve numerous systems and have a wide scope, making it difficult to calculate the workload of software development projects. Currently, workload is primarily calculated manually, which is inefficient, difficult, and costly in terms of manpower. Summary of the Invention
[0003] This application provides a data statistics method, apparatus, device, and medium to solve the technical problems of low statistical efficiency and high cost in statistical software development projects in the prior art.
[0004] In a first aspect, a data statistics method is provided, which can be executed by a computer device. The method includes: acquiring a statistical instruction, the statistical instruction being used to instruct on the workload of a software project; in response to the statistical instruction, determining a first workload, a second workload, and a third workload from at least one logical subsystem used in developing the software project, the first workload being the workload generated by the program used to develop the software project, the second workload being the workload generated by testing the functionality of the software project, and the third workload being the workload generated by testing the performance of the software project; and determining the workload of the software project based on the first workload, the second workload, and the third workload.
[0005] In this solution, a computer device determines a first workload, a second workload, and a third workload from at least one logical subsystem used in developing the software project according to statistical instructions, and then determines the workload of the software project based on the first workload, the second workload, and the third workload. The first workload, the second workload, and the third workload reflect the workload generated in developing the software project from the perspectives of R&D, functional testing, and non-functional testing, ensuring the completeness and reliability of the statistical results. Furthermore, this method can be executed entirely by computer equipment without human intervention, saving human resource costs and improving the efficiency of statistically calculating the workload of the software development project.
[0006] Optionally, determining the first workload, second workload, and third workload from at least one logical subsystem used in developing the software project includes: determining one or more of the following statistical parameters from the at least one logical subsystem: the number of Structured Query Language (SQL) statements in the software project, the number of Data Definition Language (DDL) statements in the software project, the number of stored procedure rows and the number of stored procedures in the software project, whether the Java framework of the software project is deployed in the product service layer, whether the middleware of the software project is a specified middleware, whether the server of the software project is a specified server, and whether the software project uses Tuxedo, a Unix transaction system extended with distributed operations; and determining the first workload based on the one or more statistical parameters.
[0007] This method determines the workload (i.e., the first workload) generated by the program in developing the software project from one or more resource parameters involved in the software development process. Such first workload statistics have good objectivity and the solution has high reliability.
[0008] Optionally, determining the first workload based on one or more statistical parameters includes: determining a score based on each of the one or more statistical parameters to obtain one or more scores corresponding to the one or more statistical parameters; and accumulating the one or more scores to obtain the first workload.
[0009] In this method, the computer equipment determines a score based on each statistical parameter, and the first workload is determined by accumulating the scores of each statistical parameter. This allows the first workload to comprehensively reflect the impact of multiple statistical parameters on the first workload, further improving the reliability of the solution.
[0010] Optionally, the number of SQL statements and the first score corresponding to the number of SQL statements satisfy the following relationship: X1=S1×A1×a1+S1×A2×a2+S1×A3×a3, where X1 is the first score, S1 is the number of SQL statements, A1 is the proportion of simple SQL statements, A2 is the proportion of incompatible SQL statements, A3 is the proportion of complex SQL statements, a1 is the unit price corresponding to simple SQL statements, a2 is the unit price corresponding to incompatible SQL statements, and a3 is the unit price corresponding to complex SQL statements.
[0011] Optionally, the quantity of the DDLs and the second score corresponding to the quantity of the DDLs satisfy the following relationship: when S2≥B0, X2 = S2×B1 + B2; when S2 < B0, X2 = S2×B1 + B3; where X2 is the second score, S2 is the quantity of the DDLs, B0 is the threshold of the preset DDL, B1 is the unit price corresponding to the DDL, B2 is the workload corresponding to the database table data migration design when S2≥B0, and B3 is the workload corresponding to the database table data migration design when S2 < B0.
[0012] Optionally, the number of lines of the stored procedure and the number of stored procedures, and the third score corresponding to the number of lines of the stored procedure and the number of stored procedures satisfy the following relationship: when S3 / C1 - S4≥0, X3 = S3 / C1×C2; when S3 / C1 - S4 < 0, X3 = S4×C2; where X3 is the third score, S3 is the number of lines of the stored procedure, S4 is the number of stored procedures, C1 is the number of lines of the stored procedure included in a preset stored procedure, and C2 is the unit price corresponding to the one stored procedure.
[0013] Optionally, the fourth score corresponding to the java framework satisfies the following relationship: if the java framework is deployed in the product service layer, X4 = S4, where X4 is the fourth score and S4 is the unit price corresponding to the java framework deployed in the product service layer.
[0014] Optionally, the fifth score corresponding to the middleware satisfies the following relationship: if the middleware is the specified middleware, X5 = S5×D, where X5 is the fifth score, S5 is the number of deployment units corresponding to the specified middleware, D is the unit price corresponding to the deployment unit for the middleware upgrade, and the at least one logical subsystem includes the deployment unit corresponding to the specified middleware.
[0015] Optionally, the sixth score corresponding to the server satisfies the following relationship: if the server is a specified type of server, X6 = S6×E, where X6 is the sixth score, S6 is the number of deployment units corresponding to the specified server, and E is the unit price corresponding to the deployment unit of the specified server, and the at least one logical subsystem includes the deployment unit corresponding to the specified server.
[0016] Optionally, the seventh score corresponding to Tuxedo satisfies the following relationship: if the software project does not use Tuxedo, X7 = S7, where X7 is the seventh score and S7 is the unit price corresponding to the software project not using Tuxedo.
[0017] It can be understood that the relationships between the above statistical parameters and scores are only examples rather than limitations.
[0018] Optionally, determining the first workload, second workload, and third workload from at least one logical subsystem used in developing the software project includes: determining the number of times each test case in at least one test case is executed and the unit price corresponding to each test case from the at least one logical subsystem; the at least one test case is used to test the functionality of the software project; accumulating the number of times each test case in the at least one test case is executed to obtain the total number of times the at least one test case is executed; and obtaining the second workload by multiplying the unit price corresponding to each test case by the total number of times the at least one test case is executed.
[0019] In this method, the computer equipment determines the second workload by identifying the number of test cases in the functions of the software project and the unit price of each test case. The second workload reflects the workload generated by the functions of the software project, has good objectivity, improves the completeness and reliability of the solution, and is highly efficient in calculating the second workload.
[0020] Optionally, the at least one logical subsystem includes at least one level of logical subsystems; determining the first workload, the second workload, and the third workload from the at least one logical subsystem used to develop the software project includes: determining the third sub-workload of each level of logical subsystem based on the quantity of each level of logical subsystem in the at least one logical subsystem and the unit price corresponding to each level of logical subsystem; and accumulating the third sub-workload of each level of logical subsystem in the at least one logical subsystem to obtain the third workload.
[0021] In this method, the computer equipment determines the third workload by identifying the level of the logical subsystem, the quantity of logical subsystems at each level, and the unit price corresponding to each level of logical subsystem. The third workload can reflect the workload generated by the performance testing of the software project, has good objectivity, improves the completeness and reliability of the solution, and has high efficiency in calculating the third workload.
[0022] Optionally, obtaining the statistical instruction includes: obtaining one or more query information from the following: business group information, enterprise software project number, enterprise software project name, software project type, software project status information, software project requirement information, and logical subsystem information; and determining the statistical instruction based on the one or more query information.
[0023] This method allows for the acquisition of one or more query information based on actual needs (e.g., users want to obtain workload information in different dimensions). The computer equipment can then determine statistical instructions based on one or more query information, resulting in high flexibility and improved solution completeness.
[0024] Secondly, an embodiment of this application provides a data processing apparatus, which includes modules / units / technical means for performing the methods described in the first aspect or any optional implementation of the first aspect.
[0025] For example, the device may include:
[0026] The acquisition module is used to acquire statistical instructions, which are used to indicate the workload of the statistical software project.
[0027] A processing module is configured to, in response to the statistical instruction, determine a first workload, a second workload, and a third workload from at least one logical subsystem used in developing the software project, wherein the first workload is the workload generated by the program used to develop the software project, the second workload is the workload generated by testing the functionality of the software project, and the third workload is the workload generated by testing the performance of the software project; and determine the workload of the software project based on the first workload, the second workload, and the third workload.
[0028] Optionally, the processing module is configured to: determine one or more of the following statistical parameters from the at least one logical subsystem: the number of SQL statements in the software project, the number of data definition language (DDL) statements in the software project, the number of stored procedure rows and the number of stored procedures in the software project, whether the Java framework of the software project is deployed in the product service layer, whether the middleware of the software project is a specified middleware, whether the server of the software project is a specified server, and whether the software project uses a Unix transaction system extended for Distributed Operation (Tuxedo); and determine a first workload based on the one or more statistical parameters.
[0029] Optionally, the processing module is specifically used to: determine a score based on each of the one or more statistical parameters, and obtain one or more scores corresponding to the one or more statistical parameters; accumulate the one or more scores to obtain the first workload.
[0030] Optionally, the quantity of the SQL statements and the first score corresponding to the quantity of the SQL statements satisfy the following relationship: X1 = S1 × A1 × a1 + S1 × A2 × a2 + S1 × A3 × a3, where X1 is the first score, S1 is the quantity of the SQL statements, A1 is the proportion of simple SQL statements, A2 is the proportion of incompatible SQL statements, A3 is the proportion of complex SQL statements, a1 is the unit price corresponding to the simple SQL statements, a2 is the unit price corresponding to the incompatible SQL statements, and a3 is the unit price corresponding to the complex SQL statements.
[0031] Optionally, the quantity of the DDLs and the second score corresponding to the quantity of the DDLs satisfy the following relationship: when S2 ≥ B0, X2 = S2 × B1 + B2; when S2 < B0, X2 = S2 × B1 + B3; where X2 is the second score, S2 is the quantity of the DDLs, B0 is the preset threshold of the DDL, B1 is the unit price corresponding to the DDL, B2 is the workload corresponding to the database table data migration design when S2 ≥ B0, and B3 is the workload corresponding to the database table data migration design when S2 < B0.
[0032] Optionally, the number of lines of the stored procedure and the number of stored procedures and the third score corresponding to the number of lines of the stored procedure and the number of stored procedures satisfy the following relationship: when S3 / C1 - S4 ≥ 0, X3 = S3 / C1 × C2; when S3 / C1 - S4 < 0, X3 = S4 × C2; where X3 is the third score, S3 is the number of lines of the stored procedure, S4 is the number of stored procedures, C1 is the number of lines of the stored procedure included in a preset stored procedure, and C2 is the unit price corresponding to the one stored procedure.
[0033] Optionally, the fourth score corresponding to the java framework satisfies the following relationship: if the java framework is deployed in the product service layer, X4 = S4, where X4 is the fourth score and S4 is the unit price corresponding to the java framework deployed in the product service layer.
[0034] Optionally, the fifth score corresponding to the middleware satisfies the following relationship: if the middleware is the specified middleware, X5 = S5 × D, where X5 is the fifth score, S5 is the number of deployment units corresponding to the specified middleware, D is the unit price corresponding to the deployment unit for the middleware upgrade, and the at least one logical subsystem includes the deployment unit corresponding to the specified middleware.
[0035] Optionally, the sixth score corresponding to the server satisfies the following relationship: if the server is a server of a specified type, X6 = S6 × E, where X6 is the sixth score, S6 is the number of deployment units corresponding to the specified server, E is the unit price corresponding to the deployment unit corresponding to the specified server, and the at least one logical subsystem includes the deployment unit corresponding to the specified server.
[0036] Optionally, the seventh score corresponding to Tuxedo satisfies the following relationship: if the software project does not use Tuxedo, X7 = S7, where X7 is the seventh score and S7 is the unit price corresponding to the software project not using Tuxedo.
[0037] Optionally, the processing module is configured to: determine the number of times each test case in at least one test case is executed and the unit price corresponding to each test case from the at least one logical subsystem; the at least one test case is used to test the functionality of the software project; accumulate the number of times each test case in at least one test case is executed to obtain the total number of times the at least one test case is executed; and obtain the second workload based on the product of the unit price corresponding to each test case and the total number of times the at least one test case is executed.
[0038] Optionally, the at least one logical subsystem includes at least one level of logical subsystem; the processing module is configured to: determine the third sub-workload of each level of logical subsystem based on the quantity of each level of logical subsystem in the at least one logical subsystem and the unit price corresponding to each level of logical subsystem; and accumulate the third sub-workload of each level of logical subsystem in the at least one logical subsystem to obtain the third workload.
[0039] Optionally, the acquisition module is used to: acquire one or more query information from the following: business group information, enterprise software project number, enterprise software project name, software project type, software project status information, software project requirement information, and logical subsystem information; and determine the statistical instruction based on the one or more query information.
[0040] Thirdly, this application provides an electronic device, including: at least one processor; and a memory and a communication interface communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor, by executing the instructions stored in the memory, causes the electronic device to perform the method described in the first aspect or any optional embodiment of the first aspect through the communication interface.
[0041] Fourthly, a computer-readable storage medium is provided for storing instructions that, when executed, cause the method described in the first aspect or any alternative embodiment of the first aspect to be implemented.
[0042] Fifthly, the application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in the first aspect or any optional embodiment of the first aspect.
[0043] The technical effects or advantages of one or more technical solutions provided in the second, third, fourth and fifth aspects of this application can all be explained by the corresponding technical effects or advantages of one or more technical solutions provided in the first aspect, and will not be repeated here. Attached Figure Description
[0044] Figure 1 A scenario diagram provided for an embodiment of this application;
[0045] Figure 2 A flowchart illustrating a data statistics method provided in this application embodiment;
[0046] Figure 3 A schematic diagram illustrating a data statistical result provided in an embodiment of this application;
[0047] Figure 4 A schematic diagram illustrating another data statistical result provided in an embodiment of this application;
[0048] Figure 5 A schematic diagram illustrating another data statistical result provided in an embodiment of this application;
[0049] Figure 6 A structural diagram of a data statistics device provided in an embodiment of this application;
[0050] Figure 7 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0052] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.
[0053] The term "and / or" in the embodiments of this application is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0054] The data collection, dissemination, and use in this application all comply with relevant national laws and regulations.
[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0056] See Figure 1 This is a schematic diagram of a scenario provided for an embodiment of this application. Figure 1There are m logical subsystems. In a distributed multi-active architecture, developing a software project requires completing multiple tasks through these logical subsystems. For example, in a distributed multi-active architecture, developing a software project involves developing the software program, testing its functionality, and testing its performance, involving m logical subsystems. Specifically, since developing a software project is sequential, developing the software program, testing its functionality, and testing its performance all require the use of m logical subsystems.
[0057] Reference Figure 2 The flowchart below illustrates a data statistics method provided in this application embodiment.
[0058] This method can be executed by computer devices, such as laptops, desktop computers, and servers, and can also be applied to various devices with computing capabilities, such as mobile phones and other devices with computing capabilities. The above devices are only examples and are not intended to limit the scope of this application.
[0059] The following example illustrates how this method is executed by a computer device. The method includes:
[0060] S201: Get statistics command.
[0061] Statistical instructions are used to direct the workload of computer equipment statistical software projects.
[0062] Optionally, the computer equipment may obtain one or more of the following query information: business group information, enterprise software project number, enterprise software project name, software project type, software project status information, software project requirement information, and logical subsystem information; and determine statistical instructions based on one or more query information.
[0063] Understandably, in practical applications, there may be other information that can be queried, and this application does not impose any restrictions.
[0064] In one possible way, see Figure 3 , Figure 4 , Figure 5 Users can input one or more queries into a computer device based on their statistical needs (e.g., the user wants to obtain the workload of the software project, the workload of the requirement items, or the workload of the logical subsystems). The computer device receives these queries, determines the corresponding statistical instructions, and thus determines the workload for the software project, requirement items, and logical subsystems dimensions (the software project workload is...). Figure 3 , Figure 4 , Figure 5 (The verified cumulative workload).
[0065] For example, to obtain the workload for a requirement item dimension, a user inputs the enterprise software project number, enterprise software project name, software project type, software project status information, and software project requirement item information. Based on this information, the computer device generates statistical instructions that can determine the workload for the requirement item dimension. It is understood that the above is merely an example and not a limitation; the computer device can also obtain statistical instructions in other ways. For instance, technicians can pre-configure statistical instructions locally, and the computer device can obtain these instructions from the local configuration information.
[0066] This method allows users to input one or more query information based on their actual needs (e.g., the user wants to obtain workload in different dimensions), and the computer device can determine statistical instructions based on one or more query information, offering high flexibility. S202: In response to the statistical instructions, determine the first workload, the second workload, and the third workload from at least one logical subsystem used in the software development project.
[0067] Specifically, developing software projects using a distributed multi-active architecture mainly involves three aspects: developing the software program, testing the software functionality, and testing the software performance. Correspondingly, the first workload is the workload generated by developing the software program, the second workload is the workload generated by testing the software functionality, and the third workload is the workload generated by testing the software performance.
[0068] In a specific example, the workload of writing the software project code to generate the software project program belongs to the first workload; the workload of using test cases to test the functionality of the software project to ensure that the functionality of the software project meets the requirements specification belongs to the second workload; and the workload of testing the reliability and resource usage of the software project and producing test reports belongs to the third workload. It should be understood that the above is only an example and not a limitation; the types of workload involved in actual software development projects can be classified in other ways.
[0069] The following examples illustrate the first, second, and third workloads mentioned above.
[0070] First, we will introduce the method for determining the first workload using computer equipment.
[0071] Computer equipment can determine one or more of the following statistical parameters from at least one logical subsystem:
[0072] (1) The number of SQL statements in the software project;
[0073] (2) The number of Data Definition Language (DDL) entries in the software project;
[0074] (3) The number of lines and the number of stored procedures in the software project;
[0075] (4) Whether the Java framework of the software project is deployed in the product service layer;
[0076] (5) Whether the middleware of the software project is the designated middleware;
[0077] (6) Whether the software project's server is the designated server;
[0078] (7) Does the software project use Tuxedo?
[0079] Then, the computer equipment can determine the first workload based on one or more of the above statistical parameters.
[0080] As an example, a computer device can determine a score based on each of one or more statistical parameters to obtain one or more scores corresponding to one or more statistical parameters; and determine a first workload based on one or more scores.
[0081] The following example illustrates how computer equipment calculates the score corresponding to each statistical parameter.
[0082] 1. The computer device calculates the first score X1 corresponding to the number of SQL statements.
[0083] First, the computer device determines from at least one logical subsystem the total number of SQL statements S1, the proportion of each type of SQL statement to the total number of SQL statements, and the unit price (i.e., the workload corresponding to one SQL statement) for each type of SQL statement.
[0084] For example, SQL statements can be categorized into three types: simple SQL statements, incompatible SQL statements, and complex SQL statements. Simple SQL statements have a simple syntax and a corresponding SQL solution for the target database. Basic transformation of simple SQL statements can be completed through simple mapping and replacement, requiring no special processing at the application layer. Incompatible SQL statements use the original database's unique SQL dialect and cannot be transformed simply through mapping and replacement (e.g., special keywords and functions). They can only be transformed through "refactoring the SQL statement" or simply "refactoring the SQL statement + application logic." Complex SQL statements have a complex syntax or use a large number of dialects, making transformation impossible through simple mapping relationships, or resulting in low overall efficiency after transformation (e.g., multiple table joins or complex conditions). They can only be transformed through "refactoring the SQL statement + application logic."
[0085] It is understood that the above is merely an example and not a limitation.
[0086] In one possible implementation, the computer device can evaluate each SQL statement individually, classify them, and obtain the proportion of each type of SQL statement to the total number of SQL statements. For example, the computer device can evaluate the difficulty of each SQL statement, classifying them into simple SQL statements, incompatible SQL statements, and complex SQL statements, and obtain the proportion of each type of SQL statement to the total number of SQL statements.
[0087] In another possible implementation, the computer device can obtain the proportion of various types of SQL statements relative to the total number of SQL statements from local configuration information. For example, technicians can pre-configure the proportion of simple SQL statements, incompatible SQL statements, and complex SQL statements relative to the total number of SQL statements locally.
[0088] Then, the computer equipment determines the first score X1 based on the number of SQL statements, the proportion of each type of SQL statement to the total number of SQL statements, and the unit price corresponding to each type of SQL statement.
[0089] Optionally, the first score X1 = S1×A1×a1 + S1×A2×a2 + S1×A3×a3, where S1 is the number of SQL statements, A1 is the proportion of simple SQL statements, A2 is the proportion of incompatible SQL statements, A3 is the proportion of complex SQL statements, a1 is the unit price corresponding to simple SQL statements, a2 is the unit price corresponding to incompatible SQL statements, and a3 is the unit price corresponding to complex SQL statements (i.e., the workload of 1 simple SQL statement is a1 person-months, the workload of 1 incompatible SQL statement is a2 person-months, and the workload of 1 complex SQL statement is a3 person-months).
[0090] In a specific example, the number of SQL statements S1 is 1000, the proportion of simple SQL statements A1 is 0.7, the proportion of incompatible SQL statements A2 is 0.2, the proportion of complex SQL statements A3 is 0.1, the unit price of simple SQL statements a1 is 0.002 person-months, the unit price of incompatible SQL statements a2 is 0.005 person-months, and the unit price of complex SQL statements a3 is 0.03 person-months. Then the first score X1 = 1000 × 0.7 × 0.002 + 1000 × 0.2 × 0.005 + 1000 × 0.1 × 0.03 = 5.4 person-months.
[0091] It is understood that the above is merely an example and not a limitation.
[0092] 2. The second score x2 corresponding to the number of DDLs calculated by the computer equipment.
[0093] The DDL migration of the database table structure includes the DDL transformation development of the database table structure and the design of the database table data migration. Since both the DDL transformation development of the database table structure and the design of the database table data migration are related to DDL, the second score X2 reflects the workload corresponding to the DDL transformation development of the database table structure and the workload corresponding to the design of the database table data migration at the same time.
[0094] Optionally, when S2 ≥ B0, X2 = S2 × B1 + B2; when S2 < B0, X2 = S2 × B1 + B3; where S2 is the number of DDLs, B0 is the preset DDL threshold, B1 is the unit price corresponding to the DDL (that is, the workload equivalent to 1 DDL is B1 person - months), S2 × B1 reflects the workload corresponding to the DDL transformation development of the database table structure, B2 is the workload corresponding to the design of the database table data migration when S2 ≥ B0, and B3 is the workload corresponding to the design of the database table data migration when S2 < B0.
[0095] In a specific example, it is stipulated that the preset DDL threshold B0 is 300. When the number of DDLs S2 is 1000, the workload B2 corresponding to the design of the database table data migration is 3 person - months, the unit price B1 corresponding to the DDL is 0.002 person - months, and the second score X2 = 1000 × 0.002 + 3 = 5 person - months; when the number of DDLs S2 is 200, the workload B2 corresponding to the design of the database table data migration is 2 person - months, the unit price B1 corresponding to the DDL is 0.002 person - months, and the second score X2 = 200 × 0.002 + 2 = 2.4 person - months.
[0096] It can be understood that the above is only an example and not a limitation.
[0097] 3. Calculate the third score X3 corresponding to the number of stored - procedure lines and the number of stored procedures by the computer device.
[0098] The transformation of the stored procedure is regarded as developing a new online service, and the pre - transformation requirement analysis and detailed design of the stored procedure are simplified by the number of stored - procedure lines and the number of stored procedures. The third score X3 reflects the workload of the stored - procedure transformation through the number of stored - procedure lines and the number of stored procedures. The number of stored - procedure lines is the number of lines used to write the code of the software project of the stored procedure, and multiple stored - procedure lines form a stored procedure.
[0099] Optionally, when S3 / C1 - S4 ≥ 0, X3 = S3 / C1 × C2; when S3 / C1 - S4 < 0, X3 = S4 × C2; where S3 is the number of stored - procedure lines, S4 is the number of stored procedures, C1 is the number of stored - procedure lines included in a preset stored procedure, and C2 is the unit price corresponding to a stored procedure (that is, the workload equivalent to a stored procedure).
[0100] In a specific example, a stored procedure is assumed to have 300 lines (C1), and the unit price (C2) for a stored procedure is 0.152 person-months. The actual number of stored procedure lines (S3) is 1200 lines. When the actual number of stored procedures (S4) is 5, S3 / C1-S4<0, and the third score X3=5×0.152=0.76 person-months; when the actual number of stored procedures (S4) is 3, S3 / C1-S4≥0, and the third score X3=3×0.152=0.564 person-months.
[0101] It is understood that the above is merely an example and not a limitation.
[0102] 4. The computer equipment calculates the fourth score corresponding to the Java framework, x4.
[0103] Optionally, if the Java framework is originally deployed in the product service layer, the fourth score X4 = S4, where S4 is the unit price corresponding to the deployment of the Java framework in the product service layer (i.e., the workload of deploying the Java framework in the product service layer).
[0104] In a specific example, if the Java framework is deployed in the product service layer P8 of the application architecture, and the unit price S4 corresponding to the deployment of the Java framework in the product service layer is 2 person-months, then the fourth score X4 = 2 person-months; otherwise, the fourth score X4 = 0.
[0105] It is understood that the above is merely an example and not a limitation.
[0106] 5. The fifth score corresponding to the computer equipment's computing middleware is X5.
[0107] Optionally, if the middleware is a specified middleware, the fifth score X5 = S5 × D, where S5 is the number of deployment units corresponding to the specified middleware, and D is the unit price of the deployment unit corresponding to the middleware (i.e., the workload equivalent to 1 deployment unit in the deployment unit corresponding to the middleware).
[0108] In a specific example, if a software project is upgraded based on the existing software, and the middleware is upgraded from the original middleware (WebLogic) to a specified middleware (Tomcat), the number of deployment units S5 corresponding to the middleware upgrade to Tomcat is 100, and the unit price D corresponding to the deployment unit of the middleware upgrade to Tomcat is 5 person-months, then the fifth score X5 = 100 × 5 = 500 person-months; otherwise, the fifth score X5 = 0.
[0109] It is understood that the above is merely an example and not a limitation.
[0110] 6. The sixth score corresponding to the computer equipment computing server is X6.
[0111] Optionally, if the server is a specified server, the sixth score X6 = S6 × E, where S6 is the number of deployment units corresponding to the specified server, and E is the unit price corresponding to the deployment unit of the specified server (i.e., the workload equivalent to 1 deployment unit in the deployment unit corresponding to the server).
[0112] In a specific example, if the server uses a domestic server, the number of deployment units S6 corresponding to the domestic server is 100, and the unit price of the deployment unit corresponding to the domestic server is 3 person-months, then the sixth score X6 = 100 × 3 = 300 person-months; otherwise, the sixth score X6 = 0.
[0113] It is understood that the above is merely an example and not a limitation.
[0114] 7. The computer device calculates the seventh score (X7) corresponding to Tuxedo.
[0115] Optionally, if the software project does not use Tuxedo, the seventh score X7 = S7, where S7 is the unit price corresponding to the software project not using Tuxedo (i.e., the workload equivalent to the software project not using Tuxedo).
[0116] In a specific example, if the software project does not use Tuxedo, the unit price S7 corresponding to the software project not using Tuxedo is 2 person-months, then the seventh score X7 = 2 person-months; otherwise, the seventh score X7 = 0.
[0117] It is understood that the above is merely an example and not a limitation.
[0118] After obtaining one or more scores, the computer device accumulates the scores to obtain the first workload. For example, after obtaining the first score X1 to the seventh score X7, the computer device determines that the first workload is the sum of the first scores X1 to the seventh scores X7.
[0119] In this method, computer equipment determines the first workload generated by the program of the R&D software project by identifying one or more resource parameters involved in the program (such as the number of SQL statements, the number of DDL statements, etc.) and the method for calculating the workload of each resource parameter (i.e. the calculation method of the first score X1 to the seventh score X7). Such first workload statistics have good objectivity and high reliability.
[0120] The above describes the method for determining the first workload of computer equipment. The following describes the method for determining the second workload of computer equipment.
[0121] The computer device determines, from at least one logical subsystem, the number of times each test case in at least one test case is executed, and the unit price corresponding to each test case (i.e., the workload of the computer device executing each test case); the at least one test case is used to test the functionality of the software project; the number of times each test case is executed is accumulated to obtain the total number of times the at least one test case is executed; and the second workload is obtained by multiplying the unit price corresponding to each test case by the total number of times the at least one test case is executed.
[0122] In a specific example, the computer device determines 3 test cases from at least one logical subsystem. Each test case is executed 3 times, and the unit price corresponding to each test case is the same, which is 0.002 person-months. The total number of times the 3 test cases are executed is 9. The second workload = 9 × 0.002 = 0.018 person-months.
[0123] It is understandable that the unit price for each test case can be specified according to actual needs, and this application does not impose any restrictions.
[0124] In this method, the computer equipment determines the second workload by identifying the number of test cases in the functions of the software project and the unit price of each test case. The second workload reflects the workload generated by the functions of the software project, has good objectivity, improves the reliability of the solution, and is highly efficient in calculating the second workload.
[0125] The above describes the method for determining the second workload of computer equipment. The following describes the method for determining the third workload of computer equipment.
[0126] At least one logical subsystem includes at least one level of logical subsystem. The computer device determines the third subworkload of each level of logical subsystem based on the number of logical subsystems of each level in the at least one logical subsystem and the unit price corresponding to each level of logical subsystem (i.e., the workload equivalent to using one logical subsystem). The third subworkload of each level of logical subsystem in the at least one logical subsystem is accumulated to obtain the third workload.
[0127] In a specific example, the logic subsystems are categorized into three levels: Important, General, and Unimportant. There are 100 Important subsystems, with a unit price of 2 person-months, resulting in a workload of 100 × 2 = 200 person-months. There are 200 General subsystems, with a unit price of 1.5 person-months, resulting in a workload of 200 × 1.5 = 300 person-months. There are 50 Unimportant subsystems, with a unit price of 0.8 person-months, resulting in a workload of 50 × 0.8 = 40 person-months. The total workload for all three levels is 200 + 300 + 40 = 540 person-months.
[0128] In this method, the computer equipment determines the third workload by identifying the level of the logical subsystem, the quantity of logical subsystems at each level, and the unit price corresponding to each level of logical subsystem. The third workload can reflect the workload generated by the performance testing of the software project, has good objectivity, improves the reliability of the solution, and is highly efficient in calculating the third workload.
[0129] Understandably, the computer equipment can also receive manually submitted workloads related to the program of the R&D software project and add them to the first workload; it can also receive manually submitted workloads related to the function of the test software project and add them to the second workload; and it can also receive manually submitted workloads related to the performance of the test software project and add them to the third workload.
[0130] S203: Determine the workload of the software project based on the first workload, the second workload, and the third workload.
[0131] In one possible implementation, the method for calculating the workload of the software project varies depending on the different implementation strategies under the distributed active-active transformation.
[0132] In a specific example, under the iterative replacement mode (i.e., the current software project is an optimization of the previous software project), the workload of the software project = (first workload + second workload + third workload) × 1.2; under the refactoring mode (i.e., the current software project is a complete replacement of the previous software project), the workload of the software project = (first workload + second workload + third workload) × 1.5; under the business migration mode (i.e., the current software project is a migration of the previous software project to a new environment), the workload of the software project = (first workload + second workload + third workload) × 1.
[0133] It is understandable that coefficients corresponding to different modes can be specified according to actual needs, and this application does not impose any restrictions.
[0134] In another possible implementation, the first workload, the second workload, and the third workload have different weighting coefficients, and the workload of the software project is determined according to the weights of the first workload, the second workload, and the third workload.
[0135] In a specific example, the weighting coefficients for the first workload, the second workload, and the third workload are 0.4, 0.3, and 0.3, respectively. The workload of the software project = first workload × 0.4 + second workload × 0.3 + third workload × 0.3.
[0136] It is understandable that the weighting coefficients for the first, second, and third workloads can be specified according to actual needs, and this application does not impose any restrictions.
[0137] This solution uses computer equipment to determine the first workload, second workload, and third workload from at least one logical subsystem. It reflects the workload generated by the software development project from the perspectives of R&D, functional testing, and non-functional testing, ensuring the integrity and reliability of the solution. The method can be implemented without human intervention, saving human resource costs and improving the efficiency of calculating the workload of the software development project.
[0138] See Figure 6 This application provides a data statistics device 600, which includes modules / units / technical means for performing the methods executed by computer devices in the above-described method embodiments.
[0139] For example, the device 600 includes:
[0140] The acquisition module 601 is used to acquire statistical instructions, which are used to indicate the workload of the statistical software project.
[0141] Processing module 602 is configured to, in response to the statistical instruction, determine a first workload, a second workload, and a third workload from at least one logical subsystem used in developing the software project, wherein the first workload is the workload generated by the program used to develop the software project, the second workload is the workload generated by testing the functionality of the software project, and the third workload is the workload generated by testing the performance of the software project; and determine the workload of the software project based on the first workload, the second workload, and the third workload.
[0142] It should be understood that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0143] As one possible product form of the aforementioned device, see [link to product description]. Figure 7 This application also provides an electronic device 700, comprising:
[0144] At least one processor 701; and a communication interface 703 communicatively connected to the at least one processor 701; the at least one processor 701 causes the electronic device 700 to perform the method steps performed by any device in the above method embodiments through the communication interface 703 by executing instructions stored in the memory 702.
[0145] Optionally, the memory 702 is located outside the electronic device 700.
[0146] Optionally, the electronic device 700 includes the memory 702, which is connected to the at least one processor 701, and stores instructions executable by the at least one processor 701. (Appendix) Figure 7 The dashed line indicates that memory 702 is optional for electronic device 700.
[0147] The processor 701 and the memory 702 can be coupled through an interface circuit or integrated together; no restriction is imposed here.
[0148] This application embodiment does not limit the specific connection medium between the processor 701, memory 702, and communication interface 703. This application embodiment... Figure 7 The processor 701, memory 702, and communication interface 703 are connected via a bus 704. Figure 7 The connections between other components are shown in bold and are for illustrative purposes only, not as limiting information. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0149] It should be understood that the processor mentioned in the embodiments of this application can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0150] For example, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0151] It should be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAM (DR RAM).
[0152] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.
[0153] It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
[0154] As another possible product form, this application embodiment also provides a computer-readable storage medium for storing instructions that, when executed, cause a computer to perform the method steps performed by the first device in the above method example.
[0155] As another possible product form, this application embodiment also provides a computer program product containing instructions, wherein the computer program product stores instructions that, when run on a computer, cause the computer to execute the method steps performed by the first device in the above method embodiment.
[0156] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0158] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0159] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes. Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, this application also intends to include such modifications and variations if they fall within the scope of the claims of this application and their equivalents.
Claims
1. A data statistics method, characterized in that, include: Obtain statistical instructions, which are used to indicate the workload of the statistical software project; In response to the statistical instruction, a first workload, a second workload, and a third workload are determined from at least one logical subsystem used in developing the software project, wherein the first workload is the workload generated by the program used to develop the software project, the second workload is the workload generated by testing the functionality of the software project, and the third workload is the workload generated by testing the performance of the software project. The workload of the software project is determined based on the first workload, the second workload, and the third workload. Among them, the first workload is determined as follows: determining statistical parameters from the at least one logical subsystem; determining a score according to each statistical parameter, and accumulating the obtained multiple scores to obtain the first workload; wherein, the statistical parameters include: the number of Structured Query Language (SQL) statements of the software project and the number of Data Definition Language (DDL) of the software project; the number of SQL statements and the first score corresponding to the number of SQL statements satisfy the following relationship: , where is the first score, S1 is the number of SQL statements, A1 is the proportion of simple SQL statements, A2 is the proportion of incompatible SQL statements, A3 is the proportion of complex SQL statements, a1 is the unit price corresponding to simple SQL statements, a2 is the unit price corresponding to incompatible SQL statements, and a3 is the unit price corresponding to complex SQL statements; and, the number of DDLs and the second score corresponding to the number of DDLs satisfy the following relationship: when S2≥B0, ; when S2<B0, ; where is the second score, S2 is the number of DDLs, B0 is the threshold of the preset DDL, B1 is the unit price corresponding to DDL, B2 is the workload corresponding to the database table data migration design when S2≥B0, and B3 is the workload corresponding to the database table data migration design when S2<B0; The second workload is determined as follows: The number of times each test case in at least one test case is executed and the unit price corresponding to each test case are determined from the at least one logical subsystem; the at least one test case is used to test the functionality of the software project; the number of times each test case in at least one test case is executed is accumulated to obtain the total number of times the at least one test case is executed; the second workload is obtained by multiplying the unit price corresponding to each test case by the total number of times the at least one test case is executed. The third workload is determined as follows: based on the quantity of each level of logical subsystem in the at least one logical subsystem and the unit price corresponding to each level of logical subsystem, the third sub-workload of each level of logical subsystem is determined; the third sub-workload of each level of logical subsystem in the at least one logical subsystem is accumulated to obtain the third workload.
2. The method as described in claim 1, characterized in that, The statistical parameters also include one or more of the following: The number of stored procedure rows and the number of stored procedures in the software project, whether the Java framework of the software project is deployed in the product service layer, whether the middleware of the software project is a specified middleware, whether the server of the software project is a specified server, and whether the software project uses Tuxedo, a Unix transaction system with distributed operations extension.
3. The method as described in claim 2, characterized in that, The number of stored procedure rows and the number of stored procedures, and the third score corresponding to the number of stored procedure rows and the number of stored procedures, satisfy the following relationship: when S3 / C1-S4≥0, When S3 / C1-S4<0, ;in For the third score, S3 is the number of rows in the stored procedure, S4 is the number of stored procedures, C1 is the preset number of rows in a stored procedure, and C2 is the unit price corresponding to the stored procedure; or, The fourth score corresponding to the Java framework satisfies the following relationship: if the Java framework is deployed in the product service layer... ,in For the fourth score, S4 is the unit price corresponding to the deployment of the Java framework in the product service layer; or, The fifth score corresponding to the middleware satisfies the following relationship: if the middleware is the specified middleware... ,in For the fifth score, The number of deployment units corresponding to the specified middleware. The unit price corresponding to the deployment unit for the middleware upgrade, wherein the at least one logical subsystem includes the deployment unit corresponding to the specified middleware; or, The sixth score corresponding to the server satisfies the following relationship: if the server is a server of a specified type... ,in For the sixth score, The number of deployment units corresponding to the specified server. The unit price corresponding to the deployment unit corresponding to the specified server, wherein the at least one logical subsystem includes the deployment unit corresponding to the specified server; or, The seventh score corresponding to Tuxedo satisfies the following relationship: if the software project does not use Tuxedo... ,in The seventh score is S7, which is the unit price corresponding to the software project not using Tuxedo.
4. The method as described in claim 1, characterized in that, The method for obtaining the statistical instructions includes: Retrieve one or more of the following query information: business group information, enterprise software project number, enterprise software project name, software project type, software project status information, software project requirements information, and logical subsystem information; The statistical instruction is determined based on one or more of the query information.
5. A data statistics device, characterized in that, include: The acquisition module is used to acquire statistical instructions, which are used to indicate the workload of the statistical software project. A processing module is configured to, in response to the statistical instruction, determine a first workload, a second workload, and a third workload from at least one logical subsystem used in developing the software project, wherein the first workload is the workload generated by the program used to develop the software project, the second workload is the workload generated by testing the functionality of the software project, and the third workload is the workload generated by testing the performance of the software project; and determine the workload of the software project based on the first workload, the second workload, and the third workload. Among them, the processing module is further configured to: determine statistical parameters from the at least one logical subsystem; determine a score according to each statistical parameter, and accumulate the obtained multiple scores to obtain the first workload; wherein, the statistical parameters include: the number of Structured Query Language (SQL) statements of the software project and the number of Data Definition Language (DDL) statements of the software project; the number of SQL statements and the first score corresponding to the number of SQL statements satisfy the following relationship: , where is the first score, S1 is the number of SQL statements, A1 is the proportion of simple SQL statements, A2 is the proportion of incompatible SQL statements, A3 is the proportion of complex SQL statements, a1 is the unit price corresponding to simple SQL statements, a2 is the unit price corresponding to incompatible SQL statements, and a3 is the unit price corresponding to complex SQL statements; and, the number of DDL statements and the second score corresponding to the number of DDL statements satisfy the following relationship: when S2≥B0, ; when S2<B0, ; where is the second score, S2 is the number of DDL statements, B0 is the preset DDL threshold, B1 is the unit price corresponding to DDL, B2 is the workload corresponding to the database table data migration design when S2≥B0, and B3 is the workload corresponding to the database table data migration design when S2<B0; The processing module is further configured to: determine the number of times each test case in at least one test case is executed and the unit price corresponding to each test case from the at least one logical subsystem; the at least one test case is used to test the functionality of the software project; accumulate the number of times each test case in at least one test case is executed to obtain the total number of times the at least one test case is executed; and obtain the second workload based on the product of the unit price corresponding to each test case and the total number of times the at least one test case is executed. The processing module is further configured to: determine the third sub-workload of each level of logical subsystem based on the quantity of each level of logical subsystem in the at least one logical subsystem and the unit price corresponding to each level of logical subsystem; and accumulate the third sub-workload of each level of logical subsystem in the at least one logical subsystem to obtain the third workload.
6. An electronic device, characterized in that, include: At least one processor; And a memory and a communication interface that are communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, by executing the instructions stored in the memory, causes the electronic device to perform the method as described in any one of claims 1-4 through the communication interface.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1-4.
8. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of claims 1-4.