CN113065034B - Distributed system number generation method and system - Google Patents

Distributed system number generation method and system Download PDF

Info

Publication number
CN113065034B
CN113065034B CN202110333650.8A CN202110333650A CN113065034B CN 113065034 B CN113065034 B CN 113065034B CN 202110333650 A CN202110333650 A CN 202110333650A CN 113065034 B CN113065034 B CN 113065034B
Authority
CN
China
Prior art keywords
numbers
management server
serial
request
request client
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.)
Active
Application number
CN202110333650.8A
Other languages
Chinese (zh)
Other versions
CN113065034A (en
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.)
Shanghai Anchnet Network Technology Co ltd
Original Assignee
Shanghai Anchnet Network Technology 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 Shanghai Anchnet Network Technology Co ltd filed Critical Shanghai Anchnet Network Technology Co ltd
Priority to CN202110333650.8A priority Critical patent/CN113065034B/en
Publication of CN113065034A publication Critical patent/CN113065034A/en
Application granted granted Critical
Publication of CN113065034B publication Critical patent/CN113065034B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application relates to the technical field of computers, in particular to a method and a system for generating numbers of a distributed system, aiming at ensuring the effective management of the numbers of the distributed system, ensuring the continuity of the numbers of the distributed system and effectively increasing the utilization rate of the numbers. The method is applied to a distributed system, the system comprises a numbering management server and a numbering request client, and the method comprises the following steps: responding to a first request sent by the number management server during starting, and generating numbers in a sequence from small to large until the number of the generated numbers reaches a first preset number; sending the generated numbers with the first preset number to the number management server; responding to the number using request sent by the number requesting client, and determining the numbers of corresponding number from the corresponding number management server according to the sequence of the numbers from small to large; and sending the number of the corresponding number to the number request client through the number management server.

Description

