Traffic control method and device, computer device and storage medium

By acquiring historical data through a big data framework cluster and generating traffic control gray-scale strategies, the problem of the lack of representativeness in traffic distribution strategies is solved, and the accuracy and real-time performance of traffic control are achieved.

CN116708298BActive Publication Date: 2026-04-28CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA PING AN PROPERTY INSURANCE CO LTD
Filing Date
2023-06-20
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, traffic distribution strategies lack representativeness, resulting in inaccurate traffic distribution, failure to meet user needs, and impact on the release and promotion of products or services.

Method used

The system acquires historical static and traffic data of the target business through a big data framework cluster, inputs the corresponding traffic strategy model, generates a traffic control gray-scale policy, and then the gateway server routes access requests according to the policy.

Benefits of technology

It improves the accuracy of traffic control, ensuring that traffic distribution conforms to the traffic characteristics and business objects of the target business, and guaranteeing the rationality and real-time nature of traffic distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708298B_ABST
    Figure CN116708298B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the field of cloud technology and financial technology, and relates to a traffic control method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining historical data of a target service through a big data framework cluster, wherein the historical data comprises historical static data and historical traffic data; inputting the historical data into a traffic policy model corresponding to the target service to obtain a traffic control gray policy of the target service; obtaining the traffic control gray policy through a gateway server, receiving an access request related to the target service through the gateway server, and routing the access request through the gateway server based on the traffic control gray policy. In addition, the application also relates to blockchain technology, and the traffic control gray policy can be stored in a blockchain. The application improves the accuracy of traffic distribution and traffic control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of cloud technology and fintech, and more particularly to a flow control method, apparatus, computer equipment, and storage medium. Background Technology

[0002] Traffic distribution via gateways is a common practice in cloud computing, frequently used in canary releases and load balancing in scenarios such as commerce, shopping, and advertising. Typically, developers write traffic distribution strategies and upload them to the gateway server, which then distributes and controls traffic according to the defined strategy, routing requests to the appropriate processing nodes.

[0003] When developers write traffic distribution strategies, they often rely on subjective experience and their own understanding. This can lead to strategies that lack representativeness, are not accepted by the majority of users, or fail to meet actual needs. If these problems occur during the release and promotion of a product or service, traffic cannot be distributed reasonably and accurately, failing to meet the needs of the vast majority of users, and further hindering the accurate release and promotion of the product or service. Summary of the Invention

[0004] The purpose of this application is to provide a flow control method, apparatus, computer device, and storage medium to improve the accuracy of flow distribution and flow control.

[0005] To address the aforementioned technical problems, this application provides a flow control method, employing the following technical solution:

[0006] Historical data of the target business is obtained through a big data framework cluster, including historical static data and historical traffic data.

[0007] The historical data is input into the traffic strategy model corresponding to the target service to obtain the traffic control grayscale strategy for the target service.

[0008] The traffic control grayscale policy is obtained through the gateway server, and access requests related to the target service are received through the gateway server.

[0009] Based on the traffic control canary release strategy, the access request is routed through the gateway server.

[0010] To address the aforementioned technical problems, this application also provides a flow control device, which employs the following technical solution:

[0011] The data acquisition module is used to acquire historical data of the target business through a big data framework cluster. The historical data includes historical static data and historical traffic data.

[0012] The strategy generation module is used to input the historical data into the traffic strategy model corresponding to the target service to obtain the traffic control grayscale strategy for the target service.

[0013] The policy acquisition module is used to acquire the traffic control grayscale policy through the gateway server and receive access requests related to the target service through the gateway server.

[0014] The request routing module is used to route the access request through the gateway server based on the traffic control canary release strategy.

[0015] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:

[0016] Historical data of the target business is obtained through a big data framework cluster, including historical static data and historical traffic data.

[0017] The historical data is input into the traffic strategy model corresponding to the target service to obtain the traffic control grayscale strategy for the target service.

[0018] The traffic control grayscale policy is obtained through the gateway server, and access requests related to the target service are received through the gateway server.

[0019] Based on the traffic control canary release strategy, the access request is routed through the gateway server.

[0020] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:

[0021] Historical data of the target business is obtained through a big data framework cluster, including historical static data and historical traffic data.

