Fault report generation method based on dynamic window size in edge cloud scene

By using a fault report generation method with dynamic window size in edge cloud scenarios, multimodal input data is processed, KV key-value pairs are filtered and merged, and Paged Attention is used for cache compression, the memory and computing burden problem in traditional methods is solved. , improves the accuracy and response speed of fault reporting.

CN119248614APending Publication Date: 2025-01-03PIO CLOUD COMPUTING (SHANGHAI) CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411436441.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Traditional fault report generation methods are difficult to deal with diverse fault situations in complex and dynamic environments, resulting in reduced accuracy and reliability of fault reports. The increase in multimodal key-value pairs leads to increased memory requirements and computational burden, which affects the decoding speed. .

Method used

Using the fault report generation method based on dynamic window size, multi-modal KV cache is generated through multi-modal input data, filtering and merging KV key-value pairs, using Paged Attention for KV cache compression, dynamically adjusting windows, reducing redundant data and calculations burden.

Benefits of technology

It significantly reduces memory consumption, improves decoding speed, improves the model's inference efficiency and response speed of fault report generation, and ensures the timeliness and accuracy of content quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248614A_ABST
    Figure CN119248614A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a fault report generation method based on the size of a dynamic window in an edge cloud scene, which comprises the following steps of: S1, performing data processing according to acquired data to obtain preprocessed data, and inputting the preprocessed data into a pre-training model for training to obtain an adjustment model; s2, multi-modal input data generates a multi-modal KV cache according to the adjustment model, encoding is carried out to obtain an encoding set, KV key value pairs are screened according to the encoding set, decoding is carried out after the KV key value pairs are combined, KV cache compression is carried out on the decoded data through Page Attelation to obtain matched compressed data, and a window is dynamically adjusted according to the compressed data; and S3, receiving second real-time operation state data of the edge equipment, generating a second historical fault report, and judging whether the second historical fault report meets the model requirements or not. Through LOOK-M and paged attention technologies, KV cache of a large model is reduced, memory use and calculation efficiency are optimized, model fine tuning is introduced, and it is ensured that a generated fault analysis report has high accuracy and real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a fault report generation method based on dynamic window size in an edge cloud scenario. Background Art

[0002] With the rapid development of technologies such as artificial intelligence, 5G communications, and the Internet of Things, the world is moving towards a highly interconnected and intelligent direction. Edge computing, as a technology that deploys computing and storage resources close to the source of data, can significantly reduce data processing latency, improve real-time response capabilities, and optimize bandwidth utilization. It has become the basic supporting technology for the future intelligent society. As a core component of edge computing, edge cloud devices undertake multiple tasks such as data collection, preprocessing, storage, and analysis. They are being used more and more widely in smart cities, industrial Internet of Things, autonomous driving, smart medical care and other fields. However, as the application scenarios of edge cloud devices become more extensive and complex, the demand for equipment operation, maintenance, and troubleshooting is also increasing. How to efficiently process and analyze massive equipment data and generate accurate equipment failure reports in real time has become a key issue that needs to be solved urgently. Traditional fault report generation methods rely on predefined rules and static models. They lack the ability to adapt to complex and dynamic environments and have difficulty coping with diverse and complex fault conditions in edge devices, which reduces the accuracy and reliability of fault reports. In the process of reasoning, traditional long-context multimodal large language models (MLLMs) need to store and process more multimodal key-value pairs (KV) as the context length increases. The computing power and memory requirements increase due to the synchronous growth of the KV cache, which greatly increases the computational burden. The increase in the input length of MLLMs directly increases the complexity of attention calculations in the decoding process. Therefore, traditional methods need to consider all past multimodal KV pairs during decoding, which makes the attention calculation time increase linearly with the increase in input length, significantly slowing down the decoding speed and affecting the real-time and efficiency of generated content. Summary of the invention