Distributed system number generation method and system
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a distributed system number generation method and system.
Background
A distributed system is a software system built on top of a network, in which a set of independent computers appear to a user as a unified whole, as if it were a system. The system has various general physical and logical resources, can dynamically allocate tasks, and realizes information exchange by the dispersed physical and logical resources through a computer network. There is a distributed operating system in the system that manages computer resources in a global manner. Typically, a distributed system has only one model or paradigm for the user. There is a layer of software middleware above the operating system responsible for implementing this model. Numbering of distributed systems is a necessary condition for controlling distributed systems, in the prior art, a commonly adopted numbering mode is a self-increment sequence, the method uses a plurality of database instances to set different step sizes to generate numbers by utilizing self-increment keys provided by the databases, another mode is to use UUID, the method generates a combination of 32-bit letters and numbers as the numbers, and a snowflake algorithm generates codes in a fixed format, and the format comprises parts such as machine codes, time stamps and serial numbers.
In the prior art, only the number of the distributed system is simply generated, the number cannot be recycled, the number cannot be managed, and the generated number has no continuity.
Disclosure of Invention
The embodiment of the application provides a method and a system for generating a distributed number, and aims to ensure that the number of a distributed system is effectively managed, the continuity of the number of the distributed system is ensured, and the utilization rate of the number is effectively increased.
A first aspect of the embodiments of the present application provides a method for generating a distributed system number, where the method includes:
responding to a first request sent by the number management server when the number management server is started, and generating numbers in a descending order until the number of the generated numbers reaches a first preset number;
sending the generated numbers with the first preset number to the number management server;
responding to the number using request sent by the number requesting client, and determining the numbers of corresponding number from the corresponding number management server according to the sequence of the numbers from small to large;
and sending the number of the corresponding number to the number request client through the number management server.
Optionally, the method further comprises:
detecting the number of the numbers which are not issued to the number request client in the number management server in real time;
and when the number of the serial numbers which are not issued to the serial number request client is smaller than the first preset number, supplementing serial numbers of a second preset number into the serial number management server so as to enable the number of the serial numbers in the serial number management server to reach the first preset number.
Optionally, the method further comprises:
recycling unused numbers sent by the number request client at intervals of a preset time period;
storing the unused number to the number pool server;
and the unused number stored in the number pool server is used as the number to be issued to the number request client.
Optionally, recycling an unused number sent by the number request client at every other preset time period, where the method for determining an unused number includes:
sending a number inquiry request to a service system in the number request client, wherein the number inquiry request is used for inquiring whether the unused number exists in the service system;
and when a number recovery request fed back by the service system for the number inquiry request is received, determining that the number request client has an unused number.
Optionally, every other preset time period, recycling an unused number sent by the number request client, where the method for determining an unused number further includes:
determining the distributed number which is issued to the number request client by the number management server;
comparing the distributed number issued to the number request client with the number currently used on the number request client to obtain a comparison result;
and when the comparison result represents that the unused number exists in the distributed numbers issued to the number request client, determining that the number request client has the unused number.
Optionally, the number using request carries an identifier of a service system using the number, and the number of the corresponding number is sent to the number requesting client, where the method further includes:
establishing an association relation between the numbers with the corresponding quantity and the identification of the service system;
and saving the association relation.
A second aspect of the embodiments of the present application provides a system for generating a serial number of a distributed system, where the system includes a serial number management server and a serial number request client, where the serial number management server includes a serial number pool server and at least one serial number management server, the serial number request client includes a host, the host includes an agent and a service system, and the number of the hosts is set according to the number of the service systems; the system is adapted to perform the method of any of claims 1-7.
By adopting the method for generating the serial number of the distributed system, when the serial number management server receives the serial number using request sent by the serial number requesting client, the serial number management server sends the serial numbers corresponding to the serial number using request in the serial number management server to the serial number requesting client according to the sequence from small to large, and the serial number using request is used by the serial number requesting client. The number management server sends a first request to a number pool server in the number management server side when the number management server is started, the number pool server generates system numbers from large to small until the number of the generated numbers reaches a first preset number, and the generated numbers are sent to the number management server. In addition, in each preset time period, the numbering request client can periodically inquire whether the service system has an unused number, and after the unused number is determined, the unused number is stored in the numbering pool server and is used as the number to be issued to the numbering request client. The serial number using request sent by the serial number request client to the serial number management server carries the identification of the service system using the serial number, and the serial number management server establishes the association relation between the serial number and the service system according to the identification and stores the association relation. The distributed system number generation method provided by the application recycles the issued unused number, improves the number utilization rate, establishes the association relationship between the number and the service system, can facilitate the management and tracking of the number, ensures the continuity of the number and enhances the readability of the number, and the number issued by the number management server is continuous.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic structural diagram of a distributed system number generation system according to an embodiment of the present application;
fig. 2 is a flowchart of a distributed system number generation method 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 drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a distributed system number generation system according to an embodiment of the present application. As shown in fig. 1, the system includes a number management server and a number request client, where the number management server is provided with a number pool server and a number management server, the number request client is provided with a host, and the host includes an agent and a service system.
The numbering pool server is used for creating a number, issuing the number to the number management server and managing the received number. The numbering management server is provided with a numbering pool server, and the numbering pool server sequentially generates positive integer numbers according to the sequence from small to large, so that repeated numbers cannot be generated.
The number management server is used for requesting a certain number of numbers from the number pool, storing the requested numbers in the number management server, and distributing the numbers with the corresponding number to the number request client when the number request client sends a number use request. The number management server is a stateless server and can be horizontally expanded to provide service for a plurality of servers to number request clients at the same time. The number management server side at least comprises one number management server, and any number of number management servers can be arranged according to needs.
The agent is software deployed on a host of the numbering request client, and is used for sending a numbering use request to a numbering management server of the numbering management server and sending a number issued by the numbering management server to the service system for use by the service system. The agent also periodically queries the business system for any unused numbers and, when it is determined that there are any unused numbers, feeds these back to the number management server.
The service system is arranged on a host of the numbering request client, and an interface is arranged on the service system and used for interacting with the agent. The service system is a system for executing specific services, and the types of the services are not limited herein, such as logistics services, banking services, online conference services, and the like.
And the host requests the client side at the number, and is used for running the agent and the business system. The number of hosts in the numbering request client may be multiple, and is specifically set according to the number of the service systems, and the specific number of hosts may be determined according to an actual situation, and is not specifically limited herein. For example, there are 6 service systems in total, and there may be 6 hosts on each of which one service system is deployed, or there may be 3 hosts on each of which 2 service systems are deployed.
Referring to fig. 2, fig. 2 is a flowchart of a distributed system number generation method according to an embodiment of the present application. As shown in fig. 2, the method comprises the steps of:
s21: and responding to a first request sent by the number management server when the number management server is started, and generating numbers in a descending order until the number of the generated numbers reaches a first preset number.
In this embodiment, the number management server sends a first request to the number pool server when starting, where the request is used to request the number pool server for a number of a first preset number, and the first preset number may be set by itself. And after receiving the first request, the numbering pool server generates numbers in a descending order, and stops generating the numbers after generating the numbers of the first preset number.
When a plurality of number management servers are started in the number management server, the number management servers simultaneously send first requests to the number pool server, and the number pool server sequentially generates numbers corresponding to the requests from small to large.
Illustratively, when the number of the number management servers is 1, the number management server sends a first request to the number pool server when starting, and the first request requires to obtain 150 numbers, then the number pool server generates the numbers 1 to 150 after receiving the first request. When the number of the number management servers is 3, the three number management servers simultaneously send a first request to the number pool server, and when 150 numbers are required to be acquired, the number pool server generates numbers 1-150.
S22: and sending the generated first preset number of numbers to the number management server.
In this embodiment, after the numbering pool server determines the numbers of the first preset number, the determined numbers are sent to the number management server, and the number management server stores the numbers in the memory.
Illustratively, when the number of the number management servers is 1, the number pool server transmits the determined 300 numbers to the number management server. When the number of the number management servers is 3, the number pool server transmits the numbers 1 to 50 to the number management server 1, the numbers 51 to 100 to the number management server 2, and the numbers 101 to 150 to the number management server 3.
S23: and in response to the number using request sent by the number requesting client, determining a corresponding number of numbers from the corresponding number management server according to the sequence of the numbers from small to large.
In this embodiment, the number using request is sent by an agent in the host on the number requesting client, and is used to request a certain number of numbers. The number of requests is the system number, which is a positive integer.
In the numbering request client, when a business system needs numbering, a numbering use request is sent to an agent in the same host to ask for numbering, the agent sends the numbering use request to a numbering management server after receiving the numbering use request, and the numbering management server determines the numbering of corresponding quantity according to the number of the requested numbering in the request from small to large after receiving the numbering use request. The number of requests by the service system at a time is determined according to the number of new services. When a plurality of number management servers are arranged in the number management server, the agent sends a number use request to one of the number management servers.
Illustratively, a certain logistics company adopts a distributed system to manage company business, in a warehouse management business system, 20 new goods are added in a warehouse, and a number needs to be given to each goods, at this time, the warehouse management business system sends a number use request to an agent in a host, the request contains information requesting to use 20 numbers, the agent sends the number use request to a number management server after receiving the number use request, and supposing that a number management server is provided with 3 number management servers, the numbers in the 3 number management servers are continuous, the number in the number management server 1 is 1-100, the number in the number management server 2 is 101-200, and the number in the number management server 3 is 201-300. The agent randomly sends a number using request to one of the number management servers, if the number management server 1 receives the number using request, the determined number is 1-20, if the number management server 2 receives the number using request, the determined number is 101-120, and if the number management server 3 receives the number using request, the determined number is 201-220.
S24: and sending the number of the corresponding number to the number request client through the number management server.
In this embodiment, after determining the number of the corresponding number according to the number use request, the number management server sends the determined number to the agent, and the agent sends the obtained number to the service system.
For example, after the serial number 1-20 is determined by the serial number management server 1, the warehouse management business system in S23 sends the serial number to the agent in the host of the serial number request client, and the agent sends the serial number to the warehouse management business system, where the warehouse management business system sequentially numbers the newly added 20 goods as 1-20.
In another embodiment of the present application, the method further comprises the steps of:
s31: and detecting the number of the numbers which are not issued to the number request client in the number management server in real time.
S32: and when the number of the serial numbers which are not issued to the serial number request client is smaller than the first preset number, supplementing serial numbers of a second preset number into the serial number management server so as to enable the number of the serial numbers in the serial number management server to reach the first preset number.
In this embodiment, a threshold is set in advance for the number of serial numbers stored in the serial number management server, where the threshold is a first preset number, when it is detected that the number not issued to the serial number request client is smaller than the first preset number, the serial number management server sends a request for acquiring serial numbers of a second preset number to the serial number pool server, where the second preset number is equal to the number obtained by subtracting the number actually remaining in the serial number management server from the first preset number, and after receiving the request, the serial number pool server creates serial numbers of the second preset number in descending order, where the created serial numbers are consecutive to the previously issued serial numbers. And sending the created numbers with the second preset number to the number management server, so as to ensure the dynamic stability of the number of the numbers stored in the number management server. The number threshold value can also be set to other values larger than zero, and when the number which is not sent to the numbering request client side is detected to be smaller than the threshold value, the number is supplemented.
Illustratively, a preset threshold value of the numbers stored in the number management server is set to be 100, the numbers stored in the number management server are set to be 1-100, the number management server sends 50 numbers to the number request client after receiving the number use request of the number request client, the remaining numbers in the memory are 51-100, at this time, the number management server detects that the stored numbers are lower than the preset threshold value, the number management server requests 50 numbers to the number pool server, the number pool server creates 50 numbers of 101-150, and sends the newly created numbers to the number management server, and the numbers stored in the number management server are 51-150, so that the preset threshold value is met.
In another embodiment of the present application, the method further comprises the following steps:
s41: and recycling the unused number sent by the number request client at intervals of a preset time period.
In this embodiment, in order to manage and recover the numbers issued to the number request client, the number management server in the number management server first recovers the unused numbers sent by the number request client every other preset time period, and the preset time period may be set by itself, which is not limited herein.
In this embodiment, determining whether there is a no-longer-used number is divided into the following two cases:
s41-1-1: and sending a number inquiry request to a service system in the number request client, wherein the number inquiry request is used for inquiring whether the service system has an unused number.
S41-1-2: and when a number recovery request fed back by the service system for the number inquiry request is received, determining that the number request client has an unused number.
In this embodiment, an agent in the numbering request client sends a numbering inquiry request to the service system every other preset time period to inquire whether the service system has a number that is not used, and the service system feeds back whether the agent has a number that is not used any more to the agent.
Illustratively, in the warehouse management business system, the goods with the number of 5,6,9,10 stored in the warehouse is lifted away, and the number of 5,6,9,10 is not associated with the goods and belongs to an unused number, when the agent inquires about the business system, the business system feeds back the number of 5,6,9,10 to the agent, the agent sends the number fed back by the business system to the number management server, and the number management server determines that the number which is not used in the number request client is 5,6,9,10.
In another case, after the service system sends a number use request to the agent, the number issued by the number management server is obtained, which may not be used due to downtime or other reasons, and is not used due to a failure that is not recorded, and in order to prevent this, the embodiment further performs the following steps:
s41-2-1: and determining the distributed number which is issued to the number request client by the number management server.
In this embodiment, the number management server records the number that has been issued to the number request client, and the agent determines, every other preset time period, the number that has been issued to the number request client by the number management server and is allocated to the current service system from the number management server.
S41-2-2: and comparing the distributed number issued to the number request client with the currently used number on the number request client to obtain a comparison result.
In this embodiment, after determining all the numbers allocated to the current service system from the number management server, the agent queries the service system whether the numbers are in use, the service system feeds back the use conditions of the numbers to the agent, and the agent obtains the numbers which are not in use through comparison.
S41-2-3: and when the comparison result represents that the unused number exists in the distributed numbers issued to the number request client, determining that the number request client has the unused number.
In this embodiment, after the agent obtains the unused numbers fed back by the service system, all the unused numbers are sent to the number management server, and the number management server determines the unused numbers.
Illustratively, in the warehouse management service system, when a new cargo is added, the service system receives the numbers 12 and 13 issued by the number management service end, but the host fails, the received numbers are not timely associated with the cargo, and after the host fails, the numbers 14 and 15 issued by the number management service end are received again, the new cargo numbers 14 and 15 are numbered, and the numbers 12 and 13 become unused numbers. The agent acquires the issued serial number from the serial number management server, the issued serial number is 1-15, the agent inquires the service condition of the serial number from the service system, the service system feeds back that the serial numbers 1-12,14 and 15 are in use, the agent finds that the serial numbers 12 and 13 are not used after comparison, and sends the serial numbers 12 and 13 to the serial number management server, and the serial number management server determines that the serial numbers 12 and 13 are not used.
S42: storing the unused number to the number pool server.
And the unused number stored in the number pool server is used as the number to be issued to the number request client.
In this embodiment, after receiving the unused number fed back by the number request client, the number management server stores the unused number into the number pool server as a number to be issued, and when the number management server sends a number use request next time, preferentially issues the received number to be used.
Illustratively, the number management server sends the number 12,13 to the number pool server to be stored as the number to be issued after receiving the unused number 12, 13. When the number management server responds to a request sent by a number request client side, 10 numbers are sent, the number in the number management server is 10 numbers different from a preset threshold value, the number management server sends the request to a number pool server, the number management server wants to acquire 10 numbers from the number pool server, the number pool server already has 12 and 13 numbers, then 8 numbers are sequentially generated according to the sequence from small to large, and the existing 12 and 13 numbers and the newly generated 8 numbers are sent to the number management server.
In another embodiment of the present application, the number using request carries an identifier of a service system using a number, and after a preset number of numbers are sent to the number requesting client, the method further includes the following steps:
s51: and establishing the association relation between the serial numbers with the corresponding number and the identification of the service system.
In this embodiment, the identifier of the service system includes an IP address, a name, an operating system number, and the like of the service system, when the agent sends a number use request to the number management server, the number use request carries the identifier information of the service system, and when the number management server receives the number use request, the number management server receives the identifier of the service system requesting the number. And the number management server establishes the association relationship between the number issued this time and the service system requesting the number according to the identifier.
S52: and saving the association relation.
In this embodiment, after the association relationship between the serial number and the service system is established, the serial number management server feeds back the information to the serial number pool server, and the serial number pool server records the association relationship, thereby realizing the forward tracking of the serial number.
Illustratively, in a warehouse management business system, 10 new goods are added in a warehouse, the business system sends a numbering use request to an agent to number the 10 new goods, wherein the numbering use request carries information such as an IP address and an operating system name of the warehouse management business system, the agent sends the request to a numbering management server, the numbering management server associates the 10 numbers with the warehouse management business system while issuing the 10 numbers, and can be marked as a "number 20-30 (warehouse management business system)", the association relation is sent to a numbering pool server, and the numbering pool server records the association relation information to realize tracking of the number 20-30.
According to the method for generating the serial number of the distributed system, the generated serial number has uniqueness and orderliness, the serial number is tracked and managed, the serial number which is not used any more can be recycled, the utilization rate of the serial number is increased, the serial number has final continuity, the serial number is continuous on the whole, the management is facilitated, and the readability of the serial number is increased. The agent and the service system are deployed on the host together, so that the working efficiency of the service system is effectively improved, and the pressure of the number management server is reduced.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. 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 terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal 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 flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising one of \ 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The above detailed description is given to the distributed number generation method and system provided by the present application, and specific examples are applied herein to explain the principle and implementation of the present application, and the description of the above embodiments is only used to help understanding the method and core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (6)

