Number selection method and related equipment

By using bitmaps to store used extension numbers corresponding to virtual numbers, the problem of low virtual number utilization and storage performance during peak hours is solved, and a more efficient number selection process is achieved.

CN118740986APending Publication Date: 2024-10-01BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410994169.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The utilization rate of virtual numbers in the existing technology is low and it is difficult to implement large-scale applications. Moreover, when the number of number selection requests is large during peak hours, storage performance and query time-consuming problems are prominent.

Method used

A bitmap is used instead of a collection to store the used extension numbers corresponding to the virtual number. The data structure of the bitmap is used to reduce the amount of storage and reading data and improve the speed of number selection.

Benefits of technology

It significantly reduces the storage space occupied and the data bandwidth of the number selection process, and improves the extension number selection speed and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740986A_ABST
    Figure CN118740986A_ABST
Patent Text Reader

Abstract

The invention provides a number selection method and related equipment. The method comprises the steps that in response to a received number selection request, a bitmap corresponding to the number selection request is obtained, the bitmap comprises a plurality of elements, and each element corresponds to one number; determining at least one unused number according to the information of each element of the bitmap; and selecting a target number from the at least one unused number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a number selection method and related equipment. Background Art

[0002] With the development of Internet technology, many life services are integrated with the Internet. For example, online shopping, food delivery services, etc. In the service process, the service provider and the service recipient may need to communicate by phone.

[0003] In the related art, in order to prevent telephone information from being disclosed, a virtual number can be used to replace the actual telephone number. In addition, in order to improve the efficiency of using the virtual number, the related art adds an extension number to the virtual number.

[0004] However, the inventors of the present disclosure have discovered that there are certain problems with the selection and storage of extension numbers. Summary of the invention

[0005] In view of this, the present disclosure proposes a number selection method and related devices to solve or partially solve the above problems.

[0006] In a first aspect, the present disclosure provides a number selection method, comprising:

[0007] In response to receiving a number selection request, obtaining a bitmap corresponding to the number selection request, the bitmap comprising a plurality of elements, each of the elements corresponding to a number;

[0008] Determining at least one unused number according to information of each element of the bitmap;

[0009] A target number is selected from the at least one unused number.

[0010] In a second aspect of the present disclosure, a number selection device is provided, comprising:

[0011] The acquisition module is configured to: in response to receiving a number selection request, acquire a bitmap corresponding to the number selection request, wherein the bitmap includes a plurality of elements, each of which corresponds to a number;

[0012] A determination module is configured to: determine at least one unused number according to information of each element of the bitmap;

[0013] The selection module is configured to select a target number from the at least one unused number.

[0014] In a third aspect of the present disclosure, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect is implemented.

[0015] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect.

[0016] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed on a computer, cause the computer to execute the method described in the first aspect.

[0017] From the above description, it can be seen that the number selection method and related equipment provided by the present disclosure, by establishing a corresponding relationship between a bitmap and a number, and then realizing number selection based on the bitmap, achieves the effect of reducing the amount of data storage and improving the number selection speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1A A schematic diagram of an exemplary system according to an embodiment of the present disclosure is shown.

[0020] Figure 1B An exemplary principle schematic diagram of the AXE mode is shown.

[0021] Figure 1C A schematic diagram of an exemplary number selection system provided by an embodiment of the present disclosure is shown.

[0022] Figure 2 A schematic diagram of an exemplary method provided by an embodiment of the present disclosure is shown.

[0023] Figure 3 A schematic diagram showing an exemplary storage space of a cache according to an embodiment of the present disclosure is shown.

[0024] Figure 4 Another schematic diagram of an exemplary storage space of a cache according to an embodiment of the present disclosure is shown.

[0025] Figure 5 A schematic diagram showing an exemplary computer device provided by an embodiment of the present disclosure is shown.

[0026] Figure 6 A schematic diagram showing an exemplary device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0027] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0028] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0029] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0030] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0031] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0032] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0033] Figure 1A A schematic diagram of an exemplary system 100 according to an embodiment of the present disclosure is shown.

