CN116594873A - Service judging method, device, processor and electronic equipment - Google Patents

Service judging method, device, processor and electronic equipment Download PDF

Info

Publication number
CN116594873A
CN116594873A CN202310499426.5A CN202310499426A CN116594873A CN 116594873 A CN116594873 A CN 116594873A CN 202310499426 A CN202310499426 A CN 202310499426A CN 116594873 A CN116594873 A CN 116594873A
Authority
CN
China
Prior art keywords
program
programs
service
executed
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310499426.5A
Other languages
Chinese (zh)
Inventor
张银
陆杨芳
李远东
张斌洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310499426.5A priority Critical patent/CN116594873A/en
Publication of CN116594873A publication Critical patent/CN116594873A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a service judging method, a service judging device, a processor and electronic equipment. The method relates to the field of application program testing, and comprises the following steps: acquiring a program list of a target service, wherein the program list comprises M programs to be executed, and M is a positive integer; obtaining labeling results associated with each program to be executed in a program list to obtain M labeling results, wherein the labeling results are used for labeling the program types of the program to be executed, and the program types of the program to be executed comprise core programs and non-core programs; m programs to be executed in the program list are operated to obtain first operation data; and calculating program coverage rate data of the target service by using the M marking results and the first operation data, and determining the target service as the service allowing operation under the condition that the program coverage rate data meets the first preset requirement. The application solves the problem that whether the target service can normally operate or not is difficult to accurately judge in the related technology.

Description