[0003] The purpose of the present invention is to solve the shortcomings of the prior art and provide a method for generating a fault report based on a dynamic window size in an edge cloud scenario, comprising the following steps: S1: performing data processing according to the collected data to obtain pre-processed data, inputting the pre-processed data into a pre-trained model for preliminary training, and obtaining an adjusted model after adjusting the pre-trained model; S2: The multimodal input data generates a multimodal KV cache according to the adjustment model, encodes the multimodal KV cache to obtain a coding set, filters KV key-value pairs according to the coding set, merges the KV key-value pairs and decodes them to obtain decoded data, compresses the decoded data with KV cache through Paged Atteion, dynamically adjusts the window according to the compressed data, and obtains a network model; S3: Receive the second real-time operating status data of the edge device, generate a second historical fault report according to the second real-time operating status data, and determine whether the model requirements are met according to the second historical fault report. If the model requirements are not met, add the second historical fault report to the first historical fault report, and return to step S1. If the model requirements are met, save the network model and output the second historical fault report.

[0004] Preferably, in step S1, data processing is performed according to the collected data to obtain preprocessed data, including: Receiving first real-time operating status data of an edge device and the first historical fault report; Cleaning the first real-time operating status data to obtain cleaned data to remove noise, duplication and outliers; Performing feature extraction on the cleaned data to obtain feature data; The characteristic data is labeled according to the first historical fault report to obtain a label data set.

[0005] Preferably, in step S2, the multimodal input data generates a multimodal KV cache according to the adjustment model, further comprising: The multimodal input data includes text and images, and the adjustment model converts the multimodal input data into an embedded representation to generate a multimodal KV cache.

[0006] Preferably, in step S2, encoding is performed according to the multimodal KV cache to obtain a coding set, further comprising: The multimodal KV cache input is a KV cache constructed at each Transformer layer according to the adjustment model, and the hint tensor of the multimodal KV cache ,in A tensor representing a collection of text embeddings and image embeddings, with KV key values ​​calculated based on the multimodal KV cache ,Right now ,in, For Model The weight of For Model The weight of .

[0007] Preferably, in step S2, filtering the KV key-value pairs according to the encoding set further includes: Generate text tokens according to the encoding set, calculate the cumulative attention score of each text token, and prioritize the attention scores of the text tokens to ensure that the text tokens are retained first and the cumulative attention scores The calculation formula is as follows: Among them, the parameters is the attention matrix, is the coding set; Select according to the attention score Important text tokens, that is, the calculation formula of the important text token is , according to the important text token, the window size closest to it is retained as The text token is used to obtain a reserved KV key-value pair, and the KV key-value pairs other than the reserved KV key-value pairs are removed; Among them, the removal of KV key-value pairs The calculation formula is as follows: in, To keep the index Corresponding key And keep the keys of the last M tokens together. To retain the value V corresponding to the index, the values ​​of the last M tokens are also retained.

[0008] Preferably, in step S2, merging the KV key-value pairs further comprises: Calculate the similarity matrix between the removed KV key-value pairs and the retained KV key-value pairs, where the similarity matrix The calculation formula is as follows: in, For the Remove KV key values, For the Reserve KV key-value pairs; According to the similarity matrix, the nearest neighbor matching is performed for each KV key-value pair to be eliminated, and the most similar KV key-value pair is found. The calculation formula is as follows: in, is the index range of the candidate set. In this set, the similarity between each key-value pair and the current token is calculated. is the similarity between the i-th and j-th tokens; An optimal strategy is selected from the most similar KV key-value pairs to merge them to obtain a merged KV key-value pair.

[0009] Preferably, selecting the best strategy from the most similar KV key-value pairs for merging further includes: Obtaining a merged KV key-value pair from the most similar KV key-value pairs by average merging, key merging, or weighted merging; Among them, the average merge is to take the average value of the removed KV key-value pairs and the retained KV key-value pairs as the merged KV key-value pairs; the key merge is to first perform an average merge and then perform a secondary merge with the retained KV key-value pairs; the weighted merge is to dynamically assign weights to each of the removed KV key-value pairs according to the similarity matrix.

[0010] Preferably, merging the KV key-value pairs and then decoding to obtain decoded data further includes: In the process of generating the text token, the KV cache is used and updated to obtain an optimized KV cache, and decoding is performed according to the optimized KV cache to obtain decoded data. For each time slot, a new text token is generated according to the optimized KV cache, that is, the calculation formula of the new text token is as follows: in is the vector representation of the input token at the current time step t, is the weight matrix, is the value matrix, that is, V of KV pairs, is the dimension size of the vector.