[0034] like Figure 1A As shown, the system 100 may include a terminal device 102A, a terminal device 102B, a server 104, and a database server 106. The terminal devices 102A and 102B are connected to the server 104 via a network, such as a wired or wireless network connection. Optionally, the device for implementing number selection may be integrated in the server 104. The database server 106 is connected to the server 104 via a network, such as a wired or wireless network connection. The database server 106 may store various data related to the execution of the number selection method, such as an actual number, a virtual number corresponding to the actual number, an association between the actual number and the virtual number, and the like.

[0035] Various applications (Application, APP, Chinese abbreviation: application) or software can be installed on the terminal device 102A and the terminal device 102B, such as life service applications or software, image processing applications or software, video conferencing applications or software, reading applications or software, video applications or software, social applications or software, payment applications or software, web browsers and instant messaging tools, etc. These applications or software can all be used to implement number selection.

[0036] The terminal devices 102A and 102B here can be hardware or software. When the terminal devices 102A and 102B are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, MP3 players, laptop computers (Laptops) and desktop computers (PCs), etc. When the terminal devices 102A and 102B are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. It is not specifically limited here.

[0037] The server 104 may be a server that provides various services. For example, it may be a background server that provides support for various applications displayed on the terminal device 102A and the terminal device 102B. The database server 106 may also be a database server that provides various services. It is understood that if the server 104 can implement the relevant functions of the database server 106, the database server 106 may not be provided in the system 100.

[0038] Here, the server 104 and the database server 106 can also be hardware or software. When they are hardware, they can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When they are software, they can be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. No specific limitation is made here.

[0039] It should be noted that the object display method provided in the embodiment of the present disclosure can be executed by the system 100. Specifically, it can be interactively executed between the terminal device 102A, the terminal device 102B, the server 104 and the database server 106. It is understood that in the case where the terminal device 102A and the terminal device 102B have the functions required by the server 104 and the database server 106 to execute the number selection method, the terminal device 102 can also execute it alone. It should be understood that Figure 1A The number of terminal devices 102A, terminal devices 102B, servers 104, database servers 106, and users 108 in the embodiment is only for illustration. Any number of terminal devices, users, servers, and database servers may be provided according to actual needs.

[0040] In an exemplary application scenario, user 108A can input instructions for obtaining life services (for example, travel, logistics, food delivery, cleaning, etc.) through terminal device 102A. Server 104 can recommend services provided by user 108B to user 108A based on the instructions, and can send instructions for providing services to terminal device 102B, so that user 108A and user 108B can establish contact to enable user 108B to provide life services to user 108A.

[0041] As described in the background art, in the service process, a service provider (e.g., user 108B) and a service recipient (e.g., user 108A) may need to communicate via telephone. In the related art, in order to prevent telephone information from being disclosed, a virtual number can be used instead of an actual telephone number.

[0042] One implementation method may be AXB mode, which is a technology for protecting calls and is mainly used to prevent users from disclosing their actual phone numbers when making calls. In this mode, the server 104 may bind a virtual number X to each of the user 108A and the user 108B, so that both parties can only see the virtual number X during a call and cannot know the actual number of the other party.

[0043] However, there is a problem with the AXB mode. Since a single virtual number X can only be bound to a pair of users, user 108A and user 108B, the utilization rate of the virtual number is low, making it difficult to achieve large-scale application.

[0044] AXE mode introduces extension number E based on AXB mode. In AXE mode, the virtual number can be extended to XE, where E is a unique extension number used to bind to different users A.

[0045] Figure 1B An exemplary principle schematic diagram of the AXE mode is shown.

[0046] like Figure 1B As shown, for example, user A1 and user B1 can be bound by virtual number 12345678901 and extension number 0000, and user An and user Bn can be bound by virtual number 12345678901 and extension number 9999.

[0047] In this way, a virtual number X can be extended to multiple extension numbers, so that multiple groups of users can be bound, which greatly improves the utilization rate of virtual number X and reduces costs. At the same time, virtual number X can also be effectively reused during peak hours.

[0048] In some embodiments, the selection of virtual numbers and extension numbers can be implemented by a platform that provides number selection services. Therefore, when the server 104 needs to bind virtual numbers and extension numbers for the users 108A and 108B, it can send a number selection request by calling the application programming interface (API) of the number selection service, so that the number selection service selects the virtual number and extension number and returns the number selection result to the server 104, and then the server 104 returns the number selection result to the users 108A and 108B, so that the users 108A and 108B can call each other based on the virtual number and extension number corresponding to the number selection result.