[0022] The historical data is input into the traffic strategy model corresponding to the target service to obtain the traffic control grayscale strategy for the target service.

[0023] The traffic control grayscale policy is obtained through the gateway server, and access requests related to the target service are received through the gateway server.

[0024] Based on the traffic control canary release strategy, the access request is routed through the gateway server.

[0025] Compared with existing technologies, the embodiments of this application have the following main advantages: Historical data of the target business is obtained through a big data framework cluster, including historical static data and historical traffic data; the historical data is input into a traffic strategy model corresponding to the target business, and the traffic strategy model analyzes and calculates the historical data to output a traffic control gray-scale strategy suitable for the target business in real time; the traffic control gray-scale strategy is obtained through a gateway server, and access requests related to the target business are received; the gateway server routes the access requests based on the traffic control gray-scale strategy, ensuring that traffic distribution conforms to the traffic characteristics and business objects in the target business, thereby improving the accuracy of traffic control. Attached Figure Description

[0026] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0028] Figure 2 This is a flowchart of one embodiment of the flow control method according to this application;

[0029] Figure 3 This is a schematic diagram of the structure of one embodiment of the flow control device according to this application;

[0030] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0032] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0034] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0035] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0036] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0037] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0038] It should be noted that the flow control method provided in this application embodiment is generally executed by the server, and correspondingly, the flow control device is generally set in the server.

[0039] It should be understood that Figure 1The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0040] Continue to refer to Figure 2 A flowchart of an embodiment of the flow control method according to this application is shown. The flow control method includes the following steps:

[0041] Step S201: Obtain historical data of the target business through the big data framework cluster. The historical data includes historical static data and historical traffic data.

