Number storage method and device based on block chain and related equipment

By storing phone numbers and number information in the main chain and side chains of the blockchain, and utilizing decentralized and multi-party consensus mechanisms, the stability and security issues of number storage are solved, achieving efficient and secure data management.

CN120935203APending Publication Date: 2025-11-11CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511326045.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

In existing technologies, the stability and security of phone numbers during storage are poor, especially after the implementation of the number portability policy, centralized database architecture has single points of failure and data security issues.

Method used

The number and number information are stored in the main chain and side chain of the blockchain. The main chain is responsible for storing hash values, and the side chain is responsible for number portability records. The decentralized and multi-party consensus mechanism of the blockchain ensures the security and consistency of the data.

Benefits of technology

It improves the stability and security of number storage, reduces the risk of single points of failure, ensures the immutability and transparency of data, and achieves efficient data synchronization and querying.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120935203A_ABST
    Figure CN120935203A_ABST
Patent Text Reader

Abstract

The invention provides a number storage method and device based on a block chain and related equipment, and relates to the technical field of block chains. According to the technical scheme, after multiple numbers needing to be stored and multiple pieces of number information are obtained, the multiple pieces of number information are stored; the method comprises the steps of storing numbers in a main chain of a block chain according to multiple pieces of number information, storing the multiple pieces of number information in multiple side chains of the block chain, after storage is completed, synchronizing the multiple numbers and the multiple pieces of number information to nodes corresponding to multiple operators, and storing the multiple numbers and the multiple pieces of number information by using the block chain. And the stability and the security of the number during storage are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, specifically to a blockchain-based number storage method, apparatus, and related equipment. Background Technology

[0002] In related technologies, phone number attribution information can be obtained from the first 7 digits of a phone number, revealing the mobile operator and the province / city / region where the number is located. However, with the implementation of number portability, many users have changed their phone numbers' operators, rendering the previous method of querying number attribution information based on a fixed 7-digit code ineffective.

[0003] In related technologies, a centralized database architecture is generally used to manage number attribution information. Data storage and retrieval mainly rely on a single server or server cluster. Data synchronization and transmission are achieved through traditional network protocols (such as HTTP, FTP, etc.). However, this storage method has the risk of single point of failure and data security issues, resulting in poor stability and security of numbers when stored in existing technologies. Summary of the Invention

[0004] This application provides a blockchain-based number storage method, apparatus, and related equipment, which solves the problem of poor stability and security of numbers during storage in the prior art.

[0005] To solve the above problems, this application is implemented as follows: In a first aspect, this application provides a blockchain-based number storage method, the method comprising: Obtain multiple numbers and multiple number information that need to be stored, wherein the multiple number information corresponds one-to-one with the multiple numbers, and the number information includes number portability data of the corresponding number between multiple operators; The multiple numbers are stored in the main chain of the blockchain, and the information of the multiple numbers is stored in multiple side chains of the blockchain. The main chain of the blockchain is connected to the multiple side chains, and the blockchain is managed by the multiple operators. In the blockchain, the multiple numbers and their information are synchronized to the nodes corresponding to the multiple operators.

[0006] Optionally, obtaining the multiple numbers and multiple number information to be stored includes: Retrieve multiple numbers that need to be stored; Information is queried on the multiple servers corresponding to the multiple operators to determine the number information corresponding to each number, thereby obtaining multiple initial number information; The multiple initial number information is generated after security and integrity verifications are performed on each of the initial number information.

[0007] Optionally, storing the plurality of numbers in the main chain of the blockchain and storing the plurality of number information in multiple side chains of the blockchain includes: The blockchain is initialized. If the number information corresponding to the target number indicates that the number portability count of the target number is less than or equal to 1, the hash value corresponding to the target number is stored in the main chain of the blockchain, and the number information corresponding to the target number is stored in a side chain connected to the main chain, wherein the target number is any one of the plurality of numbers; If the number information corresponding to the target number indicates that the number portability count of the target number is greater than 1, the hash value corresponding to the target number is stored in the main chain of the blockchain, and the number information corresponding to the target number is stored in N sequentially connected side chains, where N is the number portability count of the target number, and the first side chain among the N sequentially connected side chains is connected to the main chain.