[0049] Figure 1C A schematic diagram of an exemplary number selection system 120 according to an embodiment of the present disclosure is shown.

[0050] like Figure 1C As shown, the number selection system 120 may include a server 122 for deploying the number selection service, a cache 124, and a database server 126. When the server 104 needs to bind a virtual number and an extension number for the user 108A and the user 108B, a number selection request may be sent to the number selection system 120 to obtain the virtual number and the extension number for binding the user 108A and the user 108B.

[0051] Optionally, the database server 126 can be a relational database (e.g., MySQL), which can be used to store a large amount of structured data and can provide complex data query and transaction processing capabilities. Generally, a virtual number has 11 digits and requires a large storage space for storage. In addition, since there are many users who subscribe to the number selection service (e.g., different food delivery platforms, different logistics platforms, different travel platforms, etc.), each user needs to be assigned a different virtual number segment, so the association between the user and the virtual number segment also needs to be stored. In addition, some necessary information needs to be stored. Therefore, in this embodiment, these data can be stored in the database server 126.

[0052] However, in some scenarios (e.g., take-out scenarios), the number selection requests during peak hours may be large. Considering the storage performance and query time of the database server 126, the number selection system 120 can set a cache 124 (e.g., Redis) as an intermediate storage device.

[0053] The cache 124 can load a portion of virtual numbers from the database server 126, and then, after receiving the number selection request, the server 122 first selects a number from the cache 124. Since the data in the cache 124 is stored in the memory of the physical device, its read and write speed is much faster than that of the database server 126, thereby improving the overall performance of the number selection system 120. At the same time, due to the existence of the cache 124, the access pressure of the database server 126 during peak hours is also greatly reduced.

[0054] As mentioned above, in the AXE mode, a virtual number can be bound to multiple extension numbers. Therefore, in some embodiments, the cache 124 also needs to store the used extension numbers corresponding to the virtual number, so that when selecting a number, it is necessary to avoid the used extension numbers and select the unused extension numbers of the virtual number. Therefore, in terms of technical implementation, it is first necessary to know which extension numbers the current virtual number X has occupied, and then exclude the occupied extension numbers within the range of the full set of extension numbers (for example, "0000" to "9999"), and then randomly assign an available extension number to the user.

[0055] For example, when using Redis cache to store the used extension numbers corresponding to the virtual numbers, the used extension numbers are generally stored in a set data structure. This is because in Redis, a set data structure can be used to store multiple string elements, and these elements are not allowed to be repeated, and the extension number is just such a string element.

[0056] For example, when Redis cache is used to store used extension numbers corresponding to virtual numbers, if the extension numbers "0203" and "9866" are already occupied, there may be two elements in the set, ["0203", "9866"].

[0057] However, the inventor of the present disclosure discovered that when selecting a number, it is necessary to read all the extension numbers that have been occupied by the virtual number from the set of used extension numbers corresponding to the virtual number. In the set, the extension numbers are stored as strings, and one extension number occupies 4 bytes. The maximum read traffic for a single read is 4B×10,000 (a maximum of 10,000 extension numbers)=40KB. In this way, the extension number of a virtual number stored in cache 124 requires a maximum of 40KB of storage. When the number of virtual numbers is large, a large amount of cache storage space will be occupied; in addition, due to the high bandwidth of a single read data, it will also cause the extension number selection of the virtual number to take a long time.

[0058] Figure 2 A flowchart of an exemplary method 200 provided in an embodiment of the present disclosure is shown.

[0059] Optionally, the method 200 is used to select a number (e.g., select an extension number of a virtual number), and can be Figure 1C The server 122 or cache 124 can be implemented separately or by Figure 1C The number selection system 120 is implemented. Figure 2 As shown, method 200 may include the following steps.

[0060] In step 202, in response to receiving a number selection request, a bitmap corresponding to the number selection request is obtained.

[0061] As mentioned above, after selecting a virtual number, you can continue to select an extension number from the available extension numbers of the virtual number. At this time, you need to know which extension numbers of the virtual number are already used.

[0062] In this embodiment, a set (SET) is no longer used to store the used extension numbers of the virtual number, but a bitmap is used, so that the amount of read data and the amount of stored data can be reduced.