[0011] Preferably, the decoded data is KV cache compressed by Paged Atteion and the window is dynamically adjusted according to the compressed data, further comprising: Divide the decoded data into several pages, each page contains context data of a set length, the context data is individually calculated through a multi-head self-attention mechanism between the mutual relationship between each data fragment in the page, and the context data is KV cache compressed; During the attention calculation process, the relative importance of the data in the current window is evaluated in real time, and the size and position of the attention page window are dynamically adjusted according to the relative importance.

[0012] Preferably, generating a second historical fault report according to the second real-time operating status data further includes: The network model infers the second real-time operating state to obtain an inference result, generates a fault analysis result according to the historical fault mode and the second real-time operating state data, and generates a second historical fault report according to the inference result and the fault analysis result.

[0013] Compared with the prior art, the present invention has the following beneficial effects: The present invention generates a multimodal KV cache according to an adjustment model through multimodal input data, encodes according to the multimodal KV cache to obtain a coding set, screens KV key-value pairs according to the coding set, and decodes after merging the KV key-value pairs to obtain decoded data. It can accurately and selectively delete redundant visual KV pairs and unimportant text features, effectively reduce the storage of redundant visual and text KV key-value pairs, and significantly reduce memory consumption while maintaining global context information, thereby greatly saving memory resources. The KV cache memory usage can be reduced by up to 80%, significantly optimizing cache utilization. The present invention uses Paged Atteion to compress the decoded data with KV cache and compress the data. Dynamically adjusting the window according to the compressed data can effectively compress the KV cache, avoid global attention calculation for the entire input sequence, and reduce the burden of attention calculation, thereby increasing the decoding speed by 1.3 to 1.5 times, significantly improving the reasoning efficiency of the model and the response speed of the fault report content generation service.

[0014] The present invention determines whether the model requirements are met according to the second historical fault report. If not, the second historical fault report is added to the first historical fault report and the process returns to step S1. If the model requirements are met, the network model is saved and the second historical fault report is output. The timeliness of the content quality is ensured by continuously adjusting the model. The consistency and integrity of the global context are maintained by finely managing the multimodal KV cache, which ensures the high accuracy of the model when processing complex multimodal tasks and ensures that the generated results are more coherent and reliable. The present invention is particularly suitable for application scenarios such as fault reports that have strict requirements on the quality of generated content. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the following detailed description of the preferred embodiment.The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting the invention.

[0016] Figure 1 It is a flow chart of a fault report generation method based on dynamic window size in an edge cloud scenario of the present invention; Figure 2 This is an architectural diagram of a fault report generation method based on dynamic window size in an edge cloud scenario of the present invention. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0018] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0019] The technical terms involved in the embodiments of the present invention are defined as follows: Contextual multimodal large language models (MLLMs) are artificial intelligence models that combine multiple modal information such as text, images, and videos for processing and understanding. Compared with traditional unimodal models, MLLMs can extract features from different types of data and enhance the model's understanding and generation capabilities by fusing these features. This enables MLLMs to perform well in complex tasks such as image and text generation, video description, and cross-modal search. These models are usually based on large-scale pre-training and use massive multimodal data for learning, showing strong generalization and flexibility in practical applications.

[0020] KV key-value pairs (Key-Value Pairs) are usually used to store and manage the relationship and features between different modal information. These KV pairs play a key role in the internal representation of the model, helping the model to effectively process and integrate data from multiple modalities, thereby achieving more complex and diverse tasks.

[0021] Transformer is a deep learning model based on the self-attention mechanism. The model can be calculated in parallel and is more efficient than RNN-type recurrent neural networks. By stacking transformers, a highly accurate sequence model can be constructed, which is the current mainstream time series processing model.

[0022] This embodiment achieves comprehensive improvements in memory optimization, computing efficiency, and performance, can meet low-latency, high-quality application requirements, and provides strong guarantees for the data processing capabilities and report generation quality of edge cloud devices, thereby promoting technological progress and application popularization in related fields.