[0008] Optionally, synchronizing the multiple numbers and their information to the nodes corresponding to the multiple operators in the blockchain includes: Generate synchronization information, which indicates that the storage of the plurality of numbers and the information of the plurality of numbers has been completed in the blockchain; The synchronization information is broadcast to the nodes corresponding to the multiple operators.

[0009] Optionally, after synchronizing the plurality of numbers and the plurality of number information to the nodes corresponding to the plurality of operators in the blockchain, the method further includes: A first permission is assigned to the user terminal, which is used to query the multiple numbers in the blockchain. The user terminal is the user terminal that requests to query information in the blockchain. A second permission is assigned to the multiple operators, the second permission being used to query the multiple numbers and the multiple number information in the blockchain.

[0010] Optionally, the number portability data includes at least one of the following: the number portability history of the corresponding number, the outgoing operator of the corresponding number, the incoming operator of the corresponding number, the ownership information of the corresponding number, and the time information of the most recent number portability.

[0011] Secondly, this application provides a blockchain-based number storage device, the device comprising: The acquisition module is used to acquire multiple numbers and multiple number information that need to be stored. The multiple number information corresponds one-to-one with the multiple numbers. The number information includes number portability data of the corresponding number between multiple operators. A storage module is used to store the multiple numbers in the main chain of the blockchain and to store the information of the multiple numbers in multiple side chains of the blockchain. The main chain of the blockchain is connected to the multiple side chains, and the blockchain is managed by the multiple operators. The synchronization module is used to synchronize the multiple numbers and their information to the nodes corresponding to the multiple operators in the blockchain.

[0012] Thirdly, this application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method described in the first aspect above.

[0013] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0014] Fifthly, this application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method described in the first aspect above.

[0015] This application provides a blockchain-based method, apparatus, and related equipment for storing phone numbers, relating to the field of blockchain technology. The method includes: acquiring multiple phone numbers and multiple phone number information to be stored, wherein each piece of phone number information corresponds one-to-one with the multiple phone numbers, and the phone number information includes number portability data for the corresponding number across multiple operators; storing the multiple phone numbers in the main chain of a blockchain and storing the multiple phone number information in multiple side chains of the blockchain, wherein the main chain of the blockchain and the multiple side chains are connected, and the blockchain is managed by the multiple operators; and synchronizing the multiple phone numbers and the multiple phone number information to the nodes corresponding to the multiple operators in the blockchain. The technical solution of this application, after acquiring the multiple phone numbers and multiple phone number information to be stored, stores the phone numbers in the main chain of the blockchain and the multiple phone number information in the multiple side chains of the blockchain according to the multiple phone number information. After storage, it synchronizes the multiple phone numbers and the multiple phone number information to the nodes corresponding to the multiple operators. By using blockchain to store multiple phone numbers and multiple phone number information, the stability and security of the phone numbers during storage are improved. Attached Figure Description

[0016] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart illustrating a blockchain-based number storage method provided in this application embodiment; Figure 2 This is one of the schematic diagrams of a blockchain structure provided in the embodiments of this application; Figure 3 This is the second schematic diagram of the blockchain structure provided in the embodiments of this application; Figure 4 A schematic diagram of the structure of a blockchain-based number storage device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] The terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, and the presence of both A and B, both B and C, both A and C, and the presence of A, B, and C.

[0020] See Figure 1 , Figure 1 This is a flowchart illustrating the blockchain-based number storage method provided in an embodiment of this application. Figure 1As shown, a blockchain-based number storage method may include the following steps: Step 101: Obtain multiple numbers and multiple number information that need to be stored. The multiple number information corresponds one-to-one with the multiple numbers. The number information includes the number portability data of the corresponding number between multiple operators.

[0021] In this embodiment, each number corresponds to a number information, which includes the number portability data of the corresponding number among multiple operators. Specifically, number portability data refers to the relevant data in the mobile communication industry on how a user transfers their mobile phone number from one operator to another without changing their phone number.

[0022] It should be noted that multiple numbers and information can be obtained by querying data from multiple operators. For example, if a number belongs to operator XX, a query request can be sent to operator XX's server to obtain the number and its corresponding information.