Service judging method, device, processor and electronic equipment
Technical Field
The present application relates to the field of application testing, and in particular, to a method and apparatus for determining a service, a processor, and an electronic device.
Background
Under the current environment, as the demands of customers for financial services, transactions, etc. are increasing, financial institutions will also promote various types of financial services. Before the financial business is online, the financial institution needs to verify each business, and whether the business can be online smoothly is judged according to the verification result.
In the related art, it is generally determined whether the accessed traffic can normally run in the service, but in the verification stage, it cannot be determined which programs and which services are specifically covered by the traffic, so that the service can not run smoothly when accessing other service scenes.
Aiming at the problem that whether the target service can normally operate is difficult to accurately judge in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The application mainly aims to provide a service judging method, a device, a processor and electronic equipment, so as to solve the problem that whether a target service can normally operate or not is difficult to accurately judge in the related technology.
In order to achieve the above object, according to an aspect of the present application, there is provided a service judgment method. The method comprises the following steps: acquiring a program list of a target service, wherein the program list comprises M programs to be executed, and M is a positive integer; obtaining labeling results associated with each program to be executed in a program list to obtain M labeling results, wherein the labeling results are used for labeling the program types of the program to be executed, and the program types of the program to be executed comprise core programs and non-core programs; m programs to be executed in the program list are operated to obtain first operation data, wherein the first operation data are used for indicating the number of the operated core programs and the number of the non-core programs; and calculating program coverage rate data of the target service by using the M marking results and the first operation data, and determining the target service as the service which is allowed to be operated under the condition that the program coverage rate data meets a first preset requirement, wherein the first preset requirement refers to the operation condition of the target service.
Optionally, acquiring the program list of the target service includes: acquiring N running programs of a target service, and acquiring N original running programs related to the N running programs from a software database, wherein the original running programs refer to programs with unchanged codes, the running programs refer to programs which need to be run when the target service is run, N is a positive integer, and N is more than or equal to M; comparing the N running programs with the original running program respectively to obtain M difference programs, wherein the difference programs are running programs different from the original running program; and determining each difference program as a program to be executed to obtain M programs to be executed, and forming a program list by the M programs to be executed.
Optionally, running M programs to be executed in the program list, and obtaining the first running data includes: packaging M programs to be executed to obtain a program set to be executed; and operating the programs to be executed in the program to be executed set by utilizing a sandbox mechanism to obtain first operation data.
Optionally, calculating the program coverage rate data of the target service by using the M labeling results and the first operation data includes: calculating the ratio of the first quantity and the second quantity of the core programs to obtain first coverage rate data of the core programs, wherein the first quantity refers to the quantity of the core programs in the first running data, and the second quantity refers to the quantity of the core programs to be executed, which are marked in M marking results; calculating the ratio of the third quantity and the fourth quantity of the non-core programs to obtain second coverage rate data of the non-core programs, wherein the third quantity refers to the quantity of the non-core programs in the first running data, and the fourth quantity refers to the quantity of programs to be executed, which are marked as the non-core programs, in the M marking results; program coverage data is constructed from the first coverage data and the second coverage data.
Optionally, in the case that the program coverage data meets the first preset requirement, determining the target service as the service allowed to operate includes: judging whether the first coverage rate data of the core program is larger than a first preset threshold value or not, and judging whether the second coverage rate data of the non-core program is larger than a second preset threshold value or not; and determining the target service as the service which is allowed to operate under the condition that the first coverage rate data is larger than a first preset threshold value and the second coverage rate data is larger than a second preset threshold value.
Optionally, after calculating the program coverage rate data of the target service by using the M labeling results and the first operation data, the method further includes: under the condition that the program coverage rate data of the target service does not meet the first preset requirement, determining the target service as a service to be operated; modifying a program of a service to be operated, calculating modified program coverage rate data according to the modified service, performing trial operation on the modified service, and determining the service to be operated as the service allowing operation under the condition that the trial operation condition indicates that the modified program coverage rate data meets a first preset requirement.
Optionally, calculating to obtain program coverage rate data of the target service by using the M labeling results and the operation data, where determining the target service as a service allowed to operate includes: judging whether a target service has a service branch, determining the number of programs to be executed contained in each service branch under the condition that one or more service branches exist in the target service, and acquiring second running data of the programs to be executed of each service branch; calculating to obtain branch coverage rate data according to the number of programs to be executed of each service branch and second operation data, and determining the service branch as a service branch which is allowed to operate under the condition that the branch coverage rate data meets second preset requirements; and determining the target service as the service which is allowed to operate under the condition that the ratio of the number of the service branches which is allowed to operate to the total number of the service branches is larger than the preset ratio.
In order to achieve the above object, according to another aspect of the present application, there is provided a service judgment device. The device comprises: the first acquisition unit is used for acquiring a program list of the target service, wherein the program list comprises M programs to be executed, and M is a positive integer; the second acquisition unit is used for acquiring labeling results associated with each program to be executed in the program list to obtain M labeling results, wherein the labeling results are used for labeling the program types of the programs to be executed, and the program types of the programs to be executed comprise core programs and non-core programs; the running unit is used for running M programs to be executed in the program list to obtain first running data, wherein the first running data are used for indicating the number of the running core programs and the number of the non-core programs; the computing unit is used for computing program coverage rate data of the target service by using the M marking results and the first operation data, and determining the target service as the service which is allowed to operate under the condition that the program coverage rate data meets a first preset requirement, wherein the first preset requirement refers to the operation condition of the target service.
According to another aspect of the embodiment of the present application, there is further provided a processor, configured to execute a program, where the program controls, when running, a device in which a nonvolatile storage medium is located to execute a method for determining a service.
According to another aspect of embodiments of the present application, there is also provided an electronic device including one or more processors and a memory; the memory stores computer readable instructions, and the processor is configured to execute the computer readable instructions, where the computer readable instructions execute a method of determining a service when executed.
According to the application, the following steps are adopted: acquiring a program list of a target service, wherein the program list comprises M programs to be executed, and M is a positive integer; obtaining labeling results associated with each program to be executed in a program list to obtain M labeling results, wherein the labeling results are used for labeling the program types of the program to be executed, and the program types of the program to be executed comprise core programs and non-core programs; m programs to be executed in the program list are operated to obtain first operation data, wherein the first operation data are used for indicating the number of the operated core programs and the number of the non-core programs; and calculating program coverage rate data of the target service by using M marking results and first operation data, and determining the target service as the service which is allowed to operate under the condition that the program coverage rate data meets a first preset requirement, wherein the first preset requirement is an operation condition of the target service, so that the problem that whether the target service can normally operate is solved, wherein the problem that whether the target service can normally operate is difficult to accurately judge in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
fig. 1 is a flowchart of a method for determining a service provided according to an embodiment of the present application;
FIG. 2 is a flowchart I of a method for acquiring operational data provided in accordance with an embodiment of the present application;
FIG. 3 is a second flowchart of a method for acquiring operational data according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for calculating program coverage data provided in accordance with an embodiment of the present application;
fig. 5 is a schematic diagram of a service judgment device according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party.
The present application will be described with reference to preferred implementation steps, and fig. 1 is a flowchart of a method for determining a service provided according to an embodiment of the present application, as shown in fig. 1, where the method includes the following steps:
Step S101, a program list of a target service is obtained, wherein the program list comprises M programs to be executed, and M is a positive integer.
Specifically, the target service refers to a service that is ready to be online, for example, the target service may be a financial transaction service developed by a financial institution, and when the target service is before online operation, the financial institution needs to access traffic to the target service, so as to perform online verification on the execution condition of the target service after accessing the traffic, and the target service may be online under the condition that the verification is qualified.
For example, the mode of accessing the traffic may be to invite multiple clients to try out the target service, where each client is a traffic accessed by the client, and when the user tries out the target service, the running condition of the target service is determined, and the running condition is used as an online verification index of the target service, where the running condition is qualified, to indicate that the target service can be operated online.
The program list is a list containing a plurality of programs to be executed, the programs to be executed are updated service programs compiled for operating the target service, the operation condition of the target service is determined according to the operation condition of the programs to be executed in the target service program list, when a plurality of flows are accessed to the target service, each flow can execute the programs to be executed of the target service, and the operation condition of the target service after the flow is accessed can be obtained by judging the operation condition of the programs to be executed, so that whether the target service can normally operate is judged.
Step S102, obtaining labeling results associated with each program to be executed in a program list, and obtaining M labeling results, wherein the labeling results are used for labeling the program types of the program to be executed, and the program types of the program to be executed comprise core programs and non-core programs.
Specifically, the core program refers to a main program for running the target service, for example, a program related to safety protection and accounting protection in the service and related to service performance can be used as the core program; the non-core program refers to an unnecessary program running the supplementary service associated with the target service.
The labeling results are used for storing the program types of each program to be executed, and the number of the labeling results is determined according to the number of the programs to be executed because the program types of different programs to be executed are different. The method for verifying the target service is to judge whether the program to be executed can normally run or not, if the program coverage rate data of the program to be executed in normal running meets the threshold requirement, the target service is indicated to meet the online requirement, namely the target service can run smoothly, wherein the program coverage rate data refers to the proportion of the program to be executed used by each flow to the total number of the target service programs after the flow is accessed.
Step S103, M programs to be executed in a program list are operated to obtain first operation data, wherein the first operation data are used for indicating the number of the operated core programs and the number of the non-core programs;
in order to judge whether the program coverage rate data associated with the program to be executed meets the threshold value requirement, the program coverage rate data needs to be calculated, the program coverage rate data needs to obtain the number of programs capable of normally running, specifically, the running result of each program to be executed is obtained through each program to be executed in a program list associated with a running target service, the running result is used for representing whether the program to be executed can normally run, and under the condition that a plurality of running results represent that the program to be executed can normally run, the running results are combined to obtain first running data.
Further, the marking result of each program to be executed and the first operation data are utilized to calculate the program coverage rate, and the target service can be verified by utilizing the program coverage rate data.
Step S104, calculating program coverage rate data of the target service by using the M marking results and the first operation data, and determining the target service as the service which is allowed to operate under the condition that the program coverage rate data meets the first preset requirement, wherein the first preset requirement refers to the operation condition of the target service.
Specifically, the program coverage rate data refers to the proportion of the programs to be executed, which are executed by the flow, to the total number of the programs in the program list, dividing the number of the running core programs and the marked core programs, calculating to obtain core program coverage rate data, dividing the number of the running non-core programs and the marked non-core programs to obtain non-core program coverage rate data, and forming the program coverage rate data of the target service by the core program coverage rate data and the non-core program coverage rate data.
When the program coverage rate data is greater than the first preset requirement, the service is indicated to meet the condition of online operation, and the service is then online processed, where the first preset requirement refers to an operation requirement that each service needing to be online meets, for example, the first preset requirement may be that the program coverage rate data associated with the program to be executed needs to be greater than 80%, that is, when more than 80% of programs need to be operated in the program to be executed in the program list, the target service can only be online operated. For another example, the first preset requirement may be that coverage rate data of the kernel program needs to be greater than 90% and coverage rate data of the non-kernel program needs to be greater than 70%, that is, in the program to be executed in the program list, when more than 90% of the kernel program is executed and more than 70% of the non-kernel program is executed, the target service can be operated online.
The method for judging the service provided by the embodiment of the application comprises the steps of obtaining a program list of a target service, wherein the program list comprises M programs to be executed, and M is a positive integer; obtaining labeling results associated with each program to be executed in a program list to obtain M labeling results, wherein the labeling results are used for labeling the program types of the program to be executed, and the program types of the program to be executed comprise core programs and non-core programs; m programs to be executed in the program list are operated to obtain first operation data, wherein the first operation data are used for indicating the number of the operated core programs and the number of the non-core programs; and calculating program coverage rate data of the target service by using M marking results and first operation data, and determining the target service as the service which is allowed to operate under the condition that the program coverage rate data meets a first preset requirement, wherein the first preset requirement is an operation condition of the target service, so that the problem that whether the target service can normally operate is solved, wherein the problem that whether the target service can normally operate is difficult to accurately judge in the related technology is solved.
Optionally, in the method for determining a service provided by the embodiment of the present application, the method for obtaining a program list of a target service includes: acquiring N running programs of a target service, and acquiring N original running programs related to the N running programs from a software database, wherein the original running programs refer to programs with unchanged codes, the running programs refer to programs which need to be run when the target service is run, N is a positive integer, and N is more than or equal to M; comparing the N running programs with the original running program respectively to obtain M difference programs, wherein the difference programs are running programs different from the original running program; and determining each difference program as a program to be executed to obtain M programs to be executed, and forming a program list by the M programs to be executed.
Specifically, according to information such as a service name to be detected, an original running program of the target service is obtained from a software database storing various development codes, wherein the original running program refers to a service program when the target service is developed or when the service is tried to be operated; meanwhile, the operation program when the target service is ready to be on line is acquired, and it is required to be noted that in order to ensure that the target service operates normally, a developer updates the version of the target service, that is, modifies the operation program, so that the operation program refers to the program after the service version is updated, and there may be a difference between the operation program and the original operation program.
Further, comparing the original running program with the program in updating the service version, determining the running program with difference from the original running program as a program to be executed, and combining related information of each running program with difference to obtain a program list, wherein the related information can be a program name, a program type and an affiliated method name.
For example, a program to be executed is a core program, and its program name is xxx.supplementarydatal, and its method name is SetEnvlp, and the format of the program after being stored in the program list is shown in table 1:
TABLE 1
Program name Method name Program type
xxx.SupplementaryDatal SetEnvlp Kernel program
Optionally, in the method for judging a service provided by the embodiment of the present application, running M programs to be executed in a program list to obtain first operation data includes: packaging M programs to be executed to obtain a program set to be executed; and operating the programs to be executed in the program to be executed set by utilizing a sandbox mechanism to obtain first operation data.
Specifically, in order to calculate the program coverage rate data of the target service, the number of normally running programs needs to be obtained, specifically, each program to be executed in a program list is packaged to obtain a data packet with a jar type, and further, the program to be executed in the program to be executed set is operated by using a sandbox mechanism.
The sandbox mechanism is to create a controlled environment by isolating and limiting the access rights of the application program, and run the program to be executed in the environment, so that the running process does not affect the program itself, and the changes generated by running can be deleted.
Further, fig. 2 is a flowchart of a method for acquiring operation data according to an embodiment of the present application, as shown in fig. 2, after a program list is acquired, each packaged program in the program list is executed by using a sandbox technology, and execution is completed by adding an update code after each program until no program with no update code added is present in the program list.
FIG. 3 is a flowchart illustrating a method for acquiring operation data according to an embodiment of the present application, as shown in FIG. 3, further, by determining whether an executed program after packaging is a kernel program, if one program executed when executing a program in a program list is the kernel program, adding an operation to the number of operations of the kernel program; if the executed program is a non-core program, adding an operation to the running number of the non-core program until the program in the program list is executed, obtaining running data of the core program and the running data of the non-core program, combining the running data of the core program and the running data of the non-core program into first running data, and storing the first running data into a cache database, wherein the running data of the core program refers to the final running number of the core program, and the running data of the non-core program refers to the final running number of the non-core program.
In order to obtain program coverage rate data, optionally, in the method for judging a service provided by the embodiment of the present application, calculating the program coverage rate data of the target service by using M labeling results and the first operation data includes: calculating the ratio of the first quantity and the second quantity of the core programs to obtain first coverage rate data of the core programs, wherein the first quantity refers to the quantity of the core programs in the first running data, and the second quantity refers to the quantity of the core programs to be executed, which are marked in M marking results; calculating the ratio of the third quantity and the fourth quantity of the non-core programs to obtain second coverage rate data of the non-core programs, wherein the third quantity refers to the quantity of the non-core programs in the first running data, and the fourth quantity refers to the quantity of programs to be executed, which are marked as the non-core programs, in the M marking results; program coverage data is constructed from the first coverage data and the second coverage data.
Optionally, in the method for determining a service provided by the embodiment of the present application, when the program coverage rate data meets the first preset requirement, determining the target service as the service allowed to operate includes: judging whether the first coverage rate data of the core program is larger than a first preset threshold value or not, and judging whether the second coverage rate data of the non-core program is larger than a second preset threshold value or not; and determining the target service as the service which is allowed to operate under the condition that the first coverage rate data is larger than a first preset threshold value and the second coverage rate data is larger than a second preset threshold value.
Judging whether the target service allows online operation or not and judging by using program coverage rate data, specifically, fig. 4 is a flowchart of a method for calculating the program coverage rate data according to an embodiment of the present application, and as shown in fig. 4, obtaining first operation data obtained when each program to be executed is operated and a labeling result in a program list obtained by comparing with an original operation program, dividing two values into operation data and a labeling result of a core program and operation data and a labeling result of a non-core program, and calculating four values to obtain a coverage rate value.
Specifically, the first coverage rate data of the core program and the second coverage rate data of the non-core program are obtained through the following calculation:
first coverage data = first number/second number;
second coverage data=third number/fourth number;
the number of the running core programs, namely the first number, is recorded in the first running data; the number of marked core programs in the marking result is the second number; the number of the running non-core programs, namely the third number, is recorded in the first running data; the number of marked non-kernel programs in the marking result is a fourth number.
Further, the first coverage rate data and the second coverage rate data are combined to obtain program coverage rate data of the target service, the program coverage rate data are verified, and whether the target service can be operated online is judged by using a verification result.
For example, the first preset requirement refers to a case when the first coverage data is 90% or more and the second coverage data is 80% or more. And if the first coverage rate data is 90% and the second coverage rate data is 80%, indicating that the program coverage rate data meets the first preset requirement, determining the target service as the service which is allowed to operate.
According to the method and the device, the number of the running core programs and the number of the non-core programs recorded in the first running data and the number of the core programs and the non-core programs marked in the marking result are used for accurately calculating to obtain the program coverage rate data, so that a data foundation is laid for judging whether the target service can be operated.
Optionally, in the method for judging a service provided by the embodiment of the present application, after calculating program coverage data of a target service by using M labeling results and first operation data, the method further includes: under the condition that the program coverage rate data of the target service does not meet the first preset requirement, determining the target service as a service to be operated; modifying a program of a service to be operated, calculating modified program coverage rate data according to the modified service, performing trial operation on the modified service, and determining the service to be operated as the service allowing operation under the condition that the trial operation condition indicates that the modified program coverage rate data meets a first preset requirement.
If the program coverage data obtained by the coverage data calculation formula is smaller than the first preset requirement, the program coverage data needs to be subjected to targeted flow coverage, specifically, the target service is firstly set to be the service to be operated, the program to be executed, which is not covered by the flow, is analyzed, the sub-service type of the program to be executed is judged, then the sub-service of the type is subjected to flow re-coverage, for example, if the sub-service type of the program to be executed is the transaction service of the consignment payment of the different places, the sub-service is subjected to flow re-coverage, wherein the target service can comprise one or more sub-services, and the sub-services can be different transaction directions of the target service.
Further, the target service after the re-coverage is subjected to trial operation, new program coverage rate data is calculated through the trial operation, the size relation between the new program coverage rate data and the first preset requirement is judged, and if the new program coverage rate data is larger than the first preset requirement, the service is determined to be an allowed operation service.
The judging method for the service includes multiple modes, optionally, in the judging method for the service provided by the embodiment of the application, the program coverage rate data of the target service is obtained by calculating by using M marking results and operation data, and the determining the target service as the service allowing operation includes: judging whether a target service has a service branch, determining the number of programs to be executed contained in each service branch under the condition that one or more service branches exist in the target service, and acquiring second running data of the programs to be executed of each service branch; calculating to obtain branch coverage rate data according to the number of programs to be executed of each service branch and second operation data, and determining the service branch as a service branch which is allowed to operate under the condition that the branch coverage rate data meets second preset requirements; and determining the target service as the service which is allowed to operate under the condition that the ratio of the number of the service branches which is allowed to operate to the total number of the service branches is larger than the preset ratio.
The target service may have a plurality of sub-services, each sub-service is a service branch, and in order to determine whether the service to be detected meets the operation condition, the determination may be performed by determining the service branch in the service, that is, by determining whether the program coverage of the sub-service in the target service meets the requirement.
Specifically, whether service branches exist or not is firstly determined, each service branch is operated under the condition that the number of the service branches is greater than or equal to one, so that the number of programs to be executed of each service branch is obtained, each program is executed, operation data of each branch, namely second operation data, are obtained, and coverage rate data of each branch are obtained through calculation according to the number of the programs of each branch and the operation data.
It should be noted that the second preset requirement refers to a value of coverage data that allows the branch to run, for example, when the coverage data of each branch is 80% or more, it indicates that the branch allows the branch to run. And when the number of the branches allowed to run exceeds 80% of the total number of the branches, indicating that the target service is the service allowed to run, and carrying out online processing on the target service.
According to the method and the device, program coverage rate data of each service branch are calculated, whether the target service can be operated or not is determined according to the program coverage rate data of each service branch, and the dimension for judging whether the target service can be operated or not is expanded.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a service judging device, and the service judging device of the embodiment of the application can be used for executing the service judging method provided by the embodiment of the application. The following describes a service judgment device provided by the embodiment of the present application.
Fig. 5 is a schematic diagram of a service determining apparatus according to an embodiment of the present application, as shown in fig. 5, where the apparatus includes: a first acquisition unit 50, a second acquisition unit 51, an operation unit 52, a calculation unit 53.
A first obtaining unit 50, configured to obtain a program list of a target service, where the program list includes M programs to be executed, and M is a positive integer;
The second obtaining unit 51 is configured to obtain labeling results associated with each program to be executed in the program list, to obtain M labeling results, where the labeling results are used to label a program type of the program to be executed, and the program type of the program to be executed includes a core program and a non-core program;
an operation unit 52, configured to operate M programs to be executed in the program list to obtain first operation data, where the first operation data is used to indicate the number of running core programs and non-core programs;
the calculating unit 53 is configured to calculate, using the M labeling results and the first operation data, program coverage data of the target service, and determine the target service as a service that is allowed to be operated when the program coverage data meets a first preset requirement, where the first preset requirement refers to an operation condition of the target service.
Optionally, in the service determining device provided in the embodiment of the present application, the first obtaining unit 50 includes: the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring N running programs of a target service and N original running programs related to the N running programs from a software database, wherein the original running programs refer to programs with unchanged codes, the running programs refer to programs which need to be run when the target service is run, N is a positive integer, and N is more than or equal to M; the comparison module is used for respectively comparing the N running programs with the original running program to obtain M difference programs, wherein the difference programs are running programs different from the original running program; the first determining module is used for determining each difference program as a program to be executed, obtaining M programs to be executed, and forming a program list by the M programs to be executed.
Optionally, in the service determining device provided in the embodiment of the present application, the operation unit 52 includes: the processing module is used for packaging the M programs to be executed to obtain a program set to be executed; and the operation module is used for operating the programs to be executed in the program to be executed set by utilizing a sandbox mechanism to obtain first operation data.
Optionally, in the service determining device provided in the embodiment of the present application, the calculating unit 53 includes: the first calculation module is used for calculating the ratio of the first quantity and the second quantity of the core programs to obtain first coverage rate data of the core programs, wherein the first quantity refers to the quantity of the core programs in the first running data, and the second quantity refers to the quantity of the core programs to be executed, which are marked in the M marking results; the second calculation module is used for calculating the ratio of the third quantity and the fourth quantity of the non-core programs to obtain second coverage rate data of the non-core programs, wherein the third quantity refers to the quantity of the non-core programs in the first running data, and the fourth quantity refers to the quantity of programs to be executed, which are marked as the non-core programs, in the M marking results; and a construction module for constructing program coverage data from the first coverage data and the second coverage data.
Optionally, in the service determining device provided in the embodiment of the present application, the calculating unit 53 includes: the first judging module is used for judging whether the first coverage rate data of the core program is larger than a first preset threshold value or not and judging whether the second coverage rate data of the non-core program is larger than a second preset threshold value or not; and the second determining module is used for determining the target service as the service which is allowed to operate under the condition that the first coverage rate data is larger than a first preset threshold value and the second coverage rate data is larger than a second preset threshold value.
Optionally, in the service determining device provided in the embodiment of the present application, the device further includes: the determining unit is used for determining the target service as the service to be operated under the condition that the program coverage rate data of the target service does not meet the first preset requirement after the program coverage rate data of the target service is obtained by calculating the M marking results and the first operation data; the modification unit is used for modifying the program of the service to be operated, calculating modified program coverage rate data according to the modified service, performing trial operation on the modified service, and determining the service to be operated as the service which is allowed to be operated under the condition that the trial operation condition indicates that the modified program coverage rate data meets the first preset requirement.
Optionally, in the service determining device provided in the embodiment of the present application, the calculating unit 53 includes: the second judging module is used for judging whether the target service has service branches, determining the number of programs to be executed contained in each service branch under the condition that one or more service branches exist in the target service, and acquiring second running data of the programs to be executed of each service branch; the third calculation module is used for calculating to obtain branch coverage rate data according to the number of programs to be executed of each service branch and the second operation data, and determining the service branch as the service branch which is allowed to operate under the condition that the branch coverage rate data meets the second preset requirement; and the third determining module is used for determining the target service as the service which is allowed to run under the condition that the proportion of the number of the service branches which is allowed to run to the total number of the service branches is larger than the preset proportion.
The service judging device provided by the embodiment of the application is used for acquiring a program list of a target service through the first acquiring unit 50, wherein the program list comprises M programs to be executed, and M is a positive integer; the second obtaining unit 51 is configured to obtain labeling results associated with each program to be executed in the program list, to obtain M labeling results, where the labeling results are used to label a program type of the program to be executed, and the program type of the program to be executed includes a core program and a non-core program; an operation unit 52, configured to operate M programs to be executed in the program list to obtain first operation data, where the first operation data is used to indicate the number of running core programs and non-core programs; the calculating unit 53 is configured to calculate, using the M labeling results and the first operation data, program coverage data of the target service, and determine, when the program coverage data meets a first preset requirement, the target service as a service that is allowed to operate, where the first preset requirement is an operation condition of the target service, and solves a problem that in the related art, it is difficult to accurately determine whether the target service can normally operate, by obtaining operation data of the service and the number of programs of the service, calculating the coverage data using the operation data and the number of programs, and determining whether the service can smoothly be online using the coverage data, thereby achieving an effect of accurately determining an operation condition of the service using relevant data of the program.
The service judging device includes a processor and a memory, the first acquiring unit 50, the second acquiring unit 51, the operating unit 52, the calculating unit 53, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the problem that whether the target service can normally operate is difficult to accurately judge in the related technology is solved by adjusting the kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the application provides a computer readable storage medium, on which a program is stored, which when executed by a processor, implements a method for determining a service.
The embodiment of the application provides a processor, which is used for running a program, wherein the program runs a judging method for executing a service.
Fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 6, an embodiment of the present application provides an electronic device, where an electronic device 60 includes a processor, a memory, and a program stored on the memory and executable on the processor, and the processor is configured to execute computer readable instructions, where the computer readable instructions execute a method for determining a service when executed. The device herein may be a server, PC, PAD, cell phone, etc.
The application also provides a computer program product adapted to perform a method of determining a service when executed on a data processing apparatus.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a second computer, first 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. The service judging method is characterized by comprising the following steps:
acquiring a program list of a target service, wherein the program list comprises M programs to be executed, and M is a positive integer;
obtaining labeling results associated with each program to be executed in the program list to obtain M labeling results, wherein the labeling results are used for labeling program types of the program to be executed, and the program types of the program to be executed comprise core programs and non-core programs;
Operating the M programs to be executed in the program list to obtain first operation data, wherein the first operation data are used for indicating the number of the operated core programs and the number of the non-core programs;
and calculating program coverage rate data of the target service by using the M marking results and the first operation data, and determining the target service as a service allowing operation under the condition that the program coverage rate data meets a first preset requirement, wherein the first preset requirement refers to the operation condition of the target service.
2. The method of claim 1, wherein obtaining a program listing of the target service comprises:
acquiring N running programs of the target service, and acquiring N original running programs associated with the N running programs from a software database, wherein the original running programs refer to programs with unchanged codes, the running programs refer to programs which need to be run when the target service is run, N is a positive integer, and N is greater than or equal to M;
comparing the N running programs with the original running program respectively to obtain M difference programs, wherein the difference programs are running programs different from the original running program;
And determining each difference program as a program to be executed, obtaining the M programs to be executed, and forming the program list by the M programs to be executed.
3. The method of claim 1, wherein running the M programs to be executed in the program list to obtain first running data comprises:
packaging the M programs to be executed to obtain a program set to be executed;
and operating the programs to be executed in the program to be executed set by utilizing a sandbox mechanism to obtain the first operation data.
4. The method of claim 1, wherein calculating program coverage data for the target service using the M labeling results and the first operational data comprises:
calculating the ratio of the first quantity and the second quantity of the core programs to obtain first coverage rate data of the core programs, wherein the first quantity refers to the quantity of the core programs in the first running data, and the second quantity refers to the quantity of the core programs to be executed, which are marked in the M marking results;
calculating the ratio of the third quantity and the fourth quantity of the non-core programs to obtain second coverage rate data of the non-core programs, wherein the third quantity refers to the quantity of the non-core programs in the first running data, and the fourth quantity refers to the quantity of programs to be executed, which are marked as the non-core programs, in the M marking results;
The program coverage data is constructed from the first coverage data and the second coverage data.
5. The method according to claim 1, wherein determining the target service as an operation-permitted service in case the program coverage data meets a first preset requirement comprises:
judging whether the first coverage rate data of the core program is larger than a first preset threshold value or not, and judging whether the second coverage rate data of the non-core program is larger than a second preset threshold value or not;
and determining the target service as the service allowed to operate under the condition that the first coverage rate data is larger than a first preset threshold value and the second coverage rate data is larger than a second preset threshold value.
6. The method of claim 1, wherein after calculating program coverage data of the target service using the M labeling results and the first operation data, the method further comprises:
under the condition that the program coverage rate data of the target service does not meet the first preset requirement, determining the target service as a service to be operated;
modifying the program of the service to be operated, calculating modified program coverage rate data according to the modified service, performing trial operation on the modified service, and determining the service to be operated as the service allowing operation under the condition that the trial operation condition indicates that the modified program coverage rate data meets the first preset requirement.
7. The method according to claim 1, wherein calculating program coverage data of the target service using the M labeling results and the operation data, and determining the target service as a service that is allowed to be operated if the program coverage data meets a first preset requirement includes:
judging whether the target service has service branches, determining the number of programs to be executed contained in each service branch under the condition that one or more service branches exist in the target service, and acquiring second running data of the programs to be executed of each service branch;
calculating to obtain branch coverage rate data according to the number of programs to be executed of each service branch and the second operation data, and determining the service branch as a service branch which is allowed to operate under the condition that the branch coverage rate data meets a second preset requirement;
and determining the target service as the service which is allowed to operate under the condition that the proportion of the number of the service branches which is allowed to operate to the total number of the service branches is larger than a preset proportion.
8. A service judging device, comprising:
The first acquisition unit is used for acquiring a program list of the target service, wherein the program list comprises M programs to be executed, and M is a positive integer;
the second obtaining unit is used for obtaining labeling results associated with each program to be executed in the program list to obtain M labeling results, wherein the labeling results are used for labeling the program types of the programs to be executed, and the program types of the programs to be executed comprise core programs and non-core programs;
the running unit is used for running the M programs to be executed in the program list to obtain first running data, wherein the first running data is used for indicating the number of running core programs and non-core programs;
and the calculating unit is used for calculating program coverage rate data of the target service by using the M marking results and the first operation data, and determining the target service as the service allowing operation under the condition that the program coverage rate data meets a first preset requirement, wherein the first preset requirement refers to the operation condition of the target service.
9. A processor, characterized in that the processor is configured to run a program, wherein the program, when run, performs the method for determining a service according to any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of determining traffic of any of claims 1-7.
CN202310499426.5A 2023-05-05 2023-05-05 Service judging method, device, processor and electronic equipment Pending CN116594873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310499426.5A CN116594873A (en) 2023-05-05 2023-05-05 Service judging method, device, processor and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310499426.5A CN116594873A (en) 2023-05-05 2023-05-05 Service judging method, device, processor and electronic equipment