1. A distributed system number generation method is characterized in that the method is applied to a distributed system, the system comprises a number management server and a number request client, the number management server comprises a number pool server and at least one number management server, the number pool server is used for creating numbers, issuing the numbers to the number management server and managing the received numbers; the number management server is used for requesting a certain number of numbers from the number pool server, storing the requested numbers in the number management server, and distributing the numbers with the corresponding number to the number request client when the number request client sends a number use request;
the method comprises the following steps:
the serial number pool server responds to a first request sent by the serial number management server when the serial number pool server is started, and serial numbers are generated from small to large until the number of the generated serial numbers reaches a first preset number;
sending the generated numbers with the first preset number to the number management server;
the number management server responds to the number using request sent by the number request client and determines the number of the corresponding number from the corresponding number management server according to the sequence of the numbers from small to large;
sending the numbers of the corresponding quantity to the number request client through the number management server; the numbering used by the numbering requesting client is kept continuous in its entirety,
the method further comprises the following steps:
recycling unused numbers sent by the number request client at intervals of a preset time period; and storing the unused number to the number pool server as a number to be issued to the number request client.
2. The method of claim 1, further comprising:
detecting the number of the numbers which are not issued to the number request client in the number management server in real time;
and when the number of the serial numbers which are not issued to the serial number request client is smaller than the first preset number, supplementing serial numbers of a second preset number into the serial number management server so as to enable the number of the serial numbers in the serial number management server to reach the first preset number.
3. The method according to claim 1, wherein an unused number sent by the number requesting client is recycled every other preset time period, and the method for determining the unused number includes:
sending a number inquiry request to a service system in the number request client, wherein the number inquiry request is used for inquiring whether the service system has an unused number;
and when a number recovery request fed back by the service system for the number inquiry request is received, determining that the number request client has an unused number.
4. The method according to claim 1, wherein, every other preset time period, recycling an unused number sent by the number requesting client, and the method for determining the unused number further comprises:
determining the distributed number which is issued to the number request client by the number management server;
comparing the distributed number issued to the number request client with the number currently used on the number request client to obtain a comparison result;
and when the comparison result represents that the serial numbers issued to the serial number request client side have unused serial numbers, determining that the serial number request client side has the unused serial numbers.
5. The method of claim 1, wherein the numbering use request carries an identifier of a service system using the numbering, and the corresponding number of numbering is sent to the numbering request client, and the method further comprises:
establishing an association relation between the numbers with the corresponding quantity and the identification of the service system;
and saving the association relation.
6. A distributed system serial number generation system is characterized by comprising a serial number management server and a serial number request client, wherein the serial number management server comprises a serial number pool server and at least one serial number management server, the serial number pool server is used for creating serial numbers, issuing the serial numbers to the serial number management server and managing the received serial numbers; the number management server is used for requesting a certain number of numbers from the number pool server, storing the requested numbers in the number management server, and distributing the numbers with the corresponding number to the number request client when the number request client sends a number use request; the numbering request client comprises a host, the host is provided with agents and business systems, and the number of the hosts is set according to the number of the business systems; the distributed system number generation system is configured to perform the method of any of claims 1-5.
CN202110333650.8A 2021-03-29 2021-03-29 Distributed system number generation method and system Active CN113065034B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110333650.8A CN113065034B (en) 2021-03-29 2021-03-29 Distributed system number generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110333650.8A CN113065034B (en) 2021-03-29 2021-03-29 Distributed system number generation method and system

