CN113852700A - Virtual number processing method and device - Google Patents
Virtual number processing method and device Download PDFInfo
- Publication number
- CN113852700A CN113852700A CN202111130315.4A CN202111130315A CN113852700A CN 113852700 A CN113852700 A CN 113852700A CN 202111130315 A CN202111130315 A CN 202111130315A CN 113852700 A CN113852700 A CN 113852700A
- Authority
- CN
- China
- Prior art keywords
- time
- virtual
- virtual number
- grid
- stored
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims abstract description 25
- 238000004590 computer program Methods 0.000 claims description 18
- 238000011084 recovery Methods 0.000 claims description 3
- 238000004064 recycling Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000007115 recruitment Effects 0.000 description 3
- 230000002457 bidirectional effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M3/00—Automatic or semi-automatic exchanges
- H04M3/42—Systems providing special services or facilities to subscribers
- H04M3/42008—Systems for anonymous communication between parties, e.g. by use of disposal contact identifiers
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a virtual number processing method and a virtual number processing device, wherein the method comprises the following steps: storing the virtual number taken out from the number pool into a time grid of the time wheel; and when the time length of the virtual number stored in one time grid reaches the effective time length, taking out the virtual number stored in the time grid and putting the virtual number into the number pool again. The embodiment of the invention can realize that the virtual number taken out from the number pool is stored in a time grid, and the virtual number is recycled when the storage time of the virtual number in the time grid reaches the effective time. Compared with the prior art, the embodiment of the invention does not need to apply for a large number of virtual numbers, can reduce the cost, only needs to traverse a certain time grid when determining the virtual number reaching the effective duration, does not need to traverse all storage spaces for storing the virtual numbers, can reduce the occupation of computing resources and reduce the requirements on the performance of equipment.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a virtual number processing method and a virtual number processing apparatus.
Background
In a service scenario in which a user needs to perform a telephone contact, in order to protect a real number of the user from being leaked, a service provider usually takes out a virtual number from a number pool to allocate the virtual number to the user, and binds the real number with the virtual number, so that the user can perform the telephone contact by using the virtual number.
Because the number of the virtual numbers in the number pool is limited, if the virtual numbers are not recovered in time, the use efficiency of the virtual numbers is reduced, and the cost of a service provider is increased.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a virtual number processing method and a corresponding virtual number processing apparatus that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses a virtual number processing method, which is characterized by including:
storing the virtual number taken out from the number pool into a time grid of the time wheel;
and when the time length of the virtual number stored in one time grid reaches the effective time length, taking out the virtual number stored in the time grid and putting the virtual number into the number pool again.
Optionally, the storing the virtual number extracted from the number pool into a time slot of the time wheel includes:
according to the rotation direction and the rotation interval of the time wheel, one of a plurality of time grids of the time wheel is sequentially determined as a first time grid; the product of the rotation interval and the number of the time bins is the effective duration;
and storing the virtual number extracted from the number pool into the first time grid.
Optionally, the taking out and putting the virtual number stored in the time slot into the number pool again when the duration of the virtual number stored in the time slot reaches the effective duration includes:
determining a next time interval of the first time interval in the rotating direction as a second time interval;
and taking out the virtual numbers stored in the second time grid and putting the virtual numbers into the number pool again, wherein the time length of the virtual numbers in the second time grid stored in the second time grid is the effective time length.
Optionally, the sequentially determining one of the time slots of the time wheel as the first time slot according to the rotation direction of the time wheel and the preset rotation interval includes:
according to the rotation direction and the rotation interval of the time wheel, sequentially pointing a preset first pointer to one of a plurality of time grids of the time wheel;
and taking the time grid pointed by the preset first pointer as a first time grid.
Optionally, the determining a next time interval of the first time interval in the rotation direction as a second time interval includes:
sequentially pointing a preset second pointer to the next time cell of the first time cell in the rotating direction;
and taking the time grid pointed by the preset second pointer as a second time grid.
Optionally, the time slot has an identifier, and storing the virtual number extracted from the number pool into the first time slot includes:
and in a preset database, storing the identifier of the first time slot and the virtual number taken out from the number pool in a correlation manner.
Optionally, the time slot has an identifier, and the taking out and putting back the virtual number stored in the second time slot into the number pool includes:
searching a virtual number which is stored in a preset database in association with the identifier of the second time cell;
and taking out the virtual number stored in association with the identifier of the second time grid and putting the virtual number into the number pool again.
The embodiment of the invention also discloses a virtual number processing device, which comprises:
the storage module is used for storing the virtual number taken out from the number pool into a time grid of the time wheel;
and the recovery module is used for taking out the virtual numbers stored in the time grid and putting the virtual numbers into the number pool again when the time length of the virtual numbers stored in the time grid reaches the effective time length.
Optionally, the storage module comprises:
the first time grid determining submodule is used for sequentially determining one of a plurality of time grids of the time wheel as a first time grid according to the rotating direction and the rotating interval of the time wheel; the product of the rotation interval and the number of the time bins is the effective duration;
and the virtual number storage submodule is used for storing the virtual number taken out from the number pool into the first time grid.
Optionally, the recycling module comprises:
a second time frame determination submodule configured to determine a time frame next to the first time frame in the rotation direction as a second time frame;
and the virtual number recycling submodule is used for taking out the virtual numbers stored in the second time grid and putting the virtual numbers into the number pool again, and the time length of the virtual numbers in the second time grid stored in the second time grid is the effective time length.
Optionally, the first time slot determining submodule includes:
the first pointer pointing unit is used for sequentially pointing a preset first pointer to one of a plurality of time grids of the time wheel according to the rotating direction and the rotating interval of the time wheel;
and the first time grid determining unit is used for taking the time grid pointed by the preset first pointer as the first time grid.
Optionally, the second time grid determining submodule includes:
the second pointer pointing unit is used for sequentially pointing a preset second pointer to the next time cell of the first time cell in the rotating direction;
and the second time grid determining unit is used for taking the time grid pointed by the preset second pointer as a second time grid.
Optionally, the time grid has an identifier, and the virtual number storage submodule includes:
and the first association storage unit is used for associating and storing the identifier of the first time slot and the virtual number taken out from the number pool in a preset database.
Optionally, the time grid has an identifier, and the virtual number recycling sub-module includes:
the virtual number searching unit is used for searching a virtual number which is stored in a preset database in a way of being associated with the identifier of the second time cell;
and the virtual number recycling unit is used for taking out the virtual number stored in association with the identifier of the second time grid and putting the virtual number into the number pool again.
The embodiment of the invention also discloses an electronic device, which is characterized by comprising: a processor, a memory and a computer program stored on the memory and capable of running on the processor, the computer program, when executed by the processor, implementing the steps of the virtual number processing method as described above.
The embodiment of the invention also discloses a computer-readable storage medium, which is characterized in that a computer program is stored on the computer-readable storage medium, and the computer program realizes the steps of the virtual number processing method when being executed by a processor.
The embodiment of the invention has the following advantages:
the embodiment of the invention can realize that the virtual number taken out from the number pool is stored in a time grid, and the virtual number is recycled when the storage time of the virtual number in the time grid reaches the effective time. Compared with the prior art, the embodiment of the invention does not need to apply for a large number of virtual numbers, can reduce the cost, only needs to traverse a certain time grid when determining the virtual number reaching the effective duration, does not need to traverse all storage spaces for storing the virtual numbers, can reduce the occupation of computing resources and reduce the requirements on the performance of equipment.
Drawings
Fig. 1 is a flowchart illustrating steps of a virtual number processing method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a virtual number processing method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating recycling of virtual numbers according to an embodiment of the present invention;
fig. 4 is a block diagram of a virtual number processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
At present, two strategies can be provided for solving the problem of recycling the virtual number:
one strategy is to apply for a large number of virtual numbers to be placed in a circular queue of a number pool, and sequentially obtain secret numbers from the circular queue. However, in this way, the virtual numbers that can be applied as many as possible are required, so that the situation that the virtual numbers are not enough does not occur, and the number of the virtual numbers is easily too large, which causes too large service cost.
Another strategy is to achieve the purpose of recycling the virtual numbers by storing a single virtual number in a database and setting an expiration time. However, this method needs to traverse the used virtual number set to determine whether each virtual number can be recycled, and once the usage amount of the virtual number is too large, it is a great hidden danger to the device performance.
Therefore, the invention provides a virtual number processing method, which can recycle the virtual number by using the time wheel, and can improve the recycling efficiency and reduce the cost.
Referring to fig. 1, a flowchart illustrating steps of a virtual number processing method according to an embodiment of the present invention is shown, where the method specifically includes the following steps:
In practice, the service scenarios for allocating the virtual number to the user may include multiple types, and the effective duration set for the virtual number may be different in different service scenarios. In one example, the recruitment APP may provide a function of issuing a recruitment post for a recruiter, the job seeker may contact the recruiter by clicking a contact control on the recruitment post (e.g., the contact control may be a touch control named a post telephone), and when the user clicks the contact control, the facilitator may take a virtual number from the number pool to bind with a real number of the post and present the virtual number to the job seeker. When the job seeker dials the virtual number, the operator can transfer the virtual number to the real number of the post, so that the real number of the post is prevented from being leaked. Illustratively, the validity period of the virtual number retrieved from the number pool may be 15 minutes, and if the virtual number is not dialed within 15 minutes, the virtual number needs to be unbound in time and returned to the number pool.
The time wheel is a data management model set according to the clock operation idea, and may include multiple time slots, each time slot corresponding to a time slot, and data processing tasks in a certain time slot may be set to be performed in the corresponding time slot.
And step 102, when the time length of the virtual number stored in one time grid reaches the effective time length, taking out the virtual number stored in the time grid and putting the virtual number into the number pool again.
In the embodiment of the invention, the time wheel can be adopted for recovering the virtual numbers, and the virtual numbers taken out of the number pool are stored in a time grid of the time wheel. When the storage time length of the virtual numbers stored in the time grid reaches the effective time length, the virtual numbers stored in the time grid are put into the number pool again to realize virtual number recovery, and the virtual numbers stored in the time grid are taken out, so that the time grid can be used for storing new virtual numbers.
The embodiment of the invention can realize that the virtual number taken out from the number pool is stored in a time grid, and the virtual number is recycled when the storage time of the virtual number in the time grid reaches the effective time. Compared with the prior art, the embodiment of the invention does not need to apply for a large number of virtual numbers, can reduce the cost, only needs to traverse a certain time grid when determining the virtual number reaching the effective duration, does not need to traverse all storage spaces for storing the virtual numbers, can reduce the occupation of computing resources and reduce the requirements on the performance of equipment.
Referring to fig. 2, a flowchart illustrating steps of a virtual number processing method according to an embodiment of the present invention is shown, where the method specifically includes the following steps:
The time wheel is configured to sequentially determine one of the plurality of time bins as a first time bin according to the rotation direction and the rotation interval; the product of the rotation interval and the number of the time cells is the effective duration, so that the duration of one cycle of the time wheel is the effective duration. The larger the number of the time cells is set, the smaller the rotation interval is; conversely, the smaller the number of time slots is set, the smaller the rotation interval. In practice, the number of time slots and the rotation interval may be set according to actual needs, which is not limited by the present invention.
For example, in setting the time wheel, the number of time slots and the rotation interval may be set according to the effective time period set for the virtual number. For example, assuming that the valid duration of the virtual number is set to 15 minutes, i.e., 900 seconds, the time wheel is set to have 20 time slots, the rotation interval is 45 seconds, i.e., each time slot stays for 45 seconds, and after 45 seconds, the next time slot is skipped. When the whole time is finished, the time duration is just 900 seconds.
In an alternative embodiment of the present invention, the step 201 may include the following sub-steps:
and a substep S11 of pointing a preset first pointer to one of the plurality of time slots of the time wheel in sequence according to the rotation direction and the rotation interval of the time wheel.
And a substep S12, using the time frame pointed by the preset first pointer as the first time frame.
The rotation of the preset first pointer can be simulated by the timing task by taking the time grid pointed by the preset first pointer as the current first time grid. The time wheel can be constructed by adopting a bidirectional circulating linked list, each linked list node represents a time grid, and each linked list node can be provided with an identification ID which is increased in sequence. The preset first pointer may point to the ID of the linked list node to determine the current first time bin. The preset rotation of the first pointer may be simulated by a timing task, the timing task is executed once within a fixed time, and the ID of the time pointer is incremented by 1 every time the timing task is executed, so as to point to the next time bin. The execution period of the timing task is the dwell time of a time grid.
When the virtual number is taken out from the number pool, the virtual number taken out can be stored in the current first time slot.
In an alternative embodiment of the present invention, the step 202 may include the following sub-steps: and in a preset database, storing the identifier of the first time slot and the virtual number taken out from the number pool in a correlation manner.
Exemplarily, in the database, the identification of the first time bin may be stored in association with the virtual number fetched from the number pool in the form of a key-value pair (key-value).
For example, the time wheel may be constructed by using a bidirectional circular linked list, data of each linked list node is stored in a database, and may be stored in a key-value pair (key-value) form, where an index identifier indexId of the linked list is used as a key of the database, and a value is a set for storing a virtual number.
While the first time interval is determined each time the rotation interval is reached, the next time interval of the first time interval in the direction of rotation can be determined as the second time interval.
Assuming that the number of time grids of the time wheel is N, along with the rotation of the time wheel, a first time grid corresponding to a certain time period is determined as a second time grid after N rotation intervals; and is re-determined as the first time bin after N +1 rotation intervals have been reached.
After the next rotation interval, the second time interval corresponding to a certain time period is determined as the first time interval.
In an alternative embodiment of the present invention, the step 203 may include the following sub-steps:
and a substep S21, sequentially pointing a preset second pointer to a next time interval of the first time interval in the rotation direction.
And a substep S22, setting the time frame pointed by the preset second pointer as a second time frame.
The rotation of the preset first pointer can be simulated by the timing task by taking the time grid pointed by the preset second pointer as the current second time grid.
For example, assume that the validity period of the virtual number is 15 minutes, i.e., 900 seconds. When the time wheel is set, the time wheel is divided into 20 time cells, and the time of each time cell is 45 seconds. After the timing task execution cycle is 45 seconds, the next time slot is reached. When the whole round of time grid is finished, the time is just 15 minutes, so that the data in the time grid pointed by the current pointer is completely expired, and the unbinding and deleting can be completely carried out.
The virtual number stored in the second time slot is the virtual number stored when the time slot was previously determined to be the first time slot. For example, assuming that the number of time slots of the time wheel is N, the current second time slot is set as the first time slot before N rotation intervals, that is, the virtual number stored in the current second time slot is the virtual number stored before N rotation intervals, and after N rotation intervals, the time length of the virtual number stored in the second time slot has reached the valid time length, so that the virtual number stored in the second time slot can be taken out and put into the number pool again, so that after the second time slot is emptied, the virtual number can be written into the next rotation interval.
In an alternative embodiment of the present invention, the step 204 may include the following sub-steps: searching a virtual number which is stored in a preset database in association with the identifier of the second time cell; and taking out the virtual number stored in association with the identifier of the second time grid and putting the virtual number into the number pool again.
Illustratively, in the database, the identification of the second time bin is stored with the virtual number in the form of a key-value pair (key-value); the corresponding virtual number may be looked up according to the identifier of the second time bin.
In the embodiment of the invention, one of a plurality of time grids of the time wheel can be determined as the first time grid in sequence according to the rotation direction and the rotation interval of the time wheel, and the virtual number taken out from the number pool is stored in the first time grid; and determining the next time slot of the first time slot in the rotating direction as a second time slot, and taking out the virtual number stored in the second time slot and putting the virtual number into the number pool again. The embodiment of the invention can realize that the virtual number taken out from the number pool is stored in a time grid, and the virtual number is recycled when the storage time of the virtual number in the time grid reaches the effective time. Compared with the prior art, the embodiment of the invention does not need to apply for a large number of virtual numbers, can reduce the cost, only needs to traverse a certain time grid when determining the virtual number reaching the effective duration, does not need to traverse all storage spaces for storing the virtual numbers, can reduce the occupation of computing resources and reduce the requirements on the performance of equipment.
In order to enable a person skilled in the art to better understand the embodiments of the present invention, the following description is given by way of an example:
fig. 3 is a flowchart illustrating recycling of a virtual number according to an embodiment of the present invention.
When the user inquires the enterprise number through the client, the server can judge whether the enterprise number is bound with the virtual number.
If the enterprise number is already bound with the virtual number, the server can return the bound virtual number to the client.
And if the enterprise number is not bound with the virtual number, the server acquires the virtual number from the number pool and binds the virtual number with the enterprise number.
When the binding is successful, the server may send the virtual number to the system running the round of time.
The time wheel is set to rotate according to the rotation direction and the rotation interval, and a preset first pointer points to one of 8 time frames in sequence to be determined as a first time frame; and determining the preset second pointer to point to the next time cell of the first time cell in the rotating direction as a second time cell.
When the system receives the virtual number, the system may store the virtual number to a first time slot (e.g., time slot 6 in the figure) pointed to by the current preset first pointer. In particular, the identifier of the time grid 6 may be stored in association with the virtual number in the database.
Meanwhile, the system may take out and replace the virtual number stored in the second time slot (e.g., time slot 7 in the figure) pointed by the currently preset second pointer into the number pool. Specifically, the virtual number stored in association with the identifier of the time grid 7 may be searched for in the database and retrieved. And the server may unbundle the virtual number stored in the time grid 7 to have the virtual number re-placed in the number pool.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of a virtual number processing apparatus according to an embodiment of the present invention is shown, which may specifically include the following modules:
the storage module 401 is configured to store the virtual number extracted from the number pool into a time slot of the time wheel;
a recycling module 402, configured to, when the duration of the virtual number stored in one time slot reaches the effective duration, take out the virtual number stored in the time slot and put it into the number pool again.
In an optional embodiment of the present invention, the storage module 401 may include:
the first time grid determining submodule is used for sequentially determining one of a plurality of time grids of the time wheel as a first time grid according to the rotating direction and the rotating interval of the time wheel; the product of the rotation interval and the number of the time bins is the effective duration;
and the virtual number storage submodule is used for storing the virtual number taken out from the number pool into the first time grid.
In an optional embodiment of the present invention, the recycling module 402 may include:
a second time frame determination submodule configured to determine a time frame next to the first time frame in the rotation direction as a second time frame;
and the virtual number recycling submodule is used for taking out the virtual numbers stored in the second time grid and putting the virtual numbers into the number pool again, and the time length of the virtual numbers in the second time grid stored in the second time grid is the effective time length.
In an optional embodiment of the present invention, the first time slot determining sub-module may include:
the first pointer pointing unit is used for sequentially pointing a preset first pointer to one of a plurality of time grids of the time wheel according to the rotating direction and the rotating interval of the time wheel;
and the first time grid determining unit is used for taking the time grid pointed by the preset first pointer as the first time grid.
In an optional embodiment of the present invention, the second time grid determining sub-module may include:
the second pointer pointing unit is used for sequentially pointing a preset second pointer to the next time cell of the first time cell in the rotating direction;
and the second time grid determining unit is used for taking the time grid pointed by the preset second pointer as a second time grid.
In an optional embodiment of the present invention, the time grid has an identifier, and the virtual number storage sub-module may include:
and the first association storage unit is used for associating and storing the identifier of the first time slot and the virtual number taken out from the number pool in a preset database.
In an optional embodiment of the present invention, the time grid has an identifier, and the virtual number recycling sub-module may include:
the virtual number searching unit is used for searching a virtual number which is stored in a preset database in a way of being associated with the identifier of the second time cell;
and the virtual number recycling unit is used for taking out the virtual number stored in association with the identifier of the second time grid and putting the virtual number into the number pool again.
The embodiment of the invention can realize that the virtual number taken out from the number pool is stored in a time grid, and the virtual number is recycled when the storage time of the virtual number in the time grid reaches the effective time. Compared with the prior art, the embodiment of the invention does not need to apply for a large number of virtual numbers, can reduce the cost, only needs to traverse a certain time grid when determining the virtual number reaching the effective duration, does not need to traverse all storage spaces for storing the virtual numbers, can reduce the occupation of computing resources and reduce the requirements on the performance of equipment.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including:
the virtual number processing method comprises a processor, a memory and a computer program which is stored in the memory and can run on the processor, wherein when the computer program is executed by the processor, each process of the virtual number processing method embodiment is realized, the same technical effect can be achieved, and the details are not repeated here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the virtual number processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The virtual number processing method and the virtual number processing apparatus provided by the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. A virtual number processing method, comprising:
storing the virtual number taken out from the number pool into a time grid of the time wheel;
and when the time length of the virtual number stored in one time grid reaches the effective time length, taking out the virtual number stored in the time grid and putting the virtual number into the number pool again.
2. The method of claim 1, wherein storing the virtual number retrieved from the number pool in a time slot of the time wheel comprises:
according to the rotation direction and the rotation interval of the time wheel, one of a plurality of time grids of the time wheel is sequentially determined as a first time grid; the product of the rotation interval and the number of the time bins is the effective duration;
and storing the virtual number extracted from the number pool into the first time grid.
3. The method of claim 2, wherein the fetching and replacing the virtual number stored in the time bin into the number pool when the duration of the virtual number stored in the time bin reaches the valid duration comprises:
determining a next time interval of the first time interval in the rotating direction as a second time interval;
and taking out the virtual numbers stored in the second time grid and putting the virtual numbers into the number pool again, wherein the time length of the virtual numbers in the second time grid stored in the second time grid is the effective time length.
4. The method of claim 2, wherein sequentially determining one of the plurality of time bins of the time wheel as the first time bin according to the rotation direction of the time wheel and a preset rotation interval comprises:
according to the rotation direction and the rotation interval of the time wheel, sequentially pointing a preset first pointer to one of a plurality of time grids of the time wheel;
and taking the time grid pointed by the preset first pointer as a first time grid.
5. The method of claim 3, wherein determining the next time bin of the first time bin in the rotational direction as a second time bin comprises:
sequentially pointing a preset second pointer to the next time cell of the first time cell in the rotating direction;
and taking the time grid pointed by the preset second pointer as a second time grid.
6. The method of claim 2, wherein the time slot has an identification, and wherein storing the virtual number retrieved from the number pool in the first time slot comprises:
and in a preset database, storing the identifier of the first time slot and the virtual number taken out from the number pool in a correlation manner.
7. The method of claim 3, wherein the time slot has an identification, and wherein the fetching and replacing the virtual number stored in the second time slot into the number pool comprises:
searching a virtual number which is stored in a preset database in association with the identifier of the second time cell;
and taking out the virtual number stored in association with the identifier of the second time grid and putting the virtual number into the number pool again.
8. A virtual number processing apparatus, comprising:
the storage module is used for storing the virtual number taken out from the number pool into a time grid of the time wheel;
and the recovery module is used for taking out the virtual numbers stored in the time grid and putting the virtual numbers into the number pool again when the time length of the virtual numbers stored in the time grid reaches the effective time length.
9. An electronic device, comprising: processor, memory and computer program stored on and executable on said memory, said computer program realizing the steps of the virtual number processing method according to any of claims 1 to 7 when executed by said processor.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the virtual number processing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111130315.4A CN113852700A (en) | 2021-09-26 | 2021-09-26 | Virtual number processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111130315.4A CN113852700A (en) | 2021-09-26 | 2021-09-26 | Virtual number processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113852700A true CN113852700A (en) | 2021-12-28 |
Family
ID=78979863
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111130315.4A Pending CN113852700A (en) | 2021-09-26 | 2021-09-26 | Virtual number processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113852700A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115002187A (en) * | 2022-05-24 | 2022-09-02 | 北京有竹居网络技术有限公司 | Binding relationship processing method and related equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050091026A1 (en) * | 2003-09-20 | 2005-04-28 | Spiratech Limited | Modelling and simulation method |
CN106341558A (en) * | 2016-08-30 | 2017-01-18 | 五八同城信息技术有限公司 | Virtual number processing method and device and server |
WO2017167062A1 (en) * | 2016-03-30 | 2017-10-05 | 阿里巴巴集团控股有限公司 | Application program interface deadlock monitoring method and device |
CN107329807A (en) * | 2017-06-29 | 2017-11-07 | 北京京东尚科信息技术有限公司 | Data delay treating method and apparatus, computer-readable recording medium |
CN110944088A (en) * | 2019-11-20 | 2020-03-31 | 微民保险代理有限公司 | Method, device, storage medium and server for calling based on virtual telephone number |
CN112351134A (en) * | 2020-10-29 | 2021-02-09 | 科大国创云网科技有限公司 | Virtual intermediate number privacy protection system |
WO2021062958A1 (en) * | 2019-09-30 | 2021-04-08 | Beijing Didi Infinity Technology And Development Co., Ltd. | Methods and systems for providing status reminder of a charging pole |
-
2021
- 2021-09-26 CN CN202111130315.4A patent/CN113852700A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050091026A1 (en) * | 2003-09-20 | 2005-04-28 | Spiratech Limited | Modelling and simulation method |
WO2017167062A1 (en) * | 2016-03-30 | 2017-10-05 | 阿里巴巴集团控股有限公司 | Application program interface deadlock monitoring method and device |
CN106341558A (en) * | 2016-08-30 | 2017-01-18 | 五八同城信息技术有限公司 | Virtual number processing method and device and server |
CN107329807A (en) * | 2017-06-29 | 2017-11-07 | 北京京东尚科信息技术有限公司 | Data delay treating method and apparatus, computer-readable recording medium |
WO2021062958A1 (en) * | 2019-09-30 | 2021-04-08 | Beijing Didi Infinity Technology And Development Co., Ltd. | Methods and systems for providing status reminder of a charging pole |
CN110944088A (en) * | 2019-11-20 | 2020-03-31 | 微民保险代理有限公司 | Method, device, storage medium and server for calling based on virtual telephone number |
CN112351134A (en) * | 2020-10-29 | 2021-02-09 | 科大国创云网科技有限公司 | Virtual intermediate number privacy protection system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115002187A (en) * | 2022-05-24 | 2022-09-02 | 北京有竹居网络技术有限公司 | Binding relationship processing method and related equipment |
CN115002187B (en) * | 2022-05-24 | 2024-04-30 | 北京有竹居网络技术有限公司 | Binding relation processing method and related equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10713088B2 (en) | Event-driven scheduling using directed acyclic graphs | |
CA2984142C (en) | Automatic scaling of resource instance groups within compute clusters | |
CN112099800B (en) | Code data processing method, device and server | |
CN106920024B (en) | Business process management method, device and equipment | |
CN110471750B (en) | Timing task control method, device, medium and computer equipment | |
CN104423961A (en) | Method and system for generating testing script | |
WO2019076102A1 (en) | Data rollback method and system, device, and computer readable storage medium | |
US20160224327A1 (en) | Linking a Program with a Software Library | |
CN109033365B (en) | Data processing method and related equipment | |
CN113852700A (en) | Virtual number processing method and device | |
CN108874379A (en) | The processing method and processing device of the page | |
CN111090669A (en) | Data query method and device based on space-time collision | |
CN102508884A (en) | Method and device for acquiring hotpot events and real-time comments | |
CN114168595A (en) | Data analysis method and device | |
CN104333588A (en) | Page timing method and device | |
CN116561171B (en) | Method, device, equipment and medium for processing dual-time-sequence distribution of inclination data | |
Wu et al. | Experimental study of bidding strategies for scientific workflows using aws spot instances | |
CN111898013B (en) | Website monitoring method and device | |
CN111625397B (en) | Service log backup method, cluster, device, electronic equipment and storage medium | |
CN114237775A (en) | Parallel execution method and device, electronic equipment and storage medium | |
CN115686811A (en) | Process management method, device, computer equipment and storage medium | |
CN105225034A (en) | interaction processing method and device | |
CN107463374B (en) | Subset model extraction method and system based on inheritance and association automatic deduction | |
Pius et al. | Optimizing hadoop block placement policy & cluster blocks distribution | |
CN116701410B (en) | Method and system for storing memory state data for data language of digital networking |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211228 |