[0023] Optionally, the number portability data includes at least one of the following: the number portability history of the corresponding number, the outgoing operator of the corresponding number, the incoming operator of the corresponding number, the ownership information of the corresponding number, and the time information of the most recent number portability.

[0024] Specifically, each operator periodically or in real time extracts the mobile phone numbers of users who have performed number portability operations. The extracted information includes: the number portability history of the mobile phone number; the operator data of the first number porting out and the number porting in; the current number's ownership information and the timestamp of the most recent number portability.

[0025] Step 102: Store the multiple numbers in the main chain of the blockchain and store the information of the multiple numbers in multiple side chains of the blockchain. The main chain of the blockchain is connected to the multiple side chains, and the blockchain is managed by the multiple operators.

[0026] In this embodiment, the main chain and sidechains are two different blockchain structures. The main chain is the core of the blockchain network, carrying the network's core functions and major transaction records. It is the foundation of the blockchain and the initially created blockchain. Sidechains are blockchains relatively independent of the main chain, capable of bidirectional connections and asset transfers with the main chain. They are primarily used to extend the functionality of the main chain and provide different features. In other words, the main chain is the core of the blockchain network, providing the foundation for security and decentralization, while sidechains provide scalability and flexibility, enabling different applications and functions through interaction with the main chain.

[0027] By storing multiple numbers in the main chain of the blockchain and storing multiple number information in multiple side chains of the blockchain, the security of number and number information storage is improved.

[0028] Step 103: In the blockchain, synchronize the multiple numbers and the information of the multiple numbers to the nodes corresponding to the multiple operators.

[0029] In this embodiment, once the sidechain data is generated, the system broadcasts the complete sidechain to the entire blockchain network, ensuring that the data of all operators' corresponding nodes in the blockchain remains synchronized. The nodes corresponding to multiple operators can be one or more nodes; this embodiment does not impose a specific limitation. The initial blockchain structure is automatically generated and data synchronization is completed through blockchain technology. Smart contracts and automated initialization processes not only simplify the operators' operational steps but also ensure data consistency and accuracy. Leveraging the automation characteristics of blockchain, large-scale data initialization and synchronization can be completed quickly, effectively solving the problems of high complexity and cumbersome operation processes in traditional systems.

[0030] The technical solution of this application, after obtaining multiple numbers and multiple number information that need to be stored, stores the numbers in the main chain of the blockchain and stores the multiple number information in multiple side chains of the blockchain according to the multiple number information. After storage is completed, the multiple numbers and the multiple number information are synchronized to the nodes corresponding to the multiple operators. By using the blockchain to store multiple numbers and multiple number information, the stability and security of the numbers during storage are improved.

[0031] In some feasible implementations, optionally, obtaining the multiple numbers and multiple number information to be stored includes: Retrieve multiple numbers that need to be stored; Information is queried on the multiple servers corresponding to the multiple operators to determine the number information corresponding to each number, thereby obtaining multiple initial number information; The multiple initial number information is generated after security and integrity verifications are performed on each of the initial number information.

[0032] In this embodiment, information is queried on the collected numbers across multiple servers corresponding to each operator. This process involves accessing different databases or APIs to obtain relevant information for each number (such as user registration information, account status, etc.).

[0033] By querying, the system will obtain information on several initial phone numbers. Specifically, the query will retrieve basic data related to the number. For example, this data may include the number's location, account opening date, account status, and service plan information.

[0034] After obtaining the initial number information, the system needs to perform security and integrity verification on this information to ensure the authenticity and tamper-proof nature of the data. Security verification ensures that the data has not been tampered with or leaked by unauthorized operations, and may involve methods such as encryption and authentication. Integrity verification ensures that the data has not been modified during transmission and storage and accurately represents the original information, for example, by using methods such as hash algorithms.

[0035] With both security and integrity verifications passed, the system ultimately generated multiple valid number information entries.