Publications (2)

Publication Number Publication Date
CN113065034A CN113065034A (en) 2021-07-02
CN113065034B true CN113065034B (en) 2022-11-18

Family

ID=76564633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110333650.8A Active CN113065034B (en) 2021-03-29 2021-03-29 Distributed system number generation method and system

Country Status (1)

Country Link
CN (1) CN113065034B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113645646B (en) * 2021-10-14 2022-03-22 云丁网络技术(北京)有限公司 Communication optimization method, device, equipment, server and communication system for low-power-consumption equipment
CN114020495A (en) * 2021-11-10 2022-02-08 中国建设银行股份有限公司 Information processing system, method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360224A (en) * 2017-07-07 2017-11-17 携程旅游信息技术(上海)有限公司 Sequence number generation method, system, equipment and storage medium in distributed system
WO2019019676A1 (en) * 2017-07-24 2019-01-31 深圳壹账通智能科技有限公司 Service number assigning method and device, computer apparatus, and storage medium
CN109525658A (en) * 2018-11-09 2019-03-26 广州虎牙科技有限公司 A kind of production method, server, equipment, storage medium and operation system
CN111079095A (en) * 2019-12-25 2020-04-28 北京同邦卓益科技有限公司 ID generation method and system
CN112202938A (en) * 2020-10-12 2021-01-08 广州品唯软件有限公司 ID generation method, device and system
CN112559558A (en) * 2020-12-07 2021-03-26 北京理房通支付科技有限公司 Serial number generation method and device, computing device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486407B (en) * 2014-12-12 2017-12-19 北京国双科技有限公司 The generation method and device of numbering
JP2017062698A (en) * 2015-09-25 2017-03-30 日本電気株式会社 Information processing system, information processing method, client device, and information processing program
CN108874946B (en) * 2018-06-05 2021-09-24 政采云有限公司 ID management method and device
CN109450987B (en) * 2018-10-18 2021-08-03 杭州云永网络科技有限公司 Number generation method, device and system and storage medium
CN109376155B (en) * 2018-11-06 2021-07-20 泰康保险集团股份有限公司 ID generation method and device, storage medium and electronic device
CN111949406A (en) * 2020-08-13 2020-11-17 深圳市睿策者科技有限公司 Numbering resource allocation processing method and device, computer and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360224A (en) * 2017-07-07 2017-11-17 携程旅游信息技术(上海)有限公司 Sequence number generation method, system, equipment and storage medium in distributed system
WO2019019676A1 (en) * 2017-07-24 2019-01-31 深圳壹账通智能科技有限公司 Service number assigning method and device, computer apparatus, and storage medium
CN109525658A (en) * 2018-11-09 2019-03-26 广州虎牙科技有限公司 A kind of production method, server, equipment, storage medium and operation system
CN111079095A (en) * 2019-12-25 2020-04-28 北京同邦卓益科技有限公司 ID generation method and system
CN112202938A (en) * 2020-10-12 2021-01-08 广州品唯软件有限公司 ID generation method, device and system
CN112559558A (en) * 2020-12-07 2021-03-26 北京理房通支付科技有限公司 Serial number generation method and device, computing device and storage medium

