CN113592458B - Number allocation method and device - Google Patents

Number allocation method and device Download PDF

Info

Publication number
CN113592458B
CN113592458B CN202110895168.3A CN202110895168A CN113592458B CN 113592458 B CN113592458 B CN 113592458B CN 202110895168 A CN202110895168 A CN 202110895168A CN 113592458 B CN113592458 B CN 113592458B
Authority
CN
China
Prior art keywords
pool
fetched
numbers
target
allocation task
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.)
Active
Application number
CN202110895168.3A
Other languages
Chinese (zh)
Other versions
CN113592458A (en
Inventor
成树云
郑森洋
刘方璇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bairong Yunchuang Technology Co ltd
Original Assignee
Bairong Yunchuang Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Bairong Yunchuang Technology Co ltd filed Critical Bairong Yunchuang Technology Co ltd
Priority to CN202110895168.3A priority Critical patent/CN113592458B/en
Publication of CN113592458A publication Critical patent/CN113592458A/en
Application granted granted Critical
Publication of CN113592458B publication Critical patent/CN113592458B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Engineering & Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a number allocation method and a device, which relate to the technical field of Internet and mainly aim at reducing the probability of number allocation of a jump number and improving the efficiency of number allocation; the main technical scheme comprises the following steps: moving a target number aiming at a current allocation task in a number pool to be fetched to a number pool to be fetched, wherein the number pool to be fetched is used for placing a plurality of continuous numbers after the maximum value of a first designated number segment, and the number pool to be fetched is used for placing numbers which are moved out of the number pool to be fetched, are occupied by the allocation task and are not bound by designated objects corresponding to the allocation task; monitoring whether the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset time period; if the binding is successful, deleting the target number in the acquired number pool; and if the binding is unsuccessful, returning the target number from the fetched number pool to the to-be-fetched number pool.

Description

Number allocation method and device
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a number allocation method and device.
Background
With the development of network technology, people use the network to perform various activities such as learning, working, living, entertainment and the like. When the user performs the activities, the user can perform the corresponding activities by using the network after being assigned with the corresponding number and bound with the corresponding number. For example, a number is assigned to a user as a shopping account, and the user can conduct shopping activities according to the shopping account. For another example, a number is assigned to the user as an account number, and the user can conduct a financial activity according to the financial account number. It can be seen that assigning a corresponding number to a network user is a precondition for the user to perform a network activity.
Currently, when assigning numbers, the numbers are typically generated and assigned to users by way of manual entry. This approach has at least two drawbacks: firstly, because of manual input, the user can randomly select numbers to use according to personal preference, and the situation that the numbers are allocated by jumping occurs more, so that the situation of number waste is generated. Secondly, the probability of collision between the manual input and the bound number is larger and larger, and the number needs to be manually replaced again for retry after the collision, so that the retry is possibly not performed for many times, and the number allocation efficiency is seriously affected.
Disclosure of Invention
In view of this, the present invention provides a number allocation method and apparatus, and is mainly aimed at reducing the probability of occurrence of number allocation by skip number and improving the efficiency of number allocation.
In a first aspect, the present invention provides a number allocation method, including:
moving a target number aiming at a current allocation task in a number pool to be fetched to a number pool to be fetched, wherein the number pool to be fetched is used for placing a plurality of continuous numbers after the maximum value of a first designated number segment, and the number pool to be fetched is used for placing numbers which are moved out of the number pool to be fetched, are occupied by the allocation task and are not bound by designated objects corresponding to the allocation task;
monitoring whether the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset time period;
if the binding is successful, deleting the target number in the acquired number pool;
and if the binding is unsuccessful, returning the target number from the fetched number pool to the to-be-fetched number pool.
In a second aspect, the present invention provides a number allocation apparatus, the apparatus comprising:
the mobile unit is used for moving a target number aiming at a current allocation task in a number pool to be fetched to a number pool which is used for placing a plurality of continuous numbers after the maximum value of a first designated number segment, and the number pool which is used for placing numbers which are moved out of the number pool to be fetched and occupied by the allocation task but not bound by a designated object corresponding to the allocation task;
the monitoring unit is used for monitoring whether the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset duration;
the deleting unit is used for detecting that the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset duration in the monitoring unit, and deleting the target number in the acquired number pool;
and the return unit is used for monitoring that the target number is not successfully bound with the appointed object corresponding to the current allocation task within a first preset time period by the monitoring unit, and returning the target number from the acquired number pool to the to-be-acquired number pool.
In a third aspect, the present invention provides a computer readable storage medium, where the storage medium includes a stored program, where the program, when executed, controls a device in which the storage medium is located to execute the number allocation method according to the first aspect.
In a fourth aspect, the present invention provides a storage management apparatus comprising:
a memory for storing a program;
a processor, coupled to the memory, for executing the program to perform the number assignment method of the first aspect.
By means of the technical scheme, the number allocation method and the number allocation device provided by the invention move the target number aiming at the current allocation task in the number pool to the number pool when the number allocation is needed. And then deleting the target number in the acquired number pool when the target number is monitored to be successfully bound with the appointed object corresponding to the current allocation task within the first preset time. And when the fact that the target number is unsuccessfully bound with the appointed object corresponding to the current allocation task within the first preset time period is monitored, moving the target number from the fetched number pool to the to-be-fetched number pool. Therefore, in the scheme provided by the invention, when the allocation task exists, the number in the number pool to be fetched can be automatically allocated, so that the number allocation efficiency is improved. In addition, when the allocated number is not successfully bound with the appointed object, the number can be automatically returned to the to-be-fetched number pool so as to use the number to continue the number allocation, thereby reducing the probability of the number allocation of the jump number.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a number allocation method according to an embodiment of the present invention;
fig. 2 is a flowchart of another number allocation method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a number allocation device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a number allocation structure according to another embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In practical applications, when assigning numbers to users who perform network activities, the numbers are usually generated and assigned to specified objects by manual input. This approach has at least two drawbacks: firstly, because of manual input, the user can randomly select numbers to use according to personal preference, and the situation that the numbers are allocated by jumping occurs more, so that the situation of number waste is generated. Secondly, the probability of collision between the manual input and the bound number is larger and larger, and the number needs to be manually replaced again for retry after the collision, so that the retry is possibly not performed for many times, and the number allocation efficiency is seriously affected. In order to overcome the above-mentioned drawbacks, an embodiment of the present invention provides a number allocation method and apparatus, and the following description is specific.
As shown in fig. 1, an embodiment of the present invention provides a number allocation method, which mainly includes the following steps:
101. and moving the target number aiming at the current allocation task in a number pool to be fetched to a number pool to be fetched, wherein the number pool to be fetched is used for placing a plurality of continuous numbers after the maximum value of a first designated number segment, and the number pool to be fetched is used for placing numbers which are moved out of the number pool to be fetched, are occupied by the allocation task and are not bound by designated objects corresponding to the allocation task.
In order to have sufficient numbers for the specified object binding, a pool of to-be-fetched numbers for placing numbers needs to be preset. The number pool to be fetched is provided with a plurality of continuous numbers after the maximum value of the first designated number segment. In addition, in order to facilitate the management of the numbers, the numbers placed in the number pool to be fetched are the numbers in the specific number segment. The purpose of the number pool to be fetched corresponding to a specific number segment is that after the number segments of the specific number segment are all allocated, the number of the next number segment can be used for segmentation so as to furthest reduce the probability of the occurrence of the jump number allocation number
The following describes the initialization configuration process of the number pool to be fetched: firstly, determining the preset capacity of a to-be-fetched number pool, wherein the preset capacity represents the maximum number of numbers which can be placed in the to-be-fetched number pool. And determining a maximum value of the first designated number segment, wherein the maximum value of the first designated number segment is the maximum value of numbers existing in the current database, and the numbers after the maximum value of the first designated number segment are not existing in the current database. And then determining the appointed times according to the preset capacity, starting from the maximum value of the first appointed number segment, increasing the appointed times, and putting the number after each increment into a to-be-fetched number pool. And after the number increment is finished, the initialization configuration of the number pool to be fetched is finished.
After the configuration of the number pool to be fetched is completed, if an allocation task exists, the target number aiming at the current allocation task in the number pool to be fetched can be moved to the fetched number pool so as to be bound with a specified object corresponding to the current allocation task. The following describes a method for determining whether a task is currently allocated, and the method at least comprises the following two methods: firstly, if a number allocation request sent by a user is received, determining that an allocation task exists currently; and secondly, the number allocation is periodically carried out, and if the allocation time point of one period is reached, the current allocation task is determined.
When determining that the current allocation task exists, determining a target number aiming at the current allocation task in a to-be-fetched number pool, wherein the determination method of the target number at least comprises the following steps: firstly, determining a number designated by a user as a target number aiming at a current allocation task, wherein the designated number is included in a to-be-fetched number pool, and the number determined in the mode can maximally meet personal preference of the user; secondly, determining the minimum value of the existing number in the number pool to be fetched as a target number aiming at the current allocation task; thirdly, determining the maximum value of the existing numbers in the number pool to be fetched as the target number aiming at the current allocation task. The second and third methods can ensure that numbers in the pool of numbers to be fetched are continuously allocated to the designated object, and reduce the possibility of number jump.
And after determining the target number aiming at the current allocation task, moving the target number aiming at the current allocation task in the to-be-fetched number pool to a fetched number pool. The setting of the fetched number pool is that the number bound with the appointed object has the uniqueness requirement, so that the fetched number pool is set in order to ensure that the number in the to-be-fetched number pool is not reused, and when the allocation task exists, the target number aiming at the current allocation task in the to-be-fetched number pool is moved to the fetched number pool. That is, the fetched number pool is used for placing numbers which are moved out of the to-be-fetched number pool, occupied by the assigned task, but not bound by the assigned object corresponding to the assigned task.
102. Monitoring whether the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset time period; if the binding is successful, executing 103; if the binding is unsuccessful, 104 is performed.
In this embodiment, the first preset duration is the duration that the current task is able to occupy the target number, and if the target number is not successfully bound with the designated object corresponding to the current task within the first preset duration, it is indicated that there is an abnormality in the binding process, and the target number needs to be recovered in time, so that the jump number is avoided. The monitoring condition that whether the target number is successfully bound with the specified object corresponding to the current allocation task within the first preset time length is at least as follows:
first, a notice that the target number is unsuccessfully bound with the designated object corresponding to the current allocation task is received within a first preset time period, and the unsuccessfully bound is determined.
And secondly, when the first time length is exceeded, determining that the target number is not successfully bound with the designated object corresponding to the current allocation task.
Thirdly, a notice that the target number is successfully bound with the appointed object corresponding to the current allocation task is received in the first preset time period, and unsuccessful binding is determined.
103. And deleting the target number in the fetched number pool.
In this embodiment, because the number bound to the specified object has a unique requirement, when it is monitored that the target number is successfully bound to the specified object corresponding to the current allocation task, the target number in the fetched number pool needs to be deleted, so that the number is prevented from being used by other specified objects.
104. And returning the target number from the fetched number pool to the to-be-fetched number pool.
In this embodiment, in order to avoid number jump, when it is monitored that the target number is not successfully bound to the designated object corresponding to the current allocation task, the target number is returned from the fetched number pool to the to-be-fetched number pool, so that the target number can be used by the subsequent allocation task. It should be noted that, when the destination number is returned to the pool of to-be-fetched numbers, the destination number in the pool of to-be-fetched numbers is deleted.
When the number allocation is needed, the number allocation method provided by the embodiment of the invention moves the target number aiming at the current allocation task in the number pool to the acquired number pool. And then deleting the target number in the acquired number pool when the target number is monitored to be successfully bound with the appointed object corresponding to the current allocation task within the first preset time. And when the fact that the target number is unsuccessfully bound with the appointed object corresponding to the current allocation task within the first preset time period is monitored, moving the target number from the fetched number pool to the to-be-fetched number pool. Therefore, in the scheme provided by the embodiment of the invention, when the allocation task exists, the number in the number pool to be fetched can be automatically allocated, so that the number allocation efficiency is improved. In addition, when the allocated number is not successfully bound with the appointed object, the number can be automatically returned to the to-be-fetched number pool so as to use the number to continue the number allocation, thereby reducing the probability of the number allocation of the jump number.
Further, according to the method shown in fig. 1, another embodiment of the present invention further provides a number allocation method, as shown in fig. 2, where the method mainly includes:
201. determining whether a number exists in the interrupt number pool; if so, 202; otherwise, 203 is performed.
In order to reduce the probability of number allocation of the jump number and ensure that all numbers are used, an interrupt number pool needs to be set. The interrupt number pool is used for placing the number which is not successfully bound by the appointed object before the maximum value of the first appointed number segment, and the number may be the number which is not successfully bound with the appointed object or the number which is unbinding with the appointed object.
In order to ensure continuous use of numbers, the numbers in the interrupt number pool need to be used preferentially to bind the specified objects, so that whether the numbers exist in the interrupt number pool needs to be determined.
If it is determined that the number exists in the interrupt number pool, it is indicated that there is an empty number before the first designated number segment, and in order to ensure that the number can be used, it is required to preferentially select the target number for the current allocation task from the interrupt number pool, so step 202 is executed.
If it is determined that no number exists in the interrupt number pool, it is determined that numbers before the maximum value of the first designated number segment have been used and that no number to be skipped exists, so step 203 is executed.
202. If there is a number in the interrupt number pool, selecting a target number for the current allocation task from the interrupt number pool, moving the selected target number to the acquired number pool, and executing 204.
If the number exists in the interrupt number pool, the existence of an empty number before the first designated number segment is indicated, in order to ensure that the number can be used, a target number aiming at the current allocation task is selected from the interrupt number pool, and the selected target number is moved to the acquired number pool.
The specific process of selecting the target number aiming at the current allocation task from the interrupt number pool and moving the selected target number to the fetched number pool can be as follows: and acquiring a distributed lock corresponding to the interrupt number pool, wherein the distributed lock is used for limiting the interrupt number pool to provide numbers for only one allocation task at the same time so as to ensure that one number is only bound by one appointed object. The target number for the currently assigned task in the interrupt number pool is then moved to the fetched number pool based on the distributed lock.
203. And moving the target number aiming at the current allocation task in a number pool to be fetched to a number pool to be fetched, wherein the number pool to be fetched is used for placing a plurality of continuous numbers after the maximum value of a first designated number segment, and the number pool to be fetched is used for placing numbers which are moved out of the number pool to be fetched, are occupied by the allocation task and are not bound by designated objects corresponding to the allocation task.
In this embodiment, the process of moving the target number for the current allocation task in the to-be-fetched number pool to the fetched number pool is as follows: and obtaining a distributed lock corresponding to the number pool to be fetched, wherein the distributed lock is used for limiting the number pool to be fetched to only provide numbers for one allocation task at the same time so as to ensure that one number is only bound by one appointed object. And then moving the target number aiming at the current allocation task in the number pool to the number pool based on the distributed lock.
Further, in order to ensure that there are enough numbers in the pool of numbers to be fetched for allocation, the number of numbers in the pool of numbers to be fetched may be maintained in the following two ways:
first, monitoring whether the total number of the number pool to be fetched and the number pool to be fetched is smaller than a number threshold value or not at a set frequency.
If the monitored total quantity is smaller than the quantity threshold value, the number is insufficient, the number allocation can be influenced, and the number to be fetched needs to be filled in a number pool. When filling, firstly, the filling number of the number pool to be fetched is determined, and the filling number is the difference between the preset total value and the total value of the numbers in the number pool to be fetched and the number pool to be fetched. And then determining the maximum value of the existing numbers in the pool of the numbers to be fetched and the pool of the numbers to be fetched, starting from the maximum value of the existing numbers, increasing the number of difference values, and putting the numbers after each increment into the pool of the numbers to be fetched.
If the total quantity is not less than the quantity threshold value, the number is sufficient, the number allocation cannot be influenced, and the number to be fetched does not need to be filled in a number pool.
Secondly, after the target number aiming at the current allocation task in the number pool to be fetched is moved to the fetched number pool, whether the total number of the numbers in the number pool to be fetched and the fetched number pool is smaller than a number threshold value is monitored.
If the monitored total quantity is smaller than the quantity threshold value, the number is insufficient, the number allocation can be influenced, and the number to be fetched needs to be filled in a number pool. When filling, firstly, the filling number of the number pool to be fetched is determined, and the filling number is the difference between the preset total value and the total value of the numbers in the number pool to be fetched and the number pool to be fetched. And then determining the maximum value of the existing numbers in the pool of the numbers to be fetched and the pool of the numbers to be fetched, starting from the maximum value of the existing numbers, increasing the number of difference values, and putting the numbers after each increment into the pool of the numbers to be fetched.
If the total quantity is not less than the quantity threshold value, the number is sufficient, the number allocation cannot be influenced, and the number to be fetched does not need to be filled in a number pool.
It should be noted that, no matter what of the two methods is adopted, in order to make the pool of numbers to be fetched be the pool of numbers of only one corresponding designated number segment, after the total amount is monitored to be smaller than the number threshold, before determining the number of the filling numbers of the pool of numbers to be fetched, it is required to determine whether the maximum value of the existing numbers in the pool of numbers to be fetched and the pool of numbers to be fetched is the second designated maximum value. If the existing number maximum value is determined to be the second specified maximum value, it is indicated that all numbers in the specified number segment corresponding to the number pool to be fetched are generated, and if the generated number exceeds the upper limit of the number pool to be fetched, the generation of numbers aiming at the number pool to be fetched needs to be stopped. If the existing number maximum value is not the second specified maximum value, the number in the specified number segment corresponding to the number pool to be fetched is not completely generated, the number of filling numbers for the filling can be determined, and the number pool to be fetched is filled based on the number of filling numbers.
Further, in order to avoid binding the same number by different designated objects, it is necessary to detect whether there are bound numbers in the pool of to-be-fetched numbers and the pool of fetched numbers at a set frequency. If the bound number exists, deleting the number, and avoiding that other specified objects except the bound number are bound by using the number again.
204. Monitoring whether the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset time period; if the binding is successful, executing 205; if the binding is unsuccessful, 206 is performed.
205. Deleting the target number in the fetched number pool, and executing 211.
206. And returning the target number from the fetched number pool to the to-be-fetched number pool.
207. Monitoring whether the appointed object applies for binding the target number or not within a second preset time period; if the target number is applied for binding, executing 208; if the binding of the target number is not applied, ending the current flow.
Because of the possibility of overtime number binding, after the target number is returned to the to-be-fetched number pool from the fetched number pool, whether the designated object applies for binding the target number or not needs to be monitored in a second preset duration.
If it is detected that the specified object applies for binding the target number within the second preset time period, in order to enable the target number previously allocated to the specified object to be bound with the specified object, step 208 is performed.
If the fact that the appointed object does not apply for binding the target number in the second preset time period is monitored, the fact that the target number cannot be provided for the appointed object is indicated, and the current flow is ended is achieved.
208. Determining whether the target number is occupied by other allocation tasks; if not occupied by other allocation tasks, executing 209; if occupied by other assigned tasks, execution 210.
Since the destination number is potentially assigned to other designated objects after the destination number returns to the pool of pending numbers, it is necessary to determine whether the destination number is occupied by other assignment tasks.
If it is determined that the target number is occupied by another assignment task, it is indicated that the target number has been assigned to the other assignment task, and in order to ensure uniqueness of the target number binding with the specified object, 210 is performed.
If it is determined that the target number is not occupied by another allocation task, it is indicated that the target number may also be bound to the specified object corresponding to the current allocation task, and thus the execution 209 is performed.
209. And providing the target number for the appointed object to bind, deleting the target number in the number pool to be fetched when the target number and the appointed object are successfully bound, and ending the current flow.
When the target number is successfully bound with the designated object, the target number is prevented from being bound again by other designated objects, and the target number in the number pool to be fetched needs to be deleted.
210. And refusing the appointed object to bind the target number.
211. And if the target number is detected to be unbinding with the appointed object, adding the target number into the number pool to be fetched.
If the target number is detected to be unbinding with the appointed object, the target number is not used by the appointed object any more. In order to avoid the target number from being jumped, the target number is added into a pool of to-be-fetched numbers so as to be distributed to other specified objects needing binding numbers for use.
Further, according to the above method embodiment, another embodiment of the present invention further provides a number allocation apparatus, as shown in fig. 3, where the apparatus includes:
a mobile unit 31, configured to move a target number for a current allocation task in a pool of to-be-fetched numbers to a pool of fetched numbers, where the pool of to-be-fetched numbers is used for placing a plurality of consecutive numbers after a maximum value of a first designated number segment, and the pool of fetched numbers is used for placing numbers that are removed from the pool of to-be-fetched numbers and occupied by the allocation task but not bound by a designated object corresponding to the allocation task;
the monitoring unit 32 is configured to monitor whether the target number is successfully bound to a specified object corresponding to the current allocation task within a first preset duration;
a deleting unit 33, configured to detect, in the monitoring unit, that the target number is successfully bound to a specified object corresponding to the current allocation task within a first preset duration, and delete the target number in the acquired number pool;
and a return unit 34, configured to, when the monitoring unit monitors that the target number is not successfully bound to the designated object corresponding to the current allocation task within a first preset duration, return the target number from the fetched number pool to the to-be-fetched number pool.
When the number allocation device provided by the embodiment of the invention needs to allocate the number, the target number aiming at the current allocation task in the number pool to be fetched is moved to the fetched number pool. And then deleting the target number in the acquired number pool when the target number is monitored to be successfully bound with the appointed object corresponding to the current allocation task within the first preset time. And when the fact that the target number is unsuccessfully bound with the appointed object corresponding to the current allocation task within the first preset time period is monitored, moving the target number from the fetched number pool to the to-be-fetched number pool. Therefore, in the scheme provided by the embodiment of the invention, when the allocation task exists, the number in the number pool to be fetched can be automatically allocated, so that the number allocation efficiency is improved. In addition, when the allocated number is not successfully bound with the appointed object, the number can be automatically returned to the to-be-fetched number pool so as to use the number to continue the number allocation, thereby reducing the probability of the number allocation of the jump number.
Optionally, as shown in fig. 4, the mobile unit 31 is further configured to, before moving the target number for the current allocation task in the pool of to-be-fetched numbers to the pool of fetched numbers, if there is a number in the pool of interrupted numbers, select the target number for the current allocation task from the pool of interrupted numbers, and move the selected target number to the pool of fetched numbers, where the pool of interrupted numbers is used for placing a number that has not been successfully bound by the specified object before the maximum value of the first specified number segment.
Alternatively, as shown in fig. 4, the mobile unit 31 includes:
an obtaining module 311, configured to obtain a distributed lock corresponding to the number pool to be fetched, where the distributed lock is configured to define that the number pool to be fetched provides numbers for only one allocation task at the same time;
and a moving module 312, configured to move, based on the distributed lock, the target number for the current allocation task in the pool of to-be-fetched numbers to the pool of fetched numbers.
Optionally, as shown in fig. 4, the monitoring unit 32 is further configured to monitor whether the specified object applies for binding the target number within a second preset duration after the returning unit 34 returns the target number from the fetched number pool to the to-be-fetched number pool; if the target number is applied to be bound, determining whether the target number is occupied by other allocation tasks; and if the target number is not occupied by other allocation tasks, providing the target number for the specified object to bind, and deleting the target number in the number pool to be fetched when the target number is successfully bound with the specified object.
Optionally, as shown in fig. 4, the apparatus further includes:
a generating unit 35, configured to monitor whether the total number of the numbers in the to-be-fetched number pool and the fetched number pool is less than a number threshold after moving the target number for the current allocation task in the to-be-fetched number pool to the fetched number pool at a set frequency; if the number is smaller than the number threshold, determining the number of the filling number of the number pool to be fetched, generating a number corresponding to the number of the filling number based on the maximum value of the existing numbers in the number pool to be fetched and the number pool to be fetched, and placing the generated number in the number pool to be fetched.
Optionally, as shown in fig. 4, the generating unit 35 is further configured to determine, after monitoring that the total amount is smaller than the number threshold, whether the maximum value of the existing numbers in the pool of numbers to be fetched and the pool of numbers to be fetched is a second specified maximum value before determining the number of the filling numbers of the pool of numbers to be fetched; if yes, stopping generating the number aiming at the number pool to be fetched; otherwise, determining the number of the filling numbers of the number pool to be fetched.
Optionally, as shown in fig. 4, the apparatus further includes:
and the adding unit 36 is configured to add the target number to the pool of to-be-fetched numbers if the target number is detected to be unbinding from the specified object after the monitoring unit 32 monitors that the target number is successfully bound with the specified object within the first preset time period.
Optionally, as shown in fig. 4, the apparatus further includes:
a detecting unit 37, configured to detect whether there is a bound number in the pool of to-be-fetched numbers and the pool of fetched numbers at a set frequency; if so, the detected number is deleted.
Optionally, as shown in fig. 4, the target number of the current allocation task is a number specified by the user, or the target number of the current allocation task is the minimum value of existing numbers in the number pool to be fetched.
In the number allocation device provided in the embodiment of the present invention, a detailed description of a method adopted in the operation process of each functional module may refer to a detailed description of a corresponding method of the method embodiment of fig. 1 and fig. 2, which is not repeated herein.
Further, according to the above embodiment, another embodiment of the present invention further provides a computer readable storage medium, where the storage medium includes a stored program, and when the program runs, the device where the storage medium is controlled to execute the number allocation method described in fig. 1 or fig. 2.
Further, according to the above embodiment, another embodiment of the present invention further provides a storage management device, including:
a memory for storing a program;
and a processor coupled to the memory for executing the program to perform the number assignment method described in fig. 1 or fig. 2.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the methods and apparatus described above may be referenced to one another. In addition, the "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent the merits and merits of the embodiments.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components in the methods, apparatus and framework of operation of the deep neural network model according to embodiments of the present invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present invention can also be implemented as an apparatus or device program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.

Claims (10)

1. A method of assigning numbers, the method comprising:
moving a target number aiming at a current allocation task in a number pool to be fetched to a number pool to be fetched, wherein the number pool to be fetched is used for placing a plurality of continuous numbers after the maximum value of a first designated number segment, and the number pool to be fetched is used for placing numbers which are moved out of the number pool to be fetched, are occupied by the allocation task and are not bound by designated objects corresponding to the allocation task;
monitoring whether the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset time period;
if the binding is successful, deleting the target number in the acquired number pool;
and if the binding is unsuccessful, returning the target number from the fetched number pool to the to-be-fetched number pool.
2. The method of claim 1, wherein before moving the target number for the current allocation task in the pool of to-be-fetched numbers to the pool of fetched numbers, the method further comprises:
if the number exists in the interrupt number pool, selecting a target number aiming at the current allocation task from the interrupt number pool, and moving the selected target number to the acquired number pool, wherein the interrupt number pool is used for placing a number which is not successfully bound by the appointed object before the maximum value of the first appointed number segment.
3. The method of claim 1, wherein moving the destination number for the current allocation task in the pool of to-be-fetched numbers to the pool of fetched numbers comprises:
acquiring a distributed lock corresponding to the number pool to be fetched, wherein the distributed lock is used for limiting the number pool to be fetched to only provide numbers for one allocation task at the same time;
and moving the target number aiming at the current allocation task in the number pool to the number pool based on the distributed lock.
4. The method of claim 1, wherein after moving the destination number from the pool of fetched numbers back to the pool of pending numbers, the method further comprises:
monitoring whether the appointed object applies for binding the target number or not within a second preset time period;
if the target number is applied to be bound, determining whether the target number is occupied by other allocation tasks;
and if the target number is not occupied by other allocation tasks, providing the target number for the specified object to bind, and deleting the target number in the number pool to be fetched when the target number is successfully bound with the specified object.
5. The method according to claim 1, wherein the method further comprises:
after a target number aiming at a current allocation task in a to-be-fetched number pool is moved to a fetched number pool or a set frequency is used, monitoring whether the total amount of numbers in the to-be-fetched number pool and the fetched number pool is smaller than a number threshold;
if the number is smaller than the number threshold, determining the number of the filling number of the number pool to be fetched, generating a number corresponding to the number of the filling number based on the maximum value of the existing numbers in the number pool to be fetched and the number pool to be fetched, and placing the generated number in the number pool to be fetched.
6. The method of claim 5, wherein after monitoring that the total amount is less than a quantity threshold, prior to determining the number of fill numbers for the pool of to-be-fetched numbers, the method further comprises:
determining whether the maximum value of the existing numbers in the pool of numbers to be fetched and the pool of numbers to be fetched is a second specified maximum value;
if yes, stopping generating the number aiming at the number pool to be fetched;
otherwise, determining the number of the filling numbers of the number pool to be fetched.
7. The method of any of claims 1-6, wherein after monitoring that the target number is successfully bound to the specified object within a first preset time period, the method further comprises:
if the target number is detected to be unbinding with the appointed object, adding the target number into the number pool to be fetched;
and/or the number of the groups of groups,
the method further comprises the steps of:
detecting whether the number to be fetched and the number fetched exist in the number pool or not according to set frequency;
if so, deleting the detected number;
and/or the number of the groups of groups,
the target number of the current allocation task is a number appointed by a user, or the target number of the current allocation task is the minimum value of the existing numbers in the number pool to be fetched.
8. A number allocation apparatus, the apparatus comprising:
the mobile unit is used for moving a target number aiming at a current allocation task in a number pool to be fetched to a number pool which is used for placing a plurality of continuous numbers after the maximum value of a first designated number segment, and the number pool which is used for placing numbers which are moved out of the number pool to be fetched and occupied by the allocation task but not bound by a designated object corresponding to the allocation task;
the monitoring unit is used for monitoring whether the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset duration;
the deleting unit is used for detecting that the target number is successfully bound with a specified object corresponding to the current allocation task within a first preset duration in the monitoring unit, and deleting the target number in the acquired number pool;
and the return unit is used for monitoring that the target number is not successfully bound with the appointed object corresponding to the current allocation task within a first preset time period by the monitoring unit, and returning the target number from the acquired number pool to the to-be-acquired number pool.
9. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the number allocation method of any one of claims 1 to 7.
10. A storage management device, the storage management device comprising:
a memory for storing a program;
a processor coupled to the memory for running the program to perform the number allocation method of any one of claims 1 to 7.
CN202110895168.3A 2021-08-05 2021-08-05 Number allocation method and device Active CN113592458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110895168.3A CN113592458B (en) 2021-08-05 2021-08-05 Number allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110895168.3A CN113592458B (en) 2021-08-05 2021-08-05 Number allocation method and device

Publications (2)

Publication Number Publication Date
CN113592458A CN113592458A (en) 2021-11-02
CN113592458B true CN113592458B (en) 2024-01-12

Family

ID=78255336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110895168.3A Active CN113592458B (en) 2021-08-05 2021-08-05 Number allocation method and device

Country Status (1)

Country Link
CN (1) CN113592458B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115915113B (en) * 2022-11-25 2024-04-16 中国联合网络通信集团有限公司 Method, device and storage medium for determining number segment association equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609330A (en) * 2012-02-06 2012-07-25 中国农业银行股份有限公司 Document number generating method and document number generating system
CN110062374A (en) * 2019-05-31 2019-07-26 贵阳朗玛通信科技有限公司 The distribution method and device of a kind of number and SIM card
CN111427662A (en) * 2020-03-23 2020-07-17 深信服科技股份有限公司 Method for allocating IP addresses of virtual machines, terminal equipment and DHCP server
CN111708921A (en) * 2020-06-11 2020-09-25 中国建设银行股份有限公司 Number selection method, device, equipment and storage medium
CN113127561A (en) * 2020-01-14 2021-07-16 北京京东振世信息技术有限公司 Method and device for generating service order number, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992736A (en) * 2005-12-30 2007-07-04 西门子(中国)有限公司 IP address distribution method and use thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609330A (en) * 2012-02-06 2012-07-25 中国农业银行股份有限公司 Document number generating method and document number generating system
CN110062374A (en) * 2019-05-31 2019-07-26 贵阳朗玛通信科技有限公司 The distribution method and device of a kind of number and SIM card
CN113127561A (en) * 2020-01-14 2021-07-16 北京京东振世信息技术有限公司 Method and device for generating service order number, electronic equipment and storage medium
CN111427662A (en) * 2020-03-23 2020-07-17 深信服科技股份有限公司 Method for allocating IP addresses of virtual machines, terminal equipment and DHCP server
CN111708921A (en) * 2020-06-11 2020-09-25 中国建设银行股份有限公司 Number selection method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113592458A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN109857592B (en) Data recovery control method, server and storage medium
CN113592458B (en) Number allocation method and device
CN102831045A (en) Method and device for detecting starting items in terminal equipment
CN110147271A (en) Promote the method, apparatus and computer readable storage medium of crawler agent quality
CN108306874B (en) Service interface access current limiting method and device
CN114596530B (en) Airplane refueling intelligent management method and device based on non-contact optical AI
CN111176833A (en) Task allocation method and system for multiprocessing nodes
CN117170873B (en) Resource pool management method and system based on artificial intelligence
CN109947487A (en) A kind of method, apparatus, computer equipment and storage medium improving chip starting speed
CN113051054A (en) Method, apparatus and computer readable storage medium for scheduling artificial intelligence platform resources
CN109035451A (en) Parking Fee calculation method, device and computer readable storage medium
CN112181637A (en) Memory resource allocation method and device
CN108616824B (en) Switching method and device of motion group and computer readable storage medium
CN115469980A (en) Product medium download task scheduling method and device and electronic equipment
CN107493315B (en) Behavior data collection method, resource server and storage medium
CN112685158B (en) Task scheduling method and device, electronic equipment and storage medium
CN115099666A (en) Robot scheduling method and device and electronic equipment
CN110825528B (en) Resource management method, device and equipment
CN110516922B (en) Method and device for distributing data processing objects
CN110851286B (en) Thread management method and device, electronic equipment and storage medium
CN107291500B (en) Data distribution method and device for starting process
CN113867926A (en) Cloud environment management method, cloud environment management platform and storage medium
CN112631730A (en) Model processing method and device, equipment and computer readable storage medium
CN107483532B (en) Behavior data uploading method, resource server and storage medium
CN110568978A (en) Dynamic loading method and device for list display data

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
GR01 Patent grant
GR01 Patent grant