WO2023245851A1 - Deep inspection optimization method and system based on micro-service architecture - Google Patents

Deep inspection optimization method and system based on micro-service architecture Download PDF

Info

Publication number
WO2023245851A1
WO2023245851A1 PCT/CN2022/114210 CN2022114210W WO2023245851A1 WO 2023245851 A1 WO2023245851 A1 WO 2023245851A1 CN 2022114210 W CN2022114210 W CN 2022114210W WO 2023245851 A1 WO2023245851 A1 WO 2023245851A1
Authority
WO
WIPO (PCT)
Prior art keywords
inspection
data
layer
model
inspection model
Prior art date
Application number
PCT/CN2022/114210
Other languages
French (fr)
Chinese (zh)
Inventor
刘婷雯
Original Assignee
中电信数智科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中电信数智科技有限公司 filed Critical 中电信数智科技有限公司
Publication of WO2023245851A1 publication Critical patent/WO2023245851A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3447Performance evaluation by modeling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3495Performance evaluation by tracing or monitoring for systems

Definitions

  • the invention belongs to the field of artificial intelligence technology, and in particular relates to an in-depth inspection optimization method and system based on microservice architecture.
  • the main purpose of the present invention is to overcome the shortcomings and deficiencies of the existing technology, provide an in-depth inspection optimization method and system based on microservice architecture, and construct a health inspection model and in-depth inspection model by horizontally layering the microservice architecture system.
  • the model can automatically implement in-depth inspection of each layer in the microservice architecture system.
  • the microservice system can be evaluated as a whole. Possible data defects and hidden functional failures in the architecture enable machines to make decisions instead of humans, thereby achieving complete automation and improving the efficiency of fault detection.
  • the present invention provides a deep inspection optimization method based on microservice architecture.
  • the method includes the following steps:
  • S1 Construct a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module in the horizontal layer and the fault history data of the physical device, and input the fault history data into the health inspection model to obtain the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection;
  • S2 Preprocess the inspection data through quadratic interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; calculate the fitting value through the ridge regression method ;
  • S3 Compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
  • building a health inspection model and horizontally layering the microservice architecture system includes:
  • the microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
  • P represents the one-step transition probability matrix
  • the preprocessing of inspection data through quadratic interpolation includes:
  • the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation.
  • the formula is as follows:
  • x is the current value of the classification object
  • y is the three adjacent points of the classification object
  • i is the sequence number of the classification object.
  • the construction of an in-depth inspection model includes:
  • PositionEncoding is used for timing encoding
  • Attention is used to explore the feature correlation of the timing dimension.
  • the formula is as follows:
  • d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
  • the fitted value calculated through the ridge regression method includes:
  • the present invention also provides an in-depth inspection optimization system based on microservice architecture.
  • the system includes:
  • the first prediction module is used to build a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module in the horizontal layer and the fault history data of the physical device, and input the fault history data
  • the health inspection model obtains the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection;
  • the second prediction module is used to preprocess the inspection data through secondary interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; use the ridge regression method Calculate the fitting value;
  • the comparison and evaluation module is used to compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
  • the first prediction module builds a health inspection model, and horizontally layering the microservice architecture system includes:
  • the microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
  • P represents the one-step transition probability matrix
  • the second prediction module preprocessing the inspection data through quadratic interpolation includes:
  • the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation.
  • the formula is as follows:
  • x is the current value of the classification object
  • y is the three adjacent points of the classification object
  • i is the sequence number of the classification object.
  • the second prediction module constructing an in-depth inspection model includes:
  • PositionEncoding is used for timing encoding
  • Attention is used to explore the feature correlation of the timing dimension.
  • the formula is as follows:
  • d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
  • the fitting value calculated by the second prediction module through ridge regression method includes:
  • the present invention conducts in-depth health inspections on the major categories and subcategories of the horizontal basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer of the microservice architecture system; at the same time, it
  • the combination technology of multiple algorithm models in the field of artificial intelligence makes up for the fact that the existing inspection technology places too much emphasis on physical equipment and application detection and lacks the simulation data to test the fitting values of each level and the calculation of each horizontal layer through the in-depth inspection model. From the perspective of actual value comparison, we can comprehensively evaluate the possible data defects and hidden functional failures of the microservice architecture, and the losses that may be caused to the application platform, so that machines can make decisions instead of people, thus realizing complete automation and intelligence in a true sense. become possible.
  • Figure 1 is a flow chart of the in-depth inspection optimization method based on microservice architecture
  • Figure 2 is a schematic diagram of an in-depth inspection and optimization system based on microservice architecture.
  • Figure 1 is a flow chart of the in-depth inspection optimization method based on microservice architecture. As shown in Figure 1, the present invention provides an in-depth inspection optimization method based on microservice architecture. The method includes the following steps:
  • S1 Construct a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module in the horizontal layer and the fault history data of the physical device, and input the fault history data into the health inspection model to obtain the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection.
  • building a health inspection model and horizontally layering the microservice architecture system includes:
  • the microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
  • P represents the one-step transition probability matrix
  • the microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer to build an inspection model.
  • the physical device information corresponding to the modules and sub-modules of each layer is obtained through the relational database of the information resource layer.
  • the fault history data of the physical device corresponding to each sub-module at each horizontal level of the technical architecture is obtained from the historical fault database.
  • the data is involved in the operation of the health inspection model, and the operation result is the failure probability of the physical equipment corresponding to each module of the current horizontal layer in the next period of inspection.
  • P represents the one-step transition probability matrix
  • 70% of the normal monitoring indicators in the current layer of this inspection may still be normal, and 30% may turn into abnormalities [0.3, 0.7].
  • the transition probability of abnormal indicators in the current layer of this inspection is [0.6, 0.4].
  • S2 Preprocess the inspection data through quadratic interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; calculate the fitting value through the ridge regression method .
  • the preprocessing of inspection data through quadratic interpolation includes:
  • the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation.
  • the formula is as follows:
  • x is the current value of the classification object
  • y is the three adjacent points of the classification object
  • i is the sequence number of the classification object.
  • an in-depth inspection model based on AI algorithms was conducted on the six horizontal layers except (the basic environment layer is mainly composed of physical equipment) and combined with the over-fitting algorithm to detect whether the core technology of each module has strong generalization capabilities.
  • Generalizationability refers to the ability of a machine learning algorithm to adapt to fresh samples. The purpose of learning is to learn the rules hidden behind the data. For data outside the learning set with the same rules, the trained network can also give appropriate output. This ability is called generalization ability.
  • Transformer technology is used to build an in-depth inspection model.
  • the secondary interpolation technology provided by Transformer technology can make the inspection data more accurate before calculation.
  • the construction of an in-depth inspection model includes:
  • PositionEncoding is used for timing encoding
  • Attention is used to explore the feature correlation of the timing dimension.
  • the formula is as follows:
  • d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
  • the accurate data after secondary interpolation is input into the deep inspection model for simulation operation, and the result is expressed as the predicted failure probability value after the deep inspection of the current horizontal layer module in the microservice technology architecture system.
  • the fitted value calculated through the ridge regression method includes:
  • the ridge regression method is used to detect whether the functions of modules at each level are abnormal and whether they have strong generalization capabilities.
  • the reasons for overfitting in machine learning may be as follows: (1) noisy data (waste data); (2) Insufficient training data and limited training data; (3) Over-training the model makes the model very complex. Therefore, the ridge regression method is used to prevent model overfitting.
  • this embodiment transforms the ill-posed problem into a well-posed problem: adding a regularization term to the above loss function.
  • S3 Compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
  • this embodiment also includes the following steps: generating an intelligent inspection report.
  • This embodiment builds a health inspection model and a deep inspection model by horizontally layering the microservice architecture system, which can automatically implement in-depth inspections of each layer in the microservice architecture system.
  • the operation of the deep inspection model generates Comparing the actual value with the fitted value calculated by the ridge regression method can comprehensively evaluate the possible data defects and hidden functional failures of the microservice architecture, allowing the machine to make decisions instead of humans, thereby achieving complete automation and improving improves the efficiency of fault detection.
  • Figure 2 is a schematic diagram of an in-depth inspection and optimization system based on microservice architecture. As shown in Figure 2, the present invention also provides an in-depth inspection optimization system based on microservice architecture.
  • the system includes:
  • the first prediction module 201 is used to build a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module of the horizontal layer and the fault history data of the physical device, and combine the fault history data with Input the health inspection model to obtain the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection;
  • the second prediction module 202 is used to preprocess the inspection data through secondary interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; use ridge regression to The method calculates the fitting value;
  • the comparison and evaluation module 203 is used to compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
  • the first prediction module 201 builds a health inspection model, and horizontally layering the microservice architecture system includes:
  • the microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
  • P represents the one-step transition probability matrix
  • the second prediction module 202 preprocesses the inspection data through quadratic interpolation including:
  • the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation.
  • the formula is as follows:
  • x is the current value of the classification object
  • y is the three adjacent points of the classification object
  • i is the sequence number of the classification object.
  • the second prediction module 202 constructs an in-depth inspection model including:
  • PositionEncoding is used for timing encoding
  • Attention is used to explore the feature correlation of the timing dimension.
  • the formula is as follows:
  • d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
  • the fitting value calculated by the second prediction module 202 through the ridge regression method includes:

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A deep inspection optimization method and system based on a micro-service architecture, relating to the technical field of artificial intelligence. The method comprises: constructing a health inspection model, and transversely layering a micro-service architecture system; inputting historical failure data into the health inspection model to obtain a probability of the occurrence of a failure of a physical device corresponding to each module of a transverse layer during the next period of inspection; preprocessing inspection data by means of quadratic interpolation, and constructing a deep inspection model; inputting the preprocessed inspection data into the deep inspection model to obtain an actual value; and comparing a fitted value with the actual value generated by operation of the deep inspection model, and evaluating data defects and hidden function failures possibly existing in the micro-service architecture system.

