CN116827940A - Data processing method, device, equipment and storage medium - Google Patents

Data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN116827940A
CN116827940A CN202210276606.2A CN202210276606A CN116827940A CN 116827940 A CN116827940 A CN 116827940A CN 202210276606 A CN202210276606 A CN 202210276606A CN 116827940 A CN116827940 A CN 116827940A
Authority
CN
China
Prior art keywords
address
service
server
request
allocated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210276606.2A
Other languages
Chinese (zh)
Inventor
刘国旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210276606.2A priority Critical patent/CN116827940A/en
Publication of CN116827940A publication Critical patent/CN116827940A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application discloses a data processing method, a device, equipment and a storage medium, which are suitable for the field of network scheduling in cloud technology and comprise the following steps: when an address application request associated with an application client is acquired, sending an address pool space query request to a bitmap server; the address application request is used for applying N service request addresses; receiving the number of addresses to be allocated returned by the bitmap server, and when the number of the addresses to be allocated is detected to be greater than or equal to N, calling the bitmap server to carry out service request address X in N service request addresses i Address allocation is carried out to obtain a corresponding allocation bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the Based on the allocated bit address Y i Determining a service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client. By adopting the embodiment of the application, the memory space occupied by the address can be reduced, and the utilization rate of the memory space can be improved。

Description