[0042] In this embodiment, the flow control method operates on an electronic device (e.g., Figure 1 The server shown can communicate with the terminal device via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections, and other currently known or future known wireless connection methods.

[0043] Specifically, this application sets up a big data framework cluster. In one embodiment, the big data framework cluster is implemented based on Spark (Apache Spark, a fast and general-purpose computing engine designed for large-scale data processing, and an open-source general-purpose parallel framework similar to Hadoop MapReduce).

[0044] The big data framework cluster acquires historical data of the target business. The traffic control method in this application can be used in various scenarios (e.g., commerce, shopping, advertising, development) for actual business operations, such as version releases and information push notifications. The target business is the currently being processed business. The business has historical data, which can be existing data generated in the past. Historical data includes historical static data and historical traffic data; historical static data can be data that serves as attributes within the business, involving business objects. For example, in information push notifications, customer attribute information and basic information are used as historical static data. Historical traffic data refers to data generated during business operation through network requests, information sending and receiving, and other interactive behaviors, such as data generated by customer orders during shopping festivals or data generated when customers browse products through a shopping application.

[0045] Step S202: Input historical data into the traffic strategy model corresponding to the target service to obtain the traffic control grayscale strategy for the target service.

[0046] Specifically, this application sets up a corresponding traffic strategy model for each type of business. The traffic strategy model is business-specific, with different businesses having different traffic strategy models. The traffic strategy model can analyze and calculate based on historical data for each business, thereby outputting a traffic control gray-scale strategy adapted to that business. For example, in e-commerce marketing, customer traffic varies greatly at different times. The traffic strategy model analyzes historical data to determine the temporal distribution characteristics of traffic, thus outputting a traffic control gray-scale strategy for e-commerce marketing. This strategy can effectively respond to changes in customer traffic in terms of traffic distribution and control.

[0047] Traffic strategy models can be built based on artificial intelligence models, rule bases, and statistical models.

[0048] The big data framework cluster inputs the acquired historical data into the traffic strategy model corresponding to the target business and performs big data calculations to obtain the traffic control grayscale strategy for the target business.

[0049] Step S203: Obtain the traffic control grayscale policy through the gateway server, and receive access requests related to the target business through the gateway server.

[0050] Specifically, in this application, traffic distribution is performed by a gateway server. The gateway server obtains the traffic control gray-scale policy calculated by the big data framework cluster and receives access requests related to the target business. All access requests related to the business need to pass through the gateway server, and the gateway server routes the requests.

[0051] Understandably, as business history data is constantly updated over time, the big data framework cluster can acquire the latest historical data in real time or periodically, calculate the latest traffic control grayscale strategy based on the latest historical data, and obtain the latest traffic control grayscale strategy from the gateway server, thereby achieving the accuracy and real-time performance of traffic control.

[0052] Step S204: Based on the traffic control canary release strategy, the access requests are routed through the gateway server.

[0053] Specifically, the traffic control canary policy instructs the gateway server on how to distribute and route access requests. Since the traffic control policy is generated based on the historical data of the target business, it has high adaptability to the traffic characteristics and business objects of the target business, enabling the gateway server to distribute and process access requests reasonably and accurately, thereby improving the accuracy of traffic control.

[0054] In this embodiment, historical data of the target business is obtained through a big data framework cluster. The historical data includes historical static data and historical traffic data. The historical data is input into a traffic strategy model corresponding to the target business. The traffic strategy model analyzes and calculates the historical data and can output a traffic control gray-scale strategy suitable for the target business in real time. The traffic control gray-scale strategy is obtained through a gateway server, and access requests related to the target business are received. The gateway server routes the access requests based on the traffic control gray-scale strategy, so that the traffic distribution conforms to the traffic characteristics and business objects in the target business, thereby improving the accuracy of traffic control.

[0055] Furthermore, step S202 above may include: obtaining a traffic strategy model corresponding to the target business, the traffic strategy model including multiple sub-models, each sub-model having a weight, and the weight of each sub-model being determined by the business type of the target business; preprocessing historical data through a big data framework cluster to obtain processed historical data, wherein the preprocessing includes calculating the object profile of the business object in the target business; and inputting the processed historical data into the traffic strategy model to obtain the traffic control grayscale strategy for the target business.

[0056] Specifically, a traffic strategy model corresponding to the target business is obtained. This model comprises multiple sub-models, each with a weight, determined by the business type of the target business. That is, the weights of the sub-models in the traffic strategy model change depending on the specific business. For example, in the catering business of a large chain restaurant company, the sub-models and their weights in the traffic strategy model are: Time Sub-model (70%), Region Sub-model (10%), Quantitative Sub-model (10%), and User Behavior Sub-model (10%). In the apparel e-commerce business of an apparel e-commerce company, the sub-models and their weights are: Time Sub-model (20%), Region Sub-model (10%), Quantitative Sub-model (10%), and User Behavior Sub-model (60%). Different sub-models can analyze and calculate data from different dimensions in historical data. The weights represent the weight and importance of the corresponding elements (e.g., time, user behavior) in generating the traffic control grayscale strategy.

[0057] The big data framework cluster also needs to preprocess historical data according to a pre-defined preprocessing strategy. Preprocessing is the initial processing of historical data, resulting in processed historical data. Business operations involve business objects; for example, in the aforementioned apparel e-commerce business, customers are the business objects. A crucial step in preprocessing is calculating the object profile of these business objects. The object profile can include object attributes and object behaviors. For example, object attributes can include the customer's age, gender, region, and occupation; object behaviors include the type, duration, and frequency of content viewed by the customer. Calculating object profiles facilitates subsequent analysis of business objects and helps improve the accuracy of traffic control and gray-scale strategies.

[0058] The processed historical data is input into the traffic strategy model. The traffic strategy model can analyze and process the processed data from dimensions such as artificial intelligence, rules and inductive statistics to obtain the traffic control grayscale strategy for the target business.

[0059] In this embodiment, a traffic strategy model corresponding to the target business is obtained. The traffic strategy model includes multiple sub-models, each with a weight. The weight of each sub-model is determined by the business type of the target business. The weight represents the weight and importance of the corresponding element in the sub-model when generating the traffic control grayscale strategy, thereby ensuring the accuracy of the strategy calculation. Historical data is preprocessed to obtain processed historical data. The preprocessing includes calculating the object profile of the business object in the target business, which helps to perform big data analysis on the business object. The processed historical data is input into the traffic strategy model to obtain an accurate and reasonable traffic control grayscale strategy.

[0060] Furthermore, if the gateway server is built on OpenResty, the steps described above for obtaining traffic control canary policies through the gateway server may include: monitoring the policy database through the gateway server; when the traffic control canary policies in the policy database are updated, obtaining the latest traffic control canary policies from the policy database through the gateway server; and adding the obtained traffic control canary policies to the Lua of the gateway server to update the traffic control canary policies in the gateway server.

[0061] Specifically, the gateway server is built on OpenResty, also known as ngx_openresty, which is a high-performance web platform based on Nginx and Lua. It integrates a large number of Lua libraries, third-party modules, and most of the dependencies, and can act as a proxy routing service.

[0062] The traffic control canary deployment policies computed by the big data framework cluster can be stored in a policy database, which can be a Redis database. The gateway server monitors the policy database in real time. When an update is detected in the policy database, it retrieves the latest traffic control canary deployment policy from the database. The latest traffic control canary deployment policy is added to the gateway server's Lua library, replacing the old traffic control canary deployment policy for the target business in the Lua library, thus updating the traffic control canary deployment policies in the gateway server. Traffic control canary deployment policies can also be implemented as Lua packages, allowing for the creation of custom traffic control canary deployment policies.

[0063] In this embodiment, the gateway server can be built on OpenResty. The gateway server monitors the policy database and obtains the latest traffic control canary policies. The obtained traffic control canary policies are added to the gateway server's Lua, which can update the traffic control canary policies in the gateway server in a timely manner. A unique traffic control canary policy can be implemented through a custom-implemented Lua package.

[0064] Furthermore, step S204 above may include: obtaining the influence factors of traffic control in the target service; selecting the currently applicable sub-strategy from each candidate sub-strategy in the traffic control grayscale strategy according to the influence factors; and routing the access request through the gateway server based on the selected sub-strategy.

[0065] Specifically, this application can periodically update the traffic control canary release strategy to maintain its accuracy and adaptability to actual business operations. The traffic control canary release strategy can also have multiple candidate sub-strategies, each with a specific use case or timing, ensuring that the traffic control canary release strategy can cover various actual business situations. Here, the use case or timing can be considered as an influencing factor.

[0066] The influencing factors affecting traffic control in the target business are predetermined. The process involves obtaining these influencing factors; selecting the applicable sub-strategy from the candidate sub-strategies in the traffic control gray-scale strategy based on these factors; and then routing access requests through the gateway server according to the selected sub-strategy. For example, as mentioned earlier, in the catering business, due to the time-based patterns of customer tableware consumption, access requests related to the catering business increase significantly during peak dining hours. At this time, the number of processing nodes in the catering business needs to be increased to support the massive access requests. Conversely, during off-peak dining hours, access requests related to the catering business decrease significantly, requiring a reduction in the number of processing nodes to achieve dynamic cost reduction. In the above example, time can be considered an influencing factor in the catering business. The number of processing nodes involved changes with different times, corresponding to different sub-strategies; different sub-strategies are used at different times to invoke different processing nodes.

[0067] Different business operations can be influenced by different factors, such as time / time period, region, number of specific objects, and behavior of business objects.

[0068] In this embodiment, the influencing factors of traffic control in the target service are obtained; based on the influencing factors, the applicable sub-strategy is selected from the traffic control gray-scale strategy; based on the selected sub-strategy, the access request is routed through the gateway server. The sub-strategy matches the actual current service, ensuring the accuracy of traffic control.

[0069] Furthermore, the steps described above for routing access requests through a gateway server based on the selected sub-policy may include: determining a processing node cluster according to the sub-policy, wherein the processing node cluster contains at least one processing node; determining a target processing node for processing the access request within the processing node cluster based on the sub-policy; and routing the access request to the target processing node through the gateway server so that the access request can be processed by the target processing node.

[0070] Specifically, different sub-strategies can correspond to different processing node clusters. Each processing node cluster contains at least one processing node and is used to process and respond to access requests from the target business. For example, in the catering business example above, different processing node clusters are selected at different times: a large processing node cluster is used during peak dining hours, and a small processing node cluster is used during off-peak dining hours.

[0071] For each specific access request, a target processing node needs to be selected in the processing node cluster according to the sub-policy. This node will then handle the specific access request, and the gateway server will route the access request to the target processing node.

[0072] In this embodiment, a processing node cluster is determined according to a sub-policy, limiting the processing nodes in the cluster to process the current access requests of the target service; based on the sub-policy, the target processing node corresponding to each specific access request is determined in the processing node cluster; the gateway server routes the access request to the target processing node, thereby realizing the processing of the access request and traffic control.

[0073] Furthermore, the steps for determining the processing node cluster based on the sub-policy may include: obtaining the processing node cluster of the previous time period; and, based on the sub-policy, adding, removing, or replacing processing nodes in the processing node cluster of the previous time period to obtain the currently applicable processing node cluster.

[0074] Specifically, the processing node cluster of the previous time period is obtained; the traffic control gray-scale policy is the latest policy, and the processing nodes in the processing node cluster of the previous time period are updated according to the currently applicable sub-policy. For example, processing nodes can be added, processing nodes can be removed to reduce the processing node cluster, or a certain processing node can be replaced to obtain the currently applicable processing node cluster.

[0075] For example, when using a canary release during version release, a traffic control canary release strategy is first generated based on the customer's existing data. According to this strategy, 50% of the traffic is distributed to processing node A, and the other 50% is distributed to processing node B. Processing node B can have the new functionality. After the initial release, incremental data is generated. Based on the incremental data, it is determined that the new functionality is working correctly, and a second release is performed. The traffic control canary release strategy for the second release needs to distribute 100% of the traffic to processing node B and processing node C (processing node C is a newly added node that performs the same functionality as processing node B). At this time, it is necessary to remove processing node A from the processing node cluster and add processing node C; or replace processing node A in the processing node cluster with processing node C.

[0076] In this embodiment, the processing node cluster of the previous time period is obtained; according to the sub-policy, the processing nodes in the processing node cluster of the previous time period are added, removed or replaced to update the processing node cluster and obtain the currently applicable processing node cluster, thus ensuring the accuracy of traffic control.

[0077] Furthermore, the above-mentioned step of determining the target processing node for processing access requests in the processing node cluster based on the sub-policy may include: when the sub-policy is a non-specific traffic splitting policy, randomly selecting a processing node in the processing node cluster as the target processing node for processing access requests; or, obtaining the performance evaluation value of each processing node in the processing node cluster, and selecting a processing node from the processing node cluster based on the performance evaluation value as the target processing node for processing access requests; when the sub-policy is a specific traffic splitting policy, determining the target processing node based on the sub-policy and the request parameters in the access request.

[0078] Specifically, it is necessary to determine which processing node to route the access request to based on the sub-policy, and that processing node will be the target processing node to process the access request.

[0079] Sub-strategies include two types: non-specific routing strategies and specific routing strategies. In non-specific routing strategies, there is no necessary correlation between the access request and the processing node. A processing node can be randomly selected from the processing node cluster as the target processing node. For example, in a catering business, there are five processing nodes in the processing node cluster, all of which perform the same function. Access requests can be randomly routed to one of these processing nodes.

[0080] In non-specific traffic distribution strategies, performance evaluation values ​​for each processing node in the cluster can be obtained. These values ​​can be numerical and measure the data processing performance of the node. They are positively correlated with the node's historical processing speed, hardware and software resource configuration, and negatively correlated with its current load. The processing node with the highest performance evaluation value can be selected as the target node to ensure fast processing of access requests. For example, in an apparel e-commerce business, all processing nodes in the cluster perform the same function. During specific periods such as shopping festivals, access requests may surge, potentially pushing the processing nodes to their performance limits and causing crashes or freezes. Therefore, it is necessary to select the processing node with the highest performance evaluation value each time to prevent any single node from becoming overloaded and crashing.

[0081] In a specific traffic routing strategy, access requests need to be processed by a specific processing node. For example, in a version release operation, some customers might access the new version while others access the old version, and the new and old versions might reside on different processing nodes. In this case, request parameters need to be extracted from the access requests, and the sub-policy specifies how to determine the target processing node based on the request parameters. In a version release operation, the customer identifier can be used as a request parameter. When it is determined, based on the sub-policy and the customer identifier, that a customer belongs to the target customer group for the new version, the access request is routed to the processing node where the new version resides.

[0082] In this embodiment, the sub-strategies include non-specific traffic diversion strategies and specific strategies. Different methods are used to determine the target processing node according to the different sub-strategies, which can effectively cope with various actual situations and ensure the accuracy of traffic control.

[0083] It should be emphasized that, in order to further ensure the privacy and security of the above-mentioned traffic control grayscale strategy, the above-mentioned traffic control grayscale strategy can also be stored in a blockchain node.

[0084] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0085] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0086] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0087] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0088] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0089] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a flow control device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0090] like Figure 3 As shown, the traffic control device 300 described in this embodiment includes: a data acquisition module 301, a policy generation module 302, a policy acquisition module 303, and a request routing module 304, wherein:

