Abnormal information processing method, system, artificial intelligence platform, equipment and medium
通过获取目标推理服务的名称信息并将其状态及事件信息输入大语言模型进行分析,解决了人工智能平台推理服务异常信息处理效率低的问题,实现了更高效和准确的异常诊断。
Patent Information
- Application Number
- CN202411331754.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-09-24
AI Technical Summary
When building an inference service system based on an artificial intelligence platform, it is difficult for developers to efficiently process and diagnose abnormal information, especially when the sub-resource state logic of custom resource dependencies is complex and cumbersome.
By obtaining the name information of the target inference service, obtaining the status and event information of related service resources from the state and event databases, and inputting this information into the large language model for abnormal analysis, generating the results of inference abnormal analysis.
It improves the efficiency and accuracy of the exception handling of inference service, can locate and solve inference service abnormal problems more quickly, reduces the diagnosis time of developers and reduces the risk of omissions.
Smart Images

Figure CN118863070B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an abnormal information processing method, system, artificial intelligence platform, device and medium. Background Art
[0002] When building an inference service system based on an artificial intelligence (AI) platform, the inference service is generally formed by the corresponding custom resource definition (CRD) instance. The exception information of the inference service is obtained from the status and events of the custom resource, and the status and events of the custom resource are updated and maintained by the controller of the custom resource.
[0003] When the controller executes the custom resource initialization or update logic, exceptions may be encountered. These exception information needs to be captured and recorded for subsequent diagnosis and processing. This requires developers to understand and sort out all the sub-resources that the custom resources depend on, and clarify which sub-resource states are required for the normal operation of the inference service. However, when there are too many sub-resources, the logic of obtaining the sub-resource state is very cumbersome. For developers, it takes too long and is easy to miss. At the same time, because the definition of resource status and event format is professional, it is poorly readable for non-professional development users, and most of the exception information only provides abnormal phenomena, and cannot provide users with effective exception handling analysis results.
[0004] Therefore, there is an urgent need for an abnormal information processing method, system, artificial intelligence platform, equipment and medium to solve the above problems. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides an abnormal information processing method, system, artificial intelligence platform, device and medium.
[0006] The present invention provides an abnormal information processing method, comprising:
[0007] Obtain the target reasoning service name information corresponding to the target reasoning service where the abnormal situation occurs;
[0008] According to the target reasoning service name information, the status and event information of each service resource corresponding to the target reasoning service is obtained from the status and event database of the current period, wherein the status and event database is constructed based on the ownership relationship between the service resources in the preset resource composition table, and the status and event database is used to store the status and events of the main service resources and sub-service resources in the ownership relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resources periodically obtained by the container cluster management tool;
[0009] The state and event information are input into a large language model, and a reasoning anomaly analysis result corresponding to the target reasoning service is obtained by outputting the large language model.
[0010] According to a method for processing abnormal information provided by the present invention, the method further includes:
[0011] Constructing a first definition set according to definition configuration information of each service resource in the container cluster management tool in the current cycle;
[0012] The initial preset resource composition table is used as the preset resource composition table of the previous cycle, and the service resources corresponding to the first definition set are compared with the service resources in the preset resource composition table of the previous cycle, and a second definition set is obtained according to the comparison result, wherein the definition configuration information in the second definition set is the definition configuration information corresponding to the service resources existing in the first definition set and not existing in the preset resource composition table of the previous cycle;
[0013] According to the owner relationship field information of the resource instance corresponding to each definition configuration information in the second definition set, the preset resource composition table of the previous period is updated to obtain the preset resource composition table of the current period.
[0014] According to an abnormal information processing method provided by the present invention, the initial preset resource composition table is constructed by the following steps:
[0015] In the resource composition table initialization construction phase, the owner relationship field information corresponding to each service resource is obtained according to the definition configuration information of each service resource in the resource composition table initialization construction phase;
[0016] According to the owner relationship field information, the master-slave relationship information between each service resource in the container cluster management tool is determined, and according to the master-slave relationship information, the initial preset resource composition table is constructed.
[0017] According to an abnormal information processing method provided by the present invention, the preset resource composition table of the previous cycle is updated according to the owner relationship field information of the resource instance corresponding to each definition configuration information in the second definition set to obtain the preset resource composition table of the current cycle, including:
[0018] Obtain resource instances corresponding to each definition configuration information in the second definition set in the container cluster management tool, and construct resource instance sets for each definition configuration information;
[0019] Traverse the resource instance set, and when it is determined that the target resource instance in the resource instance set contains target owner relationship field information, determine whether there is master-slave relationship information corresponding to the target owner relationship field information in the preset resource composition table of the previous period; if not, update the corresponding master-slave relationship information in the preset resource composition table of the previous period according to the target owner relationship field information.
[0020] According to a method for processing abnormal information provided by the present invention, the method further includes:
[0021] When it is determined that the target resource instance in the resource instance set does not contain the target owner relationship field information, determine whether the master-slave relationship information corresponding to the target resource instance in the preset resource composition table of the previous cycle is empty; if not empty, update the master-slave relationship information corresponding to the target resource instance in the preset resource composition table of the previous cycle.
[0022] According to an abnormal information processing method provided by the present invention, after updating the corresponding master-slave relationship information in the preset resource composition table of the previous cycle according to the target owner relationship field information, the method further includes:
[0023] Based on the master-slave relationship information between each of the service resources in the updated preset resource composition table, and according to the definition configuration information of each of the service resources, construct a sub-resource list of the current period composed of sub-resources of each of the service resources;
[0024] According to the state information and event information of the resource instances corresponding to the inference service name information of the current cycle, a state set of the current cycle and an event set of the current cycle are respectively constructed;
[0025] Based on the inference service name information of the current cycle and the mapping relationship between the corresponding state set of the current cycle, the event set of the current cycle and the sub-resource list of the current cycle, the state and event database of the previous cycle is updated.
[0026] According to an abnormal information processing method provided by the present invention, the state information and event information of the resource instances corresponding to each inference service name information of the current period are used to construct a state set of the current period and an event set of the current period respectively, including:
[0027] Constructing a sub-resource instance set according to the resource instance corresponding to the target definition configuration information in the sub-resource list of the current period;
[0028] According to the state information of the target sub-resource instance in the sub-resource instance set, the state set of the current cycle is constructed; according to the event information of the target sub-resource instance in the sub-resource instance set, the event set of the current cycle is constructed, wherein the reasoning service name in the owner relationship field information of the target sub-resource instance belongs to the reasoning service name set of the current cycle, and the reasoning service name set of the current cycle is constructed based on the reasoning service name information of multiple current cycles;
[0029] The mapping relationship between the inference service name information of the current cycle and the corresponding state set of the current cycle, the event set of the current cycle and the sub-resource list of the current cycle is used to update the state and event database of the previous cycle, including:
[0030] Based on the inference service name information of the current cycle, determine whether there are changes in the state set of the previous cycle and the event set of the previous cycle according to the corresponding state set of the current cycle and the corresponding event set of the current cycle. If there are changes, update the corresponding states and events in the state and event database of the previous cycle according to the state set of the current cycle and the event set of the current cycle.
[0031] According to a method for processing abnormal information provided by the present invention, the method further includes:
[0032] Construct controller type label information based on the correspondence between the controller and the service resources;
[0033] Based on the controller type tag information, the status information and event information of the corresponding resource instance are collected.
[0034] According to a method for processing abnormal information provided by the present invention, the method further includes:
[0035] When a new service resource is acquired, a new reasoning service interface is constructed according to the controller type tag information and definition configuration information corresponding to the new service resource, and based on the new reasoning service interface, the status information and event information of the new service resource are stored in the status and event database.
[0036] According to a method for processing abnormal information provided by the present invention, the method further includes:
[0037] Receive a first input, where the first input includes operation instruction information for deleting the reasoning service interface;
[0038] In response to the first input, the state information and event information corresponding to the inference service interface to be deleted in the state and event database are deleted according to the controller type tag information and definition configuration information of the inference service interface to be deleted.
[0039] According to an abnormal information processing method provided by the present invention, after inputting the state and event information into a large language model and obtaining the reasoning abnormality analysis result corresponding to the target reasoning service output by the large language model, the method further includes:
[0040] When it is determined that the reasoning exception analysis process has not ended, the newly acquired state and event information and the state and event information corresponding to the current reasoning exception analysis result are input into the large language model to obtain a new reasoning exception analysis result output by the large language model.
[0041] The present invention also provides an abnormal information processing system, comprising:
[0042] An interaction module is used to obtain target reasoning service name information corresponding to the target reasoning service where an abnormal situation occurs;
[0043] The abnormal information collection module is used to obtain the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current period according to the target reasoning service name information, wherein the status and event database is constructed based on the ownership relationship between the service resources in the preset resource composition table, and the status and event database is used to store the status and events of the main service resources and sub-service resources in the ownership relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resources periodically obtained by the container cluster management tool;
[0044] The abnormal information analysis module is used to input the state and event information into the large language model to obtain the reasoning abnormality analysis result corresponding to the target reasoning service output by the large language model.
[0045] The present invention also provides an artificial intelligence platform, including the above-mentioned abnormal information processing system.
[0046] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned abnormal information processing methods is implemented.
[0047] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the abnormal information processing method described in any one of the above is implemented.
[0048] The exception information processing method, system, artificial intelligence platform, device and medium provided by the present invention obtain the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current cycle through the target reasoning service name information corresponding to the target reasoning service where the exception occurs, and then input the status and event information into the large language model to obtain the reasoning exception analysis result corresponding to the target reasoning service, thereby improving the efficiency of reasoning service exception processing, and at the same time can more accurately locate the reasoning service exception problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 A schematic diagram of a process flow of an abnormal information processing method provided by the present invention;
[0051] Figure 2 This is an overall schematic diagram of the abnormal information processing process of the reasoning service in the artificial intelligence platform provided by the present invention;
[0052] Figure 3 A schematic diagram of the process flow of the abnormal information processing system provided by the present invention;
[0053] Figure 4 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] As artificial intelligence technology is applied in more and more industries, how to conveniently deploy, manage and monitor artificial intelligence services has become a problem. Artificial intelligence platforms are born to solve this problem. Currently, as the number of parameters in artificial intelligence models increases, the deployment of artificial intelligence services requires the support of large-scale clusters. Among related technologies, artificial intelligence platforms are mostly built based on the container cluster management tool Kubernetes.
[0056] In kubernetes, resource types are divided into native resources and custom resources. Native resources are built-in resources of kubernetes, such as Pod, Deployment, ReplicaSet, and Service. When native resources do not meet user needs, users can customize resources. Custom resources can be composed of multiple sub-resources, and can also be used to build new custom resources. Therefore, a custom resource may be composed of multiple layers of nested resources. Custom resources are managed and used in the kubernetes cluster like native resources. In addition, when native resources and custom resources are used, they need to be instantiated into specific instances, and the instantiation is performed by the controller of the custom resource.
[0057] In related technologies, artificial intelligence platforms often provide multiple types of reasoning services. For example, using the NodePort type and Deployment of the native Service in Kubernetes to build services, this service provides external access by exposing the server port; or, through Ingress combined with ClusterIP type Service and Deployment to access services through domain names. However, with the rapid development of reasoning services, Kubernetes native resources can no longer meet the needs of reasoning services. At this time, Kubernetes provides a template for custom resource definitions, which allows users to customize the reasoning service type, thereby realizing customized reasoning services.
[0058] In kubernetes, native resources have the definitions of "status" and "events". From "status" and "events", you can get the running status of resources and the exceptions encountered. In kubernetes, events will be automatically cleaned up after one hour, which will limit users and make troubleshooting inconvenient. When customizing resources, they often rely on multiple sub-resources to build, so the status of custom resources is obtained after integrating the status of their corresponding sub-resources. As the scale of sub-resources increases, the logic of obtaining the status of sub-resources becomes very cumbersome, which makes developers spend too much time. For example, in the open source serverless framework knative, the resource KSVC (InferenceService) is customized, which consists of 13 kubernetes native resources or custom resources. When obtaining the status of sub-resources in KSVC, it takes time to sort out the logic of its dependent sub-resources, which leads to a sharp increase in development volume, and it is very easy to cause omissions during sorting. For example, the current version of KSVC cannot obtain the status of its sub-resource ReplicaSet.
[0059] In the artificial intelligence platform solution in the related technology, the reasoning service is generally formed by the corresponding custom resource instance. The exception information of the reasoning service is obtained from the status and events of the custom resource, and the status and events of the custom resource are updated and maintained by the controller of the custom resource. When the controller instantiates the custom resource, it will have its own code logic. This part of the code may also encounter exception information during processing. This part of the exception information and the exception information obtained from the status of all dependent sub-resources are combined and updated to the status, and the exception information is written into the event.
[0060] When handling inference service exception information, developers need to familiarize themselves with the definition of sub-resources through documents or codes and sort out the logic of which sub-resources need to be obtained when writing the logic for obtaining sub-resources. However, when there are too many sub-resources that are manually customized, the logic for obtaining the sub-resource status is very cumbersome, which takes too long for developers and is easy to miss. Since obtaining the exception information of the inference service depends on the status and events of the custom resources, when the custom update status and event logic are omitted, the exception information cannot be passed from the bottom-level sub-resources to the top-level custom resources.
[0061] At the same time, users of artificial intelligence platforms currently do not usually have the ability to troubleshoot errors through Kubernetes exception information, because the definition of resource status and event formats are professional, mixed with code descriptions and Kubernetes professional vocabulary, which is poorly readable for non-professional development users, and most exception information only provides abnormal phenomena, but does not provide solutions. Moreover, the relevant technology cannot handle controller exceptions of custom resources or their sub-resources.
[0062] Figure 1 A flow chart of the abnormal information processing method provided by the present invention is as follows: Figure 1 As shown, the present invention provides an abnormal information processing method, comprising:
[0063] Step 101, obtaining target reasoning service name information corresponding to the target reasoning service where an abnormal situation occurs.
[0064] In the present invention, the large language model service adopts an open source model and is deployed through the Deployment and Service resources in the kubernetes cluster. This approach enables the service to be efficiently expanded and managed, and is also convenient for monitoring and troubleshooting. When the user of the inference service finds that the service is abnormal, a session or request is opened by selecting the corresponding inference service name to further diagnose the problem or obtain the service status.
[0065] Step 102: According to the target reasoning service name information, obtain the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current period, wherein the status and event database is constructed based on the ownership relationship between service resources in a preset resource composition table, and the status and event database is used to store the status and events of the main service resources and sub-service resources in the ownership relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resources periodically obtained by the container cluster management tool.
[0066] In the present invention, when an exception occurs in the reasoning service, the name of the target reasoning service where the exception occurs is first determined. This name is the key starting point for identifying and handling the problem. Through this name, various information and data related to the service can be further queried and analyzed.
[0067] In the present invention, the preset resource composition table is the basis for database construction, which records in detail the definition and configuration information of service resources, which is periodically obtained through container cluster management tools (such as kubernetes). In kubernetes, each service (such as Deployment, Pod, etc.) has its definition configuration, including required resources, dependencies, and environment variables. The preset resource composition table is constructed based on these definition configuration information, which clarifies the ownership relationship between the main service resources (such as an overall reasoning service) and the sub-service resources (such as the various Pods or containers that make up the service). Among them, in the preset resource composition table, each main service resource is assigned a group of sub-service resources. Through this ownership relationship, it is possible to clearly know which resources belong to which service, so that status monitoring and event tracking can be performed for specific services.
[0068] The state and event database uses the attribution relationship in the preset resource composition table to store the state and events of all main service resources and service resources corresponding to each inference service name information. In the present invention, when the system needs to obtain the state and event information of each service resource corresponding to the service based on the target inference service name information, it first queries the preset resource composition table to find the attribution relationship of all main service resources and service resources corresponding to the service name. Then, based on these attribution relationships, the corresponding state and event information is retrieved and returned in the state and event database.
[0069] Step 103: input the state and event information into a large language model, and obtain a reasoning anomaly analysis result corresponding to the target reasoning service output by the large language model.
[0070] In the present invention, a trained large language model (LLM) is required, such as BERT or other similar models based on the Transformer structure. These models usually have powerful text understanding and generation capabilities, can process complex natural language inputs, and generate meaningful natural language outputs. Then, the state information and event logs of the target reasoning service previously retrieved from the state and event database are sorted, including converting log messages, error codes, resource usage, etc. into a structured format for model processing.
[0071] Convert some non-text data (such as numbers, timestamps, etc.) into text format and perform corresponding text encoding or preprocessing so that the model can better understand it. Optionally, clean the input data to remove irrelevant information, noise or duplicates to ensure the quality and accuracy of the input data.
[0072] Furthermore, the prepared state and event information is provided as input data to the large language model. The large language model first understands the input text content, including state descriptions, event logs, etc., and identifies key information, contextual relationships, and potential patterns. Based on the knowledge and patterns learned by the model during training, the input state and event information is analyzed by reasoning, including identifying abnormal patterns, diagnosing the cause of the problem, and predicting future trends.
[0073] Finally, the large language model generates one or more reasoning anomaly analysis results in natural language output, including a description of the problem, the cause of the problem, and suggested solutions or further diagnostic steps.
[0074] On the basis of the above embodiment, after inputting the state and event information into the large language model and obtaining the reasoning anomaly analysis result corresponding to the target reasoning service output by the large language model, the method further includes:
[0075] When it is determined that the reasoning exception analysis process has not ended, the newly acquired state and event information and the state and event information corresponding to the current reasoning exception analysis result are input into the large language model to obtain a new reasoning exception analysis result output by the large language model.
[0076] In the present invention, the large language model service adopts an open source model, is deployed in the cluster in the form of Deployment and Service, and performs abnormal information processing through interactive abnormality troubleshooting. The specific steps are as follows:
[0077] Step 1: When the inference service client determines that there is an inference service anomaly, it starts a session by selecting the inference service name;
[0078] Step 2: According to the inference service name, obtain the status and events of the corresponding inference service from the database;
[0079] Step 3: The service status and events are converted into prompts, and the prompts are input into the large language model service;
[0080] Step 4: After the large language model service processes the data, it returns the response to the inference service client.
[0081] Step 5: The inference service user chooses to continue asking questions or end the conversation based on the response. If the user chooses to continue asking questions, the state and events are input into the large language model service as a historical conversation, so as to proceed to the next round of conversation.
[0082] In the present invention, when it is determined that the reasoning anomaly analysis process has not ended, continuing to use the large language model for in-depth anomaly diagnosis is an iterative and gradually refined process. When the reasoning anomaly analysis has not ended, it means that the reasoning anomaly analysis has been performed, but based on the current information and results, the root cause or solution of the problem cannot be fully determined, and further input and analysis are required.
[0083] Furthermore, in the next round of reasoning anomaly analysis, new state data (such as system performance indicators, resource usage, etc.) and event information (such as error logs, user feedback, etc.) may continue to be collected. At this time, the newly acquired state and event information are integrated with the state and event information corresponding to the current reasoning anomaly analysis result to form an input set containing more complete information. After model processing and reasoning, the large language model will output a new reasoning anomaly analysis result, which may be more accurate and detailed, and contain solutions to new problems or further diagnostic suggestions. If the result is still not clear or accurate enough, it is necessary to continue to collect more state and event information and repeat the above process.
[0084] The exception information processing method provided by the present invention obtains the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current cycle through the target reasoning service name information corresponding to the target reasoning service where the exception occurs, and then inputs the status and event information into the large language model to obtain the reasoning exception analysis result corresponding to the target reasoning service, thereby improving the efficiency of reasoning service exception processing, and at the same time can more accurately locate the reasoning service exception problem.
[0085] Based on the above embodiment, the method further includes:
[0086] Constructing a first definition set according to definition configuration information of each service resource in the container cluster management tool in the current cycle;
[0087] The initial preset resource composition table is used as the preset resource composition table of the previous cycle, and the service resources corresponding to the first definition set are compared with the service resources in the preset resource composition table of the previous cycle, and a second definition set is obtained according to the comparison result, wherein the definition configuration information in the second definition set is the definition configuration information corresponding to the service resources existing in the first definition set and not existing in the preset resource composition table of the previous cycle;
[0088] According to the owner relationship field information of the resource instance corresponding to each definition configuration information in the second definition set, the preset resource composition table of the previous period is updated to obtain the preset resource composition table of the current period.
[0089] In the present invention, a composition table (i.e., preset resource composition table) constructed by native resources and custom resources is maintained to record how resources and their sub-resources are composed, so that the composition relationship of resources can be obtained by querying this table during abnormal collection. Since the relationship in the preset resource composition table is obtained by automatically analyzing the cluster resource definition and instance method, there is no need for developers to manually analyze, thereby saving development time and avoiding the problem of omissions caused by manual combing. This method can be applied to all native resources and custom resources, and can adapt to custom resources added by developers in the future.
[0090] Since custom resources may be added to the cluster at any time, the maintenance of all resource composition tables is a cyclical program that runs through the process of automatic resource status acquisition. When initializing the exception information collection module, the table is initialized to empty, and the definition and configuration information of all native resources and custom resources in the cluster are obtained by calling the Kubernetes API server to build the initial preset resource composition table.
[0091] On the basis of the above embodiment, the preset resource composition table of the previous period is updated according to the owner relationship field information of the resource instance corresponding to each definition configuration information in the second definition set to obtain the preset resource composition table of the current period, including:
[0092] Obtain resource instances corresponding to each definition configuration information in the second definition set in the container cluster management tool, and construct resource instance sets for each definition configuration information;
[0093] Traverse the resource instance set, and when it is determined that the target resource instance in the resource instance set contains target owner relationship field information, determine whether there is master-slave relationship information corresponding to the target owner relationship field information in the preset resource composition table of the previous period; if not, update the corresponding master-slave relationship information in the preset resource composition table of the previous period according to the target owner relationship field information.
[0094] Based on the above embodiment, the method further includes:
[0095] When it is determined that the target resource instance in the resource instance set does not contain the target owner relationship field information, determine whether the master-slave relationship information corresponding to the target resource instance in the preset resource composition table of the previous cycle is empty; if not empty, update the master-slave relationship information corresponding to the target resource instance in the preset resource composition table of the previous cycle.
[0096] In the present invention, the preset resource composition table is cyclically updated through the following steps:
[0097] Step 11: every S seconds, obtain the definition configuration information of all native resources and custom resources in the cluster in the current period to form a set T, that is, the first definition set.
[0098] Step 12, determine whether each item in the set T already exists in the resource column of the preset resource composition table of the previous cycle (if the previous cycle is the resource composition table initialization construction stage, the preset resource composition table of the previous cycle is the initial preset resource composition table), if yes, go to step 11, otherwise, build a set N (i.e., the second definition set) according to the service resource group that does not exist in the preset resource composition table of the previous cycle, and execute the next step 13;
[0099] Step 13, traverse the set N, and obtain the corresponding resource instance in cluster N through the definition configuration information of the resource. The specific steps are as follows: Step 1, first obtain the definition configuration information n of a service resource; Step 2, obtain all instances of n in the cluster by calling the Kubernetes API server and form a set R; Step 3, if the set R is empty, jump to step 1, and obtain the definition configuration information of the next resource from the set N. If the set R is not empty, go to step 14;
[0100] Step 14, traverse the set R, obtain an instance r, and determine whether the instance r has the OwnerReference field information of the owner relationship. If so, use this field to reversely query the service resource m to which it belongs, and determine whether the preset resource composition table of the previous cycle already has a master-slave relationship with the service resource listed as m and the sub-resource listed as n. If not, update the preset resource composition table of the previous cycle, otherwise obtain the next instance from the set R; if the instance r does not have the OwnerReference field information, determine whether the preset resource composition table of the previous cycle already has a relationship with the service resource listed as m and the sub-resource listed as empty. If not, update the preset resource composition table, otherwise obtain the next instance from the set R;
[0101] Step 15, after the set R is traversed, jump to step 1 in step 13, and take the definition configuration information of the next resource from the set N until the set N is traversed.
[0102] The specific form of the preset resource composition table provided by the present invention can be referred to as shown in Table 1:
[0103] Table 1 Preset resource composition table
[0104]
[0105] The present invention ensures the accuracy and real-time nature of resource information by real-time monitoring and dynamic updating of resource composition in the Kubernetes cluster, while providing the capability of resource relationship management, thus providing strong support for automated operation and maintenance, resource optimization and troubleshooting of the cluster.
[0106] Based on the above embodiment, the initial preset resource composition table is constructed by the following steps:
[0107] In the resource composition table initialization construction phase, the owner relationship field information corresponding to each service resource is obtained according to the definition configuration information of each service resource in the resource composition table initialization construction phase;
[0108] According to the owner relationship field information, the master-slave relationship information between each service resource in the container cluster management tool is determined, and according to the master-slave relationship information, the initial preset resource composition table is constructed.
[0109] In the present invention, during the initialization construction phase of the resource composition table, it is first necessary to obtain the definition configuration information of all service resources in the cluster from the Kubernetes API Server. The definition configuration information of each service resource includes the resource type, name, namespace, specification (such as number of replicas, container image, etc.) and other information.
[0110] After obtaining the definition configuration information of the service resource, the next step is to determine whether each resource contains an owner relationship field (OwnerReference). OwnerReference is an important metadata field in Kubernetes, which allows clear ownership relationships to be established between resources. When a resource is created or managed by another resource, the latter is set as the owner of the former. By analyzing the OwnerReference field of the service resource, the master-slave relationship between the various service resources in the cluster can be determined. For example, if the OwnerReference of a Pod points to a Deployment, then it can be considered that the Pod is managed by the Deployment, thus forming a master-slave relationship with the Deployment as the master and the Pod as the slave.
[0111] After determining the master-slave relationship between service resources, construct an initial preset resource composition table. This table will store the definition information of all service resources in the cluster and the master-slave relationship between them in a structured manner, and contains multiple entries, each of which represents a service resource and contains its name, type, namespace, owner relationship and other information. Through this information, the hierarchy and dependency of resources in the cluster can be clearly understood. In the present invention, this initial preset resource composition table is not only the basis for subsequent dynamic updates and resource management, but also an important tool for understanding cluster structure and troubleshooting. As the cluster runs and resources change, this table will be continuously updated and improved to always keep in sync with the actual state of the cluster.
[0112] On the basis of the above embodiment, after updating the corresponding master-slave relationship information in the preset resource composition table of the previous cycle according to the target owner relationship field information, the method further includes:
[0113] Based on the master-slave relationship information between each of the service resources in the updated preset resource composition table, and according to the definition configuration information of each of the service resources, a sub-resource list of the current period composed of sub-resources of each of the service resources is constructed;
[0114] According to the state information and event information of the resource instances corresponding to the inference service name information of the current cycle, a state set of the current cycle and an event set of the current cycle are respectively constructed;
[0115] Based on the inference service name information of the current cycle and the mapping relationship between the corresponding state set of the current cycle, the event set of the current cycle and the sub-resource list of the current cycle, the state and event database of the previous cycle is updated.
[0116] In the present invention, the service resources (such as Deployments, StatefulSets, etc.) in the kubernetes cluster usually manage multiple sub-resources (such as Pods, PersistentVolumes, etc.), which are the carriers of the actual work performed by the service resources. Based on the updated preset resource composition table, the system can identify the master-slave relationship between each service resource. By presetting this relationship, a list composed of sub-resources of these service resources in the current cycle can be further constructed according to the definition configuration information of each service resource.
[0117] In the present invention, the sub-resource list is a dynamically updated set that reflects which sub-resources belong to which service resources at the current point in time. At the same time, the kubernetes API or other monitoring tools are regularly queried to obtain the status information and event information of the resource instances (such as Pods) corresponding to the name information of each inference service in the current cycle, wherein the status information includes the running status of the resource (such as Running, Pending, Failed, etc.), resource utilization (such as CPU usage, memory usage, etc.) and other performance-related indicators; the event information records various events that occur in the life cycle of the resource, such as creation, update, deletion, failure, etc., as well as the causes and results of these events. Furthermore, these status information and event information are respectively organized into the status set and event set of the current cycle to facilitate subsequent analysis and processing.
[0118] After obtaining the sub-resource list, state set, and event set of the current cycle, this information is compared and updated with the state and event database of the previous cycle. This database is used to store the historical state and event information of each service and its sub-resources in the cluster. During the update process, based on the inference service name information of each current cycle and the mapping relationship between these noun information and the state set, event set, and sub-resource list of the current cycle, the corresponding service record in the database of the previous cycle is first searched, and then the new information of the current cycle (such as state changes, new events, increase or decrease of sub-resources, etc.) is merged or replaced with the old information.
[0119] Through the above process, the present invention can ensure the timeliness and accuracy of the status and event database, laying a foundation for the work of automatic operation and maintenance, fault prediction and performance tuning of the cluster.
[0120] On the basis of the above embodiment, the state information and event information of the resource instances corresponding to the inference service name information of the current period are used to construct the state set of the current period and the event set of the current period respectively, including:
[0121] Constructing a sub-resource instance set according to the resource instance corresponding to the target definition configuration information in the sub-resource list of the current period;
[0122] According to the state information of the target sub-resource instance in the sub-resource instance set, the state set of the current cycle is constructed; according to the event information of the target sub-resource instance in the sub-resource instance set, the event set of the current cycle is constructed, wherein the reasoning service name in the owner relationship field information of the target sub-resource instance belongs to the reasoning service name set of the current cycle, and the reasoning service name set of the current cycle is constructed based on the reasoning service name information of multiple current cycles;
[0123] The mapping relationship between the inference service name information of the current cycle and the corresponding state set of the current cycle, the event set of the current cycle and the sub-resource list of the current cycle is used to update the state and event database of the previous cycle, including:
[0124] Based on the inference service name information of the current cycle, determine whether there are changes in the state set of the previous cycle and the event set of the previous cycle according to the corresponding state set of the current cycle and the corresponding event set of the current cycle. If there are changes, update the corresponding states and events in the state and event database of the previous cycle according to the state set of the current cycle and the event set of the current cycle.
[0125] The reasoning service is generally formed by the corresponding custom resource instance. When obtaining the abnormal information of the reasoning service, the present invention needs to obtain it from the status and events of the custom resource. The existing reasoning service name is read from the status and event database every S seconds, and the resource status and event are obtained according to the following steps:
[0126] Step 21, initialize the state set A, event set B and instance name set P to be empty, and the sub-resource list D to be an empty list.
[0127] Step 22, obtain the resource instance corresponding to the reasoning service, add the state and event of the instance to the state set A and the event set B, add the instance name to P, and obtain the definition configuration information of its resource k through the resource instance.
[0128] In the present invention, when obtaining the composition relationship corresponding to resource k from the preset resource composition table, in order to ensure that the previous sub-resources have been traversed when the subsequent sub-resources are traversed, the ownership relationship can be determined by comparing the name in the OwnerReference in the subsequent resource with the name of the previous instance. The specific process is: find the row corresponding to resource k in the preset resource composition table (refer to Table 1), and add it to a resource collection; then, traverse the sub-resource list D from front to back, and obtain an element d (such as kind11 in the subsequent Table 2). If element d is in the resource column of the preset resource composition table, the sub-resource definition corresponding to element d is added to the resource collection; when traversing to the end of the sub-resource list D, it means that the sub-resources of resource k have been obtained. For example, referring to Table 1, the inference service is instantiated by kind11 in Table 1, and the partial composition of the resource collection is shown in Table 2:
[0129] Table 2
[0130]
[0131] In Table 2, 1 to 4 represent the serial numbers of the corresponding sub-resource elements traversed from the sub-resource list D from front to back, wherein the sub-resources corresponding to resource kind11 are kind5 and kind10, respectively. Furthermore, the sub-resources corresponding to kind5 are kind6, kind7, kind8 and kind9, respectively, and the sub-resource corresponding to kind9 is kind12.
[0132] Step 23, traverse the resource collection and obtain an element d therefrom.
[0133] Step 24, call the Kubernetes API server to obtain all instances of element d in the cluster and form a set Q.
[0134] Step 25, traverse the set Q, take out an instance q, and determine whether the name in the OwnerReference field of instance q belongs to the instance name set P. If so, add the state of instance q to the state set A, add the event of instance q to the event set B, and add the name of instance q to the instance name set P. If not, re-execute step 25 and take out the next instance from the set Q.
[0135] Step 26, after completing the traversal of the set Q, jump to step 23 to process the next element in the resource set until the traversal of the resource set is completed.
[0136] Step 27, after the resource set traversal is completed, the state and event corresponding to the name are obtained from the state and event database (i.e., the state and event database of the previous cycle) according to the inference service name, and the current state set A and the current event set B are compared with the state and events of the state and event database of the previous cycle. If there are changes, the changed state and events are stored in the database to complete the update of the database; otherwise, they are not stored in the database and the state and events in the database remain unchanged.
[0137] Based on the above embodiment, the method further includes:
[0138] Construct controller type label information based on the correspondence between the controller and the service resources;
[0139] Based on the controller type tag information, the status information and event information of the corresponding resource instance are collected.
[0140] The controller is used to instantiate custom resources or native resources in Kubernetes. Each custom resource or native resource has a corresponding controller. The controller is a process running in the Pod in the cluster. If there is a problem with the process, the resource cannot be instantiated, and the status and events of the resource instance cannot be obtained.
[0141] In the present invention, in order to effectively manage and monitor resources, resource instances (such as Pods, Services, etc.) are labeled (Labels) and annotated (Annotations). These labels and annotations provide a way to attach metadata to objects, so that objects can be queried and managed in a flexible way by users and organizations, which helps to quickly identify which resources are managed by which controller in the cluster, thereby supporting more refined management and monitoring strategies. When resource instances are marked with labels representing controller types, these labels can be used to efficiently collect and manage the status information and event information of these resource instances.
[0142] Based on the above embodiment, the method further includes:
[0143] When a new service resource is acquired, a new reasoning service interface is constructed according to the controller type tag information and definition configuration information corresponding to the new service resource, and based on the new reasoning service interface, the status information and event information of the new service resource are stored in the status and event database.
[0144] Based on the above embodiment, the method further includes:
[0145] Receive a first input, where the first input includes operation instruction information for deleting the reasoning service interface;
[0146] In response to the first input, the state information and event information corresponding to the inference service interface to be deleted in the state and event database are deleted according to the controller type tag information and definition configuration information of the inference service interface to be deleted.
[0147] In the present invention, when a new reasoning service is added, the reasoning service name is passed in through a new interface and written into the status and event database; when a reasoning service is deleted, the status and events of the corresponding service in the status and event database are deleted through a deletion interface.
[0148] Specifically, through the newly added interface, developers only need to pass the controller's label and the resource definition it controls, and they can use the label to obtain which pods the controller runs in. In the present invention, the state and events of the pod are collected every S seconds, and then the custom resource is used as the index, and the state and events are added to the database as values. When the inference service queries the abnormal information, the state of the controller that controls the resource can be retrieved through the resource definition of the inference service. For the operation of deleting the interface, the state and events of the corresponding controller can be deleted according to the controller label to be deleted and the resource definition it controls.
[0149] Figure 2 This is an overall schematic diagram of the abnormal information processing process of the reasoning service in the artificial intelligence platform provided by the present invention, which can be referred to Figure 2 As shown, in one embodiment, the overall process of the present invention is described:
[0150] First, when deploying the artificial intelligence platform, the abnormal information collection module and the artificial intelligence solution module are deployed to the artificial intelligence platform, and the abnormal information collection module is initialized, and the large language model service of the artificial intelligence solution module is deployed.
[0151] Then, create custom resources according to their needs, deploy the custom resources and their controllers to the Kubernetes cluster, and then instantiate the custom resources to create an inference service.
[0152] Furthermore, the automatic maintenance function of the resource composition table of the abnormal information collection module detects the definition of the custom resource and finds that there is no composition relationship in the resource composition table of the previous cycle. Therefore, it detects all resource instances in the cluster and determines which sub-resources belong to the custom resource based on the OwnerReference field, and then maintains the composition relationship in the resource composition table.
[0153] Furthermore, the resource status and event acquisition function of the abnormal information collection module obtains the composition relationship set of the custom resource corresponding to the reasoning service from the resource composition table, and then traverses the instances of the sub-resources in the composition relationship set, and obtains the status and events of the instances of the sub-resources belonging to the reasoning service. Finally, all the status and events are compared with the existing status and events in the database, and if there are any updates, they are stored in the database.
[0154] For the newly added interface of the controller status collection function that calls the exception information collection module, the controller label and the custom resource definition it controls are passed. The controller status collection function collects the status and events of the pod every S seconds, and then uses the custom resource as the index and adds the status and events as values to the database.
[0155] Furthermore, when there is an inference service exception, the inference service name is selected in the interactive session provided by the artificial intelligence solution module to start the session. The interactive exception troubleshooting module retrieves the status and events of the corresponding service from the status and event database according to the inference service name, and forms a prompt, which is input into the large language model service. The large language model service transmits the cause of the exception to the service user based on the relevant knowledge base, and the service user can choose to continue to ask questions or end the session according to the response. If the user chooses to continue to ask questions, the status and events are input into the large language model service as a historical session, so as to conduct the next round of dialogue.
[0156] When you need to delete an inference service, you can use the delete interface of the resource status and event acquisition function to delete the status and events of the corresponding service in the database. When custom resources and controllers are deleted, developers can delete the status and events of the controller by passing the controller tag and the resource definition it controls through the delete interface of the controller status acquisition function.
[0157] The present invention aims to solve the problems in the related art of long investment time, easy omissions, poor readability of custom resource status and event formats, inability to handle controller exceptions, and short event storage time when developing custom resource status logic. The present invention can automatically obtain resource status, use artificial intelligence tools to interpret exception information, add acquisition controller exception processing, and store exception events into a database, thereby solving the problems existing in the related art.
[0158] The abnormal information processing system provided by the present invention is described below. The abnormal information processing system described below and the abnormal information processing method described above can be referred to each other.
[0159] Figure 3 A flow chart of the abnormal information processing system provided by the present invention is as follows: Figure 3 As shown, the present invention provides an exception information processing system, including an interaction module 301, an exception information collection module 302 and an exception information analysis module 303, wherein the interaction module 301 is used to obtain the target reasoning service name information corresponding to the target reasoning service where the exception occurs; the exception information collection module 302 is used to obtain the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current period according to the target reasoning service name information, wherein the status and event database is constructed based on the attribution relationship between the service resources in the preset resource composition table, and the status and event database is used to store the status and events of the main service resources and sub-service resources in the attribution relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resources periodically obtained by the container cluster management tool; the exception information analysis module 303 is used to input the status and event information into the large language model, and obtain the reasoning exception analysis result corresponding to the target reasoning service output by the large language model.
[0160] The exception information processing system provided by the present invention obtains the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current cycle through the target reasoning service name information corresponding to the target reasoning service where the exception occurs, and then inputs the status and event information into the large language model to obtain the reasoning exception analysis result corresponding to the target reasoning service, thereby improving the efficiency of reasoning service exception processing, and at the same time can more accurately locate the reasoning service exception problem.
[0161] The system provided by the present invention is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the specific processes and detailed contents, which will not be repeated here.
[0162] The present invention also provides an artificial intelligence platform, including the abnormal information processing system described in the above embodiment.
[0163] In the present invention, when the artificial intelligence platform detects an abnormality in a certain reasoning service, it will first determine the specific name or identifier of the service (i.e., the "target reasoning service name information") to ensure that subsequent analysis and processing can be performed on the specific service. Next, the artificial intelligence platform will use a status and event database of the current cycle. By querying this database, it can obtain the current and recent detailed status information and related event records of the target reasoning service. Furthermore, the collected status and event information will be passed as input to a large language model (such as BERT, etc.). Within the large language model, this information will be used for in-depth analysis, including identifying abnormal patterns, evaluating the impact of abnormalities on service performance, and inferring possible causes of abnormalities. Finally, the large language model will output one or more reasoning anomaly analysis results, which include a specific description of the anomaly, the scope of impact, the severity, and recommended solutions or directions for further investigation.
[0164] The artificial intelligence platform provided by the present invention obtains the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current cycle through the target reasoning service name information corresponding to the target reasoning service where the abnormal situation occurs, and then inputs the status and event information into the large language model to obtain the reasoning exception analysis result corresponding to the target reasoning service, thereby improving the efficiency of reasoning service exception handling, and at the same time can more accurately locate the reasoning service exception problem.
[0165] Figure 4 A schematic diagram of the structure of an electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor (Processor) 401, a communication interface (Communications Interface) 402, a memory (Memory) 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404. The processor 401 may call the logic instructions in the memory 403 to execute the abnormal information processing method, which includes: obtaining the target reasoning service name information corresponding to the target reasoning service where the abnormal situation occurs; according to the target reasoning service name information, obtaining the state and event information of each service resource corresponding to the target reasoning service from the state and event database of the current cycle, wherein the state and event database is constructed based on the attribution relationship between the service resources in the preset resource composition table, and the state and event database is used to store the state and event of the main service resource and the sub-service resource in the attribution relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resource periodically obtained by the container cluster management tool; the state and event information is input into the large language model to obtain the reasoning abnormality analysis result corresponding to the target reasoning service output by the large language model.
[0166] In addition, the logic instructions in the above-mentioned memory 403 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0167] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the exception information processing method provided by the above methods, and the method includes: obtaining the target reasoning service name information corresponding to the target reasoning service where the exception occurs; according to the target reasoning service name information, obtaining the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current cycle, wherein the status and event database is constructed based on the attribution relationship between the service resources in the preset resource composition table, and the status and event database is used to store the status and events of the main service resources and sub-service resources in the attribution relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resources periodically obtained by the container cluster management tool; the status and event information is input into a large language model to obtain the reasoning exception analysis result corresponding to the target reasoning service output by the large language model.
[0168] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the exception information processing method provided in the above-mentioned embodiments, the method comprising: obtaining target reasoning service name information corresponding to the target reasoning service where an exception occurs; according to the target reasoning service name information, obtaining the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current cycle, wherein the status and event database is constructed based on the attribution relationship between service resources in a preset resource composition table, and the status and event database is used to store the status and events of the main service resources and sub-service resources in the attribution relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resources periodically obtained by the container cluster management tool; the status and event information is input into a large language model to obtain the reasoning exception analysis result corresponding to the target reasoning service output by the large language model.
[0169] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing abnormal information, characterized in that: include: Obtain the target reasoning service name information corresponding to the target reasoning service where the abnormal situation occurs; According to the target reasoning service name information, the status and event information of each service resource corresponding to the target reasoning service is obtained from the status and event database of the current period, wherein the status and event database is constructed based on the ownership relationship between the main service resource and the sub-service resource in the preset resource composition table, and the status and event database is used to store the status and events of the main service resource and the sub-service resource in the ownership relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resource periodically obtained by the container cluster management tool, wherein the preset resource composition table stores the definition information of all service resources in the cluster and the master-slave relationship between the service resources in a structured manner, and the preset resource composition table contains multiple entries, each entry represents a service resource, and the entry contains the name information, type information, namespace information and owner relationship information of the service resource; The state and event information are input into a large language model, and a reasoning anomaly analysis result corresponding to the target reasoning service is obtained by outputting the large language model.
2. The abnormal information processing method according to claim 1, characterized in that: The method further comprises: Constructing a first definition set according to definition configuration information of each service resource in the container cluster management tool in the current cycle; The initial preset resource composition table is used as the preset resource composition table of the previous cycle, and the service resources corresponding to the first definition set are compared with the service resources in the preset resource composition table of the previous cycle, and a second definition set is obtained according to the comparison result, wherein the definition configuration information in the second definition set is the definition configuration information corresponding to the service resources existing in the first definition set and not existing in the preset resource composition table of the previous cycle; According to the owner relationship field information of the resource instance corresponding to each definition configuration information in the second definition set, the preset resource composition table of the previous period is updated to obtain the preset resource composition table of the current period.
3. The abnormal information processing method according to claim 2, characterized in that: The initial preset resource composition table is constructed by the following steps: In the resource composition table initialization construction phase, the owner relationship field information corresponding to each service resource is obtained according to the definition configuration information of each service resource in the resource composition table initialization construction phase; According to the owner relationship field information, the master-slave relationship information between each service resource in the container cluster management tool is determined, and according to the master-slave relationship information, the initial preset resource composition table is constructed.
4. The abnormal information processing method according to claim 3, characterized in that: The updating of the preset resource composition table of the previous cycle according to the owner relationship field information of the resource instance corresponding to each definition configuration information in the second definition set to obtain the preset resource composition table of the current cycle includes: Obtain resource instances corresponding to each definition configuration information in the second definition set in the container cluster management tool, and construct resource instance sets for each definition configuration information; Traverse the resource instance set, and when it is determined that the target resource instance in the resource instance set contains target owner relationship field information, determine whether there is master-slave relationship information corresponding to the target owner relationship field information in the preset resource composition table of the previous period; if not, update the corresponding master-slave relationship information in the preset resource composition table of the previous period according to the target owner relationship field information.
5. The abnormal information processing method according to claim 4, characterized in that: The method further comprises: When it is determined that the target resource instance in the resource instance set does not contain the target owner relationship field information, determine whether the master-slave relationship information corresponding to the target resource instance in the preset resource composition table of the previous cycle is empty; if not empty, update the master-slave relationship information corresponding to the target resource instance in the preset resource composition table of the previous cycle.
6. The abnormal information processing method according to claim 4, characterized in that: After updating the corresponding master-slave relationship information in the preset resource composition table of the previous cycle according to the target owner relationship field information, the method further includes: Based on the master-slave relationship information between each of the service resources in the updated preset resource composition table, and according to the definition configuration information of each of the service resources, construct a sub-resource list of the current period composed of sub-resources of each of the service resources; According to the state information and event information of the resource instances corresponding to the inference service name information of the current cycle, a state set of the current cycle and an event set of the current cycle are respectively constructed; Based on the inference service name information of the current cycle and the mapping relationship between the corresponding state set of the current cycle, the event set of the current cycle and the sub-resource list of the current cycle, the state and event database of the previous cycle is updated.
7. The abnormal information processing method according to claim 6, characterized in that: The state information and event information of the resource instances corresponding to the inference service name information of the current period are used to construct the state set and the event set of the current period respectively, including: Constructing a sub-resource instance set according to the resource instance corresponding to the target definition configuration information in the sub-resource list of the current period; According to the state information of the target sub-resource instance in the sub-resource instance set, the state set of the current cycle is constructed; according to the event information of the target sub-resource instance in the sub-resource instance set, the event set of the current cycle is constructed, wherein the reasoning service name in the owner relationship field information of the target sub-resource instance belongs to the reasoning service name set of the current cycle, and the reasoning service name set of the current cycle is constructed based on the reasoning service name information of multiple current cycles; The mapping relationship between the inference service name information of the current cycle and the corresponding state set of the current cycle, the event set of the current cycle and the sub-resource list of the current cycle is used to update the state and event database of the previous cycle, including: Based on the inference service name information of the current cycle, determine whether there are changes in the state set of the previous cycle and the event set of the previous cycle according to the corresponding state set of the current cycle and the corresponding event set of the current cycle. If there are changes, update the corresponding states and events in the state and event database of the previous cycle according to the state set of the current cycle and the event set of the current cycle.
8. The abnormal information processing method according to claim 1, characterized in that: The method further comprises: Construct controller type label information based on the correspondence between the controller and the service resources; Based on the controller type tag information, the status information and event information of the corresponding resource instance are collected.
9. The abnormal information processing method according to claim 8, characterized in that: The method further comprises: When a new service resource is acquired, a new reasoning service interface is constructed according to the controller type tag information and definition configuration information corresponding to the new service resource, and based on the new reasoning service interface, the status information and event information of the new service resource are stored in the status and event database.
10. The abnormal information processing method according to claim 8, characterized in that: The method further comprises: Receive a first input, where the first input includes operation instruction information for deleting the reasoning service interface; In response to the first input, the state information and event information corresponding to the inference service interface to be deleted in the state and event database are deleted according to the controller type tag information and definition configuration information of the inference service interface to be deleted.
11. The abnormal information processing method according to claim 1, characterized in that: After inputting the state and event information into the large language model and obtaining the reasoning anomaly analysis result corresponding to the target reasoning service output by the large language model, the method further includes: When it is determined that the reasoning exception analysis process has not ended, the newly acquired state and event information and the state and event information corresponding to the current reasoning exception analysis result are input into the large language model to obtain a new reasoning exception analysis result output by the large language model.
12. An abnormal information processing system, characterized in that: include: An interaction module is used to obtain target reasoning service name information corresponding to the target reasoning service where an abnormal situation occurs; An abnormal information collection module is used to obtain the status and event information of each service resource corresponding to the target reasoning service from the status and event database of the current period according to the target reasoning service name information, wherein the status and event database is constructed based on the ownership relationship between the main service resource and the sub-service resource in the preset resource composition table, and the status and event database is used to store the status and events of the main service resource and the sub-service resource in the ownership relationship corresponding to each reasoning service name information; the preset resource composition table is constructed based on the definition configuration information of the service resource periodically obtained by the container cluster management tool, wherein the preset resource composition table stores the definition information of all service resources in the cluster and the master-slave relationship between service resources in a structured manner, and the preset resource composition table contains multiple entries, each entry represents a service resource, and the entry contains the name information, type information, namespace information and owner relationship information of the service resource; The abnormal information analysis module is used to input the state and event information into the large language model to obtain the reasoning abnormality analysis result corresponding to the target reasoning service output by the large language model.
13. An artificial intelligence platform, characterized in that: Includes the abnormal information processing system as described in claim 12.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the abnormal information processing method according to any one of claims 1 to 11 is implemented.
15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the abnormal information processing method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Model instance quantity control method and device based on model servitization
CN115309551A
Deep learning model feature data calling method and device, equipment and medium
CN116562394A