Data processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
In the distributed system, when an address pool of a category-free Inter-Domain Routing (CIDR) is created, a certain distributed node (for example, a service server) in the distributed system will store all the address pool into a database, so that the allocation situation of service application addresses can be recorded in the database. When the conventional address allocation method is used for realizing the address allocation operation, the address allocation is often realized by operating a database. However, when the number of the allocated bit addresses of the address pool is large, the address pool occupies a large storage space in the database by the address allocation mode, so that the utilization rate of the storage space is reduced.
Disclosure of Invention
The embodiment of the application provides a data processing method, a device, equipment and a storage medium, which can reduce the storage space occupied by an address and improve the utilization rate of the storage space.
An aspect of an embodiment of the present application provides a data processing method, where the method is executed by a service server, and includes:
when an address application request associated with an application client is acquired, sending an address pool space query request to a bitmap server with a bitmap service function; the address pool space inquiry request is used for indicating the bitmap server to determine the number of addresses to be allocated of the address pool; the address application request is used for applying N service request addresses; n is a positive integer; the address pool is established by the bitmap server when receiving an address pool creation request forwarded by the service server;
Receiving the number of addresses to be allocated sent by a bitmap server, and when detecting that the number of addresses to be allocated is greater than or equal to N, calling the bitmap server to request a service request address X in N service request addresses i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the i is a positive integer less than or equal to N;
based on the allocated bit address Y i Determining a service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client.
An aspect of an embodiment of the present application provides a data processing method, which is executed by a bitmap server, including:
acquiring an address space query request sent by a service server, and determining the number of addresses to be allocated in an address pool; the address space query request is generated when the service server acquires an address application request associated with the application client; the address application request is used for applying N service request addresses; n is a positive integer; the address pool is established by the bitmap server when receiving an address pool creation request forwarded by the service server;
returning the number of the addresses to be allocated to the service server; the number of the addresses to be allocated is used for indicating the service server to generate an address allocation request when the number of the addresses to be allocated is detected to be greater than or equal to N;
When receiving an address allocation request sent by a service server, a service request address X in N service request addresses is selected i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the i is a positive integer less than or equal to N;
will be assigned bit address Y i Returning to the service server; assigning bit address Y i For instructing the traffic server to be based on the allocated bit address Y i Determining a service request address X i And returning the service network address corresponding to each service request address to the application client.
An aspect of an embodiment of the present application provides a data processing apparatus, including:
the sending module is used for sending an address pool space query request to a bitmap server with a bitmap service function when an address application request associated with an application client is acquired; the address pool space inquiry request is used for indicating the bitmap server to determine the number of addresses to be allocated of the address pool; the address application request is used for applying N service request addresses; n is a positive integer; the address pool is established by the bitmap server when receiving an address pool creation request forwarded by the service server;
the acquisition module is used for receiving the number of the addresses to be allocated sent by the bitmap server, and calling the bitmap server to carry out service request address X in the N service request addresses when the number of the addresses to be allocated is detected to be greater than or equal to N i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the i is a positive integer less than or equal to N;
a determination module for assigning bit addresses Y based on i Determining a service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client.
An aspect of an embodiment of the present application provides a data processing apparatus, including:
the determining module is used for acquiring an address space query request sent by the service server and determining the number of addresses to be allocated in the address pool; the address space query request is generated when the service server acquires an address application request associated with the application client; the address application request is used for applying N service request addresses; n is a positive integer; the address pool is established by the bitmap server when receiving an address pool creation request forwarded by the service server;
the return module is used for returning the number of the addresses to be allocated to the service server; the number of the addresses to be allocated is used for indicating the service server to generate an address allocation request when the number of the addresses to be allocated is detected to be greater than or equal to N;
the distribution module is used for, when receiving the address distribution request sent by the service server, distributing the service request address X in the N service request addresses i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the i is a positive integer less than or equal to N;
a return module for distributing the bit address Y i Returning to the service server; assigning bit address Y i For instructing the traffic server to be based on the allocated bit address Y i Determining a service request address X i And returning the service network address corresponding to each service request address to the application client.
In one aspect, an embodiment of the present application provides a computer device, including: a processor and a memory;
the processor is connected to the memory, wherein the memory is configured to store a computer program, and when the computer program is executed by the processor, the computer device is caused to execute the method provided by the embodiment of the application.
In one aspect, the present 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 by the embodiment of the present application.
In one aspect, embodiments of the present application provide a computer program product, including a computer program/instruction, which when executed by a processor, causes the computer device to perform the method provided by the embodiments of the present application.
In the embodiment of the application, when the service server in the embodiment of the application obtains the address application request associated with the application client, the address allocation requirement of the distributed system is met by utilizing the address pool stored by the bitmap service function (namely, the bitmap service function provided by the third-party storage service) of the bitmap server through data interaction with the bitmap server. The mode of distributing the business network address by adopting the bitmap service function of the bitmap server can greatly reduce the memory space occupied by the address, thereby improving the utilization rate of the memory space.
Drawings
Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a scenario for data interaction according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a data processing method according to an embodiment of the present application;
fig. 5 is a schematic flow chart of address allocation based on a service scenario according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an address return flow according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a computer device according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a data processing system according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
The data processing method in the embodiment of the application can be applied to the field of network scheduling in cloud technology. Cloud technology (Cloud technology) refers to a hosting technology that unifies serial resources such as hardware, software, networks and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The cloud technology is based on the general names of network technology, information technology, integration technology, management platform technology, application technology and the like applied by the cloud computing business mode, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application. As shown in fig. 1, the network architecture may include a server 110F, a server 120F, and a cluster of terminal devices. The cluster of terminal devices may comprise one or more terminal devices, the number of which will not be limited here. As shown in fig. 1, specifically, the terminal device 100a, the terminal device 100b, the terminal devices 100c, …, and the terminal device 100n may be included. As shown in fig. 1, the terminal device 100a, the terminal device 100b, the terminal devices 100c, …, the terminal device 100n, and the server 120F may respectively perform network connection with the server 110F, so that each terminal device may perform data interaction with the server 110F through the network connection. The network connection is not limited to a connection manner, and may be directly or indirectly connected through a wired communication manner, may be directly or indirectly connected through a wireless communication manner, or may be other manners, which is not limited herein.
Wherein each terminal device in the terminal device cluster may include: smart terminals with data processing functions such as smart phones, tablet computers, notebook computers, desktop computers, smart speakers, smart watches, vehicle-mounted terminals, smart televisions and the like. It should be understood that each terminal device in the terminal device cluster shown in fig. 1 may be provided with a target application (i.e., an application client), and when the application client runs in each terminal device, the application client may interact with the server 110F shown in fig. 1, as described above, respectively. The application client may be an independent client, or may be an embedded sub-client integrated in a client (for example, a social client, an educational client, and a multimedia client), which is not limited herein.
As shown in fig. 1, the server 110F in the embodiment of the present application may be a service server corresponding to the application client, and the server 120F may be a bitmap server with a bitmap service function. The bitmap server (for example, remote Dictionary Server, abbreviated as Redis) in the embodiment of the present application may provide a remote dictionary service, which is a database (also called KV database) for storing data with key value pairs.
The server 110F and the server 120F may be independent physical servers, may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud computing services. It will be appreciated that the distributed address allocation service provided by the server 110F shown in fig. 1 requires operations such as storing, querying, applying for, returning, etc. a non-class inter-domain routing address pool (e.g., CIDR address pool) depending on the bitmap service provided by the server 120F. The CIDR is a method for assigning internet protocol addresses (Internet Protocol Address, IP addresses for short) to users and categorizing IP addresses for efficient routing of IP packets over the internet.
It should be appreciated that the server 110F shown in fig. 1 may be configured to receive a service address request associated with an application client, and may in turn satisfy the address allocation requirements as well as the address return requirements of the distributed system by invoking the bitmap service functions of the server 120F. The service address request here may include an address application request for applying N service request addresses, and an address return request for returning H service request addresses, where N and H may be positive integers.
For easy understanding, the embodiment of the present application may select one terminal device from the plurality of terminal devices shown in fig. 1 as the target terminal device. For example, the embodiment of the present application may use the terminal device 100a shown in fig. 1 as a target terminal device, and the target terminal device may have a target application (i.e., an application client) integrated therein. At this time, the target terminal device may implement data interaction between the service data platform corresponding to the application client and the server 110F.
When receiving an address application request associated with an application client sent by a target terminal device, the server 110F may send an address pool space query request to the server 120F with a bitmap service function based on the address application request, so as to detect whether the number of addresses to be allocated of the address pool created by the server 120F can allocate N service request addresses. Here, the address pool (e.g., CIDR address pool) is established by the server 120F based on the bitmap service function of the server 120F upon receiving the address pool creation request of the server 110F. Further, the server 110F may receive the number of addresses to be allocated returned by the server 120F. If the server 110F detects that the number of addresses to be allocated is greater than or equal to N, this means that the allocation space of the address pool in the server 120F is sufficient. At this time, the server 110F may invoke the server 120F to perform address allocation on each service request address in the N service request addresses, so as to obtain an allocation bit address corresponding to each service request address, and further determine a service network address corresponding to each service request address based on the allocation bit address corresponding to each service request address, and return the service network address corresponding to each service request address to the target terminal device where the application client is located.
It can be seen that, when the server 110F in the embodiment of the present application obtains the address application request associated with the application client, the address allocation requirement of the distributed system is satisfied by using the address pool stored by the bitmap service function (i.e., the bitmap service function provided by the third-party storage service) of the server 120F through the data interaction with the server 120F. The mode of distributing the business network address by adopting the bitmap service function of the bitmap server can greatly reduce the memory space occupied by the address, thereby improving the utilization rate of the memory space.
For ease of understanding, further, please refer to fig. 2, fig. 2 is a schematic diagram of a scenario for data interaction according to an embodiment of the present application. As shown in fig. 2, the terminal device 200A in the embodiment of the present application may be a computer device running an application client, and the terminal device 200A may be any one of the terminal device clusters shown in fig. 1, for example, the terminal device 100A. The server 210F in the embodiment of the present application may be a service server corresponding to the application client, and the server 210F may be the server 110F shown in fig. 1. The server 220F in the embodiment of the present application may be a bitmap server having a bitmap service function, and the server 220F may be the server 120F shown in fig. 1.
As shown in fig. 2, upon receiving an address pool creation request forwarded by the server 210F, the server 220F may create an address pool stored in a Bitmap (Bitmap) data structure through a Bitmap service function of the server 220F. Where the address pool may include M allocated bit addresses (i.e., bits), where M may be a positive integer. For convenience of explanation, the number M of allocated bit addresses of the address pool (e.g., the address pool 21D shown in fig. 2) in the embodiment of the present application may be exemplified by 10, and specifically may include allocated bit address 0, allocated bit addresses 1 and …, and allocated bit address 9. Wherein the values corresponding to the allocated bit address 0, the allocated bit address 1, the allocated bit address 3, the allocated bit address 4, the allocated address 5, the allocated bit address 6, the allocated bit address 7, and the allocated bit address 9 in the address pool 21D are all set to initial values (e.g., 0); and the assigned bit address 2 and the assigned bit address 8 in the address pool 21D are each set to an updated value (e.g., 1). Wherein an allocated bit address having an initial value may be used to characterize that the allocated bit address is temporarily storing data; an allocated bit address with an updated value may be used to characterize the stored data of the allocated bit address.
It should be understood that, the terminal device 200A shown in fig. 2 may generate, by an application client, a service request for applying N service request addresses, where N may be a positive integer, in this case, a service request for applying N service request addresses may be referred to as an address application request in the embodiment of the present application. For convenience of explanation, the number N of service request addresses applied by the embodiment of the present application may take 3 as an example, and may specifically include the service request address X 1 Service request address X 2 Service request address X 3 . Further, the terminal device 200A may perform S21 to send the address application request to the server 210F, so that the server 210F performs S22 to send an address pool space query request to the server 220F. Where the address pool space query request herein may be used to query whether the allocation space of the address pool of server 220F is sufficient.
At this time, the server 220F may count the number of addresses to be allocated (e.g., 8) of the address pool 21D. Here, the number of addresses to be allocated refers to the number of allocated bit addresses (i.e., addresses to be allocated) having an initial value. Further, the server 220F may execute S23 to return the number of addresses of the bits to be allocated to the server 210F, so that the server 210F detects a relationship between the number of addresses to be allocated and the number N of service application addresses applied in the service application request.
It may be appreciated that when the server 210F detects that the number of addresses to be allocated is greater than or equal to 3, S24 may be executed to send an address allocation request to the server 220F, so that the server 220F loops 3 times to perform address allocation on each service request address in the 3 service request addresses, and S25 may be executed to return the allocation bit address corresponding to each service request address to the server 210F.
In order to increase the response speed of the server 210F, the server 220F does not need to spend time waiting for the determination of the allocated bit addresses corresponding to all the service request addresses to be completed, but may directly return the allocated bit address corresponding to the currently determined service request address, so that the server 210F can quickly return the service network address corresponding to the currently determined service request address to the application client.
The address pool 22D shown in fig. 2 may be an address pool after the address allocation of the 3 service application addresses. For example, for service request address X 1 In other words, the server 220F obtains a certain address to be allocated (for example, allocation bit address 0) from the address pool 21D as the service request address X 1 Corresponding allocated bit address Y 1 Further, the allocated bit address Y can be directly allocated 1 Returns to server 210F so that server 210F can determine service request address X 1 A corresponding service network address (e.g., service network address 1). Similarly, address X is requested for service 2 In other words, the server 220F may obtain another address to be allocated (e.g., allocation bit address 6) from the address pool 21D as the service request address X 2 Corresponding allocated bit address Y 2 Further, the bit address Y can be allocated 2 Returning to server 210F; for service request address X 3 In other words, the server 220F may also obtain another address to be allocated (for example, the allocation bit address 2) from the address pool 21D as the service request address X 3 Corresponding allocated bit address Y 3 And then can distribute the address Y 3 Returns to server 210F so that server 210F can determine service request address X 3 A corresponding service network address (e.g., service network address 3).
Optionally, according to the actual service requirement, when the server 220F obtains the allocated bit address corresponding to each service request address in the 3 service request addresses, the 3 allocated bit addresses may also be directly sent to the server 210F in one batch, so that the server 210F determines the service network address corresponding to each service application address respectively based on the obtained 3 allocated bit addresses. At this time, the server 210F may perform S27 to return the 3 service network addresses to the terminal device 200A running the application client together.
It can be seen that, when the server 210F in the embodiment of the present application obtains the address application request associated with the application client, the address allocation requirement of the distributed system is met by data interaction with the server 220F and using the address pool stored by the bitmap service function (i.e. the bitmap service function provided by the third party storage service) of the server 220F. The mode of distributing the business network address by adopting the bitmap service function of the bitmap server can greatly reduce the memory space occupied by the address, thereby improving the utilization rate of the memory space.
By using 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), the specific implementation manner of respectively performing address allocation on the N service application addresses may refer to the embodiments corresponding to fig. 3 to fig. 6 below.
Further, referring to fig. 3, fig. 3 is a flow chart of a data processing method according to an embodiment of the application. As shown in fig. 3, the method may be performed by a computer device having an address allocation service function, where the computer device may be any one of the terminal devices in the terminal device cluster shown in fig. 1, for example, the terminal device 100b, or may be a service server corresponding to the application client, and the service server may be the server 110F shown in fig. 1, which is not limited herein. It is convenient to understand that, in the embodiment of the present application, the method is performed by the service server as an example, the method may at least include the following S101-S103:
S101, when an address application request associated with an application client is acquired, an address pool space query request is sent to a bitmap server with a bitmap service function.
For example, when the terminal device running the application client needs to apply for N service request addresses, an address application request associated with the application client may be generated, and then the address application request may be sent to a service server corresponding to the application client. Where N may be a positive integer. At this time, the service server may send an address pool space query request to a bitmap server having a network connection relationship with the service server, so that the bitmap server invokes a bitmap service function to determine the number of addresses to be allocated of the address pool. Wherein the address pool is established by the bitmap server when receiving the address pool creation request forwarded by the service server.
It will be appreciated that upon obtaining an address application request associated with an application client, the service server may determine the request type of the address application request to determine whether the address application request is the first request that the service server receives after creating an address pool through the bitmap server. If the request type of the address application request (for example, the address application request 1) is the first request type (for example, the first request type), the service server does not need to send an address pool space query request for querying the allocation space of the address pool to the bitmap server, and can directly confirm that the allocation space of the address pool in the bitmap server is sufficient.
Optionally, if the request type of the address application request (e.g., address application request 2) is a second request type (e.g., a non-first request type), which means that the bitmap server has already allocated a part of the allocated bit addresses in the address pool, in order to ensure that the address pool of the bitmap server has sufficient allocation space to support address allocation of each service request address in the address application request 2, the service server needs to send an address pool space query request to the bitmap server having a bitmap service function, where 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.
It should be understood that, as a KV-type database, the bitmap server (e.g., dis) in the embodiment of the present application is based on a memory operation, has a simple data structure and adopts a single-threaded operation, has high read-write efficiency, and can support various data types, and specifically may include a data type 1 (e.g., string type String), a data type 2 (e.g., hash type Hash), a data type 3 (e.g., list type List), a data type 4 (e.g., set type Set), and a data type 5 (e.g., ordered Set type SortedSet). Most importantly, the bitmap server is very suitable for realizing the address allocation of the distributed system because the bitmap server naturally supports bitmap operation.
Further, referring to table 1, table 1 is a bitmap operation supported by a bitmap server according to an embodiment of the present application. As shown in table 1:
TABLE 1
Description of the operation
First operation Counting the number of allocated bit addresses with updated values in the bitmap
Second operation Returning the first value to a value of the assigned bit address
Third operation Setting a value (e.g., an initial value or an updated value) of the allocated bit address
Fourth operation Obtaining a value of an allocated bit address
The bitmap server may support a first operation, a second operation, a third operation, and a fourth operation, as shown in table 1. Wherein. The first operation herein (e.g., BITCOUNT) may be the number of allocated bit addresses in the bitmap for which the statistics are updated values, e.g., BITCOUNT IP; the second operation herein (e.g., BITPOS) may be to return the first assigned bit address of a certain value, e.g., BITPOS IP 1; the third operation herein (e.g., setmit) may be to set a value (e.g., an initial value or an updated value) of the allocated bit address, e.g., setmit IP 2 1; the fourth operation herein (e.g., get it) may allocate a value of a bit address for the fetch, e.g., get it IP 2. For the IP address pool to be allocated, a Redis key can be used for storage, and the operation of a bitmap is used for allocating and recycling the service application addresses.
It should be understood that, when the bitmap server receives the address pool space query request sent by the service server, it needs to determine an address pool associated with the service server, so that the numerical value of each allocated bit address in the M allocated bit addresses can be obtained from the address pool, the allocated bit address with the updated value is taken as an allocated address, and the allocated bit address with the initial value is taken as an address to be allocated. Further, the bitmap server may count the number of addresses of the allocated addresses, and further may determine a difference between the number of addresses of the allocated addresses and M, and use the difference as the number of addresses to be allocated in the address pool.
As shown in fig. 2, server 220F (i.e., the bitmap server) may obtain an address pool (e.g., address pool 21D shown in fig. 2) associated with server 210F upon obtaining an address pool space query request sent by server 210F (i.e., the traffic server). Further, the server 220F may determine the value of each of the 10 allocated bit addresses through the fourth operation shown in table 1 above. For example, the address pool 21D may include 10 allocated bit addresses, and specifically may include allocated bit address 0, allocated bit addresses 1, …, and allocated bit address 9. The server 220F may determine the value of the allocated bit address 0 (i.e., initial value, for example, 0), the value of the allocated bit address 1 (i.e., initial value), the value of the allocated bit address 2 (i.e., updated value, for example, 1), the value of the allocated bit address 3 (i.e., initial value), the value of the allocated bit address 4 (i.e., initial value), the value of the allocated address 5 (i.e., initial value), the value of the allocated bit address 6 (i.e., initial value), the value of the allocated bit address 7 (i.e., initial value), the value of the allocated bit address 8 (i.e., updated value), and the value of the allocated bit address 9 (i.e., initial value), respectively, from the address pool 21D. At this time, the server 220F may have the allocated bit address having the updated value as the allocated address (e.g., allocated bit address 2 and allocated bit address 8), and the allocated bit address having the initial value as the address to be allocated (e.g., allocated bit address 0, allocated bit address 1, allocated bit address 3, allocated bit address 4, allocated address 5, allocated bit address 6, allocated bit address 7, and allocated bit address 9).
Further, the server 220F may count the number of addresses (e.g. 2) of the allocated addresses through the first operation shown in the above table 1, and further determine a difference between the number of addresses of the allocated addresses and the total number M (e.g. 10) of the allocated bit addresses in the address pool, and take the difference (e.g. 8) as the number of addresses to be allocated in the address pool.
Alternatively, if the address pool 21D has been allocated with multiple batches of addresses, that is, the number of addresses to be allocated in the address pool is smaller, then the server 220F in the embodiment of the present application does not need to determine the number of addresses to be allocated indirectly by determining the difference between the number of addresses of the allocated addresses and the total number of addresses in the address pool, but may directly count the number of addresses to be allocated according to the fifth operation when supporting the fifth operation (for example, the number of allocated bit addresses with the direct statistics value being the initial value), so as to improve the statistical efficiency of the number of addresses.
S102, receiving the number of addresses to be allocated sent by the bitmap server, and detectingWhen the number of the addresses to be allocated is greater than or equal to N, the bitmap server is called to make the service request address X in the N service request addresses i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i
For example, the service server may receive the number of addresses to be allocated sent by the bitmap server, and further when detecting that the number of addresses to be allocated is greater than or equal to N, the service server may determine that the address pool meets an address allocation condition, where the service server may perform an atomic operation on a program associated with N service request addresses, to generate an address allocation request. Wherein so-called atomic operations are inseparable, i.e. not interrupted by any other tasks or events before execution is completed. Further, the service server may send an address allocation request to the bitmap server to invoke the bitmap server to service request address X of the N service request addresses i Address allocation is performed so that the service request address X can be obtained i Corresponding allocated bit address Y i
The address allocation request here may be obtained after the service server directly performs an atomic operation on the programs corresponding to the N service request addresses, that is, the bitmap server will not be interrupted by any other task or event before completing the address allocation process of the N service request addresses, which means that the bitmap server can effectively solve the problem of secure access to the address pool for the programs corresponding to the N service request addresses in the same batch, thereby effectively ensuring the efficiency and accuracy of address allocation in the same batch. Optionally, the address allocation request may also be obtained after the service server performs an atomic operation based on the subroutine corresponding to each service request address, that is, the bitmap server will not be interrupted by any other task or event before completing the address allocation process of a certain service request address, which means that the bitmap server allocates another service request address after completing the address allocation of the current service request address, that is, the bitmap server will not have two or more different service request addresses, and contend for a certain address to be allocated in the address pool, so that the problem of safe access to the address pool by the subroutine corresponding to one service request address can be effectively solved, and the accuracy of address allocation of each service request address can be effectively ensured. Among other things, embodiments of the present application may employ a scripting language (e.g., lua script) or a distributed lock (e.g., zooKeeper, etc.) to implement atomic operations.
For easy understanding, the embodiment of the application takes a distributed lock as an example, and is used for explaining a specific implementation mode of realizing the atomicity guarantee by the service server. The service server can detect the size relation between the number of the addresses to be allocated and the total number N of the service request addresses applied by the service application request when receiving the number of the addresses to be allocated sent by the bitmap server, so as to determine whether the number of the addresses to be allocated in the address pool meets the address allocation condition.
Further, when the service server detects that the number of the addresses to be allocated is greater than or equal to N, it may be determined that the number of the addresses to be allocated meets an address allocation condition, and at this time, the service server may create temporary sequence nodes for each sub-program for creating a service request address through the distributed lock indicated by the atomic operation, so as to obtain a sequence directory set associated with the distributed lock. Wherein the N service request addresses may include a service request address X i . At the address X for creating the service request i Subroutine C of (2) i When the corresponding temporary sequence node is the smallest temporary sequence node in the sequence directory set, the service server can perform the sub-program C through the distributed lock i Locking processing is carried out, and then the subroutine C after locking processing can be carried out i To the bitmap server to make the bitmap server request the service request address X i Address allocation is performed. Wherein, the bitmap server can pass through the subroutine C after locking processing i The target address to be allocated is obtained from the address pool, the numerical 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 taken as the service request address X i Corresponding distribution bitAddress Y i . Further, the service server acquires the service request address X returned by the bitmap server i Corresponding allocated bit address Y i Subroutine C may be deleted from the sequential directory collection i Corresponding temporary sequence nodes.
As shown in fig. 2, the address application request of fig. 2 may be used to apply for 3 service request addresses, and may specifically include a service request address X 1 Service request address X 2 Service request address X 3 . When the server 210F detects that the number of addresses to be allocated in the address pool 21D is greater than or equal to 3, the server 210F may sequentially increment the order in the order of creation by the distributed lock indicated by the atomic operation, thereby respectively requesting the addresses X for the service 1 Corresponding subroutine C 1 Creating a temporary sequence node (e.g., temporary sequence node 001) for service request address X 2 Corresponding subroutine C 2 Creating a temporary sequence node (e.g., temporary sequence node 002) for service request address X 3 Corresponding subroutine C 3 A temporary sequence node (e.g., temporary sequence node 003) is created.
It will be appreciated that each subroutine C i Before attempting to occupy the distributed lock, firstly judging whether the own temporary sequence node belongs to the current minimum temporary sequence node, if so, then the subroutine C i A lock may be acquired, otherwise, the subroutine C i In a state waiting for notification, i.e. the subroutine C i The subroutine C corresponding to the previous temporary sequence node of the temporary sequence node can be monitored i-1 Whether or not to release the distributed lock, in subroutine C i-1 When the own temporary sequence node is deleted from the sequence directory set, this means that subroutine C i A distributed lock may be acquired.
For example, the set of order directories (e.g., the first set of order directories) associated with the distributed phase lock obtained by server 210F at the first time may include temporary order node 001, temporary order node 002, and temporary order node 003. It will be appreciated that the server 210F is executing the determination subroutine C 1 Corresponding temporary sequenceWhen the node is the smallest temporary sequence node in the current sequence directory set, then the server 210F may determine subroutine C 1 Having the ability to acquire a distributed lock, and thereby may be used for sub-program C by the distributed lock 1 Locking processing is carried out, and based on subroutine C after locking processing 1 An address assignment request is generated for transmission to server 220F. At this time, subroutine C 2 In wait for notification state to subroutine C 1 Monitoring whether or not to release the distributed lock, i.e. monitoring subroutine C 1 The own temporary sequence node 001 is deleted from the sequence directory set. Similarly, subroutine C 3 Also in wait for notification state to subroutine C 2 Monitoring whether or not to release the distributed lock, i.e. monitoring subroutine C 2 The own temporary sequence node 002 is deleted from the sequence directory set. Further, server 220F obtains subroutine C after the locking process 1 In this case, a target address to be allocated (e.g., allocated bit address 0) may be obtained from the address pool 21D, and the value of the allocated bit address 0 is changed from the initial value to the updated value by the third operation shown in table 1, and the allocated bit address 0 having the updated value (i.e., allocated bit address 0 in the address pool 22D) is used as the service request address X 1 Corresponding allocated bit address Y 1 . The server 220F may then assign the bit address Y 1 Returning to server 210F to cause server 210F to delete subroutine C in the first sequential directory set 1 The corresponding temporary sequence node 001 releases the distributed lock.
Wherein, the embodiment of the present application may determine the moment when the server 210F deletes the temporary sequence node 001 as the second moment, and the sequence directory set of the second moment (i.e., the second sequence directory set) may include the temporary sequence node 002 and the temporary sequence node 003, which means that the subroutine C 2 The corresponding temporary sequence node is the smallest temporary sequence node in the current sequence directory set. At this time, the server 210F may determine the subroutine C 2 Having the ability to acquire a distributed lock, and thereby may be used for sub-program C by the distributed lock 2 Locking processing is carried out, and based on subroutine C after locking processing 2 An address assignment request is generated for transmission to server 220F. At this time, subroutine C 3 Remain in waiting for notification to subroutine C 2 Whether the distributed lock is released is monitored. Further, server 220F obtains subroutine C after the locking process 2 At this time, another target address to be allocated (for example, allocated bit address 6) may be obtained from the address pool 21D, and the value of the allocated bit address 6 is changed from the initial value to the updated value by the third operation shown in table 1, and the allocated bit address 6 having the updated value (i.e., the allocated bit address 6 in the address pool 22D) is used as the service request address X 2 Corresponding allocated bit address Y 2 . The server 220F may then assign the bit address Y 2 Returning to server 210F to cause server 210F to delete subroutine C in the second sequential directory set 2 The corresponding temporary sequence node 002, i.e. releases the distributed lock.
Similarly, the embodiment of the present application may determine the moment when the server 210F deletes the temporary sequence node 002 as the third moment, and the sequence directory set of the third moment (i.e., the third sequence directory set) may include the temporary sequence node 003, which means that the subroutine C 3 The corresponding temporary sequence node is the smallest temporary sequence node in the current sequence directory set. At this time, the server 210F may determine the subroutine C 3 Having the ability to acquire a distributed lock, and thereby may be used for sub-program C by the distributed lock 3 Locking processing is carried out, and based on subroutine C after locking processing 3 An address assignment request is generated for transmission to server 220F. Further, server 220F obtains subroutine C after the locking process 3 At this time, another target address to be allocated (for example, allocation bit address 2) may be obtained from the address pool 21D, and the value of the allocation bit address 2 is changed from the initial value to the updated value by the third operation shown in table 1, and the allocation bit address 2 having the updated value (i.e., allocation bit address 2 in the address pool 22D) is used as the service request address X 3 Corresponding allocated bit address Y 3 . The server 220F may then assign the bit address Y 3 Returns to the server 210F to enable the server 210F to be in the process ofDeleting subroutine C in the third sequential directory set 3 The corresponding temporary sequence node 003, i.e., releases the distributed lock.
S103, based on the allocated bit address Y i Determining a service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client.
Illustratively, the service server may obtain an address block identification associated with the address pool, and may assign the bit address Y based on the address block identification i To an initial network address. Wherein the initial network address herein may comprise a first byte and a second byte. Further, the traffic server may obtain a first policy for the first byte, and may allocate the bit address Y based on a first conversion coefficient associated with the first policy i And performing rounding processing, and taking the rounded value as the value corresponding to the first byte. At the same time, the service server may also obtain a second policy for the second byte, and may allocate the address Y based on a second conversion coefficient associated with the second policy i And performing remainder taking processing, and taking the numerical value after the remainder taking processing as the numerical value corresponding to the second byte. Further, the service server may 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 And returning the service network address corresponding to each service request address to the application client.
For example, the first policy obtained by the service server for the first byte (i.e., C) in the initial network address (e.g., a.b.c.d) may be referred to as the following formula (1):
C=Y i /K (1)
wherein Y is here i Can be used to represent the service request address X received by the service server i The corresponding allocated bit address, where K may represent a first conversion coefficient (e.g., 256) for rounding the allocated bit address.
For example, the second policy obtained by the service server for the second byte (i.e., D) in the initial network address (e.g., a.b.c.d) may be referred to as the following formula (2):
D=Y i %K (2)
wherein Y is here i Can be used to represent the service request address X received by the service server i The corresponding allocated bit address, where K may represent a second conversion coefficient (e.g., 256) for performing a remainder process on the allocated bit address.
For example, if the address block identifier associated with the address pool acquired by the service server is 192.168.0.0/16, the total size of the address pool is 16 times 2, which means that the total number M of allocated bit addresses in the address pool may be 65536, that is, the address pool needs a bitmap with a length of 65536 to be stored. Then the service server, upon receiving the assigned bit address Y i (e.g., 12345), bit address Y may be assigned based on address block identification i Converted to an initial network address (e.g., 192.168. C.d). Further, the traffic server may allocate the bit address Y based on the above formula (1) and a first conversion coefficient (e.g., 256) associated with the first policy i The rounding process is performed, and the rounded value is taken as the value (e.g., 48) corresponding to the first byte. Meanwhile, the service server may also allocate the address Y based on the above formula (2) and a second conversion coefficient (e.g., 256) associated with a second policy i The remainder processing is performed, and the value after the remainder processing is used as a value (for example, 57) corresponding to the second byte. At this time, the service server may 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 A corresponding service network address (e.g., 192.168.48.57).
In the embodiment of the application, when the service server in the embodiment of the application obtains the address application request associated with the application client, the address allocation requirement of the distributed system is met by utilizing the address pool stored by the bitmap service function (namely, the bitmap service function provided by the third-party storage service) of the bitmap server through data interaction with the bitmap server. The mode of distributing the business network address by adopting the bitmap service function of the bitmap server can greatly reduce the memory space occupied by the address, thereby improving the utilization rate of the memory space.
Further, referring to fig. 4, fig. 4 is a flow chart of a data processing method according to an embodiment of the application. As shown in fig. 4, the method may be interactively performed by a computer device (e.g., a target terminal device) running an application client, a service server having an address allocation service function, and a bitmap server having a bitmap service function, where the target terminal device may be any one of the terminal device clusters shown in fig. 1, e.g., the terminal device 100a. The service server may be the server 110F shown in fig. 1 and the bitmap server may be the server 120F shown in fig. 1. The method may include at least the following S201-S209:
S201, the application client sends an address pool creation request to the service server.
Specifically, when generating an address pool creation request for creating a new IP address pool, the application client may send the address pool creation request to the service server. The address pool creation request herein may carry an address block identifier (e.g., an IP address) including a network prefix, a host number, and a number of digits occupied by the network prefix, and may be specifically expressed as { < network prefix >, < host number > }/number of digits occupied by the network prefix.
S202, the service server forwards the address pool creation request to the bitmap server having the bitmap service function, so that the bitmap server creates the address pool based on the bitmap service function.
For example, the service server may forward the address pool creation request to the bitmap server, so that the bitmap server creates a bitmap corresponding to the address block identifier based on the bitmap service function, initializes M allocated bit addresses in the bitmap, and determines the initialized bitmap as the address pool.
Wherein, the expression method of CIDR address block and the expression method of IPv4 address are similarIs a combination of the above: the point consisting of four parts divides the decimal address, followed by a diagonal, and finally a number ranging between 0 and 32: A.B.C.D/N. The point decimal portion of the address block is a 32-bit binary number divided into four octets. The number following the diagonal is the prefix length, i.e. the number of bits shared by the addresses in the address block from left to right. For example, if the address block identifier carried by the address pool creation request is x.x.x.x/20, this means that there are 32 bits in the address block identifier of the binary identifier, where the first 20 bits are the network prefix (also called network number), and the last 12 bits are the host number. Further, the bitmap server may determine the number of addresses m=2 of the allocated bit addresses contained in the address block 12 =4096. At this time, the bitmap server may create a bitmap having 4096 allocated bit addresses based on the bitmap service function, and may initialize M allocated bit addresses in the bitmap, that is, set values in the M allocated bit addresses to initial values (for example, 0), thereby determining the initialized bitmap as an address pool.
The core idea of a bitmap is to record two states (e.g., an idle state and a stored state) with an array of bits. The idle state herein means that the value of the allocated bit address (i.e., bit address) is an initial value (e.g., 0), which means that the allocated bit address temporarily stores no data, and the stored state means that the value of the allocated bit address is an updated value (e.g., 1), which means that the allocated bit address has stored data. It can be appreciated that the algorithm using the bitmap is suitable for application scenarios such as a large number of data queries, deduplication, and the like, and the algorithm can improve the utilization rate of the storage space.
S203, the application client sends an address application request to the service server.
For example, when the target terminal device running the application client needs to apply for N service request addresses, an address application request associated with the application client may be generated, and then the address application request may be sent to a service server corresponding to the application client. Where N may be a positive integer.
S204, the service server sends an address pool space query request to the bitmap server.
For example, when receiving an address application request of an application client, the service server may send an address pool space query request to a bitmap server having a network connection relationship with the service server, so that the bitmap server invokes a bitmap service function to determine the number of addresses to be allocated in the address pool. Wherein the address pool is established by the bitmap server when receiving the address pool creation request forwarded by the service server.
S205, the bitmap server returns the number of addresses to be allocated to the service server.
S206, the service server sends the generated address allocation request to the bitmap server when detecting that the number of the addresses to be allocated is greater than or equal to N.
For example, when the service server detects that the number of addresses to be allocated is greater than or equal to N, it may determine that the number of addresses to be allocated satisfies the address allocation condition, where the service server may create temporary sequence nodes for each subroutine for creating a service request address through the distributed lock indicated by the atomic operation, and may further obtain a sequence directory set associated with the distributed lock. Wherein the N service request addresses may include a service request address X i . At the address X for creating the service request i Subroutine C of (2) i When the corresponding temporary sequence node is the smallest temporary sequence node in the sequence directory set, the service server can perform the sub-program C through the distributed lock i The locking processing is carried out, and then the subroutine C after the locking processing can be based i An address allocation request is generated and sent to the bitmap server.
S207, the bitmap server requests the service request address X of the N service request addresses i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i
Wherein, the bitmap server can acquire the subroutine C after locking when receiving the address allocation request i And can further pass through the addition ofSubroutine C after lock processing i The target address to be allocated is obtained from the address pool, the numerical 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 taken as the service request address X i Corresponding allocated bit address Y i
S208, the bitmap server allocates a bit address Y i Returning to the service server to make the service server based on the distributed bit address Y i Determining a service request address X i A corresponding service network address.
Illustratively, the bitmap server may return to the service server a service request address X i Corresponding allocated bit address Y i So that the service server can delete the subroutine C from the sequence directory set i Corresponding temporary sequence nodes. Further, the service server may obtain an address block identifier associated with the address pool, and may allocate the bit address Y based on the address block identifier i To an initial network address. Wherein the initial network address herein may comprise a first byte and a second byte. Further, the traffic server may obtain a first policy for the first byte, and may allocate the bit address Y based on a first conversion coefficient associated with the first policy i And performing rounding processing, and taking the rounded value as the value corresponding to the first byte. At the same time, the service server may also obtain a second policy for the second byte, and may allocate the address Y based on a second conversion coefficient associated with the second policy i And performing remainder taking processing, and taking the numerical value after the remainder taking processing as the numerical value corresponding to the second byte. Further, the service server may 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 A corresponding service network address.
S209, the service server returns the service network address corresponding to each service request address to the application client.
For example, the service server may perform S207-S208 in a loop to obtain a service network address corresponding to each service request address in the N service request addresses, and may return the service network address corresponding to each service request address to the application client.
The specific implementation of S203-S209 may be referred to the description of S101-S103 in the embodiment corresponding to fig. 3, and will not be repeated here.
Wherein, the service network address corresponding to each service request address can be used for storing a database with an association relation with the application client, and the database can be used for storing a service field associated with the target service network address when the service request is acquired. Wherein the service request is a request generated by the application client associated with a target service network address in the database.
Further, referring to fig. 5, fig. 5 is a schematic flow chart of address allocation based on a service scenario according to an embodiment of the present application. As shown in fig. 5, the method may be interactively performed by a database associated with an application client, a computer device (e.g., a target terminal device) running the application client, a service server having an address allocation service function, and a bitmap server having a bitmap service function, where the target terminal device may be any one of the terminal device clusters shown in fig. 1, e.g., the terminal device 100a. The service server may be the server 110F shown in fig. 1 and the bitmap server may be the server 120F shown in fig. 1. The database here may be a computer device provided with a storage service, and the computer device may be a server or a terminal device, which is not limited herein.
As shown in fig. 5, when generating an address pool creation request for creating a new IP address pool, the target terminal device running the application client may perform S501, send the address pool creation request to the service server, so that the service server may perform S502, and forward the address pool creation request to the bitmap server having a bitmap service function. Further, when the bitmap server obtains the address pool creation request, the bitmap server may call a bitmap service function, and create a corresponding address pool based on the address block identifier in the address pool creation request.
It should be understood that, when the target terminal device running the application client needs to apply for N service request addresses, an address application request associated with the application client may be generated, and S503 may be further executed, and the address application request may be sent to the service server corresponding to the application client. Where N may be a positive integer. Further, the service server may perform S504, send an address pool space query request to the bitmap server, so that the bitmap server determines the number of addresses to be allocated for the address pool.
At this time, the bitmap server may perform S505 to return the number of addresses to be allocated to the service server. When detecting that the number of addresses to be allocated is greater than or equal to N, the service server may execute S506, and send the generated address allocation request to the bitmap server. Further, the bitmap server may execute S507 for the service request address X of the N service request addresses when receiving the address allocation request i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i Further, S508 may be performed to assign the bit address Y i Returning to the service server to make the service server based on the distributed bit address Y i Determining a service request address X i A corresponding service network address. And so on, the bitmap server may perform S507-S508 in a loop to obtain a service network address corresponding to each service request address.
Further, when receiving the service network address corresponding to each service request address returned by the bitmap server, the service server may 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 referred to the description of S201-S209 in the embodiment corresponding to fig. 5, and will not be repeated here.
It should be understood that, when the application client obtains the service network address corresponding to each service request address, S510 may also be executed to process the service corresponding to each service request addressThe service network address is stored in a database (i.e., a relational database management system, such as mysql.). For example, the database here may store a service request address X as shown in FIG. 2 1 Corresponding service network address 1 (e.g., 192.168.0.0), service request address X 2 Corresponding service network address 2 (e.g., 192.168.0.6) and service request address X 3 Corresponding to service network address 3 (e.g., 192.168.0.2).
Further, if the application client generates a service request associated with a target service network address (e.g., service network address 3) in the database based on the service scenario, the application client may execute S511 to send the service request. At this time, the database may perform S512 to acquire and store the service field associated with the service network address 3. For example, in some traffic scenarios, it is often necessary to add additional traffic fields to store traffic data for the target traffic network address that is applied for. For example, the service field herein may include an interface (interface) to which the target service network address is allocated, allocation time, and the like.
Optionally, when the service server detects that the number of addresses to be allocated returned by the bitmap server is smaller than N, the service server may generate allocation failure notification information for characterizing that allocation control is insufficient, and then may return the allocation failure notification information to the application client. At this time, the application client may generate an address pool creation request for recreating a new address pool with an address number greater than N, so that the service server performs address allocation on each service application address of the N service application addresses by calling the bitmap service function provided by the bitmap server, where the specific embodiment herein may refer to S201-S209 shown in fig. 4 and will not be described herein again.
Optionally, the service server in the embodiment of the present application may also call a bitmap service function of the bitmap server to implement address return of the distributed system. Wherein it can be appreciated that the service server can also obtain an address return request associated with the application client. The address return request here may be used to return H service request addresses, where H is a positive integer. Further, the service server may obtain the service request address X from the H service request addresses j And further can be based on the service request address X j Corresponding service network address, determining service request address X j Corresponding allocated bit address Z j Where j is a positive integer less than or equal to H. Further, the service server may assign the bit address Z j To the bitmap server so that the bitmap server will allocate bit address Z j And changing the corresponding numerical value from the updated value to an initial value, and generating returning success notification information when the returning of the H service request addresses is completed. When the service server receives the return success notification information returned by the bitmap server, the return success notification information can be forwarded to the application client.
Specifically, the service server obtains the address Z for the allocated bit j The conversion strategy of (2) can be found in the following equation (3):
Z j =C*K+D (3)
wherein C can be used to represent the service request address X received by the service server i A first byte in the corresponding service network address; here D may be used to represent the service request address X received by the service server i A second byte in the corresponding service network address; here K may represent a conversion coefficient (e.g., 256) for address return of the service network address.
It will be appreciated that the service server may obtain the service request address X from the H service request addresses j And further can determine the service request address X j A corresponding service network address. Wherein the service request address X here j The corresponding service network address may include a first byte and a second byte. Further, the service server may obtain the conversion policy for the allocated bit address shown in the above formula (3), and may determine the product between the value corresponding to the first byte and the conversion coefficient based on the formula (3), and pair the product with the second byteThe corresponding numerical value is summed, and the numerical value after summation can be used as a service request address X j Corresponding allocated bit address Z j
For example, if the service request address X received by the service server j The corresponding service network address is 192.168.1.1, then the value corresponding to the first byte obtained by the service server is 1, the value corresponding to the second byte is 2, at this time, the service server may determine the product (e.g. 256) between the value corresponding to the first byte and the conversion coefficient based on the above formula (3), and may further perform summation processing corresponding to the product and the value corresponding to the second byte, so that the summed value (e.g. 257) may be used as the service request address X j Corresponding allocated bit address Z j . At this time, the service server may allocate bit address Z j And the value of the allocation bit address corresponding to the position 257 in the bitmap is changed from the updated value to the initial value by the bitmap server.
For ease of understanding, further, please refer to fig. 6, fig. 6 is a schematic flow chart of address returning according to an embodiment of the present application. As shown in fig. 6, the method may be interactively performed by a computer device (e.g., a target terminal device) running an application client, a service server having an address allocation service function, and a bitmap server having a bitmap service function, where the target terminal device may be any one of the terminal device clusters shown in fig. 1, e.g., the terminal device 100a. The service server may be the server 110F shown in fig. 1 and the bitmap server may be the server 120F shown in fig. 1.
As shown in fig. 6, when H service request addresses need to be returned, the target terminal device running the application client may generate an address return request associated with the application client, and further may execute S61 to send the address return request to the service server. Wherein, H is a positive integer. Further, the service server may execute S62 to obtain the service request address X from the H service request addresses j And can be based on the service requestAddress X j Corresponding service network address, determining service request address X j Corresponding allocated bit address Z j Where j is a positive integer less than or equal to H. Further, the service server may execute S63, and will assign the bit address Z j And sending the data to a bitmap server. The bitmap server receives the distributed bit address Z sent by the service server j At this time, S64 may be performed, the bit address Z will be allocated j The corresponding numerical value is changed from the updated value to the initial value. Similarly, the service server and the bitmap server in the embodiment of the present application may execute steps S62 to S64 in a loop, so as to restore the service network address corresponding to each service application address.
Further, when the H service request addresses are returned, the bitmap server may generate a return success notification message, and then may execute S65, and send the return success notification message to the service server, so that the service server may execute S66, and forward the return success notification message to the application client.
The implementation scheme of the distributed system address pool provided by the embodiment of the application records the address pool by adopting a data structure of a bitmap by utilizing the bitmap service function provided by the bitmap server so as to support the IP allocation/return requirement of the distributed system. The address allocation mode not only avoids the problem that the single-point service stores data in the memory, but also can greatly reduce the storage space occupied by the address through the bitmap service function, for example, the address storage space is reduced to one percent of the database storage. In addition, because the bitmap server is used as a KV type database and is completely based on memory operation, the data structure is simple, single-thread operation is adopted, the reading and writing efficiency is high, the complexity of the query time when a certain allocation bit address is queried is O (1) by adopting the bitmap data structure, and the conventional relational database is O (log N), so that the query efficiency is greatly improved.
Further, referring to fig. 7, fig. 7 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. The data processing apparatus 1 may be a computer program (comprising program code) running in a computer device, for example, the data processing apparatus 1 is an application software; the data processing device 1 may be used to perform the respective ones of the methods provided by the embodiments of the present application. As shown in fig. 7, the data processing apparatus 1 may operate on a computer device (e.g., a service server) having an address allocation service function, and the service server may be the server 210F in the embodiment corresponding to fig. 2. The data processing apparatus 1 may include: the system comprises a sending module 11, an acquiring module 12, a determining module 13, a receiving module 14, a forwarding module 15, a generating module 16 and a returning module 17.
The sending module 11 is configured to send an address pool space query request to a bitmap server with a bitmap service function when an address application request associated with an application client is acquired; the address pool space inquiry request is used for indicating the bitmap server to determine the number of addresses to be allocated of the address pool; the address application request is used for applying N service request addresses; n is a positive integer; the address pool is established by the bitmap server when receiving an address pool creation request forwarded by the service server;
the obtaining module 12 is configured to receive the number of addresses to be allocated sent by the bitmap server, and when detecting that the number of addresses to be allocated is greater than or equal to N, invoke the bitmap server to request the service request address X of the N service request addresses i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the i is a positive integer less than or equal to N.
Wherein the acquisition module 12 comprises: a receiving unit 121, a creating unit 122, a locking processing unit 123, and a deleting unit 124.
The receiving unit 121 is configured to receive the number of addresses to be allocated sent by the bitmap server;
the creating unit 122 is configured to create, when detecting that the number of addresses to be allocated is greater than or equal to N, temporary sequence nodes for each subroutine for creating a service request address through the distributed lock indicated by the atomic operation, so as to obtain a sequence directory set associated with the distributed lock; the N service request addresses include service request address X i
The locking processing unit 123 is configured to, in use, create a service request address X i Subroutine C of (2) i When the corresponding temporary sequence node is the smallest temporary sequence node in the sequence directory set, the sub-program C is locked through the distributed lock i Locking processing is carried out, and the subroutine C after locking processing is carried out i To the bitmap server to make the bitmap server request the service request address X i Performing address allocation;
the deleting unit 124 is configured to, when the service request address X returned by the bitmap server is obtained i Corresponding allocated bit address Y i In the process, subroutine C is deleted from the sequence directory set i Corresponding temporary sequence nodes.
The specific implementation manner of the receiving unit 121, the creating unit 122, the locking processing unit 123 and the deleting unit 124 may be referred to the description of S102 in the embodiment corresponding to fig. 3, and the detailed description will not be repeated here.
The determination module 13 is used for based on the allocated bit address Y i Determining a service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client.
Wherein the determining module 13 comprises: an acquisition unit 131, a rounding unit 132, a remainder processing unit 133, a determination unit 134, and a return unit 135.
The obtaining unit 131 is used for obtaining the address block identifier associated with the address pool, and based on the address block identifier, the bit address Y is allocated i Converting to an initial network address; the initial network address includes a first byte and a second byte;
the rounding unit 132 is used for obtaining a first strategy for the first byte and allocating the bit address Y based on a first conversion coefficient associated with the first strategy i Performing rounding processing, and taking the rounded numerical value as a numerical value corresponding to the first byte;
the remainder processing unit 133 is configured to obtain a second policy for the second byte based on a first policy associated with the second policyTwo conversion coefficients, allocated bit address Y i Performing residual taking processing, and taking the value after the residual taking processing as a value corresponding to the second byte;
the determining unit 134 is configured 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 A corresponding service network address;
the returning unit 135 is configured to return the service network address corresponding to each service request address to the application client.
The specific implementation manner of the obtaining unit 131, the rounding unit 132, the remainder processing unit 133, the determining unit 134 and the returning unit 135 may refer to the description of S103 in the embodiment corresponding to fig. 3, and the description will not be repeated here.
The receiving module 14 is configured to receive an address pool creation request sent by an application client; the address pool creation request carries an address block identifier comprising a network prefix, a host number and the number of bits occupied by the network prefix;
the forwarding module 15 is configured to forward the address pool creation request to the bitmap server; the address pool space query request is used for indicating the bitmap server to create a bitmap corresponding to the address block identifier based on the bitmap service function, initializing M allocated bit addresses in the bitmap, and determining the initialized bitmap as an address pool; m is a positive integer determined based on the network prefix, host number, and number of bits occupied by the network prefix.
The service network address corresponding to each service request address is used for storing the service network address into a database with an association relation with the application client; the database is used for storing a service field associated with a target service network address when the service request is acquired; the service request is a request generated by the application client associated with a target service network address in the database.
The obtaining module 12 is further configured to obtain an address return request associated with the application client; the address returning request is used for returning H service request addresses; h is a positive integer;
The determining module 13 is also used forObtaining service request address X from H service request addresses j Based on the service request address X j Corresponding service network address, determining service request address X j Corresponding allocated bit address Z j The method comprises the steps of carrying out a first treatment on the surface of the j is a positive integer less than or equal to H.
Wherein, this determination module 13 is also specifically used for:
obtaining service request address X from H service request addresses j Determining a service request address X j A corresponding service network address; service request address X j The corresponding service network address comprises a first byte and a second byte;
based on a conversion strategy aiming at the allocated bit address, determining the product between the value corresponding to the first byte and the conversion coefficient, carrying out summation processing on the value corresponding to the product and the second byte, and taking the value after summation processing as a service request address X j Corresponding allocated bit address Z j
The transmitting module 11 is also used for distributing bit addresses Z j To the bitmap server so that the bitmap server will allocate bit address Z j Changing the corresponding numerical value from the updated value to an initial value, and generating returning success notification information when the returning of the H service request addresses is completed;
the receiving module 14 is further configured to receive the return success notification information returned by the bitmap server, and forward the return success notification information to the application client.
The generating module 16 is configured to generate allocation failure notification information for characterizing that the allocation space is insufficient when the number of addresses to be allocated is detected to be less than N;
the return module 17 is configured to return allocation failure notification information to the application client.
The specific implementation manners 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 may be referred to the description of S201-S209 in the embodiment corresponding to fig. 4, and the detailed description will not be repeated here. In addition, the description of the beneficial effects of the same method is omitted.
Further, referring to fig. 8, fig. 8 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. The data processing means 2 may be a computer program (comprising program code) running in a computer device, for example the data processing means 2 is an application software; the data processing device 2 may be adapted to perform the respective steps of the method provided by the embodiments of the application. As shown in fig. 8, the data processing apparatus 2 may be operated on a computer device (e.g., a bitmap server) having a bitmap service function, and the bitmap server may be the server 220F in the embodiment corresponding to fig. 2. The data processing apparatus 2 may include: a determination module 100, a return module 200, and an allocation module 300.
The determining module 100 is configured to obtain an address space query request sent by a service server, and determine the number of addresses to be allocated in an address pool; the address space query request is generated when the service server acquires an address application request associated with the application client; the address application request is used for applying N service request addresses; n is a positive integer; the address pool is established by the bitmap server upon receipt of an address pool creation request forwarded by the traffic server.
Wherein, this determination module 100 is further configured to:
acquiring an address space query request sent by a service server, and determining an address pool associated with the service server based on the address space query request; the address pool comprises M allocated bit addresses; m is a positive integer determined based on an address block identifier carried by the address pool creation request;
respectively acquiring the numerical value of each allocated bit address in the M allocated bit addresses, taking the allocated bit address with the updated value as an allocated address, and taking the allocated bit address with the initial value as an address to be allocated;
and counting the address quantity of the allocated addresses, determining the difference value between the address quantity of the allocated addresses and M, and taking the difference value as the address quantity to be allocated of the address pool.
The return module 200 is configured to return the number of addresses to be allocated to the service server; the number of the addresses to be allocated is used for indicating the service server to generate an address allocation request when the number of the addresses to be allocated is detected to be greater than or equal to N;
the allocation module 300 is configured to, when receiving an address allocation request sent by a service server, allocate a service request address X among N service request addresses i Address allocation is carried out to obtain a service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the i is a positive integer less than or equal to N.
Wherein the distribution module 300 is further configured to:
when receiving an address allocation request sent by a service server, acquiring a subprogram C after locking processing i The method comprises the steps of carrying out a first treatment on the surface of the Subroutine C after locking i Is that the service server detects the 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 sub-program C is executed by the distributed lock i The locking treatment is carried out to obtain the product; subroutine C i For creating service request address X i Is a subroutine of (2);
by subroutine C after locking i Acquiring a target address to be allocated from an address pool, and changing the numerical value in the target address to be allocated from an initial value to an updated value;
Taking a target address to be allocated with an updated value as a service request address X i Corresponding allocated bit address Y i
The return module 200 is also used for distributing the bit address Y i Returning to the service server; assigning bit address Y i For instructing the traffic server to be based on the allocated bit address Y i Determining a service request address X i And returning the service network address corresponding to each service request address to the application client.
The specific implementation manner of the determining module 100, the returning module 200 and the allocating module 300 may refer to the descriptions of S201 to S209 in the embodiment corresponding to fig. 4, and the detailed description will not be repeated here. In addition, the description of the beneficial effects of the same method is omitted.
Further, referring to fig. 9, fig. 9 is a schematic diagram of a computer device according to an embodiment of the application. As shown in fig. 9, the computer device 3000 may be the server 210F in the corresponding embodiment of fig. 2, and the computer device 3000 may include: at least one processor 3001, e.g., a CPU, at least one network interface 3004, a user interface 3003, memory 3005, at least one communication bus 3002. Wherein the communication bus 3002 is used to enable connected communications between these components. The user interface 3003 may include a Display screen (Display), a Keyboard (Keyboard), and the network interface 3004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others. The memory 3005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 3005 may also optionally be at least one memory device located remotely from the aforementioned processor 3001. As shown in fig. 9, the memory 3005, which is one type of computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.
In the computer device 3000 shown in fig. 9, the network interface 3004 is mainly used for network communication; while the user interface 3003 is primarily used as an interface for providing input to a user; and the processor 3001 may be used to invoke device control applications stored in the memory 3005.
It should be understood that the computer device 3000 described in the embodiment of the present application may perform the description of the data processing method in the embodiment corresponding to fig. 3 or fig. 4, and may also perform the description of the data processing apparatus 1 in the embodiment corresponding to fig. 7 or the description of the data processing apparatus 2 in the embodiment corresponding to fig. 8, which are not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer readable storage medium, in which the aforementioned computer program executed by the data processing apparatus 1 or the data processing apparatus 2 is stored, and the computer program includes program instructions, when executed by the processor, can execute the description of the data processing method in the embodiment corresponding to fig. 3 or fig. 4, and therefore, a description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application. As an example, program instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or, alternatively, across multiple computing devices distributed across multiple sites and interconnected by a communication network, where the multiple computing devices distributed across multiple sites and interconnected by a communication network may constitute a blockchain system.
In one aspect, the present application provides a computer program product or a computer program, which includes a computer program/instruction, where the computer program/instruction, when executed by a processor, enables the computer device to execute the description of the data processing method in the embodiment corresponding to fig. 3 or fig. 4, which is not described herein. In addition, the description of the beneficial effects of the same method is omitted.
Further, referring to fig. 10, fig. 10 is a schematic structural diagram of a data processing system according to an embodiment of the present application. The data processing system 3 may comprise data processing means 1a and data processing means 2a. The data processing apparatus 1a may be the data processing apparatus 1 in the embodiment corresponding to fig. 7, and it is understood that the data processing apparatus 1a may be integrated with the server 210F in the embodiment corresponding to fig. 2, and therefore, a detailed description thereof will be omitted herein. The data processing device 2a may be the data processing device 2 in the embodiment corresponding to fig. 8, and it is understood that the data processing device 2a may be integrated with the server 220F in the embodiment corresponding to fig. 2, and therefore, a detailed description thereof will be omitted herein. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the data processing system according to the present application, please refer to the description of the method embodiments of the present application.
The terms first, second and the like in the description and in the claims and drawings of embodiments of the application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise," "include," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or device that comprises a list of steps or elements is not limited to the list of steps or modules but may, in the alternative, include steps or modules not listed or inherent to such process, method, apparatus, article, or device.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The method and related apparatus provided in the embodiments of the present application are described with reference to the flowchart and/or schematic structural diagrams of the method provided in the embodiments of the present application, and each flow and/or block of the flowchart and/or schematic structural diagrams of the method may be implemented by computer program instructions, and combinations of flows and/or blocks in the flowchart and/or block diagrams. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks of one or more of the flowcharts and/or block diagrams. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks of one or more of the flowcharts and/or block 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 functions specified in the flowchart block or blocks and/or block diagram block or blocks.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (15)