Also Published As

Publication number Publication date
CN113065034A (en) 2021-07-02

Similar Documents

Publication Publication Date Title
CN106789362B (en) Equipment management method and network management system
CN113065034B (en) Distributed system number generation method and system
US20200344322A1 (en) Resource scheduling method, apparatus, device and system
CN102546782B (en) Distribution system and data operation method thereof
US20100036957A1 (en) Method and System for Implementing Transfer of a Network Session
CN106933550B (en) Global information obtaining, processing and updating method, device and system
US20120278344A1 (en) Proximity grids for an in-memory data grid
CN106933548B (en) Global information obtaining, processing and updating method, device and system
JP4970939B2 (en) Hierarchical management of dynamic resource allocation in multi-node systems
CN106888245B (en) Data processing method, device and system
US10725980B2 (en) Highly available cluster agent for backup and restore operations
CN112039970B (en) Distributed business lock service method, server, system and storage medium
CN102262591B (en) Garbage collection method and system for memory copy system
CN109240855B (en) Method and device for realizing double-active disaster recovery aiming at server virtualization system
CN109416646B (en) Optimization method for container allocation and processing equipment
CN106572137B (en) Distributed service resource management method and device
CN104469392A (en) Video file storage method and device
US10802896B2 (en) Rest gateway for messaging
CN113206877A (en) Session keeping method and device
CN107277188B (en) Method, client, server and service system for determining IP address attribution information
CN103369038A (en) PaaS (platform as a service) management platform and method
CN104793981A (en) Online snapshot managing method and device for virtual machine cluster
CN109618187B (en) Video data acquisition method and device
CN105208137A (en) Internet Protocol (IP) address allocation methods, device, server and terminal
CN112054919B (en) Method, device, storage medium and system for generating ID (identity) of container cluster under stateless condition

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
GR01 Patent grant
GR01 Patent grant