[0036] Optionally, storing the plurality of numbers in the main chain of the blockchain and storing the plurality of number information in multiple side chains of the blockchain includes: The blockchain is initialized. If the number information corresponding to the target number indicates that the number portability count of the target number is less than or equal to 1, the hash value corresponding to the target number is stored in the main chain of the blockchain, and the number information corresponding to the target number is stored in a side chain connected to the main chain, wherein the target number is any one of the plurality of numbers; If the number information corresponding to the target number indicates that the number portability count of the target number is greater than 1, the hash value corresponding to the target number is stored in the main chain of the blockchain, and the number information corresponding to the target number is stored in N sequentially connected side chains, where N is the number portability count of the target number, and the first side chain among the N sequentially connected side chains is connected to the main chain.

[0037] In this embodiment, the existing historical number portability data is first initialized on a blockchain, with the main blockchain created by the original operator. Then, after the outgoing and incoming operators confirm the historical data is correct, block 0 of the sidechain is generated. Subsequent portability operations sequentially generate new sidechain blocks until the current operator is confirmed. To ensure the integrity and immutability of the data initialization process, a timestamp server is introduced to timestamp each initialization operation, ensuring the correct order of historical data. The incoming operator checks each number to determine if there are any subsequent portability operations. If so, block 1 is generated, until all portability operations are completed.

[0038] In this embodiment, the blockchain consists of a main chain and multiple side chains, used to record the historical number portability operations for each number. The main chain blocks record the hash value of the user's mobile number to ensure user privacy; these blocks are generated by the operator network through a consensus mechanism, avoiding the generation process of blocks controlled by a single operator. The side chains are responsible for storing specific number portability records. Block 0 stores the initial number portability operation data, and each subsequent portability generates a new block, recording the portability time, the sending / receiving operator information, and the digital signatures of both parties. Furthermore, in this application, each block in the main chain can automatically trigger updates to the side chains via smart contracts, ensuring that portability records are written in real time. A layered storage strategy is adopted, storing the most frequently accessed latest portability records in a high-efficiency storage layer, while historical records are stored in a cold storage layer, improving access efficiency.

[0039] The memory structure for one-time transfer and two-time transfer is as follows: Figure 2 , Figure 3 As shown, Figure 2 This is one of the schematic diagrams of the blockchain structure of this invention. Figure 3 This is the second schematic diagram of the blockchain structure of this invention. The main chain blocks contain the hash values ​​of the mobile phone numbers of users porting their numbers. The blocks of the attached side chains correspond to each porting record. Each main chain block has a corresponding side chain attached. Block 0 of the side chain records the first porting operation for that mobile phone number, including the first porting time, the porting-out operator's information, the porting-out operator's digital signature, the porting-in operator's information, and the porting-in operator's signature data. Block 1 records the second porting operation, similarly including the porting time, the porting-out operator's information, the porting-out operator's digital signature, the porting-in operator's information, and the porting-in operator's signature data. Blocks 2, 3, and so on, store the records of the third and fourth porting operations. The information stored in the block with the highest block number is the latest number porting information for that mobile phone number.

[0040] The main chain records the hash value of each user's mobile phone number in each block to ensure user privacy. The main chain is generated using a decentralized consensus mechanism, avoiding the risk of data control by a single operator. Sidechains record the detailed number portability history of each mobile phone number; a new block is generated and relevant information is recorded for each portability operation. The advantage of this structure is that it leverages the decentralized nature of blockchain to achieve data security, immutability, and transparency, while providing more efficient access performance.

[0041] Optionally, synchronizing the multiple numbers and their information to the nodes corresponding to the multiple operators in the blockchain includes: Generate synchronization information, which indicates that the storage of the plurality of numbers and the information of the plurality of numbers has been completed in the blockchain; The synchronization information is broadcast to the nodes corresponding to the multiple operators.

[0042] Specifically, after storing multiple numbers and their information in the blockchain, synchronization information is generated and broadcast to the multiple operators, thereby ensuring that the multiple operators can always maintain data synchronization.

[0043] Each number portability operation requires confirmation from both the sending and receiving operators, and both parties must record the information in the sidechain block using digital signatures. This multi-party consensus mechanism effectively prevents disputes or errors that might arise from unilateral data manipulation, making the data confirmation process more transparent and fair. Furthermore, this mechanism reduces the possibility of human error and enhances the data's tamper-proof capabilities through digital signatures.