1. A data processing method, the method performed by a service server, comprising:
when an address application request associated with an application client is acquired, sending an address pool space query request to a bitmap server with a bitmap service function; the address pool space query request is used for indicating the bitmap server to determine the number of addresses to be allocated of an address pool; the address application request is used for applying N service request addresses; the N is a positive integer; the address pool is established when the bitmap server receives an address pool creation request forwarded by the service server;
receiving the number of the addresses to be allocated sent by the bitmap server, and calling the bitmap server to perform service request address X in the N service request addresses when the number of the addresses to be allocated is detected to be greater than or equal to N i Address allocation is carried out to obtain the service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the The i is a positive integer less than or equal to N;
based on the allocated bit address Y i Determining the service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client.
2. The method according to claim 1, wherein the method further comprises:
receiving an address pool creation request sent by an application client; the address pool creation request carries an address block identifier comprising a network prefix, a host number and the number of bits occupied by the network prefix;
forwarding the address pool creation request to the bitmap server; the address pool creation request is used for indicating the bitmap server to create a bitmap corresponding to the address block identifier based on the bitmap service function, initializing M allocated bit addresses in the bitmap, and determining the initialized bitmap as an address pool; the 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, wherein the receiving the number of addresses to be allocated sent by the bitmap server calls the bitmap server to a service request address X of the N service request addresses when the number of addresses to be allocated is detected to be greater than or equal to the N i Address allocation is carried out to obtain the service request address X i Corresponding allocated bit address Y i Comprising:
receiving the number of the addresses to be allocated, which is sent by the bitmap server;
when the number of the addresses to be allocated is detected to be greater than or equal to the N, respectively creating temporary sequence nodes for each subprogram used for creating the service request address through the distributed lock indicated by the atomic operation, and obtaining a sequence catalog set associated with the distributed lock; the N service request addresses comprise a service request address X i
At the address X for creating the service request i Subroutine C of (2) i When the corresponding temporary sequence node is the smallest temporary sequence node in the sequence directory set, the subroutine C is subjected to the distributed lock i Locking processing is carried out, and the subroutine C after locking processing is carried out i To the bitmap server to make the bitmap server request the service request address X i Performing address allocation;
upon acquisition of the service request address X returned by the bitmap server i Corresponding allocated bit address Y i Deleting said subroutine C from said sequential directory set i Corresponding temporary sequence nodes.
4. The method according to claim 1, wherein said allocating bit address Y based i Determining the service request address X i And returning the service network address corresponding to each service request address to the application client, wherein the service network address comprises:
acquiring an address block identifier associated with the address pool, and based on the address block identifier, assigning the bit address Y i Converting to an initial network address; the initial network address includes a first byte and a second byte;
acquiring a first policy for the first byte, assigning a bit address Y based on a first conversion coefficient associated with the first policy i Performing rounding processing, and taking the rounded numerical value as the numerical value corresponding to the first byte;
acquiring a second policy for the second byte, assigning a bit address Y based on a second conversion coefficient associated with the second policy i Performing remainder taking processing, and taking the numerical value after the remainder taking processing as the numerical value corresponding to the second byte;
updating 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 A corresponding service network address;
and returning the service network address corresponding to each service request address to the application client.
5. The method according to claim 1, wherein the service network address corresponding to each service request address is used for storing in a database having an association relationship with the application client; the database is used for storing a service field associated with the target service network address when the service request is acquired; the service request is a request generated by the application client associated with a target service network address in the database.
6. The method according to claim 1, wherein the method further comprises:
acquiring an address return request associated with the application client; the address return request is used for returning H service request addresses; the H is a positive integer;
acquiring service request address X from the H service request addresses j Based on the service request address X j Corresponding service network address, determining the service request address X j Corresponding allocated bit address Z j The method comprises the steps of carrying out a first treatment on the surface of the J is a positive integer less than or equal to H;
assigning the bit address Z j To the bitmap server to cause the bitmap server to allocate the bit address Z j Changing the corresponding numerical value from the updated value to an initial value, and generating returning success notification information when the returning of the H service request addresses is completed;
And receiving return success notification information returned by the bitmap server, and forwarding the return success notification information to the application client.
7. The method of claim 6, wherein said obtaining a service request address X from said H service request addresses j Based on the service request address X j Corresponding service network address, determining the service requestAddress X j Corresponding allocated bit address Z j Comprising:
acquiring service request address X from the H service request addresses j Determining the service request address X j A corresponding service network address; the service request address X j The corresponding service network address comprises a first byte and a second byte;
based on a conversion strategy aiming at the allocated bit address, determining the product between the value corresponding to the first byte and the conversion coefficient, carrying out summation processing on the product and the value corresponding to the second byte, and taking the value after summation processing as the service request address X j Corresponding allocated bit address Z j
8. A method of data processing, the method performed by a bitmap server, comprising:
acquiring an address space query request sent by a service server, and determining the number of addresses to be allocated in an address pool; the address space query request is generated when the service server acquires an address application request associated with an application client; the address application request is used for applying N service request addresses; the N is a positive integer; the address pool is established when the bitmap server receives an address pool creation request forwarded by the service server;
Returning the number of the addresses to be allocated to the service server; the number of the addresses to be allocated is used for indicating the service server to generate an address allocation request when the number of the addresses to be allocated is detected to be larger than or equal to the N;
when receiving the address allocation request sent by the service server, performing service request address X in the N service request addresses i Address allocation is carried out to obtain the service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the The i is a positive integer less than or equal to N;
assigning the bit address Y i Returning to the service server; the allocated bit address Y i For instructing the traffic server to base on the assigned bit address Y i Determining the service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client.
9. The method of claim 8, wherein the obtaining the address space query request sent by the service server, determining the number of addresses to be allocated in the address pool, comprises:
acquiring an address space query request sent by a service server, and determining an address pool associated with the service server based on the address space query request; the address pool comprises M allocated bit addresses; the M is a positive integer determined based on an address block identifier carried by the address pool creation request;
Respectively obtaining the numerical value of each allocated bit address in the M allocated bit addresses, taking the allocated bit address with an updated value as an allocated address, and taking the allocated bit address with an initial value as an address to be allocated;
and counting the address quantity of the allocated addresses, determining a difference value between the address quantity of the allocated addresses and the M, and taking the difference value as the address quantity to be allocated of the address pool.
10. The method of claim 8, wherein said address X of said N service request addresses is selected as said address allocation request sent by said service server i Address allocation is carried out to obtain the service request address X i Corresponding allocated bit address Y i Comprising:
when receiving the address allocation request sent by the service server, acquiring a subprogram C after locking processing i The method comprises the steps of carrying out a first treatment on the surface of the The subroutine C after locking i Is that the service server detects the subroutine C i The corresponding temporary sequence node is the smallest temporary sequence node in the sequence catalog set associated with the distributed phase lock, and the distributed phase lock is used for transmitting the temporary sequence nodeLock the subroutine C i The locking treatment is carried out to obtain the product; the subroutine C i For creating said service request address X i Is a subroutine of (2);
through the subroutine C after locking i Acquiring a target address to be allocated from the address pool, and changing the numerical value in the target address to be allocated from an initial value to an updated value;
taking the target address to be allocated with the updated value as the service request address X i Corresponding allocated bit address Y i
11. A data processing apparatus, comprising:
the sending module is used for sending an address pool space query request to a bitmap server with a bitmap service function when an address application request associated with an application client is acquired; the address pool space query request is used for indicating the bitmap server to determine the number of addresses to be allocated of an address pool; the address application request is used for applying N service request addresses; the N is a positive integer; the address pool is established when the bitmap server receives an address pool creation request forwarded by a service server;
the acquisition module is used for receiving the number of the addresses to be allocated sent by the bitmap server, and calling the bitmap server to perform service request address X on the N service request addresses when the number of the addresses to be allocated is detected to be larger than or equal to the N number i Address allocation is carried out to obtain the service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the The i is a positive integer less than or equal to N;
a determining module for based on the allocated bit address Y i Determining the service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client.
12. A data processing apparatus, comprising:
the determining module is used for acquiring an address space query request sent by the service server and determining the number of addresses to be allocated in the address pool; the address space query request is generated when the service server acquires an address application request associated with an application client; the address application request is used for applying N service request addresses; the N is a positive integer; the address pool is established when the bitmap server receives an address pool creation request forwarded by the service server;
the return module is used for returning the number of the addresses to be allocated to the service server so that the service server generates an address allocation request when detecting that the number of the addresses to be allocated is greater than or equal to the N;
The distribution module is used for, when receiving the address distribution request sent by the service server, carrying out service request address X in the N service request addresses i Address allocation is carried out to obtain the service request address X i Corresponding allocated bit address Y i The method comprises the steps of carrying out a first treatment on the surface of the The i is a positive integer less than or equal to N;
the return module is also used for distributing the bit address Y i Returning to the service server so that the service server can base the allocated bit address Y i Determining the service request address X i And the corresponding service network address returns the service network address corresponding to each service request address to the application client.
13. A computer device, comprising: a processor and a memory;
the processor is connected to a memory, wherein the memory is configured to store a computer program, and the processor is configured to invoke the computer program to cause the computer device to perform the method of any of claims 1 to 10.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein 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 of claims 1 to 10.
15. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the method of any one of claims 1 to 10.
CN202210276606.2A 2022-03-21 2022-03-21 Data processing method, device, equipment and storage medium Pending CN116827940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210276606.2A CN116827940A (en) 2022-03-21 2022-03-21 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210276606.2A CN116827940A (en) 2022-03-21 2022-03-21 Data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116827940A true CN116827940A (en) 2023-09-29

