A number query method, system and device, server and storage medium
By dividing the ciphertext of the target number into multiple character segments and querying them sequentially in the database nodes, the problem of long ciphertext query time in the existing technology is solved, and a method for quickly obtaining the plaintext of the number is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU JUNBO NETWORK TECH INC
- Filing Date
- 2022-12-28
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, decryption databases need to store all ciphertext and plaintext data, and querying a single ciphertext requires a full database scan, which is time-consuming.
By dividing the ciphertext of the target number into multiple character segments and sequentially querying the stored value of each character segment in the corresponding database node until the stored value of the last character segment is found, the plaintext of the target number can be obtained.
It improves query speed, alleviates the computational pressure on a single database node, and reduces query time.
Smart Images

Figure CN116186111B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a number lookup method, system, device, server, and storage medium. Background Technology
[0002] The internet has permeated every aspect of people's daily lives. Users typically interact with various gaming, shopping, food delivery, and ride-hailing platforms. Users' mobile phone numbers serve as the primary identifier and medium for identifying users and contacting them. At the same time, mobile phone numbers are important privacy information for users and need to be encrypted during communication to prevent leakage.
[0003] The commonly used encryption algorithm is MD5 (MD5 Message-Digest Algorithm). After a mobile phone number is encrypted using MD5, its corresponding MD5 digest is obtained. This MD5 digest is also called MD5 ciphertext, and the MD5 ciphertext for the mobile phone number is the ciphertext of the communication account. MD5, short for MD5 Message Digest Algorithm, is a widely used cryptographic hash function that produces a 256-bit (32-byte) hash value to ensure the integrity and consistency of transmitted information. By storing the ciphertext and plaintext data in a key-value store, there is a one-to-one correspondence between the ciphertext and plaintext data. When decryption is needed, the ciphertext data is used to perform a full database query to retrieve both the ciphertext data and its corresponding plaintext data, which is the mobile phone number.
[0004] In existing technologies, decryption databases need to store all ciphertext and plaintext data. The amount of data stored in the database is large, and querying a single ciphertext requires a full database scan, which is time-consuming. Summary of the Invention
[0005] Therefore, it is necessary to provide a number lookup method, system, device, server, and storage medium to address the above-mentioned problems.
[0006] The query method includes:
[0007] Receive the ciphertext of the target number;
[0008] Obtain and sort N character segments of the target number ciphertext in order, where N is a positive integer greater than two;
[0009] The storage value of each character segment in the corresponding database node is queried sequentially until the storage value corresponding to the last character segment of the target number ciphertext is found.
[0010] The storage value corresponding to the last character segment of the target number ciphertext is determined to be the target number plaintext.
[0011] In one embodiment, a number lookup system is provided, the number lookup system comprising:
[0012] The server is used to execute the plaintext number lookup method as described in any of the above embodiments;
[0013] The sending end is used to send information and the encrypted target number of the target customer to the server; and
[0014] The user terminal is used to receive the information.
[0015] In one embodiment, a plaintext number lookup device is provided, the plaintext number lookup device comprising:
[0016] A receiving device is used to receive the ciphertext of the target number;
[0017] A slicing device is used to acquire a set number of N character segments of the target number ciphertext arranged in order, where N is a positive integer greater than two;
[0018] A query device is used to sequentially query the stored value of each character segment in the corresponding database node until the stored value corresponding to the last character segment of the target number ciphertext is found; and
[0019] A determining device is used to determine that the stored value corresponding to the last character segment of the target number ciphertext is the target account plaintext.
[0020] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the above-described xx method.
[0021] A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the above-described xx method.
[0022] The aforementioned method, system, device, server, and storage medium for number lookup involve obtaining multiple character segments of the encrypted target number and sequentially querying the corresponding character segments in the corresponding database nodes to obtain the address of the next character segment. Through continuous sequential queries, the last character segment and its corresponding storage value are finally retrieved, thus obtaining the plaintext target number. This invention achieves fast query speed by querying one character segment in each database node, where each character segment is relatively short. Furthermore, dividing the encrypted target number into multiple character segments and relying on multiple database nodes for querying alleviates the computational burden on a single database node. Attached Figure Description
[0023] Figure 1This is an application environment diagram of a plaintext number lookup method provided in one embodiment;
[0024] Figure 2 This is a flowchart of a method for querying a number in plaintext format, as shown in one embodiment.
[0025] Figure 3 This is a flowchart of a method for querying a number in plaintext format, as shown in one embodiment.
[0026] Figure 4 This is a schematic diagram of a plaintext number lookup device in one embodiment;
[0027] Figure 5 This is a block diagram of the internal structure of a computer device in one embodiment. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0029] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.
[0030] Figure 1 This is an application environment diagram of the xx method provided in one embodiment, such as... Figure 1 As shown, this application environment includes a sender 110, a server 120, and a client 130.
[0031] The sender 110 can be an application platform, such as a game platform, shopping platform, food delivery platform, ride-hailing platform, etc.; it can be an independent physical server or terminal, or a server cluster composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage and CDN.
[0032] The server 120 can be a standalone physical server or terminal, or a server cluster consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN.
[0033] Client 130 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Sender 110, server 120, and client 130 can connect via a network; this invention does not impose any limitations on these connections.
[0034] like Figure 2 As shown, in one embodiment, a method for querying phone numbers in plaintext is proposed. This embodiment mainly applies this method to the above-mentioned... Figure 1 Let's take server 120 as an example. Specifically, it may include the following steps:
[0035] Step S202: Receive the target number ciphertext;
[0036] In this embodiment of the invention, the target number can be a user's mobile phone number, and the target number ciphertext is the ciphertext obtained by MD5 encryption of the target customer's target number, which is usually a 32-bit hexadecimal string. The target number ciphertext can come from the sending end 110, and the server 120 can decrypt it after receiving the target number ciphertext to obtain the target number plaintext.
[0037] Step S204: Obtain and arrange in order a set number N character segments of the target number ciphertext, where N is a positive integer greater than two;
[0038] In this embodiment of the invention, the target number ciphertext is relatively long. To facilitate the execution of step S206, it is necessary to first obtain several character segments arranged in order after processing the target number ciphertext. That is, the target number ciphertext is divided into several character segments, and the several character segments are arranged in order without changing the original character order. The number N is set to a positive integer greater than 2. Since the target number ciphertext itself is usually 32 bits long and contains 32 characters, the number N can also be an even number less than 32. Preferably, the number N is 8. In addition, the length of each character segment can be the same. When the number is 8, each character segment is 4 characters. For example, when the received target number ciphertext is bfd81ee3ed27ad31c95ca75e21365973, the obtained ordered character segments are [bfd8,1ee3,ed27,ad31,c95c,a75e,2136,5973].
[0039] Step S206: Query the stored value of each character segment in the corresponding database node in sequence until the stored value corresponding to the last character segment of the target number ciphertext is found.
[0040] In this embodiment of the invention, compared to the prior art which directly uses the entire ciphertext of the target number as a key to query the database and directly obtain the corresponding value, i.e., the plaintext of the target number, this invention queries the character segments of the ciphertext of the target number sequentially in the database node. Using the first character segment as a key, the address of the second character segment in the database node can be found in the character segment node. Then, based on the value in that address, the fourth character segment is found, and so on. Each character segment is input into the database node as a key to obtain the address of its next character segment in the database node, until the last character segment is found. The plaintext of the target number is stored in the database node.
[0041] Understandably, the data in the database is stored using a key-value pair mapping. Key: Stores the encrypted data for each character segment; Value: The first N-1 character segments are stored as the address in the database node corresponding to the next character segment, and the Nth character segment corresponds to the plaintext of the target number.
[0042] It is understood that the query method of this invention can be used to perform a query, and all encrypted and plaintext numbers can be distributedly stored in the database using the same idea. No specific limitations are made here. The database can have a set number M database nodes, where M can be 10. Each database node stores several encrypted numbers and their corresponding plaintext numbers. For a given database node, the data is stored in key-value pairs. For the key-value pairs corresponding to the first 7 character segments of the encrypted number, the key of each key-value pair is a character segment of the encrypted number, and the value is the database node address of the next character segment. The key of the key-value pair for the last character segment is the last character segment, and the value is the plaintext number of the encrypted number.
[0043] Step S208: Determine that the storage value corresponding to the last character segment of the target number ciphertext is the target number plaintext.
[0044] Once the stored value corresponding to the last character segment of the target number's ciphertext is found, it can be identified as the target number's plaintext for convenient subsequent communication.
[0045] This invention obtains multiple character segments from the ciphertext of a target number and sequentially queries the corresponding character segments in the respective database nodes to obtain the address of the next character segment. Through continuous sequential queries, the last character segment and its corresponding stored value are finally retrieved, thus obtaining the plaintext of the target number. This invention achieves fast query speed by querying one character segment in each database node, as each character segment is relatively short. Furthermore, dividing the ciphertext of a target number into multiple character segments and relying on multiple database nodes for querying alleviates the computational burden on a single database node.
[0046] For ease of understanding of the present invention, examples are provided, such as... Figure 3 In one specific embodiment, all encrypted and plaintext numbers are first stored in a mirrored storage. First, MD5-encrypted encrypted numbers are generated. Since the MD5 encrypted number is 32 bits long, it is divided into 8 equal segments, with each segment divided into 4-bit segments, resulting in 8 segments from left to right. The first segment is converted to a numerical value and modulo 10 to obtain the corresponding database node information. The distributed data storage system has 10 database nodes, i.e., 10 servers. The encrypted data of each segment is stored as a key, and the value is stored as the MySQL table address of the next segment. The first segment of all encrypted numbers is stored in batches. The second to eighth segments of all encrypted numbers are stored in the MySQL database, within the same database node as the first segment, thus reducing slow queries caused by frequent I / O and improving query speed. Specifically, the second to seventh segments are stored in the MySQL table, with the key storing the encrypted data of each segment and the value storing the MySQL table address of the next segment in the database node. Finally, the eighth character field of the encrypted number stores the data of this field as a key, and the value is stored in a MySQL table in the same way as the plaintext of the complete encrypted number.
[0047] As a preferred embodiment, step S204, the step of acquiring and sequentially arranging a set number N character segments of the target number ciphertext, specifically includes the following steps:
[0048] S302, the target number ciphertext is divided into several character segments of equal length based on a set quantity;
[0049] S304, several character segments are arranged in sequence.
[0050] In one embodiment, the target number ciphertext is sliced into eight equal-length character segments. Each segment is stored separately in a corresponding database node, and the segments are arranged in order so that the characters in each segment have the same character order as the original target number ciphertext string. Each segment is a 4-digit string stored in hexadecimal.
[0051] In a preferred embodiment, step S206, which involves sequentially querying the stored value of each character segment in the corresponding database node until the stored value corresponding to the last character segment of the target number ciphertext is found, includes the following specific steps:
[0052] S402, starting from the first character field
[0053] S404, query the nth stored value of the nth character segment in the database node, where the nth stored value represents the address value of the (n+1)th character segment in the database node, and n is a positive integer greater than 0 and less than N;
[0054] S406, based on the nth stored value, query the (n+1)th stored value of the (n+1)th character segment in the database node;
[0055] S408, until the storage value corresponding to the last character segment is obtained.
[0056] In one embodiment, each character segment is queried sequentially in the database, and the address of the next character segment in the database node is found based on each character segment. For example, for the target number ciphertext bfd81ee3ed27ad31c95ca75e21365973, the following 8 character segments are queried sequentially [bfd8, 1ee3, ed27, ad31, c95c, a75e, 2136, 5973]. The first character segment "bfd8" is placed in the first database node for querying, and the stored value is obtained, which is the database address of the second character segment "1ee3". Based on the database address, "1ee3" is queried in the second database node, and the stored value is obtained, which is the address of the second character segment "ed27". The query continues until the stored value corresponding to the 8th character segment "5973" is found, which is the target number plaintext "12345678901".
[0057] As a preferred embodiment, step S202, the steps prior to receiving the target number ciphertext, includes:
[0058] S502, the existing encrypted number and its corresponding plaintext number are distributed and stored in the database.
[0059] In one embodiment, all encrypted numbers and their corresponding plaintext numbers need to be stored in a database first. Based on the slicing and querying of the target encrypted number data in steps S204 and S206, all encrypted numbers are sliced in the same way and distributed and stored in the corresponding database nodes of the database to facilitate querying the target encrypted number data to obtain the target plaintext number.
[0060] As a preferred embodiment, S502, the specific steps of distributively storing the existing encrypted number and its corresponding plaintext number in the database include:
[0061] S602, batch retrieve existing encrypted numbers and their corresponding plaintext numbers;
[0062] S604, based on a set number, divides each number's ciphertext into several character segments of equal length;
[0063] S606, starting from a character segment, the nth character segment is used as the key in the database, and the storage address corresponding to the (n+1)th character segment is used as the storage value of the key, so as to distribute the storage of the several character segments of equal length.
[0064] S608 uses the last character field as the key in the database node and the plaintext number as the last character field as the value of the key in the database node.
[0065] In one embodiment, for a ciphertext and plaintext number that need to be stored, the ciphertext is first sliced evenly according to a set number to obtain a set number of character segments, and then the character segments are stored in the database sequentially. For example, for the ciphertext bfd81ee3ed27ad31c95ca75e21365973, it is sliced and sorted to [bfd8,1ee3,ed27,ad31,c95c,a75e,2136,5973]. The first character segment "bfd8" is used as the key, and the storage address of the second character segment "1ee3" is used as the storage value. The key-value pair is stored in the first database node. Similarly, the second to seventh character segments are stored in the second to third database nodes. For the eighth character segment "bfd8", "bfd8" is used as the key, and the plaintext number "12345678901" is used as the value to store it in the eighth database node.
[0066] In one embodiment, a number lookup system is provided, the number lookup system comprising:
[0067] The server is used to execute the plaintext number lookup method provided in the foregoing embodiments;
[0068] The sending end is used to send information and the encrypted target number of the target customer to the server; and
[0069] The user terminal is used to receive the information.
[0070] In one embodiment, the sending end 110 can be an application platform, such as a game platform, shopping platform, food delivery platform, ride-hailing platform, etc.; it can be an independent physical server or terminal, or a server cluster composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage and CDN.
[0071] In one embodiment, the server 120 can be an independent physical server or terminal, or a server cluster consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN.
[0072] In one embodiment, the client 130 may be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited thereto. The sender 110, server 120, and client 130 can be connected via a network, which is not limited herein.
[0073] In one embodiment, the sending end 110, the server end 120, and the client end 130 can be connected and communicate via a network.
[0074] In one embodiment, a plaintext number lookup device is provided, which can be integrated into the aforementioned server 120, and may specifically include:
[0075] A receiving device is used to receive the ciphertext of the target number;
[0076] A slicing device is used to acquire a set number of N character segments of the target number ciphertext arranged in order, where N is a positive integer greater than two;
[0077] A query device is used to sequentially query the stored value of each character segment in the corresponding database node until the stored value corresponding to the last character segment of the target number ciphertext is found; and
[0078] A determining device is used to determine that the stored value corresponding to the last character segment of the target number ciphertext is the target account plaintext.
[0079] In one embodiment, the target number can be a user's mobile phone number. The target number ciphertext is the ciphertext obtained by MD5 encryption of the target customer's target number, which is typically a 32-bit hexadecimal string. The target number ciphertext can originate from the sender 110, and the server 120 can decrypt it to obtain the target number plaintext after receiving it.
[0080] In one embodiment, the target number ciphertext is relatively long. To facilitate the execution of step S206, it is necessary to first obtain several character segments arranged in order after processing the target number ciphertext. That is, the target number ciphertext is divided into several character segments, and the character segments are arranged in order without changing the original character order. The number N is set to a positive integer greater than 2. Since the target number ciphertext itself is usually 32 bits long and contains 32 characters, the number N can also be an even number less than 32. Preferably, the number N is 8. In addition, the length of each character segment can be the same. When the number is 8, each character segment is 4 characters. For example, when the received target number ciphertext is bfd81ee3ed27ad31c95ca75e21365973, the obtained ordered character segments are [bfd8,1ee3,ed27,ad31,c95c,a75e,2136,5973].
[0081] In one embodiment, compared to the prior art which directly uses the entire ciphertext of the target number as a key to query the database and directly obtain the corresponding value, i.e., the plaintext of the target number, the present invention queries the character segments of the ciphertext of the target number sequentially in the database node. Using the first character segment as a key, the address of the second character segment in the database node can be found in the character segment node. Then, based on the value in that address, the fourth character segment is found, and so on. Each character segment is input into the database node as a key to obtain the address of its next character segment in the database node, until the last character segment is found. The plaintext of the target number is stored in the database node.
[0082] Understandably, the data in the database is stored using a key-value pair mapping. Key: Stores the encrypted data for each character segment; Value: The first N-1 character segments are stored as the address in the database node corresponding to the next character segment, and the Nth character segment corresponds to the plaintext of the target number.
[0083] It is understood that the query method of this invention can be used to perform a query, and all encrypted and plaintext numbers can be distributed and stored in the database using the same idea. No specific limitations are made here. Each database can have a set number of N database nodes. Each database node stores several key-value pairs. For the first N-1 database nodes, the key of each key-value pair is a character segment of the encrypted account information, and the value is the address of the database node for the next character segment. The key of the key-value pair in the last database node is the last character segment and the plaintext number of the encrypted number.
[0084] In one embodiment, after retrieving the stored value corresponding to the last character segment of the target number's ciphertext, it can be identified as the target number's plaintext to facilitate subsequent communication.
[0085] Figure 5 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 Server 120 in the middle. For example... Figure 5 As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a plaintext number lookup method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement a plaintext number lookup method. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0086] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0087] In one embodiment, the plaintext number lookup device provided in this application can be implemented as a computer program, and the computer program can be implemented as follows: Figure 5 The device runs on the computer shown. The computer's memory can store the various program modules that make up this plaintext number lookup device, for example, Figure 4 The receiving device, slicing device, querying device, and determining device are shown. A computer program comprised of various program modules causes the processor to execute the steps in a plaintext number lookup according to various embodiments of this application described in this specification.
[0088] For example, Figure 5 The computer equipment shown can be used as follows Figure 4 The receiving device in the shown plaintext query device executes step S202. The computer device can execute step S204 via the slicing device. The computer device can execute step S206 via the query device. The computer device can execute step S208 via the determining device.
[0089] In one embodiment, a computer device is provided, the computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0090] Step S202: Receive the ciphertext of the target number;
[0091] Step S204: Obtain and arrange in order a set number N character segments of the target number ciphertext, where N is a positive integer greater than two;
[0092] Step S206: Query the stored value of each character segment in the corresponding database node in sequence until the stored value corresponding to the last character segment of the target number ciphertext is found.
[0093] Step S208: Determine that the storage value corresponding to the last character segment of the target number ciphertext is the target number plaintext.
[0094] This invention obtains multiple character segments from the ciphertext of a target number and sequentially queries the corresponding character segments in the respective database nodes to obtain the address of the next character segment. Through continuous sequential queries, the last character segment and its corresponding stored value are finally retrieved, thus obtaining the plaintext of the target number. This invention achieves fast query speed by querying one character segment in each database node, as each character segment is relatively short. Furthermore, dividing the ciphertext of a target number into multiple character segments and relying on multiple database nodes for querying alleviates the computational burden on a single database node.
[0095] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, causes the processor to perform the following steps:
[0096] Step S202: Receive the ciphertext of the target number;
[0097] Step S204: Obtain and arrange in order a set number N character segments of the target number ciphertext, where N is a positive integer greater than two;
[0098] Step S206: Query the stored value of each character segment in the corresponding database node in sequence until the stored value corresponding to the last character segment of the target number ciphertext is found.
[0099] Step S208: Determine that the storage value corresponding to the last character segment of the target number ciphertext is the target number plaintext.
[0100] This invention obtains multiple character segments from the ciphertext of a target number and sequentially queries the corresponding character segments in the respective database nodes to obtain the address of the next character segment. Through continuous sequential queries, the last character segment and its corresponding stored value are finally retrieved, thus obtaining the plaintext of the target number. This invention achieves fast query speed by querying one character segment in each database node, as each character segment is relatively short. Furthermore, dividing the ciphertext of a target number into multiple character segments and relying on multiple database nodes for querying alleviates the computational burden on a single database node.
[0101] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0102] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0103] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0104] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A method for plaintext telephone number lookup, characterized in that, The query method includes: Receive encrypted data from the target number; Obtain and sort N character segments of the target number ciphertext in order, where N is a positive integer greater than two; Starting from the first character segment, query the nth stored value of the nth character segment in the database node. The nth stored value represents the address value of the (n+1)th character segment in the database node, where n is a positive integer greater than 0 and less than N. Based on the nth stored value, query the (n+1)th stored value of the (n+1)th character segment in the database node. Continue until the stored value corresponding to the last character segment is obtained. The stored value corresponding to the last character segment of the target number ciphertext is determined to be the target number plaintext; The step of obtaining a number of sequentially arranged character segments of the target number ciphertext includes: dividing the target number ciphertext into a number of character segments of equal length based on a set quantity; and sequentially arranging the character segments.
2. The method for plaintext number lookup according to claim 1, characterized in that, The steps prior to receiving the ciphertext of the target number include: The existing encrypted numbers and their corresponding plaintext numbers are stored in a distributed manner in the database.
3. The method for plaintext number lookup according to claim 2, characterized in that, The step of distributing the existing encrypted number and its corresponding plaintext number in the database includes: Batch retrieve existing encrypted phone numbers and their corresponding plaintext phone numbers; Each number's ciphertext is divided into several character segments of equal length based on a set number; Starting from a character segment, the nth character segment is used as the key in the database, and the storage address corresponding to the (n+1)th character segment is used as the storage value of the key, so as to distribute the storage of the several character segments of equal length. Use the last character field as the key in the database node, and use the plaintext number as the last character field as the value of the key in the database node.
4. The method for plaintext number lookup according to claim 3, characterized in that, The database includes a set number of M database nodes, where M is a positive integer, and all encrypted and plaintext phone numbers are distributed and stored in the database.
5. A number lookup system, characterized in that, The number lookup system includes: The server is used to execute the plaintext number lookup method as described in any one of claims 1 to 4; The sending end is used to send information and the encrypted target number of the target customer to the server; and The user terminal is used to receive the information.
6. A device for querying phone numbers in plaintext, characterized in that, The plaintext number lookup device includes: A receiving device used to receive the ciphertext of the target number; A slicing device is used to acquire a set number of N character segments of the target number ciphertext arranged in order, where N is a positive integer greater than two; The step of obtaining a number of sequentially arranged character segments of the target number ciphertext includes: dividing the target number ciphertext into a number of character segments of equal length based on a set number; and sequentially arranging the character segments. A query device is configured to, starting from the first character segment, query the nth stored value of the nth character segment in a database node, where the nth stored value represents the address of the (n+1)th character segment in the database node, and n is a positive integer greater than 0 and less than N; query the (n+1)th stored value of the (n+1)th character segment in the database node based on the nth stored value; and continue until the stored value corresponding to the last character segment is obtained; and A determining device is used to determine that the stored value corresponding to the last character segment of the target number ciphertext is the target account plaintext.
7. A server, characterized in that, It includes a memory and a processor, wherein the memory stores computer programs. When the computer program is executed by the processor, the processor performs the steps of the plaintext number lookup method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the steps of the plaintext number lookup method according to any one of claims 1 to 4.