CN-122027684-A - Full-link business activity monitoring method and system under micro-service architecture
Abstract
The invention discloses a full-link business activity monitoring method and a full-link business activity monitoring system under a micro-service architecture, which relate to the technical field of micro-service architecture, and the method comprises the steps of sending authentication information to a user gateway and receiving response information returned by the user gateway, wherein the response information at least comprises an identity certificate and a gateway request identifier; the method comprises the steps of generating a tracking number according to a gateway request identifier, sending call request information to a user gateway based on an identity certificate and the tracking number, collecting access log information generated after the user gateway verifies the call request information, sending the call request information to an API gateway after the user gateway verifies the call request information, and sending the call request information to a micro-service and generating service processing log information by the API gateway, so that service activity monitoring is carried out according to the access log information and the service processing log information.
Inventors
- JIANG JINXIA
- ZHANG YUFAN
- ZHENG XIAOYAN
- LU WENDA
- Lai Xiaohan
- ZHAO LEI
- GENG JIPU
- Hao Leizhen
- HAN XINRU
- YAO JIAMIN
Assignees
- 国网浙江省电力有限公司信息通信分公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260410
Claims (10)
- 1. A method for monitoring full-link business activity under a micro-service architecture, comprising: sending authentication information to a user gateway, and receiving response information returned by the user gateway, wherein the response information at least comprises an identity credential and a gateway request identifier; Generating a tracking number according to the gateway request identifier, and sending calling request information to the user gateway based on the identity credential and the tracking number; when the user gateway verifies the call request information, acquiring access log information by using a data tool package; When the user gateway verifies the calling request information, the calling request information is sent to an API gateway, the API gateway sends the request calling information to a micro service, and when the micro service responds to the request calling information and performs service processing, a data tool package is used for collecting service processing log information; and monitoring the business activity based on the access log information and the business processing log information.
- 2. The method for monitoring all-link traffic activity under a micro-service architecture according to claim 1, further comprising, before sending authentication information to a user gateway: acquiring a current task node, wherein the current task node is one node of a user side in power business activities; Judging whether the current task node is a critical task node or not, and if so, sending authentication information to a user gateway, wherein the critical task node is a node which needs to carry out interface calling micro-service in each power business activity.
- 3. The method for monitoring all-link traffic activity under micro-service architecture according to claim 2, wherein said monitoring traffic activity based on said access log information and said traffic processing log information comprises: Constructing a plurality of technical indexes and a plurality of business indexes of the current task node; calculating technical index values corresponding to the technical indexes and service index values corresponding to the service indexes according to the access log information and the service processing log information; Performing performance analysis according to each technical index value to obtain a performance analysis result; and carrying out anomaly monitoring on the business activities according to the business index values to obtain a final anomaly result.
- 4. The method for monitoring all-link traffic activity under micro-service architecture according to claim 3, wherein said performing anomaly monitoring on said traffic activity according to each traffic index value to obtain a final anomaly result comprises: Analyzing the correlation among any plurality of service indexes by using the pearson correlation coefficient, and combining the plurality of service indexes with the correlation larger than a preset threshold value as correlation indexes; Performing principal component analysis transformation on the associated index combination to obtain a plurality of principal components, calculating a reconstruction error according to each principal component, and judging that the final abnormal result of the business activity is abnormal if the reconstruction error is greater than a reconstruction error threshold value; if the reconstruction error is smaller than the reconstruction error threshold, inputting each business index value into a dynamic baseline model for carrying out anomaly analysis to obtain an anomaly analysis result, and obtaining a final anomaly result according to the anomaly analysis result.
- 5. The method for monitoring all-link traffic activity under a micro-service architecture according to claim 4, wherein obtaining a final exception result according to the exception analysis result comprises: When the abnormality analysis result is any abnormal business index value in the association index combination, judging that the final abnormality result is abnormal; and when the abnormal analysis result is that all the business index values in the associated index combination are normal, judging that the final abnormal result is normal.
- 6. The method for monitoring all-link traffic activity under micro-service architecture according to claim 1, wherein said access log information includes at least a time when said user gateway received said call request information, a user number, an API interface, and said trace number, and said traffic processing log information includes at least said trace number.
- 7. The method for monitoring all-link traffic activity under micro-service architecture according to claim 1, wherein said monitoring traffic activity based on said access log information and said traffic processing log information further comprises: Performing link splicing according to the access log information and the service processing log information to obtain a complete call link; Based on the constructed multiple aggregation dimensions, grouping and aggregating the complete call links to obtain multiple aggregation results; and calculating key index values of the aggregation results, and judging that the complete call link is abnormal when the key index values are larger than a preset abnormal threshold value.
- 8. A full link traffic activity monitoring system under a micro-service architecture, comprising: the response information receiving module is used for sending authentication information to the user gateway and receiving response information returned by the user gateway, wherein the response information at least comprises an identity certificate and a gateway request identifier; The number generation module is used for generating a tracking number according to the gateway request identifier and sending calling request information to the user gateway based on the identity certificate and the tracking number; The access log information acquisition module is used for acquiring access log information by utilizing a data tool package after the user gateway verifies the call request information; The service processing log information acquisition module is used for transmitting the calling request information to an API gateway after the user gateway verifies the calling request information, the API gateway transmits the calling request information to a micro service, and the micro service responds to the calling request information and performs service processing, and the service processing log information is acquired by utilizing a data tool kit; and the monitoring module is used for monitoring the business activity based on the access log information and the business processing log information.
- 9. The system for monitoring all-link traffic activity under a micro-service architecture according to claim 8, wherein said system for monitoring all-link traffic activity under a micro-service architecture further comprises a current task node judgment module and an authentication information transmission module, wherein, The current task node judging module is used for acquiring a current task node, wherein the current task node is one node of the user side in the power business activity; the authentication information sending module is used for judging whether the current task node is a critical task node or not, and if so, sending authentication information to a user gateway, wherein the critical task node is a node which needs to carry out interface calling micro-service in each power service activity.
- 10. The full link traffic activity monitoring system under a micro-service architecture according to claim 8, wherein the monitoring module comprises: the index construction unit is used for constructing a plurality of technical indexes and a plurality of service indexes of the current task node; an index value calculation unit, configured to calculate, according to the access log information and the service processing log information, a technical index value corresponding to each technical index and a service index value corresponding to each service index; The performance analysis unit is used for performing performance analysis according to each technical index value to obtain a performance analysis result; And the abnormality monitoring unit is used for carrying out abnormality monitoring on the business activities according to the business index values to obtain a final abnormality result.
Description
Full-link business activity monitoring method and system under micro-service architecture Technical Field The present invention relates to the technical field of micro-service architecture, and in particular, to a method and a system for monitoring full-link service activity under a micro-service architecture. Background In a micro-service architecture, as the complexity of the service increases, the call links between services are complex, resulting in difficult monitoring and association analysis of the service activity. The full-link monitoring technology is used as a common micro-service monitoring means, can track service call links and analyze the circulation process of business activities, and helps developers to quickly locate faults and bottlenecks. However, the present link tracking and monitoring technology focuses on the analysis of the back-end service, and does not cover all the business activities or the data operated by the front-end user, so that the range of link monitoring is limited, and the overall analysis and influence evaluation of the business activities cannot be performed. Disclosure of Invention In order to solve the technical problems, the embodiment of the invention provides a full-link business activity monitoring method and a full-link business activity monitoring system under a micro-service architecture, so as to solve the technical problem that the existing full-link monitoring method cannot be used for analyzing and evaluating the whole business activity. A first aspect of an embodiment of the present invention provides a method for monitoring all-link service activity under a micro-service architecture, where the method includes: Sending authentication information to a user gateway and receiving response information returned by the user gateway, wherein the response information at least comprises an identity credential and a gateway request identifier; generating a tracking number according to the gateway request identifier, and sending calling request information to the user gateway based on the identity credential and the tracking number; when the user gateway passes the verification of the call request information, the data tool package is used for collecting access log information; When the user gateway verifies the calling request information, the calling request information is sent to an API gateway, the API gateway sends the calling request information to the micro service, and when the micro service responds to the calling request information and performs service processing, the data tool package is used for collecting service processing log information; based on the access log information and the business process log information, business activity is monitored. In a possible implementation manner of the first aspect, before sending the authentication information to the user gateway, the method further includes: Acquiring a current task node, wherein the current task node is one node of a user side in power business activities; judging whether the current task node is a critical task node, and if so, sending authentication information to a user gateway, wherein the critical task node is a node which needs to carry out interface calling micro-service in each power service activity. In a possible implementation manner of the first aspect, monitoring the service activity based on the access log information and the service processing log information includes: Constructing a plurality of technical indexes and a plurality of service indexes of the current task node; according to the access log information and the service processing log information, calculating technical index values corresponding to the technical indexes and service index values corresponding to the service indexes; performing performance analysis according to each technical index value to obtain a performance analysis result; and carrying out anomaly monitoring on the business activities according to the business index values to obtain a final anomaly result. In a possible implementation manner of the first aspect, performing anomaly monitoring on the service flow according to each service index value to obtain a final anomaly result, including: analyzing the correlation among any plurality of service indexes by using the pearson correlation coefficient, wherein two service indexes with the correlation larger than a preset threshold value are used as the combination of the correlation indexes; Performing principal component analysis transformation on the associated index combination to obtain a plurality of principal components, calculating a reconstruction error according to the principal components, and judging that the final abnormal result of the business activity is abnormal if the reconstruction error is greater than a reconstruction error threshold value; if the reconstruction error is smaller than the reconstruction error threshold, inputting each business index value into the dynamic baseline