Methods, apparatus, storage media and electronic devices for handling service conflicts
By acquiring the status information of AI cluster nodes and using pre-trained models to automatically determine processing operations, the problem of low processing efficiency for AI cluster service conflicts is solved, and automated repair is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2026-04-03
Smart Images

Figure CN116723085B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, storage medium, and electronic device for handling service conflicts. Background Technology
[0002] With technological advancements, the demand for AI platforms in deep learning and resource scheduling management is increasing, and the number of platform deployments has also risen by an order of magnitude. Therefore, the stable operation and maintenance of these platforms is crucial. However, user errors frequently lead to the deployment of conflicting service components within the cluster, potentially causing anomalies in the underlying AI cluster services. Furthermore, in such cases, automatic recovery is often impossible, resulting in a significant overall impact. Current technologies require manual troubleshooting and recovery when conflicting service components exist on the underlying cluster servers, primarily relying on the platform's problem-solving manual. Automatic analysis, location, and repair of conflicting components are not possible. The problems with manual conflict resolution include high manpower consumption, uncontrollable time commitment, low efficiency, and potential inaccuracies in problem location and repair due to the experience and technical limitations of maintenance personnel. Clearly, current technologies suffer from low efficiency in handling service conflicts.
[0003] There is currently no effective solution to the technical problem of low efficiency in handling service conflicts in related technologies. Summary of the Invention
[0004] This application provides a method, apparatus, storage medium, and electronic device for handling service conflicts, in order to at least solve the technical problem of low efficiency in handling service conflicts in related technologies.
[0005] According to one embodiment of this application, a method for handling service conflicts is provided, comprising: acquiring target state information of a node to be detected, wherein the target state information is used to represent the service operation state information of the node to be detected; if it is determined from the target state information that the node to be detected has a service conflict of a target type, determining a target processing operation corresponding to the service conflict of the target type according to a pre-trained model, wherein the target processing operation is used to repair the service conflict of the target type, the pre-trained model includes a set of fault models, each fault model in the set of fault models is a model trained using a set of data packets generated by a service conflict of a corresponding type; and, if the target processing operation is determined, executing the target processing operation to repair the service conflict of the target type.
[0006] In an exemplary embodiment, after obtaining the target state information of the node to be detected, the method further includes: determining whether the node to be detected has a service conflict based on the target state information; if it is determined that the node to be detected has a service conflict, determining whether the service conflict is a service conflict caused by a pre-deployed service; if it is determined that the service conflict is not a service conflict caused by the pre-deployed service, determining that the node to be detected has a service conflict of the target type.
[0007] In an exemplary embodiment, obtaining the target state information of the node to be detected includes: obtaining first state information of a set of microservice components of the node to be detected running and second state information of the underlying container service of the node to be detected, wherein the target state information includes the first state information and the second state information.
[0008] In an exemplary embodiment, before determining the target processing operation corresponding to the service conflict of the target type based on the pre-trained model, the method further includes: determining that the node to be detected has a first type of service conflict when the first state information indicates that the interaction of the group of microservice components is abnormal; and determining that the node to be detected has a second type of service conflict when the second state information indicates that the container corresponding to the underlying container service is not in a running state; wherein the service conflict of the target type includes the first type of service conflict and the second type of service conflict.
[0009] In an exemplary embodiment, determining the target processing operation corresponding to the service conflict of the target type based on the pre-trained model includes: acquiring target log information of the node to be detected, wherein the target log information includes log information generated when a service conflict of the target type occurs in a set of microservice components of the node to be detected and / or the underlying container service of the node to be detected; detecting the target log information using the pre-trained model to obtain an identifier of the target processing operation, wherein the identifier of the target processing operation is used to instruct the node to be detected to execute the target processing operation indicated by the identifier of the target processing operation to repair the service conflict of the target type.
[0010] In an exemplary embodiment, the step of detecting the target log information using the pre-trained model to obtain the identifier of the target processing operation includes: extracting a set of target feature values from the target log information using the pre-trained model, wherein the set of target feature values includes feature values of a set of parameters in the target log information; comparing the set of target feature values with a set of preset feature values in the pre-trained model to obtain a comparison result, wherein the set of preset feature values represents preset feature values in the pre-trained model corresponding to the set of parameters; and determining the identifier of the target processing operation based on the comparison result.
[0011] In an exemplary embodiment, comparing the set of target feature values with a set of preset feature values in the pre-trained model to obtain a comparison result includes: determining the variance values between the set of target feature values and N sets of preset feature values to obtain N variance values, wherein the N sets of preset feature values are preset feature values corresponding to N fault models in the pre-trained model, each of the N fault models corresponds to a set of preset feature values, and each of the N variance values is a variance value between the set of target feature values and the N sets of preset feature values. The variance values between preset feature values, the comparison result includes the N variance values, where N is a positive integer greater than or equal to 1; the step of determining the identifier of the target processing operation based on the comparison result includes: when the i-th variance value among the N variance values is less than or equal to the i-th preset repair threshold, the identifier of the processing operation corresponding to the i-th preset repair threshold is determined as the identifier of the target processing operation, wherein the i-th preset repair threshold is the repair threshold corresponding to the i-th fault model among the N fault models, and i is a positive integer less than or equal to N.
[0012] In one exemplary embodiment, the method further includes: training the pre-trained model using the target log information when each of the N variance values is greater than a preset repair threshold corresponding to each variance value.
[0013] In an exemplary embodiment, before determining the target processing operation corresponding to the service conflict of the target type based on the pre-trained model, the method further includes: obtaining the i-th fault model in the set of fault models through the following steps, wherein the i-th fault model corresponds to the service conflict of the i-th type, the i-th fault model is used to determine the processing operation corresponding to the service conflict of the i-th type, and i is a positive integer greater than or equal to 1; obtaining the i-th data packet set and the identifier of the actual processing operation corresponding to the i-th data packet set, wherein the i-th data packet set includes a set of sample log information generated when the service conflict of the i-th type occurs; training the i-th initial fault model using the i-th data packet set until the loss value between the identifier of the predicted processing operation output by the i-th initial fault model and the identifier of the actual processing operation satisfies a preset convergence condition, ending the training, and determining the i-th initial fault model at the end of the training as the i-th fault model, wherein if the loss value does not satisfy the convergence condition, the parameters in the i-th initial fault model are adjusted.
[0014] According to another embodiment of this application, a service conflict handling apparatus is also provided, comprising: an acquisition module, configured to acquire target state information of a node to be detected, wherein the target state information represents the service operation state information of the node to be detected; a first determination module, configured to, when it is determined from the target state information that the node to be detected has a service conflict of a target type, determine a target processing operation corresponding to the service conflict of the target type according to a pre-trained model, wherein the target processing operation is used to repair the service conflict of the target type, the pre-trained model includes a set of fault models, each fault model in the set of fault models is a model trained using a set of data packets generated by a service conflict of a corresponding type; and a processing module, configured to, when the target processing operation is determined, execute the target processing operation to repair the service conflict of the target type.
[0015] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0016] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0017] This application's embodiments, by acquiring the target state information of the node to be detected, and determining that the node to be detected has a service conflict of the target type based on the target state information, determine the target processing operation corresponding to the service conflict of the target type based on a pre-trained model. The target processing operation is used to repair the service conflict of the target type. The pre-trained model includes a set of fault models, each of which is a model trained using a set of data packets generated by a service conflict of a corresponding type. That is, when a service conflict of the target type is detected on the node to be detected, the target processing operation corresponding to the service conflict of the target type can be automatically determined based on the pre-trained model, and then the service conflict of the target type can be repaired based on the target processing operation. This avoids the problem of long processing times caused by relying on manual location and repair of service conflicts in related technologies. Therefore, it can solve the technical problem of low service conflict processing efficiency in related technologies, achieving the effect of improving service conflict processing efficiency. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the hardware environment of a server for a service conflict handling method according to an embodiment of this application.
[0019] Figure 2 This is a flowchart of a service conflict handling method according to an embodiment of this application;
[0020] Figure 3 This is a flowchart illustrating the handling of service exceptions according to an embodiment of this application;
[0021] Figure 4 This is a flowchart of a service conflict detection and recovery method according to an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of the pre-trained model evaluation process according to an embodiment of this application;
[0023] Figure 6 This is a structural diagram of a service conflict handling apparatus according to an embodiment of this application. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] The methods and embodiments provided in this application can be executed on a server, computer terminal, device terminal, or similar computing device. Taking running on a server as an example, Figure 1 This is a schematic diagram of the server hardware environment for a service conflict handling method according to an embodiment of this application. Figure 1 As shown, a server may include one or more ( Figure 1 Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. In one exemplary embodiment, the server may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server described above. For example, the server may also include components that are more complex than... Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.
[0027] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the service conflict handling method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a server via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0028] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the server's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0029] This embodiment provides a method for handling service conflicts. Figure 2 This is a flowchart of a service conflict handling method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0030] Step S202: Obtain the target status information of the node to be detected, wherein the target status information is used to represent the service operation status information of the node to be detected;
[0031] Step S204: If it is determined from the target state information that the node to be detected has a service conflict of the target type, a target processing operation corresponding to the service conflict of the target type is determined from the pre-trained model. The target processing operation is used to repair the service conflict of the target type. The pre-trained model includes a set of fault models. Each fault model in the set of fault models is a model trained using a set of data packets generated by a service conflict of the corresponding type.
[0032] Step S206: If the target processing operation is determined, the target processing operation is executed to repair the service conflict of the target type.
[0033] Through the above steps, by acquiring the target state information of the node to be detected, and determining that the node has a service conflict of the target type based on the target state information, the target processing operation corresponding to the service conflict of the target type is determined according to the pre-trained model. The target processing operation is used to repair the service conflict of the target type. The pre-trained model includes a set of fault models, each of which is trained using a set of data packets generated by a service conflict of the corresponding type. That is, when a service conflict of the target type is detected on the node to be detected, the target processing operation corresponding to the service conflict of the target type can be automatically determined according to the pre-trained model, and then the service conflict of the target type can be repaired according to the target processing operation. This avoids the problem of long processing times caused by relying on manual location and repair of service conflicts in related technologies. Therefore, it can solve the technical problem of low service conflict processing efficiency in related technologies, achieving the effect of improving the processing efficiency of service conflicts.
[0034] The entity executing the above steps can be a server, such as a server or node in a cluster, a processor, a device, a controller, or an application control program in a device, or a processor with human-computer interaction capabilities configured on a storage device, or a processing device or processing unit with similar processing capabilities, but is not limited to these.
[0035] In the technical solution provided in step S202 above, taking an AI platform cluster as an example, a detection and repair service can be deployed on each master node of the AI platform. When the checkservice scheduled task is enabled, the target status information of each node of the AI platform can be detected. The target status information is used to represent the service running status information of the node to be detected. For example, the target status information can represent the running status information of a group of microservice components of the node to be detected, and / or the status information of the underlying container service (or underlying POD service) of the node to be detected. For example, the interaction status between various services of the AI platform, such as ibase / iresource, and the underlying service components (or microservice components) can be checked. The status and up time of each service container on the cluster master node can also be queried through the docker command. For the inspection of service anomalies, in practical applications, the log information of the underlying service components of the AI platform can be checked, and the abnormal status can be obtained from the ERROR log information. The target status information can include the fault log information of the node to be detected and / or the abnormal error information of the underlying service. As an optional embodiment, the node to be detected can be a slave node in the AI platform cluster; as another optional embodiment, the node to be detected can also be a master node in the AI platform cluster.
[0036] In the technical solution provided in step S204 above, when it is determined that the node to be detected has a service conflict of the target type based on the target status information, for example, when it is determined that the node to be detected has a service conflict of the target type based on the fault logs and underlying service error information of the node to be detected, the service conflict of the target type can be a service conflict caused by a service not pre-deployed on the AI platform, or it can be called a service conflict outside the platform. For example, in practical applications, it may be due to the platform user's misoperation that the deployment of service components that conflict with the cluster may cause abnormalities in the underlying services of the AI cluster. Such service abnormalities generally cannot be automatically recovered. The above-mentioned service conflict of the target type can be a MariaDB service conflict, which may cause the Galera cluster to synchronize abnormally and restart frequently; or the service conflict of the target type can be a Docker service conflict, which may cause the original Docker service / var / lib / data data in the cluster to be corrupted, resulting in large-scale cluster damage. Errors may occur due to various service conflicts, such as InfluxDB service conflicts (e.g., abnormal cluster monitoring data writing), Telegraf service conflicts (e.g., abnormal monitoring script execution), etc. When a service conflict of the target type (or an external service conflict) is detected on the node to be monitored, the target handling operation (or target handling scheme, or target repair scheme) corresponding to the target type of service conflict can be determined based on a pre-trained model. The pre-trained model includes a set of fault models, each trained using a set of data packets generated by a corresponding type of service conflict. For example, the data packet set may include a set of log information generated when a certain type of service conflict occurs. Thus, when a target type of service conflict is identified, the target handling operation (or target handling scheme) corresponding to the target type of service conflict can be determined based on the pre-trained model. This step utilizes the pre-trained model to determine the purpose of the target handling operation (or target handling scheme) corresponding to the target type of service conflict.
[0037] In the technical solution provided in step S206 above, when a target processing operation (or target processing scheme) is determined, the target processing operation is executed to repair the service conflict of the target type. For example, when the master node detects a service conflict of the target type on the master node or slave node, it can issue a repair task (corresponding to the target processing operation or target processing scheme above) to cause the relevant master node or slave node to perform the repair operation. This step can complete the self-repair operation of the service conflict of the target type.
[0038] In the above embodiments, when a service conflict of the target type is detected on the node to be detected, the target processing operation corresponding to the target type of service conflict can be automatically determined according to the pre-trained model, and then the service conflict of the target type can be repaired according to the target processing operation. This avoids the problem of long processing time caused by relying on manual location and repair of service conflicts in related technologies. Therefore, it can solve the technical problem of low processing efficiency of service conflicts in related technologies, and achieve the effect of improving the processing efficiency of service conflicts.
[0039] In an optional embodiment, after obtaining the target status information of the node to be detected, the method further includes: determining whether the node to be detected has a service conflict based on the target status information; if it is determined that the node to be detected has a service conflict, determining whether the service conflict is a service conflict caused by a pre-deployed service; if it is determined that the service conflict is not a service conflict caused by the pre-deployed service, determining that the node to be detected has a service conflict of the target type.
[0040] In the above embodiments, after obtaining the target state information of the node to be detected, for example, after obtaining the running state information of a set of microservice components of the node to be detected, and / or the state information of the underlying container service (or underlying POD service) of the node to be detected, it can be determined whether the node to be detected has a service conflict based on the target state information. When it is determined that a service conflict exists, it is further determined whether the service conflict is caused by a pre-deployed service, for example, whether it is caused by a service pre-deployed by the AI platform (also known as a service anomaly or service conflict within the platform). If it is determined that the service conflict is not caused by a pre-deployed service, it can be determined that the node to be detected has a service conflict of the target type, also known as a non-platform service conflict. Through this embodiment, the purpose of determining whether the node to be detected has a non-platform service conflict is achieved after obtaining the target state information of the node to be detected.
[0041] In an optional embodiment, obtaining the target state information of the node to be detected includes: obtaining first state information of a set of microservice components of the node to be detected running and second state information of the underlying container service of the node to be detected, wherein the target state information includes the first state information and the second state information.
[0042] In the above embodiments, the first state information of a set of microservice components running on the node to be tested, and the second state information of the underlying container service (or underlying POD service) of the node to be tested, can be obtained. For example, the interaction status between various services of the AI platform, such as ibase / iresource, and the underlying service components (or microservice components) can be checked. The status and up time of each service container on the cluster master node can also be queried using docker commands. For service anomaly checks, the log information of the AI platform's underlying service components can be checked, and the ERROR log information can be used to obtain the anomaly status. The target state information can include the fault log information of the node to be tested and / or the anomaly error information of the underlying service. In practical applications, a detection and repair service can be deployed on each master node of the AI platform, and a checkservice scheduled task can be enabled to detect whether service conflicts have occurred. Through this embodiment, the target state information of the node to be tested can be determined based on the log information of each underlying service component in the AI platform cluster and the ERROR log information of the underlying POD service.
[0043] In an optional embodiment, before determining the target processing operation corresponding to the service conflict of the target type based on the pre-trained model, the method further includes: determining that the node to be detected has a first type of service conflict when the first state information indicates that the interaction of the group of microservice components is abnormal; determining that the node to be detected has a second type of service conflict when the second state information indicates that the container corresponding to the underlying container service is not in a running state; wherein, the service conflict of the target type includes the first type of service conflict and the second type of service conflict.
[0044] In the above embodiments, when the first status information indicates an abnormal interaction of a group of microservice components of the node to be detected, it can be determined that the node to be detected has a first type of service conflict. For example, when the checkservice scheduled task is enabled, the interaction status of various services of the AI platform, such as ibase / iresource, with the underlying service components (or microservice components) can be checked. When the first status information indicates an abnormal interaction of a group of microservice components, it can be determined that the node to be detected has a first type of service conflict, that is, the first type of service conflict indicates that the node's microservice components (or underlying service components) have an abnormal interaction. When the second status information indicates that the underlying container service (or underlying POD service) of the node to be detected is not in a running state... In certain circumstances, it can be determined that the node to be tested has a second type of service conflict. For example, when the checkservice scheduled task is enabled, the status and up time of each service container on the cluster master node can be queried using the docker command. When the second status information indicates that the underlying POD service is not running, it can be determined that the node to be tested has a second type of service conflict. For example, the second type of service conflict could be a Docker service conflict, which may cause the original Docker service / var / lib / data data in the cluster to be corrupted, resulting in widespread errors in the cluster. The aforementioned first status information can be the log information of the underlying service components of the AI platform, and the second status information can be the abnormal error log information of the underlying POD service. Optionally, in practical applications, the target status information can also be used to indicate other types of service conflicts. Through this embodiment, the purpose of determining whether the node to be tested has a first type of service conflict and a second type of service conflict is achieved based on the target status information.
[0045] In an optional embodiment, determining the target processing operation corresponding to the service conflict of the target type based on the pre-trained model includes: obtaining target log information of the node to be detected, wherein the target log information includes log information generated when a service conflict of the target type occurs in a set of microservice components of the node to be detected and / or the underlying container service of the node to be detected; detecting the target log information using the pre-trained model to obtain an identifier of the target processing operation, wherein the identifier of the target processing operation is used to instruct the node to be detected to execute the target processing operation indicated by the identifier of the target processing operation to repair the service conflict of the target type.
[0046] In the above embodiments, the target log information of the node to be detected can be obtained. The target log information may include log information generated when a set of microservice components of the node to be detected and / or the underlying container service of the node to be detected experience a service conflict of the target type. For example, the target log information may be the log information of the underlying service components of the AI platform and / or the abnormal error log information of the underlying POD service. Then, the target log information is detected using a pre-trained model to obtain the identifier of the target processing operation. The identifier of the target processing operation is used to indicate the execution of the corresponding target processing operation to repair the service conflict of the above target type. Each identifier of the target processing operation corresponds to a target processing scheme (or target repair scheme). The pre-trained model may include a set of fault models. For example, the pre-trained model may include 5 (or 10, or other numbers) fault models. Each fault model in the set is trained using a set of data packets generated by a corresponding type of service conflict. For instance, the 5 fault models are trained using data packet sets generated by 5 different types of service conflicts. The data packet set may include a set of log information generated when a certain type of service conflict occurs. Thus, when a service conflict of a specific type is identified, the target processing operation (or target processing scheme) corresponding to the target type of service conflict can be determined based on the pre-trained model. Through this embodiment, when a service conflict occurs on a node to be detected in the AI platform cluster, a repair scheme can be determined based on the target log information to achieve the purpose of automatically repairing the service conflict, thereby maintaining the stability of the platform.
[0047] Taking a Telegraf service conflict as an example, in practical applications, the following steps are taken: First, protect the directory files under the path where the platform's own Telegraf service is located and back them up. Then, use `systemctl stop telegraf` to stop the user-installed Telegraf service and delete the underlying configuration file ` / etc / telegraf.conf` (for some services, a node restart is required to completely clear the configuration information). Restore the platform's own service backup data to the specified path during installation and deployment, restart the Telegraf service, and after the service starts, the platform cluster will perform a self-check and reconnection, and then be ready for use.
[0048] In an optional embodiment, the step of detecting the target log information using the pre-trained model to obtain the identifier of the target processing operation includes: extracting a set of target feature values from the target log information using the pre-trained model, wherein the set of target feature values includes feature values of a set of parameters in the target log information; comparing the set of target feature values with a set of preset feature values in the pre-trained model to obtain a comparison result, wherein the set of preset feature values represents preset feature values in the pre-trained model corresponding to the set of parameters; and determining the identifier of the target processing operation based on the comparison result.
[0049] In the above embodiments, a set of target feature values can be extracted from the target log information using a pre-trained model. This set of target feature values may include feature values of a set of parameters in the target log information. The target log information may be container logs of service conflicts or service failure information. For example, a set of parameters may be parameters related to or generated during the operation of the microservice components of the node to be detected, and / or parameters related to or generated during the operation of the underlying container service of the node to be detected. A set of parameters may include one or more feature points, such as feature points of error codes included in the log information. These feature points may be in the logs such as "jdbc.exception.jdb4**********Lock waittimeout exceeded; try restarting transaction", "level=error msg=********", or "failed to open gcomm backend". Based on different feature points in the dataset, maintenance personnel later obtain new error logs and process them into feature points during the platform project development process, supplementing them into the dataset model for comparison and identification. Then, a set of target feature values is compared with a set of preset feature values in the pre-trained model to obtain the comparison results. The pre-trained model includes a set of fault models, each of which corresponds to a set of preset feature values. The identifier of the target processing operation is then determined based on the comparison results. For example, the variance between a set of target feature values and a set of preset feature values can be calculated. When the variance meets the requirement of the repair threshold corresponding to the target fault model (e.g., one of the fault models included in the aforementioned set of fault models), the target processing operation (or target processing scheme) corresponding to the target fault model is used as the repair scheme for the abnormal conflict that generated the aforementioned target log information. Through this embodiment, the target log information, evaluated by the pre-trained model, can quickly locate service conflict issues and determine the corresponding repair scheme, avoiding the problems of manual location and handling of service conflicts in related technologies, which are labor-intensive and inefficient, thus improving the efficiency of service conflict handling.
[0050] In an optional embodiment, comparing the set of target feature values with a set of preset feature values in the pre-trained model to obtain a comparison result includes: determining the variance values between the set of target feature values and N sets of preset feature values, obtaining N variance values, wherein the N sets of preset feature values are preset feature values corresponding to N fault models in the pre-trained model, each of the N fault models corresponds to a set of preset feature values, and each of the N variance values is a variance value between the set of target feature values and one of the N sets of preset feature values. The variance values between preset feature values, the comparison result includes the N variance values, where N is a positive integer greater than or equal to 1; the step of determining the identifier of the target processing operation based on the comparison result includes: when the i-th variance value among the N variance values is less than or equal to the i-th preset repair threshold, the identifier of the processing operation corresponding to the i-th preset repair threshold is determined as the identifier of the target processing operation, wherein the i-th preset repair threshold is the repair threshold corresponding to the i-th fault model among the N fault models, and i is a positive integer less than or equal to N.
[0051] In the above embodiments, optionally, the pre-trained model includes N fault models. Each of the N fault models has preset feature values corresponding to the aforementioned set of parameters, i.e., there are N sets of preset feature values. The variance values between the target feature values of the target log information and the N sets of preset feature values can be determined, resulting in N variance values. Each of the N fault models corresponds to a preset repair threshold. When the i-th variance value among the N variance values is less than or equal to the i-th preset repair threshold, the identifier of the processing operation corresponding to the i-th preset repair threshold can be determined as the identifier of the target processing operation, i.e., the identifier of the repair scheme corresponding to the i-th fault model can be determined as the identifier of the target processing operation. Optionally, in practical applications, the optimal variance value can be determined from the N variance values, i.e., the smallest variance value is selected from the N variance values, and then it is determined whether the optimal variance value meets the requirements of the preset repair threshold. In this embodiment, by comparing the variance value with the preset repair threshold corresponding to each fault model repair scheme, when the variance value meets the requirements, the identifier of the corresponding target processing operation (i.e., the identifier of the target repair scheme) can be obtained to execute the corresponding repair operation. Optionally, in practical applications, the preset repair thresholds corresponding to each fault model can be adjusted according to the AI cluster status.
[0052] In an optional embodiment, the method further includes: training the pre-trained model using the target log information when each of the N variance values is greater than a preset repair threshold corresponding to each variance value.
[0053] In the above embodiments, when each of the N variance values is greater than the preset repair threshold corresponding to the N fault models, the aforementioned target log information can be used as a candidate data package set for training the pre-trained model, or the aforementioned target log information can be used to train the pre-trained model. If none of the aforementioned N variance values meet the repair threshold, the identifier of the target processing operation cannot be obtained, i.e., the identifier of the repair operation cannot be obtained. In this case, the current error information dataset is saved. After the maintenance personnel find a manual solution, the model information is trained again based on the error information, entered into the model library, and the corresponding repair solution is updated.
[0054] In an optional embodiment, before determining the target processing operation corresponding to the service conflict of the target type based on the pre-trained model, the method further includes: obtaining the i-th fault model in the set of fault models through the following steps, wherein the i-th fault model corresponds to the service conflict of the i-th type, and the i-th fault model is used to determine the processing operation corresponding to the service conflict of the i-th type, where i is a positive integer greater than or equal to 1; obtaining the i-th data packet set and the identifier of the actual processing operation corresponding to the i-th data packet set, wherein the i-th data packet set includes a set of sample log information generated when the service conflict of the i-th type occurs; training the i-th initial fault model using the i-th data packet set until the loss value between the identifier of the predicted processing operation output by the i-th initial fault model and the identifier of the actual processing operation satisfies a preset convergence condition, ending the training, and determining the i-th initial fault model at the end of the training as the i-th fault model, wherein if the loss value does not satisfy the convergence condition, the parameters in the i-th initial fault model are adjusted.
[0055] In the above embodiments, each fault model in a set of fault models is pre-trained by classifying and training various fault logs and underlying service anomaly error information datasets according to different automatic service conflict fault repair methods. For example, for the i-th fault model, it is trained by acquiring the i-th data packet set and the identifier of the actual processing operation corresponding to the i-th data packet set (which can be understood as the identifier of the processing scheme or the identifier of the repair scheme), using the i-th data packet set, until the loss value between the predicted processing operation identifier output by the i-th initial fault model and the actual processing operation identifier satisfies the preset convergence condition, and the i-th initial fault model at the end of training is determined as the i-th fault model. Through this embodiment, the purpose of training each fault model using various data packet sets is achieved.
[0056] Obviously, the embodiments described above are only some embodiments of this application, and not all embodiments. The present application will be specifically described below with reference to the embodiments.
[0057] This application proposes an AI platform cluster fault recovery method based on underlying service rejection training. For the fault dataset obtained during service conflicts, the most suitable pre-trained fault model is selected from a pre-trained model library to perform the corresponding rejection recovery operation. Specifically, it includes:
[0058] (1) Deploy detection and repair services on each master node of the AI platform.
[0059] (2) Enable the checkservice scheduled task to check whether the microservice components of each node of the AI platform and the underlying pod services of K8S are normal (key checkpoints: a. query the status of each service container on the cluster master node and the up time through the docker command; b. the interaction status of each service of the AI platform, such as ibase / iresource, with the underlying service components; c. check the log information of the underlying service components of the AI platform and obtain the abnormal status of the ERROR log information).
[0060] (3) If the scheduled task detects a service conflict that cannot be repaired (such as: MariaDB service conflict, which causes abnormal synchronization of the Galera cluster and frequent restarts; Docker service conflict, which causes the original Docker service / var / lib / data data in the cluster to be corrupted and the cluster to report errors on a large scale; InfluxDB service conflict, which causes abnormal writing of cluster monitoring data; Telegraf service conflict, which causes abnormal execution of monitoring scripts, etc.), the repair phase begins. The logs of abnormal services in the cluster and the error information of abnormal services in the K8S underlying service are organized to form the underlying container generated by the targetData.AI platform. The fault model with the highest score is selected through evaluation by the LogME pre-trained model. The fault model generation method is shown in (4). The corresponding repair method is selected to restore the conflicting service based on the comparison between the score and the threshold requirements.
[0061] (4) The fault model is pre-classified based on the different automatic repair methods for service conflict faults, and the dataset of fault logs and K8S underlying service error information is classified (e.g., if a Docker service conflict is identified, the user-installed Docker service is stopped, the Docker process that the platform's underlying layer depends on is restarted, and the Docker backup data is restored after the service is normalized; if a MariaDB service conflict is identified by log information errors, the node with the latest data is determined according to the maximum value of seqno, the MySQL container is stopped, the galera.cache and grastate.dat files are removed, and the config.json file of the node is modified to add --wsrep-new-cluster to generate a new galera cluster for the AI platform to use). The corresponding fault model is generated through a general training model (e.g., the object detection dataset training model YOLOv3, YOLO4) (the training model when generating the model library is an existing one, trained according to the classified fault dataset. The training results are stored in the pre-trained model library. The loss function is DIOU. When generating the pre-trained model library, a penalty value is added to the standardized difference of the center values of the predicted box and the detection box to speed up the training convergence speed).
[0062] The embodiments of the present invention will now be described with reference to the accompanying drawings. Figure 3 This is a flowchart of a service exception handling procedure according to an embodiment of this application. The procedure includes:
[0063] S302, Check if there are any abnormalities in the service; that is, by starting the checkservice service, check whether the microservice components of each node of the AI platform and the underlying pod service of K8S are normal. If an abnormality is detected, proceed to step S304.
[0064] S304, determine whether there are non-platform services; after detecting service anomalies in step S302, first obtain the service information of each node and whether the number of services meets the cluster requirements, compare it with the platform service list, and determine whether there are non-platform services.
[0065] S306, when the judgment result of the above step S304 is yes, that is, when there is a non-platform service anomaly (corresponding to the aforementioned target type of service conflict), service conflict detection is performed; that is, when there is a non-platform service anomaly, step S310 is entered, that is, the service detection and rejection training processing scheme is entered.
[0066] S308, if the judgment result of step S304 is negative, that is, if there is no non-platform service anomaly, and the service anomaly is an in-platform service anomaly, then proceed to the in-platform service repair solution, and then proceed to step S312; this embodiment of the invention mainly targets the solution for service conflicts, that is, corresponding to Figure 3 The part within the dashed box.
[0067] S310, pre-trained rejection repair, for example, by evaluating the LogME pre-trained model (corresponding to the aforementioned pre-trained model), selecting the fault model with the highest score, and then selecting the corresponding repair method (corresponding to the aforementioned target processing operation) based on the comparison between the score and the threshold requirement to perform rejection training and platform recovery after service conflict.
[0068] S312 returns the cluster repair results.
[0069] S314, End.
[0070] Figure 4 This is a flowchart of a service conflict detection and recovery method according to an embodiment of this application. The process includes:
[0071] S402, start the checkservice service to check the status of microservice components on each node of the AI platform and the underlying pod services of K8S (corresponding to the aforementioned target status information).
[0072] S404 checks if there are service conflicts in the cluster.
[0073] S406, If the judgment result of the above step S404 is yes, collect the abnormal information (corresponding to the aforementioned target log information) to form a dataset;
[0074] That is, when the scheduled task detects that the error dataset is caused by a platform service conflict, it compiles the logs of the abnormal service and the error messages of the underlying Kubernetes service to form targetData (corresponding to the aforementioned data packet set).
[0075] If the judgment result of step S404 is negative, return to step S402 to continue checking the service status.
[0076] S408, Pre-trained model selection.
[0077] Figure 5 This is a schematic diagram of the pre-trained model evaluation process according to an embodiment of this application. Based on the anomaly information dataset, a pre-trained model is selected, such as... Figure 5 Model 3 (corresponding to repair solution identifier 3) in the text.
[0078] The AI platform generates pod containers at the bottom layer. Pre-trained model evaluation exists in the container's YAML configuration file. When an abnormal message triggers model evaluation, the current node automatically executes the `kubectl create` command to create a pre-trained pod container based on a LogME-compatible image. The `targetData` file information is brought into the container, and model training is performed (commands such as `python -u / logme / train_example / logme-cnn_lm_v1.01 / scripts / lm.py –model*lvgg16 –feature 20 -1000 –batch_size 256 –data_dir= / targetData`) to obtain `model_check_res`.
[0079] S410, determine whether the fault model score meets the threshold requirements.
[0080] S412, if the judgment result of the above step S410 is yes, restore the service conflict recovery cluster.
[0081] For example, by evaluating the LogME pre-trained model, the fault model with the highest score is selected, and then the corresponding repair method is selected based on the comparison between the score and the threshold requirements to perform the rejection training and platform recovery after the service conflict.
[0082] S414, If the judgment result of step S410 is negative, save the targetdata dataset, determine the repair method, and train a new model.
[0083] In steps S410-S414 above, during model training, the feature points extracted from the model in the targetData dataset (the number of feature points can be customized, and larger values result in greater accuracy) are compared with the values in the model library to obtain the feature point variance:
[0084]
[0085] Where S 2 Let μ be the variance of the characteristic points. i X is the value of the identifier i corresponding to model* in the model library. i The values corresponding to the model generated by training the abnormal information dataset, where n is the number of feature points taken.
[0086] Note: a) Command parameter explanation: After starting the pre-training container, the Python command is executed within the container to run the training model task. The following parameters can be passed in: model framework (LM), number of feature points (20), number of steps (1000) (the more steps, the longer the running time and the more thorough the training), batch size (256) (customizable based on node memory and machine performance), and dataset path ( / targetData).
[0087] b. Feature points are pre-sorted sequences of feature points summarized from anomaly datasets generated when conflicts occur among services in the cluster. These sequences are defined and prioritized based on the generality of the anomaly information and the severity of the defect. The feature point parameters from the first n user-defined feature point sequences are selected for dataset training, based on the user-defined number of feature points (n).
[0088] For example, the aforementioned feature points could be log entries such as "jdbc.exception.jdb4**********Lock waittimeout exceeded; try restarting transaction", "level=error msg=********", or "failed to open gcomm backend connection". Based on different feature points in the dataset, later maintenance personnel can obtain new error logs and process them into feature points during the platform project development process, which will then be added to the dataset model for comparison and identification.
[0089] The variance is compared with the repair threshold identified by the current model repair scheme. When the variance meets the requirements, the corresponding repair scheme is obtained and the repair operation is executed. The repair threshold here can be freely adjusted according to the cluster status, thereby adjusting the automatic triggering frequency and accuracy.
[0090] If the optimal variance score still fails to meet the repair threshold, the sorting and repair operation cannot be obtained. Instead, the current error information dataset is saved. Once the operations and maintenance personnel find a manual solution, the model information is trained again based on the error message and entered into the model zoo, updating the corresponding repair solution. This facilitates the automatic detection and recovery of service conflict and anomaly issues in more scenarios later.
[0091] Optionally, when obtaining the check results in the algorithm (such as `model_check_res` mentioned above), multiple custom feature points can be weighted according to their log levels. Assume there are 20 feature points in total, and the matrix is [c1, c2, ... c...]. nThe weights of the 20 feature points are summed to 1. During model training, the command is as follows: `python -u / logme / train_example / logme-cnn_lm_v1.01 / script s / lm.py –model*lvgg16 –feature 20 –cc*-1000 –batch_size 256 –data_di r= / targetData`. Adding feature point matrix values to the parameters automatically retrieves the configured weight information. `mo del_check_res` performs weight analysis on all feature point return values and compares them with the standard values `mo del_standard_value` for each model to obtain the optimal model match, thus determining the platform's repair method. For example: `model_check_res=c1_check_res*10%+c2_check_res*5%+c3_check_res*3%+……+c` n _check_res*2%.
[0092] In the above embodiments, an AI platform cluster fault recovery method based on underlying service conflict training is proposed. This method trains a fault model by classifying container logs and service fault information from various service conflict scenarios within the AI platform cluster according to repair solutions. When a service conflict occurs in the cluster, the fault logs are quickly located and categorized using the LogME pre-trained model evaluation method, and a repair solution is specified to restore the conflicting services. This achieves the goal of saving cluster recovery time while improving accuracy.
[0093] Existing technologies primarily rely on manual cluster repair solutions, which are only applicable to specific scenarios, resulting in limited applicability and incomplete coverage. This prevents their use across multiple scenarios and hinders their general ability to handle service conflict issues. Furthermore, due to the large number of platform services, the methods for repairing Docker anomalies and data synchronization failures caused by various conflicting services differ. Adopting these solutions leads to slow problem localization and repair. However, this application's embodiment, based on the fault dataset obtained during service conflicts, selects the most suitable pre-trained fault model from a pre-trained model library to perform corresponding anomaly detection and recovery operations. After evaluation and processing using the pre-trained model, the AI platform's service conflict issues can be covered in more scenarios by the automatic detection and repair service center. Compared to ordinary model training methods, this evaluation method consumes fewer node resources (starting a pod after anomaly identification uses minimal memory for training and evaluation, and the pod is deleted after repair), and the training time is significantly shortened. This facilitates the AI platform's return to normal operation, avoiding significant losses. It achieves faster anomaly classification of service conflict issues and specifies appropriate repair methods for recovery.
[0094] The following is an explanation of the relevant terms appearing in the embodiments of this application:
[0095] MySQL Galera: Cluster software. Galera is installed on a specific version of MySQL. Several MySQL instances form a cluster, with each MySQL instance acting as a master node and synchronizing data with each other.
[0096] InfluxDB: An open-source, distributed time-series, event, and metrics database written in Go, requiring no external dependencies. This database is primarily used to store large amounts of timestamp data; in this application, it is used as an example to illustrate service exception handling.
[0097] Telegraf: An open-source metrics collection tool based on plug-ins, primarily used for performance monitoring;
[0098] K8S (Kubernetes) is used to manage containerized applications on multiple hosts in a cloud platform.
[0099] Pod: The smallest unit managed by Kubernetes, consisting of one or more containers;
[0100] LogME: A general, fast, and accurate method for evaluating pre-trained models.
[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0102] This embodiment also provides a service conflict handling device. Figure 6 This is a structural diagram of a service conflict handling apparatus according to an embodiment of this application, such as... Figure 6 As shown, the device includes:
[0103] The acquisition module 602 is used to acquire the target status information of the node to be detected, wherein the target status information is used to represent the service operation status information of the node to be detected;
[0104] The first determining module 604 is used to determine, based on a pre-trained model, a target processing operation corresponding to the target type service conflict when it is determined from the target state information that the node to be detected has a service conflict of the target type. The target processing operation is used to repair the service conflict of the target type. The pre-trained model includes a set of fault models. Each fault model in the set of fault models is a model trained using a set of data packets generated by a service conflict of the corresponding type.
[0105] The processing module 606 is used to execute the target processing operation when the target processing operation is determined, so as to repair the service conflict of the target type.
[0106] In an optional embodiment, the above apparatus further includes: a first judgment module, configured to, after obtaining the target state information of the node to be detected, determine whether the node to be detected has a service conflict based on the target state information; a second judgment module, configured to, if it is determined that the node to be detected has a service conflict, determine whether the service conflict is a service conflict caused by a pre-deployed service; and a second determination module, configured to, if it is determined that the service conflict is not a service conflict caused by the pre-deployed service, determine that the node to be detected has a service conflict of the target type.
[0107] In an optional embodiment, the acquisition module 602 includes: an acquisition submodule, used to acquire first status information of a set of microservice components running on the node to be detected and second status information of the underlying container service of the node to be detected, wherein the target status information includes the first status information and the second status information.
[0108] In an optional embodiment, the above apparatus further includes: a third determining module, configured to determine that the node to be detected has a first type of service conflict before determining the target processing operation corresponding to the service conflict of the target type according to the pre-trained model, when the first state information indicates that the interaction of the group of microservice components is abnormal; and a fourth determining module, configured to determine that the node to be detected has a second type of service conflict when the second state information indicates that the container corresponding to the underlying container service is not in a running state; wherein the service conflict of the target type includes the first type of service conflict and the second type of service conflict.
[0109] In an optional embodiment, the first determining module 604 includes: an acquisition submodule, configured to acquire target log information of the node to be detected, wherein the target log information includes log information generated when a service conflict of the target type occurs in a set of microservice components corresponding to the node to be detected and / or the underlying container service of the node to be detected; and a detection submodule, configured to detect the target log information using the pre-trained model to obtain an identifier of the target processing operation, wherein the identifier of the target processing operation is used to instruct the node to be detected to execute the target processing operation indicated by the identifier of the target processing operation to repair the service conflict of the target type.
[0110] In an optional embodiment, the detection submodule includes: an extraction unit, configured to extract a set of target feature values of the target log information using the pre-trained model, wherein the set of target feature values includes feature values of a set of parameters in the target log information; a comparison unit, configured to compare the set of target feature values with a set of preset feature values in the pre-trained model to obtain a comparison result, wherein the set of preset feature values represents preset feature values in the pre-trained model corresponding to the set of parameters; and a determination unit, configured to determine the identifier of the target processing operation based on the comparison result.
[0111] In an optional embodiment, the comparison unit includes: a first determining subunit, configured to determine the variance values between the set of target feature values and N sets of preset feature values, obtaining N variance values, wherein the N sets of preset feature values are preset feature values corresponding to N fault models in the pre-trained model, each of the N fault models corresponds to a set of preset feature values, and each of the N variance values is the variance value between the set of target feature values and a set of preset feature values in the N sets of preset feature values, the comparison result includes the N variance values, and N is a positive integer greater than or equal to 1; the determining unit includes: a second determining subunit, configured to, when the i-th variance value in the N variance values is less than or equal to the i-th preset repair threshold, determine the identifier of the processing operation corresponding to the i-th preset repair threshold as the identifier of the target processing operation, wherein the i-th preset repair threshold is the repair threshold corresponding to the i-th fault model in the N fault models, and i is a positive integer less than or equal to N.
[0112] In an optional embodiment, the above apparatus further includes: a training module, configured to train the pre-trained model using the target log information when each of the N variance values is greater than a preset repair threshold corresponding to each variance value.
[0113] In an optional embodiment, the above apparatus further includes: an acquisition module, configured to obtain the i-th fault model in the set of fault models through the following steps before determining the target processing operation corresponding to the service conflict of the target type according to the pre-trained model, wherein the i-th fault model corresponds to the service conflict of the i-th type, the i-th fault model is used to determine the processing operation corresponding to the service conflict of the i-th type, and i is a positive integer greater than or equal to 1; acquire the i-th data packet set and the identifier of the actual processing operation corresponding to the i-th data packet set, wherein the i-th data packet set includes a set of sample log information generated when the service conflict of the i-th type occurs; train the i-th initial fault model using the i-th data packet set until the loss value between the identifier of the predicted processing operation output by the i-th initial fault model and the identifier of the actual processing operation satisfies a preset convergence condition, end the training, and determine the i-th initial fault model at the end of the training as the i-th fault model, wherein if the loss value does not satisfy the convergence condition, the parameters in the i-th initial fault model are adjusted.
[0114] It should be noted that the above-mentioned units or modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but not limited to these: all the above-mentioned units or modules are located in the same processor; or, the above-mentioned units or modules are located in different processors in any combination.
[0115] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0116] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0117] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0118] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0119] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0120] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.
[0121] The above description is merely a preferred embodiment of this application and is not intended to limit the embodiments of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A method for handling service conflicts, characterized in that, include: Obtain the target status information of the node to be detected, wherein the target status information is used to represent the service operation status information of the node to be detected; If, based on the target status information, it is determined that the node to be detected has a service conflict of the target type, the target log information of the node to be detected is obtained. This target log information includes log information generated when a service conflict of the target type occurs in a set of microservice components corresponding to the node to be detected and / or in the underlying container service of the node to be detected. The target log information is then detected using a pre-trained model to obtain an identifier for a target processing operation. This target processing operation is used to repair the service conflict of the target type. The pre-trained model includes a set of fault models, each of which is a model trained using a set of data packets generated by a corresponding type of service conflict. The identifier of the target processing operation is used to instruct the node to be detected to execute the target processing operation indicated by the identifier to repair the service conflict of the target type. The identifier of the target processing operation corresponds to a target processing scheme. If the target processing operation is determined, the target processing operation is executed to repair the service conflict of the target type.
2. The method according to claim 1, characterized in that, After obtaining the target state information of the node to be detected, the method further includes: Based on the target status information, determine whether the node to be detected has a service conflict; If it is determined that there is a service conflict on the node to be detected, it is determined whether the service conflict is a service conflict caused by a pre-deployed service; If it is determined that the service conflict is not a service conflict of the pre-deployed service, then it is determined that the node to be detected has a service conflict of the target type.
3. The method according to claim 1, characterized in that, The acquisition of the target state information of the node to be detected includes: The first state information of a set of microservice components running on the node to be tested and the second state information of the underlying container service of the node to be tested are obtained, wherein the target state information includes the first state information and the second state information.
4. The method according to claim 3, characterized in that, The method further includes: If the first status information indicates an abnormal interaction of the group of microservice components, it is determined that the node to be detected has a first type of service conflict; If the second status information indicates that the container corresponding to the underlying container service is not in a running state, it is determined that the node to be detected has a second type of service conflict; wherein, the target type of service conflict includes the first type of service conflict and the second type of service conflict.
5. The method according to claim 1, characterized in that, The step of using the pre-trained model to detect the target log information and obtain the identifier of the target processing operation includes: The pre-trained model is used to extract a set of target feature values from the target log information, wherein the set of target feature values includes feature values of a set of parameters in the target log information; The set of target feature values is compared with a set of preset feature values in the pre-trained model to obtain a comparison result, wherein the set of preset feature values represents the preset feature values in the pre-trained model corresponding to the set of parameters; The identifier of the target processing operation is determined based on the comparison results.
6. The method according to claim 5, characterized in that, The step of comparing the set of target feature values with a set of preset feature values in the pre-trained model to obtain a comparison result includes: determining the variance values between the set of target feature values and N sets of preset feature values respectively, obtaining N variance values, wherein the N sets of preset feature values are preset feature values corresponding to N fault models in the pre-trained model, each of the N fault models corresponds to a set of preset feature values, and each of the N variance values is the variance value between the set of target feature values and a set of preset feature values in the N sets of preset feature values, and the comparison result includes the N variance values, where N is a positive integer greater than or equal to 1; The step of determining the identifier of the target processing operation based on the comparison result includes: when the i-th variance value among the N variance values is less than or equal to the i-th preset repair threshold, the identifier of the processing operation corresponding to the i-th preset repair threshold is determined as the identifier of the target processing operation, wherein the i-th preset repair threshold is the repair threshold corresponding to the i-th fault model among the N fault models, and i is a positive integer less than or equal to N.
7. The method according to claim 6, characterized in that, The method further includes: If each of the N variance values is greater than the preset repair threshold corresponding to each variance value, the pre-trained model is trained using the target log information.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The i-th fault model in the set of fault models is obtained through the following steps, wherein the i-th fault model corresponds to the i-th type of service conflict, and the i-th fault model is used to determine the processing operation corresponding to the i-th type of service conflict, where i is a positive integer greater than or equal to 1: Obtain the i-th data packet set and the identifier of the actual processing operation corresponding to the i-th data packet set, wherein the i-th data packet set includes a set of sample log information generated when the i-th type of service conflict occurs; The i-th initial fault model is trained using the i-th data packet set until the loss value between the identifier of the predicted processing operation output by the i-th initial fault model and the identifier of the actual processing operation satisfies a preset convergence condition. The training ends, and the i-th initial fault model at the end of training is determined as the i-th fault model. If the loss value does not satisfy the convergence condition, the parameters in the i-th initial fault model are adjusted.
9. A service conflict handling apparatus, characterized in that, include: The acquisition module is used to acquire the target status information of the node to be detected, wherein the target status information is used to represent the service operation status information of the node to be detected; The first determining module is configured to, when determining from the target state information that the node to be detected has a service conflict of the target type, acquire target log information of the node to be detected, wherein the target log information includes log information generated when a service conflict of the target type occurs in a set of microservice components corresponding to the node to be detected and / or the underlying container service of the node to be detected; detect the target log information using a pre-trained model to obtain an identifier of a target processing operation, wherein the target processing operation is used to repair the service conflict of the target type, the pre-trained model includes a set of fault models, each fault model in the set of fault models is a model trained using a set of data packets generated by a service conflict of a corresponding type, the identifier of the target processing operation is used to instruct the node to be detected to execute the target processing operation indicated by the identifier of the target processing operation to repair the service conflict of the target type, and the identifier of the target processing operation corresponds to a target processing scheme; The processing module is used to execute the target processing operation when the target processing operation is determined, so as to repair the service conflict of the target type.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 8.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Micro-service fault diagnosis method, device and equipment based on graph convolutional neural network
CN115309575A