Privacy number generation method and device, equipment, medium and program product
By determining the available privacy number primary key and extension number based on the real number in the privacy number system, and generating number selection data containing multiple privacy numbers, the problem that traditional mode cannot meet diverse needs and large storage space occupancy is solved, and flexible combination and efficient storage are achieved.
Patent Information
- Application Number
- CN202510595592.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-06-20
AI Technical Summary
In the prior art, the traditional privacy account binding model cannot meet the diverse needs of users. Temporary customization of the new model increases development costs and lacks flexibility. At the same time, as the number of users increases, the storage space of the privacy account occupies a large amount.
By determining the first available privacy number primary key and the second available privacy number primary key based on the target city and number pool of available privacy numbers corresponding to the first real number and the second real number, and determining the target extension number and privacy number based on these primary keys, selecting data containing multiple privacy numbers is generated.
It realizes the generation of new models through free combination without re-customization and development, reduces system communication overhead and improves the utilization of privacy storage space.
Smart Images

Figure CN120186264A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to a method, apparatus, device, medium, and program product for generating privacy numbers. Background Art
[0002] A privacy number is a service that is applied in various business scenarios to hide the real numbers of business personnel and users, and the two parties only contact each other through the privacy number to protect the number privacy of both parties.
[0003] In the process of implementing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technologies: Traditional privacy number binding modes such as AX, AXB, AXE, etc. can no longer meet the diverse current and future needs of users. Temporarily customizing a new model not only increases the development cost but also lacks flexibility, and as the number of users grows, the storage space of privacy numbers increases rapidly, resulting in a large occupation of storage space. Summary of the Invention
[0004] In view of this, the present disclosure provides a method, apparatus, device, medium, and program product for generating privacy numbers.
[0005] One aspect of the present disclosure provides a method for generating a privacy number, including: determining a first available privacy number primary key corresponding to the first real number and a second available privacy number primary key corresponding to the second real number from the respective privacy number primary key queues according to the target cities and number pools where the first real number and the second real number respectively have available privacy numbers; determining a target extension number from the extension number queue according to the number pool and the first available privacy number primary key; determining a first target privacy number from the candidate privacy number queue according to the first available privacy number primary key; in response to the second available privacy number primary key not being bound to the first real number and / or the second real number, determining a second target privacy number from the candidate privacy number queue according to the second available privacy number primary key, and generating selection number data including the first target privacy number, the target extension number, and the second target privacy number.
[0006] According to an embodiment of the present disclosure, the privacy number primary key queue includes a plurality of privacy number primary keys, the privacy number primary key queue is stored in a privacy number primary key bitmap, and the privacy number primary key bitmap includes a main privacy number primary key bitmap.
[0007] According to an embodiment of the present disclosure, determining a first available privacy number primary key corresponding to a first real number from a privacy number primary key queue includes: determining a plurality of privacy number primary keys and key values corresponding to their respective privacy number primary keys from a main privacy number primary key bitmap according to a target city and a number pool where there are available privacy numbers corresponding to the first real number; in response to the first key value corresponding to the privacy number primary key being a preset key value, and in response to the privacy number primary key satisfying a preset condition, determining the privacy number primary key in the main privacy number primary key bitmap as the first available privacy number primary key.
[0008] According to an embodiment of the present disclosure, the privacy number primary key bitmap further includes a backup privacy number primary key bitmap. Determining a first available privacy number primary key corresponding to a first real number from the privacy number primary key queue further includes: in response to the first key value corresponding to the privacy number primary key in the main privacy number primary key bitmap being a preset key value, and in response to the privacy number primary key not satisfying a preset condition, determining a plurality of privacy number primary keys and key values corresponding to their respective privacy number primary keys from the backup privacy number primary key bitmap; obtaining the number of key values corresponding to the privacy number primary keys in the backup privacy number primary key bitmap that are preset key values; in response to the number of key values corresponding to the privacy number primary keys in the backup privacy number primary key bitmap that are preset key values being greater than a preset number, and in response to the privacy number primary key corresponding to the first key value being a preset key value satisfying a preset condition, determining the privacy number primary key in the backup privacy number primary key bitmap as the first available privacy number primary key.
[0009] According to an embodiment of the present disclosure, the candidate privacy number queue includes a plurality of candidate privacy numbers. Determining a first target privacy number from the candidate privacy number queue according to the first available privacy number primary key includes: determining a target candidate privacy number from the plurality of candidate privacy numbers according to the first available privacy number primary key; in response to the number of real numbers bound to the target candidate privacy number being less than a preset binding number, determining the target candidate privacy number as the first target privacy number.
[0010] According to an embodiment of the present disclosure, determining a target extension number from an extension number queue according to a number pool and the first available privacy number primary key includes: determining a plurality of extension numbers and extension key values corresponding to their respective extension numbers from the extension number queue according to the number pool and the first available privacy number primary key; in response to the first extension key value corresponding to the extension number being a preset key value, and in response to the extension number satisfying a preset condition, determining the extension number corresponding to the first extension key value as the target extension number.
[0011] According to an embodiment of the present disclosure, the method further includes: determining a set of cities corresponding to the first real number according to the number pool and identification information of the first real number, where the set of cities includes a plurality of candidate cities; randomly selecting a candidate city from the set of cities; in response to there being available privacy numbers for the privacy numbers corresponding to the candidate city, determining the candidate city as the target city where there are available privacy numbers corresponding to the first real number.
[0012] According to an embodiment of the present disclosure, before responding to the second available privacy number primary key not being bound to the first real number and / or the second real number, it further includes: adding the first real number and the second real number to the set of real numbers bound to the privacy number according to the number pool and the second available privacy number primary key; determining whether the second available privacy number primary key is bound to the first real number and / or the second real number.
[0013] Another aspect of the present disclosure provides a privacy number generation device, including: an available privacy number primary key determination module, configured to determine a first available privacy number primary key corresponding to the first real number and a second available privacy number primary key corresponding to the second real number from the respective privacy number primary key queues according to the target cities and number pools where there are available privacy numbers corresponding to the first real number and the second real number respectively; a target extension number determination module, configured to determine a target extension number from the extension number queue according to the number pool and the first available privacy number primary key; a first target privacy number determination module, configured to determine a first target privacy number from the candidate privacy number queue according to the first available privacy number primary key; a number selection data generation module, configured to, in response to the second available privacy number primary key not being bound to the first real number and / or the second real number, determine a second target privacy number from the candidate privacy number queue according to the second available privacy number primary key, and generate number selection data including the first target privacy number, the target extension number, and the second target privacy number.
[0014] Another aspect of the present disclosure provides an electronic device, including:
[0015] One or more processors;
[0016] A memory for storing one or more programs,
[0017] wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described above.
[0018] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method as described above when executed.
[0019] Another aspect of the present disclosure provides a computer program product, the computer program product including computer-executable instructions, which are used to implement the method as described above when executed.
[0020] According to an embodiment of the present disclosure, by determining the target city and number pool with available privacy numbers corresponding to the first real number and the second real number, determining the first available privacy number primary key and the second available privacy number primary key, and based on the first available privacy number primary key and the number pool, determining the target extension number and the first target privacy number. When it is determined that the second target privacy number primary key is not bound to the first real number and / or the second real number, determining the second target privacy number according to the second target privacy number primary key, and generating the number selection data including the first target privacy number, the target extension number and the second target privacy number. Since the target privacy number and the target extension number are determined by using the privacy number primary key, and by means of the technical means of verifying the uniqueness of the binding between the target privacy number and the real number, to solve the technical problems in the prior art that as the number of users increases, the storage space of privacy numbers occupies a large amount, and due to the need to re-customize and develop a new mode, there is a lack of flexibility and a large communication overhead. Furthermore, it achieves the technical effect of generating a new mode through free combination without re-customizing and developing, reducing the system communication overhead and increasing the storage space of privacy numbers. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Through the following description of the embodiments of the present disclosure with reference to the drawings, the above and other objects, features and advantages of the present disclosure will become clearer. In the drawings:
[0022] Figure 1 Schematically shows an exemplary system architecture to which the method and device for generating privacy numbers according to the embodiments of the present disclosure can be applied;
[0023] Figure 2 Schematically shows a schematic diagram of the AXE cache model established according to the embodiments of the present disclosure;
[0024] Figure 3 Schematically shows a schematic diagram of the construction of the AXB cache model established according to the embodiments of the present disclosure;
[0025] Figure 4 Schematically shows a schematic diagram of the cache model of the combined AXEXB / AXEYB established according to the embodiments of the present disclosure;
[0026] Figure 5 Schematically shows a flowchart of the method for generating privacy numbers according to the embodiments of the present disclosure;
[0027] Figure 6 Schematically shows a schematic diagram of the method for generating privacy numbers according to the embodiments of the present disclosure;
[0028] Figure 7 Schematically shows a schematic diagram of the construction of the AX cache model established according to the embodiments of the present disclosure;
[0029] Figure 8A block diagram of a privacy number generation device according to an embodiment of the present disclosure is schematically shown; and
[0030] Figure 9 A block diagram of an electronic device suitable for implementing a privacy number generation method according to an embodiment of the present disclosure is schematically shown. Detailed implementation manners
[0031] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments can be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present disclosure.
[0032] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising" and the like used herein indicate the presence of features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.
[0033] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0034] In the case of using expressions such as "at least one of A, B, and C", generally, it should be interpreted according to the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include, but is not limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0035] In the embodiments of the present disclosure, in terms of the collection, update, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information), they all comply with the provisions of relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and to maintain the security of user personal information and network security.
[0036] In the embodiments of the present disclosure, before obtaining or collecting user personal information, the authorization or consent of the user is obtained.
[0037] Embodiments of the present disclosure provide a method for generating a privacy number, including: determining a first available privacy number primary key corresponding to the first real number and a second available privacy number primary key corresponding to the second real number from the respective privacy number primary key queues according to the target cities and number pools where available privacy numbers exist for the first real number and the second real number respectively; determining a target extension number from the extension number queue according to the number pool and the first available privacy number primary key; determining a first target privacy number from the candidate privacy number queue according to the first available privacy number primary key; in response to the second available privacy number primary key not being bound to the first real number and / or the second real number, determining a second target privacy number from the candidate privacy number queue according to the second available privacy number primary key, and generating selection number data including the first target privacy number, the target extension number, and the second target privacy number.
[0038] First, concepts and technical terms related to the embodiments of the present disclosure are introduced.
[0039] Redis: (Remote Dictionary Server) is an open-source database written in C language, supporting network interaction, memory-based, distributed, and optionally persistent, storing data in the form of Key-Value (key-value), with redis's bitmap data structure, redis's set data structure, and redis's hash data structure.
[0040] Binding mode AX: To protect the real number of A from being leaked, a privacy number X is bound to A in the privacy number system. After the AX binding relationship is established: anyone can call X to contact A, protecting the real number of A from being leaked. The X number in the AX mode is only exclusive to the A number, that is, a privacy number X can only be bound to one A number at the same time. However, one A number can be bound to multiple X numbers at the same time. When the X number and the A number are unbound, the X number can be recycled for other numbers to bind.
[0041] Binding mode AXB: To make both A and B unaware of the existence of each other's real numbers and prevent their real numbers from being leaked, a privacy number X is bound to A and B in the privacy number system. A and B only present the X number to each other, and the communication between A and B is relayed through the X number. In the AXB mode, the X number is allowed to be bound by multiple groups of numbers, that is, it supports multi-channel concurrent calls, but the A and B numbers in multiple groups of numbers cannot be repeated. For example, it is allowed to bind AXB and CXD at the same time, but it is not allowed to bind AXB and BXC at the same time. If the same A number needs to be bound to different B numbers, different X numbers need to be used for binding. If AXB already exists and A and C need to be bound, another X number, such as AX1C, needs to be used. When the X number and the A and B numbers are unbound, the X number can be recycled for other numbers to bind.
[0042] Binding mode AXE: To protect the real number of A from being disclosed, the privacy number system binds a main extension number X and an extension number E to A. After the AXE binding relationship is established, anyone can contact A by dialing the number X and then entering the extension number E. In the AXE mode, one X number can be bound to multiple A numbers, and each A number is assigned a different extension number E; the maximum number of digits of the extension number E is 4 (i.e., 0000~9999). When the X number and the extension number E are unbound from the A number, the X number and the E extension number can be recycled for other numbers to bind.
[0043] Figure 1 Schematically shows an exemplary system architecture to which the method and apparatus for generating a privacy number according to an embodiment of the present disclosure can be applied. It should be noted that, Figure 1 The illustration is only an example of a system architecture to which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0044] As Figure 1 shown, the system architecture according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0045] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only as examples).
[0046] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.
[0047] Server 105 may be a server that provides various services. For example, it may be a background management server (only for example) that supports the websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process data such as user requests received, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0048] It should be noted that the method for generating a privacy number provided in the embodiments of the present disclosure can generally be executed by server 105. Correspondingly, the device for generating a privacy number provided in the embodiments of the present disclosure can generally be set in server 105. The method for generating a privacy number provided in the embodiments of the present disclosure can also be executed by a server or a server cluster different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the device for generating a privacy number provided in the embodiments of the present disclosure can also be set in a server or a server cluster different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Alternatively, the method for generating a privacy number provided in the embodiments of the present disclosure can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or can also be executed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Correspondingly, the device for generating a privacy number provided in the embodiments of the present disclosure can also be set in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or set in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0049] For example, the first real number and the second real number may originally be stored in any one of the first terminal device 101, the second terminal device 102, or the third terminal device 103 (for example, the first terminal device 101, but not limited thereto), or stored on an external storage device and can be imported into the first terminal device 101. Then, the first terminal device 101 may execute the method for generating a privacy number provided in the embodiments of the present disclosure locally, or send the first real number and the second real number to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the first real number and the second real number execute the method for generating a privacy number provided in the embodiments of the present disclosure.
[0050] It should be understood, Figure 1The numbers of terminal devices, networks, and servers in it are only illustrative. According to actual requirements, there can be any number of terminal devices, networks, and servers.
[0051] In an embodiment of the present disclosure, cache models of different single binding modes can be established in advance, so that the cache models of different single binding modes can be freely combined to generate a cache model of a combined binding mode. For example, Figure 2 Schematically shows a schematic diagram of the AXE cache model established according to an embodiment of the present disclosure; Figure 3 Schematically shows a schematic diagram of the construction of the AXB cache model established according to an embodiment of the present disclosure.
[0052] In one embodiment, as Figure 2 shown, in the process of establishing the AXE cache model, based on the known privacy numbers and the city data of the place of origin of the privacy numbers, a primary key snoId can be assigned to each privacy number respectively, and then the primary key snoId and the privacy number are stored in the "primary key index" in the hash data structure of redis. Among them, the key in the "primary key index" is snoId, and the value in the "primary key index" is the privacy number sno and the counter counter of the privacy number that has been bound to the real number. That is, in the "primary key index", a primary key snoId corresponds to a privacy number and a counter of the privacy number that has been bound to the real number.
[0053] Continuing as Figure 2 shown, a number pool number poolSN is assigned to all privacy numbers, and then grouped according to the number pool number and the city dimension of the place of origin of the privacy number. The number pool number, the city of origin of the privacy number, and the privacy number primary key snoId are stored in the "privacy number primary key bitmap" of redis using the bitmap data structure of redis. Among them, the key of the "privacy number primary key bitmap" is composed of the number pool number, the city of origin of the privacy number, and the fixed value b0, and the value of the "privacy number primary key bitmap" is snoId, and the key value "1" or "0" indicating whether snoId is in an available state corresponding to snoId. The key values are all "1" in the initial state, indicating that all are available.
[0054] Continuing as Figure 2As shown, the number pool number poolSN, primary key snoId, and extension number are stored in the "privacy number extension number bitmap" of redis using the redis bitmap data structure. The key of the "privacy number extension number bitmap" is the concatenation of the number pool number poolSN and the primary key snoId, and the value is 10,000 four-digit extension numbers from 0000 to 9999, as well as the key value "1" or "0" for each extension number to indicate whether it is available. The initial state key value is "1", indicating that it is available.
[0055] Continue as Figure 2 As shown, the cities where all private numbers are located are added to the "city collection" of redis in the form of " / province / city name" using the redis set data structure, where the key of the "city collection" is the number pool number poolSN, and the value is the city where the private number is located.
[0056] In one embodiment, if Figure 3 As shown, in the process of establishing the AXB cache model, based on the known privacy number and the city data of the privacy number, firstly, a primary key snoId can be assigned to each of the privacy numbers, and then the primary key snoId and the privacy number are stored in the "primary key index" in the hash data structure of redis, where the key in the "primary key index" is snoId, and the value in the "primary key index" is the privacy number sno and the counter of the number of real numbers bound to the privacy number, that is, in the "primary key index", one primary key snoId corresponds to one privacy number and one privacy number binding counter.
[0057] Continue as Figure 3 As shown in the figure, all private numbers are assigned a number pool number poolSN, and then grouped by number pool number and private number city dimension, and the number pool number, the private number city and the private number primary key snoId are stored in the "privacy number primary key bitmap" of redis using the redis bitmap data structure, where the key of the "privacy number primary key bitmap" is the number pool number and the private number city and the fixed value b0, and the value of the "privacy number primary key bitmap" is snoId, and the key value "1" or "0" corresponding to snoId indicating whether snoId is in an available state. The initial state key values are all "1", indicating that they are all available.
[0058] Continue as Figure 3As shown, the cities to which all private numbers belong are added to the "city set" in Redis in the form of " / province / city name" using the set data structure of Redis. Among them, the key of the "city set" is the number pool number poolSN, and the value is the city to which the private number belongs, i.e., city.
[0059] Continue as Figure 3 As shown, the number pool number poolSN, the primary key of the private number snoId, and the real number of the bound private number are added to the "set of bound mobile numbers of private numbers" in Redis using the set data structure of Redis to facilitate querying whether the bound real number has already been bound. Among them, the key of the "set of bound mobile numbers of private numbers" is composed of the concatenation of the number pool number and the primary key of the private number, and the value of the "set of bound mobile numbers of private numbers" is the bound real number.
[0060] The embodiments of the present disclosure are based on the above-pre-established cache model to implement the binding generation of double private numbers AXEXB / AXEYB. Binding modes AXEXB or AXEYB: To ensure that neither A nor B knows the existence of the other's real number and their real numbers are not disclosed, the privacy number system binds a private number X and an extension number E to A, and a private number Y to B. In the binding relationship of AXEYB, user A only presents the X number to user B, and other users (including user B) can contact A by dialing the X number and then entering the extension number E; user B presents the Y number to user A, and the communication established between user A and user B is through the Y number. One X number and one extension number E can only be bound to one A number at the same time, and one A number can be bound to multiple X numbers at the same time. The Y number can be bound to multiple binding relationships (each time the Y number binds an AXE relationship is counted as one binding relationship), but the bound AXE relationships cannot be repeated. For example, it is allowed to bind A1X1E1&Y1B1 and A2X1E2&Y1B2 at the same time, but it is not allowed to bind A1X1E1&Y1B1 and A1X1E1&Y1B2 at the same time.
[0061] For example, Figure 4 Schematically shows a schematic diagram of the cache model of the combination AXEXB / AXEYB established according to the embodiments of the present disclosure.
[0062] As Figure 4As shown above, the above combined cache model is established by combining the above AXE cache model and AXB cache model. Taking AXEYB as an example, in the process of establishing the above combined cache model AXEYB, based on the known privacy numbers and the city data of the place of origin of the privacy numbers, a primary key snoId can be assigned to each privacy number respectively. Then, the primary key snoId and the privacy number are stored in the "primary key index" in the hash data structure of redis. Among them, the key in the "primary key index" is snoId, and the value in the "primary key index" is the privacy number sno and the counter counter of the number of real numbers bound to the privacy number. That is, in the "primary key index", a primary key snoId corresponds to a privacy number and a privacy number binding counter.
[0063] Continue as Figure 4 As shown above, a number pool number poolSN is assigned to all privacy numbers, and this poolSN number is randomly generated. All privacy numbers are divided into X-type numbers and Y-type numbers according to a certain proportion. In this step, if the AXEXB cache model is established, it is not necessary to divide them into X-type numbers and Y-type numbers according to the proportion.
[0064] Continue as Figure 4 As shown above, the number pool number, the city of origin of the X-type privacy number, and the primary key snoId of the X-type privacy number are stored in the "privacy number primary key bitmap a" of redis using the bitmap data structure of redis. Among them, the key of the "privacy number primary key bitmap a" is composed of the number pool number, the city of origin of the privacy number, and the fixed value b0. The value of the "privacy number primary key bitmap" is snoId, and the key value "1" or "0" indicating whether snoId is in an available state corresponding to snoId. The initial state key values are all "1", indicating that all are available.
[0065] Continue as Figure 4 As shown above, then the number pool number poolSN, the primary key snoId, and the extension number are stored in the "extension number bitmap of the privacy number" of redis using the bitmap data structure of redis. Among them, the key of the "extension number bitmap of the privacy number" is composed of the number pool number poolSN and the primary key snoId. The value is 10,000 four-digit extension numbers from 0000 to 9999, and the key value "1" or "0" indicating whether each extension number is available. The initial state key values are all "1", indicating that all are available.
[0066] Continue as Figure 4As shown, the cities of origin of all Class X privacy numbers are added to the "City Set a" in Redis in the form of " / Province / City Name" using the set data structure of Redis. The key of the "City Set a" is the number pool number poolSN, and the value is the city of origin of the privacy number city.
[0067] Continue as Figure 4 As shown, the number pool number, the city of origin of the Class Y privacy number, and the primary key snoId of the Class Y privacy number are stored in the "Privacy Number Primary Key Bitmap b" in Redis using the bitmap data structure. Among them, the key of the "Privacy Number Primary Key Bitmap b" is composed of the number pool number, the city of origin of the privacy number, and the fixed value b0. The value of the "Privacy Number Primary Key Bitmap" is snoId, and the key value "1" or "0" representing whether snoId is in an available state corresponding to snoId. In the initial state, the key values are all "1", indicating that all are available. In this step, if the AXEXB cache model is established, the city of origin of the Class X privacy number and the primary key snoId of the Class X privacy number are stored.
[0068] Continue as Figure 4 As shown, the cities of origin of all Class Y privacy numbers are added to the "City Set b" in Redis in the form of " / Province / City Name" using the set data structure of Redis. The key of the "City Set b" is the number pool number poolSN, and the value is the city of origin of the privacy number city. In this step, if the AXEXB cache model is established, the city of origin of the Class X privacy number is stored in the form of " / Province / City Name".
[0069] Figure 5 Schematically shows a flowchart of a method for generating a privacy number according to an embodiment of the present disclosure.
[0070] As Figure 5 Shown, the method includes: operation S510 to operation S540.
[0071] In operation S510, according to the target cities and number pools where available privacy numbers exist corresponding to the first real number and the second real number respectively, determine the first available privacy number primary key corresponding to the first real number and the second available privacy number primary key corresponding to the second real number from the respective privacy number primary key queues.
[0072] According to an embodiment of the present disclosure, before performing operation S510, the method further includes: determining a set of cities corresponding to the first real number according to the number pool and the identification information of the first real number, where the set of cities includes multiple candidate cities; randomly selecting a candidate city from the set of cities; in response to the existence of an available privacy number corresponding to the candidate city, determining the candidate city as the target city with an available privacy number corresponding to the first real number.
[0073] According to an embodiment of the present disclosure, the number pool may be a resource set for managing and allocating a group of available privacy numbers. The first real number A and the second real number B may be the communication numbers currently used by the current user A and the current user B respectively. The number pool number to which the number pool belongs may be an identifier for identifying information and has uniqueness.
[0074] According to an embodiment of the present disclosure, the identification information of the first real number may be a set required for determining the corresponding privacy number for the first real number from the cache model.
[0075] In an embodiment of the present disclosure, the following may be combined Figure 4 and Figure 5 specifically described.
[0076] According to an embodiment of the present disclosure, the set identifier a corresponding to the identification information of the first real number may be determined from the cache model according to the identification information of the first real number.
[0077] According to an embodiment of the present disclosure, for example, the number pool number poolSN to which the number pool belongs is 1, the identification information of the first real number is a, and the identification information of the second real number is b. Based on the number pool number poolSN of 1 and the identification information a, based on the key-value pair, from Figure 4 the shown cache model, the set of cities a corresponding to the first real number storing the number pool number can be determined. Similarly, based on the number pool number poolSN of 1 and the identification information b, based on the key-value pair, from Figure 4 the shown cache model, the set of cities b corresponding to the second real number can be determined.
[0078] According to an embodiment of the present disclosure, Figure 4 during the process of generating double privacy numbers for the first real number and the second real number in the shown cache model, the processes of allocating corresponding privacy numbers to the first real number and allocating corresponding privacy numbers to the second real number are parallel.
[0079] According to an embodiment of the present disclosure, the set of cities may be stored in the form of " / province / city name", and the set of cities includes multiple candidate cities. For example, as Figure 4The shown set of cities A or set of cities B includes city a in Province A, city b in Province B, city c in Province C, ……
[0080] According to an embodiment of the present disclosure, if the set of cities is not empty, a candidate city city can be randomly selected from the set of cities A in sequence, and it is determined whether the privacy number corresponding to the candidate city city has an available privacy number. If there is no available privacy number, it can continue to determine whether the next candidate city of the candidate city has an available privacy number. If each candidate city in the set of cities A or the set of cities B does not have an available privacy number, it means that all the privacy numbers in the set of cities A or the set of cities B under the number pool have been bound and there is no available privacy number resource. At this time, the binding ends and a binding failure is returned.
[0081] According to an embodiment of the present disclosure, if the privacy number corresponding to the randomly selected candidate city city has an available privacy number, the candidate city city selected from the set of cities A is determined as the target city with an available privacy number corresponding to the first real number. Similarly, the method for determining the target city with an available privacy number corresponding to the first real number can be used to determine the target city with an available privacy number corresponding to the second real number from the set of cities B.
[0082] According to an embodiment of the present disclosure, in combination with Figure 4 As shown, the privacy number primary key queue corresponding to the first real number can be stored in the privacy number primary key bitmap A; the privacy number primary key queue corresponding to the second real number can be stored in the privacy number primary key bitmap B.
[0083] According to an embodiment of the present disclosure, the privacy number primary key bitmap A storing the number pool and the target city with an available privacy number can be determined with the number pool and the target city with an available privacy number corresponding to the first real number as the key key, and then the corresponding privacy number primary key queue is determined from the privacy number primary key bitmap A; the privacy number primary key queue corresponding to the key key is determined from the privacy number primary key bitmap B with the number pool and the target city with an available privacy number corresponding to the second real number as the key key.
[0084] According to an embodiment of the present disclosure, the value value corresponding to the key key included in the privacy number primary key bitmap A, that is, the privacy number primary key and the key value “1” or “0” representing whether the privacy number is available corresponding to the privacy number primary key, where “1” represents available and “0” represents bound and unavailable.
[0085] According to an embodiment of the present disclosure, the privacy number primary key is globally unique in the cache model and is a positive integer starting from 1 and increasing. That is, a privacy number primary key snoId corresponds to a privacy number.
[0086] According to an embodiment of the present disclosure, the first key value indicating that the privacy number is available can be selected from the key values corresponding to the privacy number primary key indicating whether the privacy number is available. When the number of real numbers bound to this primary key does not reach the upper limit, this privacy number primary key can be used as the first available privacy number primary key corresponding to the first real number. At the same time, the key value corresponding to this first available privacy number primary key is changed to indicate the bound unavailable state "0".
[0087] In operation S520, according to the number pool and the first available privacy number primary key, the target extension number is determined from the extension number queue.
[0088] According to an embodiment of the present disclosure, after determining the first available privacy number primary key, the extension number bitmap of the privacy number can be determined using the number pool and the first available privacy number primary key as the key.
[0089] According to an embodiment of the present disclosure, the extension number bitmap of the privacy number stores the extension numbers that can be allocated and the key values "1" or "0" indicating whether each extension number is available. "1" indicates available, and "0" indicates bound and unavailable. The extension numbers are 10,000 four-digit extension numbers from 0000 to 9999. For example, the extension number 0000 corresponds to the key value "1", indicating that the extension number 0000 is in an available state; the extension number 0001 corresponds to the key value "0", indicating that the extension number 0001 is in a bound and unavailable state. The first extension number with a key value of "1" can be determined from the extension number bitmap of the privacy number as the target extension number, and at the same time, the key value corresponding to this target extension number is changed to the bound unavailable state "0".
[0090] According to an embodiment of the present disclosure, if each extension number has been bound and is unavailable, it means that there are no available extension numbers for this first available privacy number primary key, and a new first available privacy number primary key needs to be determined from the privacy number primary key bitmap a, and a target extension number is allocated for the new first available privacy number primary key.
[0091] In operation S530, according to the first available privacy number primary key, the first target privacy number is determined from the candidate privacy number queue.
[0092] According to an embodiment of the present disclosure, after determining the target extension number, the primary key index corresponding to the first available privacy number primary key can be determined using the first available privacy number primary key as the key, and the first target privacy number is obtained from this primary key index.
[0093] In operation S540, in response to the second available privacy number primary key not being bound to the first real number and / or the second real number, according to the second available privacy number primary key, the second target privacy number is determined from the candidate privacy number queue, and the number selection data including the first target privacy number, the target extension number, and the second target privacy number is generated.
[0094] According to an embodiment of the present disclosure, similarly, using the method for determining the first available privacy number primary key corresponding to the first real number above, determine the second available privacy number primary key corresponding to the second real number from the privacy number primary key queue of the privacy number primary key bitmap b, obtain the second available privacy number primary key corresponding to the second real number, and at the same time change the key value corresponding to the second available privacy number primary key to represent the bound unavailable state "0".
[0095] According to an embodiment of the present disclosure, the number pool and the second available privacy number primary key can be used as keys to determine whether the second available privacy number primary key has been bound to the first real number and / or the second real number. If it is determined that the second available privacy number primary key has not been bound to the first real number and / or the second real number, then using the second available privacy number primary key as a key, determine the primary key index corresponding to the second available privacy number primary key, and obtain the second target privacy number from this primary key index.
[0096] According to an embodiment of the present disclosure, the first target privacy number, the target extension number, and the second target privacy number can be used to generate number selection data, and the number selection data can be returned to implement the generation of double privacy numbers for the first real number and the second real number.
[0097] According to an embodiment of the present disclosure, by determining the first available privacy number primary key and the second available privacy number primary key based on the target cities and number pools where available privacy numbers exist corresponding to the first real number and the second real number, and determining the target extension number and the first target privacy number based on the first available privacy number primary key and the number pool, when it is determined that the second target privacy number primary key is not bound to the first real number and / or the second real number, determine the second target privacy number according to the second target privacy number primary key, and generate number selection data including the first target privacy number, the target extension number, and the second target privacy number. Since the privacy number primary key is used to determine the target privacy number and the target extension number, and by means of the technical means of verifying the uniqueness of the binding between the target privacy number and the real number, to solve the technical problems in the prior art that as the number of users increases, the privacy number storage space occupies a large amount, and the lack of flexibility and large communication overhead are caused by the need to re-customize and develop new models, and then achieve the technical effect of reducing the system communication overhead and increasing the privacy number storage space by freely combining to generate new models without re-customizing and developing.
[0098] According to an embodiment of the present disclosure, determining a first available privacy number primary key corresponding to a first real number from a privacy number primary key queue includes: determining a plurality of privacy number primary keys and key values corresponding to their respective privacy number primary keys from a main privacy number primary key bitmap according to a target city and a number pool where there are available privacy numbers corresponding to the first real number; in response to the first key value corresponding to the privacy number primary key being a preset key value, and in response to the privacy number primary key satisfying a preset condition, determining the privacy number primary key in the main privacy number primary key bitmap as the first available privacy number primary key.
[0099] According to an embodiment of the present disclosure, the privacy number primary key queue includes a plurality of privacy number primary keys. The privacy number primary key queue is stored in a privacy number primary key bitmap, and the privacy number primary key bitmap includes a main privacy number primary key bitmap and a backup privacy number primary key bitmap. For example, Figure 4 In the privacy number primary key bitmap a or the privacy number primary key bitmap b, (poolSN:city:b0) is the main privacy number primary key bitmap, and (poolSN:city:b1) is the backup privacy number primary key bitmap. The snoIds in the main privacy number primary key bitmap b0 and the backup privacy number primary key bitmap b1 in each privacy number primary key bitmap are the same, and the initial key values representing whether the snoId is in an available state corresponding to the snoId are the same, and the initial key values are both "1".
[0100] According to an embodiment of the present disclosure, it can be combined with Figure 4 , for example, the number pool number of the number pool is 1, and the target city city where there are available privacy numbers corresponding to the first real number is City B in Province B. Then, using the number pool number 1 and City B in Province B as the key, the privacy number primary key bitmap a is determined, and then the privacy number primary key and the key value corresponding to the privacy number primary key are determined from the main privacy number primary key bitmap (such as Figure 4 b0 in the privacy number primary key bitmap a shown).
[0101] According to an embodiment of the present disclosure, the preset key value can be a key value representing that the privacy number is in an available state. For example, it can be "1"; the preset condition can be that the primary key snoId of the privacy number is not "-1".
[0102] According to an embodiment of the present disclosure, select the first key value of the privacy number key value from the main privacy number primary key bitmap b0 to be "1", and determine whether the privacy number primary key corresponding to the first key value being "1" is "-1".
[0103] According to an embodiment of the present disclosure, if the privacy number primary key snoId corresponding to the first key value being "1" is not "-1", then determine the privacy number primary key corresponding to the first key value being "1" in the main privacy number primary key bitmap as the first available privacy number primary key, and change the key value of the first available privacy number primary key from "1" to "0", indicating that the first available privacy number primary key has been bound and is unavailable.
[0104] According to an embodiment of the present disclosure, determining a first available privacy number primary key corresponding to a first real number from a privacy number primary key queue further includes: in response to the first key value corresponding to the privacy number primary key in the main privacy number primary key bitmap being a preset key value, and in response to the privacy number primary key not meeting the preset conditions, determining multiple privacy number primary keys and the key values corresponding to their respective privacy number primary keys from the backup privacy number primary key bitmap; obtaining the number of key values corresponding to the privacy number primary keys in the backup privacy number primary key bitmap that are the preset key value; in response to the number of key values corresponding to the privacy number primary keys in the backup privacy number primary key bitmap that are the preset key value being greater than the preset number, and in response to the privacy number primary key corresponding to the first key value being the preset key value meeting the preset conditions, determining the privacy number primary keys in the backup privacy number primary key bitmap as the first available privacy number primary keys.
[0105] According to an embodiment of the present disclosure, if the privacy number primary key snoId corresponding to the first key value being "1" is "-1", it indicates that there are no available privacy numbers in the main privacy number primary key bitmap b0, and all have been bound. Then, determine the privacy number primary keys and the key values corresponding to the privacy number primary keys from the backup privacy number primary key bitmap b1.
[0106] According to an embodiment of the present disclosure, obtain the number of key values being 1 from the backup privacy number primary key bitmap b1. If the number is 0, it indicates that there are no available privacy numbers in the backup privacy number primary key bitmap b1, and all have been bound. At this time, the privacy numbers in the main privacy number primary key bitmap b0 and the backup privacy number primary key bitmap b1 in the privacy number primary key bitmap a have all been bound. Remove the target city city from the "city set a", re-determine the target city, and determine the privacy number primary key bitmap a based on the target city. Then, determine the first privacy number primary key from the privacy number primary key bitmap a based on the above method.
[0107] According to an embodiment of the present disclosure, if the number of key values being 1 obtained from the backup privacy number primary key bitmap b1 is greater than 0, it indicates that there are available privacy numbers in the backup privacy number primary key bitmap b1 of the privacy number primary key bitmap a under the current target city city. Then, determine that the first key value in the backup privacy number primary key bitmap b1 is "1" and the privacy number primary key is not "-1", and determine the privacy number primary key corresponding to the first key value in the backup privacy number primary key bitmap b1 as the first available privacy number primary key.
[0108] According to an embodiment of the present disclosure, after indicating that there are available privacy numbers in the backup privacy number primary key bitmap b1 of the privacy number primary key bitmap a under the current target city city, the backup privacy number primary key bitmap b1 can also be renamed as the main privacy number primary key bitmap b0, and then the operation of determining the first available privacy number primary key is performed.
[0109] According to an embodiment of the present disclosure, the second available privacy number primary key can be determined from the primary privacy number primary key bitmap b0 and the backup privacy number primary key bitmap b1 in the privacy number primary key bitmap b according to the method for determining the first available privacy number primary key described above. Herein, the present disclosure will not elaborate further.
[0110] According to an embodiment of the present disclosure, by setting the privacy number primary key bitmap and storing it in the form of a privacy number primary key and a key value indicating whether the privacy number primary key is in an available state, the technical problems in the prior art of large storage space occupation and large communication overhead caused by storing specific privacy number in the system can be solved, thereby achieving the technical effect of reducing storage space and communication overhead.
[0111] According to an embodiment of the present disclosure, determining the first target privacy number from the candidate privacy number queue according to the first available privacy number primary key includes: determining a target candidate privacy number from multiple candidate privacy numbers according to the first available privacy number primary key; and in response to the number of real numbers bound to the target candidate privacy number being less than the preset binding number, determining the target candidate privacy number as the first target privacy number.
[0112] According to an embodiment of the present disclosure, the candidate privacy number queue includes multiple candidate privacy numbers. Each candidate privacy number is stored in the corresponding primary key index, that is, the primary key index stores the privacy number corresponding to the privacy number primary key and the counter of the real number bound to the privacy number.
[0113] According to an embodiment of the present disclosure, the primary key index corresponding to the first available privacy number primary key can be determined from the primary key index in which each candidate privacy number is stored with the first available privacy number primary key as the key (key). In this primary key index, with the first available privacy number primary key as the key and the privacy number and the counter of the real number already bound to the privacy number as the value (value), the target candidate privacy number and the counter corresponding to the first available privacy number primary key are obtained from the primary key index.
[0114] According to an embodiment of the present disclosure, in the case where the counter corresponding to the first available privacy number primary key shows that the number of real numbers bound to the target candidate privacy number does not exceed the preset binding number, the target candidate privacy number can be determined as the first target privacy number.
[0115] According to an embodiment of the present disclosure, if the counter shows that the number of real numbers bound to the target candidate privacy number has exceeded the preset binding number, it means that the number of real numbers bound to the target candidate privacy number has reached the binding upper limit and the target candidate privacy number has been fully bound. Then, the first target privacy number primary key is re-determined, and the target candidate privacy number is determined based on the first target privacy number primary key, and then the first target privacy number is determined again.
[0116] According to an embodiment of the present disclosure, determining a target extension number from an extension number queue according to a number pool and a first available privacy number primary key includes: determining a plurality of extension numbers and corresponding extension key values from the extension number queue according to the number pool and the first available privacy number primary key; in response to the first extension key value corresponding to the extension number being a preset key value and in response to the extension number satisfying a preset condition, determining the extension number corresponding to the first extension key value as the target extension number.
[0117] According to an embodiment of the present disclosure, the extension number queue is stored in the extension number bitmap of the privacy number. The extension number queue includes a plurality of extension numbers and key values indicating whether each extension number is available. The extension number bitmap of the privacy number storing the key can be determined with the number pool number pool number poolSN and the first available privacy number primary key snoId as keys (keys).
[0118] According to an embodiment of the present disclosure, determine the extension number with the first key value of "1" from the multiple extension numbers in the extension number bitmap of the privacy number, and determine that the extension number with the first key value of "1" is in an available state, that is, the extension number is not "-1", determine the extension number corresponding to the first key value as the target extension number, and change the key value "1" of the target extension number to "0" to indicate that the target extension number has been bound.
[0119] According to an embodiment of the present disclosure, if the extension number corresponding to the first key value of "1" shows "-1", it means that all the extension numbers in the extension bitmap of the privacy number corresponding to the first available privacy number primary key have been bound, and there is no available extension number for this target privacy number. Re-determine the first available privacy number primary key again, and then determine the target extension number based on this first available privacy number primary key.
[0120] According to an embodiment of the present disclosure, before responding to the second available privacy number primary key not binding the first real number and / or the second real number, it further includes: adding the first real number and the second real number to the set of real numbers bound to the privacy number according to the number pool and the second available privacy number primary key; determining whether the second available privacy number primary key has bound the first real number and / or the second real number.
[0121] According to an embodiment of the present disclosure, after determining the second privacy number primary key above, based on the second privacy number primary key as a key (key), determine the primary key index, and determine the corresponding counter from the primary key index based on the second privacy number primary key, and judge whether the number of bound real numbers of this counter has reached the preset binding number. If it has not reached the preset binding number, it means that the privacy number corresponding to this second privacy number primary key can still bind real numbers.
[0122] According to an embodiment of the present disclosure, when it is determined that the number of bound real numbers of the counter does not reach the preset binding number, the bound real number set corresponding to the second privacy number primary key can be determined with the number pool number poolSN and the second privacy number primary key snoId as keys (keys).
[0123] According to an embodiment of the present disclosure, the bound real number set stores real numbers that have been bound to the privacy number of the second privacy number primary key.
[0124] According to an embodiment of the present disclosure, the first real number and the second real number can be added to the bound real number set to determine whether the second privacy number primary key is bound to the first real number and / or the second real number.
[0125] According to an embodiment of the present disclosure, if the first real number and / or the second real number have been bound, it is displayed that the first real number and the second real number are not added successfully at the same time, then the privacy number corresponding to the second privacy number primary key cannot be redistributed, and the target city corresponding to the second real number needs to be re-determined, and the second privacy number primary key is re-determined based on the target city and the number pool number.
[0126] According to an embodiment of the present disclosure, if the first real number and the second real number are added successfully at the same time, the primary key index corresponding to the second available privacy number primary key can be determined with the second available privacy number primary key as the key (key), the second target privacy number and the counter are obtained from the primary key index, and one is added to the counter corresponding to the second target privacy number.
[0127] According to an embodiment of the present disclosure, the obtained first target privacy number, target extension number, and second target privacy number are used to generate number selection data, and the number selection data is sent to the user terminal, and the binding ends here.
[0128] Figure 6 A schematic diagram schematically shows a method for generating a privacy number according to an embodiment of the present disclosure.
[0129] As Figure 6As shown, in operation S601, according to the number pool and the identification information of the first real number A, determine the set of cities a corresponding to the first real number, and randomly select a candidate city from the set of cities a; in operation S602, determine whether the set of cities a is empty, that is, determine whether each selected candidate city in the set of cities a has been bound; in operation S603, if all have been bound, it means that the set of cities a is empty, then the binding ends, return binding failure, and there is no available private number resource under the set of cities a; in operation S604, if it is not empty, then determine the selected candidate city as the target city with available private numbers corresponding to the first real number; in operation S605, according to the number pool and the target city with available private numbers corresponding to the first real number, determine the main private number primary key bitmap b0 of the private number primary key bitmap a, and obtain the first private number primary key snoId with a key value of 1 from b0; in operation S606, determine whether the obtained private number primary key snoId is "-1"; in operation S607, if not, then determine the private number primary key snoId as the first private number primary key, change its corresponding key value from "1" to "0", and set the key value corresponding to the same first private number primary key snoId in the backup private number primary key bitmap b1 to "1"; in operation S608, determine the primary key index according to the first private number primary key snoId, and determine the counter counter corresponding to the first private number primary key snoId from the primary key index; in operation S609, if in the judgment of operation S606, the obtained private number primary key snoId is "-1", then obtain the number of key values of "1" from the backup private number primary key bitmap b1 of the private number primary key bitmap a; in operation S610, determine whether the obtained number of key values of "1" is greater than 0; in operation S611, if it is greater than 0, then rename the backup private number primary key bitmap b1 of the private number primary key bitmap a to the main private number primary key bitmap b0 of the private number primary key bitmap a, and repeat the operations of S605 and subsequent steps; in operation S612, if it is equal to 0, then remove the target city corresponding to the first real number from the set of cities a, and repeat the operations of S601 and subsequent steps again.
[0130] After determining the counter in operation S608, operation S613 is executed to determine whether the number of real numbers bound to the counter counter corresponding to the first privacy number primary key snoId has reached the upper limit of binding; in operation S614, if the upper limit is reached, the key value in the backup privacy number primary key bitmap b1 of the privacy number primary key bitmap a is updated to "0", and operations S605 and subsequent steps are repeatedly executed; in operation S615, if the upper limit is not reached, the extension number bitmap of the privacy number is determined according to the number pool poolSN and the first privacy number primary key snoId, and the extension number with the first key value of "1" in the extension number bitmap is determined; in operation S616, it is determined whether the extension number with the first key value of "1" is "-1", and if so, operations S605 and subsequent steps are repeatedly executed; in operation S617, if not, the extension number with the first key value of "1" is determined as the target extension number, and the key value "1" corresponding to the target extension number is changed to "0", so as to obtain the target extension number E.
[0131] In operation S618, the real privacy number sno is obtained from the primary key index according to the first privacy number primary key, and the counter of the privacy number is incremented by one, so as to obtain the first target privacy number X.
[0132] In the embodiment of the present disclosure, the method flow for determining the target city according to the number pool and the identification information of the second real number B, and determining the second privacy number primary key based on the target city, that is Figure 6 Operations S619 to S632 in correspond to the operation steps for determining the first privacy number primary key, that is, operations S601 to S614. The specific descriptions of operations S619 to S632 are not repeated here and are the same as operations S601 to S614.
[0133] In operation 633, it is determined that the number of real numbers bound to the counter corresponding to the second privacy number primary key snoId has not reached the upper limit. The set of real numbers already bound to the privacy number is determined according to the number pool and the second privacy number primary key snoId, and the first real number A and the second real number B are added to the set; in operation S634, it is determined whether the first real number A and the second real number B are both added successfully; if they are not both added successfully, the steps of operation S623 (corresponding to operation S605) and subsequent steps are repeatedly executed; in operation S635, if they are both added successfully, the real privacy number sno is obtained from the primary key index according to the second privacy number primary key, and the counter corresponding to the real privacy number is incremented by one, so as to obtain the second target privacy number Y. In operation S636, the first target privacy number X, the target extension number E, and the second target privacy number Y are generated into number selection data, and the number selection data is returned.
[0134] It should be noted that based on the above-mentioned method for establishing cache models such as AXB and AXE, an AX cache model can also be established in the present disclosure, enabling free combination between different cache models.
[0135] Figure 7 Schematically shows a schematic diagram of constructing an AX cache model established according to an embodiment of the present disclosure.
[0136] As Figure 7 shown, in the process of establishing the AX cache model, based on the known privacy numbers and the city data of the place of origin of the privacy numbers, a primary key snoId can be assigned to each privacy number respectively. This snoId is globally unique and increments starting from the positive integer 1, that is, one snoId corresponds to one privacy number. Then, the primary key snoId and the privacy number are stored in the "primary key index" in the hash data structure of redis. Among them, the key in the "primary key index" is snoId, and the value in the "primary key index" is the privacy number sno and the counter counter of the privacy number that has been bound to the real number. That is, in the "primary key index", one primary key snoId corresponds to one privacy number and one counter of the privacy number that has been bound to the real number.
[0137] Continuing as Figure 7 shown, a number pool number poolSN is assigned to all privacy numbers, and then grouped according to the number pool number and the dimension of the city of origin of the privacy number. The number pool number, the city of origin of the privacy number, and the privacy number primary key snoId are stored in the "privacy number primary key bitmap" of redis using the bitmap data structure of redis. Among them, the key in the "privacy number primary key bitmap" is composed of the number pool number and the city of origin of the privacy number, and the value in the "privacy number primary key bitmap" is snoId, as well as the key value "1" or "0" indicating whether snoId is in an available state corresponding to snoId. The key values in the initial state are all "1", indicating that all are available.
[0138] Continuing as Figure 7 shown, the cities of origin of all privacy numbers are added to the "city set" of redis in the form of " / province / city name" using the set data structure of redis. Among them, the key in the "city set" is the number pool number poolSN, and the value is the city of origin of the privacy number city.
[0139] According to the embodiments of the present disclosure, different cache models can be freely combined based on the above-mentioned pre-established cache models such as AX, AXB, and AXE to generate new cache models.
[0140] Figure 8A block diagram of a privacy number generation device according to an embodiment of the present disclosure is schematically shown.
[0141] As Figure 8 shown, the device 800 includes an available privacy number primary key determination module 810, a target extension number determination module 820, a first target privacy number determination module 830, and a number selection data generation module 840.
[0142] The available privacy number primary key determination module 810 is configured to determine a first available privacy number primary key corresponding to the first real number and a second available privacy number primary key corresponding to the second real number from the respective privacy number primary key queues according to the target cities and number pools where available privacy numbers exist corresponding to the first real number and the second real number respectively.
[0143] The target extension number determination module 820 is configured to determine a target extension number from the extension number queue according to the number pool and the first available privacy number primary key.
[0144] The first target privacy number determination module 830 is configured to determine a first target privacy number from the candidate privacy number queue according to the first available privacy number primary key.
[0145] The number selection data generation module 840 is configured to, in response to the second available privacy number primary key not being bound to the first real number and / or the second real number, determine a second target privacy number from the candidate privacy number queue according to the second available privacy number primary key, and generate number selection data including the first target privacy number, the target extension number, and the second target privacy number.
[0146] According to an embodiment of the present disclosure, the privacy number primary key queue includes a plurality of privacy number primary keys, the privacy number primary key queue is stored in a privacy number primary key bitmap, and the privacy number primary key bitmap includes a main privacy number primary key bitmap.
[0147] According to an embodiment of the present disclosure, the available privacy number primary key determination module 810 includes: a privacy number primary key first determination sub-module and a first available privacy number primary key first determination sub-module.
[0148] The privacy number primary key first determination sub-module is configured to determine a plurality of privacy number primary keys and the key values corresponding to the respective privacy number primary keys from the main privacy number primary key bitmap according to the target city and number pool where available privacy numbers exist corresponding to the first real number.
[0149] The first available privacy number primary key first determination sub-module is configured to, in response to the first key value corresponding to the privacy number primary key being a preset key value and in response to the privacy number primary key satisfying a preset condition, determine the privacy number primary key in the main privacy number primary key bitmap as the first available privacy number primary key.
[0150] According to an embodiment of the present disclosure, the available privacy number primary key determination module 810 further includes: a second privacy number primary key determination sub-module, a key value quantity acquisition sub-module, and a first available privacy number primary key second determination sub-module.
[0151] The second privacy number primary key determination sub-module is configured to, in response to the first key value corresponding to the privacy number primary key in the primary privacy number primary key bitmap being a preset key value, and in response to the privacy number primary key not satisfying the preset condition, determine a plurality of privacy number primary keys and the key values corresponding to their respective privacy number primary keys from the backup privacy number primary key bitmap.
[0152] The key value quantity acquisition sub-module is configured to acquire the quantity of the key values corresponding to the privacy number primary keys in the backup privacy number primary key bitmap that are the preset key value.
[0153] The first available privacy number primary key second determination sub-module is configured to, in response to the quantity of the key values corresponding to the privacy number primary keys in the backup privacy number primary key bitmap being greater than the preset quantity, and in response to the privacy number primary key corresponding to the first key value being the preset key value and satisfying the preset condition, determine the privacy number primary keys in the backup privacy number primary key bitmap as the first available privacy number primary keys.
[0154] According to an embodiment of the present disclosure, the first target privacy number determination module 830 includes: a target candidate privacy number determination sub-module and a first target privacy number determination sub-module.
[0155] The target candidate privacy number determination sub-module is configured to determine target candidate privacy numbers from a plurality of candidate privacy numbers according to the first available privacy number primary key.
[0156] The first target privacy number determination sub-module is configured to, in response to the quantity of the real numbers bound to the target candidate privacy numbers being less than the preset binding quantity, determine the target candidate privacy numbers as the first target privacy numbers.
[0157] According to an embodiment of the present disclosure, the target extension number determination module 820 includes: an extension key value determination sub-module and a target extension number determination sub-module.
[0158] The extension key value determination sub-module is configured to determine a plurality of extension numbers and the extension key values corresponding to their respective extension numbers from the extension number queue according to the number pool and the first available privacy number primary key.
[0159] The target extension number determination sub-module is configured to, in response to the first extension key value corresponding to the extension number being the preset key value, and in response to the extension number satisfying the preset condition, determine the extension number corresponding to the first extension key value as the target extension number.
[0160] According to an embodiment of the present disclosure, the device 800 further includes: a city set determination module, a candidate city selection module, and a target city determination module.
[0161] The city set determination module is configured to determine a city set corresponding to the first real number according to the number pool and the identification information of the first real number, where the city set includes multiple candidate cities.
[0162] The candidate city selection module is configured to randomly select a candidate city from the city set.
[0163] The target city determination module is configured to, in response to the existence of an available privacy number corresponding to the candidate city, determine the candidate city as the target city corresponding to the first real number and having an available privacy number.
[0164] According to an embodiment of the present disclosure, the apparatus 800 further includes: a real number addition module and a determination module.
[0165] The real number addition module is configured to add the first real number and the second real number to the set of real numbers bound to the privacy number according to the number pool and the second available privacy number primary key.
[0166] The determination module is configured to determine whether the second available privacy number primary key has been bound to the first real number and / or the second real number.
[0167] According to an embodiment of the present disclosure, any plurality of modules, sub-modules, units, and sub-units, or at least part of the functions of any of them, can be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure can be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or can be implemented by any other reasonable way of integrating or packaging the circuit in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure can be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.
[0168] For example, any combination of the available privacy number primary key determination module 810, the target extension number determination module 820, the first target privacy number determination module 830, and the number selection data generation module 840 can be combined and implemented in one module / unit / sub-unit, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the available privacy number primary key determination module 810, the target extension number determination module 820, the first target privacy number determination module 830, and the number selection data generation module 840 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc., in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in any suitable combination of several of them. Alternatively, at least one of the available privacy number primary key determination module 810, the target extension number determination module 820, the first target privacy number determination module 830, and the number selection data generation module 840 can be at least partially implemented as a computer program module, which can execute the corresponding functions when the computer program module is run.
[0169] It should be noted that the part of the privacy number generation device in the embodiments of the present disclosure corresponds to the part of the privacy number generation method in the embodiments of the present disclosure. For the description of the part of the privacy number generation device, please refer to the part of the privacy number generation method for details, and will not be elaborated herein.
[0170] Figure 9 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 9 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0171] As Figure 9As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage section 908 into a random access memory (RAM) 903. The processor 901 can include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application-specific integrated circuit (ASIC)), and so on. The processor 901 can also include on-board memory for caching purposes. The processor 901 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0172] In the RAM 903, various programs and data required for the operation of the electronic device 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to an embodiment of the present disclosure by executing the program in the ROM 902 and / or the RAM 903. It should be noted that the program can also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 can also perform various operations of the method flow according to an embodiment of the present disclosure by executing the program stored in one or more memories.
[0173] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, and the input / output (I / O) interface 905 is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read from it can be installed into the storage section 908 as needed.
[0174] According to an embodiment of the present disclosure, the method flow according to the embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 909, and / or installed from a removable medium 911. When the computer program is executed by a processor 901, the above functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described system, device, apparatus, module, unit, etc. can be implemented by computer program modules.
[0175] The present disclosure also provides a computer-readable storage medium, which can be included in the device / device / system described in the above embodiment; or can exist alone without being assembled into the device / device / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0176] According to an embodiment of the present disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. For example, it can include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, device, or device.
[0177] For example, according to an embodiment of the present disclosure, the computer-readable storage medium can include the above-described ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903.
[0178] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program includes program codes for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program codes are used to enable the electronic device to implement the privacy number generation method provided by the embodiment of the present disclosure.
[0179] When the computer program is executed by a processor 901, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described system, device, module, unit, etc. can be implemented by computer program modules.
[0180] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 909, and / or installed from the removable medium 911. The program code included in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0181] According to the embodiments of the present disclosure, the program code for executing the computer program provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include but are not limited to, for example, Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, by using an Internet service provider to connect through the Internet).
[0182] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions. Those skilled in the art will appreciate that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.
[0183] The embodiments of the present disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments have been described separately above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present disclosure.
Claims
1. A method for generating a privacy number, comprising: According to the target cities and number pools where available privacy numbers exist corresponding to the first real number and the second real number, respectively, determining a first available privacy number primary key corresponding to the first real number and a second available privacy number primary key corresponding to the second real number from the corresponding privacy number primary key queues; Determine a target extension number from an extension number queue according to the number pool and the first available privacy number primary key; Determine a first target privacy number from a candidate privacy number queue according to the first available privacy number primary key; In response to the second available privacy number primary key not being bound to the first real number and / or the second real number, the second target privacy number is determined from the candidate privacy number queue based on the second available privacy number primary key, and number selection data including the first target privacy number, the target extension number and the second target privacy number is generated.
2. The method according to claim 1, wherein: The privacy number master key queue includes multiple privacy number master keys, the privacy number master key queue is stored in a privacy number master key bitmap, and the privacy number master key bitmap includes a master privacy number master key bitmap; The determining, from the privacy number primary key queue, a first available privacy number primary key corresponding to the first real number comprises: According to the target city where the privacy number corresponding to the first real number is available and the number pool, determining the multiple privacy number primary keys and the key values corresponding to the respective privacy number primary keys from the primary privacy number primary key bitmap; In response to the first key value corresponding to the privacy number primary key being a preset key value, and in response to the privacy number primary key satisfying a preset condition, the privacy number primary key in the master privacy number primary key bitmap is determined as the first available privacy number primary key.
3. The method according to claim 2, wherein: The privacy number master key bitmap also includes a backup privacy number master key bitmap, and the determining of the first available privacy number master key corresponding to the first real number from the privacy number master key queue also includes: In response to the first key value corresponding to the privacy number primary key in the primary privacy number primary key bitmap being a preset key value, and in response to the privacy number primary key not satisfying the preset condition, determining the multiple privacy number primary keys and the key values corresponding to the respective privacy number primary keys from the backup privacy number primary key bitmap; Obtain the key value corresponding to the privacy number primary key in the backup privacy number primary key bitmap as the number of the preset key values; In response to the fact that the number of key values corresponding to the privacy number primary key in the backup privacy number primary key bitmap is greater than the preset number of key values, and in response to the fact that the privacy number primary key corresponding to the first key value of the preset key value satisfies the preset condition, the privacy number primary key in the backup privacy number primary key bitmap is determined as the first available privacy number primary key.
4. The method according to any one of claims 2 or 3, wherein: The candidate privacy number queue includes a plurality of candidate privacy numbers, and determining a first target privacy number from the candidate privacy number queue according to the first available privacy number primary key includes: Determine a target candidate privacy number from the plurality of candidate privacy numbers according to the first available privacy number primary key; In response to the number of real numbers bound to the target candidate privacy number being less than a preset binding number, the target candidate privacy number is determined as the first target privacy number.
5. The method according to any one of claims 2 or 3, wherein: The step of determining a target extension number from an extension number queue according to the number pool and the first available privacy number primary key includes: Determine, from the extension number queue, a plurality of extension numbers and extension key values corresponding to the respective extension numbers according to the number pool and the first available privacy number primary key; In response to the first extension key value corresponding to the extension number being the preset key value, and in response to the extension number satisfying the preset condition, the extension number corresponding to the first extension key value is determined as the target extension number.
6. The method according to claim 1, wherein: The method further comprises: Determine a city set corresponding to the first real number according to the number pool and the identification information of the first real number, wherein the city set includes a plurality of candidate cities; Randomly selecting one of the candidate cities from the city set; In response to the existence of an available privacy number for the privacy number corresponding to the candidate city, the candidate city is determined as a target city for which an available privacy number corresponding to the first real number exists.
7. The method according to claim 1, wherein: Before responding to the second available privacy number primary key not being bound to the first real number and / or the second real number, the method further includes: According to the number pool and the second available privacy number primary key, adding the first real number and the second real number to the set of real numbers bound to privacy numbers; Determine whether the second available privacy number primary key has been bound to the first real number and / or the second real number.
8. A device for generating a privacy number, comprising: An available privacy number primary key determination module is used to determine a first available privacy number primary key corresponding to the first real number and a second available privacy number primary key corresponding to the second real number from the corresponding privacy number primary key queues according to the target cities and number pools where available privacy numbers exist corresponding to the first real number and the second real number respectively; A target extension number determination module, configured to determine a target extension number from an extension number queue according to the number pool and the first available privacy number primary key; A first target privacy number determination module, configured to determine a first target privacy number from a candidate privacy number queue according to the first available privacy number primary key; A number selection data generation module is used to determine the second target privacy number from the candidate privacy number queue according to the second available privacy number primary key in response to the second available privacy number primary key not being bound to the first real number and / or the second real number, and generate number selection data including the first target privacy number, the target extension number and the second target privacy number.
9. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 7.
11. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Cited By
Passenger information autonomous closed-loop method and system based on cryptographic marking, medium and hardware
CN121167789A
A method, system, medium and hardware for autonomous closed-loop of received information based on cryptography marking
CN121167789B