A flow monitoring method and device
By acquiring and processing the traffic rules and data of the front-end system and analyzing the transaction flow between the front-end and back-end systems in real time, it solves the problem of abnormal traffic data classification in the existing technology, realizes real-time monitoring and early warning, and reduces operational risks.
Patent Information
- Application Number
- CN202211126878.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-09-16
AI Technical Summary
In the existing technology, when the back-end system provides multiple sets of environments, the traffic data of transactions between the front-end and back-end systems are only reviewed after the fact, without real-time monitoring and analysis. There is a risk that the flow data of the production environment transactions will be abnormally divided, affecting the normality of the back-end system. run.
Propose a traffic monitoring method that obtains the preset traffic rules and traffic data of the front-end system, processes them based on these rules, obtains the traffic distribution statistical results, and determines whether the rules are met. If not, an alarm prompt is issued, and the front-end and back-end systems are analyzed in real time. transaction flow among them to ensure the accuracy of data distribution.
Real-time monitoring and analysis of transaction traffic between front-end and back-end systems is realized, timely detection and early warning of traffic data anomalies are achieved, reducing operational risks and ensuring normal operation of the system.
Smart Images

Figure CN115484194B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a flow monitoring method and device. Background Art
[0002] With the construction of disaster recovery systems such as active-active and active-active application systems, more and more backend systems provide multiple operating environments for frontend systems, requiring the frontend systems to divide traffic. For frontend systems with many backend systems, it is very easy to have abnormal traffic data division of production environment transactions due to the inability to simulate the test environment, which in turn affects the normal operation of the backend system.
[0003] In the prior art, when the backend system provides multiple environments, the transaction flow data between the front-end and back-end systems only exists in post-event review, and there is no real-time monitoring and analysis, which still poses risks. Summary of the invention
[0004] In view of the above problems, this application proposes a traffic monitoring method and device to monitor and analyze the transaction traffic between the front-end and back-end systems in real time and reduce risks. The specific solution is as follows:
[0005] A flow monitoring method, comprising:
[0006] Get the preset traffic rules corresponding to the current front-end system;
[0007] Obtaining traffic data of the current foreground system;
[0008] Based on the preset traffic rules corresponding to the current foreground system, the traffic data of the current foreground system is processed to obtain the traffic distribution statistics result;
[0009] Determine whether the traffic distribution statistics result complies with the preset traffic rules corresponding to the current front-end system, and if not, issue an alarm prompt.
[0010] Optionally, the method further includes:
[0011] If the traffic diversion statistics result is determined to be consistent with the preset traffic rule corresponding to the current foreground system, the traffic data of the current foreground system is sent to the background system corresponding to the current foreground system for diversion.
[0012] Optionally, after diverting the traffic data of the current foreground system to the background system corresponding to the current foreground system, the method further includes:
[0013] Obtaining the traffic diversion statistics feedback from the backend system corresponding to the current frontend system;
[0014] It is determined whether the fed-back traffic diversion statistics result is consistent with the processed traffic diversion statistics result. If not, an alarm is issued.
[0015] Optionally, the preset traffic rule corresponding to the current foreground system includes a diversion key; and the acquiring of traffic data of the current foreground system includes:
[0016] Get the traffic data in the cache;
[0017] The traffic data of the current foreground system is filtered out from the traffic data in the cache, and the traffic data of the current foreground system is the traffic data whose diversion key in the traffic data in the cache matches the diversion key of the preset traffic rule corresponding to the current foreground system.
[0018] Optionally, the preset traffic rule corresponding to the current foreground system includes a diversion key and a diversion value calculation method, and the traffic data of the current foreground system includes the diversion key; the traffic data of the current foreground system is processed based on the preset traffic rule corresponding to the current foreground system to obtain the diversion statistics result, including:
[0019] Based on the diversion key and the diversion value calculation method of the preset traffic rule corresponding to the current foreground system, an operator is allocated to the traffic data of the current foreground system;
[0020] Based on the diversion key and the operator of the traffic data of the current foreground system, the traffic data of the current foreground system is processed to obtain a diversion statistical result.
[0021] Optionally, the preset traffic rule corresponding to the current foreground system includes a traffic threshold, a fluctuation range, an alarm level, and a time interval; the judging whether the diversion statistics result complies with the preset traffic rule corresponding to the current foreground system, and if not, issuing an alarm prompt, includes:
[0022] Based on the time interval of the preset traffic rule corresponding to the current foreground system, reading the traffic diversion statistics result;
[0023] Determine whether the traffic distribution statistics result exceeds the traffic threshold and the fluctuation range of the preset traffic rule corresponding to the current front-end system;
[0024] If the flow threshold and the fluctuation range of the preset flow rule corresponding to the current foreground system are exceeded, an alarm prompt is issued based on the alarm level of the preset flow rule corresponding to the current foreground system.
[0025] A flow monitoring device, comprising:
[0026] A first acquisition unit is used to acquire a preset traffic rule corresponding to the current foreground system;
[0027] A second acquisition unit is used to acquire the flow data of the current foreground system;
[0028] A processing unit, configured to process the flow data of the current foreground system based on a preset flow rule corresponding to the current foreground system to obtain a flow distribution statistical result;
[0029] The judging unit is used to judge whether the traffic diversion statistics result conforms to the preset traffic rule corresponding to the current front-end system, and if not, issue an alarm prompt.
[0030] Optionally, the device further comprises:
[0031] The traffic diversion subunit is used to send the traffic data of the current foreground system to the background system corresponding to the current foreground system for diversion if the diversion statistical result is judged to be in accordance with the preset traffic rule corresponding to the current foreground system.
[0032] Optionally, the device further comprises:
[0033] A first acquisition subunit is used to acquire the traffic diversion statistics result fed back by the backend system corresponding to the current foreground system;
[0034] The judging subunit is used to judge whether the fed-back traffic diversion statistical result is consistent with the processed traffic diversion statistical result, and if not, to issue an alarm prompt.
[0035] Optionally, the preset traffic rule corresponding to the current foreground system includes a diversion key; and the second acquisition unit includes:
[0036] A second acquisition subunit is used to acquire the traffic data in the cache;
[0037] The screening subunit is used to screen out the traffic data of the current foreground system from the traffic data in the cache, wherein the traffic data of the current foreground system is the traffic data whose diversion key in the traffic data in the cache matches the diversion key of the preset traffic rule corresponding to the current foreground system.
[0038] Based on the above technical scheme, the traffic monitoring method and device provided by the present invention obtain the traffic data of the current foreground system after obtaining the preset traffic rules corresponding to the current foreground system, and process the traffic data of the current foreground system based on the preset traffic rules corresponding to the current foreground system to obtain diversion statistics results, and judge whether the diversion statistics results comply with the preset traffic rules corresponding to the current foreground system. If not, an alarm is issued, and the traffic data of transactions between the foreground and back-end systems is analyzed in real time, and timely monitoring and early warning are made for possible abnormal traffic data problems, thereby reducing risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0040] Figure 1 A schematic diagram of the structure of a flow monitoring system provided by an embodiment of the present invention;
[0041] Figure 2 A flow chart of a flow monitoring method provided by an embodiment of the present invention;
[0042] Figure 3 A flow chart of another flow monitoring method provided by an embodiment of the present invention;
[0043] Figure 4 A flowchart of a method for obtaining flow data of a current foreground system disclosed in the present invention;
[0044] Figure 5 A flow chart of a method disclosed in the present invention for processing the flow data of the current foreground system based on a preset flow rule corresponding to the current foreground system to obtain a flow distribution statistical result;
[0045] Figure 6 A flow chart of a method disclosed in the present invention for judging whether the traffic diversion statistics result conforms to the preset traffic rules corresponding to the current front-end system, and if not, issuing an alarm prompt;
[0046] Figure 7 A schematic diagram of the structure of a flow monitoring device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0048] 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 terms used in this way can be interchangeable where appropriate, which is merely a way of distinguishing objects of the same attributes when describing the embodiments of the present invention. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, so that a process, method, system, product, or device that includes a series of units is not necessarily limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0049] In order to conduct real-time monitoring and analysis of transaction traffic between front-end and back-end systems and reduce risks, the present invention provides a traffic monitoring method. The traffic monitoring method provided by the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0050] It should be noted that the flow monitoring method provided by the present invention can be executed by a flow monitoring system. For ease of understanding, the flow monitoring system is first introduced in this application.
[0051] Please see attached Figure 1 , Figure 1 A structural diagram of a flow monitoring system provided by an embodiment of the present invention. The flow monitoring system includes a flow rule module and a flow collection module, a flow cache module connected to the flow collection module, and a flow analysis module connected to the flow rule module and the flow cache module.
[0052] In this application, the traffic rule module includes a traffic rule server cluster and a database server cluster, the traffic collection module includes a front-end system cluster and a Logstash cluster, the traffic cache module includes a Kafka cluster, and the traffic analysis module includes a Flink cluster and a database server cluster.
[0053] It should be noted that Kafka refers to a high-throughput distributed publish-subscribe system that can solve the problem of mismatched application processing efficiency between the publisher and subscriber with its own high performance; Flink refers to a distributed data real-time stream computing engine that supports parallel reading of Kafka and performs different transformation operations on data streams; Logstash refers to a transmission and filtering pipeline for application logs and events, which fully utilizes the advantages of distributed deployment of Kafka, Flink and Logstash, enhances the performance of the device of the present invention, reduces single-point risks, and does not increase the impact on the operation of the foreground system.
[0054] Based on the flow monitoring system provided in the above embodiment, the flow monitoring method provided in the embodiment of the present invention is introduced as follows:
[0055] Please see attached Figure 2 , Figure 2 A flow chart of a flow monitoring method provided by an embodiment of the present invention. The method is applied to a flow monitoring system, and the method may include the following steps:
[0056] Step S101: Obtain the preset traffic rules corresponding to the current foreground system.
[0057] In this step, the preset traffic rules corresponding to the current foreground system can be obtained by the traffic rule service cluster of the traffic rule module.
[0058] It should be noted that the traffic rule module is based on SpringBoot technology to build a traffic rule server cluster. It can set traffic rules as diversion conditions for different backend systems or different domain names, F5 and other backend addresses, with deployment areas or configurable special feature values.
[0059] In the present application, the current foreground system can call the preset traffic rules of the corresponding backend systems.
[0060] Step S102: Obtain the flow data of the current foreground system.
[0061] In this step, the flow data of the foreground system can be obtained by the flow collection module. After the flow data is collected, in order to avoid the problem of unbalanced processing of write flow and analysis flow, the collected flow data is cached in the flow cache module.
[0062] In this application, the front-end and back-end interactive components provided uniformly realize the capture and sending of traffic data, and cache the collected traffic data.
[0063] Step S103: Based on the preset traffic rules corresponding to the current foreground system, the traffic data of the current foreground system is processed to obtain the diversion statistics result.
[0064] In this step, the preset traffic rules corresponding to the current foreground system can be obtained from the traffic rule module, and the traffic data of the foreground system can be obtained from the traffic cache module. The traffic analysis module processes the traffic data of the current foreground system based on the preset traffic rules corresponding to the current foreground system to obtain the diversion statistics results.
[0065] In this application, the traffic data of the current foreground system is processed in real time, and traffic counts are counted for different backend systems according to the preset traffic rules corresponding to the current foreground system. This will be explained in detail through the following embodiments and will not be described in detail here.
[0066] Step S104: determine whether the traffic distribution statistics result complies with the preset traffic rules corresponding to the current front-end system. If not, issue an alarm.
[0067] In this step, the traffic analysis module can determine whether the traffic diversion statistics result complies with the preset traffic rules corresponding to the current front-end system. If not, an alarm prompt is issued.
[0068] In the present application, the diversion statistics are read periodically, and according to the preset traffic rules corresponding to the current front-end system, it is determined whether there is abnormal traffic. If so, an alarm is issued. The details will be explained in detail through the following embodiments and will not be described in detail here.
[0069] To summarize, the traffic monitoring method and device provided by the present invention, after obtaining the preset traffic rules corresponding to the current foreground system, obtain the traffic data of the current foreground system, and process the traffic data of the current foreground system based on the preset traffic rules corresponding to the current foreground system to obtain diversion statistics results, and judge whether the diversion statistics results comply with the preset traffic rules corresponding to the current foreground system. If not, an alarm is issued, and the traffic data of transactions between the foreground and back-end systems is analyzed in real time. Possible abnormal traffic data problems can be monitored and warned in a timely manner, thereby reducing risks.
[0070] Based on the above-mentioned embodiments disclosed in the present invention, in another embodiment of the present invention, if the diversion statistical result is judged to be consistent with the preset traffic rules corresponding to the current front-end system, the traffic data of the current front-end system is sent to the background system corresponding to the current front-end system for diversion.
[0071] In summary, the embodiment of the present invention performs traffic diversion according to the flow data of the current foreground system to obtain the traffic diversion statistical result, which provides a basis for subsequent judgment on whether the traffic diversion statistical result is correct and normal.
[0072] On the basis of the above-mentioned embodiments disclosed in the present invention, in another embodiment of the present invention, a specific implementation method after the flow data of the current foreground system is diverted to the backend system corresponding to the current foreground system is described in detail.
[0073] As an example of an implementation method, please see the attached Figure 3 , is a flow chart of another flow monitoring method disclosed in the present invention. The method may include the following steps:
[0074] Step S201: Obtain the traffic diversion statistics results fed back by the backend system corresponding to the current foreground system.
[0075] In this step, the traffic analysis module may obtain the traffic diversion statistics results fed back by the backend system corresponding to the current foreground system.
[0076] It should be noted that the diversion statistics result includes the diversion key and the diversion result.
[0077] Step S202: determine whether the fed-back traffic diversion statistics result is consistent with the processed traffic diversion statistics result; if not, issue an alarm.
[0078] In this step, the traffic analysis module may determine whether the fed-back traffic diversion statistics result is consistent with the processed traffic diversion statistics result. If not, an alarm prompt is issued.
[0079] In this application, it is determined whether the diversion key of the fed-back diversion statistical result is calculated correctly and whether the diversion result of the fed-back diversion statistical result is normal. If it is incorrect or abnormal, an alarm prompt is issued based on the alarm level of the preset traffic rule corresponding to the current front-end system.
[0080] In summary, another traffic monitoring method provided by an embodiment of the present invention conducts a post-event review of the traffic data of transactions between the front-end and back-end systems through the feedback of the diversion statistics results, monitors and warns of possible traffic data anomalies, and reduces risks.
[0081] Based on the above-mentioned embodiment disclosed in the present invention, in another embodiment of the present invention, the preset traffic rules corresponding to the current foreground system include a diversion key; the specific implementation method of obtaining the traffic data of the current foreground system in step S102 is described in detail.
[0082] As an example of an implementation method, please see the attached Figure 4 , is a flow chart of a method for obtaining the flow data of the current foreground system disclosed in the present invention. The method may include the following steps:
[0083] Step S301: Obtain traffic data in the cache.
[0084] In this step, the Flink cluster of the traffic analysis module can obtain the traffic data in the cache from the Kafka cluster of the traffic cache module.
[0085] It should be noted that the traffic data in the cache is read in real time, and the traffic data in the cache includes the diversion key.
[0086] Step S302: Filter out the traffic data of the current foreground system from the traffic data in the cache, where the traffic data of the current foreground system is the traffic data whose diversion key in the traffic data in the cache matches the diversion key of the preset traffic rule corresponding to the current foreground system.
[0087] In this step, the Flink cluster of the traffic analysis module can obtain the preset traffic rules corresponding to the current foreground system from the traffic rule server cluster of the traffic rule module, and the Flink cluster of the traffic analysis module can filter out the traffic data of the current foreground system from the traffic data in the cache.
[0088] In the present application, the traffic data in the cache is subjected to a map conversion to be converted into data traffic of a required data type, and the traffic data of the current foreground system is screened out from the converted traffic data.
[0089] It should be noted that the traffic data is the request message sent by UDP. The transaction request address, request header and request body are packaged in the form of JSON message. The shard_key is calculated based on the customer number in the request message, and then the shard_key is placed in the request header. The backend system F5 performs shunting based on the shard_key in the request header. The corresponding preset traffic rule can be set to whether the shard_key calculated from the customer number in the request body is consistent with the shard_key field in the request header.
[0090] To sum up, the method for obtaining the traffic data of the current foreground system provided in the embodiment of the present invention performs diversion operations on the background system. There are multiple foreground systems and background systems. By determining the current foreground system, the background system corresponding to the current foreground system is determined, which facilitates the diversion operation.
[0091] On the basis of the above-mentioned embodiments disclosed in the present invention, in another embodiment of the present invention, the preset traffic rules corresponding to the current foreground system include a diversion key and a diversion value calculation method, and the traffic data of the current foreground system includes the diversion key; step S103 is based on the preset traffic rules corresponding to the current foreground system, and the traffic data of the current foreground system is processed to obtain the specific implementation method of the diversion statistical results.
[0092] As an example of an implementation method, please see the attached Figure 5, is a flow chart of a method disclosed in the present invention for processing the flow data of the current foreground system based on the preset flow rules corresponding to the current foreground system to obtain the diversion statistics results. The method may include the following steps:
[0093] Step S401: Based on the diversion key and diversion value calculation method of the preset traffic rule corresponding to the current foreground system, an operator is allocated to the traffic data of the current foreground system.
[0094] In this step, the Flink cluster of the traffic analysis module can allocate operators to the traffic data of the current foreground system based on the diversion key and diversion value calculation method of the preset traffic rule corresponding to the current foreground system.
[0095] It should be noted that operators include keyBy, window, etc.
[0096] Step S402: Based on the flow data diversion key and operator of the current foreground system, the flow data of the current foreground system is processed to obtain the flow diversion statistics result.
[0097] In this step, the Flink cluster of the traffic analysis module can process the traffic data of the current foreground system based on the diversion key and operator of the traffic data of the current foreground system, obtain the diversion statistics results, and write them into the database service cluster of the traffic analysis module according to the processing window of 5 seconds to 1 day.
[0098] To sum up, the embodiment of the present invention provides a method for processing the traffic data of the current foreground system based on the preset traffic rules corresponding to the current foreground system to obtain the diversion statistical results. The diversion statistical results are equivalent to pre-diversion, which is helpful for judging whether diversion can be performed.
[0099] On the basis of the above-mentioned embodiments disclosed in the present invention, in another embodiment of the present invention, the preset traffic rules corresponding to the current front-end system include traffic thresholds, fluctuation ranges, alarm levels and time intervals; the specific implementation method of step S104 for determining whether the diversion statistics results comply with the preset traffic rules corresponding to the current front-end system, and if not, issuing an alarm prompt is described in detail.
[0100] As an example of an implementation method, please see the attached Figure 6 , is a flow chart of a method disclosed in the present invention for judging whether the diversion statistics result conforms to the preset traffic rules corresponding to the current front-end system, and if not, issuing an alarm prompt. The method may include the following steps:
[0101] Step S501: Read the traffic diversion statistics result based on the time interval of the preset traffic rule corresponding to the current foreground system.
[0102] In this step, the Flink cluster of the traffic analysis module can update the preset traffic rules corresponding to the current front-end system every minute and periodically read the diversion statistics results of the database service cluster of the traffic analysis module.
[0103] Step S502: Determine whether the traffic distribution statistics result exceeds the traffic threshold and fluctuation range of the preset traffic rule corresponding to the current front-end system.
[0104] In this step, the Flink cluster of the traffic analysis module can determine whether the traffic diversion statistics result exceeds the traffic threshold and fluctuation range of the preset traffic rule corresponding to the current front-end system.
[0105] Step S503: If the flow threshold and fluctuation range of the preset flow rule corresponding to the current foreground system are exceeded, an alarm prompt is issued based on the alarm level of the preset flow rule corresponding to the current foreground system.
[0106] In this step, in this step, the Flink cluster of the traffic analysis module may issue an alarm prompt based on the alarm level of the preset traffic rule corresponding to the current foreground system.
[0107] To sum up, the method provided by the embodiment of the present invention for determining whether the diversion statistical results comply with the preset traffic rules corresponding to the current front-end system, by comparing the diversion statistical results with the traffic thresholds and fluctuation ranges of the preset traffic rules corresponding to the current front-end system, analyzes the traffic data of transactions between the front-end and back-end systems in real time, and can monitor and warn in a timely manner any possible abnormal traffic data problems.
[0108] The above-mentioned embodiments disclosed in the present invention describe the method in detail. The method of the present invention can be implemented by various devices. Therefore, the present invention also discloses a flow monitoring device, and a specific embodiment is given below for detailed description.
[0109] Please see attached Figure 7 , Figure 7 This is a schematic diagram of the structure of a flow monitoring device disclosed in an embodiment of the present application. The flow monitoring device is applied to a flow monitoring system. The flow monitoring system includes a flow rule module and a flow collection module, a flow cache module connected to the flow collection module, and a flow analysis module connected to the flow rule module and the flow cache module. The device may include:
[0110] The first acquisition unit 11 is used to acquire the preset traffic rules corresponding to the current foreground system;
[0111] The second acquisition unit 12 is used to acquire the flow data of the current foreground system;
[0112] The processing unit 13 is used to process the traffic data of the current foreground system based on the preset traffic rule corresponding to the current foreground system to obtain the traffic distribution statistics result;
[0113] The judging unit 14 is used to judge whether the traffic distribution statistics result complies with the preset traffic rule corresponding to the current foreground system, and if not, issue an alarm prompt.
[0114] As an implementable embodiment, the device further includes:
[0115] The traffic diversion subunit is used to send the traffic data of the current foreground system to the background system corresponding to the current foreground system for diversion if the diversion statistical result is judged to be in accordance with the preset traffic rule corresponding to the current foreground system.
[0116] As an implementable embodiment, the device further includes:
[0117] A first acquisition subunit is used to acquire the traffic diversion statistics result fed back by the backend system corresponding to the current foreground system;
[0118] The judging subunit is used to judge whether the fed-back traffic diversion statistical result is consistent with the processed traffic diversion statistical result, and if not, to issue an alarm prompt.
[0119] As an implementable method, the preset traffic rule corresponding to the current foreground system includes a diversion key; the second acquisition unit 12 includes:
[0120] A second acquisition subunit is used to acquire the traffic data in the cache;
[0121] The screening subunit is used to screen out the traffic data of the current foreground system from the traffic data in the cache, wherein the traffic data of the current foreground system is the traffic data whose diversion key in the traffic data in the cache matches the diversion key of the preset traffic rule corresponding to the current foreground system.
[0122] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0123] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without creative work.
[0124] Through the description of the above implementation mode, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present invention, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0125] In summary, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A flow monitoring method, It is characterized in that include: Get the preset traffic rules corresponding to the current front-end system; Obtaining traffic data of the current foreground system; Based on the preset traffic rules corresponding to the current foreground system, the traffic data of the current foreground system is processed to obtain the diversion statistics result; wherein, the preset traffic rules corresponding to the current foreground system include a diversion key and a diversion value calculation method, and the traffic data of the current foreground system includes a diversion key; the processing flow includes: based on the diversion key and the diversion value calculation method of the preset traffic rules corresponding to the current foreground system, an operator is assigned to the traffic data of the current foreground system; based on the diversion key and the operator of the traffic data of the current foreground system, the traffic data of the current foreground system is processed to obtain the diversion statistics result; the preset traffic rules also include a traffic threshold, a fluctuation range, an alarm level and a time interval; Determine whether the traffic distribution statistics result complies with the preset traffic rules corresponding to the current front-end system, and if not, issue an alarm prompt.
2. The method according to claim 1, It is characterized in that The method further comprises: If the traffic diversion statistics result is determined to be consistent with the preset traffic rule corresponding to the current foreground system, the traffic data of the current foreground system is sent to the background system corresponding to the current foreground system for diversion.
3. The method according to claim 2, It is characterized in that After sending the flow data of the current foreground system to the background system corresponding to the current foreground system for diversion, the method further includes: Obtaining the traffic diversion statistics feedback from the backend system corresponding to the current frontend system; It is determined whether the fed-back traffic diversion statistics result is consistent with the processed traffic diversion statistics result. If not, an alarm is issued.
4. The method according to claim 1, It is characterized in that The preset traffic rule corresponding to the current foreground system includes a diversion key; and obtaining the traffic data of the current foreground system includes: Get the traffic data in the cache; The traffic data of the current foreground system is filtered out from the traffic data in the cache, and the traffic data of the current foreground system is the traffic data whose diversion key in the traffic data in the cache matches the diversion key of the preset traffic rule corresponding to the current foreground system.
5. The method according to claim 1, It is characterized in that The preset traffic rules corresponding to the current foreground system include traffic threshold, fluctuation range, alarm level and time interval; the judging whether the traffic distribution statistics result complies with the preset traffic rules corresponding to the current foreground system, and if not, issuing an alarm prompt, includes: Based on the time interval of the preset traffic rule corresponding to the current foreground system, reading the traffic diversion statistics result; Determine whether the diversion result of the diversion statistics exceeds the flow threshold and the fluctuation range of the preset flow rule corresponding to the current foreground system; If the flow threshold and the fluctuation range of the preset flow rule corresponding to the current foreground system are exceeded, an alarm prompt is issued based on the alarm level of the preset flow rule corresponding to the current foreground system.
6. A flow monitoring device, It is characterized in that include: A first acquisition unit is used to acquire a preset traffic rule corresponding to the current foreground system; A second acquisition unit is used to acquire the flow data of the current foreground system; A processing unit is used to process the flow data of the current foreground system based on the preset flow rules corresponding to the current foreground system to obtain diversion statistics results; wherein the preset flow rules corresponding to the current foreground system include a diversion key and a diversion value calculation method, and the flow data of the current foreground system includes a diversion key; the processing flow includes: allocating an operator to the flow data of the current foreground system based on the diversion key and the diversion value calculation method of the preset flow rules corresponding to the current foreground system; processing the flow data of the current foreground system based on the diversion key and the operator of the flow data of the current foreground system to obtain diversion statistics results; the preset flow rules also include flow thresholds, fluctuation ranges, alarm levels and time intervals; The judging unit is used to judge whether the traffic diversion statistics result conforms to the preset traffic rule corresponding to the current front-end system, and if not, issue an alarm prompt.
7. The device according to claim 6, It is characterized in that The device also includes: The traffic diversion subunit is used to send the traffic data of the current foreground system to the background system corresponding to the current foreground system for diversion if the diversion statistical result is judged to be in accordance with the preset traffic rule corresponding to the current foreground system.
8. The device according to claim 7, It is characterized in that The device also includes: A first acquisition subunit is used to acquire the traffic diversion statistics result fed back by the backend system corresponding to the current foreground system; The judging subunit is used to judge whether the fed-back traffic diversion statistical result is consistent with the processed traffic diversion statistical result, and if not, to issue an alarm prompt.
9. The device according to claim 6, It is characterized in that The preset traffic rule corresponding to the current foreground system includes a diversion key; the second acquisition unit includes: A second acquisition subunit is used to acquire the traffic data in the cache; The screening subunit is used to screen out the traffic data of the current foreground system from the traffic data in the cache, wherein the traffic data of the current foreground system is the traffic data whose diversion key in the traffic data in the cache matches the diversion key of the preset traffic rule corresponding to the current foreground system.
