An interface traffic distribution control method, device, system and storage medium

CN115509905BActive Publication Date: 2026-10-13PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211152040.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2026-10-13
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

[0003]目前,系统后端在维护时,由于功能上的需要开发加入一些新数据接口,而取代旧数据接口是一个循序渐进的测试过程,需要新旧数据接口长时间的同时运行和测试,如要贸然直接替换掉旧数据接口但又极易由于新数据接口未经测试而造成线上问题

Benefits of technology

[0032]本发明提供一种接口流量分发控制方法,通过计数器、布隆过滤器和随机函数的组合应用,确定目标接口,从而确定接口流量的分发。能够实现引入部分流量进入新数据接口,测试一段时间再逐步放开,逐步通过高效率的接口测试实现用新数据接口替换旧数据接口;其数据流量的大小可以通过配置管理平台进行配置,并且可以随时调整;采用布隆过滤器确认是否经过客户请求,能够实现占用非常小的存储空间,100万客户仅需几M,节省资源并且过滤性能非常高,从而大大提高了测试效率,为系统后端接口的维护工作提供了方便。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115509905B_ABST
    Figure CN115509905B_ABST
Patent Text Reader

Abstract

The application provides an interface traffic distribution control method, device and system and a storage medium, and relates to the technical field of data maintenance of a system back end.The method comprises the following steps: obtaining a request instruction, determining whether a target interface through which data traffic enters is an old data interface by using a counter, confirming whether the data interface has undergone data request by using a Bloom filter if the target interface is not the old data interface, and determining the target interface by using a random function if the data interface has not undergone data request.The method provided by the application can realize the following steps: introducing part of the traffic into a new data interface, testing for a period of time, gradually releasing, gradually replacing the old data interface with the new data interface through efficient interface testing, and greatly improving the testing efficiency, thereby providing convenience for the maintenance work of the system back end interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data maintenance technology for system backends, and more specifically, to an interface traffic distribution control method, apparatus, system, and storage medium. Background Technology

[0002] An interface is a reference type that defines a contract. A system interface is an interface between a decision support system and other software systems, set up to efficiently invoke the functions of an existing external system.

[0003] Currently, during system backend maintenance, some new data interfaces are added due to functional needs. Replacing the old data interfaces is a gradual testing process that requires both the old and new data interfaces to run and be tested simultaneously for a long time. If the old data interfaces are replaced directly without testing, it is very easy to cause online problems because the new data interfaces have not been tested.

[0004] If the test runs for a long time, the data of both the old and new interfaces will need to be maintained by the operations and maintenance personnel when the test goes live, which results in low testing efficiency and a time-consuming and labor-intensive testing process. Summary of the Invention

[0005] In view of this, and to address the aforementioned technical problems, the present invention provides an interface traffic distribution control method, applied to the data traffic distribution control of new and old data interfaces, comprising:

[0006] Obtain the client's data traffic request instruction, and use a counter to determine whether the target interface into which the data traffic is about to enter is the old data interface;

[0007] If the target interface to which the data traffic is about to enter is not the old data interface, then a Bloom filter is used to confirm whether the target interface to which the data traffic is about to enter has been processed by the client's data request.

[0008] If no data request is made through the client, a random function determines whether the data traffic will enter the new data interface or the old data interface, so that the data traffic can be distributed through the determined target interface.

[0009] Preferably, determining whether the target interface into which the data traffic is about to enter is the old data interface using a counter includes:

[0010] Obtain the current count of the counter;

[0011] Determine whether the current count has reached a preset counting threshold;

[0012] If the current count does not reach the preset count threshold, then the target interface is determined not to be the old data interface.

[0013] Preferably, after determining whether the current count has reached a preset counting threshold, the method further includes:

[0014] If the current count reaches the preset count threshold, then the target interface is determined to be the old data interface.

[0015] Preferably, the step of confirming through a Bloom filter whether the target interface to which the data traffic is about to enter has passed through the client's data request includes:

[0016] Determine whether the Bloom filter stores a customer number corresponding to the client;

[0017] If the Bloom filter does not contain a client number corresponding to the client, it is determined that the target interface into which the data traffic is about to enter has not received a data request from the client.

[0018] Preferably, after determining whether the Bloom filter stores a customer number corresponding to the client, the method further includes:

[0019] If the Bloom filter stores a client number corresponding to the client, it is determined that the target interface into which the data traffic is about to enter is the new data interface through the data request of the client.

[0020] Preferably, determining whether the target interface the data traffic will enter is the new data interface or the old data interface using a random function includes:

[0021] Based on a preset random probability, a random result is generated using the random function.

[0022] The target interface into which the data traffic will enter is determined based on the random result.

[0023] If the target interface to which the data traffic is determined to enter is a new data interface, then the client's client number is stored in the Bloom filter, and a data traffic request instruction is generated to request the data traffic to be distributed through the new data interface.

[0024] Preferably, after determining the target interface into which the data traffic will enter based on the random result, the method further includes:

[0025] If the target interface into which the determined data traffic will enter is the old data interface, then the data traffic will be distributed through the old data interface.

[0026] Furthermore, to address the aforementioned problems, this invention also provides an interface traffic distribution control device, applied to the data traffic distribution control of new and old data interfaces, comprising:

[0027] The acquisition module is used to acquire the request instructions of the client's data traffic and to determine whether the target interface into which the data traffic is about to enter is the old data interface by using a counter;

[0028] The confirmation module is used to confirm, through a Bloom filter, whether the target interface to which the data traffic is about to enter has been requested by the client when the target interface is not the old data interface.

[0029] The determination module is used to determine, through a random function, whether the target interface to which the data traffic will enter is the new data interface or the old data interface when there is no data request from the client, so as to distribute the data traffic through the determined target interface.

[0030] In addition, to solve the above problems, the present invention also provides an interface traffic distribution control system, including a memory and a processor. The memory stores an interface traffic distribution control program, and the processor runs the interface traffic distribution control program to enable the interface traffic distribution control system to perform the interface traffic distribution control method as described above.

[0031] In addition, to solve the above problems, the present invention also provides a computer-readable storage medium storing an interface traffic distribution control program, which, when executed by a processor, implements the interface traffic distribution control method as described above.

[0032] This invention provides an interface traffic distribution control method. By combining a counter, a Bloom filter, and a random function, the target interface is determined, thereby determining the distribution of interface traffic. This method allows for the introduction of partial traffic into a new data interface, testing for a period, and then gradually releasing the traffic. Through efficient interface testing, the old data interface is gradually replaced with the new one. The amount of data traffic can be configured and adjusted at any time through a configuration management platform. Using a Bloom filter to confirm whether a request has been made by a client requires very little storage space—only a few megabytes for 1 million clients—saving resources while providing very high filtering performance, thus greatly improving testing efficiency and facilitating the maintenance of the system's backend interfaces. Attached Figure Description

[0033] Figure 1 This is a schematic diagram of the hardware operating environment involved in an embodiment of the interface traffic distribution control method of the present invention;

[0034] Figure 2 This is a flowchart illustrating the first embodiment of the interface traffic distribution control method of the present invention;

[0035] Figure 3 This is a detailed flowchart of step S100 in the second embodiment of the interface traffic distribution control method of the present invention;

[0036] Figure 4 This is a detailed flowchart of step S200 in the third embodiment of the interface traffic distribution control method of the present invention;

[0037] Figure 5 This is a detailed flowchart of step S300 in the fourth embodiment of the interface traffic distribution control method of the present invention;

[0038] Figure 6 This is a schematic diagram of the overall process of the interface traffic distribution control method of the present invention;

[0039] Figure 7 This is a schematic diagram of the module connections of the interface traffic distribution control device of the present invention.

[0040] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0041] The embodiments of the present invention are described in detail below, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.

[0042] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0043] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0044] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0045] like Figure 1 The diagram shown is a structural schematic of the hardware operating environment of the terminal involved in an embodiment of the present invention.

[0046] The interface traffic distribution control system of this invention can be a PC, or a mobile terminal device such as a smartphone, tablet, or laptop. The interface traffic distribution control system may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, an input unit such as a keyboard, or a remote control; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory, such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001. Optionally, the interface traffic distribution control system may also include RF (Radio Frequency) circuitry, audio circuitry, a Wi-Fi module, etc. In addition, this interface flow distribution control system can also be configured with other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, which will not be elaborated here.

[0047] Those skilled in the art will understand that Figure 1 The interface traffic distribution control system shown is not intended to limit it and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Figure 1 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a data interface control program, a network connection program, and an interface traffic distribution control program.

[0048] In summary, the method proposed in this invention determines the target interface and thus the distribution of interface traffic through the combined application of counters, Bloom filters, and random functions. It enables the introduction of partial traffic into a new data interface, testing for a period, and then gradually releasing the new traffic, gradually replacing the old data interface with the new one through efficient interface testing. The amount of data traffic can be configured through a configuration management platform and adjusted at any time. Using a Bloom filter to confirm whether a customer request has been received results in very low storage space usage—only a few megabytes are needed for 1 million customers—saving resources while providing very high filtering performance, thus greatly improving testing efficiency and facilitating the maintenance and debugging of system backend interfaces.

[0049] Example 1:

[0050] Reference Figure 2 The first embodiment of the present invention provides an interface traffic distribution control method, applied to the data traffic distribution control of new data interfaces and old data interfaces, including:

[0051] Step S100: Obtain the request instruction of the client's data traffic, and determine whether the target interface into which the data traffic is about to enter is the old data interface by using a counter;

[0052] It's important to note that an interface refers to a reference type that defines a contract. Other types implement interfaces to ensure they support certain operations. An interface specifies members that must be provided by a class or other interfaces that implement it. Similar to classes, interfaces can contain methods, properties, indexers, and events as members.

[0053] It should be noted that the system interface is the interface between the decision support system and other software systems, which is set up to effectively call the functions of existing external systems.

[0054] Currently, during system backend maintenance, some new data interfaces are added due to functional needs. Replacing the old data interfaces is a gradual testing process that requires both the old and new data interfaces to run and be tested simultaneously for a long time. If the old data interfaces are replaced directly without testing, it is very easy to cause online problems because the new data interfaces have not been tested.

[0055] If the test runs for a long time, the data of both the old and new interfaces will need to be maintained by the operations and maintenance personnel when the test goes live, which results in low testing efficiency and a time-consuming and labor-intensive testing process.

[0056] As mentioned above, counting is a very simple and basic operation. A counter is a logical scheme to implement this operation. In digital systems, counters are mainly used to count quantities in order to achieve the functions of measurement, counting and control.

[0057] In the above embodiment, a counter is used to determine the target interface for incoming data traffic. The determination method can be to count the amount of data using the counter and further determine whether the amount of data has reached its peak.

[0058] As mentioned above, the client is the end that sends the request command for data traffic. By sending the request command, the client further uses a counter to determine the target interface into which the data traffic corresponding to the request command enters.

[0059] The target interface mentioned above is the interface into which the data traffic will enter.

[0060] The new data interface and the old data interface mentioned above are both data interfaces built in the platform system backend.

[0061] The target interface mentioned above can be either a new data interface or an old data interface.

[0062] Step S200: If the target interface to which the data traffic is about to enter is not the old data interface, then a Bloom filter is used to confirm whether the target interface to which the data traffic is about to enter has been processed by the client's data request.

[0063] The above process first uses a counter to determine the target interface and whether it is an old data interface.

[0064] If the above is not a data interface, the program proceeds to the next step, which is to confirm the data interface through a Bloom filter.

[0065] It's worth noting that the Bloom filter was proposed by Bloom in 1970. It's essentially a long binary vector and a series of random mapping functions. A Bloom filter can be used to check if an element is in a set. Its advantages are significantly better space efficiency and query time compared to general algorithms; its disadvantages include a certain false positive rate and difficulty in deletion.

[0066] To determine if an element is in a set, the common approach is to store all elements and then compare them. Linked lists, trees, and other data structures follow this logic. However, as the number of elements in the set increases, the required storage space grows larger, and the retrieval speed slows down (O(n), O(logn)). Alternatively, there is a hash table data structure. It uses a hash function to map an element to a point in a bit array. Thus, by checking if the bit is 1, we can determine if the element is in the set. This is the basic idea behind a Bloom filter.

[0067] The problem with hash tables is collisions. Assuming a good hash function, if the bit array length is m points, then to reduce the collision rate to, for example, 1%, this hash table can only hold m / 100 elements. Clearly, this is not space-efficient. The solution is to use multiple hashes. If one of the hashes indicates that the element is not in the set (i.e., it does not exist), and all hashes indicate that the element exists, although there is some error, the probability is low.

[0068] Step S300: If no data request has been made by the client, the target interface to which the data traffic will enter is determined by a random function to be either the new data interface or the old data interface, so as to distribute the data traffic through the determined target interface.

[0069] The above uses a Bloom filter to determine whether the client made a request. If no request was made, the next step is to determine the interface using a random function.

[0070] As mentioned above, the target interface is determined by a random function, that is, by a certain random probability. It may be an old data interface or a new data interface, but the probability is different for each case.

