A method and device for realizing virtual number provider flow control based on random algorithm
By adopting a random algorithm-based traffic control method in the virtual number call system, the problem of unreasonable traffic allocation of virtual number suppliers is solved, and the rational allocation of resources and the improvement of virtual number call quality is achieved.
Patent Information
- Application Number
- CN202111183770.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-11
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-10-11
AI Technical Summary
The existing virtual number call method is in the environment of multiple virtual number suppliers, and the traffic allocation is unreasonable, resulting in some suppliers being overloaded while the other suppliers being idle and resource allocation is unreasonable.
Using a random algorithm-based method, by obtaining the load capacity of the virtual number supplier and the scale of the virtual number pool, setting the weights of each supplier, and dividing the natural number interval into related intervals that match the supplier's load capacity and the scale of the virtual number pool, the target supplier is randomly selected to achieve flow control.
Through the supplier selection of random algorithms, the reasonable allocation of virtual number resources is achieved, the suppliers are avoided overload or idle, the success rate and efficiency of virtual number acquisition are improved, and the quality of virtual number calls is improved.
Smart Images

Figure CN114173382B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flow control of virtual number providers, and in particular to a method and device for implementing flow control of virtual number providers based on a random algorithm. Background Art
[0002] Telecom providers can provide users with communication services using real phone numbers as well as virtual numbers. A virtual number is a real number resource of the same length in one of the provider's number segments. Virtual numbers are used in different situations than real phone numbers. When using virtual numbers, no additional actual entity user identity module (such as SIM card, UIM card, etc.) is required. In many scenarios, users have the need to use virtual numbers to answer calls or receive text messages to avoid leaking their real phone numbers. For example, virtual number calls are applied to online car-hailing services where drivers and passengers are strangers to each other.
[0003] In the online ride-hailing service, drivers and passengers can talk to each other by binding virtual numbers, reducing the risk of leakage of their real information. When the driver and passenger need to talk, the online ride-hailing platform obtains virtual numbers supplied by the supplier for both the driver and the passenger. After the driver and passenger bind their virtual numbers respectively, they can talk to each other to further communicate the service status of the online ride-hailing order.
[0004] However, after research in this field, the inventor found that in the existing virtual number call method, when there are multiple virtual number suppliers, the traffic distribution between virtual numbers is unreasonable, which easily causes some suppliers to be overloaded while other suppliers are idle, which is not conducive to the reasonable allocation of resources. If the average distribution method is adopted, there will be a gap in the virtual number supply capacity between suppliers, which is also not reasonable. For this reason, there is an urgent need for a method suitable for online car-hailing platforms that can more reasonably control the traffic of virtual number suppliers. Summary of the invention
[0005] In order to overcome the technical defect of unreasonable traffic allocation of virtual number providers mentioned above, the present invention provides a method and device for implementing virtual number provider traffic control based on a random algorithm.
[0006] In order to solve the above problems, the present invention is implemented according to the following technical solutions:
[0007] In a first aspect, the present invention discloses a method for implementing virtual number provider flow control based on a random algorithm, comprising the following steps:
[0008] Acquire virtual number provider data, the virtual number provider data including provider ID, provider name, provider load capacity, and size of the provider's corresponding virtual number pool;
[0009] The weight of each virtual number provider is set based on the load capacity of the virtual number provider and the size of the virtual number pool;
[0010] Setting a natural number interval, based on the number of suppliers and the weight of the suppliers, dividing the natural number interval into several associated intervals whose lengths match the supplier load capacity and the size of the virtual number pool;
[0011] Obtain online car-hailing order data, perform a virtual number call call caller and called number binding request instruction, and randomly generate a natural number from the natural number interval through a random algorithm;
[0012] Perform interval matching between natural numbers and associated intervals, and select the supplier associated with the hit associated interval as the target supplier;
[0013] Obtain a virtual number from the target supplier, bind the virtual number to the driver and passenger ends respectively, and establish a virtual number call between the driver and the passenger.
[0014] As a preferred implementation, after selecting the supplier associated with the hit associated interval as the target supplier, the method further includes:
[0015] Determine whether the target supplier can provide services normally;
[0016] If possible, obtain a virtual number from the target provider;
[0017] If not, the associated interval corresponding to the target supplier is set to a faulty state and updated to the faulty interval database.
[0018] As a preferred implementation, after the natural number is interval matched with the associated interval, the method further includes:
[0019] Determine whether the matching interval exists in the fault interval database;
[0020] If it does not exist, the supplier associated with the hit associated interval is selected as the target supplier;
[0021] If it exists, re-execute the steps of generating natural numbers and interval matching.
[0022] As a preferred implementation, the step of adjusting the interval length is further included, specifically including:
[0023] Obtain relevant data of the fault interval in the fault interval database, obtain the fault frequency and fault duration of the fault interval, shorten the length of the fault interval accordingly based on the fault frequency and fault duration, and correspondingly increase other stable associated intervals.
[0024] As a preferred implementation, the method further includes a fault interval troubleshooting step, specifically including:
[0025] The fault intervals in the fault interval database are obtained in sequence, virtual number acquisition tests are performed on the virtual number suppliers corresponding to the fault intervals in sequence, and the associated intervals corresponding to the suppliers whose virtual number supply services have been restored are removed from the fault interval database.
[0026] In a second aspect, the present invention discloses a device for implementing virtual number provider flow control based on a random algorithm, comprising:
[0027] A supplier acquisition module, used to acquire virtual number supplier data, wherein the virtual number supplier data includes supplier ID, supplier name, supplier load capacity and the size of the supplier's corresponding virtual number pool;
[0028] A weight setting module is used to set the weight of each virtual number provider based on the load capacity of the virtual number provider and the size of the virtual number pool;
[0029] An interval division module is used to set a natural number interval, and based on the number of suppliers and the weight of the suppliers, divide the natural number interval into a number of associated intervals whose lengths match the supplier load capacity and the size of the virtual number pool;
[0030] The random selection module is used to obtain online car-hailing order data, perform virtual number call calling and called number binding request instructions, and randomly generate a natural number from a natural number interval through a random algorithm;
[0031] An interval matching module is used to perform interval matching between natural numbers and associated intervals, and select the supplier associated with the hit associated interval as the target supplier;
[0032] The call establishment module is used to obtain a virtual number from a target supplier, bind the virtual numbers to the driver and passenger ends respectively, and establish a virtual number call between the driver and the passenger.
[0033] As a preferred implementation, when the interval matching module is running, it also executes:
[0034] Determine whether the target supplier can provide services normally;
[0035] If possible, obtain a virtual number from the target provider;
[0036] If not, the associated interval corresponding to the target supplier is set to a faulty state and updated to the faulty interval database.
[0037] As a preferred implementation, when the interval matching module is running, it also executes:
[0038] Determine whether the matching interval exists in the fault interval database;
[0039] If it does not exist, the supplier associated with the hit associated interval is selected as the target supplier;
[0040] If it exists, re-execute the steps of generating natural numbers and interval matching.
[0041] As a preferred implementation, it also includes:
[0042] The interval adjustment module is used to obtain relevant data of the fault interval in the fault interval database, obtain the fault frequency and fault duration of the fault interval, and shorten the length of the fault interval accordingly based on the fault frequency and fault duration, and correspondingly increase other stable associated intervals.
[0043] As a preferred implementation, it also includes:
[0044] The troubleshooting module is used to sequentially obtain the fault intervals in the fault interval database, sequentially perform virtual number acquisition tests on the virtual number suppliers corresponding to the fault intervals, and remove the associated intervals corresponding to the suppliers whose virtual number supply services have been restored from the fault interval database.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] The present invention performs random supplier selection through natural numbers generated by a random algorithm to achieve random selection of virtual number suppliers. Based on the load capacity of the virtual number supplier and the size of the virtual number pool, the associated interval of the virtual number supplier is correspondingly set, so that the probability that the random number falls into the management interval of the virtual number supplier with a strong load capacity and a large virtual number pool is increased, so as to reasonably allocate the resources of the virtual number supplier, so as to achieve flow control of the virtual number supplier through a random algorithm, so as to avoid the situation that the supplier is idle or overloaded, and to improve the success rate and efficiency of virtual number acquisition, so as to improve the quality of virtual number calls. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings, wherein:
[0048] Figure 1 It is a flow chart of the method for realizing virtual number provider flow control based on random algorithm of the present invention;
[0049] Figure 2 It is a schematic diagram of a device for realizing virtual number provider flow control based on a random algorithm according to the present invention. DETAILED DESCRIPTION
[0050] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0051] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0052] The access device and the server can be directly or indirectly connected through wired or wireless communication. The access device can be a terminal or a server. The target application is running on the access device. The target application is an application that can initiate data requests to the server, such as social applications, payment applications, game applications, etc. The server can be an application server that provides services for the target application, or a proxy server that is different from the application server corresponding to the target application. The server is used to identify whether each access device is a malicious device and intercept data messages from malicious devices. When the server is a proxy server, the proxy server forwards data messages that do not belong to malicious devices to the application server. The terminal can be a desktop terminal or a mobile terminal, and the mobile terminal can be a smart phone, a tablet computer, a laptop, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The server and the server can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms.
[0053] Example 1
[0054] like Figure 1 As shown, in a first aspect, an embodiment of the present invention discloses a method for implementing virtual number provider flow control based on a random algorithm, comprising the following steps:
[0055] Step S1: Acquire virtual number supplier data, wherein the virtual number supplier data includes supplier ID, supplier name, supplier load capacity and the size of the supplier's corresponding virtual number pool.
[0056] Step S2: Based on the load capacity of the virtual number provider and the size of the virtual number pool, the weight of each provider is set.
[0057] Specifically, the server analyzes the virtual number supplier data to obtain the supplier's load capacity and the size of the number pool. After mutual comparison, it generates a list of virtual number suppliers arranged in sequence, including the supplier's name and its corresponding load capacity, number pool size, and the stability provided by the virtual number. Based on the virtual number supplier list, weights are assigned to each virtual number supplier to obtain the weight corresponding to each virtual number supplier.
[0058] Step S3: Setting a natural number interval, and dividing the natural number interval into a number of associated intervals whose lengths match the supplier load capacity and the size of the virtual number pool based on the number of suppliers and the weight of the suppliers.
[0059] Specifically, the server pre-sets a natural number interval. In this embodiment, the preferred range of the natural number interval is 1-10000. The server obtains the number of suppliers from the supplier data, and divides the natural number interval equally based on the number of suppliers to form the number of intervals that match the supplier ID, and associates it with the virtual number supplier, so that each virtual number supplier has an associated interval. Based on the weight of the virtual number supplier, the length of its associated interval is adjusted in a targeted manner, while ensuring that the overall length of the natural number interval does not change. After the adjustment, an associated interval that matches the weight of each supplier is obtained.
[0060] Step S4: Obtain online car-hailing order data, perform a virtual number call calling and called number binding request instruction, and randomly generate a natural number from a natural number interval through a random algorithm.
[0061] Specifically, the server obtains the online car-hailing order data and the real numbers of the drivers and passengers in the online car-hailing service. When the driver and the passenger in the online car-hailing service need to make a call, the server issues a virtual number call calling and called number binding request instruction. The server randomly generates a natural number from a natural number interval through a random algorithm.
[0062] Step S5: Perform interval matching between the natural number and the associated interval, and select the supplier associated with the matched associated interval as the target supplier.
[0063] Specifically, after a natural number is generated, the natural number is matched with the associated intervals of each virtual number provider, and the virtual number provider corresponding to the associated interval matched by the natural number is the target provider. However, in some cases, the target provider may not be able to provide virtual number services normally. Therefore, as a preferred implementation, after the natural number is matched with the associated interval, the following is further included:
[0064] Determine whether the matching interval exists in the fault interval database;
[0065] If it does not exist, the supplier associated with the hit associated interval is selected as the target supplier;
[0066] If it exists, re-execute the steps of generating natural numbers and interval matching.
[0067] After selecting the supplier associated with the hit associated interval as the target supplier, the method further includes:
[0068] Determine whether the target supplier can provide services normally;
[0069] If possible, obtain a virtual number from the target provider;
[0070] If not, the associated interval corresponding to the target supplier is set to a faulty state and updated to the faulty interval database.
[0071] By setting up a fault interval database, faulty virtual number suppliers can be eliminated in a timely manner, thereby improving the reliability of virtual number services.
[0072] Step S6: Obtain a virtual number from the target supplier, and bind the virtual number to the driver and passenger ends respectively to establish a virtual number call between the driver and the passenger.
[0073] This embodiment preferably also includes:
[0074] Step S7: Obtain relevant data of the fault interval in the fault interval database, obtain the fault frequency and fault duration of the fault interval, shorten the length of the fault interval accordingly based on the fault frequency and fault duration, and correspondingly increase other stable associated intervals.
[0075] Step S8: sequentially obtain the fault intervals in the fault interval database, sequentially perform virtual number acquisition tests on the virtual number providers corresponding to the fault intervals, and remove the associated intervals corresponding to the providers whose virtual number provision services have been restored from the fault interval database.
[0076] By setting step S7 and step S8, the length of the associated interval of the virtual number provider is not fixed. When the stability of the virtual number provider changes, such as when a fault occurs and the virtual number service cannot be provided normally, the associated interval corresponding to the virtual number provider will temporarily enter the fault interval database. When the fault is repaired, it will be removed if it returns to normal. However, if the virtual number provider has service failures for a long time or frequently, it can be considered that the stability of the virtual number provider has been significantly reduced. The server will then specifically shorten the length of the associated interval of the virtual number provider. The more the stability is reduced, the more it will be shortened. For example, if the natural number interval is selected as 1-10000, while shortening the associated interval, the associated intervals of other suppliers whose stability has increased will be increased, and the total length of the natural number intervals will not change.
[0077] To summarize, the present invention performs random supplier selection through natural numbers generated by a random algorithm, thereby realizing random selection of virtual number suppliers. Based on the load capacity of the virtual number supplier and the size of the virtual number pool, the associated intervals of the virtual number supplier are set accordingly, thereby increasing the probability that the random number falls into the management interval of a virtual number supplier with a strong load capacity and a large virtual number pool size.
[0078] The present invention can realize automatic dynamic adjustment of management intervals by setting associated intervals of virtual number suppliers. When the stability of the virtual number supplier changes, the interval length will be adjusted in time to reduce the frequency of use of the virtual number supplier. The resources of the virtual number supplier can be reasonably allocated to control the flow of the virtual number supplier through a random algorithm to avoid the situation where the supplier is idle or overloaded. More stable virtual number suppliers will provide more services, thereby improving the success rate and efficiency of virtual number acquisition and improving the quality of virtual number calls.
[0079] For other steps of the method for implementing virtual number provider flow control based on a random algorithm described in this embodiment, refer to the prior art.
[0080] Example 2
[0081] like Figure 2 As shown, in the second aspect, an embodiment of the present invention discloses a device for implementing virtual number provider flow control based on a random algorithm, including a provider acquisition module M1, a weight setting module M2, an interval division module M3, a random selection module M4, an interval matching module M5 and a call establishment module M6, specifically:
[0082] The supplier acquisition module M1 is used to obtain virtual number supplier data, which includes supplier ID, supplier name, supplier load capacity and the size of the supplier's corresponding virtual number pool.
[0083] The weight setting module M2 is used to set the weight of each supplier based on the load capacity of the virtual number supplier and the size of the virtual number pool.
[0084] The interval division module M3 is used to set a natural number interval, and based on the number of suppliers and the weight of the suppliers, divide the natural number interval into a number of associated intervals whose lengths match the supplier load capacity and the size of the virtual number pool.
[0085] The random selection module M4 is used to obtain online car-hailing order data, perform virtual number call calling and called number binding request instructions, and randomly generate a natural number from a natural number interval through a random algorithm.
[0086] The interval matching module M5 is used to perform interval matching between natural numbers and associated intervals, and select the supplier associated with the hit associated interval as the target supplier.
[0087] The call establishment module M6 is used to obtain a virtual number from a target supplier, and bind the virtual numbers to the driver side and the passenger side respectively, so as to establish a virtual number call between the driver and the passenger.
[0088] This embodiment preferably also includes:
[0089] The interval adjustment module M7 is used to obtain relevant data of the fault interval in the fault interval database, obtain the fault frequency and fault duration of the fault interval, and shorten the length of the fault interval accordingly based on the fault frequency and fault duration, and correspondingly increase other stable associated intervals.
[0090] The fault troubleshooting module M8 is used to sequentially obtain the fault intervals in the fault interval database, sequentially perform virtual number acquisition tests on the virtual number suppliers corresponding to the fault intervals, and remove the associated intervals corresponding to the suppliers whose virtual number supply services have been restored from the fault interval database.
[0091] Further preferably, when the interval matching module M5 is running, it also executes:
[0092] Determine whether the matching interval exists in the fault interval database;
[0093] If it does not exist, the supplier associated with the hit associated interval is selected as the target supplier;
[0094] If it exists, re-execute the steps of generating natural numbers and interval matching.
[0095] Determine whether the target supplier can provide services normally;
[0096] If possible, obtain a virtual number from the target provider;
[0097] If not, the associated interval corresponding to the target supplier is set to a faulty state and updated to the faulty interval database.
[0098] When the device for implementing virtual number provider traffic control based on a random algorithm described in the embodiment of the present invention is running, all steps of the method for implementing virtual number provider traffic control based on a random algorithm described in Example 1 can be implemented to implement traffic control of the virtual number provider. By targeted setting of the interval length and selection of the random algorithm, the diversion of the virtual number provider can be made more reasonable, thereby improving the user experience of virtual number calls.
[0099] For other structures of the device for implementing virtual number provider flow control based on a random algorithm described in this embodiment, refer to the prior art.
[0100] Example 3
[0101] The present invention also discloses an electronic device, at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, and when the at least one processor executes the instructions, the following steps are specifically implemented: obtaining virtual number supplier data, the virtual number supplier data including supplier ID, supplier name, supplier load capacity and the size of the supplier's corresponding virtual number pool; setting the weight of each supplier based on the load capacity of the virtual number supplier and the size of the virtual number pool; setting a natural number interval, and dividing the natural number interval into a number of associated intervals whose lengths match the supplier load capacity and the size of the virtual number pool based on the number of suppliers and the weight of the suppliers; obtaining online car-hailing order data, performing a virtual number call calling and called number binding request instruction, and randomly generating a natural number from the natural number interval through a random algorithm; performing interval matching between the natural number and the associated interval, and selecting the supplier associated with the hit associated interval as the target supplier; obtaining a virtual number from the target supplier, and performing virtual number binding on the driver side and the passenger side respectively to establish a virtual number call between the driver and the passenger.
[0102] Example 4
[0103] The present invention also discloses a storage medium storing a computer program. When the computer program is executed by a processor, the following steps are specifically implemented: obtaining virtual number supplier data, the virtual number supplier data including supplier ID, supplier name, supplier load capacity and the size of the supplier's corresponding virtual number pool; setting the weight of each supplier based on the load capacity of the virtual number supplier and the size of the virtual number pool; setting a natural number interval, and dividing the natural number interval into a number of associated intervals whose lengths match the supplier load capacity and the size of the virtual number pool based on the number of suppliers and the weight of the suppliers; obtaining online car-hailing order data, performing a virtual number call calling and called number binding request instruction, and randomly generating a natural number from the natural number interval through a random algorithm; performing interval matching between the natural number and the associated interval, and selecting the supplier associated with the hit associated interval as the target supplier; obtaining a virtual number from the target supplier, and performing virtual number binding on the driver side and the passenger side respectively to establish a virtual number call between the driver and the passenger.
[0104] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0105] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0106] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0107] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, Java, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0108] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0109] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0110] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0111] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the above-mentioned module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0112] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for implementing virtual number provider flow control based on a random algorithm, characterized in that: The following steps are involved: Acquire virtual number provider data, the virtual number provider data including provider ID, provider name, provider load capacity, and size of the provider's corresponding virtual number pool; The weight of each virtual number provider is set based on the load capacity of the virtual number provider and the size of the virtual number pool; Setting a natural number interval, based on the number of suppliers and the weight of the suppliers, dividing the natural number interval into several associated intervals whose lengths match the supplier load capacity and the size of the virtual number pool; Obtain online car-hailing order data, perform a virtual number call call caller and called number binding request instruction, and randomly generate a natural number from the natural number interval through a random algorithm; Perform interval matching between natural numbers and associated intervals, and select the supplier associated with the hit associated interval as the target supplier; Obtain a virtual number from the target supplier, bind the virtual number to the driver and passenger ends respectively, and establish a virtual number call between the driver and the passenger.
2. The method for implementing virtual number provider flow control based on random algorithm according to claim 1 is characterized in that: After selecting the supplier associated with the hit associated interval as the target supplier, the method further includes: Determine whether the target supplier can provide services normally; If possible, obtain a virtual number from the target provider; If not, the associated interval corresponding to the target supplier is set to a faulty state and updated to the faulty interval database.
3. The method for realizing virtual number provider flow control based on random algorithm according to claim 2 is characterized in that After the natural number is matched with the associated interval, the method further includes: Determine whether the matching interval exists in the fault interval database; If it does not exist, the supplier associated with the hit associated interval is selected as the target supplier; If it exists, re-execute the steps of generating natural numbers and interval matching.
4. The method for implementing virtual number provider flow control based on random algorithm according to claim 3 is characterized in that: It also includes steps for adjusting the interval length, including: Obtain relevant data of the fault interval in the fault interval database, obtain the fault frequency and fault duration of the fault interval, shorten the length of the fault interval accordingly based on the fault frequency and fault duration, and correspondingly increase other stable associated intervals.
5. The method for implementing virtual number provider flow control based on random algorithm according to claim 4 is characterized in that: It also includes the troubleshooting steps for the fault interval, including: The fault intervals in the fault interval database are obtained in sequence, virtual number acquisition tests are performed on the virtual number suppliers corresponding to the fault intervals in sequence, and the associated intervals corresponding to the suppliers whose virtual number supply services have been restored are removed from the fault interval database.
6. A device for implementing virtual number provider flow control based on a random algorithm, characterized in that: include: A supplier acquisition module, used to acquire virtual number supplier data, wherein the virtual number supplier data includes supplier ID, supplier name, supplier load capacity and the size of the supplier's corresponding virtual number pool; A weight setting module is used to set the weight of each virtual number provider based on the load capacity of the virtual number provider and the size of the virtual number pool; An interval division module is used to set a natural number interval, and based on the number of suppliers and the weight of the suppliers, divide the natural number interval into a number of associated intervals whose lengths match the supplier load capacity and the size of the virtual number pool; The random selection module is used to obtain online car-hailing order data, perform virtual number call calling and called number binding request instructions, and randomly generate a natural number from a natural number interval through a random algorithm; An interval matching module is used to perform interval matching between natural numbers and associated intervals, and select the supplier associated with the hit associated interval as the target supplier; The call establishment module is used to obtain a virtual number from a target supplier, bind the virtual numbers to the driver and passenger ends respectively, and establish a virtual number call between the driver and the passenger.
7. The device for implementing virtual number provider flow control based on random algorithm according to claim 6, characterized in that: When the interval matching module is running, it also executes: Determine whether the target supplier can provide services normally; If possible, obtain a virtual number from the target provider; If not, the associated interval corresponding to the target supplier is set to a faulty state and updated to the faulty interval database.
8. The device for implementing virtual number provider flow control based on random algorithm according to claim 7, characterized in that When the interval matching module is running, it also executes: Determine whether the matching interval exists in the fault interval database; If it does not exist, the supplier associated with the hit associated interval is selected as the target supplier; If it exists, re-execute the steps of generating natural numbers and interval matching.
9. The device for implementing virtual number provider flow control based on random algorithm according to claim 8, characterized in that: Also includes: The interval adjustment module is used to obtain relevant data of the fault interval in the fault interval database, obtain the fault frequency and fault duration of the fault interval, and shorten the length of the fault interval accordingly based on the fault frequency and fault duration, and correspondingly increase other stable associated intervals.
10. The device for implementing virtual number provider flow control based on random algorithm according to claim 9, characterized in that: Also includes: The troubleshooting module is used to sequentially obtain the fault intervals in the fault interval database, sequentially perform virtual number acquisition tests on the virtual number suppliers corresponding to the fault intervals, and remove the associated intervals corresponding to the suppliers whose virtual number supply services have been restored from the fault interval database.
Citation Information
Patent Citations
Communication method and device and storage medium
CN108667634A
Communication line connection method and device, computer device and storage medium
CN110913083A