[0091] The data acquisition module 301 is used to acquire historical data of the target business through a big data framework cluster. The historical data includes historical static data and historical traffic data.

[0092] The strategy generation module 302 is used to input historical data into the traffic strategy model corresponding to the target service to obtain the traffic control grayscale strategy for the target service.

[0093] The policy acquisition module 303 is used to acquire traffic control canary policies through the gateway server and receive access requests related to the target business through the gateway server.

[0094] The request routing module 304 is used to route access requests through the gateway server based on the traffic control canary release strategy.

[0095] In this embodiment, historical data of the target business is obtained through a big data framework cluster. The historical data includes historical static data and historical traffic data. The historical data is input into a traffic strategy model corresponding to the target business. The traffic strategy model analyzes and calculates the historical data and can output a traffic control gray-scale strategy suitable for the target business in real time. The traffic control gray-scale strategy is obtained through a gateway server, and access requests related to the target business are received. The gateway server routes the access requests based on the traffic control gray-scale strategy, so that the traffic distribution conforms to the traffic characteristics and business objects in the target business, thereby improving the accuracy of traffic control.

[0096] In some optional implementations of this embodiment, the policy generation module 302 may include: a model acquisition submodule, a preprocessing submodule, and a policy generation submodule, wherein:

[0097] The model acquisition submodule is used to acquire the traffic strategy model corresponding to the target business. The traffic strategy model includes multiple sub-models, each with a weight, and the weight of each sub-model is determined by the business type of the target business.