Publications (1)

Publication Number Publication Date
CN116594873A true CN116594873A (en) 2023-08-15

Family

ID=87589131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310499426.5A Pending CN116594873A (en) 2023-05-05 2023-05-05 Service judging method, device, processor and electronic equipment

Country Status (1)

Country Link
CN (1) CN116594873A (en)

Similar Documents

Publication Publication Date Title
CN108595157B (en) Block chain data processing method, device, equipment and storage medium
CN111476667B (en) Block chain-based original work transaction method and device and electronic equipment
JP2017514218A (en) Running third-party applications
CN110175916B (en) Fund flow checking method and device
CN107870980B (en) Electronic device, billing data processing method and computer storage medium
CN108134812B (en) Data processing method and device
CN110060139B (en) Accounting processing method and device
CN109446753A (en) Detect method, apparatus, computer equipment and the storage medium of pirate application program
CN112529694B (en) Credit granting processing method, device, equipment and system
CN107330572A (en) Air control method, apparatus and system
CN111639998A (en) Method, device and medium for guaranteeing user deposit rights and interests based on block chain
CN116188020A (en) Abnormal account identification method, device and storage medium
CN110928941A (en) Data fragment extraction method and device
CN116955148A (en) Service system testing method, device, equipment, storage medium and product
CN116594873A (en) Service judging method, device, processor and electronic equipment
CN115470264A (en) Data auditing method and device, electronic equipment and storage medium
CN117349261A (en) Data storage method and system based on data playback
US20240037653A1 (en) Secure Decentralized System and Method
CN114297689B (en) Financial wind control method and device based on privacy calculation and storage medium
CN116468529A (en) Financial business processing method and device, processor and electronic equipment
CN114297675A (en) Processing method, device, equipment and medium for auditing request of target object
CN117768850A (en) Financial message pushing method and device, storage medium and electronic equipment
CN116032786A (en) Pressure testing method, device and equipment for block chain network
CN113743948A (en) Method and device for generating transaction information file, electronic equipment and storage medium
CN116385140A (en) Credit service processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination