Dynamic segmentation method and system for multivariate time series anomaly detection diffusion model
By dynamically segmenting the time series anomaly detection model in the cloud environment, the segmentation points are adjusted according to the network performance indicators, the problems of uneven resource allocation and low model reliability are solved, and the optimal balance between inference speed and energy consumption is achieved. and model robustness.
Patent Information
- Application Number
- CN202411075941.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-20
AI Technical Summary
When deploying time series anomaly detection models in an inter-cloud environment, there are problems of uneven resource allocation and low model reliability, especially in heterogeneous cloud resources. Clouds close to application scenarios have limited computing resources, resulting in detection and inference Slow speeds and model compression or distillation techniques may lead to poor inference performance.
By obtaining the network performance indicators of the cloud network at the current moment, using a dynamic segmentation algorithm to determine the optimal segmentation point in the inference task of each batch, determine the inference before the optimal segmentation point to run on the low-performance node, and the optimal segmentation point is The inference after the segmentation point runs on high-performance nodes, and the allocation of inference tasks is dynamically adjusted to achieve optimal resource utilization.
While ensuring the accuracy of model inference, it makes full use of cloud resources with different computing power in the cloud environment to achieve the optimal balance between inference speed and energy consumption, and enhances the robustness of the model to network fluctuations and reduces communication. Cost and energy consumption.
Smart Images