[0071] In summary, the proposed method in this embodiment uses a combination of counters, Bloom filters, and random functions to determine the target interface and thus the distribution of interface traffic. It enables the introduction of partial traffic into a new data interface, testing for a period, and then gradually releasing the new traffic, gradually replacing the old data interface with the new one through efficient interface testing. The amount of data traffic can be configured through a configuration management platform and adjusted at any time. Using a Bloom filter to confirm whether a client request has been received results in very low storage space usage—only a few megabytes are needed for 1 million clients—saving resources while providing very high filtering performance, thus greatly improving testing efficiency and facilitating the maintenance and debugging of system backend interfaces.

[0072] Example 2:

[0073] Reference Figure 3 The second embodiment of the present invention provides an interface traffic distribution control method based on the above embodiment 1. In step S100, determining whether the target interface into which the data traffic is about to enter is the old data interface using a counter includes:

[0074] Step S110: Obtain the current count of the counter;

[0075] The counter mentioned above stores the current count, which counts the incoming data traffic.

[0076] Step S120: Determine whether the current count has reached a preset count threshold;

[0077] The above-mentioned current count obtained through the counter is compared with the preset counting threshold. Numerically, there are three possible scenarios:

[0078] 1. Current count > preset count threshold;

[0079] 2. Current count = preset count threshold;

[0080] 3. The current count is less than the preset count threshold.

[0081] In the above scenario, if cases 1 (current count > preset count threshold) and 2 (current count = preset count threshold) occur, it indicates that the current count has reached the preset count threshold. Otherwise, if the current count < preset count threshold occurs, it means that the current count has not reached the preset count threshold.

[0082] Step S130: If the current count does not reach the preset count threshold, then it is determined that the target interface is not the old data interface.

[0083] As mentioned above, if the current count is less than the preset count threshold (i.e., the current count has not reached the preset count threshold), then the target interface is determined not to be an old data interface. However, data traffic is not limited to such old data interfaces.

[0084] Furthermore, after determining whether the current count has reached a preset counting threshold, step S120 further includes:

[0085] Step S140: If the current count reaches the preset count threshold, then the target interface is determined to be the old data interface.

[0086] As mentioned above, if the current count is greater than or equal to the preset count threshold, that is, the current count has reached the preset count threshold, then it can be determined that the target interface that the data traffic is about to enter is the old data interface, and the data traffic can further enter through the old data interface.

[0087] In this embodiment, a counter is used to determine whether the target interface into which the data traffic is about to enter is the old data interface. Specifically, if the current count is less than a preset count threshold, the target interface is not an old data interface. The data traffic is not limited to the old data interface; if the current count is greater than or equal to the preset count threshold, that is, the current count has reached the preset count threshold, the target interface can be determined to be an old data interface, and the data traffic can enter through the old data interface.

[0088] Example 3:

[0089] Reference Figure 4 The third embodiment of the present invention provides an interface traffic distribution control method. Based on the above embodiment 1, in step S200, confirming whether the target interface to which the data traffic is about to enter has passed the data request from the client through a Bloom filter includes:

[0090] Step S210: Determine whether the Bloom filter stores a customer number corresponding to the client.

[0091] As mentioned above, in the counter technology, if the upper limit is not reached, the data traffic is allowed to pass through a Bloom filter for judgment.

[0092] The above uses a Bloom filter to determine whether a customer number has already been stored.

[0093] If a customer ID is stored, it means that the customer's data traffic has already been requested.

[0094] If the customer ID is stored but not present in the Bloom filter, it means the customer has never made a request.

[0095] Step S220: If there is no client number corresponding to the client in the Bloom filter, it is determined that the target interface into which the data traffic is about to enter has not received a data request from the client.

[0096] Furthermore, in step S210, if the Bloom filter does not contain a client number corresponding to the client, and it is determined that the target interface to which the data traffic is about to enter has not received a data request from the client, the step further includes:

[0097] Step S230: If the Bloom filter stores a client number corresponding to the client, then it is determined that the target interface into which the data traffic is about to enter is the new data interface through the data request of the client.

[0098] As mentioned above, if the Bloom filter stores a client number, it means that the client has already made a corresponding data request for data traffic, and the target interface can be determined as the new data interface.

[0099] In this embodiment, a Bloom filter is used for one-step determination. Specifically, the determination is made by checking whether the corresponding customer ID is stored in the Bloom filter. If the customer ID is stored, it means that the customer has requested data traffic; if the customer ID is not found, it means that no request has been made.