[0023] See also Figure 1 and Figure 2 As shown, this embodiment provides a method for predicting edge cloud server load based on quantum theory, comprising the following steps: S1: Process the collected data to obtain preprocessed data, input the preprocessed data into a pretrained model for preliminary training, and obtain an adjusted model after adjusting the pretrained model.

[0024] Preferably, in step S1, data processing is performed according to the collected data to obtain preprocessed data, including: Receive first real-time operating status data and first historical fault reports of the edge device. Specifically, in this embodiment, the operating status data is collected in real time from various sensors and devices in the edge cloud devices, and the past fault reports and log data of the edge cloud devices are collected; Cleaning the first real-time operating status data to obtain cleaned data to remove noise, duplication and abnormal values; Feature extraction is performed on the cleaned data to obtain feature data. Specifically, in this embodiment, feature extraction is performed on the cleaned data to extract meaningful feature data, such as statistical features (average value, variance, etc.), time series features, etc.; The feature data is labeled according to the first historical fault report to obtain a label data set for model training and fine-tuning.

[0025] Furthermore, the data content of the first real-time operation status data and the first historical fault report is collected as follows: Data Types Data content 1 Edge device data Sensor data such as temperature, humidity, current, voltage, vibration, etc. 2 Historical fault reports Detailed description of equipment failure, cause of failure, maintenance records, solutions, etc. Preferably, the preprocessed data is input into the pretrained model for preliminary training, and the adjusted model is obtained after adjusting the pretrained model. Based on single-card hardware devices such as NVIDIA GeForce RTX 4090, the pretrained large model is used as the basic model to perform preliminary training on the model so that it can understand and process device data and fault report text.

[0026] The pre-trained model is fine-tuned using the collected labeled dataset to obtain an adjusted model, so that the model can better adapt to specific edge cloud scenarios and device failure data. During the fine-tuning process, the focus is on optimizing the model's fault feature extraction and fault pattern recognition capabilities.

[0027] S2: The multimodal input data generates a multimodal KV cache according to the adjustment model, encodes the multimodal KV cache to obtain a coding set, filters the KV key-value pairs according to the coding set, merges the KV key-value pairs and decodes them to obtain decoded data, and compresses the decoded data with the KV cache through Paged Atteion, dynamically adjusts the window according to the compressed data, and obtains the network model. Specifically, in this embodiment, by using LOOK-M and Paged Attention for technical optimization, the large-scale memory occupation of the multimodal key-value cache is reduced, and the subsequent reasoning process is accelerated.

[0028] Preferably, in step S2, the multimodal input data generates a multimodal KV cache according to the adjustment model, further comprising: The multimodal input data includes text and images. The model is adjusted to convert the multimodal input data into embedded representation to generate a multimodal KV cache.

[0029] Preferably, in step S2, encoding is performed according to the multimodal KV cache to obtain a coding set, further comprising: Multimodal KV cache input KV cache built at each Transformer layer according to the adjusted model, hint tensor of multimodal KV cache ,in A tensor representing a collection of text embeddings and image embeddings, with KV key values ​​calculated from the multimodal KV cache ,Right now ,in, For Model The weight of For Model The weight of .

[0030] Preferably, in step S2, filtering the KV key-value pairs according to the encoding set further includes: Generate text tokens based on the encoding set, calculate the cumulative attention score of each text token, and prioritize the attention scores of text tokens to ensure that text tokens are retained first and the cumulative attention scores are The calculation formula is as follows: Among them, the parameters is the attention matrix, is the coding set; Select based on attention score Important text tokens, that is, the calculation formula for important text tokens is: , according to the important text token, the window size closest to it is retained The text token is used to obtain the reserved KV key-value pairs, and the removed KV key-value pairs except the reserved KV key-value pairs are removed; Among them, remove the KV key-value pair The calculation formula is as follows: in, To keep the index Corresponding key And keep the keys of the last M tokens together. To retain the value V corresponding to the index, the values ​​of the last M tokens are also retained.

