Distributed service flow limiting method and device, equipment and storage medium
By obtaining the service performance indicators and call complementary relationships of distributed service systems in real time, combining with the deep learning current limit prediction model, the current limit threshold is dynamically adjusted, which solves the problem that current limit rules rely on manual experience in the existing technology, and achieves more efficient and intelligent current limit prediction and resource utilization.
Patent Information
- Application Number
- CN202411982061.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-15
AI Technical Summary
The current limiting rules of existing distributed systems mainly rely on manual experience configuration and cannot achieve dynamic current limiting, resulting in poor current limiting accuracy and inability to efficiently utilize system resources.
By obtaining the real-time service performance index vector of the service node in the target distributed service system and the call complementation relationship between the service nodes, combined with the preset current limit prediction model (including the first spatiotemporal convolution layer, the second spatiotemporal convolution layer and the output layer), the current limit prediction is performed, and the service current limit threshold is dynamically adjusted.
It improves the accuracy of the current limit of distributed systems, reduces labor costs, realizes adaptive threshold adjustment in the face of dynamic fluctuations in sudden network traffic, and improves resource utilization.
Smart Images

Figure CN119835225A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed technology, and in particular to a distributed service current limiting method, device, equipment and storage medium. Background Art
[0002] Distributed systems have the advantages of high availability, scalability, and portability, making them the mainstream system architecture. In order to further ensure the stability and reliability of distributed systems in high-concurrency scenarios, it is necessary to use an effective current limiting mechanism to ensure the quality of the system's core services and prevent large-scale system crashes when there is a sudden increase in requests, malicious traffic impact, or downstream services or resource shortages. Current limiting is essentially traffic shaping and peak-shaving to achieve a balance between request rate and system processing capacity.
[0003] At present, the current limiting rules of distributed systems are mainly configured according to different transaction scenarios of the service based on manual experience, and the flow control is performed according to the priority of the rules set. It is impossible to implement dynamic current limiting for distributed systems, so the accuracy of current limiting is poor, which leads to the inefficient use of system resources in distributed systems. Summary of the invention
[0004] The present invention provides a distributed service current limiting method, device, equipment and storage medium to improve the accuracy of current limiting in a distributed system.
[0005] According to one aspect of the present invention, a distributed service current limiting method is provided, the method comprising:
[0006] Acquire a real-time service performance indicator vector of a service node in a target distributed service system, and a call topology relationship between service nodes in the target distributed service system; wherein the service performance indicator vector is used to characterize the service performance of a service node in at least two dimensions; and the target distributed service system is a distributed service system for which current limiting prediction is to be performed;
[0007] Based on the real-time service performance indicator vector, the call topology relationship between the service nodes and the preset current limiting prediction model, the target distributed service system is predicted to be current limiting;
[0008] Among them, the current limiting prediction model includes a first spatiotemporal convolution layer, a second spatiotemporal convolution layer and an output layer. The first spatiotemporal convolution layer and the second spatiotemporal convolution layer are used to extract data features of the model input data in the time series, as well as the call relationship features between service nodes in the target distributed service system; the current limiting prediction model is based on the historical service performance indicator vector and the call topology relationship between service nodes, and the initial neural network model is trained.
[0009] According to another aspect of the present invention, a distributed service current limiting device is provided, the device comprising:
[0010] A system data acquisition module, used to acquire a real-time service performance index vector of a service node in a target distributed service system, and a call topology relationship between service nodes in the target distributed service system; wherein the service performance index vector is used to characterize the service performance of a service node in at least two dimensions; the target distributed service system is a distributed service system for which current limiting prediction is to be performed;
[0011] A prediction module is used to perform current limiting prediction on the target distributed service system based on a real-time service performance indicator vector, a call topology relationship between service nodes, and a preset current limiting prediction model; wherein the current limiting prediction model includes a first spatiotemporal convolution layer, a second spatiotemporal convolution layer, and an output layer, the first spatiotemporal convolution layer and the second spatiotemporal convolution layer are used to extract data features of model input data in a time series, and call relationship features between service nodes in the target distributed service system; the current limiting prediction model is obtained by training an initial neural network model based on a historical service performance indicator vector and a call topology relationship between service nodes.
[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the distributed service flow limiting method described in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the distributed service current limiting method described in any embodiment of the present invention when executed.
[0017] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the distributed service current limiting method described in any embodiment of the present invention is implemented.
[0018] The technical solution of the embodiment of the present invention reduces the labor cost of calculating the service flow limiting threshold by calculating the service flow limiting threshold in real time based on deep learning. At the same time, it combines the complex distributed service call link and service deployment in the flow limiting prediction process, so that the predicted flow limiting threshold is more reasonable and intelligent, and realizes the adaptive adjustment of the threshold in the face of sudden dynamic fluctuations of network traffic, thereby improving the resource utilization of the distributed system.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 This is a flow chart of a distributed service current limiting method provided according to Embodiment 1 of the present invention;
[0022] Figure 2 This is a flow chart of a distributed service current limiting method provided according to Embodiment 2 of the present invention;
[0023] Figure 3 This is a schematic diagram of the structure of a distributed service current limiting device provided according to Embodiment 3 of the present invention;
[0024] Figure 4 It is a structural schematic diagram of an electronic device that implements the distributed service current limiting method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] Embodiment 1
[0028] Figure 1 A flow chart of a distributed service current limiting method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of current limiting a distributed service system. The method can be executed by a distributed service current limiting device. The distributed service current limiting device can be implemented in the form of hardware and / or software. The distributed service current limiting device can be configured in various general computing devices and integrated in the server device in the distributed system. Figure 1 As shown, the method includes:
[0029] S110: Acquire the real-time service performance indicator vector of the service nodes in the target distributed service system and the call topology relationship between the service nodes in the target distributed service system.
[0030] Among them, the service performance index vector can be used to characterize the service performance of the service node in at least two dimensions, for example, the query rate per second, response time, memory usage, CPU (Central Processing Unit) usage and number of threads of the service node. It should be noted that the service performance of a service node in a distributed service system in a certain dimension can be represented by the index vector of the dimension. Optionally, the specific values of the query rate per second, response time, memory usage, CPU usage and number of threads of the service node can be subjected to standard vectorization processing to generate an index vector corresponding to the index dimension.
[0031] The target distributed service system may be a distributed service system for which current limiting prediction is to be performed. It should be noted that there are multiple service nodes in the distributed service system that provide external service support, and the call topology relationship may be used to characterize the call dependency relationship between the service nodes.
[0032] Optionally, the real-time service performance indicator vector of the service nodes in the target distributed service system and the call topology relationship between the service nodes in the target distributed service system can be obtained from the full-link monitoring platform and the cloud-native monitoring platform of the target distributed service system.
[0033] S120: Based on the real-time service performance indicator vector, the call topology relationship between the service nodes, and the preset current limiting prediction model, a current limiting prediction is performed on the target distributed service system.
[0034] Among them, the current limiting prediction model may include a first space-time convolution layer, a second space-time convolution layer and an output layer. The first space-time convolution layer and the second space-time convolution layer can be used to extract data features of the model input data in the time series, as well as the call relationship features between service nodes in the target distributed service system; the current limiting prediction model can be obtained by training the initial neural network model based on the historical service performance indicator vector and the call topology relationship between service nodes.
[0035] It should be noted that, during the training process of the current limiting prediction model, the historical service performance indicator vector can be divided into a training set, a test set, and a validation set according to a preset training data ratio; and the mean square error loss function is used as the loss function of the training process of the current limiting prediction model. Optionally, the training data ratio can be adaptively set according to those skilled in the art.
[0036] Specifically, in an embodiment of the present invention, the service performance indicator vector within the future fixed time interval can be predicted based on the real-time service performance indicator vector within the current fixed time interval and the calling topology relationship of the service node, and the future service performance indicator vector can also be predicted based on the real-time service performance indicator vector at the current moment. Exemplarily, the service performance indicator vector within the current five minutes can be obtained, and the average performance value of the service node within one minute is calculated according to the granularity of 1 minute as each service performance indicator vector, that is, the data input into the current limiting prediction model is within five minutes, which is used to represent the service performance indicator vector of the first minute, second minute, third minute, fourth minute and fifth minute of the service node, and the output result is the predicted service performance indicator vector of the first minute, second minute, third minute, fourth minute and fifth minute of the service node after the future time interval. Optionally, the fixed time interval and the future time interval can be adaptively set according to those skilled in the art.
[0037] Optionally, in an embodiment of the present invention, after performing flow limiting prediction on the target distributed service system, it also includes: splitting the prediction system performance indicator matrix according to preset splicing rules, and determining the predicted service performance indicator vector of each service node in the target distributed service system; determining the predicted query rate per second and response time of the service node by performing autoregression and sliding average processing on the predicted service performance indicator vector of each service node; and adjusting the service flow limiting dynamic threshold of the service node according to the predicted query rate per second and response time of the service node.
[0038] The service flow limiting dynamic threshold is used to limit the number of service requests that can be sent or received within a unit of time.
[0039] Specifically, the prediction system performance indicator matrix of the target distributed service system output by the flow limiting prediction model can be split according to the preset splicing rules to determine the prediction service performance indicator vector of each service node in each target distributed service system. Furthermore, the prediction service performance indicator vector of the service node can be processed by autoregression and sliding average to determine the predicted query rate per second and response time of the service node, obtain the change trend and confidence interval of the predicted query rate per second and response time, and use the upper limit maximum value of the confidence interval corresponding to the query rate per second as the query rate per second threshold of the service node, that is, determine the traffic processed by the service node in unit time. Then, the service flow limiting dynamic threshold of the service node is determined according to the upper limit maximum value of the response time in its corresponding confidence interval multiplied by the query rate per second threshold. In this way, the service nodes in the target distributed service system are subjected to service flow limiting according to the query rate threshold per second and the service flow limiting dynamic threshold.
[0040] By determining the service-level current limiting threshold, the service-level current limiting threshold can be automatically estimated without stress testing each service. The control granularity is more precise than node current limiting, thereby improving the resource utilization of the distributed service system.
[0041] The technical solution of the embodiment of the present invention reduces the labor cost of calculating the service flow limiting threshold by calculating the service flow limiting threshold in real time based on deep learning. At the same time, it combines the complex distributed service call link and service deployment in the flow limiting prediction process, so that the predicted flow limiting threshold is more reasonable and intelligent, and realizes the adaptive adjustment of the threshold in the face of sudden dynamic fluctuations of network traffic, thereby improving the resource utilization of the distributed system.
[0042] Embodiment 2
[0043] Figure 2This is a flowchart of a distributed service current limiting method provided in the second embodiment of the present invention. This embodiment further refines the above embodiment and provides specific steps for current limiting prediction of the target distributed service system based on the real-time service performance indicator vector, the calling topology relationship of the service node, and the preset current limiting prediction model. It should be noted that for the undetailed parts of the embodiment of the present invention, please refer to the relevant descriptions of other embodiments, which will not be repeated here. Figure 2 As shown, the method includes:
[0044] S210: Acquire the real-time service performance indicator vector of the service nodes in the target distributed service system and the call topology relationship between the service nodes in the target distributed service system.
[0045] S220: Determine a system performance indicator matrix of the target distributed service system according to the service performance indicator vector of each service node in the target distributed service system.
[0046] Among them, the system performance indicator matrix can be used to characterize the performance of the system dimension of the target distributed service system.
[0047] Optionally, a system performance indicator matrix of the target distributed service system is determined based on the service performance indicator vectors of each service node in the target distributed service system, including: determining the system performance indicator matrix of the target distributed service system by splicing the service performance indicator vectors of each service node in the target distributed service system according to preset splicing rules.
[0048] It should be noted that if the service performance indicator vector can be regarded as a one-dimensional indicator vector, then the system performance indicator matrix can be regarded as an n-dimensional matrix composed of n service performance indicator vectors. Optionally, the splicing rule can be adaptively set according to those skilled in the art.
[0049] By splicing the service performance indicator vectors of the service nodes, the system performance of the target distributed service system is determined, and the efficiency of determining the system performance is improved while ensuring accuracy.
[0050] S230: Determine a call matrix of the target distributed service system based on the call topology relationship between service nodes in the target distributed service system.
[0051] Optionally, based on the call topology relationship between the service nodes in the target distributed service system, a call matrix of the target distributed service system is determined, including: determining a call directed graph between the service nodes in the target distributed service system by traversing the call links between the service nodes in the target distributed service system within a preset historical period, and merging the obtained call links; determining a normalized value of the average daily call volume of any two connected service nodes in the call directed graph within the preset historical period, and using the normalized average daily call volume as the edge weight of the two connected service nodes to generate a call matrix of the target distributed service system.
[0052] Specifically, the call links between the service nodes of the target distributed service system within a preset historical period can be traversed, and all the call links obtained by the traversal can be merged according to the same service nodes to determine the call directed graph of the target distributed system. The weight of the edge in the graph is the linear normalized value of the average daily call volume of the two service nodes connected by the edge. The call matrix W of the target distributed service system is determined by arranging the edge weights in the call directed graph. For two different service nodes that do not have a call relationship, in order to prevent the matrix from being too sparse, the average daily call volume of the two service nodes can be assigned a default value of 10 -4 Optionally, the duration of the preset historical period can be adaptively set according to those skilled in the art.
[0053] Optionally, the call matrix W can be determined by the following formula:
[0054]
[0055] Among them, q ij The average daily call volume of service node i to service node j; minq i The minimum value of the average daily call volume of service node i calling other service nodes; maxq i The maximum average daily call volume of service node i calling other service nodes.
[0056] The calling topology relationship of the target distributed system is standardized through the calling matrix, which improves the efficiency of using the calling topology relationship of the target distributed system, improves the consistency of data, and facilitates secondary data processing.
[0057] S240: Input the system performance indicator matrix and the call matrix into a preset current limiting prediction model, perform current limiting prediction on the target distributed service system, and determine a predicted system performance indicator matrix of the target distributed service system.
[0058] Optionally, in an embodiment of the present invention, the system performance indicator matrix and the call matrix are input into a preset current limiting prediction model, including: inputting the system performance indicator matrix into the first space-time convolution layer for time domain convolution processing to extract the timing characteristics of the system performance indicator matrix; inputting the call matrix into the first space-time convolution layer for spatial domain convolution processing to extract the topological structure characteristics of the call matrix; performing feature fusion on the timing characteristics and the topological structure characteristics, and inputting the fused features into the second space-time convolution layer; wherein the data processing operation process of the first space-time convolution layer and the second space-time convolution layer is the same, and the input of the second space-time convolution layer is the output of the first space-time convolution layer.
[0059] It should be noted that, in an embodiment of the present invention, the spatiotemporal convolution layer can be composed of two time domain convolutions and one spatial domain convolution. The time domain convolution extracts temporal features through causal convolution and an activation function combining linear transformation and gating mechanism, and the spatial domain convolution extracts topological structural features through a graph convolution network.
[0060] The technical solution of the embodiment of the present invention extracts the timing features of the system performance indicator matrix of the distributed service system and the system topology features of the call matrix of the target distributed service system, and combines the service call relationship of the distributed system and the timing of the data, so that the predicted current limiting threshold can adapt to the dynamic fluctuations of network traffic and better fit the network structure of the distributed system, thereby improving the accuracy of the prediction results and further improving the resource utilization of the distributed system.
[0061] Embodiment 3
[0062] Figure 3 This is a schematic diagram of the structure of a distributed service current limiting device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0063] The system data acquisition module 310 is used to obtain the real-time service performance indicator vector of the service nodes in the target distributed service system, and the call topology relationship between the service nodes in the target distributed service system; wherein the service performance indicator vector is used to characterize the service performance of the service node in at least two dimensions; the target distributed service system is a distributed service system to be subjected to current limiting prediction;
[0064] The prediction module 320 is used to perform current limiting prediction on the target distributed service system based on the real-time service performance indicator vector, the call topology relationship between service nodes and the preset current limiting prediction model; wherein the current limiting prediction model includes a first spatiotemporal convolution layer, a second spatiotemporal convolution layer and an output layer, the first spatiotemporal convolution layer and the second spatiotemporal convolution layer are used to extract data features of the model input data in the time series, and the call relationship features between service nodes in the target distributed service system; the current limiting prediction model is obtained by training the initial neural network model based on the historical service performance indicator vector and the call topology relationship between service nodes.
[0065] The technical solution of the embodiment of the present invention reduces the labor cost of calculating the service flow limiting threshold by calculating the service flow limiting threshold in real time based on deep learning. At the same time, it combines the complex distributed service call link and service deployment in the flow limiting prediction process, so that the predicted flow limiting threshold is more reasonable and intelligent, and realizes the adaptive adjustment of the threshold in the face of sudden dynamic fluctuations of network traffic, thereby improving the resource utilization of the distributed system.
[0066] Optionally, the prediction module 320 includes:
[0067] A system indicator determination unit, configured to determine a system performance indicator matrix of the target distributed service system according to a service performance indicator vector of each service node in the target distributed service system;
[0068] A call matrix determining unit, configured to determine a call matrix of the target distributed service system based on a call topology relationship between service nodes in the target distributed service system;
[0069] The prediction unit is used to input the system performance indicator matrix and the call matrix into a preset current limiting prediction model, perform current limiting prediction on the target distributed service system, and determine the predicted system performance indicator matrix of the target distributed service system.
[0070] Optionally, the prediction unit may be specifically used for:
[0071] Inputting the system performance indicator matrix into the first spatiotemporal convolution layer for time domain convolution processing to extract the time series features of the system performance indicator matrix;
[0072] Inputting the call matrix into the first spatiotemporal convolution layer for spatial domain convolution processing to extract the topological structural features of the call matrix;
[0073] The temporal features and the topological structure features are fused, and the fused features are input into the second spatiotemporal convolutional layer; wherein the data processing operation process of the first spatiotemporal convolutional layer and the second spatiotemporal convolutional layer is consistent, and the input of the second spatiotemporal convolutional layer is the output of the first spatiotemporal convolutional layer.
[0074] Optionally, the calling matrix determination unit may be specifically used for:
[0075] By traversing the call links between the service nodes of the target distributed service system within a preset historical period and merging the obtained call links, a call directed graph between the service nodes in the target distributed service system is determined;
[0076] Determine the normalized value of the average daily call volume of any two connected service nodes in the call directed graph within the preset historical period, and use the normalized average daily call volume as the edge weight of the two connected service nodes to generate a call matrix of the target distributed service system.
[0077] Optionally, the system indicator determination unit may be specifically configured to: determine a system performance indicator matrix of the target distributed service system by splicing the service performance indicator vectors of each service node in the target distributed service system according to a preset splicing rule.
[0078] Optionally, the device further comprises:
[0079] Current limiting module for:
[0080] According to a preset splicing rule, the prediction system performance indicator matrix is split to determine the prediction service performance indicator vector of each service node in the target distributed service system;
[0081] By performing autoregression and sliding average processing on the predicted service performance indicator vector of each service node, the predicted query rate per second and response time of the service node are determined;
[0082] According to the predicted query rate per second and response time of the service node, the service flow limiting dynamic threshold of the service node is adjusted.
[0083] The distributed service current limiting device provided in the embodiment of the present invention can execute the distributed service current limiting method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0084] Embodiment 4
[0085] Figure 4A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0086] like Figure 4 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0087] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0088] The processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 411 executes the various methods and processes described above, such as a distributed service current limiting method.
[0089] In some embodiments, the distributed service flow limiting method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the distributed service flow limiting method described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured to execute the distributed service flow limiting method in any other appropriate manner (e.g., by means of firmware).
[0090] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0091] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0092] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0093] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0094] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0095] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0096] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0097] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A distributed service current limiting method, characterized in that: include: Acquire a real-time service performance indicator vector of a service node in a target distributed service system, and a call topology relationship between service nodes in the target distributed service system; wherein the service performance indicator vector is used to characterize the service performance of a service node in at least two dimensions; and the target distributed service system is a distributed service system for which current limiting prediction is to be performed; Based on the real-time service performance indicator vector, the call topology relationship between the service nodes and the preset current limiting prediction model, the target distributed service system is predicted to be current limiting; Among them, the current limiting prediction model includes a first spatiotemporal convolution layer, a second spatiotemporal convolution layer and an output layer. The first spatiotemporal convolution layer and the second spatiotemporal convolution layer are used to extract data features of the model input data in the time series, as well as the call relationship features between service nodes in the target distributed service system; the current limiting prediction model is based on the historical service performance indicator vector and the call topology relationship between service nodes, and the initial neural network model is trained.
2. The method according to claim 1, characterized in that Based on the real-time service performance indicator vector, the call topology relationship of the service node and the preset current limiting prediction model, the target distributed service system is predicted to be current limiting, including: Determining a system performance indicator matrix of the target distributed service system according to the service performance indicator vectors of each service node in the target distributed service system; Determining a call matrix of the target distributed service system based on a call topology relationship between service nodes in the target distributed service system; The system performance indicator matrix and the call matrix are input into a preset current limiting prediction model, current limiting prediction is performed on the target distributed service system, and a predicted system performance indicator matrix of the target distributed service system is determined.
3. The method according to claim 2, characterized in that Inputting the system performance indicator matrix and the call matrix into a preset current limiting prediction model includes: Inputting the system performance indicator matrix into the first spatiotemporal convolution layer for time domain convolution processing to extract the time series features of the system performance indicator matrix; Inputting the call matrix into the first spatiotemporal convolution layer for spatial domain convolution processing to extract the topological structural features of the call matrix; The temporal features and the topological structure features are fused, and the fused features are input into the second spatiotemporal convolutional layer; wherein the data processing operation process of the first spatiotemporal convolutional layer and the second spatiotemporal convolutional layer is consistent, and the input of the second spatiotemporal convolutional layer is the output of the first spatiotemporal convolutional layer.
4. The method according to claim 2, characterized in that: Determining a call matrix of the target distributed service system based on the call topology relationship between service nodes in the target distributed service system includes: By traversing the call links between the service nodes of the target distributed service system within a preset historical period and merging the obtained call links, a call directed graph between the service nodes in the target distributed service system is determined; Determine the normalized value of the average daily call volume of any two connected service nodes in the call directed graph within the preset historical period, and use the normalized average daily call volume as the edge weight of the two connected service nodes to generate a call matrix of the target distributed service system.
5. The method according to claim 2, characterized in that: According to the service performance indicator vectors of each service node in the target distributed service system, a system performance indicator matrix of the target distributed service system is determined, including: The system performance indicator matrix of the target distributed service system is determined by splicing the service performance indicator vectors of each service node in the target distributed service system according to a preset splicing rule.
6. The method according to claim 1, characterized in that After the target distributed service system is predicted to have limited current, the method further includes: According to a preset splicing rule, the prediction system performance indicator matrix is split to determine the prediction service performance indicator vector of each service node in the target distributed service system; By performing autoregression and sliding average processing on the predicted service performance indicator vector of each service node, the predicted query rate per second and response time of the service node are determined; According to the predicted query rate per second and response time of the service node, the service flow limiting dynamic threshold of the service node is adjusted.
7. A distributed service current limiting device, characterized in that: include: A system data acquisition module, used to acquire a real-time service performance index vector of a service node in a target distributed service system, and a call topology relationship between service nodes in the target distributed service system; wherein the service performance index vector is used to characterize the service performance of a service node in at least two dimensions; the target distributed service system is a distributed service system for which current limiting prediction is to be performed; A prediction module is used to perform current limiting prediction on the target distributed service system based on a real-time service performance indicator vector, a call topology relationship of service nodes, and a preset current limiting prediction model; wherein the current limiting prediction model includes a first spatiotemporal convolution layer, a second spatiotemporal convolution layer, and an output layer, the first spatiotemporal convolution layer and the second spatiotemporal convolution layer are used to extract data features of model input data in a time series, and call relationship features between service nodes in the target distributed service system; the current limiting prediction model is obtained by training an initial neural network model based on a historical service performance indicator vector and a call topology relationship between service nodes.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the distributed service flow limiting method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the distributed service current limiting method described in any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, implements the distributed service flow limiting method described in any one of claims 1 to 6.