A blockchain network service platform, address allocation method, and storage medium
Patent Information
- Application Number
- CN202111163493.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-09-30
AI Technical Summary
In the prior art, IP address allocation efficiency is low, especially in the rapid development of public and private cloud infrastructure, the traditional manual allocation method is inefficient and cumbersome, and the centralized relational database has the risk of data tampering.
Using the blockchain network service platform, when receiving the client address request, the address that satisfies the number of requests is obtained from the blockchain address pool and recycling pool based on the historical client identification list, and automatically allocates it to the client to avoid manual labor Intervention.
It improves the efficiency of IP address allocation, reduces manual intervention, enhances address utilization, and reduces the risk of data tampering through the decentralized characteristics of blockchain.
Smart Images

Figure CN113794789B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain network service platform, an address allocation method, and a storage medium. Background Art
[0002] Internet Protocol (IP) addresses are the most important identification resources in computer networks. The rational planning and allocation of IP addresses is also the core part of data center network management.
[0003] In the prior art, after a client submits an address allocation request, the network administrator logs into the network information management system and queries the allocation of the corresponding data center IP address. The network administrator determines a suitable allocatable IP address for the client and sends the IP address to the client for use by the user corresponding to the client.
[0004] With the rapid development of public cloud and private cloud infrastructure, the demand for network resources such as IP addresses is gradually increasing. The method of allocating IP addresses based on the allocation of IP addresses in the data center by network administrators has reduced the efficiency of address allocation. Summary of the invention
[0005] In order to solve the above technical problems, the embodiments of the present application hope to provide a blockchain network service platform, an address allocation method, and a storage medium, which can improve the efficiency of address allocation.
[0006] The technical solution of this application is implemented as follows:
[0007] The present application embodiment provides an address allocation method for a blockchain network service platform, the method comprising:
[0008] Upon receiving an address request transmitted by a client, obtaining a client identifier corresponding to the client of the requested number from the address request;
[0009] According to the historical client identification list and the client identification, a request address that meets the request quantity is obtained in the address pool of the blockchain and / or the recycling pool of the blockchain to allocate the request address to the client; the address pool includes at least one address; the recycling pool includes at least one historical request address corresponding to the historical client.
[0010] The present application embodiment provides a blockchain network service platform, which includes:
[0011] An acquisition unit is configured to, upon receiving an address request transmitted by a client, acquire a client identifier corresponding to the client of the requested quantity from the address request; acquire a request address satisfying the requested quantity from an address pool of a blockchain and / or a recycling pool of the blockchain according to a historical client identifier list and the client identifier; the address pool includes at least one address; the recycling pool includes at least one historical request address corresponding to a historical client;
[0012] An allocating unit is used to allocate the request address to the client.
[0013] The present application embodiment provides a blockchain network service platform, which includes:
[0014] A memory, a processor and a communication bus, wherein the memory communicates with the processor via the communication bus, and the memory stores a program for address allocation of a blockchain network service platform executable by the processor. When the program for address allocation of the blockchain network service platform is executed, the address allocation method of the blockchain network service platform described above is executed by the processor.
[0015] An embodiment of the present application provides a storage medium having a computer program stored thereon, which is applied to a blockchain network service platform, and is characterized in that when the computer program is executed by a processor, the address allocation method of the blockchain network service platform described above is implemented.
[0016] The embodiment of the present application provides a blockchain network service platform and an address allocation method and a storage medium. The address allocation method of the blockchain network service platform includes: in the case of receiving an address request transmitted by a client, obtaining a client identifier corresponding to the request quantity client from the address request; according to the historical client identifier list and the client identifier, obtaining a request address that satisfies the request quantity in the address pool of the blockchain and / or the recycling pool of the blockchain to allocate the request address to the client; the address pool includes at least one address; the recycling pool includes at least one historical request address corresponding to the historical client. By adopting the above method implementation scheme, when the blockchain network service platform receives the address request transmitted by the client and obtains the request quantity and the client identifier from the address request, the blockchain network service platform can obtain the request address that satisfies the request quantity in the address pool of the blockchain and / or the recycling pool of the blockchain according to the historical client identifier list and the client identifier, without the need to manually perform the address allocation process. When the number of request addresses corresponding to the address request is large, the blockchain network service platform can also be used to quickly allocate addresses to the client, thereby improving the efficiency of address allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1A block diagram of IP address allocation in the prior art provided in an embodiment of the present application;
[0018] Figure 2 A flow chart of an address allocation method provided in an embodiment of the present application;
[0019] Figure 3 An exemplary user state transition block diagram provided for an embodiment of the present application;
[0020] Figure 4 A schematic block diagram of a module of an exemplary blockchain network service platform provided in an embodiment of the present application;
[0021] Figure 5 An exemplary block diagram of initializing an address pool provided in an embodiment of the present application;
[0022] Figure 6 An exemplary address allocation logic diagram provided for an embodiment of the present application;
[0023] Figure 7 An exemplary block allocation sequence diagram provided for an embodiment of the present application;
[0024] Figure 8 An exemplary address allocation flow chart of a recycling pool provided in an embodiment of the present application;
[0025] Fig. 9 An exemplary rich text query method flow chart provided for an embodiment of the present application;
[0026] Fig.10 An exemplary address allocation principle diagram provided for an embodiment of the present application;
[0027] Fig.11 A flowchart of an exemplary address allocation method provided in an embodiment of the present application;
[0028] Fig.12 A schematic diagram of the structure of a blockchain network service platform provided in the embodiment of the present application Figure 1 ;
[0029] Fig.13 A schematic diagram of the structure of a blockchain network service platform provided in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
[0031] IP addresses are the most important identification resources in computer networks, and their rational planning and allocation are also important steps in data center network management. The general process of IP address allocation in the prior art is as follows: Figure 1 As shown: First, the user submits an IP address acquisition request according to business needs. The IP address acquisition request includes specific requirements such as the application deployment data center, acquisition quantity, and lease period (length of time for IP address acquisition); then, the administrator logs in to the network information management system, queries the allocation of the corresponding data center IP address in the relational database of the network information management system, and determines the most suitable allocable IP address according to the user's specific needs. The administrator enters the relevant user information and the IP address information allocated to the user (manually allocated by the administrator) in the network information management system; finally, the user confirms the demand and pays the usage fee of the IP address, and then the user can use the IP address.
[0032] With the rapid development of public cloud and private cloud infrastructure in large enterprises, the demand for network resources such as IP addresses has gradually increased, and the traditional manual allocation of IP addresses has gradually shown its drawbacks such as inefficiency and cumbersomeness. Furthermore, traditional network management systems generally use centralized relational databases, which have the risk of centralized data tampering. As the business scope of enterprises expands, clear and transparent billing of the use of infrastructure resources will help enterprises accurately grasp business costs.
[0033] The problems existing in the above-mentioned prior art can be solved by adopting the method in the first embodiment.
[0034] Embodiment 1
[0035] The present application embodiment provides a method for allocating addresses of a blockchain network service platform Figure 2 A flowchart of an address allocation method for a blockchain network service platform provided in an embodiment of the present application is as follows: Figure 2 As shown, the address allocation method of the blockchain network service platform may include:
[0036] S101. Upon receiving an address request transmitted by a client, obtain a client identifier corresponding to a requested number of clients from the address request.
[0037] The address allocation method of a blockchain network service platform provided in an embodiment of the present application is suitable for a scenario in which the blockchain network service platform allocates a request address to a client when the address request transmitted by the client is received.
[0038] In an embodiment of the present application, the client may be a client corresponding to the address requester (i.e., the user); wherein, the number of clients may be one, the number of clients may be two, or the number of clients may be multiple. The specific number of clients may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0039] In the embodiment of the present application, there is a one-to-one correspondence between clients and users, and one client corresponds to one user.
[0040] In the embodiment of the present application, there is a one-to-one correspondence between clients and address requests, and one client corresponds to one address request.
[0041] In the embodiment of the present application, the address request may be an IP address request; the address request may also be a Media Access Control Address (MAC) address request; the address request may also be a request for other addresses; the specific address request may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0042] It should be noted that the number of requests can be one; the number of requests can also be two; the number of requests can also be more; the specific number of requests can be determined based on actual conditions, and the embodiments of the present application do not limit this.
[0043] In an embodiment of the present application, the address request includes a request quantity and a client identifier.
[0044] In an embodiment of the present application, the client identifier can be the client's identity document (ID), or it can be a user name at the client; the client identifier can also be other information representing the identity of the user or client; the specific information can be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0045] In the embodiment of the present application, the blockchain network service platform includes a display screen; the blockchain network service platform can receive the address request transmitted by the client through the display screen; the blockchain network service platform includes an information transmission port; the blockchain network service platform can also receive the address request transmitted by the client through the information transmission port; the blockchain network service platform can also receive the address request transmitted by the client in other ways; specifically, the way in which the blockchain network service platform receives the address request transmitted by the client can be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0046] In an embodiment of the present application, when the blockchain network service platform receives an address request transmitted by a client, before determining the number of requests from the address request, when the blockchain network service platform receives registration information transmitted by the client, the blockchain network service platform can obtain the client information from the registration information. The client information includes user name, user ID, user balance, user customized information, etc. When the blockchain network service platform receives the client information, the administrator of the blockchain network service platform first verifies the identity of the client based on the user information; at this time, the blockchain network service platform sets the status of the client to pending review; when the blockchain network service platform receives successful identity verification information for the client, the blockchain network service platform changes the status of the client from pending review to valid. When the blockchain network service platform obtains the client information, the blockchain network service platform can organize the client information according to the client information structure table. The specific client information structure table includes three types of information: field, value type, and description, as shown in Table 1:
[0047] Table 1 Client information structure table
[0048] Fields Value Types illustrate userId String User ID userName String username userState {"WAIT_CHECK","VALID","INVALID"} User Status userBalance uint User Balance userInfo json User customized information OwnIPs list List of IP addresses
[0049] It should be noted that user customized information includes user contact information, user residential address, etc.
[0050] It should be noted that the IP list may include, when the client requests the request address, the request address corresponding to the client, and the status information of the client.
[0051] In the embodiment of the present application, the field of user ID in Table 1 is userId, and the value type of user ID is String; the field of user name is userName, and the value type of user name is String; the field of user status is userState, and the value types of user status include "WAIT_CHECK", "VALID", and "INVALID"; the field of user balance is userBalance, and the value type of user balance is uint; the field of user customized information is userInfo, and the value type of user customized information is json; the field holding the IP list is OwnIPs, and the value type of the IP list is list.
[0052] It should be noted that the administrator first verifies the identity of the client based on the user information, and can verify whether the client has bad behavior or whether the client's permissions have expired. If the administrator determines that the client has bad behavior or the client's permissions have expired, and the blockchain network service platform receives information that the client has bad behavior or the client's permissions have expired, the blockchain network service platform will set the client's status to invalid, and the user will lose the right to use the requested address.
[0053] Exemplarily, the client state transition diagram is as follows Figure 3 As shown: After a new user registers, when the blockchain network service platform receives the client information, the blockchain network service platform sets the client's status to pending review (WAIT_CHECK); when the blockchain network service platform receives the successful identity verification information of the client (identity verification passed), the blockchain network service platform changes the client's status from pending review to valid (VALID). When the blockchain network service platform determines that the client has bad behavior or the client's authority has expired, or receives the identity verification failure information of the client (identity verification failed), the blockchain network service platform changes the client's status from valid to invalid (INVALID). When the blockchain network service platform determines that the client has new permissions, the blockchain network service platform switches the client's status from invalid to valid.
[0054] S102. According to the historical client identification list and the client identification, a request address that meets the request quantity is obtained from the address pool of the blockchain and / or the recycling pool of the blockchain to allocate the request address to the client; the address pool includes at least one address; the recycling pool includes at least one historical request address corresponding to the historical client.
[0055] In an embodiment of the present application, when the blockchain network service platform receives an address request transmitted by a client, after obtaining the client identifier corresponding to the requested number of clients from the address request, the blockchain network service platform can obtain the requested address that meets the requested number from the address pool of the blockchain and / or the recycling pool of the blockchain based on the historical client identifier list and the client identifier, so as to allocate the requested address to the client.
[0056] It should be noted that the address pool includes at least one address; the recycling pool includes at least one historical request address corresponding to a historical client.
[0057] In an embodiment of the present application, the blockchain network service platform also includes an address management module. Specifically, the blockchain network service platform obtains a request address that satisfies the requested quantity in the address pool of the blockchain and / or the recycling pool of the blockchain according to the historical client identification list and the client identification, including: the blockchain network service platform uses the address management module to obtain a request address that satisfies the requested quantity in the address pool of the blockchain and / or the recycling pool of the blockchain according to the historical client identification list and the client identification.
[0058] For example, Figure 4 As shown: The blockchain network service platform includes a client management module and an address management module, wherein the client management module is used to manage client information registration and authorization; the address management module is used to perform the process of address pool initialization, address allocation and address recovery to the recovery pool.
[0059] In the embodiment of the present application, the present application adjusts the original centralized manual allocation method of IPv4 addresses to automatically implement the allocation process of IPv4 addresses in the alliance chain code. As a smart contract, Fabric chain code has the characteristics of global mandatory execution. When all nodes in the Fabric network deploy the same chain code, they will execute the same initialization code, and synchronize blocks from other nodes to obtain transactions within a period of time, update the local database status, and maintain the consistency of node block information in the network.
[0060] In an embodiment of the present application, the historical client identification list is a list of historical client identifications stored in a preset manner in the blockchain network service platform.
[0061] In the embodiment of the present application, the address pool may be an address block defined when the blockchain is initialized. The recycling pool is used to recycle at least one historical request address corresponding to a historical client.
[0062] In the embodiment of the present application, each blockchain chain code in the blockchain network service platform initializes the blockchain data by calling the Init() method, and then calls the method configured in the chain code through the Invoke() method. Therefore, the IP address pool initialization step should be implemented in the Init() method. The logical flow chart is as follows Figure 5 As shown: first create an empty address pool object; then set the address pool information (add the address pool information to the empty object to obtain the address pool object); then convert the structure of the address pool object into the data storage structure corresponding to the alliance chain CouchDB (Json serialized address pool object); write the converted address pool object into the alliance chain CouchDB, and when the writing is completed, return a prompt message of successful writing.
[0063] In the embodiment of the present application, when the blockchain is initialized, the address pool is first initialized according to the set address pool information structure. The address pool information structure includes three types of information: field, value type and description, as shown in Table 2:
[0064] Table 2 Address pool information structure table
[0065]
[0066]
[0067] It should be noted that the address pool prefix and the address pool prefix length can determine an address block, and the address pool ID can be the ID information of the address block; the number of allocated addresses is the number of addresses already allocated in the current address pool, which is used for subsequent IP address allocation; the number of allocated users is the number of users corresponding to the allocated addresses.
[0068] In an embodiment of the present application, the field of the address pool ID in Table 2 is poolId, and the value type of the address pool ID is String; the field of the address pool prefix is Poolfix, and the value type of the address pool prefix is String; the field of the address pool prefix length is poolfixLen, and the value type of the address pool prefix length is uint; the field of the number of allocated addresses is IPCount, and the value type of the number of allocated addresses is uint; the field of the number of allocated users is userCount, and the value type of the number of allocated users is uint.
[0069] It should be noted that the address pool information structure is configured when the blockchain is initialized, which means that the administrator can control the resource space of the address pool, such as the prefix of the address pool, the prefix length of the address pool, etc.
[0070] In the embodiment of the present application, the address information structure corresponding to the address in the address pool includes three types of information: field, value type and description, as shown in Table 3:
[0071] Table 3 Address information structure table
[0072] Fields Value Types illustrate ipPrefix string address PrefixLen int Address prefix length owner string Username expDate string Expiration time isAvaliable bool Availability Info json Customized information
[0073] It should be noted that the user name is the name of the user (client) corresponding to the address; the expiration time is the deadline for the client to use the address; whether it is available can be the availability of the address; the customized information can be the remarks on the address, such as which project the address is used for, the purpose of the address, etc.
[0074] It should be noted that after the address held by the user (request address) expires, the address will no longer be used and will be placed in the recycling pool. When the user applies for an IP address again, it will first check whether there is an address that has been used before in the recycling pool. If so, the IP address will be directly reactivated for use. Otherwise, a new address will be allocated to the user from the address pool.
[0075] In the embodiment of the present application, the field of the address in Table 3 is ipPrefix, and the value type of the address is String; the field of the address prefix length is PrefixLen, and the value type of the address prefix length is int; the field holding the user name is owner, and the value type of the user name is string; the field of the expiration time is expDate, and the value type of the expiration time is string; the field of whether it is available is isAvaliable, and the value type of whether it is available is bool; the field of customized information is Info, and the value type of the customized information is json.
[0076] In the embodiment of the present application, the recycling pool information structure corresponding to the recycling pool includes three types of information: field, value type and description, as shown in Table 4:
[0077] Table 4 Recycling pool information structure table
[0078] Fields Value Types illustrate recyclePoolId string Recycling pool ID userCount uint Number of users in the recycling pool ipCount uint Number of addresses in the recycling pool recycleIpItems map[username]array <ip> < / ip> Username and recycled address list mapping
[0079] It should be noted that recycleIpItems is used to save the correspondence between expired addresses and original user names, and the expired address list can be found by user name.
[0080] In the embodiment of the present application, the field of the recycling pool ID in Table 4 is recyclePoolId, and the recycling pool ID type is String; the field of the number of users in the recycling pool is userCount, and the value type of the number of users in the recycling pool is uint; the field of the number of addresses in the recycling pool is ipCount, and the type of the number of addresses in the recycling pool is uint; the field of the mapping of the user name and the recycling address list is recycleIpItems, and the value type of the mapping of the user name and the recycling address list is map[username]array <ip>.
[0081] In an embodiment of the present application, the blockchain network service platform obtains a request address that satisfies the requested quantity in the address pool of the blockchain and / or the recycling pool of the blockchain based on the historical client identification list and the client identification, including: when the client identification does not exist in the historical client identification list, obtaining the request address that satisfies the requested quantity in the address pool; when the client identification exists in the historical client identification list, obtaining the request address that satisfies the requested quantity in the address pool and / or the recycling pool.
[0082] In an embodiment of the present application, the historical client identification list can be a mapping between a user name and a recycling address list. If there is no client identification in the historical client identification list, the client is a new client. If there is a client identification in the historical client identification list, the client is a historical client, that is, an old client.
[0083] For example, Figure 6 As shown: the request address that the client has successfully requested cannot be used after it expires and will be placed in the recycling pool. When the client requests the address again, the blockchain network service platform first determines whether the client is a new client. When the blockchain network service platform determines that the client is a new client, the blockchain network service platform allocates the corresponding request address to the client from the address pool; when the blockchain network service platform determines that the client is an old client, the blockchain network service platform searches the recycling pool for the historical address used by the client and allocates the historical address to the client as the request address. If the number of historical addresses in the recycling pool does not meet the request number, the blockchain network service platform obtains other addresses from the address pool so that the sum of the number of other addresses and historical addresses meets the request number; after the blockchain network service platform allocates the request address to the client, when the usage period of the request address reaches the expiration time, the request address is an expired address, and the blockchain network service platform uses the recycling pool to recycle the expired address. After the blockchain network service platform allocates a request address to the client through the address pool and / or the recycling pool, the blockchain network service platform also records the address allocation information corresponding to the address pool and / or the recycling pool, that is, updates at least one historical request address.
[0084] It can be understood that the blockchain network service platform sets up a recycling pool. When there is a client identifier in the historical client identifier list, the blockchain network service platform obtains the request address that meets the request quantity from the address pool and / or the recycling pool to reuse the addresses used by the client and stored in the recycling pool, thereby improving the utilization rate of the addresses in the recycling pool.
[0085] In an embodiment of the present application, the process of the blockchain network service platform obtaining a request address that satisfies the request quantity in the address pool includes: when the request quantity is one number, the blockchain network service platform obtains the request address that satisfies the request quantity in the address pool by block allocation; when the request quantity is at least two numbers, the blockchain network service platform obtains a first request address in the address pool by block allocation; the blockchain network service platform obtains a second request address in the address pool by continuous allocation; the blockchain network service platform uses the first request address and the second request address as request addresses.
[0086] It should be noted that the number of the second requested addresses is the remaining number of the at least two numbers except the number of the first requested addresses.
[0087] In the embodiment of the present application, the block allocation algorithm calculates the midpoint between the two addresses with the longest distance in the free address pool, and allocates addresses to new users according to the parity of the number of allocated addresses. The block allocation algorithm is executed cyclically in the range from the starting address to the ending address in the free address pool, and then an available address is determined, and finally the remaining free address block is divided into two parts, the address after the midpoint is used for new allocation, and the address before the midpoint is used for subsequent allocation.
[0088] It can be understood that the blockchain network service platform sets different address allocation methods, that is, for at least two request addresses, a first request address is obtained from the address pool by block allocation, and a second request address (the remaining number of request addresses) is obtained from the address pool by continuous allocation. This allows the blockchain network service platform to maximize the growth potential of each address block by maximizing the distance between request addresses. The adjacent addresses provided to the client will help the operation and maintenance personnel in deployment and maintenance and routing aggregation, thereby improving scalability.
[0089] In an embodiment of the present application, the process of the blockchain network service platform obtaining a first request address in the address pool by block allocation includes: the blockchain network service platform determines the first address position of the last request address obtained in the address pool last time; the blockchain network service platform determines the second address position corresponding to the allocated address farthest from the first address position; the blockchain network service platform determines the unallocated address at the middle position between the first address position and the second address position, and uses the unallocated address as the first request address.
[0090] In an embodiment of the present application, the process of the blockchain network service platform obtaining a first request address from the address pool by block allocation can also be as follows: when the blockchain network service platform determines that a first request address is obtained from the address pool for the first time, the blockchain network service platform obtains the first request address from the first address position of the address pool; when the blockchain network service platform determines that a first request address is obtained from the address pool for the second time, the blockchain network service platform obtains an intermediate address at the middle position of the address pool, and uses the intermediate address as the first request address; when the blockchain network service platform determines that it is not the first or second time to obtain a first request address from the address pool, the blockchain network service platform determines the address segments corresponding to two adjacent allocated addresses; the blockchain network service platform filters out the first address segment with the largest number of addresses from the address segment; the blockchain network service platform obtains an intermediate position address at the middle position of the first address segment, and uses the intermediate position address as the first request address.
[0091] For example, Figure 7 There are 8 addresses in the address pool shown, which are numbered 1, 2, 3, 4, 5, 6, 7, and 8. The blockchain network service platform uses the process of requesting addresses in the address pool by block allocation to obtain the address at the position of number 1 when the blockchain network service platform executes the block allocation method to request addresses in the address pool for the first time; the blockchain network service platform obtains the address at the position of number 2 when the blockchain network service platform executes the block allocation method to request addresses in the address pool for the second time; the blockchain network service platform obtains the address at the position of number 3 when the blockchain network service platform executes the block allocation method to request addresses in the address pool for the third time; the blockchain network service platform obtains the address at the position of number 4 when the blockchain network service platform executes the block allocation method to request addresses in the address pool for the third time; When the address is requested in the address pool by block allocation for the fourth time, the address at position 4 is obtained; when the blockchain network service platform requests the address in the address pool by block allocation for the fifth time, the address at position 5 is obtained; when the blockchain network service platform requests the address in the address pool by block allocation for the sixth time, the address at position 6 is obtained; when the blockchain network service platform requests the address in the address pool by block allocation for the seventh time, the address at position 7 is obtained; when the blockchain network service platform requests the address in the address pool by block allocation for the eighth time, the address at position 8 is obtained.
[0092] It can be understood that the blockchain network service platform utilizes a block allocation method to determine the unallocated address at the middle position between the first address position and the second address position as the first request address, so that the blockchain network service platform can allocate addresses at intervals of some addresses in the address pool, so that when the number of requests in the address request is multiple, the blockchain network service platform can allocate request addresses with continuous address numbers, so that the client can perform address deployment, address maintenance and route aggregation according to the addresses with adjacent address numbers, thereby improving the accuracy of allocating request addresses to the client.
[0093] In an embodiment of the present application, the process of the blockchain network service platform obtaining the second request address from the address pool using a continuous allocation method includes: the blockchain network service platform determines the address number of the first request address; the blockchain network service platform uses the address number as the starting number, and obtains a preset number of addresses in the address pool in sequence according to a preset address number interval; the blockchain network service platform uses the preset number of addresses as the second request address.
[0094] It should be noted that the preset number is the number of second request addresses.
[0095] In an embodiment of the present application, the preset address number interval may be a number interval configured in the blockchain network service platform; the preset address number interval may also be a number interval received by the blockchain network service platform before the blockchain network service platform uses the address number as the starting number and obtains a preset number of addresses in the address pool in sequence according to the preset address number interval; the preset address number interval may also be a number interval obtained by the blockchain network service platform in his own way; the specific way in which the blockchain network service platform obtains the preset address number interval may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0096] In the embodiment of the present application, the preset address label interval can be an interval of 1; the preset address label interval can also be an interval of 2; the preset address label interval can be an interval of other numbers; the specific preset address label interval can be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0097] In the embodiment of the present application, the address label of the first request address may be the address information of the address. For example, if the first request address is 10.0.0.1, the address label of the first request address is also 10.0.0.1.
[0098] Exemplarily, if the address label of the first requested address is 10.0.0.1, the preset address label interval can be 1, and the preset number is 3. Then, taking the address label as the starting number, the preset number of addresses obtained in the address pool in sequence according to the preset address label interval include: 10.0.0.2, 10.0.0.3, 10.0.0.4.
[0099] It can be understood that after the blockchain network service platform determines the address number of the first request address, it obtains an address adjacent to the address number of the first request address by taking the address number as the starting number and obtaining a preset number of addresses in the address pool in sequence according to the preset address number interval, so that the client can perform address deployment, address maintenance and route aggregation according to the addresses with adjacent address numbers, thereby improving the accuracy of allocating request addresses to clients.
[0100] In an embodiment of the present application, the process of the blockchain network service platform obtaining request addresses that meet the request quantity in the address pool and / or the recycling pool includes: when the number of historical addresses corresponding to the client in the recycling pool is greater than or equal to the request quantity, the blockchain network service platform obtains the request quantity of request addresses from the historical addresses; when the number of historical addresses is less than the request quantity, the blockchain network service platform obtains the first number of address pool request addresses in the address pool; the blockchain network service platform uses the historical addresses and the address pool request addresses as the request addresses.
[0101] It should be noted that the first number is the number of requests excluding the number of historical addresses. The historical address is a part of at least one historical request address. The client is a part of the historical clients.
[0102] For example, the blockchain network service platform first determines whether the new and old clients obtain the request address in the recycling pool. If it is an old user, it first checks whether there is a historical address corresponding to the client in the recycling pool. If it is a new client, it executes the address allocation method in the address pool to obtain the request address. The flowchart of the address allocation method of the recycling pool is as follows: Figure 8 As shown:
[0103] S81. When a client identifier exists in the historical client identifier list, the blockchain network service platform determines the number of historical addresses corresponding to the client in the recycling pool.
[0104] S82. When the number of historical addresses is greater than or equal to the number of requests, the blockchain network service platform obtains the request addresses of the requested number from the historical addresses.
[0105] S83. When the number of historical addresses is less than the requested number, the blockchain network service platform obtains the historical addresses and obtains the first number of address pool request addresses from the address pool.
[0106] In an embodiment of the present application, after the blockchain network service platform assigns a request address to the client, the blockchain network service platform adds the request relationship based on the request address and the address obtained by the client to the request relationship table and stores it.
[0107] It is understandable that the blockchain network service platform obtains request addresses from the recycling pool to reuse the request addresses used by the client and stored in the recycling pool, thereby improving the utilization rate of the request addresses.
[0108] In an embodiment of the present application, the process of the blockchain network service platform obtaining a first quantity of address pool request addresses in the address pool includes: when the first quantity is one, the blockchain network service platform obtains address pool request addresses that meet the first quantity in the address pool by using a block allocation method; when the first quantity is at least two, the blockchain network service platform obtains a first address pool request address in the address pool by using a block allocation method; the blockchain network service platform obtains a second address pool request address in the address pool by using a continuous allocation method; the blockchain network service platform uses the first address pool request address and the second address pool request address as the address pool request address.
[0109] It should be noted that the number of requested addresses in the second address pool is the remaining number of the at least two numbers except the number of requested addresses in the first address pool.
[0110] In an embodiment of the present application, the way in which the blockchain network service platform obtains a first address pool request address in the address pool using a block allocation method is the same as the way in which the blockchain network service platform obtains a first request address in the address pool using a block allocation method.
[0111] In an embodiment of the present application, the way in which the blockchain network service platform obtains the second address pool request address in the address pool using a continuous allocation method is the same as the way in which the blockchain network service platform obtains the second request address in the address pool using a continuous allocation method.
[0112] It is understandable that the blockchain network service platform obtains the request address from the address pool by block allocation or by block allocation and continuous allocation, so that the blockchain network service platform maximizes the growth potential of each address block by maximizing the distance between request addresses. The adjacent addresses provided to the client will help the operation and maintenance personnel in deployment and maintenance and routing aggregation, thereby improving scalability.
[0113] In an embodiment of the present application, after the blockchain network service platform allocates a request address to the client, the blockchain network service platform will also determine the request status corresponding to the request address; when the request status is an invalid state, the blockchain network service platform recycles the request address and adds the request address to the recycling pool.
[0114] It can be understood that the blockchain network service platform determines the request status corresponding to the request address, so that when the request status is invalid, the blockchain network service platform can add the request address to the recycling pool and recycle the request address, thereby improving the utilization rate of the request address.
[0115] In an embodiment of the present application, after the blockchain network service platform adds the request address to the recycling pool, the blockchain network service platform will also use the request address to update at least one historical request address in the recycling pool.
[0116] In an embodiment of the present application, the blockchain network service platform uses the request address to update at least one historical request address in the recycling pool. The method can be as follows: the blockchain network service platform determines the address request relationship between the client identifier and the request address; the blockchain network service platform adds the address request relationship to the request relationship table, so that when the next address request transmitted by the client is received, the next request address is obtained in the recycling pool according to the request relationship table.
[0117] In an embodiment of the present application, the old client will execute a continuous allocation algorithm, that is, the next address of the historical address obtained by the old client's historical allocation will be allocated to the old client. For the scenario where the old client applies for multiple request addresses at one time, a neighbor address list will be obtained according to the continuous allocation method. As the number of request addresses allocated by the blockchain network service platform reaches a certain number, the allocated request addresses may overlap. Since they have been allocated, each request address can be checked for availability, that is, in each cycle, it is verified whether the request address has an isAvailable field and whether it is True. If it is True, the address is determined to be an available address and added to the address list.
[0118] It can be understood that the blockchain network service platform uses the request address to update at least one historical request address in the recycling pool to recycle the request address. When the client obtains the request address again and again, the next request address is directly obtained from at least one historical request address, thereby improving the utilization rate of the request address.
[0119] In an embodiment of the present application, the process of the blockchain network service platform determining the request status corresponding to the request address includes: the blockchain network service platform determines the request status corresponding to the request address using a preset rich text query method every preset time period.
[0120] It should be noted that the preset time period can be one day, the preset time period can also be one week, and the preset time period can also be 12 hours; the preset time period can also be other time lengths. The specific preset time period can be determined based on actual conditions, and the embodiments of the present application do not limit this.
[0121] In the embodiment of the present application, the address is judged by the expiration date (expireDate) and the isAvalible field to determine the availability of the address. When an address expires, its isAvalible field is automatically configured to False and placed in the recycling pool. The change of each address status needs to be achieved by traversing the address set. Fabric's reading function plays an important role in the blockchain network service platform and supports three query methods: single key query, key-based range query, and rich text-based query.
[0122] For example, different query methods can be configured for different query requirements (such as query efficiency, query scope, etc.). This application uses a rich text query method to edit the parameter queryString regular expression to match the request address record, and calling the interactive API (stub.GetQueryResult(queryString)) can return a result iterator, which can realize the status update of the request address set under the condition of saving memory. An exemplary rich text query method flow chart is as follows Fig. 9 As shown:
[0123] S91. The blockchain network service platform obtains the request time corresponding to the request address.
[0124] It should be noted that the blockchain network service platform can use the editing parameter regularization to match the request time of the request address at every preset time period.
[0125] S92. When the request time arrives, the blockchain network service platform determines that the request status of the request address is invalid.
[0126] It should be noted that when the request status of the request address is invalid, the blockchain network service platform sets the field of the request address to False.
[0127] S93. The blockchain network service platform adds the request address to the recycling pool.
[0128] It should be noted that after the blockchain network service platform adds the request address to the recycling pool, the blockchain network service platform uses the request address to update at least one historical request address in the recycling pool.
[0129] It is understandable that the blockchain network service platform uses a preset rich text query method to determine the request status corresponding to the request address once every preset time period, so that the blockchain network service platform can use the preset rich text query method to quickly determine the request status corresponding to the request address.
[0130] In an embodiment of the present application, the blockchain network service platform determines the request status corresponding to the request address by using a preset rich text query method at every preset time period, including: the blockchain network service platform uses the editing parameter regular to match the request time of the request address at every preset time period; when the request time is reached, the blockchain network service platform determines that the request status of the request address is an invalid state.
[0131] It should be noted that the edit parameter may be a queryString parameter.
[0132] It can be understood that the blockchain network service platform uses the editing parameter regularization to match the request time of the request address every preset time period; when the request time is reached, the blockchain network service platform determines that the request status of the request address is an invalid state, so that the blockchain network service platform can update the request status of all request addresses while saving memory, thereby reducing the memory usage of the blockchain network service platform when updating the request status of all request addresses.
[0133] In the embodiment of the present application, the present application will write the address allocation logic and functions into the blockchain chain code based on Fabric, and the blockchain chain code will be deployed in a pluggable Docker container. At the same time, the backend program App developed by Nodejs and API / SDK is also required to call the chain code and the underlying CouchDB interaction interface to implement the function. For example, Fig.10 As shown in the figure: When a client makes an address request to a peer node in a blockchain that includes a CA node and multiple peer nodes, the blockchain chain code in the node will allocate a request address to the client according to the client's needs in accordance with the address allocation method of the blockchain network service platform, and store the allocation information and user information of the request address in the underlying CouchDB.
[0134] In the embodiment of the present application, when the address pool and the recycling pool are initialized, the client that has been approved by the administrator can transmit the address request through the interface, and the client can request multiple request addresses at one time. The address allocation process mainly includes two parts: address pool allocation and recycling pool allocation. Specifically, Fig.11 As shown:
[0135] S111. When receiving an address request transmitted by a client, the blockchain network service platform obtains a client identifier corresponding to the requested number of clients from the address request.
[0136] S112. When there is no client identifier in the historical client identifier list and the request quantity is one, the blockchain network service platform obtains a request address that meets the request quantity in the address pool by using a block allocation method.
[0137] S113. When there is no client identifier in the historical client identifier list and the number of requests is at least two, the blockchain network service platform obtains a first request address from the address pool using a block allocation method.
[0138] S114. The blockchain network service platform obtains a second request address from the address pool by using a continuous allocation method; the blockchain network service platform uses the first request address and the second request address as request addresses.
[0139] It should be noted that the number of the second requested addresses is the remaining number of the at least two numbers except the number of the first requested addresses.
[0140] S115. When there is a client identifier in the historical client identifier list and the number of historical addresses corresponding to the client in the recycling pool is greater than or equal to the requested number, the blockchain network service platform obtains the requested number of request addresses from the historical addresses.
[0141] S116. When there is a client identifier in the historical client identifier list, the number of historical addresses is less than the requested number, and the first number is one, the blockchain network service platform uses a block allocation method to obtain an address pool request address that meets the first number in the address pool.
[0142] S117. When there is a client identifier in the historical client identifier list, the number of historical addresses is less than the requested number, and the first number is at least two, the blockchain network service platform obtains a first address pool request address in the address pool by using a block allocation method.
[0143] S118. The blockchain network service platform obtains a second address pool request address from the address pool using a continuous allocation method.
[0144] It should be noted that the number of requested addresses in the second address pool is the remaining number of the at least two numbers except the number of requested addresses in the first address pool.
[0145] S119. The blockchain network service platform uses the first address pool request address and the second address pool request address as the address pool request address; and uses the historical address and the address pool request address as the request address.
[0146] In the embodiment of the present application, after the blockchain network service platform obtains the request address, it allocates the request address to the client. It should be noted that after the blockchain network service platform allocates the request address to the client, the blockchain network service platform adds the request relationship according to the request address and the address obtained by the client to the request relationship table and stores it.
[0147] It can be understood that when the blockchain network service platform receives the address request transmitted by the client and obtains the request quantity and client identification from the address request, the blockchain network service platform can obtain the request address that meets the request quantity in the blockchain address pool and / or the blockchain recycling pool based on the historical client identification list and the client identification. There is no need to manually perform the address allocation process. When the number of request addresses corresponding to the address request is large, the blockchain network service platform can also be used to quickly allocate addresses to the client, thereby improving the efficiency of address allocation.
[0148] Embodiment 2
[0149] Based on the same inventive concept of Example 1, the embodiment of the present application provides a blockchain network service platform 1, corresponding to an address allocation method for a blockchain network service platform; Fig.12 A schematic diagram of the composition structure of a blockchain network service platform provided in an embodiment of the present application Figure 1 , the blockchain network service platform 1 may include:
[0150] The acquisition unit 11 is used to, when receiving an address request transmitted by a client, acquire a client identifier corresponding to the client of the requested quantity from the address request; acquire a request address that satisfies the requested quantity from the address pool of the blockchain and / or the recycling pool of the blockchain according to the historical client identifier list and the client identifier; the address pool includes at least one address; the recycling pool includes at least one historical request address corresponding to a historical client;
[0151] The allocating unit 12 is configured to allocate the request address to the client.
[0152] In some embodiments of the present application, the acquisition unit 11 is used to obtain request addresses that meet the request quantity in the address pool when the client identifier does not exist in the historical client identifier list; and to obtain request addresses that meet the request quantity in the address pool and / or the recycling pool when the client identifier exists in the historical client identifier list.
[0153] In some embodiments of the present application, the acquisition unit 11 is used to, when the request quantity is one, obtain request addresses that meet the request quantity in the address pool by using a block allocation method; when the request quantity is at least two quantities, obtain a first request address in the address pool by using a block allocation method; obtain a second request address in the address pool by using a continuous allocation method; the number of the second request addresses is the remaining number of the at least two numbers except the number of the first request addresses; and use the first request address and the second request address as the request addresses.
[0154] In some embodiments of the present application, the blockchain network service platform further includes a determination unit;
[0155] The determination unit is used to determine the first address position of the last requested address obtained in the address pool last time; determine the second address position corresponding to the allocated address farthest from the first address position; determine the unallocated address at the middle position between the first address position and the second address position, and use the unallocated address as the first requested address.
[0156] In some embodiments of the present application, the determining unit is used to determine the address number of the first request address;
[0157] The acquisition unit 11 is used to acquire a preset number of addresses from the address pool in sequence with the address number as the starting number and according to the preset address number interval; the preset number is the number of the second requested addresses; and the preset number of addresses is used as the second requested address.
[0158] In some embodiments of the present application, the acquisition unit 11 is used to obtain the request address of the request quantity from the historical address when the number of historical addresses corresponding to the client in the recovery pool is greater than or equal to the request quantity; and to obtain a first number of address pool request addresses in the address pool when the number of historical addresses is less than the request quantity; the first number is the number of the request quantity excluding the number of historical addresses; and the historical address and the address pool request address are used as the request address.
[0159] In some embodiments of the present application, the acquisition unit 11 is used to, when the first quantity is one, obtain the address pool request address that meets the first quantity in the address pool by using a block allocation method; when the first quantity is at least two quantities, obtain a first address pool request address in the address pool by using a block allocation method; obtain the second address pool request address in the address pool by using a continuous allocation method; the number of the second address pool request addresses is the remaining number of the at least two quantities except the number of the first address pool request addresses; and use the first address pool request address and the second address pool request address as the address pool request addresses.
[0160] In some embodiments of the present application, the blockchain network service platform further includes an adding unit;
[0161] The determining unit is used to determine the request status corresponding to the request address;
[0162] The adding unit is used to add the request address to the recycling pool when the request status is an invalid status.
[0163] In some embodiments of the present application, the blockchain network service platform further includes an updating unit;
[0164] The updating unit is used to update at least one historical request address in the recycling pool using the request address.
[0165] In some embodiments of the present application, the device further comprises a matching unit;
[0166] The matching unit is used to match the request time of the request address by using the editing parameter regular expression at every preset time period;
[0167] The determining unit is configured to determine that the request state of the request address is an invalid state when the request time is reached.
[0168] Based on the same inventive concept of embodiment 1, the embodiment of the present application provides a blockchain network service platform, such as Fig.13 As shown, Fig.13 A schematic diagram of the composition structure of a blockchain network service platform proposed in this application embodiment Figure 2 , the blockchain network service platform 1 of the embodiment of the present application includes: at least one processor 13, at least one memory 14 and at least one communication bus 15. In the process of the specific embodiment, the at least one processor 13 can be at least one of an application-specific integrated circuit (ASIC, Application Specific Integrated Circuit), a digital signal processor (DSP, Digital Signal Processor), a digital signal processing terminal (DSPD, Digital Signal Processing Device), a programmable logic terminal (PLD, Programmable Logic Device), a field programmable gate array (FPGA, Field P rogrammable Gate Array), a CPU, a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and the embodiment of the present application is not specifically limited.
[0169] In the embodiment of the present application, the at least one communication bus 15 is used to realize the connection and communication between the at least one processor 13 and the at least one memory 14; the at least one memory 14 is used to store executable instructions;
[0170] At least one processor 13 is used to execute the executable instructions stored in the at least one memory 14 to implement the address allocation method as described in the first embodiment.
[0171] An embodiment of the present application provides a storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors and are applied to a blockchain network service platform. When the program is executed by at least one processor, the address allocation method described in Embodiment 1 is implemented.
[0172] It can be understood that when the blockchain network service platform receives the address request transmitted by the client and obtains the request quantity and client identification from the address request, the blockchain network service platform can obtain the request address that meets the request quantity in the blockchain address pool and / or the blockchain recycling pool based on the historical client identification list and the client identification. There is no need to manually perform the address allocation process. When the number of request addresses corresponding to the address request is large, the blockchain network service platform can also be used to quickly allocate addresses to the client, thereby improving the efficiency of address allocation.
[0173] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0174] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0175] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0177] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.< / ip>
Claims
1. A method for allocating addresses for a blockchain network service platform, characterized in that: The method comprises: Upon receiving an address request transmitted by a client, obtaining a client identifier corresponding to the client of the requested number from the address request; According to the historical client identification list and the client identification, a request address that meets the request quantity is obtained in the address pool of the blockchain and / or the recycling pool of the blockchain to allocate the request address to the client; the address pool includes at least one address; the recycling pool includes at least one historical request address corresponding to the historical client; the address information structure corresponding to the address in the address pool includes three types of information: field, value type and description, and the description includes: address, address prefix length, holding user name, expiration time, availability, and customization information; the recycling pool information structure corresponding to the recycling pool includes three types of information: field, value type and description, and the description includes: recycling pool ID, number of users in the recycling pool, number of addresses in the recycling pool, and mapping between user name and recycling address list; Wherein, obtaining the request address satisfying the requested quantity in the address pool of the blockchain and / or the recycling pool of the blockchain according to the historical client identifier list and the client identifier includes: If the client identifier does not exist in the historical client identifier list, obtaining a request address that satisfies the requested quantity from the address pool; If the client identifier exists in the historical client identifier list, obtaining request addresses that meet the requested quantity from the address pool and / or the recycling pool; The acquiring of the request addresses satisfying the requested quantity from the address pool and / or the recycling pool includes: When the number of historical addresses corresponding to the client in the recycling pool is greater than or equal to the number of requests, obtaining the request addresses of the request number from the historical addresses; In the case that the number of the historical addresses is less than the requested number, obtaining a first number of address pool request addresses from the address pool; the first number is the number of the requested number excluding the number of the historical addresses; Using the historical address and the address pool request address as the request address; Wherein, obtaining a first number of address pool request addresses from the address pool includes: In the case where the first quantity is one quantity, obtaining address pool request addresses satisfying the first quantity in the address pool by using a block allocation method; When the first number is at least two, obtaining a first address pool request address from the address pool by using a block allocation method; Obtaining a second address pool request address from the address pool by continuous allocation; the number of the second address pool request addresses is the remaining number of the at least two numbers except the number of the first address pool request addresses; The first address pool request address and the second address pool request address are used as the address pool request address.
2. The method according to claim 1, characterized in that The obtaining, from the address pool, request addresses that satisfy the requested quantity includes: When the number of requests is one, obtaining request addresses satisfying the number of requests from the address pool by using a block allocation method; When the number of requests is at least two, obtaining a first request address from the address pool by using a block allocation method; Obtaining a second requested address from the address pool by continuous allocation; the number of the second requested addresses is the remaining number of the at least two numbers except the number of the first requested addresses; The first request address and the second request address are used as the request address.
3. The method according to claim 2, characterized in that The method of obtaining a first requested address from the address pool by using a block allocation method includes: Determine a first address position of a last requested address obtained in the address pool last time; Determine a second address location corresponding to an allocated address that is farthest from the first address location; An unallocated address at an intermediate position between the first address position and the second address position is determined, and the unallocated address is used as the first request address.
4. The method according to claim 2, characterized in that: The obtaining the second requested address from the address pool by using a continuous allocation method includes: Determining the address number of the first request address; Taking the address number as a starting number, and sequentially acquiring a preset number of addresses from the address pool according to a preset address number interval; the preset number is the number of the second requested addresses; The preset number of addresses is used as the second request address.
5. The method according to any one of claims 1 to 4, characterized in that: After allocating the request address to the client, the method further includes: Determine a request status corresponding to the request address; When the request status is an invalid status, the request address is added to the recycling pool.
6. The method according to claim 5, characterized in that After adding the request address to the recycling pool, the method further includes: At least one historical request address in the recycling pool is updated using the request address.
7. The method according to claim 5, characterized in that The determining the request status corresponding to the request address includes: Every preset time period, the request time of the request address is matched by using the editing parameter regular expression; When the request time is reached, the request state of the request address is determined to be an invalid state.
8. A blockchain network service platform, characterized in that: The blockchain network service platform includes: An acquisition unit is configured to, upon receiving an address request transmitted by a client, acquire a client identifier corresponding to the client of the requested quantity from the address request; acquire a request address satisfying the requested quantity from an address pool of a blockchain and / or a recycling pool of the blockchain according to a historical client identifier list and a client identifier; the address pool includes at least one address; the recycling pool includes at least one historical request address corresponding to a historical client; an allocation unit, configured to allocate the request address to the client; the address information structure corresponding to the address in the address pool includes three types of information: field, value type and description, and the description includes: address, address prefix length, user name, expiration time, availability, and customization information; the recycling pool information structure corresponding to the recycling pool includes three types of information: field, value type and description, and the description includes: recycling pool ID, number of users in the recycling pool, number of addresses in the recycling pool, and mapping between user name and recycling address list; Wherein, obtaining the request address satisfying the requested quantity in the address pool of the blockchain and / or the recycling pool of the blockchain according to the historical client identifier list and the client identifier includes: If the client identifier does not exist in the historical client identifier list, obtaining a request address that satisfies the requested quantity from the address pool; If the client identifier exists in the historical client identifier list, obtaining request addresses that meet the requested quantity from the address pool and / or the recycling pool; The acquiring of the request addresses satisfying the requested quantity from the address pool and / or the recycling pool includes: When the number of historical addresses corresponding to the client in the recycling pool is greater than or equal to the number of requests, obtaining the request addresses of the request number from the historical addresses; In the case that the number of the historical addresses is less than the requested number, obtaining a first number of address pool request addresses from the address pool; the first number is the number of the requested number excluding the number of the historical addresses; Using the historical address and the address pool request address as the request address; Wherein, obtaining a first number of address pool request addresses from the address pool includes: In the case where the first quantity is one quantity, obtaining address pool request addresses satisfying the first quantity in the address pool by using a block allocation method; When the first number is at least two, obtaining a first address pool request address from the address pool by using a block allocation method; Obtaining a second address pool request address from the address pool by continuous allocation; the number of the second address pool request addresses is the remaining number of the at least two numbers except the number of the first address pool request addresses; The first address pool request address and the second address pool request address are used as the address pool request address.
9. A blockchain network service platform, characterized in that: The blockchain network service platform includes: at least one memory for storing executable instructions; At least one processor is used to execute the executable instructions stored in the at least one memory to implement the method according to any one of claims 1-7.
10. A storage medium, characterized in that: Executable instructions are stored, and when the executable instructions are executed, they are used to cause a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
User terminal and a block chain domain name resolution method thereof
CN109819068A