[0098] The preprocessing submodule is used to preprocess historical data through a big data framework cluster to obtain processed historical data. The preprocessing includes calculating object profiles of business objects in the target business.

[0099] The strategy generation submodule is used to input processed historical data into the traffic strategy model to obtain the traffic control grayscale strategy for the target business.

[0100] In this embodiment, a traffic strategy model corresponding to the target business is obtained. The traffic strategy model includes multiple sub-models, each with a weight. The weight of each sub-model is determined by the business type of the target business. The weight represents the weight and importance of the corresponding element in the sub-model when generating the traffic control grayscale strategy, thereby ensuring the accuracy of the strategy calculation. Historical data is preprocessed to obtain processed historical data. The preprocessing includes calculating the object profile of the business object in the target business, which helps to perform big data analysis on the business object. The processed historical data is input into the traffic strategy model to obtain an accurate and reasonable traffic control grayscale strategy.

[0101] In some optional implementations of this embodiment, if the gateway server is built on OpenResty, then the policy acquisition module 303 may include: a database monitoring submodule, a policy acquisition submodule, and a policy update submodule, wherein:

[0102] The database monitoring submodule is used to monitor the policy database through the gateway server.

[0103] The policy acquisition submodule is used to retrieve the latest traffic control canary release policy from the policy database through the gateway server when the traffic control canary release policy in the policy database is updated.