Description

一种基于微服务架构的深度巡检优化方法及系统An in-depth inspection optimization method and system based on microservice architecture 技术领域Technical field
本发明属于人工智能技术领域,尤其涉及一种基于微服务架构的深度巡检优化方法及系统。The invention belongs to the field of artificial intelligence technology, and in particular relates to an in-depth inspection optimization method and system based on microservice architecture.
背景技术Background technique
随着计算机技术的飞速发展,信息网络已经成为社会发展的重要保证。在微服务架构体系中,为了保证各层功能运行正常,通常采用巡检方式对各层进行监控及定期巡检,使得微服务架构体系的物理设备层、应用层健康问题得到了有效解决。但仍有很大提高空间,只有很好的解决健康巡检更深维度问题,才能实现以运维数据中台为驱动,以AI算法为核心,涵盖基础设施监控、故障精准定位及智能处理、3D数字孪生、管理驾驶舱等专业运维服务模块,并通过微服务架构模式分解巨大单体式应用为多个服务。With the rapid development of computer technology, information network has become an important guarantee for social development. In the microservice architecture system, in order to ensure the normal operation of the functions of each layer, inspection methods are usually used to monitor and perform regular inspections on each layer, so that the health problems of the physical device layer and application layer of the microservice architecture system are effectively solved. However, there is still a lot of room for improvement. Only by well solving the deeper dimensional problem of health inspection can we realize the operation and maintenance data center as the driving force, with AI algorithm as the core, covering infrastructure monitoring, precise fault location and intelligent processing, 3D Professional operation and maintenance service modules such as digital twins and management cockpit, and decompose huge monolithic applications into multiple services through the microservice architecture model.
随着大数据及AI的大规模应用,如何保证微服务架构体系各层稳定的运行环境是当今面临的一个技术瓶颈。With the large-scale application of big data and AI, how to ensure a stable operating environment for each layer of the microservice architecture system is a technical bottleneck faced today.
发明内容Contents of the invention
本发明的主要目的在于克服现有技术的缺点与不足,提供一种基于微服务架构的深度巡检优化方法及系统,通过对微服务架构体系横向分层,构建健康巡检模型和深度巡检模型,可以自动实现对微服务架构体系中各层的深度巡检,同时通过将深度巡检模型的运算产生的实际值与岭回归方法计算得到的拟合值进行比较,能够整体评测微服务体系架构可能存在的数据缺陷及隐蔽功能故障,使得机器能够代替人来做出决策,从而让实现完全自动化,提升了故障检测的效率。The main purpose of the present invention is to overcome the shortcomings and deficiencies of the existing technology, provide an in-depth inspection optimization method and system based on microservice architecture, and construct a health inspection model and in-depth inspection model by horizontally layering the microservice architecture system. The model can automatically implement in-depth inspection of each layer in the microservice architecture system. At the same time, by comparing the actual values generated by the operation of the in-depth inspection model with the fitted values calculated by the ridge regression method, the microservice system can be evaluated as a whole. Possible data defects and hidden functional failures in the architecture enable machines to make decisions instead of humans, thereby achieving complete automation and improving the efficiency of fault detection.
根据本发明的一个方面,本发明提供了一种基于微服务架构的深度巡检优化方法,所述方法包括以下步骤:According to one aspect of the present invention, the present invention provides a deep inspection optimization method based on microservice architecture. The method includes the following steps:
S1:构建健康巡检模型,对微服务架构体系进行横向分层;获取横向层各模块对应的物理设备信息以及所述物理设备的故障历史数据,将所述故障历史数据输入所述健康巡检模型,得到横向层各模块对应的物理设备的下个时段巡检发生故障的概率;S1: Construct a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module in the horizontal layer and the fault history data of the physical device, and input the fault history data into the health inspection model to obtain the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection;
S2:通过二次插值对巡检数据进行预处理,构建深度巡检模型;将预处理后的所述巡检数据输入所述深度巡检模型得到实际值;通过岭回归方法计算得到拟合值;S2: Preprocess the inspection data through quadratic interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; calculate the fitting value through the ridge regression method ;
S3:将所述拟合值与所述深度巡检模型运算产生的所述实际值进行比较,评测所述微服务架构体系可能存在的数据缺陷及隐蔽功能故障。S3: Compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
优选地,所述构建健康巡检模型,对微服务架构体系进行横向分层包括:Preferably, building a health inspection model and horizontally layering the microservice architecture system includes:
将所述微服务架构体系进行横向分为七层:基础环境层、监管管理层、云平台、信息资源层、业务层、接口层及UI展示层;The microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
所述健康巡检模型包括马尔可夫转移矩阵算法模型:X(k+1)=X(k)×PThe health inspection model includes a Markov transfer matrix algorithm model: X(k+1)=X(k)×P
其中:X(k)表示趋势分析与预测对象在t=k时刻的状态向量,P表示一步转移概率矩阵,X(k+1)表示趋势分析与预测对象在t=k+1时刻的状态向量。Among them: X(k) represents the state vector of the trend analysis and prediction object at time t=k, P represents the one-step transition probability matrix, and .
优选地,所述通过二次插值对巡检数据进行预处理包括:Preferably, the preprocessing of inspection data through quadratic interpolation includes:
对不同节点采样不均匀的数据做差值处理,采用二次差值方法,以每3个相邻点做插值,得到二次插值,公式如下:To perform difference processing on data with uneven sampling at different nodes, the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation. The formula is as follows:
Figure PCTCN2022114210-appb-000001
Figure PCTCN2022114210-appb-000001
其中,x为分类对象的当前数值;y为分类对象的3个相邻点;i为分类对象的顺序号。Among them, x is the current value of the classification object; y is the three adjacent points of the classification object; i is the sequence number of the classification object.
优选地,所述构建深度巡检模型包括:Preferably, the construction of an in-depth inspection model includes:
针对时间维度,利用PositionEncoding进行时序编码,利用Attention发掘时序维度的特征关联,公式如下:For the time dimension, PositionEncoding is used for timing encoding, and Attention is used to explore the feature correlation of the timing dimension. The formula is as follows:
PositionEncoding=cos2(pos/N)PositionEncoding=cos2(pos/N)
Figure PCTCN2022114210-appb-000002
Figure PCTCN2022114210-appb-000002
针对空间维度,提取不同多空间维度特征,通过MultiHead融合多空间维度特征,公式如下:For the spatial dimension, extract different multi-space dimension features and fuse the multi-space dimension features through MultiHead. The formula is as follows:
Headi=Attention(Qi,Ki,Vi)Headi=Attention(Qi,Ki,Vi)
MultiHead(Q,K,V)=Concat(head1,...,headh)*WOMultiHead(Q,K,V)=Concat(head1,...,headh)*WO
其中,d k代表K的维度;N为可调长度大小;Q为查询特征映射;K为待匹配特征映射;V为监测数据映射;headi为时间注意力得到的结果,Qi为第i组查询特征映射;Ki为第i组待匹配特征映射;Vi为第i组监测数据映射;WO为特征融合矩阵;Concat为特征级联融合;pos为数据序列号;PositionEncoding为位置序列编码;MultiHead为多头特征融合。 Among them, d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
优选地,所述通过岭回归方法计算得到拟合值包括:Preferably, the fitted value calculated through the ridge regression method includes:
岭回归方法模型公式为:||Xθ-y|| 2+||Γθ|| 2 The model formula of the ridge regression method is: ||Xθ-y|| 2 +||Γθ|| 2
防止过拟合运算公式为:θ(a)=(X TX+aI) -1X Ty The formula to prevent over-fitting is: θ(a)=(X T X+aI) -1 X T y
其中,X表示输入;y表示输出的预测结果;||表示正则运算;I表示单位矩阵;θ为拟合超参数;Γ是权重常量;a是单位矩阵的权重;θ(a)表示在a确定的情况下求θ的值。Among them, Find the value of θ if determined.
根据本发明的另一个方面,本发明还提供了一种基于微服务架构的深度巡检优化系统,所述系统包括:According to another aspect of the present invention, the present invention also provides an in-depth inspection optimization system based on microservice architecture. The system includes:
第一预测模块,用于构建健康巡检模型,对微服务架构体系进行横向分层;获取横向层各模块对应的物理设备信息以及所述物理设备的故障历史数据,将所述故障历史数据输入所述健康巡检模型,得到横向层各模块对应的物理设备的下个时段巡检发生故障的概率;The first prediction module is used to build a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module in the horizontal layer and the fault history data of the physical device, and input the fault history data The health inspection model obtains the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection;
第二预测模块,用于通过二次插值对巡检数据进行预处理,构建深度巡检模型;将预处理后的所述巡检数据输入所述深度巡检模型得到实际值;通过岭回归方法计算得到拟合值;The second prediction module is used to preprocess the inspection data through secondary interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; use the ridge regression method Calculate the fitting value;
比较评测模块,用于将所述拟合值与所述深度巡检模型运算产生的所述实际值进行比较,评测所述微服务架构体系可能存在的数据缺陷及隐蔽功能故障。The comparison and evaluation module is used to compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
优选地,所述第一预测模块构建健康巡检模型,对微服务架构体系进行横向分层包括:Preferably, the first prediction module builds a health inspection model, and horizontally layering the microservice architecture system includes:
将所述微服务架构体系进行横向分为七层:基础环境层、监管管理层、云平台、信息资源层、业务层、接口层及UI展示层;The microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
所述健康巡检模型包括马尔可夫转移矩阵算法模型:X(k+1)=X(k)×PThe health inspection model includes a Markov transfer matrix algorithm model: X(k+1)=X(k)×P
其中:X(k)表示趋势分析与预测对象在t=k时刻的状态向量,P表示一步转移概率矩阵,X(k+1)表示趋势分析与预测对象在t=k+1时刻的状态向量。Among them: X(k) represents the state vector of the trend analysis and prediction object at time t=k, P represents the one-step transition probability matrix, and .
优选地,所述第二预测模块通过二次插值对巡检数据进行预处理包括:Preferably, the second prediction module preprocessing the inspection data through quadratic interpolation includes:
对不同节点采样不均匀的数据做差值处理,采用二次差值方法,以每3个相邻点做插值,得到二次插值,公式如下:To perform difference processing on data with uneven sampling at different nodes, the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation. The formula is as follows:
Figure PCTCN2022114210-appb-000003
Figure PCTCN2022114210-appb-000003
其中,x为分类对象的当前数值,y为分类对象的3个相邻点,i为分类对象 的顺序号。Among them, x is the current value of the classification object, y is the three adjacent points of the classification object, and i is the sequence number of the classification object.
优选地,所述第二预测模块构建深度巡检模型包括:Preferably, the second prediction module constructing an in-depth inspection model includes:
针对时间维度,利用PositionEncoding进行时序编码,利用Attention发掘时序维度的特征关联,公式如下:For the time dimension, PositionEncoding is used for timing encoding, and Attention is used to explore the feature correlation of the timing dimension. The formula is as follows:
PositionEncoding=cos2(pos/N)PositionEncoding=cos2(pos/N)
Figure PCTCN2022114210-appb-000004
Figure PCTCN2022114210-appb-000004
针对空间维度,提取不同多空间维度特征,通过MultiHead融合多空间维度特征,公式如下:For the spatial dimension, extract different multi-space dimension features and fuse the multi-space dimension features through MultiHead. The formula is as follows:
Headi=Attention(Qi,Ki,Vi)Headi=Attention(Qi,Ki,Vi)
MultiHead(Q,K,V)=Concat(head1,...,headh)*WOMultiHead(Q,K,V)=Concat(head1,...,headh)*WO
其中,d k代表K的维度;N为可调长度大小;Q为查询特征映射;K为待匹配特征映射;V为监测数据映射;headi为时间注意力得到的结果,Qi为第i组查询特征映射;Ki为第i组待匹配特征映射;Vi为第i组监测数据映射;WO为特征融合矩阵;Concat为特征级联融合;pos为数据序列号;PositionEncoding为位置序列编码;MultiHead为多头特征融合。 Among them, d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
优选地,所述第二预测模块通过岭回归方法计算得到拟合值包括:Preferably, the fitting value calculated by the second prediction module through ridge regression method includes:
岭回归方法模型公式为:||Xθ-y|| 2+||Γθ|| 2 The model formula of the ridge regression method is: ||Xθ-y|| 2 +||Γθ|| 2
防止过拟合运算公式为:θ(a)=(X TX+aI) -1X Ty The formula to prevent over-fitting is: θ(a)=(X T X+aI) -1 X T y
其中,X表示输入;y表示输出的预测结果;||表示正则运算;I表示单位矩阵;θ为拟合超参数;Γ是权重常量;a是单位矩阵的权重;θ(a)表示在a确定的情况下求θ的值。Among them, Find the value of θ if determined.
有益效果:本发明通过对微服务架构体系横向基础环境层、监管管理层、云 平台、信息资源层、业务层、接口层及UI展示层的大类和子类进行深度健康巡检;同时通过人工智能领域多种算法模型的组合技术,弥补了巡检现有技术过于重视物理设备及应用检测而缺少通过模拟数据测试各层级的拟合值与各横向层通过深度巡检模型的运算产生的实际值比较的角度来整体评测微服务体系架构可能存在的数据缺陷及隐蔽功能故障给应用平台可能造成的损失,使得机器能够代替人来做出决策,从而让实现完全自动化、智能化真正意义上成为可能。Beneficial effects: The present invention conducts in-depth health inspections on the major categories and subcategories of the horizontal basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer of the microservice architecture system; at the same time, it The combination technology of multiple algorithm models in the field of artificial intelligence makes up for the fact that the existing inspection technology places too much emphasis on physical equipment and application detection and lacks the simulation data to test the fitting values of each level and the calculation of each horizontal layer through the in-depth inspection model. From the perspective of actual value comparison, we can comprehensively evaluate the possible data defects and hidden functional failures of the microservice architecture, and the losses that may be caused to the application platform, so that machines can make decisions instead of people, thus realizing complete automation and intelligence in a true sense. become possible.
通过参照以下附图及对本发明的具体实施方式的详细描述,本发明的特征及优点将会变得清楚。The features and advantages of the present invention will become apparent with reference to the following drawings and detailed description of specific embodiments of the invention.
附图说明Description of the drawings
图1是基于微服务架构的深度巡检优化方法流程图;Figure 1 is a flow chart of the in-depth inspection optimization method based on microservice architecture;
图2是基于微服务架构的深度巡检优化系统示意图。Figure 2 is a schematic diagram of an in-depth inspection and optimization system based on microservice architecture.
具体实施方式Detailed ways
下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
实施例1Example 1
图1是基于微服务架构的深度巡检优化方法流程图。如图1所示,本发明提供了一种基于微服务架构的深度巡检优化方法,所述方法包括以下步骤:Figure 1 is a flow chart of the in-depth inspection optimization method based on microservice architecture. As shown in Figure 1, the present invention provides an in-depth inspection optimization method based on microservice architecture. The method includes the following steps:
S1:构建健康巡检模型,对微服务架构体系进行横向分层;获取横向层各模块对应的物理设备信息以及所述物理设备的故障历史数据,将所述故障历史数据输入所述健康巡检模型,得到横向层各模块对应的物理设备的下个时段巡检发生故障的概率。S1: Construct a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module in the horizontal layer and the fault history data of the physical device, and input the fault history data into the health inspection model to obtain the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection.
优选地,所述构建健康巡检模型,对微服务架构体系进行横向分层包括:Preferably, building a health inspection model and horizontally layering the microservice architecture system includes:
将所述微服务架构体系进行横向分为七层:基础环境层、监管管理层、云平台、信息资源层、业务层、接口层及UI展示层;The microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
所述健康巡检模型包括马尔可夫转移矩阵算法模型:X(k+1)=X(k)×PThe health inspection model includes a Markov transfer matrix algorithm model: X(k+1)=X(k)×P
其中:X(k)表示趋势分析与预测对象在t=k时刻的状态向量,P表示一步转移概率矩阵,X(k+1)表示趋势分析与预测对象在t=k+1时刻的状态向量。Among them: X(k) represents the state vector of the trend analysis and prediction object at time t=k, P represents the one-step transition probability matrix, and .
具体地,首先,对微服务架构体系进行横向分七层:基础环境层、监管管理层、云平台、信息资源层、业务层、接口层及UI展示层的巡检模型进行构建。Specifically, first, the microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer to build an inspection model.
其次,通过信息资源层的关系型数据库获得各层模块及子模块对应的物理设备信息。Secondly, the physical device information corresponding to the modules and sub-modules of each layer is obtained through the relational database of the information resource layer.
然后,再从历史故障数据库获取技术架构各横向层级的各子模块对应的该物理设备的故障历史数据。Then, the fault history data of the physical device corresponding to each sub-module at each horizontal level of the technical architecture is obtained from the historical fault database.
最后,将数据参与到健康巡检模型运算,运算结果即为当前横向层各模块对应物理设备下个时段巡检发生故障概率。Finally, the data is involved in the operation of the health inspection model, and the operation result is the failure probability of the physical equipment corresponding to each module of the current horizontal layer in the next period of inspection.
其中,马尔可夫转移矩阵算法模型公式:X(k+1)=X(k)×PAmong them, the Markov transfer matrix algorithm model formula is: X(k+1)=X(k)×P
公式中:X(k)表示趋势分析与预测对象在t=k时刻的状态向量,P表示一步转移概率矩阵,X(k+1)表示趋势分析与预测对象在t=k+1时刻的状态向量。In the formula: X(k) represents the state vector of the trend analysis and prediction object at time t=k, P represents the one-step transition probability matrix, and vector.
本次巡检当前层控指标100个,其中正常30、异常70,正常监测指标中有60%可能继续正常,40%可能转成异常[0.6、0.4]。There are currently 100 layer control indicators in this inspection, of which 30 are normal and 70 are abnormal. 60% of the normal monitoring indicators may continue to be normal and 40% may become abnormal [0.6, 0.4].
本次巡检当前层正常监测指标中70%可能依然是正常,30%可能转成异常[0.3、0.7],本次巡检当前层异常指标转移概率[0.6、0.4],本次巡检当前层正常指标转移概率[0.3、0.7],下次巡检当前层故障发生概率=30x0.6+30x0.7=39, 正常发生概率=30x0.4+70x0.7=61。70% of the normal monitoring indicators in the current layer of this inspection may still be normal, and 30% may turn into abnormalities [0.3, 0.7]. The transition probability of abnormal indicators in the current layer of this inspection is [0.6, 0.4]. The layer normal indicator transition probability is [0.3, 0.7], the current layer fault occurrence probability during the next inspection = 30x0.6+30x0.7=39, and the normal occurrence probability = 30x0.4+70x0.7=61.
通过模型计算得出下个时段巡检各横向层故障发生概率39%、正常发生概率61%。重复该模型获得其他横向层下次巡检发生概率。Through model calculation, it is concluded that the failure probability of each horizontal layer in the next period of inspection is 39%, and the normal occurrence probability is 61%. Repeat the model to obtain the probability of the next inspection of other horizontal layers.
S2:通过二次插值对巡检数据进行预处理,构建深度巡检模型;将预处理后的所述巡检数据输入所述深度巡检模型得到实际值;通过岭回归方法计算得到拟合值。S2: Preprocess the inspection data through quadratic interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; calculate the fitting value through the ridge regression method .
优选地,所述通过二次插值对巡检数据进行预处理包括:Preferably, the preprocessing of inspection data through quadratic interpolation includes:
对不同节点采样不均匀的数据做差值处理,采用二次差值方法,以每3个相邻点做插值,得到二次插值,公式如下:To perform difference processing on data with uneven sampling at different nodes, the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation. The formula is as follows:
Figure PCTCN2022114210-appb-000005
Figure PCTCN2022114210-appb-000005
其中,x为分类对象的当前数值,y为分类对象的3个相邻点,i为分类对象的顺序号。Among them, x is the current value of the classification object, y is the three adjacent points of the classification object, and i is the sequence number of the classification object.
具体地,对除(基础环境层主要由物理设备组成)之外横向的六层进行基于AI算法的深度巡检模型并结合过拟合算法检测各模块核心技术是否有较强的泛化能力。泛化能力(generalizationability)是指机器学习算法对新鲜样本的适应能力。学习的目的是学到隐含在数据背后的规律,对具有同一规律的学习集以外的数据,经过训练的网络也能给出合适的输出,该能力称为泛化能力。Specifically, an in-depth inspection model based on AI algorithms was conducted on the six horizontal layers except (the basic environment layer is mainly composed of physical equipment) and combined with the over-fitting algorithm to detect whether the core technology of each module has strong generalization capabilities. Generalizationability refers to the ability of a machine learning algorithm to adapt to fresh samples. The purpose of learning is to learn the rules hidden behind the data. For data outside the learning set with the same rules, the trained network can also give appropriate output. This ability is called generalization ability.
采用Transformer技术构建深度巡检模型,通过Transformer技术自带的二次插值技术可以使巡检数据在运算前更加精确。Transformer technology is used to build an in-depth inspection model. The secondary interpolation technology provided by Transformer technology can make the inspection data more accurate before calculation.
为适应模型处理,对不同节点采样不均匀的数据做差值处理。采用二次差值方法,以每3个相邻点做插值,得到二次插值。即,人工智能算法提优后的数据。 此方法优点:In order to adapt to model processing, difference processing is performed on data with uneven sampling at different nodes. The quadratic difference method is used to interpolate every 3 adjacent points to obtain the quadratic interpolation. That is, data optimized by artificial intelligence algorithms. Advantages of this method:
1、间隔均匀,和transformer时序处理更加匹配。1. The intervals are even and more consistent with the transformer timing processing.
2、较真实还原巡检过程中横向各层级的模拟真实(当前模块输入型数据、纵向关联模块输入型数据、当前模块历史监测正常采集数据)场景缺失数据。2. More realistically restore the missing data of the simulated real scenes at all horizontal levels during the inspection process (current module input data, vertical correlation module input data, current module historical monitoring normal collection data).
优选地,所述构建深度巡检模型包括:Preferably, the construction of an in-depth inspection model includes:
针对时间维度,利用PositionEncoding进行时序编码,利用Attention发掘时序维度的特征关联,公式如下:For the time dimension, PositionEncoding is used for timing encoding, and Attention is used to explore the feature correlation of the timing dimension. The formula is as follows:
PositionEncoding=cos2(pos/N)PositionEncoding=cos2(pos/N)
Figure PCTCN2022114210-appb-000006
Figure PCTCN2022114210-appb-000006
针对空间维度,提取不同多空间维度特征,通过MultiHead融合多空间维度特征,公式如下:For the spatial dimension, extract different multi-space dimension features and fuse the multi-space dimension features through MultiHead. The formula is as follows:
Headi=Attention(Qi,Ki,Vi)Headi=Attention(Qi,Ki,Vi)
MultiHead(Q,K,V)=Concat(head1,...,headh)*WOMultiHead(Q,K,V)=Concat(head1,...,headh)*WO
其中,d k代表K的维度;N为可调长度大小;Q为查询特征映射;K为待匹配特征映射;V为监测数据映射;headi为时间注意力得到的结果,Qi为第i组查询特征映射;Ki为第i组待匹配特征映射;Vi为第i组监测数据映射;WO为特征融合矩阵;Concat为特征级联融合;pos为数据序列号;PositionEncoding为位置序列编码;MultiHead为多头特征融合。 Among them, d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
具体地,将二次插值精确后的数据输入深度巡检模型进行模拟运算,结果表示为微服务技术架构体系中当前横向层模块深度巡检后预测故障发生概率值。Specifically, the accurate data after secondary interpolation is input into the deep inspection model for simulation operation, and the result is expressed as the predicted failure probability value after the deep inspection of the current horizontal layer module in the microservice technology architecture system.
优选地,所述通过岭回归方法计算得到拟合值包括:Preferably, the fitted value calculated through the ridge regression method includes:
岭回归方法模型公式为:||Xθ-y|| 2+||Γθ|| 2 The model formula of the ridge regression method is: ||Xθ-y|| 2 +||Γθ|| 2
防止过拟合运算公式为:θ(a)=(X TX+aI) -1X Ty The formula to prevent over-fitting is: θ(a)=(X T X+aI) -1 X T y
其中,X表示输入,y表示输出的预测结果,||表示正则运算,I表示单位矩阵;θ为拟合超参数;Γ是权重常量;a是单位矩阵的权重;θ(a)表示在a确定的情况下求θ的值。Among them, Find the value of θ if determined.
具体地,通过岭回归方法检测各层级模块功能是否异常及是否有较强的泛化能力。机器学习中造成过拟合的原因可能有以下几点:(1)数据有噪声(废数据);(2)训练数据不足,有限的训练数据;(3)训练模型过度导致模型非常复杂。因此通过岭回归方法防止模型过拟合。Specifically, the ridge regression method is used to detect whether the functions of modules at each level are abnormal and whether they have strong generalization capabilities. The reasons for overfitting in machine learning may be as follows: (1) Noisy data (waste data); (2) Insufficient training data and limited training data; (3) Over-training the model makes the model very complex. Therefore, the ridge regression method is used to prevent model overfitting.
传统的最小二乘法缺乏稳定性与可靠性,为了解决上述问题,本实施例将不适定问题转化为适定问题:为上述损失函数加上一个正则化项。The traditional least squares method lacks stability and reliability. In order to solve the above problems, this embodiment transforms the ill-posed problem into a well-posed problem: adding a regularization term to the above loss function.
S3:将所述拟合值与所述深度巡检模型运算产生的所述实际值进行比较,评测所述微服务架构体系可能存在的数据缺陷及隐蔽功能故障。S3: Compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
具体地,拟合值再通过与当前层级->子模块的实际业务历史巡检正常数据占全部巡检比值(以下简称实际值)比较,即,拟合值-实际值=差值,如果差值在10%以内则表示当前模型模拟巡检数据与实际业务巡检数据通过深度巡检模型的运算结果误差较小。如果大于10%判定为过拟合状态,需要通知相关技术人员对被巡检对象所在层级及模块进行功能上的检查,包括录入数据的后台检查、历史数据的分析、相关其他模块或层级业务是否数据异常等。Specifically, the fitted value is compared with the actual business history inspection normal data of the current level -> sub-module to the total inspection ratio (hereinafter referred to as the actual value), that is, the fitted value - actual value = difference, if the difference If the value is within 10%, it means that the calculation result of the current model simulated inspection data and the actual business inspection data through the in-depth inspection model is smaller. If more than 10% is determined to be an overfitting state, relevant technical personnel need to be notified to conduct functional inspections on the level and module of the inspected object, including background inspection of data entry, analysis of historical data, and whether related other modules or levels of business are Data anomalies, etc.
优选地,本实施例还包括以下步骤:生成智能巡检报表。Preferably, this embodiment also includes the following steps: generating an intelligent inspection report.
具体地,将各层子模块巡检结果汇总,并生成报表,如表1所示。从而完成智能深度巡检全过程。通过智能报表可以全面了解微服务技术架构从设备监控指标到各层功能是否正常运行的全面健康监测。弥补了巡检现有技术过重视物理设 备及应用检测而缺少通过模拟数据测试各层级的拟合值与各横向层通过深度巡检模型的运算产生的实际值比较的角度来整体评测微服务技术架构可能存在的数据缺陷及隐蔽功能故障给应用平台可能造成的损失。Specifically, the inspection results of sub-modules at each layer are summarized and a report is generated, as shown in Table 1. This completes the entire process of intelligent in-depth inspection. Through intelligent reports, you can have a comprehensive understanding of the microservice technical architecture, from device monitoring indicators to comprehensive health monitoring of whether functions at each layer are running normally. It makes up for the existing inspection technology's overemphasis on physical equipment and application detection and lack of overall evaluation of microservice technology from the perspective of comparing the fitted values of each level through simulated data testing and the actual values generated by each horizontal layer through the operation of the in-depth inspection model. Possible data defects and hidden functional failures in the architecture may cause losses to the application platform.
表1巡检报表Table 1 Inspection Report
Figure PCTCN2022114210-appb-000007
Figure PCTCN2022114210-appb-000007
Figure PCTCN2022114210-appb-000008
Figure PCTCN2022114210-appb-000008
本实施例通过对微服务架构体系横向分层,构建健康巡检模型和深度巡检模型,可以自动实现对微服务架构体系中各层的深度巡检,同时通过将深度巡检模型的运算产生的实际值与岭回归方法计算得到的拟合值进行比较,能够整体评测微服务体系架构可能存在的数据缺陷及隐蔽功能故障,使得机器能够代替人来做出决策,从而让实现完全自动化,提升了故障检测的效率。This embodiment builds a health inspection model and a deep inspection model by horizontally layering the microservice architecture system, which can automatically implement in-depth inspections of each layer in the microservice architecture system. At the same time, the operation of the deep inspection model generates Comparing the actual value with the fitted value calculated by the ridge regression method can comprehensively evaluate the possible data defects and hidden functional failures of the microservice architecture, allowing the machine to make decisions instead of humans, thereby achieving complete automation and improving improves the efficiency of fault detection.
实施例2Example 2
图2是基于微服务架构的深度巡检优化系统示意图。如图2所示,本发明还提供了一种基于微服务架构的深度巡检优化系统,所述系统包括:Figure 2 is a schematic diagram of an in-depth inspection and optimization system based on microservice architecture. As shown in Figure 2, the present invention also provides an in-depth inspection optimization system based on microservice architecture. The system includes:
第一预测模块201,用于构建健康巡检模型,对微服务架构体系进行横向分层;获取横向层各模块对应的物理设备信息以及所述物理设备的故障历史数据,将所述故障历史数据输入所述健康巡检模型,得到横向层各模块对应的物理设备的下个时段巡检发生故障的概率;The first prediction module 201 is used to build a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module of the horizontal layer and the fault history data of the physical device, and combine the fault history data with Input the health inspection model to obtain the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection;
第二预测模块202,用于通过二次插值对巡检数据进行预处理,构建深度巡检模型;将预处理后的所述巡检数据输入所述深度巡检模型得到实际值;通过岭回归方法计算得到拟合值;The second prediction module 202 is used to preprocess the inspection data through secondary interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; use ridge regression to The method calculates the fitting value;
比较评测模块203,用于将所述拟合值与所述深度巡检模型运算产生的所述实际值进行比较,评测所述微服务架构体系可能存在的数据缺陷及隐蔽功能故障。The comparison and evaluation module 203 is used to compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
优选地,所述第一预测模块201构建健康巡检模型,对微服务架构体系进行横向分层包括:Preferably, the first prediction module 201 builds a health inspection model, and horizontally layering the microservice architecture system includes:
将所述微服务架构体系进行横向分为七层:基础环境层、监管管理层、云平台、信息资源层、业务层、接口层及UI展示层;The microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
所述健康巡检模型包括马尔可夫转移矩阵算法模型:X(k+1)=X(k)×PThe health inspection model includes a Markov transfer matrix algorithm model: X(k+1)=X(k)×P
其中:X(k)表示趋势分析与预测对象在t=k时刻的状态向量,P表示一步转移概率矩阵,X(k+1)表示趋势分析与预测对象在t=k+1时刻的状态向量。Among them: X(k) represents the state vector of the trend analysis and prediction object at time t=k, P represents the one-step transition probability matrix, and .
优选地,所述第二预测模块202通过二次插值对巡检数据进行预处理包括:Preferably, the second prediction module 202 preprocesses the inspection data through quadratic interpolation including:
对不同节点采样不均匀的数据做差值处理,采用二次差值方法,以每3个相邻点做插值,得到二次插值,公式如下:To perform difference processing on data with uneven sampling at different nodes, the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation. The formula is as follows:
Figure PCTCN2022114210-appb-000009
Figure PCTCN2022114210-appb-000009
其中,x为分类对象的当前数值,y为分类对象的3个相邻点,i为分类对象的顺序号。Among them, x is the current value of the classification object, y is the three adjacent points of the classification object, and i is the sequence number of the classification object.
优选地,所述第二预测模块202构建深度巡检模型包括:Preferably, the second prediction module 202 constructs an in-depth inspection model including:
针对时间维度,利用PositionEncoding进行时序编码,利用Attention发 掘时序维度的特征关联,公式如下:For the time dimension, PositionEncoding is used for timing encoding, and Attention is used to explore the feature correlation of the timing dimension. The formula is as follows:
PositionEncoding=cos2(pos/N)PositionEncoding=cos2(pos/N)
Figure PCTCN2022114210-appb-000010
Figure PCTCN2022114210-appb-000010
针对空间维度,提取不同多空间维度特征,通过MultiHead融合多空间维度特征,公式如下:For the spatial dimension, extract different multi-space dimension features and fuse the multi-space dimension features through MultiHead. The formula is as follows:
Headi=Attention(Qi,Ki,Vi)Headi=Attention(Qi,Ki,Vi)
MultiHead(Q,K,V)=Concat(head1,...,headh)*WOMultiHead(Q,K,V)=Concat(head1,...,headh)*WO
其中,d k代表K的维度;N为可调长度大小;Q为查询特征映射;K为待匹配特征映射;V为监测数据映射;headi为时间注意力得到的结果,Qi为第i组查询特征映射;Ki为第i组待匹配特征映射;Vi为第i组监测数据映射;WO为特征融合矩阵;Concat为特征级联融合;pos为数据序列号;PositionEncoding为位置序列编码;MultiHead为多头特征融合。 Among them, d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
优选地,所述第二预测模块202通过岭回归方法计算得到拟合值包括:Preferably, the fitting value calculated by the second prediction module 202 through the ridge regression method includes:
岭回归方法模型公式为:||Xθ-y|| 2+||Γθ|| 2 The model formula of the ridge regression method is: ||Xθ-y|| 2 +||Γθ|| 2
防止过拟合运算公式为:θ(a)=(X TX+aI) -1X Ty The formula to prevent over-fitting is: θ(a)=(X T X+aI) -1 X T y
其中,X表示输入,y表示输出的预测结果,||表示正则运算,I表示单位矩阵;θ为拟合超参数;Γ是权重常量;a是单位矩阵的权重;θ(a)表示在a确定的情况下求θ的值。Among them, Find the value of θ if determined.
本实施例2中各个模块所实现的功能的具体实施过程与实施例1中的实施过程相同,在此不再赘述。The specific implementation process of the functions implemented by each module in Embodiment 2 is the same as the implementation process in Embodiment 1, and will not be described again here.
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是在本发明的构思下,利用本发明说明书及附图内容所作的等效结构变换,或直接 /间接运用在其他相关的技术领域均包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Under the concept of the present invention, equivalent structural transformations can be made by using the contents of the description and drawings of the present invention, or directly/indirectly used in Other related technical fields are included in the patent protection scope of the present invention.