[0044] Optionally, after synchronizing the plurality of numbers and the plurality of number information to the nodes corresponding to the plurality of operators in the blockchain, the method further includes: A first permission is assigned to the user terminal, which is used to query the multiple numbers in the blockchain. The user terminal is the user terminal that requests to query information in the blockchain. A second permission is assigned to the multiple operators, the second permission being used to query the multiple numbers and the multiple number information in the blockchain.

[0045] In this embodiment, once the blockchain is initialized, it can provide services to the outside world. Specifically, users can use the first permission, meaning enterprise users can join the blockchain network and become nodes or light nodes to access and synchronize data. To ensure data security and privacy, enterprise users can only access data within their authorized scope and maintain the synchronization of number attribution information by listening to broadcast updates on the blockchain. Multiple operators can use the second permission; enterprise users do not need to store all the data in the entire blockchain, but only need to obtain the number attribution information related to them, thereby achieving lightweight data management and updates.

[0046] It's important to clarify that operators play a dual role in the blockchain: they are both builders and users. As builders, operators are responsible for adding and updating main chain blocks and side chain blocks in the blockchain. During number portability, the sending and receiving operators confirm relevant data through a multi-party consensus mechanism and generate new side chain blocks in the blockchain, recording each portability operation. The process of adding blocks requires digital signatures from both operators for confirmation, ensuring the legality and immutability of number portability. As users, operators are responsible for regularly synchronizing the latest number portability information through broadcast updates on the blockchain and providing this information to enterprise users through their own systems, ensuring data real-time performance and consistency.

[0047] To ensure the consistency of number portability data across operators, the blockchain system employs a network-wide broadcast and consensus mechanism, enabling all operator nodes to maintain synchronized data updates. After each number portability operation is completed, a new block is generated and broadcast through the blockchain network. All participating operator nodes receive the latest number attribution information and synchronize their own data copies. If a node of one operator fails, other operators can still continue to provide query and synchronization services, ensuring high availability and fault tolerance of the system.

[0048] The technical solution of this application, after obtaining multiple numbers and multiple number information that need to be stored, stores the numbers in the main chain of the blockchain and stores the multiple number information in multiple side chains of the blockchain according to the multiple number information. After storage is completed, the multiple numbers and the multiple number information are synchronized to the nodes corresponding to the multiple operators. By using the blockchain to store multiple numbers and multiple number information, the stability and security of the numbers during storage are improved.

[0049] See Figure 4 , Figure 4 This is a structural diagram of a blockchain-based number storage device provided in an embodiment of this application. Figure 4 As shown, the blockchain-based number storage device 400 includes: The acquisition module 410 is used to acquire multiple numbers and multiple number information that need to be stored, wherein the multiple number information corresponds one-to-one with the multiple numbers, and the number information includes number portability data of the corresponding number among multiple operators; Storage module 420 is used to store the multiple numbers in the main chain of the blockchain and to store the information of the multiple numbers in multiple side chains of the blockchain. The main chain of the blockchain is connected to the multiple side chains, and the blockchain is managed by the multiple operators. The synchronization module 430 is used to synchronize the multiple numbers and the multiple number information to the nodes corresponding to the multiple operators in the blockchain.

[0050] Optionally, the acquisition module 410 includes: The `get` submodule is used to retrieve multiple numbers that need to be stored. The query submodule is used to query information for the multiple numbers in the multiple servers corresponding to the multiple operators, determine the number information corresponding to each number, and obtain multiple initial number information; The verification submodule is used to generate the multiple number information after performing security verification and integrity verification on the multiple initial number information respectively, and the verification is successful.

[0051] Optionally, storage module 420 includes: The processing submodule is used to initialize the blockchain. The first storage submodule is used to store the hash value corresponding to the target number in the main chain of the blockchain and the number information corresponding to the target number in a side chain connected to the main chain when the number information corresponding to the target number indicates that the number portability number of the target number is less than or equal to 1. The target number is any one of the plurality of numbers. The second storage submodule is used to store the hash value corresponding to the target number in the main chain of the blockchain when the number information corresponding to the target number indicates that the number portability count of the target number is greater than 1, and to store the number information corresponding to the target number in N sequentially connected side chains, where N is the number portability count of the target number, and the first side chain among the N sequentially connected side chains is connected to the main chain.