[0031] Preferably, in step S2, merging KV key-value pairs further includes: Calculate the similarity matrix between the removed KV key-value pairs and the retained KV key-value pairs, where the similarity matrix The calculation formula is as follows: in, For the Remove KV key values, For the Reserve KV key-value pairs; According to the similarity matrix, the nearest neighbor match is performed for each KV key-value pair to be eliminated, and the most similar KV key-value pair is found. The calculation formula is as follows: in, is the index range of the candidate set. In this set, the similarity between each key-value pair and the current token is calculated. is the similarity between the i-th and j-th tokens; The best strategy is selected from the most similar KV key-value pairs to merge them to obtain a merged KV key-value pair.

[0032] Preferably, selecting the best strategy from the most similar KV key-value pairs for merging further includes: Obtain merged KV key-value pairs from the most similar KV key-value pairs through average merging, key merging, or weighted merging; Among them, the average merge is to take the average value of the removed KV key-value pairs and the retained KV key-value pairs as the merged KV key-value pairs; the key merge is to first perform an average merge and then perform a secondary merge with the retained KV key-value pairs; the weighted merge is to dynamically assign weights to each removed KV key-value pair based on the similarity matrix.

[0033] Preferably, merging the KV key-value pairs and then decoding to obtain decoded data further includes: In the process of generating text tokens, the KV cache is used and updated to obtain the optimized KV cache. The decoded data is obtained by decoding according to the optimized KV cache. For each time slot, a new text token is generated according to the optimized KV cache. The calculation formula of the new text token is as follows: in is the vector representation of the input token at the current time step t, is the weight matrix, is the value matrix, that is, V of KV pairs, is the dimension size of the vector.

[0034] Preferably, the decoded data is KV cache compressed by Paged Atteion and the window is dynamically adjusted according to the compressed data, further comprising: The decoded data is divided into several pages, each page contains context data of a set length, and the context data is individually calculated through a multi-head self-attention mechanism to calculate the relationship between each data fragment in the page, and the context data is KV cache compressed. Specifically, in this embodiment, the LOOK-M method is used to perform KV cache compression on the data of each page; During the attention calculation process, the relative importance of the data in the current window is evaluated in real time, and the size and position of the attention page window are dynamically adjusted according to the relative importance to ensure the effectiveness and consistency of the global attention calculation across pages.

[0035] The reference experimental data based on RTX 4090 is as follows: Engine Length BS TTFT TPOT Speed E2E Latency Throughput (in,out) (P50,P90) (P50, P90) (P50, P90) (P50,P90) (int, out) vLLM0.6.1.p2 4,000,500 1 0.43, 0.44 0.019, 0.019 54.0, 54.0 9.69, 9.81 411.88, 51 10 2.16, 13.29 0.030, 0.033 33.9, 36.8 17.42, 28.17 1966.89, 246 Dynamic sliding window method 4,000,500 1 0.42, 0.43 0.020, 0.020 51.1, 51.4 10.20, 10.35 391.52, 49 10 0.43, 0.85 0.032, 0.033 31.4, 33.2 16.54, 18.01 2401.97, 301 20 0.93, 5.70 0.045, 0.048 22.3, 26.2 23.74, 28.87 3122.09, 391 30 1.17,7.8 0.051,0.053 20.1,24.·1 27.74, 2987 3577, 476 As shown in the table above, the current leading VLLM framework is tested on consumer graphics cards such as RTX 4090 with an input and output length of 4500 / 500. It can be clearly seen that the latest VLLM version has reached the upper limit of the first token (TTFT) indicator when BS (concurrency) is equal to 10. The dynamic sliding window method in this embodiment can ensure that the concurrency of BS is greater than 30 (a reflection of the memory compression ratio), and it is far superior in terms of indicators such as TTFT / throughput. In summary, the overall memory compression ratio can reach more than 80% and the throughput (i.e., inference speed) is ultimately accelerated by 1.5 times.