[0104] The policy update submodule is used to add the acquired traffic control canary policies to the gateway server's Lua, so as to update the traffic control canary policies in the gateway server.

[0105] In this embodiment, the gateway server can be built on OpenResty. The gateway server monitors the policy database and obtains the latest traffic control canary policies. The obtained traffic control canary policies are added to the gateway server's Lua, which can update the traffic control canary policies in the gateway server in a timely manner. A unique traffic control canary policy can be implemented through a custom-implemented Lua package.

[0106] In some optional implementations of this embodiment, the request routing module 304 may include: a factor acquisition submodule, a strategy selection submodule, and a request routing submodule, wherein:

[0107] The factor acquisition submodule is used to acquire the influencing factors of flow control in the target business.

[0108] The strategy selection submodule is used to select the currently applicable sub-strategy from the candidate sub-strategies in the traffic control grayscale strategy based on the influence factor.

[0109] The request routing submodule is used to route access requests through the gateway server based on the selected sub-policy.

[0110] In this embodiment, the influencing factors of traffic control in the target service are obtained; based on the influencing factors, the applicable sub-strategy is selected from the traffic control gray-scale strategy; based on the selected sub-strategy, the access request is routed through the gateway server. The sub-strategy matches the actual current service, ensuring the accuracy of traffic control.