Claims (10)

  1. 一种基于微服务架构的深度巡检优化方法,其特征在于,所述方法包括以下步骤:An in-depth inspection optimization method based on microservice architecture, characterized in that the method includes the following steps:
    S1:构建健康巡检模型,对微服务架构体系进行横向分层;获取横向层各模块对应的物理设备信息以及所述物理设备的故障历史数据,将所述故障历史数据输入所述健康巡检模型,得到横向层各模块对应的物理设备的下个时段巡检发生故障的概率;S1: Construct a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module in the horizontal layer and the fault history data of the physical device, and input the fault history data into the health inspection model to obtain the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection;
    S2:通过二次插值对巡检数据进行预处理,构建深度巡检模型;将预处理后的所述巡检数据输入所述深度巡检模型得到实际值;通过岭回归方法计算得到拟合值;S2: Preprocess the inspection data through quadratic interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; calculate the fitting value through the ridge regression method ;
    S3:将所述拟合值与所述深度巡检模型运算产生的所述实际值进行比较,评测所述微服务架构体系可能存在的数据缺陷及隐蔽功能故障。S3: Compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
  2. 根据权利要求1所述的方法,其特征在于,所述构建健康巡检模型,对微服务架构体系进行横向分层包括:The method according to claim 1, characterized in that said constructing a health inspection model and horizontally layering the microservice architecture system includes:
    将所述微服务架构体系进行横向分为七层:基础环境层、监管管理层、云平台、信息资源层、业务层、接口层及UI展示层;The microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
    所述健康巡检模型包括马尔可夫转移矩阵算法模型:X(k+1)=X(k)×PThe health inspection model includes a Markov transfer matrix algorithm model: X(k+1)=X(k)×P
    其中:X(k)表示趋势分析与预测对象在t=k时刻的状态向量,P表示一步转移概率矩阵,X(k+1)表示趋势分析与预测对象在t=k+1时刻的状态向量。Among them: X(k) represents the state vector of the trend analysis and prediction object at time t=k, P represents the one-step transition probability matrix, and .
  3. 根据权利要求1所述的方法,其特征在于,所述通过二次插值对巡检数据进行预处理包括:The method according to claim 1, wherein preprocessing inspection data through quadratic interpolation includes:
    对不同节点采样不均匀的数据做差值处理,采用二次差值方法,以每3个相邻点做插值,得到二次插值,公式如下:To perform difference processing on data with uneven sampling at different nodes, the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation. The formula is as follows:
    Figure PCTCN2022114210-appb-100001
    Figure PCTCN2022114210-appb-100001
    其中,x为分类对象的当前数值;y为分类对象的3个相邻点;i为分类对象的顺序号。Among them, x is the current value of the classification object; y is the three adjacent points of the classification object; i is the sequence number of the classification object.
  4. 根据权利要求3所述的方法,其特征在于,所述构建深度巡检模型包括:The method according to claim 3, characterized in that said constructing an in-depth inspection model includes:
    针对时间维度,利用PositionEncoding进行时序编码,利用Attention发掘时序维度的特征关联,公式如下:For the time dimension, PositionEncoding is used for timing encoding, and Attention is used to explore the feature correlation of the timing dimension. The formula is as follows:
    PositionEncoding=cos2(pos/N)PositionEncoding=cos2(pos/N)
    Figure PCTCN2022114210-appb-100002
    Figure PCTCN2022114210-appb-100002
    针对空间维度,提取不同多空间维度特征,通过MultiHead融合多空间维度特征,公式如下:For the spatial dimension, extract different multi-space dimension features and fuse the multi-space dimension features through MultiHead. The formula is as follows:
    Headi=Attention(Qi,Ki,Vi)Headi=Attention(Qi,Ki,Vi)
    MultiHead(Q,K,V)=Concat(head1,...,headh)*WOMultiHead(Q,K,V)=Concat(head1,...,headh)*WO
    其中,d k代表K的维度;N为可调长度大小;Q为查询特征映射;K为待匹配特征映射;V为监测数据映射;headi为时间注意力得到的结果,Qi为第i组查询特征映射;Ki为第i组待匹配特征映射;Vi为第i组监测数据映射;WO为特征融合矩阵;Concat为特征级联融合;pos为数据序列号;PositionEncoding为位置序列编码;MultiHead为多头特征融合。 Among them, d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
  5. 根据权利要求4所述的方法,其特征在于,所述通过岭回归方法计算得到拟合值包括:The method according to claim 4, wherein the fitting value calculated by the ridge regression method includes:
    岭回归方法模型公式为:||Xθ-y|| 2+||Γθ|| 2 The model formula of the ridge regression method is: ||Xθ-y|| 2 +||Γθ|| 2
    防止过拟合运算公式为:θ(a)=(X TX+aI) -1X Ty The formula to prevent over-fitting is: θ(a)=(X T X+aI) -1 X T y
    其中,X表示输入;y表示输出的预测结果;||表示正则运算;I表示单位矩阵;θ为拟合超参数;Γ是权重常量;a是单位矩阵的权重;θ(a)表示在a确定的情况下求θ的值。Among them, Find the value of θ if determined.
  6. 一种基于微服务架构的深度巡检优化系统,其特征在于,所述系统包括:An in-depth inspection and optimization system based on microservice architecture, characterized in that the system includes:
    第一预测模块,用于构建健康巡检模型,对微服务架构体系进行横向分层;获取横向层各模块对应的物理设备信息以及所述物理设备的故障历史数据,将所述故障历史数据输入所述健康巡检模型,得到横向层各模块对应的物理设备的下个时段巡检发生故障的概率;The first prediction module is used to build a health inspection model and horizontally layer the microservice architecture system; obtain the physical device information corresponding to each module in the horizontal layer and the fault history data of the physical device, and input the fault history data The health inspection model obtains the probability of failure of the physical equipment corresponding to each module in the horizontal layer in the next period of inspection;
    第二预测模块,用于通过二次插值对巡检数据进行预处理,构建深度巡检模型;将预处理后的所述巡检数据输入所述深度巡检模型得到实际值;通过岭回归方法计算得到拟合值;The second prediction module is used to preprocess the inspection data through secondary interpolation to construct a deep inspection model; input the preprocessed inspection data into the deep inspection model to obtain the actual value; use the ridge regression method Calculate the fitting value;
    比较评测模块,用于将所述拟合值与所述深度巡检模型运算产生的所述实际值进行比较,评测所述微服务架构体系可能存在的数据缺陷及隐蔽功能故障。The comparison and evaluation module is used to compare the fitting value with the actual value generated by the in-depth inspection model operation, and evaluate possible data defects and hidden functional failures in the microservice architecture system.
  7. 根据权利要求6所述的系统,其特征在于,所述第一预测模块构建健康巡检模型,对微服务架构体系进行横向分层包括:The system according to claim 6, characterized in that the first prediction module constructs a health inspection model, and horizontally layering the microservice architecture system includes:
    将所述微服务架构体系进行横向分为七层:基础环境层、监管管理层、云平台、信息资源层、业务层、接口层及UI展示层;The microservice architecture system is horizontally divided into seven layers: basic environment layer, supervision management layer, cloud platform, information resource layer, business layer, interface layer and UI display layer;
    所述健康巡检模型包括马尔可夫转移矩阵算法模型:X(k+1)=X(k)×PThe health inspection model includes a Markov transfer matrix algorithm model: X(k+1)=X(k)×P
    其中:X(k)表示趋势分析与预测对象在t=k时刻的状态向量,P表示一步转移概率矩阵,X(k+1)表示趋势分析与预测对象在t=k+1时刻的状态向量。Among them: X(k) represents the state vector of the trend analysis and prediction object at time t=k, P represents the one-step transition probability matrix, and .
  8. 根据权利要求6所述的系统,其特征在于,所述第二预测模块通过二次插值对巡检数据进行预处理包括:The system according to claim 6, characterized in that, the second prediction module preprocessing the inspection data through secondary interpolation includes:
    对不同节点采样不均匀的数据做差值处理,采用二次差值方法,以每3个相邻点做插值,得到二次插值,公式如下:To perform difference processing on data with uneven sampling at different nodes, the quadratic difference method is used to interpolate every 3 adjacent points to obtain quadratic interpolation. The formula is as follows:
    Figure PCTCN2022114210-appb-100003
    Figure PCTCN2022114210-appb-100003
    其中,x为分类对象的当前数值;y为分类对象的3个相邻点;i为分类对象的顺序号。Among them, x is the current value of the classification object; y is the three adjacent points of the classification object; i is the sequence number of the classification object.
  9. 根据权利要求8所述的系统,其特征在于,所述第二预测模块构建深度巡检模型包括:The system according to claim 8, wherein the second prediction module constructing an in-depth inspection model includes:
    针对时间维度,利用PositionEncoding进行时序编码,利用Attention发掘时序维度的特征关联,公式如下:For the time dimension, PositionEncoding is used for timing encoding, and Attention is used to explore the feature correlation of the timing dimension. The formula is as follows:
    PositionEncoding=cos2(pos/N)PositionEncoding=cos2(pos/N)
    Figure PCTCN2022114210-appb-100004
    Figure PCTCN2022114210-appb-100004
    针对空间维度,提取不同多空间维度特征,通过MultiHead融合多空间维度特征,公式如下:For the spatial dimension, extract different multi-space dimension features and fuse the multi-space dimension features through MultiHead. The formula is as follows:
    Headi=Attention(Qi,Ki,Vi)Headi=Attention(Qi,Ki,Vi)
    MultiHead(Q,K,V)=Concat(head1,...,headh)*WOMultiHead(Q,K,V)=Concat(head1,...,headh)*WO
    其中,d k代表K的维度;N为可调长度大小;Q为查询特征映射;K为待匹配特征映射;V为监测数据映射;headi为时间注意力得到的结果,Qi为第i组查询特征映射;Ki为第i组待匹配特征映射;Vi为第i组监测数据映射;WO为特征融合矩阵;Concat为特征级联融合;pos为数据序列号;PositionEncoding为位置序列编码;MultiHead为多头特征融合。 Among them, d k represents the dimension of K; N is the adjustable length; Q is the query feature map; K is the feature map to be matched; V is the monitoring data map; headi is the result obtained by time attention, Qi is the i-th group of queries Feature map; Ki is the i-th group of feature maps to be matched; Vi is the i-th group of monitoring data mapping; WO is the feature fusion matrix; Concat is the feature cascade fusion; pos is the data sequence number; PositionEncoding is the position sequence encoding; MultiHead is the multi-head Feature fusion.
  10. 根据权利要求9所述的方法,其特征在于,所述第二预测模块通过岭回 归方法计算得到拟合值包括:The method according to claim 9, characterized in that the second prediction module calculates the fitting value through ridge regression method including:
    岭回归方法模型公式为:||Xθ-y|| 2+||Γθ|| 2 The model formula of the ridge regression method is: ||Xθ-y|| 2 +||Γθ|| 2
    防止过拟合运算公式为:θ(a)=(X TX+aI) -1X Ty The formula to prevent over-fitting is: θ(a)=(X T X+aI) -1 X T y
    其中,X表示输入;y表示输出的预测结果;||表示正则运算;I表示单位矩阵;θ为拟合超参数;Γ是权重常量;a是单位矩阵的权重;θ(a)表示在a确定的情况下求θ的值。Among them, Find the value of θ if determined.
