A data processing method, device, apparatus, and storage medium
By leveraging the bitmap service function of the bitmap server, the problem of large storage space consumption by the address pool in the distributed system is solved, achieving efficient utilization of storage space.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-03-21
- Publication Date
- 2026-07-21
AI Technical Summary
In distributed systems, traditional address allocation methods result in address pools occupying a large amount of storage space in the database, reducing the utilization rate of storage space.
By utilizing the bitmap service function of the bitmap server and its stored address pool for address allocation, the address space occupied by addresses can be reduced, thereby improving the utilization rate of storage space.
It effectively reduces the storage space occupied by addresses and improves the utilization rate of storage space.
Smart Images

Figure CN116827940B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology
[0002] In a distributed system, when a distributed node (e.g., a business server) creates an address pool for Classless Inter-Domain Routing (CIDR), it stores the entire address pool in a database. This allows the database to record the allocation of addresses requested by businesses. Traditional address allocation methods often require database operations to perform address allocation. However, when the address pool contains a large number of addresses, this method results in the address pool occupying a significant amount of storage space in the database, leading to reduced storage utilization. Summary of the Invention
[0003] This application provides a data processing method, apparatus, device, and storage medium that can reduce the storage space occupied by addresses and improve storage space utilization.
[0004] One embodiment of this application provides a data processing method, which is executed by a business server, including:
[0005] When an address request associated with an application client is received, an address pool space query request is sent to a bitmap server with bitmap service functionality. The address pool space query request is used to instruct the bitmap server to determine the number of addresses to be allocated in the address pool. The address request is used to request N business request addresses, where N is a positive integer. The address pool is established by the bitmap server when it receives an address pool creation request forwarded by the business server.
[0006] Receive the number of addresses to be allocated sent by the bitmap server. When the number of addresses to be allocated is greater than or equal to N, call the bitmap server to allocate the service request address X from the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i ; i is a positive integer less than or equal to N;
[0007] Based on the allocated bit address Y i Determine the business request address X i The corresponding business network address is returned to the application client for each business request address.
[0008] One embodiment of this application provides a data processing method, which is executed by a bitmap server, including:
[0009] The system retrieves the address space query request sent by the business server and determines the number of addresses to be allocated in the address pool. The address space query request is generated by the business server when it receives an address request associated with an application client. The address request is used to request N business request addresses, where N is a positive integer. The address pool is established by the bitmap server when it receives an address pool creation request forwarded by the business server.
[0010] The number of addresses to be allocated is returned to the business server; the number of addresses to be allocated is used to instruct the business server to generate an address allocation request when it detects that the number of addresses to be allocated is greater than or equal to N.
[0011] Upon receiving an address allocation request from the business server, for the business request address X among the N business request addresses... i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i ; i is a positive integer less than or equal to N;
[0012] Allocate bit address Y i Return to the business server; allocate bit address Y i Used to instruct the business server based on the allocated bit address Y i Determine the business request address X i The corresponding business network address is returned to the application client, and the business network address corresponding to each business request address is returned to the application client.
[0013] One embodiment of this application provides a data processing apparatus, including:
[0014] The sending module is used to send an address pool space query request to a bitmap server with bitmap service functionality when it receives an address request associated with an application client. The address pool space query request is used to instruct the bitmap server to determine the number of addresses to be allocated in the address pool. The address request is used to request N service request addresses, where N is a positive integer. The address pool is established by the bitmap server when it receives an address pool creation request forwarded by a service server.
[0015] The acquisition module receives the number of addresses to be allocated from the bitmap server. When the number of addresses to be allocated is greater than or equal to N, it calls the bitmap server to select business request address X from the N business request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i ; i is a positive integer less than or equal to N;
[0016] The determination module is used to determine the allocation bit address Y. iDetermine the business request address X i The corresponding business network address is returned to the application client for each business request address.
[0017] One embodiment of this application provides a data processing apparatus, including:
[0018] The determination module is used to obtain the address space query request sent by the business server and determine the number of addresses to be allocated in the address pool. The address space query request is generated by the business server when it receives an address request associated with the application client. The address request is used to request N business request addresses, where N is a positive integer. The address pool is established by the bitmap server when it receives an address pool creation request forwarded by the business server.
[0019] The return module is used to return the number of addresses to be allocated to the business server; the number of addresses to be allocated is used to instruct the business server to generate an address allocation request when it detects that the number of addresses to be allocated is greater than or equal to N.
[0020] The allocation module is used to allocate service request address X from N service request addresses when it receives an address allocation request from the service server. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i ; i is a positive integer less than or equal to N;
[0021] The return module is also used to allocate bit address Y. i Return to the business server; allocate bit address Y i Used to instruct the business server based on the allocated bit address Y i Determine the business request address X i The corresponding business network address is returned to the application client, and the business network address corresponding to each business request address is returned to the application client.
[0022] One embodiment of this application provides a computer device, including: a processor and a memory;
[0023] The processor is connected to a memory, which stores a computer program. When the computer program is executed by the processor, it causes the computer device to perform the method provided in the embodiments of this application.
[0024] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided in this application.
[0025] One aspect of this application provides a computer program product, including a computer program / instructions, which, when executed by a processor, cause the computer device to perform the method provided in this application.
[0026] In this embodiment, when the business server receives an address request associated with an application client, it uses the address pool stored in the bitmap service function (i.e., the bitmap service function provided by a third-party storage service) of the bitmap server through data interaction with the bitmap server to meet the address allocation requirements of the distributed system. This method of using the bitmap service function of the bitmap server to allocate business network addresses can greatly reduce the storage space occupied by addresses, thereby improving storage space utilization. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application;
[0028] Figure 2 This is a schematic diagram of a data interaction scenario provided in an embodiment of this application;
[0029] Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0030] Figure 4 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0031] Figure 5 This is a schematic diagram of an address allocation process based on a business scenario provided in an embodiment of this application;
[0032] Figure 6 This is a schematic diagram of an address return process provided in an embodiment of this application;
[0033] Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0034] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0035] Figure 9 This is a schematic diagram of a computer device provided in an embodiment of this application;
[0036] Figure 10 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application. Detailed Implementation
[0037] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0038] The data processing method in this application embodiment can be applied to the network scheduling field of cloud technology. Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a general term encompassing network technology, information technology, integration technology, management platform technology, and application technology applied to cloud computing business models. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to a backend system for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0039] Please see Figure 1 , Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application. Figure 1 As shown, the network architecture may include server 110F, server 120F, and a cluster of terminal devices. The terminal device cluster may include one or more terminal devices; the number of terminal devices is not limited here. Figure 1 As shown, it may specifically include terminal device 100a, terminal device 100b, terminal device 100c, ..., terminal device 100n. For example... Figure 1 As shown, terminal devices 100a, 100b, 100c, ..., 100n and server 120F can each connect to server 110F via a network, so that each terminal device can interact with server 110F through the network connection. The network connection method is not limited; it can be a direct or indirect connection via wired communication, a direct or indirect connection via wireless communication, or other methods. This application does not impose any restrictions on this method.
[0040] Each terminal device in this terminal device cluster can include: smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, in-vehicle terminals, smart TVs, and other smart terminals with data processing capabilities. It should be understood that, for example... Figure 1Each terminal device in the terminal device cluster shown can have the target application (i.e., the application client) installed. When the application client runs on each terminal device, it can interact with the aforementioned... Figure 1 Data interaction is performed between the servers 110F shown. The application client can be a standalone client or an embedded sub-client integrated into another client (e.g., a social client, an educational client, or a multimedia client); this is not limited here.
[0041] like Figure 1 As shown, in this embodiment, server 110F can be the business server corresponding to the application client, and server 120F can be a bitmap server with bitmap service functionality. The bitmap server in this embodiment (e.g., Remote Dictionary Server, or Redis for short) can provide a remote dictionary service, which is a database that stores data in key-value pairs (also known as a KV database).
[0042] Here, servers 110F and 120F can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services. It is understandable that... Figure 1 The distributed address allocation service provided by server 110F relies on the bitmap service of server 120F to perform operations such as storing, querying, requesting, and returning Classless Inter-Domain Routing Address Pools (e.g., CIDR address pools). CIDR is a method for classifying IP addresses to assign Internet Protocol Addresses (IP addresses) to users and to effectively route IP packets on the Internet.
[0043] It should be understood that Figure 1 The server 110F shown can be used to receive service address requests associated with application clients. Furthermore, by invoking the bitmap service function of server 120F, the address allocation and return requirements of the distributed system can be met. These service address requests can include address request requests for N service request addresses and address return requests for H service request addresses, where N and H can both be positive integers.
[0044] For ease of understanding, the embodiments of this application may be described in detail below. Figure 1 From the multiple terminal devices shown, one terminal device is selected as the target terminal device. For example, in the embodiments of this application, a terminal device can be selected as the target terminal device. Figure 1The terminal device 100a shown serves as the target terminal device, which may integrate a target application (i.e., an application client). In this case, the target terminal device can interact with the server 110F through the business data platform corresponding to the application client.
[0045] When server 110F receives an address request associated with an application client from a target terminal device, it can send an address pool space query request to server 120F, which has bitmap service functionality, to check whether the number of addresses to be allocated in the address pool created by server 120F is sufficient to allocate N service request addresses. Here, the address pool (e.g., a CIDR address pool) is established by server 120F based on its bitmap service functionality when it receives the address pool creation request from server 110F. Furthermore, server 110F can receive the number of addresses to be allocated returned by server 120F. If server 110F detects that the number of addresses to be allocated is greater than or equal to N, it means that the address pool in server 120F has sufficient allocation space. At this time, server 110F can call server 120F to allocate addresses for each of the N service request addresses, thereby obtaining the allocation bit address corresponding to each service request address. Based on the allocation bit address corresponding to each service request address, the service network address corresponding to each service request address can be determined, and the service network address corresponding to each service request address can be returned to the target terminal device where the application client is located.
[0046] Therefore, in this embodiment, when server 110F receives an address request associated with an application client, it uses the address pool stored in the bitmap service function of server 120F (i.e., the bitmap service function provided by a third-party storage service) through data interaction with server 120F to meet the address allocation requirements of the distributed system. This method of using the bitmap service function of a bitmap server to allocate business network addresses can greatly reduce the storage space occupied by addresses, thereby improving storage space utilization.
[0047] For better understanding, please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram illustrating a data interaction scenario provided in an embodiment of this application. For example... Figure 2 As shown, the terminal device 200A in this embodiment can be a computer device running an application client, and the terminal device 200A can be the aforementioned Figure 1Any terminal device in the terminal device cluster shown, for example, terminal device 100a. In this embodiment, server 210F can be the business server corresponding to the application client, and server 210F can be the aforementioned... Figure 1 The server 110F shown is illustrated. In this embodiment, server 220F can be a bitmap server with bitmap service functionality, and this server 220F can be the aforementioned... Figure 1 The server shown is 120F.
[0048] like Figure 2 As shown, when server 220F receives an address pool creation request forwarded by server 210F, it can create an address pool stored in a bitmap data structure through its bitmap service function. This address pool can include M allocated bit addresses (i.e., bits), where M can be a positive integer. For ease of explanation, the address pool in this embodiment (e.g., ...) Figure 2 The number M of allocated addresses in the address pool 21D shown can be 10, specifically including allocated address 0, allocated address 1, ..., and allocated address 9. The values corresponding to allocated addresses 0, 1, 3, 4, 5, 6, 7, and 9 in address pool 21D are all set to initial values (e.g., 0); while the values corresponding to allocated addresses 2 and 8 in address pool 21D are all set to updated values (e.g., 1). An allocated address with an initial value indicates that no data is currently stored at that address; an allocated address with an updated value indicates that data has been stored at that address.
[0049] It should be understood that Figure 2 The terminal device 200A shown can generate a service request for N service request addresses through an application client. In this embodiment, the service request for N service request addresses can be referred to as an address request, where N can be a positive integer. For ease of explanation, the number N of service request addresses requested in this embodiment can be taken as three, specifically including service request address X1, service request address X2, and service request address X3. Further, the terminal device 200A can execute S21, sending the address request to server 210F, causing server 210F to execute S22, sending an address pool space query request to server 220F. This address pool space query request can be used to check whether the address pool allocation space of server 220F is sufficient.
[0050] At this time, server 220F can count the number of addresses to be allocated in address pool 21D (e.g., 8). Here, the number of addresses to be allocated refers to the number of allocated bit addresses with initial values (i.e., addresses to be allocated). Further, server 220F can execute S23, returning the number of addresses to be allocated to server 210F, so that server 210F can detect the relationship between the number of addresses to be allocated and the number N of service application addresses requested in the service application request.
[0051] Understandably, when server 210F detects that the number of addresses to be allocated is greater than or equal to 3, it can execute S24 to send an address allocation request to server 220F, so that server 220F loops 3 times to allocate an address for each of the 3 service request addresses. Then it can execute S25 to return the allocation bit address corresponding to each service request address to server 210F.
[0052] To improve the response speed of server 210F, server 220F does not need to spend time waiting for the allocation address corresponding to all business request addresses to be determined. Instead, it can directly return the allocation address corresponding to the currently determined business request address, so that server 210F can quickly return the business network address corresponding to the currently determined business request address to the application client.
[0053] in, Figure 2 The address pool 22D shown can be the address pool after address allocation for these three service request addresses. For example, for service request address X1, server 220F obtains a certain address to be allocated (e.g., allocation address 0) from address pool 21D as the allocation address Y1 corresponding to service request address X1, and can then directly return allocation address Y1 to server 210F so that server 210F can determine the service network address (e.g., service network address 1) corresponding to service request address X1. Similarly, for the service request address X2, server 220F can obtain another address to be allocated (e.g., allocation address 6) from address pool 21D as the allocation address Y2 corresponding to service request address X2, and then return the allocation address Y2 to server 210F; for the service request address X3, server 220F can also obtain another address to be allocated (e.g., allocation address 2) from address pool 21D as the allocation address Y3 corresponding to service request address X3, and then return the allocation address Y3 to server 210F, so that server 210F can determine the service network address (e.g., service network address 3) corresponding to service request address X3.
[0054] Optionally, depending on actual business needs, when server 220F obtains the allocation address corresponding to each of the three service request addresses, it can also send all three allocation addresses simultaneously to server 210F, so that server 210F can determine the service network address corresponding to each service request address based on the obtained three allocation addresses. At this time, server 210F can execute S27 to return all three service network addresses to terminal device 200A running the application client.
[0055] Therefore, in this embodiment, when server 210F receives an address request associated with an application client, it interacts with server 220F and utilizes the address pool stored in the bitmap service function of server 220F (i.e., the bitmap service function provided by a third-party storage service) to meet the address allocation requirements of the distributed system. This method of using the bitmap service function of a bitmap server to allocate business network addresses can greatly reduce the storage space occupied by addresses, thereby improving storage space utilization.
[0056] The specific implementation of the business server allocating N business application addresses by utilizing the bitmap service function provided by the bitmap server when the number of addresses to be allocated in the created address pool meets the address allocation condition (i.e., the number of addresses to be allocated is greater than or equal to N) can be found below. Figures 3-6 The corresponding implementation examples.
[0057] Further, please see Figure 3 , Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 3 As shown, this method can be executed by a computer device with address allocation service capabilities, and the computer device here can be one of the aforementioned... Figure 1 Any terminal device in the terminal device cluster shown, such as terminal device 100b, can also be executed by the business server corresponding to the application client. This business server can be the one described above. Figure 1 The server 110F shown is not limited here. For ease of understanding, this application embodiment uses the method executed by the business server as an example for illustration. The method may include at least the following S101-S103:
[0058] S101, upon receiving an address request associated with the application client, sends an address pool space query request to a bitmap server with bitmap service functionality.
[0059] For example, when a terminal device running an application client needs to request N service request addresses, it can generate an address request associated with the application client and then send this request to the service server corresponding to the application client. Here, N can be a positive integer. The service server can then send an address pool space query request to a bitmap server with a network connection to the service server. This allows the bitmap server to invoke bitmap service functions to determine the number of addresses to be allocated in the address pool. Here, the address pool is established by the bitmap server when it receives an address pool creation request forwarded by the service server.
[0060] Understandably, when a business server receives an address request associated with an application client, it can determine the request type to ascertain whether it is the first request received by the business server after creating the address pool through the bitmap server. If the request type of the address request (e.g., address request 1) is the first request type (e.g., the initial request type), the business server does not need to send an address pool space query request to the bitmap server to check the allocation space of the address pool. It can directly confirm that the address pool in the bitmap server has sufficient allocation space. Furthermore, the business server can directly allocate addresses for each business request address carried in address request 1 through the bitmap server's bitmap service function, thereby improving allocation efficiency.
[0061] Optionally, if the request type of the address request (e.g., address request 2) is a second request type (e.g., non-first request type), it means that the bitmap server has already allocated some of the allocated bit addresses in the address pool. To ensure that the address pool of the bitmap server has sufficient allocation space to support the address allocation of each business request address in address request 2, the business server needs to send an address pool space query request to the bitmap server with bitmap service functionality. The address pool space query request is used to instruct the bitmap server to determine the number of addresses to be allocated in the address pool.
[0062] It should be understood that the bitmap server (e.g., Redis) in this embodiment, as a key-value database, is entirely based on memory operations. It has a simple data structure and uses single-threaded operation, resulting in high read / write efficiency. Furthermore, it supports diverse data types, specifically including data type 1 (e.g., String), data type 2 (e.g., Hash), data type 3 (e.g., List), data type 4 (e.g., Set), and data type 5 (e.g., Sorted Set). Most importantly, because this bitmap server natively supports bitmap operations, it is highly suitable for implementing address allocation in distributed systems.
[0063] Further, please refer to Table 1, which lists the bitmap operations supported by a bitmap server provided in this application embodiment. As shown in Table 1:
[0064] Table 1
[0065] First operation The number of bit addresses allocated to the updated value is counted in the bitmap. Second operation Returns the address of the first bit allocation that contains a given value. Third operation Set the value of the allocated bit address (e.g., initial value or update value). Fourth operation Get the value of the allocated bit address
[0066] As shown in Table 1, the bitmap server supports four operations: the first, second, third, and fourth. The first operation (e.g., BITCOUNT) counts the number of allocated bit addresses with updated values in the bitmap, e.g., BITCOUNT IP. The second operation (e.g., BITPOS) returns the first allocated bit address with a given value, e.g., BITPOS IP 1. The third operation (e.g., SETBIT) sets the value of the allocated bit address (e.g., initial or updated value), e.g., SETBIT IP 2 1. The fourth operation (e.g., GETBIT) retrieves the value of the allocated bit address, e.g., GETBIT IP 2. The pool of IP addresses to be allocated can be stored using a Redis key, and bitmap operations can be used to allocate and reclaim addresses for business applications.
[0067] It should be understood that when the bitmap server receives an address pool space query request from the business server, it needs to determine the address pool associated with the business server. Then, it can retrieve the value of each of the M allocation bit addresses from the address pool, designating the allocation bit addresses with updated values as allocated addresses and the allocation bit addresses with initial values as addresses to be allocated. Furthermore, the bitmap server can count the number of allocated addresses, thereby determining the difference between the number of allocated addresses and M, and using this difference as the number of addresses to be allocated in the address pool.
[0068] like Figure 2 As shown, when server 220F (i.e., the bitmap server) receives an address pool space query request sent by server 210F (i.e., the business server), it can obtain the address pool associated with server 210F (e.g., ...). Figure 2(See address pool 21D). Further, the server 220F can determine the value of each of the 10 allocation addresses through the fourth operation shown in Table 1 above. For example, the address pool 21D may include 10 allocation addresses, specifically allocation address 0, allocation address 1, ..., and allocation address 9. The server 220F can determine the values of allocation address 0 (i.e., initial value, e.g., 0), allocation address 1 (i.e., initial value), allocation address 2 (i.e., updated value, e.g., 1), allocation address 3 (i.e., initial value), allocation address 4 (i.e., initial value), allocation address 5 (i.e., initial value), allocation address 6 (i.e., initial value), allocation address 7 (i.e., initial value), allocation address 8 (i.e., updated value), and allocation address 9 (i.e., initial value) from the address pool 21D. At this time, the server 220F can use the allocation bit address with the updated value as the allocated address (e.g., allocation bit address 2 and allocation bit address 8), and the allocation bit address with the initial value as the address to be allocated (e.g., allocation bit address 0, allocation bit address 1, allocation bit address 3, allocation bit address 4, allocation address 5, allocation bit address 6, allocation bit address 7 and allocation bit address 9).
[0069] Furthermore, the server 220F can perform the first operation shown in Table 1 above to count the number of allocated addresses (e.g., 2), and then determine the difference between the number of allocated addresses and the total number of allocated bit addresses M (e.g., 10) in the address pool, and use the difference (e.g., 8) as the number of addresses to be allocated in the address pool.
[0070] Optionally, if the address pool 21D has already undergone multiple batches of address allocation, meaning the number of addresses to be allocated in the address pool is decreasing, then the server 220F in this embodiment does not need to indirectly determine the number of addresses to be allocated by determining the difference between the number of allocated addresses and the total number of addresses in the address pool. Instead, when the fifth operation is supported (e.g., directly counting the number of allocated addresses with the initial value), the number of addresses to be allocated can be counted directly according to the fifth operation to improve the efficiency of address count.
[0071] S102: Receive the number of addresses to be allocated sent by the bitmap server. When the number of addresses to be allocated is greater than or equal to N, call the bitmap server to allocate the service request address X from the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i .
[0072] For example, a business server can receive the number of addresses to be allocated from a bitmap server. When the number of addresses to be allocated is greater than or equal to N, the business server can determine that the address pool meets the address allocation conditions. At this point, the business server can perform atomic operations on the programs associated with the N business request addresses to generate address allocation requests. An atomic operation is indivisible, meaning it cannot be interrupted by any other task or event before completion. Furthermore, the business server can send the address allocation request to the bitmap server to invoke the bitmap server to allocate the address X from the N business request addresses. i Address allocation is performed to obtain the business request address X. i The corresponding allocated bit address Y i .
[0073] Here, the address allocation request can be obtained by the business server performing atomic operations directly on the programs corresponding to the N business request addresses. That is, the bitmap server will not be interrupted by any other tasks or events before completing the address allocation process for the N business request addresses. This means that the bitmap server can effectively solve the problem of secure access to the address pool for programs corresponding to the same batch of N business request addresses, thus effectively ensuring the efficiency and accuracy of address allocation within the same batch. Optionally, the address allocation request can also be obtained by the business server performing atomic operations on the subroutines corresponding to each business request address. That is, the bitmap server will not be interrupted by any other tasks or events before completing the address allocation process for a particular business request address. This means that the bitmap server will only allocate to another business request address after completing the address allocation for the current business request address. In other words, there will not be two or more different business request addresses simultaneously competing for a single address in the address pool. This effectively solves the problem of secure access to the address pool for a subroutine corresponding to a business request address, thus effectively ensuring the accuracy of address allocation for each business request address. In this embodiment, atomic operations can be implemented using a scripting language (e.g., Lua script) or a distributed lock (e.g., ZooKeeper).
[0074] For ease of understanding, this application uses a distributed lock as an example to illustrate the specific implementation method of atomicity guarantee by the business server. Specifically, when the business server receives the number of addresses to be allocated from the bitmap server, it can detect the relationship between the number of addresses to be allocated and the total number N of addresses requested in the business application, thereby determining whether the number of addresses to be allocated in the address pool meets the address allocation conditions.
[0075] Furthermore, when the business server detects that the number of addresses to be allocated is greater than or equal to N, it can determine that the number of addresses to be allocated meets the address allocation condition. At this time, the business server can use the distributed lock indicated by the atomic operation to create temporary sequential nodes for each subroutine used to create a business request address, thereby obtaining a set of sequential directories associated with the distributed lock. Here, the N business request addresses may include business request address X. i In the address X used to create the business request i C subroutine i When the corresponding temporary sequential node is the smallest temporary sequential node in the sequential directory set, the business server can use the distributed lock pair subroutine C. i Perform locking, and then the locked subroutine C can be... i Send to the bitmap server so that the bitmap server can process the business request address X i Address allocation is performed. This bitmap server can utilize the locking mechanism via the subroutine C. i The system retrieves the target address to be allocated from the address pool, then changes the value in the target address to an updated value, and uses the target address with the updated value as the service request address X. i The corresponding allocated bit address Y i Furthermore, the business server obtains the business request address X returned by the bitmap server. i The corresponding allocated bit address Y i At that time, subroutine C can be deleted from the sequential directory set. i The corresponding temporary sequential node.
[0076] like Figure 2 As shown, Figure 2 The address request can be used to request three service request addresses, specifically service request address X1, service request address X2, and service request address X3. When server 210F detects that the number of addresses to be allocated in address pool 21D is greater than or equal to three, server 210F can use the distributed lock indicated by the atomic operation to create temporary sequential nodes (e.g., temporary sequential node 001) for subroutine C1 corresponding to service request address X1, temporary sequential nodes (e.g., temporary sequential node 002) for subroutine C2 corresponding to service request address X2, and temporary sequential nodes (e.g., temporary sequential node 003) for subroutine C3 corresponding to service request address X3, in ascending order of creation.
[0077] Understandably, each subroutine C iBefore attempting to acquire the distributed lock, it first checks if its own ephemeral sequential node belongs to the current smallest ephemeral sequential node. If so, the subroutine C... i The lock can be acquired; otherwise, the subroutine C... i The subroutine C is in a state of waiting for notification. i It can monitor the subroutine C corresponding to the previous temporary sequential node. i-1 Whether to release the distributed lock is determined in subroutine C. i-1 When a temporary sequential node is deleted from a sequential directory set, it means that subroutine C i A distributed lock can be acquired.
[0078] For example, the sequence directory set associated with the distributed lock obtained by server 210F at the first moment (e.g., the first sequence directory set) may include temporary sequence node 001, temporary sequence node 002, and temporary sequence node 003. It can be understood that when server 210F determines that the temporary sequence node corresponding to subroutine C1 is the smallest temporary sequence node in the current sequence directory set, server 210F can determine that subroutine C1 has the ability to acquire the distributed lock. Therefore, server 210F can lock subroutine C1 using the distributed lock and generate an address allocation request to be sent to server 220F based on the locked subroutine C1. At this time, subroutine C2 is in a waiting-for-notification state to monitor whether subroutine C1 releases the distributed lock, i.e., to monitor whether subroutine C1 deletes its own temporary sequence node 001 from the sequence directory set. Similarly, subroutine C3 is also in a waiting-for-notification state to monitor whether subroutine C2 releases the distributed lock, i.e., to monitor whether subroutine C2 deletes its own temporary sequence node 002 from the sequence directory set. Furthermore, when server 220F acquires the locked subroutine C1, it can obtain a target address to be allocated (e.g., allocation address 0) from address pool 21D. Through the third operation shown in Table 1 above, the value of allocation address 0 is changed from its initial value to an updated value. Then, allocation address 0 with the updated value (i.e., allocation address 0 in address pool 22D) is used as the allocation address Y1 corresponding to the service request address X1. Server 220F can then return allocation address Y1 to server 210F, causing server 210F to delete the temporary sequential node 001 corresponding to subroutine C1 from the first sequential directory set, i.e., releasing the distributed lock.
[0079] In this embodiment, the moment when server 210F deletes temporary sequential node 001 can be defined as the second moment. The sequence directory set at the second moment (i.e., the second sequence directory set) can include temporary sequential nodes 002 and 003. This means that the temporary sequential node corresponding to subroutine C2 is the smallest temporary sequential node in the current sequence directory set. At this time, server 210F can determine that subroutine C2 has the ability to acquire a distributed lock, and can then lock subroutine C2 using the distributed lock. Based on the locked subroutine C2, an address allocation request is generated to be sent to server 220F. Meanwhile, subroutine C3 remains in a waiting-for-notification state to monitor whether subroutine C2 has released the distributed lock. Furthermore, when server 220F acquires the locked subroutine C2, it can obtain another target address to be allocated (e.g., allocation address 6) from address pool 21D. Through the third operation shown in Table 1 above, the value of allocation address 6 is changed from its initial value to an updated value. Then, allocation address 6 with the updated value (i.e., allocation address 6 in address pool 22D) is used as the allocation address Y2 corresponding to service request address X2. Then, server 220F can return allocation address Y2 to server 210F, causing server 210F to delete the temporary sequential node 002 corresponding to subroutine C2 from the second sequential directory set, i.e., releasing the distributed lock.
[0080] Similarly, in this embodiment, the moment when server 210F deletes temporary sequential node 002 can be determined as the third moment, and the sequence directory set at the third moment (i.e., the third sequence directory set) can include temporary sequential node 003. This means that the temporary sequential node corresponding to subroutine C3 is the smallest temporary sequential node in the current sequence directory set. At this time, server 210F can determine that subroutine C3 has the ability to acquire a distributed lock, and can then lock subroutine C3 using the distributed lock, and generate an address allocation request to be sent to server 220F based on the locked subroutine C3. Further, when server 220F acquires the locked subroutine C3, it can obtain another target address to be allocated (e.g., allocation address 2) from address pool 21D. Through the third operation shown in Table 1 above, the value of allocation address 2 is changed from the initial value to the updated value, and then allocation address 2 with the updated value (i.e., allocation address 2 in address pool 22D) is used as the allocation address Y3 corresponding to service request address X3. Then, server 220F can return the allocated bit address Y3 to server 210F, so that server 210F can delete the temporary sequential node 003 corresponding to subroutine C3 in the third sequential directory set, that is, release the distributed lock.
[0081] S103, based on the allocated bit address Y iDetermine the business request address X i The corresponding business network address is returned to the application client for each business request address.
[0082] For example, the application server can obtain the address block identifier associated with the address pool, and then allocate bit address Y based on the address block identifier. i This is converted to an initial network address. The initial network address here may include the first byte and the second byte. Further, the service server can obtain a first policy for the first byte, and then, based on a first conversion coefficient associated with the first policy, allocate bit address Y. i The integer part is rounded down, and the rounded value is used as the value corresponding to the first byte. Simultaneously, the business server can obtain the second strategy for the second byte, and then, based on the second conversion coefficient associated with the second strategy, allocate bit address Y. i The modulo operation is performed, and the resulting value is used as the value corresponding to the second byte. Furthermore, the service server can update the initial network address based on the values corresponding to the first and second bytes to obtain the service request address X. i The corresponding business network address is returned to the application client, and the business network address corresponding to each business request address is returned to the application client.
[0083] For example, the first strategy obtained by the service server for the first byte (i.e., C) in the initial network address (e.g., ABCD) can be seen in the following formula (1):
[0084] C = Y i / K (1)
[0085] Wherein, Y i It can be used to represent the address X of a business request received by the business server. i The corresponding allocation bit address, where K can represent the first conversion factor (e.g., 256) used to round the allocation bit address.
[0086] For example, the second strategy obtained by the service server for the second byte (i.e., D) in the initial network address (e.g., ABCD) can be seen in the following formula (2):
[0087] D = Y i %K (2)
[0088] Wherein, Y i It can be used to represent the address X of a business request received by the business server. iThe corresponding allocation bit address, where K can represent a second conversion coefficient (e.g., 256) used to perform a modulo operation on the allocation bit address.
[0089] For example, if the address block identifier associated with the address pool obtained by the business server is 192.168.0.0 / 16, then the total size of the address pool is 2 to the power of 16. This means that the total number M of allocated bit addresses in the address pool can be 65536, that is, the address pool needs a bitmap of length 65536 to store it. Therefore, when the business server receives the allocated bit address Y... i (For example, 12345) can be allocated based on the address block identifier, and the bit address Y can be assigned. i This is converted to an initial network address (e.g., 192.168.CD). Further, the service server can allocate bit address Y based on the above formula (1) and a first conversion coefficient (e.g., 256) associated with the first strategy. i The integer part is rounded down, and the rounded value is used as the value corresponding to the first byte (e.g., 48). Meanwhile, the service server can also allocate bit address Y based on the above formula (2) and the second conversion coefficient associated with the second strategy (e.g., 256). i Perform a modulo operation, and use the resulting value as the value corresponding to the second byte (e.g., 57). At this point, the service server can update the initial network address based on the values of the first and second bytes to obtain the service request address X. i The corresponding business network address (e.g., 192.168.48.57).
[0090] In this embodiment, when the business server receives an address request associated with an application client, it uses the address pool stored in the bitmap service function (i.e., the bitmap service function provided by a third-party storage service) of the bitmap server through data interaction with the bitmap server to meet the address allocation requirements of the distributed system. This method of using the bitmap service function of the bitmap server to allocate business network addresses can greatly reduce the storage space occupied by addresses, thereby improving storage space utilization.
[0091] Further, please see Figure 4 , Figure 4 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 4 As shown, this method can be interactively executed by a computer device running an application client (e.g., a target terminal device), a business server with address allocation service functionality, and a bitmap server with bitmap service functionality, wherein the target terminal device can be one of the aforementioned... Figure 1Any terminal device in the terminal device cluster shown, for example, terminal device 100a. The service server can be the aforementioned... Figure 1 The server 110F shown can be a bitmap server as described above. Figure 1 The server 120F is shown. This method may include at least the following S201-S209:
[0092] S201, the application client sends an address pool creation request to the business server.
[0093] Specifically, when an application client generates an address pool creation request to create a new IP address pool, it can send the request to the business server. This address pool creation request can carry an address block identifier (e.g., an IP address) including the network prefix, host number, and the number of bits occupied by the network prefix, specifically represented as {<network prefix>, <host number>} / number of bits occupied by the network prefix.
[0094] S202, the business server forwards the address pool creation request to the bitmap server with bitmap service functionality, so that the bitmap server can create the address pool based on the bitmap service functionality.
[0095] For example, the business server can forward the address pool creation request to the bitmap server, so that the bitmap server can create a bitmap corresponding to the address block identifier based on the bitmap service function, initialize the M allocation bit addresses in the bitmap, and determine the initialized bitmap as the address pool.
[0096] The representation of CIDR address blocks is similar to that of IPv4 addresses: a dotted decimal address consisting of four parts, followed by a forward slash, and finally a number between 0 and 32: ABCD / N. The dotted decimal part of the address block is a 32-bit binary number divided into four octets. The number after the forward slash is the prefix length, which is the number of bits shared by the addresses within the address block from left to right. For example, if the address block identifier carried in the address pool creation request is xxxx / 20, this means that the address block identifier has 32 bits, of which the first 20 bits are the network prefix (also known as the network number), and the last 12 bits are the host number. Furthermore, the bitmap server can determine the number of addresses M=2 of the allocated bit addresses contained in the address block. 12 =4096. At this point, the bitmap server can create a bitmap with 4096 allocated bit addresses based on the bitmap service function. Then, it can initialize the M allocated bit addresses in the bitmap by setting the values in these M allocated bit addresses to the initial values (e.g., 0), thereby determining the initialized bitmap as the address pool.
[0097] The core idea of bitmap algorithms is to use a bit array to record two states (e.g., idle state and stored state). The idle state refers to the value of the allocated bit address (i.e., the bit address) being the initial value (e.g., 0), meaning that no data is currently stored at that address. The stored state refers to the value of the allocated bit address being the updated value (e.g., 1), meaning that data has been stored at that address. It is understandable that bitmap-based algorithms are suitable for applications involving large-scale data queries and deduplication, and these algorithms can improve storage space utilization.
[0098] S203, The application client sends an address request to the business server.
[0099] For example, when a target terminal device running an application client needs to request N service request addresses, it can generate an address request associated with the application client, and then send the address request to the service server corresponding to the application client. Here, N can be a positive integer.
[0100] S204, the business server sends an address pool space query request to the bitmap server.
[0101] For example, when a business server receives an address request from an application client, it can send an address pool space query request to a bitmap server with a network connection to the business server. This allows the bitmap server to invoke bitmap service functions to determine the number of addresses to be allocated in the address pool. Here, the address pool is established by the bitmap server when it receives an address pool creation request forwarded by the business server.
[0102] S205, the bitmap server returns the number of addresses to be allocated to the business server.
[0103] S206, when the business server detects that the number of addresses to be allocated is greater than or equal to N, it sends the generated address allocation request to the bitmap server.
[0104] For example, when the business server detects that the number of addresses to be allocated is greater than or equal to N, it can determine that the number of addresses to be allocated meets the address allocation condition. At this time, the business server can use the distributed lock indicated by the atomic operation to create temporary sequential nodes for each subroutine used to create a business request address, thereby obtaining a set of sequential directories associated with the distributed lock. Here, the N business request addresses may include business request address X. i In the address X used to create the business request i C subroutine i When the corresponding temporary sequential node is the smallest temporary sequential node in the sequential directory set, the business server can use the distributed lock pair subroutine C. iPerform locking processing, and then you can use the subroutine C after locking processing. i Generate an address allocation request and send it to the bitmap server.
[0105] S207, The bitmap server requests service request address X from N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i .
[0106] Specifically, when the bitmap server receives an address allocation request, it can obtain the locked subroutine C. i This allows the locking process to be handled by the subroutine C. i The target address to be allocated is obtained from the address pool. Then, the value in the target address to be allocated can be changed from the initial value to the updated value, and the target address to be allocated with the updated value is used as the service request address X. i The corresponding allocated bit address Y i .
[0107] S208, the bitmap server will allocate bit address Y. i Return to the business server so that the business server can allocate bit address Y i Determine the business request address X i The corresponding business network address.
[0108] For example, a bitmap server can return the business request address X to a business server. i The corresponding allocated bit address Y i This allows the business server to remove subroutine C from the sequential directory set. i The corresponding temporary sequence node. Furthermore, the business server can obtain the address block identifier associated with the address pool, and then, based on the address block identifier, allocate bit address Y. i This is converted to an initial network address. The initial network address here may include the first byte and the second byte. Further, the service server can obtain a first policy for the first byte, and then, based on a first conversion coefficient associated with the first policy, allocate bit address Y. i The integer part is rounded down, and the rounded value is used as the value corresponding to the first byte. Simultaneously, the business server can obtain the second strategy for the second byte, and then, based on the second conversion coefficient associated with the second strategy, allocate bit address Y. i The modulo operation is performed, and the resulting value is used as the value corresponding to the second byte. Furthermore, the service server can update the initial network address based on the values corresponding to the first and second bytes to obtain the service request address X.i The corresponding business network address.
[0109] S209, the business server returns the business network address corresponding to each business request address to the application client.
[0110] For example, the service server can execute S207-S208 in a loop to obtain the service network address corresponding to each of the N service request addresses, and then return the service network address corresponding to each service request address to the application client.
[0111] For specific implementation methods of S203-S209, please refer to the above. Figure 3 The descriptions of S101-S103 in the corresponding embodiments will not be repeated here.
[0112] The business network address corresponding to each business request address can be stored in a database associated with the application client. This database can be used to store business fields associated with the target business network address when a business request is received. The business request is generated by the application client and associated with the target business network address in the database.
[0113] Further, please see Figure 5 , Figure 5 This is a schematic diagram illustrating a process for address allocation based on a business scenario, provided in an embodiment of this application. For example... Figure 5 As shown, this method can be interactively executed by a database associated with the application client, a computer device running the application client (e.g., a target terminal device), a business server with address allocation service functionality, and a bitmap server with bitmap service functionality. The target terminal device can be one of the aforementioned... Figure 1 Any terminal device in the terminal device cluster shown, for example, terminal device 100a. The service server can be the aforementioned... Figure 1 The server 110F shown can be a bitmap server as described above. Figure 1 The server shown is 120F. Here, the database can be a computer device providing storage services; this computer device can be a server or a terminal device, and no limitation will be placed on the computer device here.
[0114] like Figure 5As shown, when a target terminal device running an application client generates an address pool creation request to create a new IP address pool, it can execute S501 to send the address pool creation request to the service server. This allows the service server to execute S502, forwarding the address pool creation request to a bitmap server with bitmap service functionality. Furthermore, upon receiving the address pool creation request, the bitmap server can invoke the bitmap service function to create the corresponding address pool based on the address block identifier in the address pool creation request.
[0115] It should be understood that when a target terminal device running an application client needs to request N service request addresses, it can generate an address request associated with the application client, and then execute S503 to send the address request to the service server corresponding to the application client. Here, N can be a positive integer. Further, the service server can execute S504 to send an address pool space query request to the bitmap server, so that the bitmap server can determine the number of addresses to be allocated in the address pool.
[0116] At this point, the bitmap server can execute S505, returning the number of addresses to be allocated to the service server. When the service server detects that the number of addresses to be allocated is greater than or equal to N, it can execute S506, sending the generated address allocation request to the bitmap server. Further, upon receiving the address allocation request, the bitmap server can execute S507, allocating service request addresses X from the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i This allows the execution of S508, which allocates bit address Y. i Return to the business server so that the business server can allocate bit address Y i Determine the business request address X i The corresponding business network address. Similarly, the bitmap server can repeatedly execute S507-S508 to obtain the business network address corresponding to each business request address.
[0117] Furthermore, when the service server receives the service network address corresponding to each service request address returned by the bitmap server, it can execute S509 to return the service network address corresponding to each service request address to the application client. The specific implementation of S501-S509 can be found above. Figure 5 The descriptions of S201-S209 in the corresponding embodiments will not be repeated here.
[0118] It should be understood that when the application client obtains the business network address corresponding to each business request address, it can also execute S510 to store the business network address corresponding to each business request address in a database (i.e., a relational database management system, such as MySQL). For example, the database here can store... Figure 2 The business network address 1 corresponding to business request address X1 (e.g., 192.168.0.0), the business network address 2 corresponding to business request address X2 (e.g., 192.168.0.6), and the business network address 3 corresponding to business request address X3 (e.g., 192.168.0.2) are shown.
[0119] Furthermore, if the application client generates a business request associated with a target business network address (e.g., business network address 3) in the database based on a business scenario, the application client can execute S511 to send the business request. At this time, the database can execute S512 to obtain and store the business fields associated with business network address 3. For example, in some business scenarios, it is often necessary to add additional business fields to store business data for the obtained target business network address. For example, these business fields may include the interface to which the target business network address is assigned, the allocation time, etc.
[0120] Optionally, when the business server detects that the number of addresses to be allocated returned by the bitmap server is less than N, the business server can generate an allocation failure notification message to indicate insufficient allocation control, and then return the allocation failure notification message to the application client. At this time, the application client can generate an address pool creation request to recreate a new address pool with a number of allocated bit addresses greater than N, so that the business server can allocate addresses to each of the N business application addresses by calling the bitmap service function provided by the bitmap server. For specific implementation details, please refer to the above. Figure 4 The S201-S209 shown will not be described in detail here.
[0121] Optionally, in this embodiment, the business server can also invoke the bitmap service function of the bitmap server to implement address return in the distributed system. It is understood that the business server can also obtain address return requests associated with the application client. These address return requests can be used to return H business request addresses, where H is a positive integer. Further, the business server can obtain a business request address X from the H business request addresses. j Therefore, it is possible to base the business request address X j The corresponding business network address determines the business request address X. j The corresponding allocated bit address Zj Here, j is a positive integer less than or equal to H. Furthermore, the service server can allocate bit address Z. j Send to the bitmap server so that the bitmap server will allocate bit address Z j The corresponding value changes from the updated value to the initial value. Upon completion of returning H service request addresses, a return success notification is generated. When the service server receives the return success notification from the bitmap server, it can forward the notification to the application client.
[0122] Specifically, the service server obtains the address Z for allocation. j The conversion strategy can be found in the following formula (3):
[0123] Z j =C*K+D (3)
[0124] Here, C can be used to represent the address X of the business request received by the business server. i The first byte of the corresponding business network address; here, D can be used to represent the business request address X received by the business server. i The second byte of the corresponding business network address; here K can represent the conversion factor (e.g., 256) used to return the business network address.
[0125] It is understandable that the business server can obtain the business request address X from H business request addresses. j This allows us to determine the business request address X. j The corresponding business network address. Here, the business request address X... j The corresponding business network address may include the first byte and the second byte. Further, the business server can obtain the conversion strategy for the allocated bit address shown in formula (3) above, and then, based on formula (3), determine the product between the value corresponding to the first byte and the conversion coefficient, and sum the product with the value corresponding to the second byte. The summed value can then be used as the business request address X. j The corresponding allocated bit address Z j .
[0126] For example, if the business server receives a business request address X jThe corresponding business network address is 192.168.1.1. Therefore, the first byte obtained by the business server has a value of 1, and the second byte has a value of 2. At this point, the business server can determine the product between the value of the first byte and the conversion coefficient (e.g., 256) based on the above formula (3). Then, it can sum the product with the value of the second byte, and thus use the summed value (e.g., 257) as the business request address X. j The corresponding allocated bit address Z j At this point, the service server can allocate bit address Z. j Send it to the bitmap server so that the bitmap server changes the value of the allocated bit address corresponding to position 257 in the bitmap from the updated value to the initial value.
[0127] For better understanding, please refer to [link / reference]. Figure 6 , Figure 6 This is a schematic diagram illustrating an address return process provided in an embodiment of this application. For example... Figure 6 As shown, this method can be interactively executed by a computer device running an application client (e.g., a target terminal device), a business server with address allocation service functionality, and a bitmap server with bitmap service functionality, wherein the target terminal device can be one of the aforementioned... Figure 1 Any terminal device in the terminal device cluster shown, for example, terminal device 100a. The service server can be the aforementioned... Figure 1 The server 110F shown can be a bitmap server as described above. Figure 1 The server shown is 120F.
[0128] like Figure 6 As shown, when a target terminal device running an application client needs to return H service request addresses, it can generate an address return request associated with the application client, and then execute S61 to send the address return request to the service server. Here, H is a positive integer. Further, the service server can execute S62 to obtain the service request address X from the H service request addresses. j Therefore, it is possible to base the business request address X j The corresponding business network address determines the business request address X. j The corresponding allocated bit address Z j Here, j is a positive integer less than or equal to H. Further, the service server can execute S63 to allocate bit address Z. j Send to the bitmap server. The bitmap server receives the allocated bit address Z sent by the business server. j At that time, S64 can be executed to allocate bit address Z. jThe corresponding value is changed from the updated value to the initial value. Similarly, in this embodiment, the service server and bitmap server can repeatedly execute S62-S64 to return the service network address corresponding to each service application address.
[0129] Furthermore, when the bitmap server completes the return of H service request addresses, it can generate a return success notification message, and then execute S65 to send the return success notification message to the service server, so that the service server can execute S66 to forward the return success notification message to the application client.
[0130] The distributed system address pool implementation scheme proposed in this application utilizes the bitmap service function provided by the bitmap server, employing a bitmap data structure to record the address pool to support the IP allocation / return requirements of the distributed system. This address allocation method not only avoids the problem of data loss due to single-point service storing data in memory, but also significantly reduces the storage space occupied by addresses through the bitmap service function, for example, reducing the address storage space to one percent of the database storage. In addition, since the bitmap server is a key-value database, it is entirely based on memory operations, has a simple data structure, and uses single-threaded operations, resulting in high read and write efficiency. Using the bitmap data structure, the query time complexity for querying a specific allocated address is O(1), while that of a conventional relational database is O(logN), thus greatly improving query efficiency.
[0131] Further, please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application. The data processing apparatus 1 can be a computer program (including program code) running on a computer device; for example, the data processing apparatus 1 is application software. The data processing apparatus 1 can be used to execute corresponding actions in the methods provided in the embodiments of this application. Figure 7 As shown, the data processing device 1 can operate on a computer device (e.g., a business server) with address allocation service functionality, and the business server can be the aforementioned Figure 2 The corresponding embodiment is server 210F. The data processing device 1 may include: a sending module 11, an acquisition module 12, a determination module 13, a receiving module 14, a forwarding module 15, a generation module 16, and a return module 17.
[0132] The sending module 11 is used to send an address pool space query request to a bitmap server with bitmap service function when it receives an address request associated with an application client; the address pool space query request is used to instruct the bitmap server to determine the number of addresses to be allocated in the address pool; the address request is used to request N service request addresses; N is a positive integer; the address pool is established by the bitmap server when it receives an address pool creation request forwarded by the service server;
[0133] The acquisition module 12 is used to receive the number of addresses to be allocated sent by the bitmap server. When the number of addresses to be allocated is greater than or equal to N, it calls the bitmap server to select the service request address X from the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i ; i is a positive integer less than or equal to N.
[0134] The acquisition module 12 includes a receiving unit 121, a creation unit 122, a locking processing unit 123, and a deletion unit 124.
[0135] The receiving unit 121 is used to receive the number of addresses to be allocated sent by the bitmap server;
[0136] The creation unit 122 is used to create temporary sequential nodes for each subroutine used to create a business request address when the number of addresses to be allocated is greater than or equal to N, through the distributed lock indicated by the atomic operation, thereby obtaining a set of sequential directories associated with the distributed lock; the N business request addresses include business request address X i ;
[0137] The locking processing unit 123 is used to lock the address X used to create the service request. i C subroutine i When the corresponding temporary sequential node is the smallest temporary sequential node in the sequential directory set, the distributed lock pair subroutine C is used. i Perform locking processing, and then lock the subroutine C. i Send to the bitmap server so that the bitmap server can process the business request address X i Perform address allocation;
[0138] The deletion unit 124 is used to obtain the business request address X returned by the bitmap server. i The corresponding allocated bit address Y i At that time, remove subroutine C from the sequential directory set. i The corresponding temporary sequential node.
[0139] The specific implementation methods of the receiving unit 121, the creation unit 122, the locking processing unit 123, and the deletion unit 124 can be found in the above description. Figure 3 The description of S102 in the corresponding embodiments will not be repeated here.
[0140] The determining module 13 is used to determine the allocation bit address Y. i Determine the business request address X i The corresponding business network address is returned to the application client for each business request address.
[0141] The determining module 13 includes: an acquisition unit 131, a rounding processing unit 132, a remainder processing unit 133, a determining unit 134, and a return unit 135.
[0142] The acquisition unit 131 is used to acquire the address block identifier associated with the address pool, and based on the address block identifier, allocate bit address Y. i Convert to the initial network address; the initial network address includes the first byte and the second byte;
[0143] The rounding processing unit 132 is used to obtain a first strategy for the first byte, and based on a first conversion coefficient associated with the first strategy, allocate bit address Y. i Perform rounding and use the rounded value as the value corresponding to the first byte.
[0144] The remainder processing unit 133 is used to obtain a second strategy for the second byte, and based on a second conversion coefficient associated with the second strategy, allocate bit address Y. i Perform a modulo operation and use the value after the modulo operation as the value corresponding to the second byte.
[0145] The determining unit 134 is used to update the initial network address based on the value corresponding to the first byte and the value corresponding to the second byte, to obtain the service request address X. i The corresponding business network address;
[0146] The return unit 135 is used to return the business network address corresponding to each business request address to the application client.
[0147] The specific implementation methods of the acquisition unit 131, the rounding processing unit 132, the remainder processing unit 133, the determination unit 134, and the return unit 135 can be found in the above description. Figure 3 The description of S103 in the corresponding embodiments will not be repeated here.
[0148] The receiving module 14 is used to receive an address pool creation request sent by the application client; the address pool creation request carries an address block identifier including the network prefix, host number, and the number of bits occupied by the network prefix;
[0149] The forwarding module 15 is used to forward the address pool creation request to the bitmap server; the address pool space query request is used to instruct the bitmap server to create a bitmap corresponding to the address block identifier based on the bitmap service function, and to initialize the M allocated bit addresses in the bitmap, and to determine the initialized bitmap as the address pool; M is a positive integer determined based on the network prefix, host number and the number of bits occupied by the network prefix.
[0150] The business network address corresponding to each business request address is stored in a database associated with the application client; the database is used to store business fields associated with the target business network address when a business request is received; the business request is a request generated by the application client and associated with the target business network address in the database.
[0151] The acquisition module 12 is also used to acquire address return requests associated with the application client; the address return requests are used to return H service request addresses; H is a positive integer;
[0152] The determining module 13 is also used to obtain the service request address X from the H service request addresses. j Based on the business request address X j The corresponding business network address determines the business request address X. j The corresponding allocated bit address Z j j is a positive integer less than or equal to H.
[0153] Specifically, the determining module 13 is also used for:
[0154] Obtain the business request address X from H business request addresses. j Determine the business request address X j The corresponding business network address; business request address X j The corresponding business network address includes the first byte and the second byte;
[0155] Based on the conversion strategy for the allocated address, the product between the value corresponding to the first byte and the conversion coefficient is determined. The product is then summed with the value corresponding to the second byte, and the summed value is used as the business request address X. j The corresponding allocated bit address Z j .
[0156] The sending module 11 is also used to allocate bit address Z j Send to the bitmap server so that the bitmap server will allocate bit address Zj The corresponding value is changed from the updated value to the initial value, and a return success notification message is generated when the H service request addresses are returned.
[0157] The receiving module 14 is also used to receive the return success notification information returned by the bitmap server and forward the return success notification information to the application client.
[0158] The generation module 16 is used to generate allocation failure notification information to indicate insufficient allocation space when the number of addresses to be allocated is less than N.
[0159] The return module 17 is used to return allocation failure notification information to the application client.
[0160] The specific implementation methods of the sending module 11, the obtaining module 12, the determining module 13, the receiving module 14, the forwarding module 15, the generating module 16, and the returning module 17 can be found above. Figure 4 The descriptions of S201-S209 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.
[0161] Further, please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application. The data processing apparatus 2 can be a computer program (including program code) running on a computer device; for example, the data processing apparatus 2 is application software. The data processing apparatus 2 can be used to execute corresponding steps in the method provided in the embodiments of this application. Figure 8 As shown, the data processing device 2 can operate on a computer device with bitmap service capabilities (e.g., a bitmap server), which can be the aforementioned... Figure 2 The server 220F in the corresponding embodiment. The data processing device 2 may include: a determination module 100, a return module 200, and an allocation module 300.
[0162] The determining module 100 is used to obtain the address space query request sent by the business server and determine the number of addresses to be allocated in the address pool. The address space query request is generated by the business server when it obtains the address application request associated with the application client. The address application request is used to apply for N business request addresses. N is a positive integer. The address pool is established by the bitmap server when it receives the address pool creation request forwarded by the business server.
[0163] The determining module 100 is also used for:
[0164] Obtain the address space query request sent by the business server, and determine the address pool associated with the business server based on the address space query request; the address pool includes M allocation bit addresses; M is a positive integer determined based on the address block identifier carried by the address pool creation request;
[0165] Obtain the value of each of the M allocation addresses, and use the allocation address with the updated value as the allocated address and the allocation address with the initial value as the address to be allocated.
[0166] Count the number of allocated addresses, determine the difference between the number of allocated addresses and M, and use the difference as the number of addresses to be allocated in the address pool.
[0167] The return module 200 is used to return the number of addresses to be allocated to the business server; the number of addresses to be allocated is used to instruct the business server to generate an address allocation request when it detects that the number of addresses to be allocated is greater than or equal to N.
[0168] The allocation module 300 is used to, upon receiving an address allocation request from the service server, allocate service request address X from among N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i ; i is a positive integer less than or equal to N.
[0169] The allocation module 300 is also used for:
[0170] Upon receiving an address allocation request from the business server, obtain the lock-handling subroutine C. i Subroutine C after locking i The business server detected subroutine C i When the corresponding temporary sequence node is the smallest temporary sequence node in the sequence directory set associated with the distributed lock, the distributed lock is used to access subroutine C. i The result obtained after locking; Subroutine C i For creating the business request address X i Subroutines;
[0171] Subroutine C after locking i Obtain the target address to be allocated from the address pool, and change the value in the target address to the updated value from the initial value;
[0172] The target address to be assigned with the updated value is used as the service request address X. i The corresponding allocated bit address Y i .
[0173] The return module 200 is also used to allocate bit address Y i Return to the business server; allocate bit address Y i Used to instruct the business server based on the allocated bit address Y i Determine the business request address X i The corresponding business network address is returned to the application client, and the business network address corresponding to each business request address is returned to the application client.
[0174] The specific implementation methods of the determining module 100, the returning module 200, and the allocating module 300 can be found in the above description. Figure 4 The descriptions of S201-S209 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.
[0175] Further, please see Figure 9 , Figure 9 This is a schematic diagram of a computer device provided in an embodiment of this application. Figure 9 As shown, the computer device 3000 can be the above-mentioned Figure 2 Corresponding to the server 210F in the embodiment, the computer device 3000 may include: at least one processor 3001, such as a CPU; at least one network interface 3004; a user interface 3003; a memory 3005; and at least one communication bus 3002. The communication bus 3002 is used to implement communication between these components. The user interface 3003 may include a display screen and a keyboard. The network interface 3004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 3005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 3005 may also be at least one storage device located remotely from the aforementioned processor 3001. Figure 9 As shown, the memory 3005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0176] exist Figure 9 In the computer device 3000 shown, the network interface 3004 is mainly used for network communication; the user interface 3003 is mainly used to provide an input interface for users; and the processor 3001 can be used to call the device control application stored in the memory 3005.
[0177] It should be understood that the computer device 3000 described in the embodiments of this application can execute the foregoing text. Figure 3 or Figure 4The description of the data processing method in the corresponding embodiment can also be performed as described above. Figure 7 The corresponding embodiment refers to the data processing device 1 or Figure 8 The description of the data processing device 2 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0178] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium storing a computer program executed by the aforementioned data processing device 1 or data processing device 2, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the aforementioned... Figure 3 or Figure 4 The description of the data processing method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network. These multiple computing devices distributed across multiple locations and interconnected via a communication network can constitute a blockchain system.
[0179] This application provides a computer program product or computer program, including a computer program / instructions, which, when executed by a processor, enable the computer device to perform the aforementioned... Figure 3 or Figure 4 The description of the data processing method in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.
[0180] For further details, please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application. The data processing system 3 may include a data processing device 1a and a data processing device 2a. The data processing device 1a may be the one described above. Figure 7 Regarding the data processing device 1 in the corresponding embodiment, it can be understood that the data processing device 1a can be integrated into the above-mentioned... Figure 2 The server 210F in the corresponding embodiment will not be described again here. The data processing device 2a can be the one described above. Figure 8 Regarding the data processing device 2 in the corresponding embodiment, it can be understood that the data processing device 2a can be integrated into the above-mentioned... Figure 2The server 220F in the corresponding embodiment will not be described again here. Furthermore, the beneficial effects of using the same method will also not be described again. For technical details not disclosed in the data processing system embodiments of this application, please refer to the description of the method embodiments of this application.
[0181] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0182] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0183] The methods and related apparatus provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowcharts and / or structural diagrams, as well as combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions are provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, create means for implementing the functions specified in one or more blocks of the flowcharts and / or one or more blocks of the structural diagrams. These computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more blocks of the flowcharts and / or one or more blocks of the structural diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the function specified in one or more processes in the flowchart and / or one or more blocks in the structural diagram.
[0184] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method, characterized in that, The method is executed by the business server and includes: Upon receiving an address request associated with an application client, an address pool space query request is sent to a bitmap server with bitmap service functionality. The address pool space query request instructs the bitmap server to determine the number of addresses to be allocated in the address pool. The address request is used to request N business request addresses, where N is a positive integer. The address pool is established by the bitmap server when it receives an address pool creation request forwarded by the business server. The bitmap server supports the bitmap service functionality based on a Redis database. Upon receiving the number of addresses to be allocated from the bitmap server, and detecting that the number of addresses to be allocated is greater than or equal to N, the bitmap server is invoked to allocate service request address X from the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i The i is a positive integer less than or equal to N; Based on the allocated bit address Y i Determine the service request address X i The corresponding business network address is returned to the application client for each business request address. Specifically, when the number of addresses to be allocated is greater than or equal to N, the bitmap server is invoked to allocate service request address X from the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i ,include: When the number of addresses to be allocated is detected to be greater than or equal to N, a temporary sequential node is created for each subroutine used to create the service request address, using the distributed lock indicated by the atomic operation, resulting in a set of sequential directories associated with the distributed lock; the N service request addresses include service request address X. i ; In the process of creating the business request address X i C subroutine i When the corresponding temporary sequential node is the smallest temporary sequential node in the sequential directory set, the distributed lock is used to control the subroutine C. i Perform locking processing, and then lock the subroutine C. i The generated address allocation request is sent to the bitmap server to invoke the bitmap server to allocate the service request address X. i Perform address allocation; After obtaining the service request address X returned by the bitmap server i The corresponding allocated bit address Y i When, remove the subroutine C from the set of sequential directories. i The corresponding temporary sequential node.
2. The method according to claim 1, characterized in that, The method further includes: Receive an address pool creation request sent by the application client; the address pool creation request carries an address block identifier including the network prefix, host number, and the number of bits occupied by the network prefix; The address pool creation request is forwarded to the bitmap server; the address pool creation request is used to instruct the bitmap server to create a bitmap corresponding to the address block identifier based on the bitmap service function, and to initialize the M allocated bit addresses in the bitmap, and to determine the initialized bitmap as the address pool; M is a positive integer determined based on the network prefix, the host number and the number of bits occupied by the network prefix.
3. The method according to claim 1, characterized in that, The allocation bit address Y i Determine the service request address X i The corresponding business network address is returned to the application client for each business request address, including: Obtain the address block identifier associated with the address pool, and based on the address block identifier, allocate the bit address Y. i Convert to an initial network address; the initial network address includes a first byte and a second byte; Obtain a first strategy for the first byte, and based on a first conversion coefficient associated with the first strategy, apply it to the allocated bit address Y. i Perform rounding and use the rounded value as the value corresponding to the first byte. Obtain a second strategy for the second byte, and based on a second conversion coefficient associated with the second strategy, apply it to the allocated bit address Y. i Perform a modulo operation and use the value after the modulo operation as the value corresponding to the second byte. Based on the values corresponding to the first byte and the second byte, the initial network address is updated to obtain the service request address X. i The corresponding business network address; The business network address corresponding to each business request address is returned to the application client.
4. The method according to claim 1, characterized in that, The business network address corresponding to each business request address is stored in a database associated with the application client; the database is used to store business fields associated with the target business network address when a business request is received; the business request is a request generated by the application client and associated with the target business network address in the database.
5. The method according to claim 1, characterized in that, The method further includes: Obtain the address return request associated with the application client; the address return request is used to return H service request addresses; H is a positive integer; Obtain the service request address X from the H service request addresses. j Based on the service request address X j The corresponding business network address is used to determine the business request address X. j The corresponding allocated bit address Z j The j is a positive integer less than or equal to the H; The allocated bit address Z j Send to the bitmap server so that the bitmap server allocates the bit address Z j The corresponding value is changed from the updated value to the initial value, and a return success notification message is generated when the H service request addresses are returned. The system receives a return success notification from the bitmap server and forwards the return success notification to the application client.
6. The method according to claim 5, characterized in that, The step of obtaining the service request address X from the H service request addresses. j Based on the service request address X j The corresponding business network address is used to determine the business request address X. j The corresponding allocated bit address Z j ,include: Obtain the service request address X from the H service request addresses. j Determine the service request address X j The corresponding business network address; the business request address X j The corresponding business network address includes the first byte and the second byte; Based on the conversion strategy for the allocated address, the product between the value corresponding to the first byte and the conversion coefficient is determined. The product is then summed with the value corresponding to the second byte, and the summed value is used as the service request address X. j The corresponding allocated bit address Z j .
7. A data processing method, characterized in that, The method is executed by a bitmap server and includes: The system obtains an address space query request sent by the business server to determine the number of addresses to be allocated in the address pool. The address space query request is generated by the business server when it receives an address request associated with an application client. The address request is used to request N business request addresses, where N is a positive integer. The address pool is established by the bitmap server when it receives an address pool creation request forwarded by the business server. The bitmap server supports bitmap service functionality based on a Redis database. The number of addresses to be allocated is returned to the service server; the number of addresses to be allocated is used to instruct the service server to generate an address allocation request when it detects that the number of addresses to be allocated is greater than or equal to N. Upon receiving the address allocation request sent by the service server, the service request address X from the N service request addresses is... i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i The i is a positive integer less than or equal to N; The allocated bit address Y i Return to the business server; the allocated bit address Y i Used to instruct the service server based on the allocated bit address Y i Determine the service request address X i The corresponding business network address, and return the business network address corresponding to each business request address to the application client; Among the N service request addresses, service request address X i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i ,include: Obtain the subroutine C after locking. i The subroutine C after the locking process i The business server detects subroutine C i When the corresponding temporary sequence node is the smallest temporary sequence node in the sequence directory set associated with the distributed lock, the subroutine C is controlled by the distributed lock. i The subroutine C obtained after performing locking processing; i For creating the service request address X i Subroutines; Subroutine C after the locking process i Obtain the target address to be allocated from the address pool, and change the value in the target address to be allocated from the initial value to the updated value; The target address to be allocated with the updated value is used as the service request address X. i The corresponding allocated bit address Y i .
8. The method according to claim 7, characterized in that, The step of obtaining the address space query request sent by the business server and determining the number of addresses to be allocated in the address pool includes: Obtain an address space query request sent by the business server, and determine an address pool associated with the business server based on the address space query request; the address pool includes M allocation bit addresses; M is a positive integer determined based on the address block identifier carried in the address pool creation request; Obtain the value of each of the M allocation bit addresses respectively, and take the allocation bit address with the updated value as the allocated address, and take the allocation bit address with the initial value as the address to be allocated; The number of allocated addresses is counted, and the difference between the number of allocated addresses and M is determined. The difference is used as the number of addresses to be allocated in the address pool.
9. A data processing apparatus, characterized in that, include: The sending module is used to send an address pool space query request to a bitmap server with bitmap service functionality when it receives an address request associated with an application client. The address pool space query request is used to instruct the bitmap server to determine the number of addresses to be allocated in the address pool. The address request is used to request N business request addresses, where N is a positive integer. The address pool is established by the bitmap server when it receives an address pool creation request forwarded by a business server. The bitmap server supports the bitmap service functionality based on a Redis database. The acquisition module is configured to receive the number of addresses to be allocated sent by the bitmap server, and when it detects that the number of addresses to be allocated is greater than or equal to N, it calls the bitmap server to select service request address X from the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i The i is a positive integer less than or equal to N; When the acquisition module detects that the number of addresses to be allocated is greater than or equal to N, it calls the bitmap server to select service request address X from the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i Specifically used for: When the number of addresses to be allocated is detected to be greater than or equal to N, a temporary sequential node is created for each subroutine used to create the business request address through the distributed lock indicated by the atomic operation, thereby obtaining a set of sequential directories associated with the distributed lock; the N business request addresses include business request address Xi; When the temporary sequential node corresponding to the subroutine Ci used to create the business request address Xi is the smallest temporary sequential node in the sequential directory set, the subroutine Ci is locked by the distributed lock, and the address allocation request generated by the locked subroutine Ci is sent to the bitmap server to call the bitmap server to allocate the address of the business request address Xi. When the allocated bit address Yi corresponding to the service request address Xi returned by the bitmap server is obtained, the temporary sequential node corresponding to the subroutine Ci is deleted from the sequential directory set; The determining module is used to determine the allocation bit address Y. i Determine the service request address X i The corresponding business network address is returned to the application client for each business request address.
10. A data processing apparatus, characterized in that, include: The determination module is used to obtain the address space query request sent by the business server and determine the number of addresses to be allocated in the address pool; The address space query request is generated by the business server when it receives an address request associated with the application client; the address request is used to request N business request addresses; N is a positive integer; the address pool is established by the bitmap server when it receives an address pool creation request forwarded by the business server; the bitmap server supports bitmap service functionality based on the Redis database. The return module is used to return the number of addresses to be allocated to the business server, so that the business server generates an address allocation request when it detects that the number of addresses to be allocated is greater than or equal to N; The allocation module is used to, upon receiving the address allocation request sent by the service server, allocate service request address X from among the N service request addresses. i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i The i is a positive integer less than or equal to N; The allocation module, in relation to service request address X among the N service request addresses, i Address allocation is performed to obtain the service request address X. i The corresponding allocated bit address Y i When, specifically used for: Obtain the subroutine C after locking. i The subroutine C after the locking process i The business server detects subroutine C i When the corresponding temporary sequence node is the smallest temporary sequence node in the sequence directory set associated with the distributed lock, the subroutine C is controlled by the distributed lock. i The subroutine C obtained after performing locking processing; i For creating the service request address X i Subroutines; Subroutine C after the locking process i Obtain the target address to be allocated from the address pool, and change the value in the target address to be allocated from the initial value to the updated value; The target address to be allocated with the updated value is used as the service request address X. i The corresponding allocated bit address Y i ; The return module is also used to allocate the bit address Y i Returning to the service server, so that the service server can allocate bit address Y i Determine the service request address X i The corresponding business network address is returned to the application client for each business request address.
11. A computer device, characterized in that, include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to cause the computer device to perform the method according to any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1 to 8.
13. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method of any one of claims 1 to 8.