[0063] In Redis, a bitmap (also called a bit array or bit vector, etc.) is a series of continuous binary arrays (0 and 1). The elements in the bitmap can be located by offset. It is a data structure that implements bit operations. You can think of a bitmap as an array in bits. Each element of the array can only store 0 and 1. The subscript of the array in the bitmap is called the offset. Since bit is the smallest unit in a computer, using it for storage will save storage space and reduce the amount of data read.

[0064] Figure 3 A schematic diagram showing an exemplary storage space of the cache 124 according to an embodiment of the present disclosure is shown.

[0065] like Figure 3 As shown, for example, assuming that three virtual numbers X1, X2, and X3 are loaded into the cache 124, the cache 124 may store bitmaps 1242, 1244, and 1246 corresponding to the three virtual numbers X1, X2, and X3.

[0066] When the cache 124 uses Redis, it is necessary to query data based on a key-value pair (Key-Value) method. Therefore, after a virtual number (e.g., virtual number X1) is selected, the corresponding Value, i.e., the bitmap 1242, can be found based on the Key corresponding to the virtual number (e.g., prefix + virtual number X1). At this time, after the virtual number is selected, the request to further select the extension number corresponding to the virtual number can be considered as the number selection request.

[0067] like Figure 3 As shown, the bitmap 1242 may include multiple elements, each element corresponding to an extension number. Optionally, the extension number includes 4 digits, and the bitmap 1242 includes 10,000 elements, so that each element can correspond to an extension number, that is, the bitmap 1242 can correspond to the extension numbers of "0000" to "9999" one by one. Exemplarily, according to the offset of the element in the bitmap and the order of "0000" to "9999", the elements of the bitmap 1242 can be matched to "0000" to "9999" in order, so as to facilitate the search and correspondence.

[0068] After the bitmap is obtained, the process may proceed to step 204 to determine at least one unused number based on information of each element of the bitmap.

[0069] like Figure 3 As shown, each element in the bitmap 1242 can record different information to indicate whether the number corresponding to the element has been used or not.

[0070] Therefore, in some embodiments, the step 204 of determining at least one unused number according to the information of each element of the bitmap may further include the following steps:

[0071] According to the information of each element of the bitmap, determining that the information is an element of the first information; optionally, when the information is the first information, it indicates that the number corresponding to the element corresponding to the first information has been used or has not been used; for example, if the information of the element is 1, it indicates that the number corresponding to the element has been used, and if the information of the element is 0, it indicates that the number corresponding to the element has not been used;

[0072] At least one unused number is determined according to the information being an element of the first information.

[0073] For example, assuming that the first information is 1 and indicates that the number corresponding to the element has been used, by traversing each element in the bitmap 1242, you can know which elements have information 1, and then, based on the correspondence between each element in the bitmap 1242 and the number, you can determine at least one unused number.

[0074] It can be known that since the storage space occupied by the bitmap 1242 is approximately 10000×1 bit (one bit is used to represent whether an extension number is occupied)=1.25 KB, the resources consumed by traversing the bitmap can be greatly reduced.

[0075] In step 206, a target number is selected from the at least one unused number.

[0076] like Figure 3 As shown, illustratively, if the information of the third element of the bitmap 1242 is 1, it means that the number 0002 has been used. Therefore, in this step, the target number can be selected from other extension numbers except 0002 in "0000" to "9999".

[0077] In some embodiments, the target number can be randomly selected from the at least one unused number, thereby eliminating the need to design a special selection algorithm and reducing processing complexity.

[0078] After the target number is selected, the virtual number X1 and the target number can be returned to the server 104 together, so that the server 104 can bind the user 108A and the user 108B based on the virtual number X1 and the target number, and return the virtual number X1 and the target number to the user 108A and the user 108B, so that the user 108A and the user 108B can establish a connection based on the virtual number X1 and the target number.

[0079] In some embodiments, after selecting the target number from the at least one unused number, the method 200 further includes:

[0080] Determine a target element of the target number in the bitmap;

[0081] The information of the target element is modified so that the target element is indicated as having a corresponding target number that has been used.

