Service operation detection method and device, equipment, storage medium and program product
By obtaining and utilizing detection scripts for service detection tags and asset detection tags, the availability of target assets is detected, which solves the problem that the asset is not available when deploying services and improves the reliability of service operation.
Patent Information
- Application Number
- CN202411825024.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-05-02
AI Technical Summary
When deploying a service asset, it is impossible to intuitively determine whether the deployment asset that the service depends on is available, resulting in abnormal service operation and reducing the reliability of service operation.
Provide a service operation detection method, by obtaining the service detection tag set associated with the target service and the asset detection tag set of the target assets that deploy the target services, using the detection script in the detection tag to detect the target assets, obtain the operation detection results of the target services.
Before the target service is running, exceptions in the target asset can be detected, ensuring the reliability of the target service running on the target asset.
Smart Images

Figure CN119917393A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a service operation detection method, device, equipment, storage medium and program product. Background Art
[0002] With the continuous development of the computer field, in order to run the services in the operating system normally, the services need to be deployed on the corresponding deployment assets / asset sets, and then the services are run based on the deployment assets / asset sets.
[0003] However, when deploying services on assets, it is not possible to intuitively determine whether the deployed assets / asset collections that the services depend on are available. Therefore, problems such as service operation anomalies are likely to occur after the services are run, reducing the reliability of service operation. Summary of the invention
[0004] Based on this, it is necessary to provide a service operation detection method, device, equipment, storage medium and program product that can improve the reliability of service operation in response to the above technical problems.
[0005] In a first aspect, the present application provides a service operation detection method, comprising:
[0006] In response to a run detection request for a target service, a service detection tag set associated with the target service and an asset detection tag set of a target asset for deploying the target service are obtained; wherein the service detection tags in the service detection tag set and the asset detection tags in the asset detection tag set both contain detection scripts for performing availability detection on the assets;
[0007] According to the service detection tag set and the asset detection tag set, the target asset is tested for availability to obtain the operation detection result of the target service.
[0008] In the embodiment of the present application, by using the detection script in the detection tag to perform availability detection on the target asset, it is possible to detect anomalies in the target asset before the target service runs, thereby ensuring the reliability of the target service running on the target asset.
[0009] In one embodiment, the availability detection is performed on the target asset according to the service detection tag set and the asset detection tag set to obtain the operation detection result of the target service, including:
[0010] Determine whether the asset detection tag set completely contains the service detection tag set; if not, use the service detection tag set to update the asset detection tag set of the target asset; use the updated asset detection tag set to perform availability detection on the target asset to obtain the operation detection result of the target service.
[0011] In the embodiment of the present application, by determining whether the asset detection tag set completely includes the service detection tag set, it is possible to ensure that the updated asset detection tag set complies with the restrictions of the service detection tag set, thereby ensuring the comprehensiveness of the availability detection performed on the target asset.
[0012] In one embodiment, when at least two target assets are included, the service detection tag set is used to update the asset detection tag set of the target asset, including:
[0013] From the service detection tag set, select a service detection tag that is not included in the asset detection tag set as the detection tag to be assigned; according to the asset detection type corresponding to the detection tag to be assigned and the asset attribute information of each target asset, add the detection tag to be assigned to the asset detection tag set of the corresponding target asset.
[0014] In the embodiment of the present application, by updating the asset detection tag set of each target asset according to the asset detection type corresponding to the detection tag to be assigned and the asset attribute information of each target asset, the rationality of the update of the asset detection tag set can be ensured.
[0015] In one embodiment, the updated asset detection tag set is used to perform availability detection on the target asset to obtain the operation detection result of the target service, including:
[0016] For each asset detection tag in the updated asset detection tag set, run the detection script in the asset detection tag on the target asset to obtain the asset detection result corresponding to the asset detection tag; determine the running detection result of the target service based on the asset detection results corresponding to each asset detection tag in the updated asset detection tag set.
[0017] In the embodiment of the present application, the detection script of each asset detection tag in the updated asset detection tag set is run on the target asset to determine the operation detection result of the target service, thereby ensuring the accuracy of the detection result.
[0018] In one embodiment, the method further comprises:
[0019] When the asset detection tag set completely includes the service detection tag set, the asset detection tag set is used to perform availability detection on the target asset to obtain the operation detection result of the target service.
[0020] In the embodiment of the present application, when the asset detection tag set completely includes the service detection tag set, the asset detection tag set is directly used to perform availability detection on the target asset, thereby ensuring the efficiency of the operation detection.
[0021] In one embodiment, the method further comprises:
[0022] Selecting an asset detection tag set from candidate detection tags according to historical tag configuration records and asset configuration information of the target asset;
[0023] A service detection label set is selected from candidate detection labels according to historical label configuration records, the service type of the target service, and the asset configuration information of the target asset.
[0024] In an embodiment of the present application, by selecting an asset detection tag set based on historical tag configuration records and asset configuration information, and selecting a service detection tag set based on historical tag configuration records, service type and asset configuration information, the reliability of detection tag selection can be ensured.
[0025] In a second aspect, the present application also provides a service operation detection device, including:
[0026] A tag acquisition module is used to respond to a running detection request for a target service, obtain a service detection tag set associated with the target service, and an asset detection tag set of a target asset for deploying the target service; wherein the service detection tags in the service detection tag set and the asset detection tags in the asset detection tag set both contain detection scripts for performing availability detection on the assets;
[0027] The operation detection module is used to perform availability detection on the target asset according to the service detection tag set and the asset detection tag set to obtain the operation detection result of the target service.
[0028] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0029] In response to a run detection request for a target service, a service detection tag set associated with the target service and an asset detection tag set of a target asset for deploying the target service are obtained; wherein the service detection tags in the service detection tag set and the asset detection tags in the asset detection tag set both contain detection scripts for performing availability detection on the assets;
[0030] According to the service detection tag set and the asset detection tag set, the target asset is tested for availability to obtain the operation detection result of the target service.
[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0032] In response to a run detection request for a target service, a service detection tag set associated with the target service and an asset detection tag set of a target asset for deploying the target service are obtained; wherein the service detection tags in the service detection tag set and the asset detection tags in the asset detection tag set both contain detection scripts for performing availability detection on the assets;
[0033] According to the service detection tag set and the asset detection tag set, the target asset is tested for availability to obtain the operation detection result of the target service.
[0034] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0035] In response to a run detection request for a target service, a service detection tag set associated with the target service and an asset detection tag set of a target asset for deploying the target service are obtained; wherein the service detection tags in the service detection tag set and the asset detection tags in the asset detection tag set both contain detection scripts for performing availability detection on the assets;
[0036] According to the service detection tag set and the asset detection tag set, the target asset is tested for availability to obtain the operation detection result of the target service.
[0037] The above-mentioned service operation detection method, device, equipment, storage medium and program product obtain the service detection tag set associated with the target service and the asset detection tag set of the target asset where the target service is deployed by responding to the operation detection request for the target service, and then perform availability detection on the target asset according to the service detection tag set containing the detection script for performing availability detection on the asset and the asset detection tag set containing the detection script for performing availability detection on the asset, and obtain the operation detection result of the target service. Compared with the related art, which can only perform availability check on the asset after an abnormality occurs in the service operation, the above-mentioned method uses the detection script in the detection tag to perform availability detection on the target asset, so that the abnormality existing in the target asset can be detected before the target service is operated, thereby ensuring the reliability of the operation of the target service on the target asset. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A schematic diagram of a flow chart of a service operation detection method in an embodiment;
[0040] Figure 2 A schematic diagram of a process for updating an asset detection tag set in one embodiment;
[0041] Figure 3 A schematic diagram of a process for configuring a detection tag in one embodiment;
[0042] Figure 4 An asset tag configuration interface in one embodiment;
[0043] Figure 5 A service tag configuration interface in one embodiment;
[0044] Figure 6 An asset collection configuration interface in one embodiment;
[0045] Figure 7 A schematic diagram of an operation detection in an embodiment;
[0046] Figure 8 A schematic diagram of a flow chart of a service operation detection method in another embodiment;
[0047] Fig. 9 It is a structural block diagram of a service operation detection device in one embodiment;
[0048] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] With the continuous development of the computer field, in order to run the services in the operating system normally, the services need to be deployed on the corresponding deployment assets / asset sets, and then the services are run based on the deployment assets / asset sets.
[0051] However, when deploying services on assets, it is not possible to intuitively determine whether the deployed assets / asset collections that the services depend on are available. Therefore, problems such as service operation anomalies are likely to occur after the services are run, reducing the reliability of service operation.
[0052] Based on this, in an exemplary embodiment, Figure 1 As shown, a service operation detection method is provided, which is described by taking the application of the method to the management end as an example, and specifically includes the following steps:
[0053] S101, in response to a running detection request for a target service, obtaining a service detection tag set associated with the target service and an asset detection tag set of a target asset for deploying the target service.
[0054] Among them, the so-called operation detection request is a request to instruct the management end to perform a pre-service operation detection; the so-called target service is a computer service with detection requirements; the so-called target asset is the medium used to deploy the target service, such as servers and containers; further, the target asset can be a single asset or an asset cluster, and this application does not impose any restrictions on this.
[0055] The service detection tags in the service detection tag set and the asset detection tags in the asset detection tag set both contain detection scripts for asset availability detection. For example, the detection tag may include tag identification information and a detection script, and the tag identification information may include a detection service name and a version number, and the detection service name and version number are both 32-bit strings. The detection service may include detections in multiple dimensions, and this application does not limit this.
[0056] It can be understood that both service detection tags and asset detection tags are essentially detection tags, except that service detection tags are detection tags that must be run on the target asset before executing the target service, while asset detection tags are detection tags that are run on the associated target asset.
[0057] After the target service is deployed on the target asset, the management end can display the operation detection interface to the user through the terminal; accordingly, the user can select the target service from the operation detection interface and click the detection button to send a operation detection request for the target service to the management end. Alternatively, in order to ensure the timeliness of the detection request, after the target service is deployed on the target asset, the management end will automatically generate an operation detection request for the target service.
[0058] In an optional manner, after detecting a run detection request for a target service, the service identifier of the target service may be used as index information to query the correspondence between each candidate service and each service detection tag set to obtain a service detection tag set associated with the target service.
[0059] In addition, the target asset for deploying the target service can be determined from the configuration information of the target service; then, the asset identifier of the target asset can be used as index information to query the correspondence between each candidate asset and each asset detection tag set to obtain the asset detection tag set associated with the target asset.
[0060] S102, performing availability detection on the target asset according to the service detection tag set and the asset detection tag set, and obtaining an operation detection result of the target service.
[0061] The so-called operation detection result is used to indicate whether the target service can run normally on the target asset.
[0062] In an optional manner, after determining the service detection tag set and the asset detection tag set, the detection tag to be run on the target asset can be determined based on the service detection tag set and the asset detection tag set. For example, the service detection tag set and the asset detection tag set can be combined, and the detection tag in the combined set can be used as the asset detection tag to be run on the target asset.
[0063] For example, service A is deployed on asset A', the service detection tag set includes service detection tags A1, A2 and A4, and the asset detection tag set includes asset detection tags A1, A2 and A3. At this time, the union of the service detection tag set and the asset detection tag set is A1, A2, A3 and A4, that is, A1, A2, A3 and A4 can be used as asset detection tags of asset A' at the same time.
[0064] Furthermore, an asset detection tag can be issued to the target asset. For each asset detection tag, the availability of the target asset can be tested by running the detection script in the asset detection tag on the target asset to obtain the asset detection result corresponding to the asset detection tag; then, the operation detection result of the target service is determined based on the asset detection results corresponding to each asset detection tag.
[0065] Exemplarily, if the asset detection results corresponding to each asset detection tag are all assets available, then the operation detection result of the target service is determined to be that the service is operational; if there is at least one asset detection tag whose asset detection result is that the asset is unavailable, then the operation detection result of the target service is determined to be that the service is not operational.
[0066] After the operation detection result is determined, the operation detection result can be displayed through the operation detection interface on the terminal, so as to prompt the user of the unavailability of the target asset when the target service cannot be operated, so as to facilitate the user to carry out targeted processing.
[0067] For example, the detection results corresponding to each detection tag can be displayed in the operation detection interface, wherein the detection tag whose detection result is that the service can be run is associated with a green "true" mark; and the detection tag whose detection result is that the service cannot be run is associated with a gray "false" mark.
[0068] In the above service operation detection method, by responding to the operation detection request for the target service, the service detection tag set associated with the target service and the asset detection tag set of the target asset where the target service is deployed are obtained, and then the target asset is tested for availability according to the service detection tag set containing the detection script for the asset availability detection and the asset detection tag set containing the detection script for the asset availability detection, and the operation detection result of the target service is obtained. Compared with the related art, in which the asset can only be checked for availability after an abnormality occurs in the service operation, the above method uses the detection script in the detection tag to perform availability detection on the target asset, so that the abnormality in the target asset can be detected before the target service is operated, thereby ensuring the reliability of the operation of the target service on the target asset.
[0069] It can be understood that since the service detection tag is a detection tag that must be run on the target asset before executing the target service, in order to ensure the comprehensiveness of the availability detection performed on the target asset, based on the above embodiment, in the embodiment of the present application, an optional method for determining the detection result is provided, which specifically includes the following steps:
[0070] Determine whether the asset detection tag set completely contains the service detection tag set; if not, use the service detection tag set to update the asset detection tag set of the target asset; use the updated asset detection tag set to perform availability detection on the target asset to obtain the operation detection result of the target service.
[0071] In actual use, the service detection tag cannot directly perform availability detection on the target asset. Instead, it serves as a restriction to ensure that the service detection tag must be configured on the target asset as an asset detection tag before executing the target service.
[0072] Based on this, each service detection tag in the service detection tag can be compared with each asset detection tag in the asset detection tag set one by one to determine whether the asset detection tag set completely contains the service detection tag set.
[0073] When the asset detection tag set does not completely include the service detection tag set, it is necessary to use the service detection tags in the service detection tag set that are not included in the asset detection tag set to update the asset detection tag set to obtain an updated asset detection tag set.
[0074] In an optional implementation, a service detection tag that is not included in the asset detection tag set may be directly used as an asset detection tag and added to the asset detection tag set to obtain an updated asset detection tag set.
[0075] In another optional implementation, a service detection tag not included in the asset detection tag set may be used as a candidate asset detection tag; then, the similarity between the candidate asset detection tag and each asset detection tag in the asset detection tag set is determined. Exemplarily, the similarity between tag identification information may be used as the similarity between the candidate asset detection tag and the asset detection tag.
[0076] When it is determined that there is an asset detection tag whose similarity with the candidate asset detection tag is greater than the similarity threshold, it is proved that the asset detection tag can realize the detection function of the candidate asset detection tag. Therefore, the asset detection tag set of the target asset does not need to be updated at this time.
[0077] When the similarity between each asset detection tag and the candidate asset detection tag is less than or equal to the similarity threshold, it proves that each asset detection tag cannot realize the detection function of the candidate asset detection tag. Therefore, at this time, it is necessary to add the candidate asset detection tag to the asset detection tag set to obtain an updated asset detection tag set.
[0078] By using the updated asset detection tags to collect each asset detection tag and perform availability detection on the target assets one by one, the operation detection result of the target service can be obtained.
[0079] Furthermore, in the case where the asset detection tag set completely includes the service detection tag set, the asset detection tag set is used to perform availability detection on the target asset to obtain the operation detection result of the target service.
[0080] It can be understood that when the asset detection tag set completely contains the service detection tag set, it proves that the service detection tag set meets the restrictions of the asset detection tag set. At this time, the asset detection tags in the asset detection tag set can be directly used to perform availability detection on the target assets to obtain the operation detection results of the target service.
[0081] For example, service B is deployed on asset B', the service detection tag set includes service detection tags B1 and B2, and the asset detection tag set includes asset detection tags B1, B2 and B3. At this time, the asset detection tag set completely contains the service detection tag set, that is, the asset detection tags B1, B2 and B3 can be run directly on asset B'.
[0082] In the embodiment of the present application, by determining whether the asset detection tag set completely includes the service detection tag set, it is possible to ensure that the updated asset detection tag set complies with the restrictions of the service detection tag set, thereby ensuring the comprehensiveness of the availability detection performed on the target asset.
[0083] In order to ensure the rationality of updating the asset detection tag set, based on the above embodiment, in the embodiment of the present application, in the case of including at least two target assets, an optional method for updating the asset detection tag set is provided, such as Figure 2 As shown, the specific steps include:
[0084] S201, selecting a service detection tag that is not included in the asset detection tag set from the service detection tag set as the detection tag to be allocated.
[0085] The so-called detection tags to be allocated are service detection tags that are not included in the asset detection tag set.
[0086] In an optional implementation, for each service detection tag in the service detection tag set, the tag identification information of the service detection tag may be used as an index to query each asset detection tag in the asset detection tag set to obtain a query result.
[0087] When the query result shows that there is an asset detection tag whose tag identification information is consistent with the tag identification information of the service detection tag, it is determined that the service detection tag is included in the asset detection tag set; when the query result shows that the tag identification information of each asset detection tag is inconsistent with the tag identification information of the service detection tag, it is determined that the service detection tag is not included in the asset detection tag set. At this time, the service detection tag can be used as the detection tag to be allocated.
[0088] S202: According to the asset detection type corresponding to the detection tag to be allocated and the asset attribute information of each target asset, the detection tag to be allocated is added to the asset detection tag set of the corresponding target asset.
[0089] The so-called asset detection type is used to characterize the type of asset that can be detected by the detection tag to be assigned; the so-called asset attribute information is used to characterize the basic attributes of the asset.
[0090] It can be understood that in order to ensure the rationality of label allocation, after determining the detection label to be allocated, for each detection label to be allocated, the target asset corresponding to the detection label to be allocated can be selected from each target asset based on the asset detection type corresponding to the detection label to be allocated and the adaptability between the asset attribute information of each target asset, and the detection label to be allocated can be added to the asset detection label set of the corresponding target asset.
[0091] In the embodiment of the present application, by updating the asset detection tag set of each target asset according to the asset detection type corresponding to the detection tag to be assigned and the asset attribute information of each target asset, the rationality of the update of the asset detection tag set can be ensured.
[0092] In order to ensure the accuracy of the operation detection results, based on the above embodiments, in the embodiments of the present application, another optional method of determining the detection results is provided. Specifically, for each asset detection tag in the updated asset detection tag set, the detection script in the asset detection tag is run on the target asset to obtain the asset detection result corresponding to the asset detection tag; based on the asset detection results corresponding to each asset detection tag in the updated asset detection tag set, the operation detection result of the target service is determined.
[0093] In one possible implementation, for each asset detection tag in the updated asset detection tag set, the detection script in the asset detection tag can be run on the target asset, and the detection data generated when running the detection script can be obtained in real time to determine the asset detection result corresponding to the asset detection tag.
[0094] After determining the asset detection results corresponding to each asset detection tag in the updated asset detection tag set, if there is at least one asset detection tag whose asset detection result is that the asset is unavailable, then the operation detection result of the target service is determined to be that the service cannot be operated; if the asset detection results corresponding to each asset detection tag are all that the assets are available, then the operation detection result of the target service is determined to be that the service can be operated.
[0095] In the embodiment of the present application, the detection script of each asset detection tag in the updated asset detection tag set is run on the target asset to determine the operation detection result of the target service, thereby ensuring the accuracy of the detection result.
[0096] In order to ensure the rationality of the detection tag configuration, based on the above embodiments, in the embodiments of the present application, an optional method for configuring the detection tag is provided, such as Figure 3 As shown, the specific steps include:
[0097] S301, selecting an asset detection tag set from candidate detection tags according to historical tag configuration records and asset configuration information of the target asset.
[0098] Among them, the so-called historical tag configuration record is the configuration record of the asset detection tag of each asset and / or the configuration record of the service detection tag of each service within the historical period; the so-called asset configuration information is used to represent the basic configuration information of the asset, such as the asset type, etc.; the so-called candidate detection tag is used to represent the pre-configured selectable detection tag.
[0099] In order to ensure the efficiency of tag configuration, candidate detection tags that can perform asset availability detection in various dimensions for various types of assets can be pre-configured.
[0100] In an optional implementation, the asset identifier of the target asset can be used as an index to query the historical tag configuration record to determine whether there is a configuration record for the target asset in the historical period. If so, the detection tag included in the historical tag configuration record of the target asset is extracted as the first reference detection tag.
[0101] According to the asset configuration information of the target asset, a detection tag adapted to the target asset is selected from the candidate detection tags as the second reference detection tag. Subsequently, an asset detection tag set is generated based on the first reference detection tag and the second reference detection tag. Exemplarily, the first reference detection tag and the second reference detection tag can be used as the asset detection tags of the target asset at the same time to generate the asset detection tag set.
[0102] In another optional implementation, the candidate detection tags may be displayed to the user through an asset tag configuration interface, and the user may select an asset detection tag set from the candidate detection tags based on historical tag configuration records and asset configuration information of the target asset.
[0103] For example, refer to Figure 4 The asset label configuration interface shown in the figure contains various asset configuration items. For the asset "X86-server1", when it is detected that the user clicks the control "label1" or "label2", various candidate detection labels are displayed to the user, among which the configurable candidate detection labels can be displayed first according to the historical label configuration record and asset configuration information of "X86-server1".
[0104] After detecting a user's click operation on any candidate detection label, the display information in the control "label1" or "label2" can be replaced with the label identification information of the detection label, and the operation of configuring the asset detection label for "X86-server1" can be completed.
[0105] Continue to refer Figure 4 In the asset tag configuration interface shown, the asset detection tags configured for the asset "X86-docker-20" include "Container:v1" and "Server:11.10.1"; the asset detection tags configured for the asset "X86-kubenetes-dev" include "Sshd:3.9" and "Server:11.10.1".
[0106] S302 : Select a service detection tag set from candidate detection tags according to historical tag configuration records, the service type of the target service, and the asset configuration information of the target asset.
[0107] Among them, the so-called service type is used to characterize the type of service, for example, artificial intelligence AI service, etc.
[0108] In an optional implementation, the service identifier of the target service can be used as an index to query the historical tag configuration record to determine whether there is a configuration record for the target service in the historical period. If so, the detection tag contained in the historical tag configuration record of the target service is extracted as the third reference detection tag.
[0109] According to the service type of the target service and the asset configuration information of the target asset where the target service is located, a detection tag that must be run before running the target service is selected from the candidate detection tags as the fourth reference detection tag. Subsequently, a service detection tag set is generated based on the third reference detection tag and the fourth reference detection tag. Exemplarily, the third reference detection tag and the fourth reference detection tag can be used as the service detection tags of the target service at the same time to generate the service detection tag set.
[0110] In another optional implementation, the candidate detection tags can be displayed to the user through the service tag configuration interface, and the user can select a service detection tag set from the candidate detection tags based on historical tag configuration records, the service type of the target service, and the asset configuration information of the target asset.
[0111] For example, refer to Figure 5 The service label configuration interface shown in the figure contains various service configuration items. For the service "AI service-face recognition", when it is detected that the user clicks the control "label1" or "label2", the candidate detection labels are displayed to the user, among which the configurable candidate detection labels can be displayed first based on the historical label configuration record of "AI service-face recognition", the service type "AI service", and the asset configuration information of the asset "X86-docker-20" where "AI service-face recognition" is located.
[0112] After detecting a user's click operation on any candidate detection label, the display information in the control "label1" or "label2" can be replaced with the label identification information of the detection label. At this time, the operation of configuring the service detection label for "AI Service-Face Recognition" can be completed.
[0113] Furthermore, you can click the "Detect" control in the operation column to start the running detection operation for "AI Service-Face Recognition", and display the running detection results of "AI Service-Face Recognition" in the running detection result column.
[0114] Continue to refer Figure 5In the service label configuration interface shown, the service detection labels configured for the service "AI Service-Inference" include "Container:v1" and "Server:11.10.1", and "AI Service-Inference" is deployed in the asset collection "cluster162".
[0115] For further configuration of asset collection, refer to Figure 6 In the asset collection configuration interface shown, for the asset collection "cluster12", after detecting a click on the control "Asset 1" or "Asset 2", the candidate assets can be displayed to the user for the user to add; optionally, after detecting a click operation on any candidate asset, the displayed information in the control "Asset 1" or "Asset 2" can be replaced with the asset information of the candidate asset, and the operation of configuring assets for the asset collection "cluster12" can be completed.
[0116] Continue to refer Figure 6 In the asset collection configuration interface shown, the assets configured for the asset collection "cluster182" include "X86-docker-20" and "X86-server1"; the assets configured for the asset collection "cluster162" include "xx-bb-cc"; and the assets configured for the asset collection "cluster122" include "X86-server3".
[0117] In an embodiment of the present application, by selecting an asset detection tag set based on historical tag configuration records and asset configuration information, and selecting a service detection tag set based on historical tag configuration records, service type and asset configuration information, the reliability of detection tag selection can be ensured.
[0118] Based on the above embodiments, in the embodiments of the present application, a method for detecting the operation of a target service is provided. Figure 7 In the running detection diagram shown, the services in the management end are deployed on multiple assets (ie, asset 1, asset 2, and asset 3) at the same time, and a collector for collecting detection information is downloaded in each asset.
[0119] Referring to the above steps, after defining the service detection tag of the service and the asset detection tag of the asset in the management end, you can send an availability detection event containing the asset detection tag corresponding to each asset and the availability check time to the collector in each asset through the message queue.
[0120] For each asset, after the collector in the asset obtains the asset detection tag and availability check time, it can run the detection script in the asset detection tag on the asset when the availability check time arrives; then, the collector collects the asset information of the asset and the availability detection results generated when the detection script is run on the asset, and generates the detection results based on the asset information and the availability detection results, and sends them to the message queue.
[0121] The management end obtains the test results sent by each asset through the message queue, and can determine the operation test results of the service.
[0122] In the embodiment of the present application, message exchange between the management end and each asset is achieved through a message queue, which can ensure the reliability of information exchange.
[0123] Figure 8 FIG. 2 is a flow chart of a service operation detection method in another embodiment. Based on the above embodiment, this embodiment provides an optional example of a service operation detection method. Figure 8 The specific implementation process is as follows:
[0124] S801, selecting an asset detection tag set for each target asset from candidate detection tags according to historical tag configuration records and asset configuration information of the target asset.
[0125] Among them, the service detection tag in the service detection tag set and the asset detection tag in the asset detection tag set both contain detection scripts for performing availability detection on assets.
[0126] S802 , selecting a service detection tag set of the target service from candidate detection tags according to historical tag configuration records, the service type of the target service, and the asset configuration information of the target asset.
[0127] S803, determine whether each asset detection tag set completely contains the service detection tag set, if so, execute S804; if not, execute.
[0128] S804, using the detection script of each asset detection tag in each asset detection tag set, respectively perform availability detection on the corresponding target assets to obtain the operation detection result of the target service.
[0129] S805: Select, from the service detection tag set, a service detection tag that is not included in any of the asset detection tag sets as the detection tag to be allocated.
[0130] S806: According to the asset detection type corresponding to the detection tag to be allocated and the asset attribute information of each target asset, the detection tag to be allocated is added to the asset detection tag set of the corresponding target asset.
[0131] S807, running the detection script of each asset detection tag in the updated asset detection tag set on each target asset to obtain the asset detection result corresponding to each asset detection tag.
[0132] S808, determining the operation detection result of the target service according to the asset detection result corresponding to each asset detection tag in the updated asset detection tag set.
[0133] The specific process of S801-S808 above can refer to the description of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0134] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0135] Based on the same inventive concept, the embodiment of the present application also provides a service operation detection device for implementing the service operation detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more service operation detection device embodiments provided below can refer to the limitations of the service operation detection method above, and will not be repeated here.
[0136] In an exemplary embodiment, Fig. 9 As shown, a service operation detection device 1 is provided, comprising: a tag acquisition module 10 and an operation detection module 20, wherein:
[0137] The tag acquisition module 10 is used to respond to the operation detection request for the target service, obtain the service detection tag set associated with the target service, and the asset detection tag set of the target asset where the target service is deployed; wherein the service detection tag in the service detection tag set and the asset detection tag in the asset detection tag set both contain detection scripts for performing availability detection on the assets;
[0138] The operation detection module 20 is used to perform availability detection on the target asset according to the service detection tag set and the asset detection tag set to obtain the operation detection result of the target service.
[0139] In an exemplary embodiment, the operation detection module 20 includes:
[0140] A judging unit, used to judge whether the asset detection tag set completely contains the service detection tag set;
[0141] an updating unit, for, if not, updating the asset detection tag set of the target asset using the service detection tag set;
[0142] The first detection unit is used to use the updated asset detection tag set to perform availability detection on the target asset to obtain an operation detection result of the target service.
[0143] In an exemplary embodiment, when at least two target assets are included, the updating unit is specifically configured to:
[0144] From the service detection tag set, select a service detection tag that is not included in the asset detection tag set as the detection tag to be assigned; according to the asset detection type corresponding to the detection tag to be assigned and the asset attribute information of each target asset, add the detection tag to be assigned to the asset detection tag set of the corresponding target asset.
[0145] In an exemplary embodiment, the first detection unit is specifically configured to:
[0146] For each asset detection tag in the updated asset detection tag set, run the detection script in the asset detection tag on the target asset to obtain the asset detection result corresponding to the asset detection tag; determine the running detection result of the target service based on the asset detection results corresponding to each asset detection tag in the updated asset detection tag set.
[0147] In an exemplary embodiment, the operation detection module 20 further includes:
[0148] The second detection unit is used to use the asset detection tag set to perform availability detection on the target asset and obtain the operation detection result of the target service when the asset detection tag set completely includes the service detection tag set.
[0149] In an exemplary embodiment, the service operation detection device 1 further includes a label configuration module, wherein the label configuration module is specifically used to:
[0150] According to the historical tag configuration records and the asset configuration information of the target asset, an asset detection tag set is selected from the candidate detection tags; according to the historical tag configuration records, the service type of the target service and the asset configuration information of the target asset, a service detection tag set is selected from the candidate detection tags.
[0151] Each module in the above service operation detection device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0152] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as historical tag configuration records. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a service operation detection method is implemented.
[0153] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0154] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0155] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0156] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0157] It should be noted that the data involved in this application (including but not limited to historical tag configuration records, etc.) are all data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0158] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0159] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0160] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A service operation detection method, characterized in that: The method comprises: In response to a run detection request for a target service, a service detection tag set associated with the target service and an asset detection tag set of a target asset on which the target service is deployed are obtained; wherein both the service detection tags in the service detection tag set and the asset detection tags in the asset detection tag set contain detection scripts for performing availability detection on assets; According to the service detection tag set and the asset detection tag set, the target asset is subjected to availability detection to obtain an operation detection result of the target service.
2. The method according to claim 1, characterized in that: The performing availability detection on the target asset according to the service detection tag set and the asset detection tag set to obtain the operation detection result of the target service includes: Determining whether the asset detection tag set completely includes the service detection tag set; If not, then using the service detection tag set to update the asset detection tag set of the target asset; The updated asset detection tag set is used to perform availability detection on the target asset to obtain an operation detection result of the target service.
3. The method according to claim 2, characterized in that In the case where at least two target assets are included, the using the service detection tag set to update the asset detection tag set of the target asset includes: Selecting, from the service detection tag set, a service detection tag not included in the asset detection tag set as the detection tag to be allocated; According to the asset detection type corresponding to the detection tag to be allocated and the asset attribute information of each target asset, the detection tag to be allocated is added to the asset detection tag set of the corresponding target asset.
4. The method according to claim 2, characterized in that: The updated asset detection tag set is used to perform availability detection on the target asset to obtain the operation detection result of the target service, including: For each asset detection tag in the updated asset detection tag set, running the detection script in the asset detection tag on the target asset to obtain the asset detection result corresponding to the asset detection tag; The operation detection result of the target service is determined according to the asset detection result corresponding to each asset detection tag in the updated asset detection tag set.
5. The method according to claim 2, characterized in that: The method further comprises: In the case that the asset detection tag set completely includes the service detection tag set, the asset detection tag set is used to perform availability detection on the target asset to obtain the operation detection result of the target service.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Selecting the asset detection tag set from candidate detection tags according to the historical tag configuration record and the asset configuration information of the target asset; The service detection tag set is selected from candidate detection tags according to the historical tag configuration record, the service type of the target service, and the asset configuration information of the target asset.
7. A service operation detection device, characterized in that: The device comprises: A tag acquisition module, configured to respond to a run detection request for a target service, acquire a service detection tag set associated with the target service, and an asset detection tag set of a target asset on which the target service is deployed; wherein both the service detection tags in the service detection tag set and the asset detection tags in the asset detection tag set contain detection scripts for performing availability detection on assets; The operation detection module is used to perform availability detection on the target asset according to the service detection tag set and the asset detection tag set to obtain the operation detection result of the target service.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.