[0100] Example 4:

[0101] refer to Figure 5 The fourth embodiment of the present invention provides an interface traffic distribution control method. Based on the above embodiment 1, in step S300, determining whether the target interface into which the data traffic will enter is the new data interface or the old data interface through a random function includes:

[0102] Step S310: Based on a preset random probability, a random result is generated using the random function;

[0103] The above-mentioned random function is based on random probability, which is a preset probability value.

[0104] Step S320: Determine the target interface into which the data traffic will enter based on the random result;

[0105] The above-mentioned random probability is the probability that the target interface is either an old data interface or a new data interface, that is, the percentage probability of the traffic flowing into the interface that needs to be controlled this time.

[0106] As mentioned above, the random probability can be 5% of the traffic entering the new data interface.

[0107] Therefore, as mentioned above, the random function has only a 5% probability of producing a result that follows the new data interface.

[0108] Step S330: If the target interface into which the determined data traffic will enter is a new data interface, then the client number of the client is stored in the Bloom filter, and a data traffic request instruction is generated to request the distribution of data traffic through the new data interface.

[0109] Furthermore, after determining the target interface into which the data traffic will enter based on the random result, step S320 further includes:

[0110] Step S340: If the target interface into which the determined data traffic is to enter is the old data interface, then the data traffic is distributed through the old data interface.

[0111] As mentioned above, after the selection of the target interface based on random probability is determined, there will be two situations.

[0112] 1. The target interface is the new data interface; 2. The target interface is the old data interface.

[0113] As mentioned above, if the random probability determines that the data traffic goes through a new data interface, the customer number corresponding to the data traffic is further stored in a Bloom filter to indicate that the customer has already made a data traffic request.

[0114] Then, request a new data interface.

[0115] As mentioned above, if the data traffic with a certain random probability goes through the old data interface, then a request will be made for the old data interface.

[0116] In summary, in this embodiment, the proposed method determines the target interface by combining a counter, a Bloom filter, and a random function, thereby determining the distribution of interface traffic.

[0117] The method provided in this embodiment can introduce a portion of traffic into a new data interface, test it for a period of time, and then gradually release it. Through efficient interface testing, the old data interface can be replaced with the new data interface. The amount of data traffic can be configured through the configuration management platform and can be adjusted at any time. Using a Bloom filter to confirm whether a customer request has been made can achieve very small storage space usage, requiring only a few MB for 1 million customers, saving resources and providing very high filtering performance, thereby greatly improving testing efficiency and facilitating the maintenance of the system backend interface and the debugging of the system interface.

[0118] In addition, refer to Figure 6 This is a schematic diagram of the overall process of the interface traffic distribution control method provided in this embodiment. Figure 7 The interface traffic distribution control device provided in this embodiment is applied to the data traffic distribution control of new data interfaces and old data interfaces, including:

[0119] The acquisition module 10 is used to acquire the request instruction of the client's data traffic and determine whether the target interface into which the data traffic is about to enter is the old data interface by using a counter;

[0120] The confirmation module 20 is used to confirm, through a Bloom filter, whether the target interface to which the data traffic is about to enter has passed the client's data request when the target interface is not the old data interface.

[0121] The determination module 30 is used to determine, through a random function, whether the target interface to which the data traffic will enter is the new data interface or the old data interface when there is no data request from the client, so as to distribute the data traffic through the determined target interface.

[0122] Furthermore, this embodiment also provides an interface traffic distribution control system, including a memory and a processor. The memory stores an interface traffic distribution control program, and the processor runs the interface traffic distribution control program to enable the interface traffic distribution control system to perform the interface traffic distribution control method as described above.

[0123] In addition, this embodiment also provides a computer-readable storage medium storing an interface traffic distribution control program, which, when executed by a processor, implements the interface traffic distribution control method as described above.

[0124] In summary, this invention provides an interface traffic distribution control method, apparatus, system, and storage medium. The method includes: acquiring a data traffic request instruction from a client; determining, using a counter, whether the target interface the data traffic is about to enter is the old data interface; if the target interface the data traffic is about to enter is not the old data interface, then using a Bloom filter to confirm whether the target interface the data traffic is about to enter has been requested by the client; if it has not been requested by the client, then using a random function to determine whether the target interface the data traffic is about to enter is the new data interface or the old data interface, so as to distribute the data traffic through the determined target interface.