[0082] like Figure 4As shown, illustratively, assuming that the target number is 0004, it can be determined that the target element of the target number in the bitmap 1242 is the 5th element, and then the information of the 5th element can be modified from 0 to 1. In this way, the next time the bitmap 1242 is traversed, it can be determined that 0004 has been used according to the information of the 5th element.

[0083] The number selection method provided by the embodiment of the present disclosure takes into account that the extension number range is a sequential data structure of "0000" to "9999". By using one bit to represent one extension number, a maximum of 10,000 bits can represent 10,000 extension numbers.

[0084] In terms of implementation, Redis cache supports bitmap data structure, which can store extension numbers. When binding, the bit corresponding to the target number is set to 1 through bit operation, which means that the target number is occupied. For example, if the target number is 0005, set the bit of offset=5 to 1.

[0085] The number selection method provided by the embodiment of the present disclosure uses a bitmap storage space of about 10000×1 bit (one bit is used to represent whether an extension number is occupied) = 1.25KB, and the storage space is about 1 / 32 of that stored through a set, which greatly saves data storage space. In addition, the data flow rate of the bitmap when determining the number has been used is also about 1 / 32 of the original, and the data bandwidth of the number selection process is reduced, which also improves the speed of selecting extension numbers.

[0086] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0087] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0088] The embodiment of the present disclosure also provides a computer device for implementing the above method 200. Figure 5FIG. 5 is a schematic diagram showing the hardware structure of an exemplary computer device 500 provided in an embodiment of the present disclosure. The computer device 500 can be used to implement Figure 1A The terminal devices 102A, 102B, the server 104 and the database server 106 can also be used to implement Figure 1C Server 122, cache 124, and database server 126.

[0089] like Figure 5 As shown, the computer device 500 may include: a processor 502, a memory 504, a network module 506, a peripheral interface 508 and a bus 510. The processor 502, the memory 504, the network module 506 and the peripheral interface 508 are connected to each other in communication within the computer device 500 through the bus 510.

[0090] Processor 502 may be a central processing unit (CPU), an image processor, a neural network processor (NPU), a microcontroller (MCU), a programmable logic device, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or one or more integrated circuits. Processor 502 may be used to perform functions related to the technology described in this disclosure. In some embodiments, processor 502 may also include multiple processors integrated into a single logical component. For example, Figure 5 As shown, processor 502 may include a plurality of processors 502a, 502b, and 502c.

[0091] The memory 504 may be configured to store data (eg, instructions, computer code, etc.). Figure 5 As shown, the data stored in the memory 504 may include program instructions (e.g., program instructions for implementing the method 200 of the embodiment of the present disclosure) and data to be processed (e.g., the memory may store configuration files of other modules, etc.). The processor 502 may also access the program instructions and data stored in the memory 504, and execute the program instructions to operate on the data to be processed. The memory 504 may include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 504 may include a random access memory (RAM), a read-only memory (ROM), an optical disk, a magnetic disk, a hard disk, a solid-state drive (SSD), a flash memory, a memory stick, etc.

[0092] The network interface 506 can be configured to provide the computer device 500 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC)), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the above specific examples.

[0093] The peripheral interface 508 can be configured to connect the computer device 500 to one or more peripheral devices to achieve information input and output. For example, the peripheral devices can include input devices such as a keyboard, a mouse, a touch pad, a touch screen, a microphone, and various sensors, and output devices such as a display, a speaker, a vibrator, and an indicator light.

[0094] The bus 510 may be configured to transmit information between various components of the computer device 500 (e.g., the processor 502, the memory 504, the network interface 506, and the peripheral interface 508), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.

[0095] It should be noted that, although the architecture of the above-mentioned computer device 500 only shows the processor 502, the memory 504, the network interface 506, the peripheral interface 508 and the bus 510, in the specific implementation process, the architecture of the computer device 500 may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the architecture of the above-mentioned computer device 500 may also only include the components necessary for implementing the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.

[0096] Based on the same technical concept, corresponding to any of the above-mentioned embodiments and methods 200, the present disclosure further provides a number selection device 600.

[0097] refer to Figure 6 , the number selection device 600 comprises:

[0098] The acquisition module 602 is configured to: in response to receiving a number selection request, acquire a bitmap corresponding to the number selection request, the bitmap comprising a plurality of elements, each of which corresponds to a number;

