Traffic distribution method, system and device, computer equipment and readable storage medium
By adopting a multi-dimensional traffic distribution method in the traffic distribution management center, the problem of uneven load balancing strategies caused by single-dimensional standards in the existing technology is solved, and traffic distribution is realized that meets the needs of complex application systems, and has centralized management and global statistical analysis capabilities.
Patent Information
- Application Number
- CN202310019020.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2043-01-06
AI Technical Summary
In the prior art, application systems usually adopt single-dimensional standards when distributing traffic, resulting in uneven load balancing strategies, which are difficult to meet the needs of complex application systems, and lack the ability to centralized management and global statistical analysis.
Provide a centralized and multi-dimensional traffic distribution method. Through the traffic distribution management center, it obtains the needs of the application system, selects multiple distribution dimensions and corresponding distribution rules, determines the target address, and sends it to the application system to realize the distribution of traffic.
It realizes traffic distribution based on multi-dimensionality as the standard, adapts to the needs of complex application systems, has centralized management and global statistical analysis capabilities, and improves the flexibility and management efficiency of traffic distribution.
Smart Images

Figure CN116032844B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer software technology, and in particular to a traffic distribution method, system and apparatus, computer equipment, readable storage medium and computer program product. Background Art
[0002] With the development of computer software technology, the scale of application systems has also developed. Each application system needs to manage traffic to achieve the distribution of traffic between different application service addresses of the application system. The realization of traffic distribution has the following significance: First, load balancing can be achieved. Through load balancing, the traffic accessed by users is evenly distributed to multiple servers at the back end for processing according to a certain forwarding strategy. Secondly, gray release can be achieved. The characteristics of Internet products are large user scale and frequent version updates. Every time a new version is launched, the product has to bear great pressure. Gray release can avoid the risk of full launch of the new version. Through small traffic verification, problems in the product can be discovered, adjusted and optimized in the gray stage, and it can be smoothly iterated; finally, disaster recovery switching can be achieved. For systems deployed across multiple centers in different locations, when earthquakes, power outages and other accidents occur in a certain regional center, all requests from user terminals can be transferred to the corresponding application system of another center for processing.
[0003] In the prior art, firstly, each application system usually implements traffic distribution by itself, including developing code in its own application system or adding a responsible balancer in front of the application system, which makes the load balancing strategies, calibers, and implementation granularity of each application system uneven. In the fields of banking, securities, insurance, government affairs, etc., a business often requires the linkage and collaboration of multiple application systems to complete. Secondly, the application system usually distributes traffic based on a single dimension, such as scheduling and distributing by network layer, or scheduling and distributing by customer number. Summary of the invention
[0004] Based on this, it is necessary to provide a traffic distribution method, system and device, computer equipment and readable storage medium that can be based on centralized and multi-dimensional standards to address the above technical problems.
[0005] In a first aspect, the present application provides a traffic distribution method, which is applied to a traffic distribution system including a traffic distribution management center, the traffic distribution system also includes at least one application system, the application system is used to generate a traffic distribution request corresponding to the demand, and receive a target address sent by the traffic distribution management center, the traffic distribution method includes:
[0006] Obtain the requirements of the application system to be distributed with traffic;
[0007] Select multiple distribution dimensions and corresponding distribution rules according to needs;
[0008] Determine the target address based on the selected distribution dimension and distribution rules;
[0009] The target address is sent to the application system to instruct the application system to distribute traffic to the target address.
[0010] In one embodiment, before selecting multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to requirements, the method includes:
[0011] Get the request message from the application system;
[0012] Obtain distribution elements according to the request message;
[0013] At least one distribution rule corresponding to each distribution dimension is generated according to each preset distribution dimension, each distribution element corresponding to each distribution dimension, and each distribution condition value range.
[0014] In one embodiment, obtaining a distribution element according to a request message includes:
[0015] Get multiple message elements in the request message;
[0016] At least some of the message elements are subjected to rule operations to obtain distribution elements.
[0017] In one embodiment, determining the target address according to the selected distribution dimension and distribution rule includes:
[0018] Obtain candidate target addresses according to the selected distribution dimensions and distribution rules corresponding to the distribution dimensions;
[0019] The obtained candidate target addresses are intersected to determine the target address.
[0020] In one of the embodiments, the traffic distribution method further includes:
[0021] Change the parameters in the traffic distribution process, the changes include adding, deleting, and modifying, and the parameters include at least one of the distribution dimension, distribution rule, and candidate target address.
[0022] In a second aspect, the present application further provides a traffic distribution system, the traffic distribution system comprising:
[0023] A traffic distribution management center, used to execute the steps of the above method;
[0024] At least one application system is used to generate a traffic distribution request corresponding to the demand and receive a target address sent by the traffic distribution management center.
[0025] In a third aspect, the present application further provides a flow distribution device, which is applied to a flow distribution system including a flow distribution management center, the flow distribution system also includes at least one application system, the application system is used to generate a flow distribution request corresponding to the demand, and receive a target address sent by the flow distribution management center, the flow distribution device includes:
[0026] The application system acquisition module is used to obtain the requirements of the application system to be distributed;
[0027] A distribution rule selection module is used to select multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to requirements;
[0028] A target address determination module, used to determine the target address according to the selected distribution dimension and distribution rule;
[0029] The target address sending module is used to send the target address to the application system to instruct the application system to distribute the traffic to the target address.
[0030] In a fourth aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0031] In a fifth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0032] In a sixth aspect, the present application also provides a computer program product, including a computer program, characterized in that the computer program implements the steps of the above method when executed by a processor.
[0033] The above-mentioned traffic distribution method, system and device, computer equipment, readable storage medium and computer program product obtain the requirements of the application system to be distributed, and select multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to the requirements. It can be understood that each distribution dimension can correspond to one distribution rule or multiple distribution rules. Then, the target address is determined according to the selected distribution dimension and distribution rule, and further, the target address is sent to the application system to instruct the application system to distribute the traffic to the target address. The traffic distribution method of the present application can select multiple distribution dimensions according to the requirements of the application system, that is, it can be realized that the traffic is distributed to part of the target addresses of the application system to be distributed based on multiple dimensions as the standard, so as to adapt to the complex requirements of the application system and meet the complex traffic distribution requirements of the application system. At the same time, the traffic distribution method of the present application is applied to a traffic distribution system including a traffic distribution management center, and the traffic distribution system also includes at least one application system. The application system is used to generate a traffic distribution request corresponding to the demand and receive the target address sent by the traffic distribution management center, that is, the traffic distribution method of the present application is centrally executed by the traffic distribution management center, and the traffic distribution management center implements centralized management of the entire process of traffic distribution of at least one application system. The traffic distribution method of the present application can also realize centralized traffic distribution. Furthermore, the traffic distribution management center can centrally manage the entire traffic distribution process of multiple application systems in a one-stop manner. Therefore, the method of the present application is also conducive to realizing global statistics and analysis of the traffic of all application systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 An application scenario diagram of a traffic distribution method in an embodiment;
[0035] Figure 2 One of the flow charts of a traffic distribution method in an embodiment;
[0036] Figure 3 A schematic diagram of the principle of selecting multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to needs in an embodiment;
[0037] Figure 4 The second flowchart of the traffic distribution method in one embodiment;
[0038] Figure 5 A schematic diagram of a process of obtaining a distribution element according to a request message in an embodiment;
[0039] Figure 6 A schematic diagram of a process of determining a target address according to a selected distribution dimension and distribution rule in one embodiment;
[0040] Figure 7 The third flowchart of the traffic distribution method in one embodiment;
[0041] Figure 8 It is a schematic diagram of the principle of selecting multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to the requirements of multiple application systems in one embodiment;
[0042] Fig. 9 It is a structural block diagram of a flow distribution device in one embodiment.
[0043] Description of Figure Numbers:
[0044] Traffic distribution management center: 11; application system: 12; traffic distribution device: 20; application system acquisition module: 21; distribution rule selection module: 22; target address determination module: 23; target address sending module: 24. DETAILED DESCRIPTION
[0045] In order to facilitate understanding of the embodiments of the present application, the embodiments of the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the embodiments of the present application are given in the drawings. However, the embodiments of the present application can be implemented in many different forms and are not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the embodiments of the present application more thorough and comprehensive.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the technical field of the embodiments of the present application. The terms used herein in the description of the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the embodiments of the present application.
[0047] It will be understood that the term “includes / comprising” specifies the presence of stated features, integers, steps, operations, components, parts or combinations thereof, but does not exclude the possibility of the presence or addition of one or more other features, integers, steps, operations, components, parts or combinations thereof.
[0048] The present application embodiment provides a flow distribution method, such as Figure 1 As shown, the traffic distribution method is applied to a traffic distribution system including a traffic distribution management center 11, and the traffic distribution system also includes at least one application system 12, which is used to generate a traffic distribution request corresponding to the demand and receive a target address sent by the traffic distribution management center 11. Figure 2 As shown, the traffic distribution method includes steps 210 to 240.
[0049] Step 210, obtaining the requirements of the application system to be distributed. In this embodiment, the traffic distribution management center obtains the traffic distribution request of the application system to be distributed, wherein the traffic distribution request includes the requirements of the application system. The traffic distribution management center, as the subject of executing the traffic distribution method of the embodiment of the present application, can load the corresponding data into the cache after obtaining the requirements of the application system, and load it into the rule base table structure accordingly.
[0050] Step 220, select multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to the needs. As shown in Table 1, the distribution dimensions include but are not limited to the geographical dimension, service dimension, interface dimension, user dimension, product dimension and customer VIP level. Figure 3 As shown, according to the needs of the application system, all distribution dimensions can be selected, or some distribution dimensions can be selected. Each distribution dimension can include one distribution rule or multiple distribution rules. The distribution dimensions and distribution rules are also loaded into the cache and correspondingly loaded into the rule base table structure. Among them, the rule base table structure includes two categories: business dimension and technical dimension. Each distribution dimension and distribution rule is loaded into the corresponding category according to the attribute.
[0051] Table 1 Distribution Dimensions
[0052]
[0053]
[0054] Step 230, determine the target address according to the selected distribution dimension and distribution rule. After the distribution rule calculation module determines the target address, the traffic distribution management center can load the target address into the condition library table structure.
[0055] Step 240, sending the target address to the application system to instruct the application system to distribute the traffic to the target address.
[0056] In this embodiment, multiple distribution dimensions can be selected according to the needs of the application system, that is, it is possible to distribute traffic to part of the target addresses of the application system to be distributed based on multiple dimensions, so as to adapt to the complex needs of the application system and meet the complex traffic distribution requirements of the application system. At the same time, the traffic distribution method of this embodiment is centrally executed by the traffic distribution management center, and the traffic distribution management center centrally manages the entire process of traffic distribution of at least one application system. The traffic distribution method of this embodiment can also realize centralized traffic distribution. Furthermore, based on the fact that the traffic distribution management center can centrally manage the entire process of traffic distribution of multiple application systems in a one-stop manner, the method of this embodiment is also conducive to realizing global statistics and analysis of the traffic of all application systems.
[0057] In one embodiment, if Figure 4 As shown, the traffic distribution method includes steps 410 to 470. That is, after step 410 and before step 450, the following steps 420 to 440 are also included. It should be noted that step 410 and step 450 to step 470 of this embodiment correspond one-to-one with step 210 to step 240 in the aforementioned embodiment. For specific contents, please refer to the aforementioned embodiment, which will not be repeated here.
[0058] Step 420, obtaining a request message from the application system. In this embodiment, the traffic distribution management center obtains a traffic distribution request from the application system to be traffic distributed, wherein the traffic distribution request also includes a request message from the application system.
[0059] Step 430: Obtain a distribution element according to the request message. The distribution element is a unique identifier of traffic distribution. There are multiple message elements in the request message. In this embodiment, the distribution element is obtained according to the message element. The distribution element can be one or more.
[0060] Step 440, at least one distribution rule corresponding to each distribution dimension is generated according to each preset distribution dimension and each distribution element corresponding to each distribution dimension and each distribution condition value range. In this embodiment, the distribution rule includes distribution elements and distribution conditions. The distribution elements can correspond to the distribution rules one by one. One distribution element can also be applicable to multiple distribution rules. The distribution condition refers to the conditional expression that determines the target address. The distribution condition value range refers to the value range of data that can be applied to a certain distribution condition. The distribution condition value range is loaded into the cache and correspondingly loaded into the condition library table structure. Specifically, as shown in Table 2, taking the regional dimension as an example, the rule ID refers to the ID of the distribution rule corresponding to the distribution dimension. The distribution rule listed in Table 2 is the first distribution rule corresponding to the regional dimension, so 0001 is used as its unique identifier; the message element is the regional number. It can be understood that the embodiments listed in Table 2 use the message element directly as the corresponding distribution element, that is, the distribution element is also the regional number, where the regional number includes A and B; the distribution conditions include "regional number = 1" and "regional number = 2". Correspondingly, the distribution condition value range of the distribution condition "regional number = 1" is region A, and the distribution condition value range of the distribution condition "regional number = 2" is region B. In this embodiment, at least one distribution rule corresponding to each distribution dimension is generated according to each preset distribution dimension and each distribution element and distribution condition value range corresponding to each distribution dimension. It is more critical to generate at least one distribution condition corresponding to each distribution dimension, and then the distribution element and the corresponding distribution condition form a corresponding distribution rule.
[0061] Table 2 Distribution dimensions and distribution rules
[0062]
[0063]
[0064] In this embodiment, distribution rules corresponding to each distribution dimension are generated and loaded into the corresponding rule library table structure and category in the cache for selection according to the needs of the application system.
[0065] In one embodiment, if Figure 5 As shown, the above step 420, obtaining the distribution element according to the request message includes steps 510 to 520.
[0066] Step 510: Acquire multiple message elements in the request message.
[0067] Step 520, at least part of the message elements are subjected to rule operations to obtain distribution elements. In this embodiment, when the message elements are directly used as the corresponding distribution elements to meet the requirements of the distribution rules, rule operations can be added on the basis of the message elements to generate corresponding distribution elements. Specifically, as shown in Table 3, the message element is the ID card number, the distribution element is the 17th digit of the ID card number, and the distribution conditions include "gender = 'male'" and "gender = 'female'". The distribution condition value ranges corresponding to the two distribution conditions are odd numbers: 1, 3, 5, 7 and even numbers: 0, 2, 4, 6, 8. It can be understood that, according to the actual requirements of the distribution rules, if only part of the message elements are subjected to rule operations to obtain distribution elements, the remaining message elements that have not been subjected to rule operations can still be directly used as corresponding distribution elements. And it can be that all the remaining message elements are directly used as corresponding distribution elements, or part of the remaining message elements are directly used as corresponding distribution elements, while the other part does not play a role, or all the remaining message elements do not play a role.
[0068] Table 3 Distribution elements
[0069]
[0070]
[0071] In this embodiment, rule operations are performed on at least part of the message elements to obtain distribution elements, which can more widely meet the requirements of distribution rules and thus more widely meet the requirements of application systems.
[0072] In one embodiment, if Figure 6 As shown, the above step 230, determining the target address according to the selected distribution dimension and distribution rule includes steps 610 to 620.
[0073] Step 610, obtaining candidate target addresses according to the selected distribution dimensions and distribution rules corresponding to the distribution dimensions.
[0074] Step 620: Take the intersection of the obtained candidate target addresses to determine the target address.
[0075] In this embodiment, multiple distribution dimensions and corresponding distribution rules are selected according to the needs of the application system, and at least one corresponding application service address can be obtained according to the distribution conditions of each distribution rule. Therefore, the application service address obtained according to the distribution conditions of each distribution rule is first used as a candidate target address. The candidate target address refers to the application service address that can receive the traffic distributed by the application system. It can be understood that the candidate target address is the application service address left after the traffic distribution management center has been screened according to the needs of the application system and according to each distribution dimension. Then, the traffic distribution management center further screens the candidate target address in the distribution result screening module. Taking the intersection of the candidate target addresses corresponding to each distribution dimension obtained means that the intersection obtained must be the application service address that meets the distribution conditions of all distribution rules, that is, the target address of the application system that needs to be determined in the traffic distribution process. Specifically, as shown in Table 4, according to the distribution rules corresponding to the selected regional dimension, interface dimension and user dimension, the candidate target addresses corresponding to each distribution dimension are obtained as A1 and A2; A1; A1, and the intersection of the candidate target addresses is taken, that is, A1 that meets all distribution rules of all distribution dimensions is determined as the target address.
[0076] Table 4 Candidate target addresses and target addresses
[0077]
[0078]
[0079] In this embodiment, candidate target addresses are first obtained according to the selected multiple distribution dimensions and the distribution rules corresponding to the distribution dimensions, and then the candidate target addresses are further screened, that is, the intersection is taken to finally determine the target address that meets all the distribution rules selected according to the needs of the application system. The target address that meets each distribution dimension at the same time is determined based on multiple dimensions as the standard. The determined target address can also adapt to the complex needs of the application system and meet the complex traffic distribution requirements of the application system.
[0080] In one of the embodiments, the traffic distribution method further includes: changing the parameters in the traffic distribution process, the changes include adding, deleting, and modifying, and the parameters include at least one of the distribution dimension, distribution rule, and candidate target address. In this embodiment, the traffic distribution management center can directly add, delete, modify, and other operations on the parameters required for the traffic distribution process through the management interface, without changing the corresponding program code to achieve the parameter change, and the updated parameters will be automatically saved to the database and synchronously loaded to the cache. Among them, each management interface and the corresponding parameters that can be changed are: dimension management interface-distribution dimension (dimension ID (unique identifier), dimension name, dimension description), application system (application service system number); rule management interface-distribution dimension (dimension ID (unique identifier)), distribution rule (rule ID (unique identifier), rule name, distribution element, distribution condition), application system (candidate target address, target address); distribution condition value range interface-this interface content can be designed according to business requirements. It should be noted that the above does not exhaustively list each management interface and the corresponding parameters that can be changed.
[0081] In this embodiment, when parameters need to be changed during the traffic distribution process, they can be changed directly through the management interface without changing the program code or restarting the service, making parameter changes more convenient and conducive to the smooth progress of the target address determination process.
[0082] In one embodiment, if Figure 7 As shown, the traffic distribution method includes steps 701 to 710.
[0083] Step 701, obtain the requirements of the application system to be distributed with traffic. Step 702, obtain the request message of the application system, and then, step 703, obtain multiple message elements in the request message, and step 704, perform rule operations on at least some of the message elements to obtain distribution elements. Step 705, generate at least one distribution rule corresponding to each distribution dimension according to the preset distribution dimensions and the distribution elements corresponding to each distribution dimension and the value range of each distribution condition. Further, step 706, select multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to the requirements, step 707, obtain candidate target addresses according to the selected distribution dimensions and the distribution rules corresponding to the distribution dimensions, step 708, take the intersection of the obtained candidate target addresses to determine the target address, and then, step 709, send the target address to the application system to instruct the application system to distribute the traffic to the target address. Finally, step 710, change the parameters in the traffic distribution process, the changes include adding, deleting, and modifying, and the parameters include at least one of the distribution dimensions, distribution rules and candidate target addresses. It should be noted that, Figure 7It is shown that step 710 is the last step of the flow distribution process, but in fact step 710 can be carried out throughout the whole process of flow distribution. When the parameters need to be changed, step 710 can be executed.
[0084] In this embodiment, firstly, multiple distribution dimensions can be selected according to the needs of the application system, that is, it is possible to distribute traffic to part of the target addresses of the application system to be distributed based on multiple dimensions, so as to adapt to the complex needs of the application system, meet the complex traffic distribution requirements of the application system, and make the traffic distribution rules of the application system more flexible. Secondly, when the parameters need to be changed during the traffic distribution process, they only need to be changed directly through the management interface, without changing the program code or restarting the service, making the parameter change more convenient and conducive to the smooth progress of the target address determination process. Thirdly, the traffic distribution method of this embodiment is centrally executed by the traffic distribution management center, and the traffic distribution management center implements centralized management of the entire process of traffic distribution of at least one application system. The traffic distribution method of this embodiment can also realize centralized traffic distribution. Finally, based on the fact that the traffic distribution management center can centrally manage the entire process of traffic distribution of multiple application systems in a one-stop manner, the method of this embodiment is also conducive to realizing global statistics and analysis of the traffic of all application systems. The traffic distribution method in the embodiment of the present application has a wide range of applications and strong versatility, and has general application value in the field of computer software application systems.
[0085] It should be understood that although the flowcharts involved in the above-mentioned embodiments are Figure 2 and Figure 4-Figure 7 The steps in the flowchart are shown in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Figure 2 and Figure 4-Figure 7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0086] Based on the same inventive concept, the embodiment of the present application also provides a flow distribution system for implementing the flow distribution method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more flow distribution system embodiments provided below can refer to the limitations on the flow distribution method above, and will not be repeated here.
[0087] The present application also provides a flow distribution system. Figure 1 As shown, the traffic distribution system includes a traffic distribution management center 11 and at least one application system 12. The traffic distribution management center 11 is used to execute the steps of the above method. At least one application system 12 is used to generate a traffic distribution request corresponding to the demand and receive a target address sent by the traffic distribution management center 11.
[0088] In this embodiment, the traffic distribution management center 11 is used to execute all the steps of the traffic distribution method in the above-mentioned embodiment. It can be understood that the traffic distribution management center 11 centrally manages the entire process of traffic distribution. The application system 12 is the application system 12 to be distributed in the above-mentioned embodiment. In particular, in this embodiment, the traffic distribution management center 11 can manage traffic distribution for multiple application systems 12 at the same time, that is, determine the target addresses of traffic distribution for multiple application systems 12 at the same time. Figure 8 As shown, multiple distribution dimensions and distribution rules corresponding to the distribution dimensions can be selected according to the needs of multiple application systems. Then, the target address of each application system 12 is determined according to the selected distribution dimension and distribution rule. The traffic distribution system in this embodiment can apply a centralized, multi-dimensional traffic distribution method. Through the traffic distribution management center 11, on the basis of being able to distribute traffic to some target addresses of the application system 12 to be distributed based on multi-dimensional standards, it can also realize centralized global unified configuration and unified management of traffic distribution.
[0089] Based on the same inventive concept, the embodiment of the present application also provides a flow distribution device for implementing the flow distribution method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more flow distribution device embodiments provided below can refer to the limitations on the flow distribution method above, and will not be repeated here.
[0090] The embodiment of the present application also provides a flow distribution device, which is applied to a flow distribution system including a flow distribution management center. The flow distribution system also includes at least one application system, which is used to generate a flow distribution request corresponding to the demand and receive a target address sent by the flow distribution management center. Fig. 9As shown, the traffic distribution device 20 includes an application system acquisition module 21, a distribution rule selection module 22, a target address determination module 23 and a target address sending module 24. The application system acquisition module 21 is used to obtain the requirements of the application system to be distributed. The distribution rule selection module 22 is used to select multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to the requirements. The target address determination module 23 is used to determine the target address according to the selected distribution dimensions and distribution rules. The target address sending module 24 is used to send the target address to the application system to instruct the application system to distribute the traffic to the target address.
[0091] In one embodiment, the traffic distribution device 20 further includes a request message acquisition module, a distribution element acquisition module and a distribution rule generation module. The request message acquisition module is used to acquire a request message of an application system. The distribution element acquisition module is used to acquire a distribution element according to a request message. The distribution rule generation module is used to generate at least one distribution rule corresponding to each distribution dimension according to each preset distribution dimension and each distribution element corresponding to each distribution dimension and each distribution condition value range.
[0092] In one embodiment, the distribution element acquisition module includes a message element acquisition unit and a distribution element acquisition unit. The message element acquisition unit is used to acquire multiple message elements in the request message. The distribution element acquisition unit is used to perform rule operations on at least part of the message elements to acquire distribution elements.
[0093] In one embodiment, the target address determination module 23 includes a candidate address determination unit and a target address determination unit. The candidate address determination unit is used to obtain candidate target addresses according to the selected distribution dimension and the distribution rule corresponding to the distribution dimension. The target address determination unit is used to take the intersection of the obtained candidate target addresses to determine the target address.
[0094] In one of the embodiments, the above-mentioned traffic distribution device 20 also includes: a parameter change module, which is used to change the parameters in the traffic distribution process, the changes include adding, deleting, and modifying, and the parameters include at least one of the distribution dimension, distribution rule and candidate target address.
[0095] Each module in the above-mentioned traffic distribution device 20 can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can select to execute operations corresponding to each of the above modules.
[0096] An embodiment of the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned traffic distribution method when executing the computer program.
[0097] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned traffic distribution method are implemented.
[0098] An embodiment of the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned traffic distribution method when executed by a processor.
[0099] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0100] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0101] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A traffic distribution method, characterized in that: Applied to a traffic distribution system including a traffic distribution management center, the traffic distribution system also includes at least one application system, the application system is used to generate a traffic distribution request corresponding to a demand, and receive a target address sent by the traffic distribution management center, the method includes: Obtaining the requirements of the application system to be distributed with respect to traffic; Select multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to the requirements; Obtain candidate target addresses according to the selected distribution dimensions and the distribution rules corresponding to the distribution dimensions respectively; take an intersection of the obtained candidate target addresses to determine the target address; Sending the target address to the application system to instruct the application system to distribute traffic to the target address; The traffic distribution management center further includes a rule base table structure, which includes a business dimension and a technical dimension; before selecting multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to the requirements, the method includes: Obtain a request message of the application system; obtain a distribution element according to the request message; generate at least one distribution rule corresponding to each distribution dimension according to each preset distribution dimension and each distribution element corresponding to each distribution dimension and each distribution condition value range; load each distribution dimension and each distribution rule into the rule base table structure according to attribute correspondence; The method further comprises: Without changing the program code or restarting the service, the parameters in the traffic distribution process are changed in the management interface, the change includes adding, deleting, and modifying, the parameters include at least one of the distribution dimension, the distribution rule, and the candidate target address, and the management interface includes a dimension management interface corresponding to the distribution dimension, and a rule management interface corresponding to the distribution rule and the candidate target address; the updated parameters will be automatically saved in the database and synchronously loaded into the cache.
2. The method according to claim 1, characterized in that The distribution dimensions include geographical dimension, service dimension, interface dimension, user dimension, product dimension and customer VIP level.
3. The method according to claim 1, characterized in that The obtaining of the distribution element according to the request message includes: Obtaining multiple message elements in the request message; At least part of the message elements are subjected to rule operation to obtain the distribution element.
4. The method according to claim 1, characterized in that: The distribution condition refers to a conditional expression for determining the target address.
5. The method according to any one of claims 1 to 4, characterized in that: The remaining message elements that have not been subjected to rule calculation are directly used as corresponding distribution elements.
6. A traffic distribution system, characterized in that: The system comprises: A traffic distribution management center, configured to execute the steps of the method according to any one of claims 1 to 5; At least one application system is used to generate a traffic distribution request corresponding to the demand and receive a target address sent by the traffic distribution management center.
7. A flow distribution device, characterized in that: The device is applied to a traffic distribution system including a traffic distribution management center, the traffic distribution system also including at least one application system, the application system is used to generate a traffic distribution request corresponding to a demand, and receive a target address sent by the traffic distribution management center, the device includes: An application system acquisition module, used to acquire the requirements of the application system to be distributed with traffic; A distribution rule selection module, used to select multiple distribution dimensions and distribution rules corresponding to the distribution dimensions according to the requirements; A target address determination module, comprising a candidate address determination unit and a target address determination unit; the candidate address determination unit is used to obtain candidate target addresses according to the selected distribution dimension and the distribution rule corresponding to the distribution dimension, respectively, and the target address determination unit is used to take an intersection of the obtained candidate target addresses to determine the target address; A target address sending module, used for sending the target address to the application system to instruct the application system to distribute traffic to the target address; The traffic distribution management center further includes a rule base table structure, which includes business dimensions and technical dimensions; the distribution rule selection module is also used to obtain a request message from the application system; obtain a distribution element according to the request message; generate at least one distribution rule corresponding to each distribution dimension according to each preset distribution dimension and each distribution element corresponding to each distribution dimension and each distribution condition value range; load each distribution dimension and each distribution rule into the rule base table structure according to the attribute correspondence; The above-mentioned traffic distribution device also includes: a parameter change module, which is used to change the parameters in the traffic distribution process in the management interface without changing the program code or restarting the service, and the change includes adding, deleting, and modifying. The parameters include at least one of the distribution dimension, the distribution rule and the candidate target address. The management interface includes a dimension management interface corresponding to the distribution dimension and a rule management interface corresponding to the distribution rule and the candidate target address; the updated parameters will be automatically saved in the database and synchronously loaded into the cache.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Media content push method, device and system
CN107872483A
Multi-service flow shunt system based on SDN architecture and shunt data processing method
CN108566342A
DNS system service processing method and device
CN114124832A