[0111] In some optional implementations of this embodiment, the request routing submodule may include: a cluster determination unit, a node determination unit, and a request routing unit, wherein:

[0112] The cluster determination unit is used to determine the processing node cluster according to the sub-policy, and the processing node cluster contains at least one processing node.

[0113] The node determination unit is used to determine the target processing node for handling access requests in the processing node cluster based on the sub-policy.

[0114] The request routing unit is used to route access requests to the target processing node through the gateway server, so that the access requests can be processed by the target processing node.

[0115] In this embodiment, a processing node cluster is determined according to a sub-policy, limiting the processing nodes in the cluster to process the current access requests of the target service; based on the sub-policy, the target processing node corresponding to each specific access request is determined in the processing node cluster; the gateway server routes the access request to the target processing node, thereby realizing the processing of the access request and traffic control.

[0116] In some optional implementations of this embodiment, the cluster determination unit may include: a cluster acquisition subunit and a cluster update subunit, wherein:

[0117] The cluster acquisition sub-unit is used to retrieve the processing node cluster of the previous time period.

[0118] The cluster update sub-unit is used to add, remove, or replace processing nodes in the processing node cluster of the previous time period according to the sub-policy to obtain the currently applicable processing node cluster.

[0119] In this embodiment, the processing node cluster of the previous time period is obtained; according to the sub-policy, the processing nodes in the processing node cluster of the previous time period are added, removed or replaced to update the processing node cluster and obtain the currently applicable processing node cluster, thus ensuring the accuracy of traffic control.

[0120] In some optional implementations of this embodiment, the node determination unit may include: a random selection subunit, a performance selection subunit, and a node determination subunit, wherein:

[0121] Randomly select sub-units to randomly select processing nodes from the processing node cluster when the sub-strategy is a non-specific traffic splitting strategy, and use them as the target processing nodes for processing access requests.

[0122] The performance selection subunit is used to obtain the performance evaluation value of each processing node in the processing node cluster, so as to select a processing node from the processing node cluster based on the performance evaluation value as the target processing node for processing access requests.

[0123] The node determination sub-unit is used to determine the target processing node based on the sub-policy and the request parameters in the access request when the sub-policy is a specific traffic diversion policy.

[0124] In this embodiment, the sub-strategies include non-specific traffic diversion strategies and specific strategies. Different methods are used to determine the target processing node according to the different sub-strategies, which can effectively cope with various actual situations and ensure the accuracy of traffic control.

[0125] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4This is a basic structural block diagram of the computer device in this embodiment.

[0126] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0127] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0128] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for flow control methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0129] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the flow control method.

[0130] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0131] The computer device provided in this embodiment can execute the above-described flow control method. The flow control method here can be any of the flow control methods described in the various embodiments above.

[0132] In this embodiment, historical data of the target business is obtained through a big data framework cluster. The historical data includes historical static data and historical traffic data. The historical data is input into a traffic strategy model corresponding to the target business. The traffic strategy model analyzes and calculates the historical data and can output a traffic control gray-scale strategy suitable for the target business in real time. The traffic control gray-scale strategy is obtained through a gateway server, and access requests related to the target business are received. The gateway server routes the access requests based on the traffic control gray-scale strategy, so that the traffic distribution conforms to the traffic characteristics and business objects in the target business, thereby improving the accuracy of traffic control.

[0133] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the flow control method described above.

[0134] In this embodiment, historical data of the target business is obtained through a big data framework cluster. The historical data includes historical static data and historical traffic data. The historical data is input into a traffic strategy model corresponding to the target business. The traffic strategy model analyzes and calculates the historical data and can output a traffic control gray-scale strategy suitable for the target business in real time. The traffic control gray-scale strategy is obtained through a gateway server, and access requests related to the target business are received. The gateway server routes the access requests based on the traffic control gray-scale strategy, so that the traffic distribution conforms to the traffic characteristics and business objects in the target business, thereby improving the accuracy of traffic control.