[0052] Optionally, the synchronization module 430 includes: A generation submodule is used to generate synchronization information, which indicates that the storage of the multiple numbers and the information of the multiple numbers has been completed in the blockchain; The synchronization submodule is used to synchronize the synchronization information to the nodes corresponding to the multiple operators via broadcast.

[0053] Optional, also includes: The first allocation submodule is used to allocate a first permission to the user terminal. The first permission is used to query the multiple numbers in the blockchain. The user terminal is the user terminal that requests to query information in the blockchain. The second allocation submodule is used to allocate second permissions to the multiple operators, and the second permissions are used to query the multiple numbers and the information of the multiple numbers in the blockchain.

[0054] Optionally, the number portability data includes at least one of the following: the number portability history of the corresponding number, the outgoing operator of the corresponding number, the incoming operator of the corresponding number, the ownership information of the corresponding number, and the time information of the most recent number portability.

[0055] The technical solution of this application, after obtaining multiple numbers and multiple number information that need to be stored, stores the numbers in the main chain of the blockchain and stores the multiple number information in multiple side chains of the blockchain according to the multiple number information. After storage is completed, the multiple numbers and the multiple number information are synchronized to the nodes corresponding to the multiple operators. By using the blockchain to store multiple numbers and multiple number information, the stability and security of the numbers during storage are improved.

[0056] This application also provides an electronic device. Please refer to [link to relevant documentation]. Figure 5 The electronic device may include a processor 501, a memory 502, and a program 5021 stored in the memory 502 and capable of running on the processor 501.

[0057] When program 5021 is executed by processor 501, it can achieve the following: Figure 1 Any step in the corresponding method embodiment: Obtain multiple numbers and multiple number information that need to be stored, wherein the multiple number information corresponds one-to-one with the multiple numbers, and the number information includes number portability data of the corresponding number between multiple operators; The multiple numbers are stored in the main chain of the blockchain, and the information of the multiple numbers is stored in multiple side chains of the blockchain. The main chain of the blockchain is connected to the multiple side chains, and the blockchain is managed by the multiple operators. In the blockchain, the multiple numbers and their information are synchronized to the nodes corresponding to the multiple operators.

[0058] Optionally, obtaining the multiple numbers and multiple number information to be stored includes: Retrieve multiple numbers that need to be stored; Information is queried on the multiple servers corresponding to the multiple operators to determine the number information corresponding to each number, thereby obtaining multiple initial number information; The multiple initial number information is generated after security and integrity verifications are performed on each of the initial number information.

[0059] Optionally, storing the plurality of numbers in the main chain of the blockchain and storing the plurality of number information in multiple side chains of the blockchain includes: The blockchain is initialized. If the number information corresponding to the target number indicates that the number portability count of the target number is less than or equal to 1, the hash value corresponding to the target number is stored in the main chain of the blockchain, and the number information corresponding to the target number is stored in a side chain connected to the main chain, wherein the target number is any one of the plurality of numbers; If the number information corresponding to the target number indicates that the number portability count of the target number is greater than 1, the hash value corresponding to the target number is stored in the main chain of the blockchain, and the number information corresponding to the target number is stored in N sequentially connected side chains, where N is the number portability count of the target number, and the first side chain among the N sequentially connected side chains is connected to the main chain.

[0060] Optionally, synchronizing the multiple numbers and their information to the nodes corresponding to the multiple operators in the blockchain includes: Generate synchronization information, which indicates that the storage of the plurality of numbers and the information of the plurality of numbers has been completed in the blockchain; The synchronization information is broadcast to the nodes corresponding to the multiple operators.

[0061] Optionally, after synchronizing the plurality of numbers and the plurality of number information to the nodes corresponding to the plurality of operators in the blockchain, the method further includes: A first permission is assigned to the user terminal, which is used to query the multiple numbers in the blockchain. The user terminal is the user terminal that requests to query information in the blockchain. A second permission is assigned to the multiple operators, the second permission being used to query the multiple numbers and the multiple number information in the blockchain.