[0125] The method provided by this invention can introduce a portion of traffic into a new data interface, test it for a period of time, and then gradually release it, gradually replacing the old data interface with the new data interface through efficient interface testing; the amount of data traffic can be configured through a configuration management platform and can be adjusted at any time; using a Bloom filter to confirm whether a customer request has been made can achieve very small storage space usage, requiring only a few MB for 1 million customers, saving resources and providing very high filtering performance, thereby greatly improving testing efficiency and facilitating the maintenance of the system's backend interface.

[0126] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0127] 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 the present invention, 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) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention. The above are only preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An interface traffic distribution control method, applied to the data traffic distribution control of new and old data interfaces, characterized in that, include: The method involves obtaining a request command for data traffic from a client and using a counter to determine whether the target interface to which the data traffic is about to enter is the old data interface. Specifically, this includes: obtaining the current count of the counter; determining whether the current count has reached a preset count threshold; if the current count has not reached the preset count threshold, determining that the target interface is not the old data interface; and if the current count has reached the preset count threshold, determining that the target interface is the old data interface. If the target interface to which the data traffic is about to enter is not the old data interface, then a Bloom filter is used to confirm whether the target interface to which the data traffic is about to enter has been requested by the client. This includes: determining whether the Bloom filter stores a client number corresponding to the client; if the Bloom filter does not store a client number corresponding to the client, then it is determined that the target interface to which the data traffic is about to enter has not been requested by the client; if the Bloom filter stores a client number corresponding to the client, then it is determined that the target interface to which the data traffic is about to enter has been requested by the client, and the target interface is determined to be the new data interface. If no data request is received from the client, a random function determines whether the target interface the data traffic will enter is the new data interface or the old data interface, so that the data traffic can be distributed through the determined target interface. Determining whether the target interface the data traffic will enter is the new data interface or the old data interface through the random function includes: generating a random result based on a preset random probability using the random function; determining the target interface the data traffic will enter based on the random result; if the determined target interface is the new data interface, the client's client number is stored in the Bloom filter, and a data traffic request instruction is generated to request data traffic distribution through the new data interface.

2. The interface traffic distribution control method as described in claim 1, characterized in that, After determining the target interface into which the data traffic will enter based on the random result, the method further includes: If the target interface into which the determined data traffic will enter is the old data interface, then the data traffic will be distributed through the old data interface.

3. An interface traffic distribution control device, applied to the data traffic distribution control of new and old data interfaces, characterized in that, include: The acquisition module is used to acquire the request command of the client's data traffic, and to determine whether the target interface to which the data traffic is about to enter is the old data interface by using a counter. Specifically, it includes: acquiring the current count of the counter; determining whether the current count has reached a preset count threshold; if the current count has not reached the preset count threshold, determining that the target interface is not the old data interface; if the current count has reached the preset count threshold, determining that the target interface is the old data interface. The confirmation module is used to confirm, through a Bloom filter, whether the target interface to which the data traffic is about to enter has been requested by the client when the target interface is not the old data interface. This includes: determining whether the Bloom filter stores a client number corresponding to the client; if the Bloom filter does not store a client number corresponding to the client, then determining that the target interface to which the data traffic is about to enter has not been requested by the client; if the Bloom filter stores a client number corresponding to the client, then determining that the target interface to which the data traffic is about to enter has been requested by the client, and identifying the target interface as the new data interface. A determination module is used to determine, when no data request has been made by the client, whether the target interface to which the data traffic will enter is the new data interface or the old data interface, using a random function, so as to facilitate the distribution of data traffic through the determined target interface. The determination of whether the target interface to which the data traffic will enter is the new data interface or the old data interface using a random function includes: generating a random result based on a preset random probability using the random function; determining the target interface to which the data traffic will enter based on the random result; if the determined target interface to which the data traffic will enter is the new data interface, storing the client's client number in the Bloom filter and generating a data traffic request instruction to request the distribution of data traffic through the new data interface.

4. An interface traffic distribution control system, characterized in that, The system includes a memory and a processor. The memory stores an interface traffic distribution control program, and the processor runs the interface traffic distribution control program to cause the interface traffic distribution control system to perform the interface traffic distribution control method as described in any one of claims 1-2.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an interface traffic distribution control program, which, when executed by a processor, implements the interface traffic distribution control method as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Service control method and device, electronic equipment and readable storage medium

    CN112965836A

  • Pressure measurement data filtering method and device, storage medium and computer equipment

    CN114238052A