PCT/CN2022/114210 2022-06-20 2022-08-23 Deep inspection optimization method and system based on micro-service architecture WO2023245851A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210701767.1A CN114996110A (en) 2022-06-20 2022-06-20 Deep inspection optimization method and system based on micro-service architecture
CN202210701767.1 2022-06-20

Publications (1)

Publication Number Publication Date
WO2023245851A1 true WO2023245851A1 (en) 2023-12-28

Family

ID=83036573

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/114210 WO2023245851A1 (en) 2022-06-20 2022-08-23 Deep inspection optimization method and system based on micro-service architecture

Country Status (2)

Country Link
CN (1) CN114996110A (en)
WO (1) WO2023245851A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6393386B1 (en) * 1998-03-26 2002-05-21 Visual Networks Technologies, Inc. Dynamic modeling of complex networks and prediction of impacts of faults therein
CN106327013A (en) * 2016-08-24 2017-01-11 广东工业大学 Power transmission line inspection path planning method and system
CN109038832A (en) * 2018-09-19 2018-12-18 上海许继电气有限公司 Substation's auxiliary monitoring system based on micro services framework
CN110334740A (en) * 2019-06-05 2019-10-15 武汉大学 The electrical equipment fault of artificial intelligence reasoning fusion detects localization method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6393386B1 (en) * 1998-03-26 2002-05-21 Visual Networks Technologies, Inc. Dynamic modeling of complex networks and prediction of impacts of faults therein
CN106327013A (en) * 2016-08-24 2017-01-11 广东工业大学 Power transmission line inspection path planning method and system
CN109038832A (en) * 2018-09-19 2018-12-18 上海许继电气有限公司 Substation's auxiliary monitoring system based on micro services framework
CN110334740A (en) * 2019-06-05 2019-10-15 武汉大学 The electrical equipment fault of artificial intelligence reasoning fusion detects localization method