[0036] S3: Receive the second real-time operating status data of the edge device, generate the second historical fault report according to the second real-time operating status data, and determine whether the model requirements are met according to the second historical fault report. If the model requirements are not met, the second historical fault report is added to the first historical fault report, and the process returns to step S1. If the model requirements are met, the network model is saved and the second historical fault report is output. Specifically, in this embodiment, the operating status data of the edge device is accessed in real time, and preprocessing and feature extraction are performed. Then, the real-time data is inferred using the fine-tuned model, and the fault analysis results are generated by combining the historical fault mode and the current data.

[0037] Preferably, generating a second historical fault report according to the second real-time operating status data further includes: The network model infers the second real-time operation state to obtain an inference result, generates a fault analysis result according to the historical fault mode and the second real-time operation state data, and generates a second historical fault report according to the inference result and the fault analysis result. Specifically, in this embodiment, the second historical fault report includes a fault description, possible causes, recommended maintenance steps and preventive measures, etc. The fault report content is then converted into a standard format for easy reading and archiving.

[0038] Preferably, the generated fault analysis report is output in real time to the monitoring terminal of the operation and maintenance personnel and the database of the edge cloud device for reference by the operation and maintenance personnel and subsequent input into the model for continuous fine-tuning.

[0039] The model is continuously optimized and improved based on the feedback from operation and maintenance personnel, and the model and optimization algorithm are updated regularly to ensure the continued accuracy and efficiency of the fault analysis report generation model.

[0040] This embodiment makes full use of LOOK-M and paged attention technology to reduce the KV cache of large models, optimize memory usage and computing efficiency, and introduces model fine-tuning to ensure that the generated fault analysis report is highly accurate and real-time.

[0041] In addition, this embodiment can adopt a modular design, including independent encapsulation of the KV cache management module, the paged attention module, and the multimodal fusion module, so as to facilitate seamless integration and deployment in the existing system. This allows the system to quickly introduce the method in this embodiment without large-scale changes, thereby improving overall performance.

[0042] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A fault report generation method based on dynamic window size in edge cloud scenario, characterized in that: The following steps are involved: S1: performing data processing according to the collected data to obtain pre-processed data, inputting the pre-processed data into a pre-trained model for preliminary training, and obtaining an adjusted model after adjusting the pre-trained model; S2: The multimodal input data generates a multimodal KV cache according to the adjustment model, encodes the multimodal KV cache to obtain a coding set, filters KV key-value pairs according to the coding set, merges the KV key-value pairs and decodes them to obtain decoded data, compresses the decoded data with KV cache through Paged Atteion, dynamically adjusts the window according to the compressed data, and obtains a network model; S3: Receive the second real-time operating status data of the edge device, generate a second historical fault report according to the second real-time operating status data, and determine whether the model requirements are met according to the second historical fault report. If the model requirements are not met, add the second historical fault report to the first historical fault report, and return to step S1. If the model requirements are met, save the network model and output the second historical fault report.

2. The fault report generation method based on dynamic window size in the edge cloud scenario according to claim 1 is characterized in that: In step S1, data processing is performed according to the collected data to obtain preprocessed data, including: Receiving first real-time operating status data of an edge device and the first historical fault report; Cleaning the first real-time operating status data to obtain cleaned data to remove noise, duplication and outliers; Performing feature extraction on the cleaned data to obtain feature data; The characteristic data is labeled according to the first historical fault report to obtain a label data set.

3. The fault report generation method based on dynamic window size in the edge cloud scenario according to claim 2 is characterized in that: In step S2, the multimodal input data generates a multimodal KV cache according to the adjustment model, further comprising: The multimodal input data includes text and images, and the adjustment model converts the multimodal input data into an embedded representation to generate a multimodal KV cache.

4. The fault report generation method based on dynamic window size in the edge cloud scenario according to claim 3 is characterized in that: In step S2, encoding is performed according to the multimodal KV cache to obtain a coding set, further comprising: The multimodal KV cache input is a KV cache constructed at each Transformer layer according to the adjustment model, and the hint tensor of the multimodal KV cache ,in A tensor representing a collection of text embeddings and image embeddings, with KV key values ​​calculated based on the multimodal KV cache ,Right now ,in, For Model The weight of For Model The weight of .