Figure CN119166327A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information data processing, and in particular to a multivariate time series anomaly detection diffusion model dynamic segmentation method and system. Background Art
[0002] The time series anomaly detection diffusion model is an artificial intelligence model. It aims to discover outliers in time series data and has important applications in industrial control, traffic control, medical services, financial risk control and other fields. However, the time series anomaly detection diffusion model usually has a large number of parameters, which leads to slow detection and reasoning in resource-constrained edge clouds. Deploying such a model in a cloud environment can make full use of various heterogeneous cloud resources to achieve efficient inference of the time series anomaly detection model. The cloud environment consists of heterogeneous cloud resources. Among the heterogeneous cloud resources, the cloud close to the application scenario has limited computing resources and storage resources; while the cloud at the central node has abundant computing and storage resources. Different cloud resources are connected through the Internet.
[0003] The existing methods for deploying deep learning models, including time series anomaly detection models, in multi-cloud environments can be divided into two categories: one is to completely offload the model to high-computing cloud nodes; the other is to use model compression, distillation and other technologies to completely deploy the model on low-computing edge cloud nodes. However, both methods have defects. The former will introduce higher communication costs. Considering that the connection between clouds through the Internet is not always reliable, this method may also lead to a decrease in the reliability of the model. The latter uses model compression, distillation and other technologies to compress the model size to a size that can be deployed on edge cloud nodes, which may lead to poor model reasoning performance. Summary of the invention
[0004] The present invention provides a multivariate time series anomaly detection diffusion model dynamic segmentation method and system, which are used to solve the defects of uneven resource allocation and low model reliability when deploying time series anomaly detection models in a cloud environment in the prior art.
[0005] In a first aspect, the present invention provides a multivariate time series anomaly detection diffusion model dynamic segmentation method, comprising: Get the network performance indicator set of the current cloud network; Using the network performance indicator set, determining the optimal segmentation point in each batch of reasoning tasks through a dynamic segmentation algorithm; It is determined that the inference before the optimal split point is run on the low-performance node, and the inference after the optimal split point is run on the high-performance node.
[0006] According to a multivariate time series anomaly detection diffusion model dynamic segmentation method provided by the present invention, a network performance indicator set of the cloud network at the current moment is obtained, including: The functional relationship between the high-performance cloud inference time and the current split point, as well as the functional relationship between the low-performance cloud inference time and the current split point, are obtained through the test tool; The energy consumption monitoring tool is used to obtain the functional relationship between the energy consumption of high-performance cloud inference and the current split point, as well as the functional relationship between the energy consumption of low-performance cloud inference and the current split point. Use network monitoring tools to obtain the current inter-cloud network transmission rate.
[0007] According to a multivariate time series anomaly detection diffusion model dynamic segmentation method provided by the present invention, the network performance indicator set is used to determine the optimal segmentation point in each batch of reasoning tasks through a dynamic segmentation algorithm, including: Step 1: Initialize the current segmentation point and the optimal segmentation point as the total time steps in the diffusion model denoising process, and initialize the inference comprehensive cost corresponding to the optimal segmentation point; Step 2: Update the current segmentation point to the next time step; Step 3: Calculate the reasoning comprehensive cost corresponding to the current segmentation point. If it is determined that the reasoning comprehensive cost corresponding to the current segmentation point is less than the reasoning comprehensive cost corresponding to the optimal segmentation point, update the optimal segmentation point and the reasoning comprehensive cost corresponding to the optimal segmentation point, otherwise do not update; Step 4: Repeat steps 2 and 3 until the updated current segmentation point is equal to 0. According to a multivariate time series anomaly detection diffusion model dynamic segmentation method provided by the present invention, the inference comprehensive cost corresponding to the current segmentation point is calculated, including: Obtaining the intermediate variable transmission time, and obtaining the standardized reasoning time from the intermediate variable transmission time, the functional relationship between the high-performance cloud reasoning time and the current segmentation point, the functional relationship between the low-performance cloud reasoning time and the current segmentation point, the initial segmentation point value corresponding to the functional relationship between the high-performance cloud reasoning time and the current segmentation point, and the initial segmentation point value corresponding to the functional relationship between the low-performance cloud reasoning time and the current segmentation point; The standardized energy consumption cost is obtained by the functional relationship between the high-performance cloud reasoning energy consumption and the current split point, the functional relationship between the low-performance cloud reasoning energy consumption and the current split point, the initial split point value corresponding to the functional relationship between the high-performance cloud reasoning energy consumption and the current split point, and the initial split point value corresponding to the functional relationship between the low-performance cloud reasoning energy consumption and the current split point; An energy consumption weight and an inference time weight are determined, and a weighted sum is performed based on the energy consumption weight, the standardized energy consumption cost, the inference time weight, and the standardized inference time to obtain a comprehensive inference cost corresponding to the current segmentation point.
[0008] According to a multivariate time series anomaly detection diffusion model dynamic segmentation method provided by the present invention, determining that the inference before the optimal segmentation point is run on a low-performance node, and the inference after the optimal segmentation point is run on a high-performance node, includes: Inputting the multivariate time series data before the optimal split point into a diffusion model deployed on a low-performance node, and outputting intermediate variables; The multivariate time series data before the optimal segmentation point is input into the diffusion model deployed on the high-performance node, and after receiving the intermediate variables, the denoising iteration process is completed to output the anomaly detection result.
[0009] In a second aspect, the present invention further provides a multivariate time series anomaly detection diffusion model dynamic segmentation system, comprising: An acquisition module is used to obtain a set of network performance indicators of the cloud network at the current moment; A computing module, used to determine an optimal segmentation point in each batch of reasoning tasks by using the network performance indicator set and a dynamic segmentation algorithm; The partitioning module is used to determine that the inference before the optimal partitioning point is run on the low-performance node, and the inference after the optimal partitioning point is run on the high-performance node.
[0010] In a third aspect, 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, the method for dynamic segmentation of a diffusion model for anomaly detection of a multivariate time series is implemented as described in any one of the above.
[0011] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described multivariate time series anomaly detection diffusion model dynamic segmentation methods.
[0012] The multivariate time series anomaly detection diffusion model dynamic segmentation method and system provided by the present invention selects the time step in the diffusion model iteration process as the segmentation point, does not affect the original structure of the diffusion model, and thus ensures the inference accuracy of the model, and comprehensively considers the inference speed and energy consumption under the multi-optimization target constraint of the dynamic segmentation algorithm. In each batch of inference tasks, the dynamic segmentation algorithm will find the optimal segmentation point based on the optimization objective function. Users can flexibly adjust the weight of inference speed and energy consumption according to their usage preferences to achieve the expected optimal balance goal. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] 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.
[0014] Figure 1 It is one of the flow charts of the multivariate time series anomaly detection diffusion model dynamic segmentation method provided by the present invention; Figure 2 This is the second flow chart of the dynamic segmentation method of the multivariate time series anomaly detection diffusion model provided by the present invention; Figure 3 It is an architecture diagram of a dynamic segmentation method of a multivariate time series anomaly detection diffusion model in a cloud environment provided by the present invention; Figure 4 It is a structural schematic diagram of the multivariate time series anomaly detection diffusion model dynamic segmentation system provided by the present invention; Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0015] 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.
[0016] In view of the problems existing in the prior art, the present invention proposes a method for dynamically segmenting and deploying a multivariate time series anomaly detection diffusion model. By utilizing the structural characteristics of the diffusion model, the model is dynamically segmented under multi-objective optimization constraints.
[0017] Figure 1 This is one of the flow charts of the multivariate time series anomaly detection diffusion model dynamic segmentation method provided by the present invention, such as Figure 1 As shown, including: Step 100: Obtain a set of network performance indicators of the cloud network at the current moment; Step 200: using the network performance indicator set, determining the optimal segmentation point in each batch of reasoning tasks through a dynamic segmentation algorithm; Step 300: Determine that the inference before the optimal split point is run on a low-performance node, and the inference after the optimal split point is run on a high-performance node.
[0018] by Figure 2 For example, the embodiment of the present invention includes: Step 1, such as Figure 3 As shown in Figure 1, the cloud environment consists of multiple low-performance clouds and high-performance clouds. High-performance clouds have powerful computing resources. Low-performance clouds have weak computing power but are closer to the source of the detection object. Figure 3 The sensors in the network are one of the common sources of multivariate time series data. Multivariate time series data anomaly detection is widely used in industrial production, such as production monitoring, quality monitoring, etc. The anomaly detection diffusion model is deployed on both low-performance cloud and high-performance cloud nodes. Before running the dynamic segmentation algorithm, you need to obtain the input conditions of the dynamic segmentation algorithm through the test tool. The specific process is as follows: First, obtain the , that is, high-performance cloud inference time and split point Similarly, the functional relationship between , that is, low-performance cloud inference time and split point The functional relationship between them. and It is determined by the hardware computing power and the model structure. Secondly, it is obtained through the energy consumption monitoring tool and , respectively, are the energy consumption and split point of high and low performance cloud inference In addition, the network monitoring tool is also needed to obtain the transmission rate of the cloud network at the current time t, which is recorded as .
[0019] Step 2: Find the optimal segmentation point in each batch of inference tasks through a dynamic segmentation algorithm : (1) Split point Initialize to , is the total time steps in the diffusion model denoising process. Also initialized to , corresponding to Initialize to .
[0020] (2) Update the split point .
[0021] (3) Calculate the current segmentation point The corresponding comprehensive cost of reasoning ,in are the weights of energy consumption and inference time respectively. Here we use the standardized inference time To measure the inference speed. The larger the value, the higher the comprehensive cost of reasoning. The standardized reasoning time calculation formula is: .in is the transmission time of the intermediate variable, which is related to the transmission rate The standardized energy cost calculation formula is: .if , then update ; otherwise no update is performed.
[0022] (4) Repeat the above (2)-(3) process until the updated segmentation point Equal to 0. At this time, the segmentation point corresponding to the minimum cost obtained in the loop is the optimal segmentation point .
[0023] Step 3: The above dynamic segmentation method selects the best segmentation point . Split point The previous inference was performed on low-performance cloud nodes, that is, multivariate time series data was input into the diffusion model deployed on low-performance cloud nodes, and the intermediate variables were output; Subsequent inference is performed on high-performance cloud nodes. After receiving the intermediate variables, the diffusion model deployed on the high-performance cloud nodes continues to complete the subsequent denoising iterative process and finally gives the anomaly detection result.
[0024] Compared with the existing technology, the dynamic segmentation method can flexibly select the offloading solution according to factors such as latency. For example, when the latency is large, the communication cost of the complete offloading method is very high, and the dynamic segmentation method will choose to calculate on-site to ensure the efficiency of reasoning. When the latency is very small, the computing efficiency is low only in the low-performance cloud nodes at the edge, and the dynamic segmentation method will choose to offload to more high-performance cloud nodes in the center. Therefore, the dynamic segmentation method can achieve the optimal solution for reasoning speed and energy consumption in different practical scenarios.
[0025] Therefore, compared with the prior art, the advantages of the present invention are as follows: The present invention proposes a dynamic segmentation method based on the structural characteristics of the diffusion model. While ensuring the accuracy of model reasoning, this method can make full use of cloud resources with different computing powers in the cloud environment to achieve the optimal balance between reasoning speed and energy consumption. At the same time, this method can also enhance the robustness of the model to cope with network fluctuations.
[0026] Compared with the existing methods, the optimization goal of the present invention takes energy consumption optimization into consideration. As the concept of green development has gained popularity, the energy consumption management of artificial intelligence models has also attracted attention. High-performance cloud nodes have fast reasoning speeds, but at the cost of high energy consumption; low-performance cloud nodes have slow reasoning speeds, but low energy consumption. Therefore, while making full use of cloud resources with various computing powers, incorporating the energy consumption of model reasoning into the optimization goal will not only help companies reduce operating costs, but also help achieve energy conservation, emission reduction and green development.
[0027] The multivariate time series anomaly detection diffusion model dynamic segmentation system provided by the present invention is described below. The multivariate time series anomaly detection diffusion model dynamic segmentation system described below and the multivariate time series anomaly detection diffusion model dynamic segmentation method described above can correspond to each other.
[0028] Figure 4 is a schematic diagram of the structure of a multivariate time series anomaly detection diffusion model dynamic segmentation system provided by an embodiment of the present invention. Figure 4 As shown, it includes: an acquisition module 41, a calculation module 42 and a segmentation module 43, wherein: the acquisition module 41, the calculation module 42 and the segmentation module 43, wherein: The acquisition module 41 is used to obtain the network performance indicator set of the cloud network at the current moment; the calculation module 42 is used to use the network performance indicator set to determine the optimal segmentation point in each batch of inference tasks through a dynamic segmentation algorithm; the segmentation module 43 is used to determine that the inference before the optimal segmentation point runs on the low-performance node, and the inference after the optimal segmentation point runs on the high-performance node.
[0029] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the dynamic segmentation method of the multivariate time series anomaly detection diffusion model, the method comprising: obtaining a network performance indicator set of the cloud network at the current moment; using the network performance indicator set, determining the optimal segmentation point in each batch of reasoning tasks through a dynamic segmentation algorithm; determining that the inference before the optimal segmentation point is run on a low-performance node, and the inference after the optimal segmentation point is run on a high-performance node.
[0030] In addition, the logic instructions in the above-mentioned memory 530 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.
[0031] 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 dynamic segmentation method of the multivariate time series anomaly detection diffusion model provided by the above-mentioned methods, the method comprising: obtaining a set of network performance indicators of the cloud network at the current moment; using the set of network performance indicators to determine the optimal segmentation point in each batch of inference tasks through a dynamic segmentation algorithm; determining that the inference before the optimal segmentation point runs on a low-performance node, and the inference after the optimal segmentation point runs on a high-performance node.
[0032] 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.
[0033] 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.
[0034] 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 multivariate time series anomaly detection diffusion model dynamic segmentation method, characterized in that: include: Get the network performance indicator set of the current cloud network; Using the network performance indicator set, determining the optimal segmentation point in each batch of reasoning tasks through a dynamic segmentation algorithm; It is determined that the inference before the optimal split point is run on the low-performance node, and the inference after the optimal split point is run on the high-performance node.
2. The multivariate time series anomaly detection diffusion model dynamic segmentation method according to claim 1 is characterized in that: Get the current network performance indicator set of the cloud network, including: The functional relationship between the high-performance cloud inference time and the current split point, as well as the functional relationship between the low-performance cloud inference time and the current split point, are obtained through the test tool; The energy consumption monitoring tool is used to obtain the functional relationship between the energy consumption of high-performance cloud inference and the current split point, as well as the functional relationship between the energy consumption of low-performance cloud inference and the current split point. Use network monitoring tools to obtain the current inter-cloud network transmission rate.
3. The multivariate time series anomaly detection diffusion model dynamic segmentation method according to claim 2 is characterized in that: Using the network performance indicator set, the optimal segmentation point is determined in each batch of reasoning tasks through a dynamic segmentation algorithm, including: Step 1: Initialize the current segmentation point and the optimal segmentation point as the total time steps in the diffusion model denoising process, and initialize the inference comprehensive cost corresponding to the optimal segmentation point; Step 2: Update the current segmentation point to the next time step; Step 3: Calculate the reasoning comprehensive cost corresponding to the current segmentation point. If it is determined that the reasoning comprehensive cost corresponding to the current segmentation point is less than the reasoning comprehensive cost corresponding to the optimal segmentation point, then update the reasoning comprehensive cost corresponding to the optimal segmentation point and the optimal segmentation point, otherwise do not update; Step 4: Repeat steps 2 and 3 until the updated current segmentation point is equal to 0.
4. The multivariate time series anomaly detection diffusion model dynamic segmentation method according to claim 3 is characterized in that: Calculate the comprehensive cost of inference corresponding to the current split point, including: Obtaining the intermediate variable transmission time, and obtaining the standardized reasoning time from the intermediate variable transmission time, the functional relationship between the high-performance cloud reasoning time and the current segmentation point, the functional relationship between the low-performance cloud reasoning time and the current segmentation point, the initial segmentation point value corresponding to the functional relationship between the high-performance cloud reasoning time and the current segmentation point, and the initial segmentation point value corresponding to the functional relationship between the low-performance cloud reasoning time and the current segmentation point; The standardized energy consumption cost is obtained by the functional relationship between the high-performance cloud reasoning energy consumption and the current split point, the functional relationship between the low-performance cloud reasoning energy consumption and the current split point, the initial split point value corresponding to the functional relationship between the high-performance cloud reasoning energy consumption and the current split point, and the initial split point value corresponding to the functional relationship between the low-performance cloud reasoning energy consumption and the current split point; An energy consumption weight and an inference time weight are determined, and a weighted sum is performed based on the energy consumption weight, the standardized energy consumption cost, the inference time weight, and the standardized inference time to obtain a comprehensive inference cost corresponding to the current segmentation point.
5. The multivariate time series anomaly detection diffusion model dynamic segmentation method according to claim 1, characterized in that: Determining that the inference before the optimal split point is run on the low-performance node, and the inference after the optimal split point is run on the high-performance node, comprises: Inputting the multivariate time series data before the optimal split point into a diffusion model deployed on a low-performance node, and outputting intermediate variables; The multivariate time series data before the optimal segmentation point is input into the diffusion model deployed on the high-performance node, and after receiving the intermediate variables, the denoising iteration process is completed to output the anomaly detection result.
6. A multivariate time series anomaly detection diffusion model dynamic segmentation system, characterized in that: include: An acquisition module is used to obtain a set of network performance indicators of the cloud network at the current moment; A computing module, used to determine an optimal segmentation point in each batch of reasoning tasks by using the network performance indicator set and a dynamic segmentation algorithm; The partitioning module is used to determine that the inference before the optimal partitioning point is run on the low-performance node, and the inference after the optimal partitioning point is run on the high-performance node.
7. 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 program, the dynamic segmentation method of the multivariate time series anomaly detection diffusion model is implemented as described in any one of claims 1 to 5.
8. 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 dynamic segmentation method of the multivariate time series anomaly detection diffusion model is implemented as described in any one of claims 1 to 5.