Also Published As

Publication number Publication date
CN114996110A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN111985561B (en) Fault diagnosis method and system for intelligent electric meter and electronic device
CN110008288A (en) The construction method in the knowledge mapping library for Analysis of Network Malfunction and its application
CN111337768A (en) Deep parallel fault diagnosis method and system for dissolved gas in transformer oil
CN110703057B (en) Power equipment partial discharge diagnosis method based on data enhancement and neural network
CN112859822B (en) Equipment health analysis and fault diagnosis method and system based on artificial intelligence
CN110943857A (en) Power communication network fault analysis and positioning method based on convolutional neural network
CN110488150A (en) A kind of intelligent fault diagnosis method based on more algorithm fusions
CN111444169A (en) Transformer substation electrical equipment state monitoring and diagnosis system and method
Zhang et al. Urban spatial risk prediction and optimization analysis of POI based on deep learning from the perspective of an epidemic
CN114565038A (en) Intelligent electric meter fault diagnosis method based on improved capsule network
CN113554360A (en) Power transmission line running state visual management method and system and storage medium
CN108647860A (en) Power equipment state monitoring based on OpenStack and assessment cloud platform
CN112200263A (en) Self-organizing federal clustering method applied to power distribution internet of things
CN103942251A (en) Method and system for inputting high altitude meteorological data into database based on multiple quality control methods
CN113593605B (en) Industrial audio fault monitoring system and method based on deep neural network
CN111190072A (en) Centralized meter reading system diagnosis model establishing method, fault diagnosis method and fault diagnosis device
CN114331041A (en) Smart power plant maturity assessment method and system based on information physical system architecture
WO2023245851A1 (en) Deep inspection optimization method and system based on micro-service architecture
CN117333038A (en) Economic trend analysis system based on big data
CN116933626A (en) Data monitoring method and device based on digital twinning
CN109902209A (en) A kind of extraordinary bearing device user three-dimensional visualization method based on space intelligent
CN113032949B (en) Big data based test method
CN115496233A (en) Markov model-based data middlebox operation fault prediction method
Guan et al. Design and application of university laboratory safety evaluation system based on fuzzy analytic hierarchy process and back propagation neural network
CN112488873A (en) Intelligent mining construction method for health codes and state tracks of power supply and utilization equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22947592

Country of ref document: EP

Kind code of ref document: A1