5. According to the method for generating a fault report based on a dynamic window size in the edge cloud scenario described in 4, it is characterized in that: In step S2, the KV key-value pairs are screened according to the encoding set, further comprising: Generate text tokens according to the encoding set, calculate the cumulative attention score of each text token, and prioritize the attention scores of the text tokens to ensure that the text tokens are retained first and the cumulative attention scores The calculation formula is as follows: Among them, the parameters is the attention matrix, is the coding set; Select according to the attention score Important text tokens, that is, the calculation formula of the important text token is , according to the important text token, the window size closest to it is retained as The text token is used to obtain a reserved KV key-value pair, and the KV key-value pairs other than the reserved KV key-value pairs are removed; Among them, the removal of KV key-value pairs The calculation formula is as follows: in, To keep the index Corresponding key And keep the keys of the last M tokens together. To retain the value V corresponding to the index, the values ​​of the last M tokens are also retained.

6. The method for generating a fault report based on a dynamic window size in an edge cloud scenario according to claim 5, characterized in that: In step S2, the merging of the KV key-value pairs further includes: Calculate the similarity matrix between the removed KV key-value pairs and the retained KV key-value pairs, where the similarity matrix The calculation formula is as follows: in, For the Remove KV key values, For the Reserve KV key-value pairs; According to the similarity matrix, the nearest neighbor matching is performed for each KV key-value pair to be eliminated, and the most similar KV key-value pair is found. The calculation formula is as follows: in, is the index range of the candidate set. In this set, the similarity between each key-value pair and the current token is calculated. is the similarity between the i-th and j-th tokens; An optimal strategy is selected from the most similar KV key-value pairs to merge them to obtain a merged KV key-value pair.

7. The method for generating a fault report based on a dynamic window size in an edge cloud scenario according to claim 6, characterized in that: Selecting the best strategy from the most similar KV key-value pairs for merging further includes: Obtaining a merged KV key-value pair from the most similar KV key-value pairs by average merging, key merging, or weighted merging; Among them, the average merge is to take the average value of the removed KV key-value pairs and the retained KV key-value pairs as the merged KV key-value pairs; the key merge is to first perform an average merge and then perform a secondary merge with the retained KV key-value pairs; the weighted merge is to dynamically assign weights to each of the removed KV key-value pairs according to the similarity matrix.

8. The method for generating a fault report based on a dynamic window size in an edge cloud scenario according to claim 7, characterized in that: Merging the KV key-value pairs and decoding them to obtain decoded data further includes: In the process of generating the text token, the KV cache is used and updated to obtain an optimized KV cache, and decoding is performed according to the optimized KV cache to obtain decoded data. For each time slot, a new text token is generated according to the optimized KV cache, that is, the calculation formula of the new text token is as follows: in is the vector representation of the input token at the current time step t, is the weight matrix, is the value matrix, that is, V of KV pairs, is the dimension size of the vector.

9. The method for generating a fault report based on a dynamic window size in an edge cloud scenario according to claim 8, characterized in that: The method further comprises: performing KV cache compression on the decoded data by Paged Atteion and matching the compressed data, and dynamically adjusting the window according to the compressed data. Divide the decoded data into several pages, each page contains context data of a set length, the context data is individually calculated through a multi-head self-attention mechanism between the mutual relationship between each data fragment in the page, and the context data is KV cache compressed; During the attention calculation process, the relative importance of the data in the current window is evaluated in real time, and the size and position of the attention page window are dynamically adjusted according to the relative importance.

10. The method for generating a fault report based on a dynamic window size in an edge cloud scenario according to claim 9, characterized in that: Generating a second historical fault report according to the second real-time operating status data further includes: The network model infers the second real-time operating state to obtain an inference result, generates a fault analysis result according to the historical fault mode and the second real-time operating state data, and generates a second historical fault report according to the inference result and the fault analysis result.

Citation Information

Cited By

  • Input rearrangement and cache multiplexing method for multi-modal decision model

    CN120524439A

  • Input reordering and cache reuse method for multimodal decision models

    CN120524439B

  • Multi-mode large model video content understanding reasoning acceleration method and system

    CN121305451A

  • A multimodal large model video content understanding inference acceleration method and system

    CN121305451B