Inspection method, electronic equipment and storage medium
A unified inspection method for cloud platforms optimizes resource usage by determining target applications, obtaining configuration information, and using a centralized inspection service to streamline inspections across multiple applications, reducing waste and complexity.
Patent Information
- Application Number
- CN202411166386.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-23
AI Technical Summary
Existing inspection and detection solutions in cloud computing environments require separate inspection services for each application, leading to resource waste and increased management complexity when multiple applications are deployed in a cluster.
An inspection method that determines target applications, obtains configuration information, and uses a unified inspection service to inspect multiple applications based on this information, employing workflow automation and multi-threaded inspection to optimize resource usage.
Reduces resource waste and simplifies management by consolidating inspections, allowing efficient and centralized management of multiple applications within a cloud platform.
Smart Images

Figure CN118694810B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud computing, and in particular to an inspection method, electronic equipment, and storage medium. Background Art
[0002] Existing inspection and detection solutions usually start an inspection service separately based on the needs of each application to be inspected. If a large number of applications to be inspected are deployed in the cluster, each application to be inspected will run this inspection service separately, which will have a certain impact on the usage of resources within the cluster and will put forward higher requirements for the management of each inspection service. Summary of the invention
[0003] The present application at least provides an inspection method, electronic equipment, and storage medium, which can reduce the waste of inspection resources.
[0004] The first aspect of the present application provides an inspection method, which includes: determining a number of target selected applications to be inspected; obtaining inspection configuration information of each application to be inspected; starting an inspection service, and using the inspection service to inspect each application to be inspected based on the inspection configuration information.
[0005] Determining a number of applications to be inspected for target selection includes: identifying candidate applications that meet candidate conditions from various applications in the cluster; and selecting a number of applications to be inspected from the candidate applications in response to a target selection operation.
[0006] Among them, the candidate conditions include at least one of the following: belonging to a preset namespace, and the application is a type that allows inspection; and / or, the candidate conditions include belonging to a preset namespace, and the application is a type that allows inspection, each application in the cluster is provided with application configuration information, and the application configuration information includes the namespace to which the application belongs; identifying candidate applications that meet the candidate conditions from each application in the cluster, including: based on the application configuration information of each application, retrieving pending applications in the cluster whose namespace belongs to the preset namespace; from each pending application, screening out candidate applications whose application configuration information has a type tag and the corresponding value of the type tag is a target type value, wherein the target type value indicates that the application is a type that allows inspection.
[0007] Among them, obtaining the inspection configuration information of each application to be inspected includes at least one of the following steps: for each application to be inspected, obtaining the address-related information of the application to be inspected from the application configuration information of the application to be inspected, and combining the address-related information of the application to be inspected to obtain the access address of the application to be inspected as the inspection configuration information of the application to be inspected, wherein the address-related information includes at least one of the type, name, path, port and namespace of the application to be inspected; displaying the application configuration page of each application to be inspected, and in response to the configuration operation of the target, obtaining the inspection-related information of each application to be inspected as the inspection configuration information, wherein the inspection-related information includes at least one of the inspection cycle and the inspection type.
[0008] Among them, the process of inspecting each application to be inspected includes: using the interface provided by the inspection docking specification to send inspection-related requests to each application to be inspected, so that each application to be inspected responds to the inspection-related requests to realize the inspection of each application to be inspected, wherein the inspection-related requests include starting an inspection task, stopping an inspection task, feedback on the inspection status, and feedback on the inspection report. At least one of the following.
[0009] Among them, using the interface provided by the inspection docking specification to send inspection-related requests to each application to be inspected, so that each application to be inspected responds to the inspection-related requests to realize the inspection of each application to be inspected, including: using the start-stop interface provided by the inspection docking specification to send an inspection start-stop request to the application to be inspected, so that the application to be inspected responds to the inspection start-stop request and executes the start / stop inspection task, wherein the inspection start-stop request includes the action to be executed by the inspection application and the inspection type, and the action to be executed by the inspection application includes starting or stopping; after the inspection application starts the inspection task, using the inspection The inspection status acquisition interface provided by the inspection docking specification sends a feedback inspection status request to the application to be inspected, so that the application to be inspected responds to the feedback inspection status request to detect the inspection status and feedback the inspection status, wherein the inspection status includes at least one of the inspection progress and the inspection health status; when it is detected that the inspection task meets the inspection end conditions and there is an inspection report, the inspection report acquisition interface provided by the inspection docking specification is used to send a feedback inspection report request to the application to be inspected, so that the application to be inspected responds to the feedback inspection report request to download the inspection report and feedback the inspection report.
[0010] Among them, the inspection service is started, and the inspection service is used to inspect each application to be inspected based on the inspection configuration information, including: creating a workflow task based on the workflow template and the inspection configuration information; executing the workflow task to start the inspection service, and using the inspection service to inspect each application to be inspected based on the inspection configuration information.
[0011] Among them, the workflow tasks include the inspection service startup task and the inspection task execution task; execute the workflow task to start the inspection service, and use the inspection service to inspect each application to be inspected based on the inspection configuration information, including: execute the inspection service startup task to start the inspection service; execute the inspection task execution task so that the inspection service can inspect each application to be inspected based on the inspection configuration information.
[0012] Among them, before executing the inspection task, it also includes: loading the environment variables in the workflow task to obtain the identification information of each application to be inspected and extracting the inspection configuration information of each application to be inspected, and adding it to the running memory; and / or, the inspection service adopts a multi-threaded method to inspect each application to be inspected in parallel; executing the inspection task includes: according to the information in the running memory, sequentially starting the inspection task of each application to be inspected in a multi-threaded manner; performing the inspection status detection of the corresponding application to be inspected in each sub-thread, summarizing the task records of all sub-threads, and uniformly updating them to the inspection result label of the workflow task. In which, the inspection result label can be queried by the business side to obtain the inspection status of the application to be inspected; for each sub-thread, when it is detected in the sub-thread that the inspection task meets the inspection end condition and there is an inspection report, the inspection report is downloaded; in response to the sub-thread meeting the inspection end condition, each application to be inspected is triggered to stop the inspection task and exit the sub-thread, and the inspection end condition includes that the inspection report has been downloaded, or the inspection has been completed in the sub-thread but there is no inspection report; and / or, the workflow task also includes a report upload task; after executing the inspection task, it also includes: executing the report upload task to upload the inspection report of each application to be inspected.
[0013] Among them, the inspection status includes the inspection progress, and the inspection end condition includes any one of the following: the inspection progress reaches the target progress, and the execution time of the inspection task reaches the upper limit of the execution time; the method also includes: detecting whether the inspection progress of the inspection task reaches the target progress; in response to the inspection progress reaching the target progress, determining that the inspection task meets the inspection end condition; in response to the inspection progress not reaching the target progress, detecting whether the execution time of the inspection task reaches the upper limit of the execution time; in response to the execution time of the inspection task reaching the upper limit of the execution time, determining that the inspection task meets the inspection end condition, and recording the end reason in the inspection report.
[0014] A second aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the inspection method in the first aspect.
[0015] A third aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the inspection method in the first aspect described above is implemented.
[0016] The above scheme first determines the target selected application to be inspected, and then obtains the inspection configuration information of each target selected application to be inspected. When performing the inspection task, the inspection service is started, and the inspection service is used to inspect each application to be inspected according to the obtained inspection configuration information. Compared with the existing technology, this scheme controls multiple applications to be inspected for inspection by setting up an inspection service, which can reduce the waste of inspection resources and facilitate subsequent maintenance and management.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0019] Figure 1 It is a flowchart of an embodiment of the inspection method of the present application;
[0020] Figure 2 It is a flowchart of an embodiment of a stop request in the inspection method of the present application;
[0021] Figure 3 This is a flowchart of an embodiment of the present invention for discovering and configuring an application to be inspected;
[0022] Figure 4 This is a flowchart of an embodiment of starting an inspection task of the present application;
[0023] Figure 5 It is a flowchart of another embodiment of the inspection method of the present application;
[0024] Figure 6 It is a schematic diagram of the framework of an embodiment of the inspection device of the present application;
[0025] Figure 7 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;
[0026] Figure 8 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0027] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0028] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0029] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0030] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of the inspection method of the present application. Specifically, it may include the following steps:
[0031] Step S110: Determine a number of target selected applications to be inspected.
[0032] The inspection method in this application is mainly used in fields such as cloud platforms or operation and maintenance scenarios. During inspection, the same inspection service is used to inspect each application to be inspected according to the inspection configuration information of the application to be inspected, avoiding the waste of inspection resources caused by setting up an inspection service for each application to be inspected.
[0033] In some embodiments, in the cloud platform system, in order to obtain the application configuration information of the application to be inspected while determining the application to be inspected, a configuration setting that exposes the application configuration information of the application to be inspected can be added in the cluster's deployment application Helm Chart (Helm is an application package manager for Kubernetes (application software), which is responsible for coordinating the download, installation and deployment of applications. Chart is a collection of files that describe Kubernetes-related resources.) (it is agreed that each application to be inspected will be separately added with a Configmap configuration), so that the cloud platform system backend can use the configuration setting to obtain the application configuration information of the application to be inspected. Specifically, the following is an example of a template for the configuration setting:
[0034] apiVersion: v1
[0035] kind: ConfigMap
[0036] metadata:
[0037] name: inspection-config#Customize the configuration file name
[0038] namespace: test#Customize the namespace to which the configuration file belongs
[0039] labels:
[0040] ops.cloud.com / type: inspection#The specification must have this label to identify the inspection type
[0041] data:
[0042] product.name: cloud-storage#Product type
[0043] pod.name: dn-0#Optional Fill in if the fixed inspection service is in which pod
[0044] service.name: test-app#Application service name to be inspected
[0045] service.namespace: test#k8s service namespace
[0046] service.path: / inspect#The prefix of the address information exposed by the application to be inspected
[0047] service.port: "80"#The port exposed by the application to be inspected.
[0048] By configuring the template, the corresponding application configuration information of each application to be inspected can be easily obtained during the query process, thereby improving the efficiency of subsequent inspections.
[0049] In some embodiments, there are multiple applications in the cluster, some of which can perform inspection tasks, some of which cannot, and some of which can perform inspection tasks, but are not suitable for performing this inspection task at this time, for example, the application has performed other inspection tasks. Therefore, in order to obtain the applications that can be inspected in this inspection task, it is necessary to search and filter the applications in the cluster. Specifically, please refer to step S111 to step S112.
[0050] Step S111: identifying candidate applications that meet the candidate conditions from the applications in the cluster.
[0051] The candidate conditions include at least one of the following: belonging to a preset namespace, and the application is of a type that allows inspection. It is understandable that the candidate conditions may also include that the configuration information of the application includes at least one inspection item of this inspection task, etc., which is not specifically limited here.
[0052] In some embodiments, the candidate conditions include belonging to a preset namespace and the application is an allowed inspection type. In this embodiment, the allowed inspection types include complete inspection and basic inspection, wherein the complete inspection is to inspect all indicator parameters in the application, and the basic inspection is to inspect the core indicator parameters of the application. Each application in the cluster is provided with application configuration information, and the application configuration information includes the namespace to which the application belongs, wherein the application configuration information can be obtained through the configuration settings of the above application. Therefore, based on the application configuration information of each application in the cluster, the candidate application that meets the candidate conditions can be selected. Specifically, in order to filter out the candidate applications that meet the candidate conditions, the pending applications whose namespaces in the cluster belong to the preset namespace can be retrieved according to the application configuration information of each application, and then the candidate applications whose application configuration information has a type label and the corresponding value of the type label is the target type value can be filtered out from the obtained pending applications, wherein the target type value indicates that the application is an allowed inspection type. For example, in the above configuration setting template, metadata.labels carries "ops.cloud.com / type" as a type label, and its corresponding value value "inspection" is the target type value.
[0053] In this way, candidate applications that can perform inspection tasks can be retrieved from the cluster. In addition, candidate applications can also be selected in batches to perform subsequent inspection tasks.
[0054] Step S112: In response to the target selection operation, a number of applications to be inspected are selected from the candidate applications.
[0055] In some embodiments, batch selection can be performed from candidate applications based on the autonomous selection of the target, and one or more candidate applications can be selected as the applications to be inspected. Therefore, single and multiple candidate applications can be customized to complete inspection within the same inspection service.
[0056] In other embodiments, the target may further screen the types of candidate applications and select the selected candidate applications as the applications to be inspected. For example, if the storage address of the candidate application is cloud storage or local storage, the target may select the candidate application whose storage address is cloud storage as the application to be inspected.
[0057] Step S120: Obtain inspection configuration information of each application to be inspected.
[0058] In some embodiments, after the application to be inspected is determined, the inspection configuration information can be obtained from the application configuration information of the application to be inspected. Specifically, for each application to be inspected, the address-related information of the application to be inspected can be obtained from the application configuration information of the application to be inspected, and the address-related information of the application to be inspected can be combined to obtain the access address of the application to be inspected as the inspection configuration information of the application to be inspected. The address-related information includes at least one of the type, name, path, port and namespace of the application to be inspected. For example, the application configuration information of the application to be inspected is obtained from the above-mentioned configuration setting template, and service.name / service.namespace / service.port / service.path are extracted and combined to obtain the access address url of the application to be inspected, and saved. The combination logic of the access address url can be: protocol: / / name: namespace.svc.cluster.local:port / path. Among them, protocol: request protocol type (http or https); name: use the service.name name in the configuration setting template; namespace: use the service.namespace name in the configuration setting template; port: use the service.port name in the configuration setting template; path: use the service.path name in the configuration setting template.
[0059] In addition, after the search of the applications to be inspected and their application configuration information in the cluster is completed, the applications to be inspected and their application configuration information can be rendered on the front end of the business system and the application configuration page of each application to be inspected can be displayed, and in response to the configuration operation of the target, the inspection related information of each application to be inspected can be obtained as the inspection configuration information, and the inspection related information includes at least one of the inspection cycle and the inspection type. Among them, the inspection related information can also include the inspection target, inspection name, inspection time, etc., which are not specifically limited here.
[0060] Step S130: Start the inspection service, and use the inspection service to inspect each application to be inspected based on the inspection configuration information.
[0061] After the application to be inspected and its inspection configuration information are determined, the inspection of the application to be inspected may begin. Specifically, refer to step S131 to step S132.
[0062] Step S131: Create a workflow task based on the workflow template and inspection configuration information.
[0063] In some embodiments, based on the advantages of workflow automation, the workflow can be used to automatically control and manage the inspection tasks and progress of each application to be inspected. Specifically, with the start of the inspection task, the cloud platform system can call ApiServer to create a workflow task (based on the workflow template). To ensure that the inspection configuration information can be transmitted and received normally, the identification information of each application to be inspected and the inspection configuration information and configuration item information of each application to be inspected can be rendered to the environment variables of the workflow template, where the workflow template is as follows:
[0064] apiVersion: argoproj.io / v1alpha1
[0065] kind: ClusterWorkflowTemplate
[0066] metadata:
[0067] annotations:
[0068] helm.cloud.com / maximumRecord: '1000'
[0069] helm.cloud.com / maximumRetainDay: '30'
[0070] labels:
[0071] helm.cloud.com / workflowType: inspection-export#Customize inspection name
[0072] name: inspection-export
[0073] spec:
[0074] arguments:
[0075] parameters:
[0076] - name: inspectionProductInfo#Custom inspection configuration parameters
[0077] value:>-
[0078] {"type":"compact","addrs: [{"addr:"serviceName.namespace:port / path","productName":"hdp(instance name)"}]}#Access address url and application name to be inspected
[0079] - name: inspectionId#inspection id
[0080] value: inspectionId
[0081] - name: inspectionUser#Inspection target
[0082] value: dahuacloud
[0083] - name: inspectionPassword#Inspection password ciphertext
[0084] value: swebws1322s332
[0085] - name: intervals
[0086] value: 30s
[0087] - name: file#Inspection report mounting path
[0088] value: / data
[0089] - name: artifactType
[0090] value: application / vnd.dahua.inspection.export.config.v1+json
[0091] - name: image
[0092] value: image.cloud.com / library / 2-default-ns-workflowrecord:workflowrecordUid
[0093] - name: harborUser #Inspection report upload account
[0094] value: admin
[0095] - name: harborPassword#Inspection report upload account password ciphertext
[0096] value: xxxxxxxxxx
[0097] templates:
[0098] - container:
[0099] env:
[0100] - name: inspectionUser
[0101] value: '{{workflow.parameters.inspectionUser}}'
[0102] - name: inspectionPassword
[0103] value: '{{workflow.parameters.inspectionPassword}}'
[0104] image: registry.cloud.com / library / inspection-server:v1.0#Image corresponding to the inspection service
[0105] volumeMounts:
[0106] - mountPath: / data
[0107] name: inspection-export-data-volume
[0108] inputs:#Inspection configuration information environment variable injection
[0109] parameters:
[0110] - name: inspectionUser
[0111] value: '{{workflow.parameters.inspectionUser}}'
[0112] - name: inspectionPassword
[0113] value: '{{workflow.parameters.inspectionPassword}}'
[0114] - name: inspectionProducts
[0115] value: '{{workflow.parameters.inspectionProducts}}'
[0116] - name: intervals
[0117] value: '{{workflow.parameters.intervals}}'
[0118] - name: magiccubeInfo
[0119] value: '{{workflow.parameters.magiccubeInfo}}'
[0120] metadata:
[0121] annotations:
[0122] cloud.com / timezone: 'true'
[0123] workflows.argoproj.io / progress: 0 / 100#Inspection progress record mark
[0124] ops.cloud.com / inspection-result: {}#Inspection result record identifier
[0125] ops.cloud.com / inspection-status: running#Inspection status
[0126] name: inspection-export-workflow-template
[0127] - container:
[0128] image: registry.cloud.com / library / inspection-export:v08.30
[0129] volumeMounts:
[0130] - mountPath: / data
[0131] name: inspection-export-data-volume
[0132] inputs:
[0133] parameters:
[0134] - name: artifactType
[0135] value: application / vnd.dahua.inspection.export.config.v1+json
[0136] - name: image
[0137] value: '{{workflow.parameters.image}}'
[0138] - name: harborUser
[0139] value: '{{workflow.parameters.harborUser}}'
[0140] - name: harborPassword
[0141] value: '{{workflow.parameters.harborPassword}}'
[0142] metadata:
[0143] annotations:
[0144] cloud.com / timezone: 'true'
[0145] workflows.argoproj.io / progress: 0 / 100
[0146] name: push-product-workflow-template.
[0147] After the workflow task is created, the inspection service name defined in the internal image is: registry.cloud.com / library / inspection-server:v1.0, which is the basic image of the inspection service. As the template starts the inspection service, the cloud platform system starts to execute inspection tasks.
[0148] Step S132: execute the workflow task to start the inspection service, and use the inspection service to inspect each application to be inspected based on the inspection configuration information.
[0149] In some embodiments, the workflow task includes an inspection service startup task and an inspection task execution task. In this embodiment, the workflow performs the inspection task, firstly creates an inspection service through the workflow task, and the inspection service controls and manages the inspection tasks of each application to be inspected, wherein the inspection service performs inspections on each application to be inspected in parallel. Specifically, the inspection service startup task can be executed first to start the inspection service, and then the inspection task execution task can be executed so that the inspection service performs inspections on each application to be inspected based on the inspection configuration information.
[0150] In addition, before executing the inspection task, it is necessary to load the environment variables in the workflow task to obtain the identification information of each application to be inspected and extract the inspection configuration information of each application to be inspected, and add it to the running memory.
[0151] In some embodiments, after the inspection service is started through the workflow task, the inspection service can use a multi-threaded method to inspect each application to be inspected in parallel, that is, the inspection service creates a sub-thread for each application to be inspected, so that each application to be inspected can be inspected in its corresponding sub-thread. Therefore, when executing subsequent inspection tasks, the inspection tasks for each application to be inspected can be started sequentially in a multi-threaded manner according to the information in the running memory. And the inspection status of the corresponding application to be inspected is detected in each sub-thread, and the task records of all sub-threads are summarized and updated uniformly to the inspection result label of the workflow task, wherein the inspection result label can be queried by the business side to obtain the inspection status of the application to be inspected. For each sub-thread, when it is detected in the sub-thread that the inspection task meets the inspection end condition and there is an inspection report, the inspection report can be downloaded. Among them, each sub-thread can run the same interval time to perform inspection status detection (call the inspection status interface), and the main thread will also regularly obtain the inspection progress and inspection status of each sub-thread, for example, at intervals of 5s, 10s, 60s, etc.
[0152] Furthermore, in response to the child thread satisfying the inspection end condition, each application to be inspected is triggered to stop the inspection task and exit the child thread. The inspection end condition includes that the inspection report has been downloaded, or the inspection has been completed in the child thread but there is no inspection report.
[0153] In some other embodiments, the workflow task also includes a report upload task. Therefore, after the inspection task is executed, the report upload task may also be executed to upload the inspection report of each application to be inspected.
[0154] In some embodiments, in view of the large differences in the functions of various applications within the cluster (such as different development languages and business backgrounds), for the purpose of unified and standardized design ideas, a set of standard inspection docking specifications are introduced in this embodiment, and the interface provided by the inspection docking specifications is used to send inspection-related requests to each application to be inspected, so that each application to be inspected responds to the inspection-related requests to implement inspection of each application to be inspected, wherein the inspection-related requests include at least one of starting an inspection task, stopping an inspection task, feedback on the inspection status, and feedback on the inspection report.
[0155] Regarding the inspection connection specification: start or stop the inspection of the application to be inspected through the start and stop interface provided by the application to be inspected, and after the application to be inspected starts the inspection, obtain the inspection status of the application to be inspected through the inspection status interface provided by the application to be inspected, and after the application to be inspected completes the inspection, you can also obtain the inspection report of the application to be inspected through the inspection report interface provided by the application to be inspected.
[0156] Among them, the start and stop interface provided by the inspection application can be:
[0157] POST / inspection / [action]?inspectionId={inspectionId}&type={type};
[0158] Action: includes start-start, stop-stop and other actions;
[0159] type: includes compact - basic inspection and complete - complete inspection.
[0160] The inspection status interface provided by the inspection application can be:
[0161] GET / inspection / status?inspectionId={inspectionId}.
[0162] The inspection report interface provided by the inspection application can be:
[0163] GET / inspection / download?inspectionId={inspectionId},
[0164] This interface implements the download of the inspection report, the final product of the inspection application, mainly through binary streaming file download.
[0165] For example, when the inspection-related request includes starting or stopping the inspection task, the inspection service can use the start / stop interface provided by the inspection connection specification to send the inspection start / stop request to the inspection application to be inspected, so that the inspection application to be inspected responds to the inspection start / stop request and starts / stops the inspection task. The inspection start / stop request includes the action to be performed by the inspection application and the inspection type. The action to be performed by the inspection application includes starting or stopping. Figure 2 After the inspection service sends an inspection stop request to the application to be inspected, the cloud platform system backend performs an inspection task query. First, it retrieves the workflow running records according to the inspection id (Identity document, unique code), and then filters the workflow running records from these workflow running records. According to the type of workflow task, for example, it filters out the workflows that have not been stopped yet and records their workflow task types. After that, the cloud platform system backend sends an inspection task stop request. Specifically, after the workflow task receives the inspection task stop request, it updates the workflow template running identifier and forces the inspection status to stop. In the process of managing the application to be inspected, the inspection service detects that the inspection status of the application to be inspected is stop, and then stops the inspection. After the inspection stops normally, the main process exits, and then the workflow also exits normally.
[0166] In addition, the inspection service sends an inspection start request to the application to be inspected according to the access address in the workflow and the name of the application to be inspected. After receiving the inspection start request, the application to be inspected sends feedback information to the inspection service, which indicates that the application to be inspected has received the inspection start request. After the inspection service receives the feedback information, the backend of the cloud platform system sets the inspection status of the application to be inspected to start. In the process of managing the application to be inspected, the inspection service detects that the inspection status of the application to be inspected is start, and then starts the inspection task of the application to be inspected, and the application to be inspected starts to execute the inspection task.
[0167] For example, when the inspection-related request includes feedback on the inspection status, after the application to be inspected starts the inspection task, the inspection service can use the inspection status acquisition interface provided by the inspection docking specification to send a feedback inspection status request to the application to be inspected, so that the application to be inspected responds to the feedback inspection status request to detect the inspection status and feedback the inspection status, wherein the inspection status includes at least one of the inspection progress and the inspection health status.
[0168] For example, when the inspection-related requests include feedback inspection reports, when it is detected that the inspection task meets the inspection end conditions and there is an inspection report, the inspection report acquisition interface provided by the inspection docking specification is used to send a feedback inspection report request to the application to be inspected, so that the application to be inspected responds to the feedback inspection report request and downloads the inspection report and feedbacks the inspection report.
[0169] In some embodiments, for security reasons, the inspection start and stop request also includes verification information, which is used to provide the inspection application for verification, and respond to the inspection start and stop request if the verification is successful. The verification information includes at least one of the account information and the authentication code information. For example, when the inspection service sends the inspection start and stop request to the inspection application, it also carries the account information and the authentication code information. After the inspection application receives the inspection start and stop request, it first performs verification based on the account information and the authentication code information. If the verification is successful, the start and stop interface information will be sent to the inspection service; if the verification is not successful, the start and stop interface information will not be sent, and the inspection task will not be able to be carried out normally.
[0170] In some embodiments, the inspection status includes the inspection progress, and the inspection termination condition includes any one of the following: the inspection progress reaches the target progress, and the execution time of the inspection task reaches the upper limit of the execution time. The method also includes: detecting whether the inspection progress of the inspection task reaches the target progress; in response to the inspection progress reaching the target progress, determining that the inspection task meets the inspection termination condition; in response to the inspection progress not reaching the target progress, detecting whether the execution time of the inspection task reaches the upper limit of the execution time; in response to the execution time of the inspection task reaching the upper limit of the execution time, determining that the inspection task meets the inspection termination condition, and recording the termination reason in the inspection report.
[0171] In some embodiments, the process of using the inspection service to inspect each application to be inspected according to the inspection configuration information includes a process of starting the inspection task of each application to be inspected. Specifically, the process of starting the inspection task of each application to be inspected includes: first connecting to the application to be inspected based on the access address, and if the connection is successful, starting the inspection task of the application to be inspected; if the connection is unsuccessful, reconnecting the application to be inspected until the reconnection parameters meet the task end condition, then ending the inspection task of the application to be inspected, and the parameters include at least one of the duration and the number of times.
[0172] Among them, the parameters include duration and number of times, and the task end condition includes that the reconnection duration is greater than or equal to the preset reconnection duration, or the reconnection duration is less than the preset reconnection duration and the number of reconnections is greater than or equal to the preset reconnection number.
[0173] Furthermore, when the reconnection parameters meet the task termination condition, the termination reason of the inspection task of the application to be inspected is recorded in the inspection report.
[0174] In addition, the inspection task will also periodically check whether all inspection reports in the inspection task have been downloaded successfully. If so, the inspection service main thread will exit, the workflow task execution process will stop, and the inspection report packaging and uploading process in the workflow will be started. After completion, the workflow will terminate and exit normally. At this point, a complete multi-task inspection process ends here.
[0175] In a specific application scenario, this solution is applied to the cloud platform system. First, the backend of the cloud platform system is used to discover and configure the applications in the cluster to be inspected. Figure 3 , use the above configuration setting template to set the configuration information of the application in the cluster, so that the configuration information of the application is more exposed, and then perform the discovery of the application to be inspected in the cluster. Specifically, retrieve the ConfigMap resources under the preset namespace in the cluster, and filter out the applications that carry the "ops.cloud.com / type" type label in the "metadata.labels" in the configuration setting template, and the corresponding value value is the target type value of "inspection" as the candidate application, and then select from the candidate applications in batches according to the autonomous selection of the target, and select one or more candidate applications as the application to be inspected. Then obtain the inspection configuration information. Specifically, obtain the inspection configuration information of each application to be inspected according to the configuration setting template of the application to be inspected. For example, you can obtain the inspection configuration information such as product.name (product type), service.name (service name), service.namespace (namespace to which the service belongs), service.port (service port), service.path (service path prefix), and extract the service.name / service.namespace / service.port / service.path to construct the access address url. After the inspection application and its application configuration information are retrieved in the cluster, the inspection configuration information can be configured. Specifically, the inspection application and its application configuration information can be rendered and the application configuration page of each inspection application can be displayed on the front end of the business system, and the inspection configuration information can be configured on the application configuration page target, which at least includes inspectionType (inspection type), inspectionTime (inspection time), inspectionUser (inspection user), inspectionName (inspection name), inspectionProducts[] (inspection application configuration), etc., and can also include the inspection cycle. Finally, all the inspection configuration information is saved in the running memory.
[0176] After the inspection application and inspection configuration information are configured, prepare to start the inspection task. Figure 4First, query the running memory to obtain the inspection configuration information and multiple application lists corresponding to each application to be inspected. Then, based on the workflow template and the inspection configuration information corresponding to each application to be inspected, create a workflow task, and render the identification information of each application to be inspected and the inspection configuration information and configuration item information of each application to be inspected to the environment variables of the workflow template. After that, create and execute the workflow task, the workflow task starts, and uses the inspection service to inspect each application to be inspected based on the inspection configuration information.
[0177] See also Figure 5 , load the environment variables from the workflow task to obtain the identification information of each application to be inspected and extract the inspection configuration information of each application to be inspected. If the loading fails, the inspection task is terminated. After the loading is successful, the inspection task is initialized, and a separate sub-thread is set for each application to be inspected to perform the inspection task. In the process of starting the inspection task of each application to be inspected, the application to be inspected is first connected based on the access address. If the connection is successful, the inspection task of the application to be inspected is started; if the connection is unsuccessful, the application to be inspected is reconnected. If the reconnection time is greater than or equal to the preset reconnection time, the inspection task of the application to be inspected is terminated. If less than, reconnect and determine whether the number of reconnections is greater than or equal to the preset number of reconnections. If so, the inspection task of the application to be inspected is terminated; if not, reconnect.
[0178] After successfully connecting to the application to be inspected through the access address, the inspection service sends an inspection start and stop request to the application to be inspected through the start and stop interface provided by the inspection docking specification. After receiving the inspection start and stop request, the inspection application verifies it and sends feedback information after verification. After that, the inspection service regularly uses the inspection status acquisition interface provided by the inspection docking specification to send feedback inspection status requests to the application to be inspected. The application to be inspected sends inspection progress information to the inspection service. The inspection service judges whether the inspection progress information sent by the inspection application reaches the target progress of 100%. If not, it detects whether the execution time of the inspection task reaches the upper limit of the execution time. If the execution time of the inspection task reaches the upper limit of the execution time, it determines to end the inspection task of the application to be inspected, and records the end reason in the inspection report. If the inspection progress reaches the target progress, the inspection report can be downloaded, and the inspection of the application to be inspected ends, and the child thread exits. The main thread regularly obtains the inspection progress of all child threads until all child threads exit and their inspection reports are downloaded, then the main thread exits. At this time, the report upload task in the workflow task is triggered. The workflow packages the inspection reports of all applications to be inspected and uploads them to the cloud platform system to facilitate query on the business side. After the inspection report is uploaded, the workflow task ends.
[0179] See also Figure 6 , Figure 6 6 is a schematic diagram of a framework of an embodiment of the patrol device of the present application. The patrol device 600 includes a selection module 610, an acquisition module 620 and a startup module 630. The selection module 610 determines a number of applications to be patrolled for target selection. The acquisition module 620 acquires patrol configuration information of each application to be patrolled. The startup module 630 starts the patrol service and patrols each application to be patrolled based on the patrol configuration information using the patrol service.
[0180] In some embodiments, the selection module 610 performs the step of determining a number of applications to be inspected for target selection, including: identifying candidate applications that meet candidate conditions from applications in the cluster; and selecting a number of applications to be inspected from the candidate applications in response to a target selection operation.
[0181] In some embodiments, the selection module 610 executes candidate conditions including at least one of the following: belonging to a preset namespace, and the application is of a type that allows inspection; and / or, identifying candidate applications that meet the candidate conditions from the applications in the cluster, including: selecting candidate applications that meet the candidate conditions based on application configuration information of each application in the cluster.
[0182] In some embodiments, the selection module 610 executes candidate conditions including belonging to a preset namespace and the application is of a type that allows inspection, each application in the cluster is provided with application configuration information, and the application configuration information includes the namespace to which the application belongs; identifying candidate applications that meet the candidate conditions from each application in the cluster, including: based on the application configuration information of each application, retrieving pending applications in the cluster whose namespace belongs to the preset namespace; from each pending application, screening out candidate applications whose application configuration information has a type tag and the corresponding value of the type tag is a target type value, wherein the target type value represents that the application is of a type that allows inspection.
[0183] In some embodiments, the acquisition module 620 executes the acquisition of inspection configuration information of each application to be inspected, including at least one of the following steps: for each application to be inspected, obtaining address-related information of the application to be inspected from the application configuration information of the application to be inspected, and combining the address-related information of the application to be inspected to obtain the access address of the application to be inspected as the inspection configuration information of the application to be inspected, wherein the address-related information includes at least one of the type, name, path, port and namespace of the application to be inspected; displaying the application configuration page of each application to be inspected, and in response to the configuration operation of the target, obtaining the inspection-related information of each application to be inspected as the inspection configuration information, wherein the inspection-related information includes at least one of the inspection cycle and the inspection type.
[0184] In some embodiments, the startup module 630 executes a process of inspecting each application to be inspected, including: using the interface provided by the inspection docking specification to send inspection-related requests to each application to be inspected, so that each application to be inspected responds to the inspection-related requests to implement the inspection of each application to be inspected, wherein the inspection-related requests include starting an inspection task, stopping an inspection task, feedback on the inspection status, and feedback on the inspection report. At least one of the following.
[0185] In some embodiments, the startup module 630 executes the use of the interface provided by the inspection docking specification to send inspection-related requests to each application to be inspected, so that each application to be inspected responds to the inspection-related requests to implement the inspection of each application to be inspected, including: using the start-stop interface provided by the inspection docking specification to send an inspection start-stop request to the application to be inspected, so that the application to be inspected responds to the inspection start-stop request and executes the start / stop inspection task, wherein the inspection start-stop request includes the action to be executed by the application to be inspected and the inspection type, and the action to be executed by the application to be inspected includes starting or stopping; when the application to be inspected starts the inspection After the task is completed, the inspection status acquisition interface provided by the inspection docking specification is used to send a feedback inspection status request to the application to be inspected, so that the application to be inspected responds to the feedback inspection status request to detect the inspection status and feedback the inspection status, wherein the inspection status includes at least one of the inspection progress and the inspection health status; when it is detected that the inspection task meets the inspection end conditions and there is an inspection report, the inspection report acquisition interface provided by the inspection docking specification is used to send a feedback inspection report request to the application to be inspected, so that the application to be inspected responds to the feedback inspection report request to download the inspection report and feedback the inspection report.
[0186] In some embodiments, the startup module 630 executes the inspection start and stop request including verification information, the verification information is used to provide to the application to be inspected for verification, and responds to the inspection start and stop request if the verification passes, the verification information includes at least one of account information and authentication code information.
[0187] In some embodiments, the startup module 630 executes the inspection service and inspects each application to be inspected in parallel.
[0188] In some embodiments, the startup module 630 executes to start the inspection service, and uses the inspection service to inspect each application to be inspected based on the inspection configuration information, including: creating a workflow task based on the workflow template and the inspection configuration information; executing the workflow task to start the inspection service, and using the inspection service to inspect each application to be inspected based on the inspection configuration information.
[0189] In some embodiments, the startup module 630 executes workflow tasks including inspection service startup tasks and inspection task execution tasks; executes workflow tasks to start the inspection service, and uses the inspection service to inspect each application to be inspected based on the inspection configuration information, including: executing the inspection service startup task to start the inspection service; executing the inspection task execution task so that the inspection service can inspect each application to be inspected based on the inspection configuration information.
[0190] In some embodiments, before executing the inspection task, the startup module 630 also includes: loading the environment variables in the workflow task to obtain the identification information of each application to be inspected and extracting the inspection configuration information of each application to be inspected, and adding it to the running memory; and / or, the inspection service adopts a multi-threaded method to inspect each application to be inspected in parallel; executing the inspection task includes: according to the information in the running memory, sequentially starting the inspection task of each application to be inspected in a multi-threaded manner; performing the inspection status detection of the corresponding application to be inspected in each sub-thread, aggregating the task records of all sub-threads, and uniformly updating them to the workflow task. The inspection result tag can be queried by the business side to obtain the inspection status of the application to be inspected; for each sub-thread, when it is detected in the sub-thread that the inspection task meets the inspection end condition and there is an inspection report, the inspection report is downloaded; in response to the sub-thread meeting the inspection end condition, each application to be inspected is triggered to stop the inspection task and exit the sub-thread, and the inspection end condition includes that the inspection report has been downloaded, or the inspection has been completed in the sub-thread but there is no inspection report; and / or, the workflow task also includes a report upload task; after executing the inspection task, it also includes: executing the report upload task to upload the inspection report of each application to be inspected.
[0191] In some embodiments, the inspection status executed by the startup module 630 includes the inspection progress, and the inspection end condition includes any one of the following: the inspection progress reaches the target progress, and the execution time of the inspection task reaches the upper limit of the execution time; the method also includes: detecting whether the inspection progress of the inspection task reaches the target progress; in response to the inspection progress reaching the target progress, determining that the inspection task meets the inspection end condition; in response to the inspection progress not reaching the target progress, detecting whether the execution time of the inspection task reaches the upper limit of the execution time; in response to the execution time of the inspection task reaching the upper limit of the execution time, determining that the inspection task meets the inspection end condition, and recording the end reason in the inspection report.
[0192] In some embodiments, the process of starting the module 630 to perform inspections on each application to be inspected includes the inspection task startup process of each application to be inspected; the inspection task startup process of each application to be inspected includes: connecting to the application to be inspected based on the access address; in response to a successful connection, starting the inspection task of the application to be inspected; in response to an unsuccessful connection, reconnecting the application to be inspected until the parameters of the reconnection meet the task termination conditions, then terminating the inspection task of the application to be inspected, and the parameters include at least one of duration and number of times.
[0193] In some embodiments, the execution parameters of the startup module 630 include duration and number of times, and the task termination condition includes that the reconnection duration is greater than or equal to the preset reconnection duration, or that the reconnection duration is less than the preset reconnection duration and the number of reconnections is greater than or equal to the preset reconnection number; and / or, the method also includes: when the reconnection parameters meet the task termination conditions, recording the reason for the termination of the inspection task of the application to be inspected in the inspection report.
[0194] During inspection, this application can customize single or multiple applications by the target to complete the inspection within the same inspection service, which greatly reduces the waste of inspection resources to a certain extent, and subsequent maintenance and management are also more convenient, as it only needs to maintain the inspection status of each application within a single inspection service.
[0195] In addition, an abnormality detection mechanism is also introduced in the inspection task of the present application: 1. First, the access address connected to the application to be inspected is detected. When the application to be inspected is not ready or the light is not available in a short time, the scene will wait for the maximum time to make a judgment, and the time support is configurable, which improves the flexibility of the detection scenario to a certain extent; 2. After the inspection task is started, the inspection status of each application to be inspected is obtained. When the progress of the application to be inspected is not updated for a certain period of time (slightly longer interval), but the cloud platform system of the application to be inspected fails internally and continues to inspect after recovery within a certain interval, the inspection status is not updated for a period of time, and a preset reconnection time is added internally. Detection continues within the preset reconnection time, which improves the fault tolerance of the inspection to a certain extent and reduces the time loss caused by repeated inspections due to temporary failures in the middle.
[0196] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0197] See also Figure 7 , Figure 7: is a schematic diagram of a framework of an embodiment of an electronic device 70 of the present application. The electronic device 70 includes a memory 71 and a processor 72 coupled to each other, and the processor 72 is used to execute program instructions stored in the memory 71 to implement the steps in any of the above inspection method embodiments. In a specific implementation scenario, the electronic device 70 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 70 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0198] Specifically, the processor 72 is used to control itself and the memory 71 to implement the steps in any of the above-mentioned inspection method embodiments. The processor 72 can also be called a CPU (Central Processing Unit). The processor 72 may be an integrated circuit chip with signal processing capabilities. The processor 72 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 72 can be implemented by an integrated circuit chip.
[0199] See also Figure 8 , Figure 8 The figure is a schematic diagram of a framework of an embodiment of a computer-readable storage medium 80 of the present application. The computer-readable storage medium 80 stores program instructions 801 that can be executed by a processor, and the program instructions 801 are used to implement the steps in any of the above inspection method embodiments.
[0200] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0201] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0202] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0203] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0204] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
Claims
1. A patrol inspection method, characterized in that: include: Determine several applications to be inspected for target selection; Obtaining inspection configuration information of each of the applications to be inspected; Starting an inspection service, and using the inspection service to inspect each of the applications to be inspected based on the inspection configuration information; Among them, the starting of the inspection service and using the inspection service to inspect each of the applications to be inspected based on the inspection configuration information include: creating a workflow task based on the workflow template and the inspection configuration information; loading the environment variables in the workflow task to obtain the identification information of each application to be inspected and extracting the inspection configuration information of each application to be inspected, and adding it to the running memory to start the inspection service when executing the workflow task; the inspection service sequentially starts the inspection tasks for each application to be inspected in a multi-threaded manner according to the information in the running memory; and performing the corresponding inspection in each sub-thread respectively. The inspection status of the application is detected, and the task records of all sub-threads are summarized and uniformly updated to the inspection result tag of the workflow task, wherein the inspection result tag can be queried by the business side to obtain the inspection status of the application to be inspected; for each sub-thread, when it is detected in the sub-thread that the inspection task meets the inspection end condition and there is an inspection report, the inspection report is downloaded; in response to the sub-thread meeting the inspection end condition, each application to be inspected is triggered to stop the inspection task and exit the sub-thread, and the inspection end condition includes that the inspection report has been downloaded, or the inspection has been completed in the sub-thread but there is no inspection report.
2. The method according to claim 1, characterized in that The several applications to be inspected of the target selection include: Identify candidate applications that meet the candidate condition from among the applications in the cluster; In response to the target selection operation, the plurality of applications to be inspected are selected from the candidate applications.
3. The method according to claim 2, characterized in that The candidate conditions include at least one of the following: belonging to a preset namespace, and the application is of a type that allows inspection; And / or, the candidate condition includes belonging to a preset namespace, and the application is of a type that allows inspection, each application in the cluster is provided with application configuration information, and the application configuration information includes the namespace to which the application belongs; The step of identifying a candidate application that meets the candidate condition from the applications in the cluster includes: Based on the application configuration information of each application, retrieve pending applications in the cluster whose namespace is the preset namespace; From the pending applications, candidate applications are screened out, whose application configuration information carries a type tag and whose corresponding value of the type tag is a target type value, wherein the target type value indicates that the application is of a type that allows inspection.
4. The method according to claim 1, characterized in that: The obtaining of the inspection configuration information of each of the applications to be inspected comprises at least one of the following steps: For each of the applications to be inspected, obtain address-related information of the application to be inspected from the application configuration information of the application to be inspected, and combine the address-related information of the application to be inspected to obtain an access address of the application to be inspected as the inspection configuration information of the application to be inspected, wherein the address-related information includes at least one of the type, name, path, port, and namespace to which the application to be inspected belongs; The application configuration page of each of the applications to be inspected is displayed, and in response to the configuration operation of the target, the inspection related information of each of the applications to be inspected is obtained as the inspection configuration information, wherein the inspection related information includes at least one of an inspection cycle and an inspection type.
5. The method according to claim 1, characterized in that The process of inspecting each of the applications to be inspected includes: Utilize the interface provided by the inspection docking specification to send inspection-related requests to each of the applications to be inspected, so that each of the applications to be inspected responds to the inspection-related requests to implement inspection of each of the applications to be inspected, wherein the inspection-related requests include at least one of starting an inspection task, stopping an inspection task, feeding back an inspection status, and feeding back an inspection report.
6. The method according to claim 5, characterized in that The method of using the interface provided by the inspection connection specification to send an inspection-related request to each of the applications to be inspected, so that each of the applications to be inspected responds to the inspection-related request, thereby implementing inspection of each of the applications to be inspected, includes: Using the start / stop interface provided by the inspection docking specification, a patrol start / stop request is sent to the application to be inspected, so that the application to be inspected responds to the patrol start / stop request and performs a start / stop patrol task, wherein the patrol start / stop request includes an action to be performed by the application to be inspected and a patrol type, and the action to be performed by the application to be inspected includes starting or stopping; After the inspection application starts the inspection task, a request for feedback of the inspection status is sent to the inspection application using the inspection status acquisition interface provided by the inspection docking specification, so that the inspection application detects the inspection status and feeds back the inspection status in response to the inspection status feedback request, wherein the inspection status includes at least one of the inspection progress and the inspection health status; When it is detected that the inspection task meets the inspection end conditions and there is an inspection report, a feedback inspection report request is sent to the application to be inspected using the inspection report acquisition interface provided by the inspection docking specification, so that the application to be inspected responds to the feedback inspection report request and downloads the inspection report and feeds back the inspection report.
7. The method according to claim 1, characterized in that The workflow tasks include inspection service startup tasks and inspection task execution tasks; After creating a workflow task based on the workflow template and the inspection configuration information, the following steps are included: Execute the inspection service startup task to start the inspection service; The inspection task execution task is executed so that the inspection service inspects each of the to-be-inspected applications based on the inspection configuration information.
8. The method according to claim 7, characterized in that The workflow tasks also include a report upload task; After executing the inspection task, the method further includes: The report uploading task is executed to upload the inspection report of each of the applications to be inspected.
9. The method according to claim 6 or 8, characterized in that: The inspection status includes the inspection progress, and the inspection end condition includes any one of the following: the inspection progress reaches the target progress, and the execution time of the inspection task reaches the upper limit of the execution time; The method further comprises: Detecting whether the inspection progress of the inspection task has reached the target progress; In response to the inspection progress reaching the target progress, determining that the inspection task satisfies the inspection end condition; In response to the inspection progress not reaching the target progress, detecting whether the execution time of the inspection task reaches an upper limit of the execution time; In response to the execution time of the inspection task reaching the upper limit of the execution time, it is determined that the inspection task meets the inspection termination condition, and the termination reason is recorded in the inspection report.
10. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the inspection method according to any one of claims 1 to 9.
11. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the inspection method according to any one of claims 1 to 9 is implemented.