[0135] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0136] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A flow control method, characterized in that, Includes the following steps: Historical data of the target business is obtained through a big data framework cluster. The historical data includes historical static data and historical traffic data. The historical static data includes attribute information and basic information of the business object, and the historical traffic data includes data generated by the business through interactive behavior during runtime. The historical data is input into the traffic strategy model corresponding to the target business to obtain the traffic control grayscale strategy for the target business. The traffic strategy model includes multiple sub-models, each with a weight, and the weight of each sub-model is determined by the business type of the target business. The traffic strategy model is constructed based on an artificial intelligence model, a rule base, and a statistical model. The traffic control grayscale policy is obtained through the gateway server, and access requests related to the target service are received through the gateway server. Based on the traffic control canary strategy, the access request is routed through the gateway server, including obtaining the influence factor of traffic control in the target service, selecting the currently applicable sub-strategy from each candidate sub-strategy in the traffic control canary strategy according to the influence factor, and routing the access request through the gateway server based on the selected sub-strategy.

2. The flow control method according to claim 1, characterized in that, The step of inputting the historical data into the traffic strategy model corresponding to the target service to obtain the traffic control grayscale strategy for the target service includes: Obtain the traffic strategy model corresponding to the target service; The historical data is preprocessed through the big data framework cluster to obtain processed historical data, wherein the preprocessing includes calculating the object profile of the business object in the target business; The processed historical data is input into the traffic strategy model to obtain the traffic control grayscale strategy for the target service.

3. The flow control method according to claim 1, characterized in that, The gateway server is built on OpenResty, and the step of obtaining the traffic control canary deployment policy through the gateway server includes: Monitor the policy database through the gateway server; When the traffic control canary policy in the policy database is updated, the latest traffic control canary policy is obtained from the policy database through the gateway server. The acquired traffic control canary deployment policy is added to the gateway server's Lua to update the traffic control canary deployment policy in the gateway server.

4. The flow control method according to claim 1, characterized in that, The step of routing the access request through the gateway server based on the selected sub-policy includes: A processing node cluster is determined according to the sub-strategy, and the processing node cluster contains at least one processing node. Based on the sub-strategy, a target processing node for processing the access request is determined in the processing node cluster; The gateway server routes the access request to the target processing node, so that the target processing node can process the access request.

5. The flow control method according to claim 4, characterized in that, The step of determining the processing node cluster according to the sub-policy includes: Get the cluster of processing nodes from the previous time period; According to the sub-strategy, processing nodes in the processing node cluster of the previous time period are added, removed, or replaced to obtain the currently applicable processing node cluster.

6. The flow control method according to claim 4, characterized in that, The step of determining the target processing node for processing the access request in the processing node cluster based on the sub-policy includes: When the sub-strategy is a non-specific traffic splitting strategy, a processing node is randomly selected from the processing node cluster as the target processing node for processing the access request; or... Obtain the performance evaluation value of each processing node in the processing node cluster, and select a processing node from the processing node cluster based on the performance evaluation value as the target processing node for processing the access request; When the sub-policy is a specific traffic diversion policy, the target processing node is determined based on the sub-policy and the request parameters in the access request.

7. A flow control device, characterized in that, include: The data acquisition module is used to acquire historical data of the target business through a big data framework cluster. The historical data includes historical static data and historical traffic data. The historical static data includes attribute information and basic information of the business object, and the historical traffic data includes data generated by the business through interactive behavior during runtime. The strategy generation module is used to input the historical data into the traffic strategy model corresponding to the target business to obtain the traffic control grayscale strategy of the target business. The traffic strategy model includes multiple sub-models, each sub-model has a weight, and the weight of each sub-model is determined by the business type of the target business. The traffic strategy model is constructed based on artificial intelligence model, rule base and statistical model. The policy acquisition module is used to acquire the traffic control grayscale policy through the gateway server and receive access requests related to the target service through the gateway server. The request routing module is used to route the access request through the gateway server based on the traffic control canary policy. This includes obtaining the influence factor of traffic control in the target service, selecting the currently applicable sub-policy from each candidate sub-policy in the traffic control canary policy according to the influence factor, and routing the access request through the gateway server based on the selected sub-policy.

8. A computer device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the flow control method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions that, when executed by a processor, implement the steps of the flow control method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Load balancing method and device

    CN113840007A

  • Application gray release method and device

    CN115499504A