[0099] The determination module 604 is configured to: determine at least one unused number according to information of each element of the bitmap;

[0100] The selection module 606 is configured to select a target number from the at least one unused number.

[0101] In some embodiments, the determination module 604 is configured to:

[0102] According to information of each element of the bitmap, determining that the information is an element of the first information;

[0103] At least one unused number is determined according to the information being an element of the first information.

[0104] In some embodiments, when the information is the first information, it indicates that the number corresponding to the element corresponding to the first information has been used or has not been used.

[0105] In some embodiments, if the information of the element is 1, it indicates that the number corresponding to the element has been used, and if the information of the element is 0, it indicates that the number corresponding to the element has not been used.

[0106] In some embodiments, the determination module 604 is configured to: determine at least one unused number according to the information being an element of the first information and in combination with the correspondence between each element of the bitmap and the number.

[0107] In some embodiments, the number comprises 4 digits, the bitmap comprises 10,000 elements, and the bitmap is stored in a cache.

[0108] In some embodiments, the selection module 606 is configured to:

[0109] Determine a target element of the target number in the bitmap;

[0110] The information of the target element is modified so that the target element is indicated as having a corresponding target number that has been used.

[0111] In some embodiments, the number is an extension of a virtual number.

[0112] In some embodiments, the selection module 606 is configured to randomly select the target number from the at least one unused number.

[0113] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0114] The device of the above embodiment is used to implement the corresponding method 200 in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0115] Based on the same technical concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, method 200 as described in any of the above embodiments is implemented.

[0116] Based on the same technical concept, corresponding to any of the above-mentioned embodiments, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute method 200 described in any of the above embodiments.

[0117] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0118] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method 200 described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0119] Based on the same inventive concept, corresponding to the method 200 described in any of the above embodiments, the present disclosure further provides a computer program product, including computer program instructions, which, when executed on a computer, enable the computer to execute the method 200 described in any of the above embodiments. In some embodiments, the computer program instructions may be executed by one or more processors of a computer so that the computer and / or the processor execute the method 200. Corresponding to the execution subject corresponding to each step in each embodiment of the method 200, the processor that executes the corresponding step may belong to the corresponding execution subject.

[0120] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the method 200 described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.

[0121] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0122] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0123] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0124] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A method for selecting a number, include: In response to receiving a number selection request, obtaining a bitmap corresponding to the number selection request, the bitmap comprising a plurality of elements, each of the elements corresponding to a number; Determining at least one unused number according to information of each element of the bitmap; A target number is selected from the at least one unused number.

2. The method according to claim 1, in, Determining at least one unused number according to information of each element of the bitmap, comprising: According to information of each element of the bitmap, determining that the information is an element of the first information; At least one unused number is determined according to the information being an element of the first information.

3. The method according to claim 2, in, When the information is the first information, it indicates that the number corresponding to the element corresponding to the first information has been used or has not been used.

4. The method according to claim 2, in, If the information of the element is 1, it means that the number corresponding to the element has been used; if the information of the element is 0, it means that the number corresponding to the element has not been used.

5. The method according to claim 2, in, Determining at least one unused number according to the information being an element of the first information includes: At least one unused number is determined according to the information being an element of the first information and in combination with a corresponding relationship between each element of the bitmap and a number.

6. The method according to claim 1, in, The number includes 4 digits, the bitmap includes 10,000 elements, and the bitmap is stored in a cache.

7. The method according to claim 6, in, After selecting a target number from the at least one unused number, the method further comprises: Determine a target element of the target number in the bitmap; The information of the target element is modified so that the target element is indicated as having a corresponding target number that has been used.

8. The method according to claim 6, in, The number is the extension number of the virtual number.

9. The method according to claim 1, in, Selecting a target number from the at least one unused number comprises: The target number is randomly selected from the at least one unused number.

10. A number selection device, include: The acquisition module is configured to: in response to receiving a number selection request, acquire a bitmap corresponding to the number selection request, wherein the bitmap includes a plurality of elements, each of which corresponds to a number; A determination module is configured to: determine at least one unused number according to information of each element of the bitmap; The selection module is configured to select a target number from the at least one unused number.

11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, in, When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.

12. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.

13. A computer program product, in, The method comprises computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 9.