[0062] Optionally, the number portability data includes at least one of the following: the number portability history of the corresponding number, the outgoing operator of the corresponding number, the incoming operator of the corresponding number, the ownership information of the corresponding number, and the time information of the most recent number portability.

[0063] The technical solution of this application, after obtaining multiple numbers and multiple number information that need to be stored, stores the numbers in the main chain of the blockchain and stores the multiple number information in multiple side chains of the blockchain according to the multiple number information. After storage is completed, the multiple numbers and the multiple number information are synchronized to the nodes corresponding to the multiple operators. By using the blockchain to store multiple numbers and multiple number information, the stability and security of the numbers during storage are improved.

[0064] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the above-described blockchain-based number storage method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0065] This application also provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described blockchain-based number storage method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0066] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0068] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A blockchain-based number storage method, characterized in that, The method includes: Obtain multiple numbers and multiple number information that need to be stored, wherein the multiple number information corresponds one-to-one with the multiple numbers, and the number information includes number portability data of the corresponding number between multiple operators; The multiple numbers are stored in the main chain of the blockchain, and the information of the multiple numbers is stored in multiple side chains of the blockchain. The main chain of the blockchain is connected to the multiple side chains, and the blockchain is managed by the multiple operators. In the blockchain, the multiple numbers and their information are synchronized to the nodes corresponding to the multiple operators.

2. The method according to claim 1, characterized in that, The process of obtaining multiple numbers and information about those numbers to be stored includes: Retrieve multiple numbers that need to be stored; Information is queried on the multiple servers corresponding to the multiple operators to determine the number information corresponding to each number, thereby obtaining multiple initial number information; The multiple initial number information is generated after security and integrity verifications are performed on each of the initial number information.

3. The method according to claim 1, characterized in that, The step of storing the multiple numbers in the main chain of the blockchain and storing the information of the multiple numbers in multiple side chains of the blockchain includes: The blockchain is initialized. If the number information corresponding to the target number indicates that the number portability count of the target number is less than or equal to 1, the hash value corresponding to the target number is stored in the main chain of the blockchain, and the number information corresponding to the target number is stored in a side chain connected to the main chain, wherein the target number is any one of the plurality of numbers; If the number information corresponding to the target number indicates that the number portability count of the target number is greater than 1, the hash value corresponding to the target number is stored in the main chain of the blockchain, and the number information corresponding to the target number is stored in N sequentially connected side chains, where N is the number portability count of the target number, and the first side chain among the N sequentially connected side chains is connected to the main chain.

4. The method according to claim 3, characterized in that, The process of synchronizing the multiple numbers and their information to the nodes corresponding to the multiple operators in the blockchain includes: Generate synchronization information, which indicates that the storage of the plurality of numbers and the information of the plurality of numbers has been completed in the blockchain; The synchronization information is broadcast to the nodes corresponding to the multiple operators.

5. The method according to claim 1, characterized in that, After synchronizing the multiple numbers and their information to the nodes corresponding to the multiple operators in the blockchain, the method further includes: A first permission is assigned to the user terminal, which is used to query the multiple numbers in the blockchain. The user terminal is the user terminal that requests to query information in the blockchain. A second permission is assigned to the multiple operators, the second permission being used to query the multiple numbers and the multiple number information in the blockchain.

6. The method according to any one of claims 1-5, characterized in that, The number portability data includes at least one of the following: the number portability history of the corresponding number, the outgoing operator of the corresponding number, the incoming operator of the corresponding number, the ownership information of the corresponding number, and the time information of the most recent number portability.

7. A blockchain-based number storage device, characterized in that, The device includes: The acquisition module is used to acquire multiple numbers and multiple number information that need to be stored. The multiple number information corresponds one-to-one with the multiple numbers. The number information includes number portability data of the corresponding number between multiple operators. A storage module is used to store the multiple numbers in the main chain of the blockchain and to store the information of the multiple numbers in multiple side chains of the blockchain. The main chain of the blockchain is connected to the multiple side chains, and the blockchain is managed by the multiple operators. The synchronization module is used to synchronize the multiple numbers and their information to the nodes corresponding to the multiple operators in the blockchain.

8. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 6.