Intelligent traffic scheduling method and device
By binding products and routes in internet traffic scheduling and configuring routing rules, the problem of existing technologies being unable to meet business volume and user needs has been solved, achieving efficient and flexible traffic scheduling and improved data query efficiency.
Patent Information
- Application Number
- CN202410827927.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Existing internet traffic scheduling technologies cannot meet the ever-increasing business volume and increasingly complex and ever-changing user needs, leading to business system anomalies and a decline in customer experience, and are unable to flexibly respond to users' customized needs.
By binding products to routes and configuring routing rules, including priority rules, weight rules, and cost rules, the order and weight of data source calls can be controlled to achieve intelligent traffic scheduling. A query termination function can be set to control the query rate.
It achieves efficient and flexible flow control, reduces scheduling costs, meets customers' complex and customized needs, and improves the reliability and efficiency of data query.
Smart Images

Figure CN118590386B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet traffic scheduling, in particular to an intelligent traffic scheduling method and device. BACKGROUND
[0002] With the rapid evolution of Internet technology, it has become a crucial task to ensure stable, efficient and reliable services for users when building Internet systems.
[0003] In the prior art, in terms of traffic scheduling, when a user completes data query in multiple data sources by calling an Internet software product, a direct connection method is generally used, that is, a one-to-many interface-based architecture, which gradually reveals its limitations in data processing. For example, when the source interface encounters a failure, the entire business system reacts like a domino effect, causing all customers to encounter exceptions during the calling process, which seriously affects the user experience. More importantly, this direct connection mode is not flexible in adapting to user customization and responding to changes in business needs, and cannot effectively guide and distribute traffic, thereby restricting the development and optimization of the business. Therefore, we urgently need a more efficient, stable and flexible solution to cope with the growing business traffic and increasingly complex and changing user needs. SUMMARY
[0004] Therefore, the purpose of the present application is to provide an intelligent traffic scheduling method and device to overcome the problem that current Internet traffic scheduling cannot meet the growing business volume and increasingly complex and changing user needs.
[0005] To achieve the above purpose, the present application adopts the following technical solutions:
[0006] In a first aspect, the present application provides an intelligent traffic scheduling method, comprising:
[0007] binding a product with a route;
[0008] configuring a routing rule for the route, the routing rule being used to define the rules when the route calls multiple data sources for data query;
[0009] receiving a request sent by a user through a target product;
[0010] based on the route corresponding to the target product and the routing rule corresponding to the route, calling the corresponding data source for query and returning the query result;
[0011] The routing rules include at least one of a priority rule, a weight rule and a cost rule, the priority rule is used to define priorities of the called data sources when being called, the weight rule is used to define weights of the called data sources when being called, and the cost rule is used to define sequences of the called data sources when being called based on calling costs.
[0012] Further, in some embodiments of the present application, the binding of the product to the route includes:
[0013] Binding one product to multiple routes and receiving a switching instruction of an administrator to determine a unique route to be used by the product.
[0014] Further, in some embodiments of the present application, the routing rules include at least one of a primary-primary rule, a primary-backup rule, a backup-primary rule and a backup-backup rule which are sequentially executed.
[0015] The primary-primary rule, the primary-backup rule, the backup-primary rule and the backup-backup rule each include any one of the priority rule, the weight rule and the cost rule.
[0016] Further, in some embodiments of the present application, the calling of the corresponding data source for query based on the route corresponding to the target product and the routing rule corresponding to the route and the returning of the query result include:
[0017] Based on the priority rule, a data source which is not called currently and has the highest priority in the rule is called for query, if data is queried, the data is returned and the running is stopped, if no data is queried, it is judged whether the data source is set with a no-termination function for query, if yes, the running is stopped, if no, other data sources which are not called in the rule are called based on the priority in the rule until all the data sources in the rule are called.
[0018] Further, in some embodiments of the present application, the calling of the corresponding data source for query based on the route corresponding to the target product and the routing rule corresponding to the route and the returning of the query result include:
[0019] Based on the cost rule, a data source which is not called currently and has the highest priority in the rule is called for query, if data is queried, the data is returned and the running is stopped, if no data is queried, it is judged whether the data source is set with a no-termination function for query, if yes, the running is stopped, if no, other data sources which are not called in the rule are called based on the priority in the rule until all the data sources in the rule are called.
[0020] Further, in some embodiments of the present application, the calling of the corresponding data source for querying and the returning of the query result based on the route corresponding to the target product and the route rule corresponding to the route include:
[0021] Based on the weight of each data source in the weight rule, the interval corresponding to each data source is divided between 0 and 1.
[0022] When calling the data source, a random value between 0 and 1 is generated, and the data source corresponding to the interval where the random value is located is called for querying.
[0023] Further, in some embodiments of the present application, further comprising:
[0024] The target data source is set to have no end, so that after calling the query of the data source and not querying the data, the running is stopped.
[0025] In a second aspect, the embodiments of the present application also provide an intelligent traffic scheduling device, comprising a processor and a memory, the processor being connected with the memory:
[0026] The processor is used for calling and executing the program stored in the memory.
[0027] The memory is used for storing the program, and the program is used for at least executing the intelligent traffic scheduling method.
[0028] The present application relates to the technical field of Internet traffic scheduling, and specifically discloses an intelligent traffic scheduling method and device, the method comprising: binding a product with a route; configuring a route rule for the route, receiving a request sent by a target product of a user; calling a corresponding data source for querying based on the route corresponding to the target product and the route rule corresponding to the route, and returning a query result; wherein the route rule comprises at least one of a priority rule, a weight rule and a cost rule. In this way, traffic control can be realized only by changing the route rule, avoiding the adjustment of the product and the data source, and the operation is simple and fast, the scheduling cost is reduced, the complex customization needs of customers are met, and the search rate of data query can be effectively controlled by setting the no-end search function for the data source. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the description of the embodiments or the prior art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0030] Figure 1A principle diagram of a data query method in the prior art in which a client calls a data source through a product;
[0031] Figure 2 A specific principle diagram of a data query method in the prior art in which a client calls a data source through a product;
[0032] Figure 3 A principle diagram of weight rule running in an intelligent traffic scheduling method provided by an embodiment of the present application;
[0033] Figure 4 A flow diagram of an intelligent traffic scheduling method provided by another embodiment of the present application;
[0034] Figure 5 A specific principle diagram of an intelligent traffic scheduling method provided by another embodiment of the present application;
[0035] Figure 6 A structure diagram of an intelligent traffic scheduling device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described in detail below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0037] Summary of the application:
[0038] Figure 1 and Figure 2 A principle diagram of a data query method in the prior art in which a client calls a data source through a product, as shown in Figure 1 and Figure 2 includes the following steps:
[0039] A staff member, such as an administrator, sets a client and a product, and binds a corresponding data source on the product, and adjusts the order of the data source, wherein the product and the data source are in a one-to-many relationship.
[0040] The client initiates a call, sorts the data sources according to the data sources configured by the product and the strategy configured in the above steps, calls and queries the data sources, for example, if the first called data source successfully queries a result, the result is returned, otherwise the second data source is called, if the second called data source successfully queries a result, the result is returned, otherwise the third data source is called, and so on, until all the data sources are called and the result is returned to the client.
[0041] Method embodiments:
[0042] Figure 3 is a flowchart of the intelligent traffic scheduling method provided by the embodiment of the application, please refer to Figure 3 The embodiment can include the following steps:
[0043] S101, binding the product and the route.
[0044] S102, the route configures the route rule.
[0045] The route rule is used to define the rule when the route calls multiple data sources for data query.
[0046] Specifically, the staff such as the administrator can set the customer and the product, then bind the route on the product, and configure the route rule for the route, the route rule is used to define the rule when the route calls multiple data sources for data query, in actual application, the route rule is associated with the data source, finally the customer calls the product, which actually calls the data source, thereby performing data query.
[0047] In some embodiments of the application, one product can bind multiple routes, each route can configure multiple route rules such as 4 route rules, and each route rule can configure multiple data sources, that is, the product and the route are in one-to-many relationship, the route and the route rule are in one-to-many relationship, and the route rule and the data source are in one-to-many relationship.
[0048] It should be noted that the route is a bridge between the product and the data source, the called product can set multiple routes, but only one route is actually enabled and run, and multiple routes can facilitate the administrator to switch to determine the displacement route to be started.
[0049] The route rule is a condition, rule such as specific call of which data source used by the route, and a rule such as the order or weight of calling multiple data sources for data query.
[0050] The route rule includes at least one of priority rule, weight rule and cost rule, the priority rule is used to define the priority of each called data source when called, the weight rule is used to define the weight of each called data source when called, and the cost rule is used to define the order of each called data source when called based on the calling cost.
[0051] Specifically, for example, for the priority rule, which is used to specify the priority of the data sources contained therein when called, for example, the priority rule {data source 1, data source 2, data source 3,...}, which actually functions to specify that when the data sources are called, the calling order is data source 1, data source 2, data source 3,..., data source 1 is called to obtain the query structure and returned, and if no result is found, data source 2 can be called, data source 2 is called to find the result and returned, and if no result is found, data source 3 can be called, and so on, until all data sources in the priority rule are queried and returned to the client.
[0052] For the weight rule, which is used to specify the weight of each called data source when called, for example, the weight rule {data source 1: data source 2: data source 3 = x: y: 1-x-y}, which is used to represent that there is no calling order, that is, data source 1, data source 2, and data source 3 are all called, but the calling proportion of the three data sources is x: y: 1-x-y.
[0053] For the cost rule, which is used to specify the order of each called data source based on the calling cost.
[0054] S103, receiving a request sent by a user through a target product.
[0055] S104, based on the route corresponding to the target product and the route rule corresponding to the route, calling the corresponding data source for querying and returning the query result.
[0056] Specifically, the client initiates a call through the product, finds the route rule according to the route configured by the product, and then calls according to the rules configured in the above embodiment, that is, the route rule configured.
[0057] For example, for the priority rule {data source 1, data source 2, data source 3,...}, the data sources are called in the order of data source 1, data source 2, data source 3,..., and if a result is found, it is returned, otherwise the next data source is judged, and the same logic is performed for each data source.
[0058] For the weight rule {data source 1: data source 2: data source 3 = x: y: 1-x-y}, as shown in the following figure, each data source is segmented in the range of 0~1, a random value is taken, the random value is in the range of [0, 1), the random value is mapped to the following figure, based on the interval where the random value is located, the corresponding data source is called, and if a result is found, it is returned, otherwise subsequent actions are performed, such as judging the next data source. Figure 4
[0059] For the cost rule {data source 1, data source 2, data source 3,...}, the order of calling from low to high according to the data source cost is determined, the result of the data source query is returned, otherwise the next data source is determined, and the same logic is executed for each data source.
[0060] The application discloses an intelligent flow scheduling method, specifically comprising: binding a product with a route; configuring a routing rule for the route, receiving a request sent by a target product by a user; based on the route corresponding to the target product and the routing rule corresponding to the route, calling a corresponding data source for query and returning a query result; wherein the routing rule comprises at least one of a priority rule, a weight rule and a cost rule. In this way, accurate flow control can be realized by only changing the routing rule, avoiding adjusting the product and the data source, and the operation is simple and fast, and the scheduling cost can be reduced, and the complex customized needs of customers can be met, and at the same time, by setting a no-end search function for the data source, the search rate of data query can be effectively controlled.
[0061] Further, in some embodiments of the application, the routing rule comprises at least one of sequentially executed master-master rule, master-backup rule, backup-master rule and backup-backup rule. Wherein, the master-master rule, the master-backup rule, the backup-master rule and the backup-backup rule all include any one of the priority rule, the weight rule and the cost rule.
[0062] In the example of the application, the routing rule can be configured with 4, so that the data source set (such as the case of calling a composite data source in the priority rule {data source 1, composite data source 2}) is tiled down with data source, the master rule is extended to master-master rule and master-backup rule, and the backup rule (i.e. backup rule) is extended to backup-master rule and backup-backup rule. At this time, when the four rules exist, the calling order of the rules is master-master rule, master-backup rule, backup-master rule and backup-backup rule in turn. Of course, in some embodiments, only several of the above 4 rules may exist, and it can be understood that the calling is also in this order, but skips the rules that do not exist. For example, when only master-master rule, backup-master rule and backup-backup rule exist, the calling order is master-master rule, backup-master rule and backup-backup rule.
[0063] Further, in some embodiments of the application, a no-end search is also set for the target data source, so that after calling the query of the data source and not querying the data, the running is stopped. That is, if a certain data source opens this function, after querying the data source, even if no result is found, the result is directly returned to the customer, so as to achieve the purpose of controlling the search rate.
[0064] For example, the main rule is priority rule {data source 1, composite data source 2}, and the backup rule is priority order {data source 3, data source 4} (the main rule is to configure the main data source, the backup rule is to configure the backup data source, the backup rule is called after the main rule fails to prevent the product from calling no result), wherein the composite data source 2 is a composite data source, the composite data source calls a new product, and the product calls the following data sources to realize: the main rule weight rule {data source 2-1: data source 2-2 = x: 1-x}, and the customer needs to return the search rate greater than or equal to the proportion 1-x.
[0065] At this time, corresponding to the above-mentioned main-main rule, main-backup rule, backup-main rule and backup-backup rule, the following rules can be set to realize:
[0066] Main-main rule: priority rule {data source 1};
[0067] Main-backup rule: weight rule {data source 2-1: data source 2-2 = x: 1-x}, wherein data source 2-1 is configured to search for no termination;
[0068] Backup-main rule: priority rule {data source 3, data source 4}.
[0069] In this way, through such configuration, when the data source 2-1 in the main-backup rule returns no result, it can be directly returned, without the need to continue to call down, because even if the proportion x has no result, it also meets the search rate and satisfies the customer demand.
[0070] Figure 4 is a flowchart of an intelligent traffic scheduling method provided by another embodiment of the application, Figure 5 is a specific principle diagram of the intelligent traffic scheduling method provided by another embodiment of the application, as shown in Figure 4 and Figure 5 After the configuration of the routing rule is completed, the actual operation includes:
[0071] First step: the customer initiates a call through the product, obtains all routes and routing rules based on the customer request, and the data sources in the routing rule.
[0072] Second step: after determining the routing and routing rule and data source order, the call can be performed.
[0073] Which can include determining the route to be started or the starting order of multiple routes; routing rules and routing rule orders such as main-main rule, main-backup rule, backup-main rule and backup-backup rule; and the calling rule of each data source in the routing rule.
[0074] Third step: calling according to the routing rule.
[0075] For example, if the first executed, i.e. the master-master rule, is the priority rule {data source 1, data source 2, data source 3,...}, the order of calling is data source 1 -> data source 2 -> data source 3 ->.... If the data source query has a result, it is returned, otherwise, if the no-end search is enabled, the result is returned, otherwise, the next data source is judged (i.e. the query is called, and it is judged whether there is a query result), and the same logic is executed.
[0076] If the master-master rule is the weight rule {data source 1: data source 2: data source 3 = x: y: 1-x-y}, the data sources are segmented in the range of 0-1, a random value is taken, the random value is mapped to the segment in the range of [0, 1), the data source corresponding to the interval where the random value is located is called, and if the data source query has a result, it is returned, otherwise, if the no-end search is enabled, the result is returned.
[0077] If the master-master rule is the cost rule {data source 1, data source 2, data source 3,...}, the order of calling is from low to high according to the data source cost, and if the data source query has a result, it is returned, otherwise, if the no-end search is enabled, the result is returned, otherwise, the next data source in the rule is judged, and the same logic is executed.
[0078] It should be noted that the judgment of the next data source mentioned in this part includes the judgment of the next data source in the current rule, and because the routing rules also have an order (the order of the master-master rule, the master-backup rule, the backup-master rule and the backup-backup rule), after all the data sources in the current rule are judged, the data sources in the next rule are judged based on the next rule.
[0079] Fourth step: if the query result of the above "third step" is obtained, the result returned by the calling of the "third step" is returned, otherwise, the corresponding data sources are called based on the routing rules in the next routing, and the above steps are repeated until the query result is returned or the no-end information is returned after all the data sources are queried.
[0080] In some embodiments, the calling and query results can also be returned to the customer after all the calling query results of the data sources are summarized.
[0081] The intelligent flow scheduling method provided in the application can realize product data source customization methods from the aspects of routing, routing rules, and different dimensions (including routing rules of priority, weight, and data source cost, and no-termination function) to ensure customer product search rate and solve customer complex scene methods, and has many advantages compared with prior art, including: first, reducing cost, for artificial, the configuration mode is concentrated on the routing rule, without adjusting the product, data source, routing rule, simple operation; second, through setting data source no-termination, the function of controlling product search rate can be realized. For customers, the intelligent flow scheduling method provided in the application can improve the efficiency of calling query, and can ensure the search rate. For enterprises, the method of the application is simple and efficient, and can fully cover the complex customization needs of customers.
[0082] Device embodiments:
[0083] Based on the same inventive concept, the application further provides an intelligent flow scheduling device for implementing the above method embodiments. Figure 6 is a structural schematic diagram of the intelligent flow scheduling device provided in the embodiment of the application, as Figure 6 shown, the intelligent flow scheduling device of the embodiment includes a processor 21 and a memory 22, and the processor 21 is connected with the memory 22. Among them, the processor 21 is used for calling and executing the program stored in the memory 22; the memory 22 is used for storing the program, and the program is at least used for executing the intelligent flow scheduling method in the above embodiment.
[0084] The specific implementation of the intelligent flow scheduling device provided in the embodiment of the application can refer to the implementation of the intelligent flow scheduling method of any of the above embodiments, which will not be repeated here.
[0085] The intelligent flow scheduling device provided in the application can reduce enterprise and artificial cost, among them, as mentioned in the above intelligent flow scheduling method, the operation of adjusting data source is a simple and fast customization operation, and customization is sustainable. For customers, no matter how the data source result rate is, the product search rate can be kept at the customer level; for enterprises, the calling scene needs of customers can be met, which is simple, stable and efficient.
[0086] It can be understood that the same or similar parts in the above embodiments can be mutually referred to, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0087] It should be noted that, in the description of the present application, the terms "first", "second" and the like are used only for descriptive purposes, and cannot be construed as indicating or implying relative importance. In addition, in the description of the present application, the meaning of "a plurality of" is at least two, unless otherwise specified.
[0088] Any process or method descriptions or descriptions of the flow diagrams described herein or otherwise described in the present application can be understood as representing the steps of the codes implemented as code means containing executable instructions for performing specific logical functions or steps, and the scope of the preferred embodiments of the present application includes additional implementation involving other processes or methods.
[0089] It should be understood that parts of the present application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and as in another embodiment, it can be implemented by any one or a combination of the following technologies known in the art: discrete logic circuit with logic gate circuit for implementing logical functions on data signals, application specific integrated circuit with suitable combination logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) and the like.
[0090] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiments can be completed by programs instructing relevant hardware, and the programs can be stored in a computer readable storage medium, which includes one or a combination of the steps of the method embodiments when executed.
[0091] In addition, each functional unit in each embodiment of the present application can be integrated in one processing module, or each unit can exist physically separately, or two or more units can be integrated in one module. The above integrated module can be realized in the form of hardware or in the form of software functional module. The integrated module, if realized in the form of software functional module and sold or used as an independent product, can also be stored in a computer readable storage medium.
[0092] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0093] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily mean the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0094] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary, and cannot be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-described embodiments within the scope of the present application.
Claims
1. An intelligent traffic scheduling method, characterized in that, The application relates to a method for binding a product with a route, comprising the following steps: binding a product with a route; configuring a route rule for the route, the route rule being used for defining rules for calling multiple data sources for data query by the route; receiving a request sent by a target product; based on the route corresponding to the target product and the route rule corresponding to the route, calling corresponding data sources for query and returning query results; wherein the route rule comprises at least one of a priority rule, a weight rule and a cost rule, the priority rule being used for defining the priority of each called data source when being called, the weight rule being used for defining the weight of each called data source when being called, and the cost rule being used for defining the sequence of each called data source when being called based on calling cost; the step of binding a product with a route comprises: binding one product with multiple routes and receiving a switching instruction of an administrator to determine a unique route to be used by the product; the route rule comprises at least one of a master-master rule, a master-backup rule, a backup-master rule and a backup-backup rule which are sequentially executed; the master-master rule, the master-backup rule, the backup-master rule and the backup-backup rule all comprise any one of the priority rule, the weight rule and the cost rule; setting a no-end search function for a target data source to stop running after calling the data source for query and failing to find data.
2. The intelligent traffic scheduling method of claim 1, wherein, the step of calling corresponding data sources for query based on the route corresponding to the target product and the route rule corresponding to the route and returning query results comprises: based on the priority rule, calling a data source with the highest priority which has not been called in the rule for query, returning data and stopping running if data is found, judging whether the data source is provided with the no-end search function if data is not found, stopping running if the data source is provided with the no-end search function, and calling other data sources which have not been called in the rule based on the priority in the rule until all data sources in the rule are called if the data source is not provided with the no-end search function.
3. The intelligent traffic scheduling method of claim 1, wherein, the step of calling corresponding data sources for query based on the route corresponding to the target product and the route rule corresponding to the route and returning query results comprises: based on the cost rule, calling a data source with the highest priority which has not been called in the rule for query, returning data and stopping running if data is found, judging whether the data source is provided with the no-end search function if data is not found, stopping running if the data source is provided with the no-end search function, and calling other data sources which have not been called in the rule based on the priority in the rule until all data sources in the rule are called if the data source is not provided with the no-end search function.
4. The intelligent traffic scheduling method of claim 1, wherein, the step of calling corresponding data sources for query based on the route corresponding to the target product and the route rule corresponding to the route and returning query results comprises: based on the weight of each data source in the weight rule, dividing intervals corresponding to each data source between 0 and 1; generating a random value between 0 and 1 when calling a data source, and calling a data source corresponding to the interval of the random value for query.
5. An intelligent traffic scheduling device, characterized by The application relates to a computer readable storage medium, comprising a processor and a memory, wherein the processor is connected with the memory. The processor is used for calling and executing a program stored in the memory. The memory is used for storing the program, and the program is used for executing the intelligent traffic scheduling method in any one of claims 1-4.
Citation Information
Patent Citations
Privacy calculation method and system based on interface, storage medium and equipment
CN115051878A
Risk control data source intelligent switching system and method
CN116664277A
Rule-based data source selection
US20190026322A1
Conserving computer resources through query termination
US20220129342A1
Data processing apparatus
WO2007099331A2