Family

ID=88111418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210276606.2A Pending CN116827940A (en) 2022-03-21 2022-03-21 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116827940A (en)

Similar Documents

Publication Publication Date Title
CN109274731B (en) Method and device for deploying and calling web service based on multi-tenant technology
US10127086B2 (en) Dynamic management of data stream processing
CN109343963B (en) Application access method and device for container cluster and related equipment
US6173313B1 (en) Methodology for hosting distributed objects at a predetermined node in a distributed system
CN107623729B (en) Caching method, caching equipment and caching service system
CN107241281B (en) Data processing method and device
CN111294415B (en) Domain name resolution method and device
US10530726B2 (en) Email notifications
CN110166507B (en) Multi-resource scheduling method and device
Teranishi et al. Dynamic data flow processing in edge computing environments
CN110928912A (en) Method and device for generating unique identifier
US10296394B2 (en) Consistent hashing
CN105045762A (en) Management method and apparatus for configuration file
US20200220910A1 (en) Idempotent processing of data streams
US8978048B2 (en) Information processing system, control method, and non-transitory computer readable medium storing program
CN112104679A (en) Method, apparatus, device and medium for processing hypertext transfer protocol request
CN108259605B (en) Data calling system and method based on multiple data centers
CN111858586B (en) Data processing method and device
CN110213398B (en) Alias management method, device, server and storage medium
WO2016000303A1 (en) Resource allocation method and system, and computer storage medium
CN116827940A (en) Data processing method, device, equipment and storage medium
CN110995890B (en) Domain name request scheduling method and device
US10958580B2 (en) System and method of performing load balancing over an overlay network
US20240004682A1 (en) De-centralized workflow execution
CN111698454B (en) Inter-domain resource pushing method and device for dynamically selecting optimal path

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40092306

Country of ref document: HK