Serial number recovery method, device, computer equipment, readable storage medium and program product
By monitoring the business system status on the serial number client and sending unused serial numbers to the recycling cache pool on the serial number server, the problem of high complexity of serial number recycling in traditional technology is solved, and the efficient use of serial number resources and the integrity of business transaction data are achieved.
Patent Information
- Application Number
- CN202411261615.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-09-09
AI Technical Summary
The high complexity of serial number recovery in traditional technologies leads to poor serial number recovery efficiency.
The serial number client monitors the operating status of the business system, determines unused serial numbers and sends them to the recycling cache pool of the serial number server for reuse. Through automated processing, it prevents serial number loss caused by restarting or stopping the business system.
It improves the utilization and recovery efficiency of serial number resources, prevents serial number loss, and ensures the integrity and consistency of business transaction data.
Smart Images

Figure CN119127577B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a serial number recovery method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of distributed systems, the number of messages and data in distributed systems has increased dramatically. Therefore, in distributed systems, it is necessary to manage the unique sequence numbers corresponding to messages and data.
[0003] In traditional technology, when a serial number needs to be recycled during business use, the developer identifies the serial numbers no longer in use in the business system in the serial number client, updates the recycled status of the serial numbers in the serial number server's database, and marks the serial numbers to be recycled as recycled in the database. Furthermore, when the serial number client obtains a new serial number, it checks this status flag and returns the recycled serial number to the serial number client first, avoiding the reallocation of used serial numbers.
[0004] However, in traditional technologies, since developers are required to frequently write recycling codes during serial number recycling, the complexity of serial number recycling is high, resulting in poor efficiency of serial number recycling. Summary of the Invention
[0005] Based on this, it is necessary to provide a serial number recovery method, device, computer equipment, computer-readable storage medium and computer program product to address the above technical problems.
[0006] In a first aspect, the present application provides a method for recovering a serial number, which is applied to a serial number client and includes:
[0007] If it is monitored that the running state of the business system meets the preset running state condition, the sequence number to be recycled is determined in the cached sequence numbers based on the sequence number identifier; the sequence number identifier indicates that the sequence number is not in use;
[0008] The sequence number to be recycled is sent to the sequence number service end; the sequence number to be recycled is used to be stored in the recycling buffer pool of the sequence number service end for reusing the sequence number resource.
[0009] In one embodiment, the preset operating status condition includes a service interruption, and if it is monitored that the operating status of the service system satisfies the preset operating status condition, determining the sequence number to be recycled from the cached sequence numbers based on the sequence number identifier includes:
[0010] If a service interruption condition of the service system is monitored, a sequence number to be recycled is determined from the cached sequence numbers based on the sequence number identifier.
[0011] In one of the embodiments, if the service interruption condition of the service system is monitored, the sequence number to be recycled is determined based on the cached sequence numbers, including:
[0012] If the service operation interruption condition of the service system is monitored, the sequence number state of the service interruption condition is determined.
[0013] If the feedback message of the service system is the sequence number application interruption message, the sequence number state is determined as the sequence number available state, and the sequence number corresponding to the sequence number application interruption message is sent to the sequence number server through the sequence number recycling interface.
[0014] In one of the embodiments, after the sequence number state of the service interruption condition is determined if the service operation interruption condition of the service system is monitored, the method further includes:
[0015] If the feedback message of the service system is the service interruption message, the sequence number state is determined as the sequence number unavailable state, and the sequence number whose sequence number state is the sequence number unavailable state is cached and cleared.
[0016] In one of the embodiments, after the sequence number to be recycled is sent to the sequence number server, the method further includes:
[0017] When the sequence number client meets the sequence number acquisition condition, a sequence number acquisition request is sent to the sequence number server; the sequence number acquisition request carries the business identifier and the sequence number requirement information.
[0018] The target sequence number set meeting the business identifier and the sequence number requirement information is received from the recycling cache pool of the sequence number server.
[0019] In a second aspect, the application provides a sequence number recycling method, which is applied to a sequence number server and includes:
[0020] The sequence number to be recycled sent by the sequence number client is received.
[0021] The sequence number to be recycled is stored into the recycling cache pool, and the sequence number to be recycled is updated as the recycled sequence number; in response to the sequence number acquisition request sent by the sequence number client, the target sequence number set is constructed based on the recycled sequence number.
[0022] The target sequence number set is returned to the sequence number client.
[0023] In one of the embodiments, in response to the sequence number acquisition request sent by the sequence number client, the target sequence number set is constructed based on the recycled sequence number, including:
[0024] receive a serial number acquisition request sent by the serial number client; the serial number acquisition request carries service identification and serial number requirement information; the serial number requirement information includes a first serial number quantity;
[0025] if the first serial number quantity is less than or equal to a second serial number quantity of the recycled serial numbers in the recycled cache pool, based on the first serial number quantity, the first serial number quantity of the recycled serial numbers in the recycled cache pool that contains the service identification are acquired, and the recycled serial numbers are determined as a target serial number set;
[0026] if the first serial number quantity is greater than the second serial number quantity, based on the difference between the first serial number quantity and the second serial number quantity, a target recycled serial number is acquired from the recycled serial numbers in the recycled cache pool that contains the service identification, and an original serial number is generated in a serial number resource pool;
[0027] a target serial number set is constructed based on the target recycled serial number and the original serial number.
[0028] In a third aspect, the application further provides a serial number acquisition device, which is applied to a serial number client and includes:
[0029] a listening module, configured to, if it is listened that a service system running state meets a preset running state condition, determine a recycled serial number from the cached serial numbers based on a serial number identification; the serial number identification represents that a serial number is not used;
[0030] a first sending module, configured to send the recycled serial number to a serial number server; the recycled serial number is used to store in a recycled cache pool of the serial number server for repeated use of serial number resources.
[0031] In one of the embodiments, the preset running state condition includes service interruption, and the listening module is specifically configured to, if it is listened that the service interruption condition of the service system, determine a recycled serial number from the cached serial numbers based on a serial number identification.
[0032] In one of the embodiments, the listening module is specifically configured to, if it is listened that the service operation interruption condition of the service system, determine a serial number state of the service interruption condition.
[0033] if the feedback message of the service system is a serial number application interruption message, the serial number state is determined as a serial number available state, and the serial number corresponding to the serial number application interruption message is sent to the serial number server through a serial number recycling interface.
[0034] In one of the embodiments, the device further includes:
[0035] The clearing module is configured to, if the service system feedback message is a service interruption message, determine the sequence number status as a sequence number unavailable state, and clear the cache of the sequence number in the sequence number unavailable state.
[0036] In one embodiment, the apparatus further comprises:
[0037] A second sending module is configured to send a sequence number acquisition request to a sequence number server when the sequence number client satisfies the sequence number acquisition condition; the sequence number acquisition request carries a service identifier and sequence number requirement information;
[0038] The first receiving module is configured to receive a target sequence number set that meets the service identifier and the sequence number requirement information and is sent by the sequence number service end from the recycling buffer pool.
[0039] In a fourth aspect, the present application further provides a serial number acquisition device, which is applied to a serial number server and includes:
[0040] The second receiving module is used to receive the sequence number to be recycled sent by the sequence number client;
[0041] a construction module, configured to store the sequence numbers to be recycled in a recycling buffer pool, update the sequence numbers to be recycled to recycled sequence numbers, and construct a target sequence number set based on the recycled sequence numbers in response to a sequence number acquisition request sent by the sequence number client;
[0042] The third sending module is used to return the target sequence number set to the sequence number client.
[0043] In one embodiment, the construction module is specifically configured to receive a sequence number acquisition request sent by the sequence number client; the sequence number acquisition request carries a service identifier and sequence number requirement information; the sequence number requirement information includes the first sequence number quantity;
[0044] If the first number of sequence numbers is less than or equal to a second number of the recycled sequence numbers in the recycling buffer pool, obtaining the first number of recycled sequence numbers from the recycled sequence numbers in the recycling buffer pool that contain the service identifier, and determining the recycled sequence numbers as the target sequence number set;
[0045] If the number of the first sequence numbers is greater than the number of the second sequence numbers, obtaining a target recycled sequence number from the recycled sequence numbers containing the service identifier in the recycling buffer pool based on the difference between the first sequence numbers and the second sequence numbers, and generating an original sequence number in a sequence number resource pool;
[0046] A target sequence number set is constructed based on the target recycled sequence number and the original sequence number.
[0047] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0048] If it is monitored that the running state of the business system meets the preset running state condition, the sequence number to be recycled is determined in the cached sequence numbers based on the sequence number identifier; the sequence number identifier indicates that the sequence number is not in use;
[0049] The sequence number to be recycled is sent to the sequence number service end; the sequence number to be recycled is used to be stored in the recycling buffer pool of the sequence number service end for reusing the sequence number resource.
[0050] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0051] If it is monitored that the running state of the business system meets the preset running state condition, the sequence number to be recycled is determined in the cached sequence numbers based on the sequence number identifier; the sequence number identifier indicates that the sequence number is not in use;
[0052] The sequence number to be recycled is sent to the sequence number service end; the sequence number to be recycled is used to be stored in the recycling buffer pool of the sequence number service end for reusing the sequence number resource.
[0053] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0054] If it is monitored that the running state of the business system meets the preset running state condition, the sequence number to be recycled is determined in the cached sequence numbers based on the sequence number identifier; the sequence number identifier indicates that the sequence number is not in use;
[0055] The sequence number to be recycled is sent to the sequence number service end; the sequence number to be recycled is used to be stored in the recycling buffer pool of the sequence number service end for reusing the sequence number resource.
[0056] The sequence number recovery method, device, computer equipment, computer readable storage medium and computer program product described above, under the operation and maintenance operation of the business system, the business system needs to be restarted or triggered to stop operation, at this time, there are cached sequence numbers in the cache of the sequence number client, by listening to the triggering of the operation and maintenance operation of the business system, it is determined in the cache of the sequence number client that the business system has not used the to-be-recovered sequence number, and then the to-be-recovered sequence number is sent to the sequence number server, so that the sequence number server stores the to-be-recovered sequence number in the recovery cache pool, realizing the automatic recovery backup processing of the to-be-recovered sequence number not used by the business system, preventing the loss of unused sequence numbers caused by the emptying of the cache in the restart or stop operation of the business system, improving the utilization rate of sequence number resources, and improving the efficiency of sequence number recovery through automation. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.
[0058] Figure 1 An application environment diagram of the sequence number recovery method in an embodiment;
[0059] Figure 2 A flowchart of the sequence number recovery method applied to the sequence number client in an embodiment;
[0060] Figure 3 A flowchart of the sequence number recovery step based on the sequence number state under the business system running condition being the business operation interruption condition in an embodiment;
[0061] Figure 4 A flowchart of obtaining the sequence number from the sequence number server in an embodiment;
[0062] Figure 5 A flowchart of the sequence number recovery method applied to the sequence number server in an embodiment;
[0063] Figure 6 A flowchart of the sequence number server constructing the target sequence number set step in an embodiment;
[0064] Figure 7 A structural block diagram of the sequence number recovery device applied to the sequence number client in an embodiment;
[0065] Figure 8 A structural block diagram of the sequence number recovery device applied to the sequence number server in an embodiment;
[0066] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0068] The serial number recovery method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the sequence number client 102 communicates with the sequence number server 104 through the network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. If the sequence number client 102 monitors that the operating status of the business system meets the preset operating status conditions, it determines the sequence number to be recycled in the cached sequence numbers based on the sequence number identifier; the sequence number identifier indicates that the sequence number is not used; the sequence number client 102 sends the sequence number to be recycled to the sequence number server 104; the sequence number to be recycled is used to store in the recycling cache pool of the sequence number server 104 for reuse of sequence number resources. Among them, the sequence number client 102 can be deployed in the business system. When each business system needs to obtain a sequence number or recycle a sequence number, it interacts with the sequence number server 104 through the sequence number client 102 on the business system to achieve sequence number acquisition or sequence number recycling. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0069] In an exemplary embodiment, Figure 2 As shown, a serial number recovery method is provided, which is applied to Figure 1 The serial number client in the example is used to illustrate, including the following steps 202 to 204. Among them:
[0070] Step 202: If it is monitored that the running state of the business system meets the preset running state condition, the sequence number to be recycled is determined in the cached sequence numbers based on the sequence number identifier.
[0071] The serial number identifier indicates that the serial number is not used.
[0072] In the embodiment of the present application, the serial number client deployed in the business system monitors the running state of the business system in real time, and the serial number client is pre-configured with preset running state conditions, which include business system stop, business system restart, and business interruption, etc. Among them, the business system stop and the business system restart are the operation of stopping or restarting the business system by the operation and maintenance personnel in the scene of system upgrade or system repair of the business system. At this time, the business system receives the stop or restart instruction and prepares for stopping or restarting.
[0073] In the process of stopping or restarting the business system, since the serial number client is deployed in the business system, when the business system stops or restarts, the serial number client will also stop or restart. With the stopping or restarting of the business system, the cache of the serial number client will also be cleared, and the serial number provided by the serial number client for the business system is stored in the cache of the serial number client. Therefore, the serial number client needs to recycle the recycled serial numbers in the cache of the serial number client before the business system stops or restarts.
[0074] Firstly, in the process of continuously monitoring the business system in real time by the serial number client, if it is monitored that the running state of the business system is in the above-mentioned business system stop, business system restart or business interruption, the serial number client calls the serial number recycling interface, which includes the processing flow of recycling the serial number for the business system. The serial number stored in the cache of the serial number client has a corresponding serial number identifier. For example, when the business system obtains the serial number from the serial number client based on the business demand, the serial number client stores the obtained serial number sequence (a batch of serial number set corresponding to the number of business demand) into the cache. After some serial numbers in the serial number sequence are used, the business system feeds back the message that the serial number is used to the serial number client, and then the serial number client can modify the serial number identifier of the used serial number in the serial number sequence, i.e. from "serial number unused" to "serial number used". Therefore, the serial number client can determine the unused recycled serial number in the cached serial number based on the serial number identifier.
[0075] Step 204, sending the recycled serial number to the serial number server.
[0076] Among them, the recycled serial number is used to store in the recycling cache pool of the serial number server for the reuse of serial number resources.
[0077] In an embodiment of the present application, after a sequence number client identifies a sequence number to be recycled from cached sequence numbers based on a sequence number identifier, the client sends the sequence number to be recycled to a sequence number server via a sequence number recycling interface. The sequence number server includes a recycling buffer pool for storing the sequence numbers to be recycled. This storage of the sequence numbers to be recycled by the sequence number server allows for the reuse of sequence number resources. Furthermore, the recycling buffer pool on the sequence number server utilizes a caching mechanism to store the sequence numbers to be recycled in the cache. This improves the performance of business systems obtaining sequence numbers from the sequence number server via the client, compared to adjusting the sequence number status in the database.
[0078] In this embodiment, during the operation and maintenance operation of the business system, the business system needs to be restarted or a stop operation is triggered. At this time, there is a cached serial number in the cache of the serial number client. By monitoring the business system triggering the operation and maintenance operation, the serial number to be recycled is determined in the serial number client cache and is not used by the business system. The serial number is then sent to the serial number server, so that the serial number server stores the serial number to be recycled in the recycling cache pool, and realizes the automatic recovery and backup processing of the serial number to be recycled that is not used by the business system, preventing the loss of unused serial numbers due to clearing the cache during the restart or stop operation of the business system, improving the utilization rate of serial number resources, and improving the efficiency of serial number recycling through automation.
[0079] In an exemplary embodiment, the preset operating state condition includes a service interruption, and step 202 includes step 2021.
[0080] Step 2021: If a service interruption condition of the service system is monitored, a sequence number to be recycled is determined from the cached sequence numbers based on the sequence number identifier.
[0081] In an embodiment of the present application, when the preset operating status condition is that a business system has a business interruption, for example, taking the business system as an order system as an example, when a business interruption occurs to an order in the current order system, the order has an order number, and the order number is obtained by the business system from the serial number client during the order generation process. At this time, the order number (serial number) may not have completed the order generation due to the business interruption, and the serial number client needs to recycle the unused serial number to be recycled.
[0082] When the serial number client monitors that the operating status of the business system is business interruption, the serial number client can search the cached serial numbers in the cache for the serial number used for the interrupted business corresponding to the business interruption status, determine the serial number corresponding to the interrupted business, and determine whether to determine the serial number as a serial number to be recycled based on the serial number identifier of the serial number corresponding to the terminal business.
[0083] In this embodiment, by determining the serial numbers to be recycled when the business system is interrupted, unused serial numbers can be recycled more comprehensively, the utilization rate of serial number resources can be improved, and the interruption or skipping of serial numbers in business transaction data can be avoided, thereby ensuring the integrity of business transaction data in the business system.
[0084] In an exemplary embodiment, Figure 3 As shown, step 2021 includes steps 302 to 304. Among them:
[0085] Step 302: If a service operation interruption condition of the service system is monitored, the sequence number status of the service interruption condition is determined.
[0086] In an embodiment of the present application, the serial number client continuously monitors the business system. If a business operation interruption condition of the business system is detected, the business operation interruption condition is that when the business transaction of the business system generates a transaction order based on the acquired serial number, the generation process of the transaction order is interrupted. At this time, the serial number client first sends a serial number status query request to the business system to determine the serial number status of the serial number corresponding to the business interruption condition. The serial number status of the serial number includes a serial number available state or a serial number unavailable state.
[0087] Step 304: If the feedback message from the business system is a sequence number application interruption message, the sequence number status is determined to be a sequence number available status, and the sequence number corresponding to the sequence number application interruption message is sent to the sequence number server through the sequence number recovery interface.
[0088] In one embodiment of the present application, in response to a sequence number status query request from a sequence number client, the business system queries the business transaction corresponding to the business operation interruption condition and determines the type of business operation interruption condition encountered in the business transaction. If the type of business operation interruption condition is a sequence number application interruption message, this indicates that before the sequence number was applied, a logical error occurred in the business system when generating the transaction order for the business transaction, resulting in a failure to generate the transaction order. This indicates that the sequence number used for the business operation interruption condition was not applied. The business system then sends back a sequence number application interruption message to the sequence number client, indicating that the sequence number corresponding to the current business operation interruption condition has not been used. Furthermore, the sequence number client receives the feedback message from the business system. If the sequence number client determines that the feedback message is a sequence number application interruption message, the sequence number client can determine that the sequence number corresponding to the sequence number application interruption message is not used, indicating that the business system can continue to use the sequence number corresponding to the sequence number application interruption message when conducting subsequent business transactions. Therefore, the sequence number client sends the sequence number corresponding to the sequence number application interruption message to the sequence number server via the sequence number recovery interface, so that the sequence number corresponding to the sequence number application interruption message is recovered to the sequence number server as a sequence number to be recovered.
[0089] In this embodiment, when the business operation interruption condition of the business system is monitored, the serial number status is first determined based on the feedback message of the business system. If the feedback message is a serial number application interruption message, the serial number status is determined to be a serial number available status. In the scenario where the preset operating status condition is a business operation interruption condition, the unused serial numbers can be recovered to ensure the integrity of the business transaction data.
[0090] In an exemplary embodiment, after step 302, the method further includes step 3021.
[0091] Step 3021: If the service system feedback message is a service interruption message, the sequence number status is determined to be a sequence number unavailable state, and the sequence numbers in the sequence number unavailable state are cleared from the cache.
[0092] In an embodiment of the present application, if the type of the business operation interruption condition is a business interruption message, it indicates that the current business operation interruption condition is a business interruption caused by business reasons. For example, taking the business system as an order system, in the business, the order is interrupted due to the user's cancellation of the order or payment, that is, the business interruption. At this time, since the business system has completed the order generation, it means that the sequence number corresponding to the current business transaction has been used. At this time, the sequence number client determines the sequence number status of the sequence number as the sequence number unavailable state. Therefore, the sequence number client does not need to recycle the sequence number with the sequence number unavailable status. When the business system is stopped or restarted, the sequence number is cached and cleared.
[0093] In this embodiment, by determining that the sequence number with the sequence number status of unavailable is not required to be recycled, unnecessary sequence number recycling and processing operations are avoided, the burden of sequence number recycling on the sequence number client can be reduced, and the performance of the sequence number client is optimized. In addition, by clearing the cache of sequence numbers that have been used in the business system, the same sequence number is prevented from being reused, thereby avoiding sequence number conflicts and data duplication, ensuring the uniqueness and consistency of each sequence number, and thus ensuring the integrity of business transaction data.
[0094] In an exemplary embodiment, Figure 4 As shown, after step 204, the method further includes steps 402 to 404. Among them:
[0095] Step 402: When the sequence number client satisfies the sequence number acquisition condition, it sends a sequence number acquisition request to the sequence number server.
[0096] The serial number acquisition request carries a service identifier and serial number requirement information, and the serial number requirement information includes the number of serial numbers requested by the service system.
[0097] The sequence number acquisition condition includes that the sequence number client receives a sequence number acquisition request, or the number of cached sequence numbers in the sequence number client is lower than a preset threshold, or the business system corresponding to the sequence number client is before a preset high concurrency period.
[0098] In an embodiment of the present application, when the sequence number acquisition condition is that the sequence number client receives a sequence number acquisition request, it indicates that the sequence number client deployed in the business system has received the sequence number acquisition request from the business system. The sequence number client responds to the sequence number acquisition request and determines the cached sequence number in the sequence number client cache. If the cached sequence number does not meet the sequence number requirement information, the sequence number client also sends a sequence number acquisition request to the sequence number server. Different business systems are used to handle different businesses, and the sequence number client determines the business identifier and sequence number requirement information according to the business corresponding to the business system.
[0099] When the sequence number acquisition condition is that the number of cached sequence numbers in the sequence number client is lower than a preset threshold, the sequence number client can send a sequence number acquisition request to the sequence number server in advance based on the number of cached sequence numbers. Specifically, when the number of cached sequence numbers meets the preset threshold, the sequence number client triggers an instruction to send a sequence number acquisition request to the sequence number server. For example, when the number of cached sequence numbers is lower than the preset threshold, it means that the number of cached sequence numbers in the sequence number client may be lower than the number of sequence numbers that the business system will acquire next time based on business needs. Therefore, when the number of cached sequence numbers is lower than the preset threshold, the sequence number client triggers a request to obtain the sequence number from the sequence number server, so as to improve the timeliness of the sequence number client's feedback of the sequence number to the business system and improve the performance of the sequence number server's feedback of the sequence number.
[0100] When the sequence number acquisition condition is that the business system corresponding to the sequence number client is before a preset high-concurrency period, the business system is about to face a high number of concurrent business transactions. The sequence number client needs to obtain the sequence number from the sequence number server in advance to avoid the situation where the business system is unable to support business transactions during the high-concurrency period due to insufficient cached sequence numbers on the sequence number client. For example, when the business system is an e-commerce platform, the preset high-concurrency period may be before a shopping festival, or when the business system is a ticket purchasing system, the preset high-concurrency period may be before the ticket release period before a holiday. The sequence number client needs to obtain the sequence number from the sequence number server in advance, and the sequence number client sends a sequence number acquisition request to the sequence number server to avoid the situation where the sequence number client has insufficient cached sequence numbers.
[0101] Step 404: Receive the target sequence number set that meets the service identifier and sequence number requirement information sent by the sequence number server from the recycling buffer pool.
[0102] In the embodiment of the present application, after the sequence number client sends the sequence number acquisition request to the sequence number server, the sequence number client enters a waiting state to receive the response from the sequence number server. After the sequence number server receives the sequence number acquisition request of the sequence number client, the sequence number server identifies the source of the sequence number acquisition request according to the business identifier, ensures to provide the correct sequence number for the business system, and then generates a new target sequence number set according to the sequence number requirement information from the recycling cache pool, and feeds back the target sequence number set to the sequence number client. The sequence number client receives the response from the sequence number server in the waiting state, and the client parses the response content, extracts and obtains the target sequence number set.
[0103] In the embodiment, the sequence number acquisition request is sent to the sequence number server according to the business identifier and the sequence number requirement information, so as to ensure that the obtained sequence number set meets the business demand, and ensure that the business system can proceed smoothly and maintain data consistency and reliability.
[0104] In an exemplary embodiment, as shown in Figure 5 , a sequence number recycling method is provided, which is applied to the sequence number server in Figure 1 for example, and includes the following steps 502 to 506. Among them:
[0105] Step 502, receiving the to-be-recycled sequence number sent by the sequence number client.
[0106] In the embodiment of the present application, if the business system needs to perform operation and maintenance (including stopping or restarting the business system), or the business system appears the scene of business interruption due to the interruption of the application of the sequence number, the sequence number client sends the to-be-recycled sequence number to the sequence number server through the sequence number recycling interface. The sequence number server is in real-time communication connection with the sequence number client, and receives the to-be-recycled sequence number sent from the sequence number client in real time, wherein the sequence number server marks the to-be-recycled sequence number according to the business processed by the sequence number client corresponding to the business system, and records the business system corresponding to the to-be-recycled sequence number.
[0107] Step 504, storing the to-be-recycled sequence number into the recycling cache pool, updating the to-be-recycled sequence number into the recycled sequence number, and constructing a target sequence number set based on the recycled sequence number in response to the sequence number acquisition request sent by the sequence number client.
[0108] In the embodiment of the present application, the recycling cache pool is included in the sequence number server, which is a cache space in the sequence number server for storing the to-be-recycled sequence number. After the sequence number server successfully receives the to-be-recycled sequence number, the to-be-recycled sequence number is stored into the recycling cache pool, and is updated into the recycled sequence number. The recycled sequence numbers stored in the recycling cache pool are all sequence numbers that have not been used in the sequence number client.
[0109] Step 506, returning the target sequence number set to the sequence number client.
[0110] In an embodiment of the present application, when a business transaction of a business system requires the use of serial numbers when generating orders, etc., the serial number server responds to the serial number acquisition request of the serial number client, and preferentially obtains the number of recycled serial numbers required by the serial number client from the recycling buffer pool, builds a target serial number set based on the recycled serial numbers, and feeds it back to the serial number client, thereby realizing the reuse of the serial numbers.
[0111] In this embodiment, the serial number server automatically receives the serial numbers to be recycled sent by the serial number client, automatically stores the serial numbers to be recycled in the recycling resource pool, and automatically obtains the recycled serial numbers in the recycling resource pool for feedback when the serial number client issues a serial number acquisition request, which can improve the efficiency of serial number recovery and issuance.
[0112] In an exemplary embodiment, Figure 6 As shown, step 504 includes steps 602 to 608. Among them:
[0113] Step 602: Receive a sequence number acquisition request sent by a sequence number client.
[0114] The sequence number acquisition request carries a service identifier and sequence number requirement information, and the sequence number requirement information includes the quantity of the first sequence numbers.
[0115] In an embodiment of the present application, after the serial number server receives the serial number acquisition request, it parses the serial number acquisition request, determines the service identifier and serial number requirement information carried in the serial number acquisition request, determines the recycled serial number that is compatible with the serial number acquisition request in the recycling cache pool based on the service identifier, and obtains the corresponding number of recycled serial numbers according to the first serial number quantity in the serial number requirement information.
[0116] Step 604: If the first number of sequence numbers is less than or equal to the second number of sequence numbers of the recycled sequence numbers in the recycling buffer pool, based on the first number of sequence numbers, obtain the first number of recycled sequence numbers from the recycled sequence numbers containing the service identifier in the recycling buffer pool, and determine the recycled sequence numbers as the target sequence number set.
[0117] In an embodiment of the present application, the sequence number server completes the parsing of the sequence number acquisition request and obtains that if the number of first sequence numbers in the sequence number acquisition request issued by the sequence number client is less than or equal to the number of second sequence numbers of recycled sequence numbers in the recycling buffer pool, it means that the number of recycled sequence numbers in the current recycling buffer pool can meet the number requirement of the sequence number client to obtain sequence numbers this time, and then the sequence number server can construct the target sequence number set with only the recycled sequence numbers in the recycling buffer pool.
[0118] Step 606: If the first number of sequence numbers is greater than the second number of sequence numbers, based on the difference between the first number of sequence numbers and the second number of sequence numbers, obtain the target recycled sequence number from the recycled sequence numbers containing the service identifier in the recycling buffer pool, and generate the original sequence number in the sequence number resource pool.
[0119] In an embodiment of the present application, if the first number of sequence numbers corresponding to the number of sequence numbers required by the sequence number client is greater than the second number of sequence numbers stored in the recycling buffer pool, it means that the recycled sequence numbers in the current recycling buffer pool cannot meet the number of sequence numbers required by the sequence number client to obtain this time. Then the sequence number server not only uses all the recycled sequence numbers in the recycled sequence numbers containing the service identifier in the recycling buffer pool as the target recycled sequence numbers, but also generates an original sequence number in the sequence number resource pool based on the difference between the first number of sequence numbers and the second number of sequence numbers. The original sequence number serves as a supplement to the recycled sequence number to meet the number of sequence numbers required by the sequence number client to obtain this time.
[0120] Step 608: construct a target sequence number set based on the target recovered sequence numbers and the original sequence numbers.
[0121] In an embodiment of the present application, the serial number server obtains the full amount of recycled serial numbers as target recycled serial numbers and combines them with the original serial numbers to construct a target serial number set, and then feeds the target serial number set back to the serial number client, thereby realizing the reuse of recycled serial numbers and meeting the serial number acquisition requirements of the business system.
[0122] In this embodiment, by parsing the sequence number acquisition request and checking the recycled sequence numbers in the recycling buffer pool, the sequence number server can quickly confirm the available sequence numbers of the business system according to the business identifier. If the recycled sequence numbers in the recycling buffer pool are sufficient, the sequence number server will directly meet the sequence number quantity requirement of the sequence number acquisition request; if the recycled sequence numbers do not meet the sequence number quantity requirement of the sequence number acquisition request, the sequence number server will generate the original sequence number as a supplement, thereby ensuring that the sequence number quantity requirement is met, effectively reusing the recycled sequence number resources, and improving resource utilization efficiency.
[0123] In an exemplary embodiment, a serial number recycling system is provided, the system comprising:
[0124] The sequence number client is used to determine the sequence number to be recycled from the cached sequence numbers based on the sequence number identifier if it monitors that the business system operation status meets the preset operation status conditions; the sequence number identifier indicates that the sequence number is unused; send the sequence number to be recycled to the sequence number server; the sequence number to be recycled is used to store it in the sequence number server's recycling cache pool for reuse of sequence number resources;
[0125] The sequence number server is used to store the sequence numbers to be recycled in the recycling buffer pool of the sequence number server for reuse of the sequence number resources.
[0126] In an exemplary embodiment, the sequence number server is specifically used to receive the sequence numbers to be recycled sent by the sequence number client; store the sequence numbers to be recycled in a recycling buffer pool, and update the sequence numbers to be recycled to recycled sequence numbers, respond to the sequence number acquisition request sent by the sequence number client, build a target sequence number set based on the recycled sequence numbers; and return the target sequence number set to the sequence number client.
[0127] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0128] Based on the same inventive concept, the present application also provides a serial number recovery device for implementing the aforementioned serial number recovery method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more serial number recovery device embodiments provided below can be found in the aforementioned limitations of the serial number recovery method and will not be further elaborated here.
[0129] In an exemplary embodiment, Figure 7 As shown, a sequence number recovery device 700 is provided, which is applied to a sequence number client and includes: a monitoring module 701 and a first sending module 702, wherein:
[0130] The monitoring module 701 is configured to determine a sequence number to be recycled from the cached sequence numbers based on a sequence number identifier if it is detected that the operation state of the business system satisfies a preset operation state condition; the sequence number identifier indicates that the sequence number is unused;
[0131] The first sending module 702 is used to send the sequence number to be recycled to the sequence number server; the sequence number to be recycled is used to be stored in the recycling buffer pool of the sequence number server for reuse of sequence number resources.
[0132] In one embodiment, the preset operating status condition includes a service interruption, and the monitoring module 701 is specifically configured to determine a sequence number to be recycled from the cached sequence numbers based on the sequence number identifier if a service interruption condition of the business system is monitored.
[0133] In one embodiment, the monitoring module 701 is specifically configured to determine the sequence number status of the service interruption condition if a service operation interruption condition of the service system is monitored;
[0134] If the business system feedback message is a sequence number application interruption message, the sequence number status is determined to be a sequence number available status, and the sequence number corresponding to the sequence number application interruption message is sent to the sequence number server through the sequence number recovery interface.
[0135] In one embodiment, the apparatus 700 further includes:
[0136] The clearing module is used to determine the sequence number status as the sequence number unavailable state if the business system feedback message is a business interruption message, and clear the cache of the sequence number with the sequence number status as the sequence number unavailable state.
[0137] In one embodiment, the apparatus 700 further includes:
[0138] The second sending module is used to send a sequence number acquisition request to the sequence number server when the sequence number client meets the sequence number acquisition conditions; the sequence number acquisition request carries the service identifier and sequence number requirement information;
[0139] The first receiving module is configured to receive a target sequence number set that meets service identifier and sequence number requirement information and is sent from a recovery buffer pool by a sequence number service end.
[0140] In an exemplary embodiment, Figure 8 As shown, a sequence number recovery device 800 is provided, which is applied to a sequence number service end and includes: a second receiving module 801, a building module 802 and a third sending module 803, wherein:
[0141] The second receiving module 801 is used to receive the sequence number to be recycled sent by the sequence number client;
[0142] A construction module 802 is configured to store the sequence numbers to be recycled in a recycling buffer pool, update the sequence numbers to be recycled to recycled sequence numbers, and construct a target sequence number set based on the recycled sequence numbers in response to a sequence number acquisition request sent by the sequence number client;
[0143] The third sending module 803 is configured to return the target sequence number set to the sequence number client.
[0144] In one embodiment, the construction module 802 is specifically configured to receive a sequence number acquisition request sent by a sequence number client; the sequence number acquisition request carries a service identifier and sequence number requirement information; the sequence number requirement information includes the number of first sequence numbers;
[0145] If the first number of sequence numbers is less than or equal to the second number of sequence numbers of the recovered sequence numbers in the recovery cache pool, based on the first number of sequence numbers, the first number of recovered sequence numbers is obtained from the recovered sequence numbers of the service identifier in the recovery cache pool, and the recovered sequence numbers are determined as the target sequence number set;
[0146] If the first number of sequence numbers is greater than the second number of sequence numbers, based on the difference between the first number of sequence numbers and the second number of sequence numbers, the target recovered sequence number is obtained from the recovered sequence numbers of the service identifier in the recovery cache pool, and the original sequence number is generated in the sequence number resource pool;
[0147] The target sequence number set is constructed based on the target recovered sequence number and the original sequence number.
[0148] The modules in the above sequence number recovery device can be implemented by software, hardware, and combinations thereof, in whole or in part. The modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the modules.
[0149] In an exemplary embodiment, a computer device, which can be a terminal, has an internal structure diagram as shown in Figure 9 The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, near field communication (NFC), or other technologies. The computer program is executed by the processor to implement a sequence number recovery method.
[0150] Those skilled in the art can understand that Figure 9 the structure shown in the above
[0151] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0152] If it is monitored that the business system operation status meets the preset operation status condition, the sequence number to be recycled is determined from the cached sequence numbers based on the sequence number identifier; the sequence number identifier indicates that the sequence number is not in use;
[0153] The sequence number to be recycled is sent to the sequence number server; the sequence number to be recycled is used to be stored in the recycling buffer pool of the sequence number server for reuse of the sequence number resource.
[0154] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0155] If a service interruption condition of the business system is monitored, the sequence number to be recycled is determined from the cached sequence numbers based on the sequence number identifier.
[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0157] If a business operation interruption condition of the business system is monitored, the sequence number status of the business interruption condition is determined;
[0158] If the business system feedback message is a sequence number application interruption message, the sequence number status is determined to be a sequence number available status, and the sequence number corresponding to the sequence number application interruption message is sent to the sequence number server through the sequence number recovery interface.
[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0160] If the feedback message from the business system is a business interruption message, the sequence number status is determined to be a sequence number unavailable state, and the sequence numbers in the sequence number unavailable state are cached and cleared.
[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0162] When the serial number client meets the serial number acquisition conditions, it sends a serial number acquisition request to the serial number server; the serial number acquisition request carries the service identifier and serial number requirement information;
[0163] The target sequence number set that meets the service identification and sequence number requirements is sent by the receiving sequence number server from the recycling buffer pool.
[0164] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0165] Receive the sequence number to be recycled sent by the client;
[0166] The sequence numbers to be recycled are stored in a recycling buffer pool, and the sequence numbers to be recycled are updated to recycled sequence numbers. In response to a sequence number acquisition request sent by a sequence number client, a target sequence number set is constructed based on the recycled sequence numbers.
[0167] Return the target sequence number set to the sequence number client.
[0168] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0169] Receive a sequence number acquisition request sent by a sequence number client; the sequence number acquisition request carries a service identifier and sequence number request information; the sequence number request information includes the number of first sequence numbers;
[0170] If the first number of sequence numbers is less than or equal to the second number of recycled sequence numbers in the recycling buffer pool, based on the first number of sequence numbers, obtain the first number of recycled sequence numbers from the recycled sequence numbers containing the service identifier in the recycling buffer pool, and determine the recycled sequence numbers as the target sequence number set;
[0171] If the number of first sequence numbers is greater than the number of second sequence numbers, based on the difference between the number of first sequence numbers and the number of second sequence numbers, obtain the target recycled sequence number from the recycled sequence numbers containing the service identifier in the recycling buffer pool, and generate an original sequence number in the sequence number resource pool;
[0172] A target sequence number set is constructed based on the target recycled sequence numbers and the original sequence numbers.
[0173] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0174] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0176] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0177] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0178] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A serial number recovery method, characterized in that: The method is applied to a serial number client, and the method includes: If it is monitored that the running state of the business system meets the preset running state condition, before the business system is stopped or restarted, the sequence number to be recycled is determined in the cached sequence numbers based on the sequence number identifier; the sequence number identifier indicates that the sequence number is not in use; The sequence number to be recycled is sent to the sequence number server; the sequence number to be recycled is used to be stored in a recycling buffer pool of the sequence number server for reusing sequence number resources, and the recycling buffer pool adopts a cache mechanism to store the sequence number to be recycled in the cache; The preset operating state condition includes a business interruption. If it is monitored that the operating state of the business system meets the preset operating state condition, before the business system is stopped or restarted, determining the sequence number to be recycled in the cached sequence numbers based on the sequence number identifier includes: If a business operation interruption condition of the business system is monitored, determining a sequence number status of the business operation interruption condition; If the business system feedback message is a sequence number application interruption message, the sequence number status of the sequence number corresponding to the sequence number application interruption message is determined to be a sequence number available state, and the sequence number to be recovered corresponding to the sequence number application interruption message is sent to the sequence number service end through the sequence number recovery interface as the sequence number to be recovered.
2. The method according to claim 1, characterized in that If a service operation interruption condition of the service system is monitored and a sequence number status of the service operation interruption condition is determined, the method further includes: If the service system feedback message is a service interruption message, the sequence number status is determined to be a sequence number unavailable state, and the sequence number with the sequence number status being the sequence number unavailable state is cleared from the cache.
3. The method according to claim 1, characterized in that After sending the sequence number to be recycled to the sequence number service end, the method further includes: When the serial number client meets the serial number acquisition conditions, it sends a serial number acquisition request to the serial number server; the serial number acquisition request carries the service identifier and serial number requirement information; Receive a target sequence number set that meets the service identifier and the sequence number requirement information and is sent by the sequence number service end from the recycling buffer pool.
4. A serial number recovery method, characterized in that: The method is applied to a serial number service end, and the method includes: Before the business system stops or restarts, receive the sequence number to be recycled sent by the sequence number client; storing the sequence number to be recycled in a recycling buffer pool, and updating the sequence number to be recycled to a recycled sequence number; and constructing a target sequence number set based on the recycled sequence number in response to a sequence number acquisition request sent by the sequence number client. The recycling buffer pool adopts a caching mechanism to store the sequence number to be recycled in a cache; Returning the target sequence number set to the sequence number client; Among them, the preset operating status conditions include business interruption, and the serial number to be recovered is obtained by determining the serial number status of the business operation interruption condition when the serial number client monitors the business operation interruption condition of the business system, and when the feedback message of the business system is a serial number application interruption message, determining the serial number status of the serial number corresponding to the serial number application interruption message as the serial number available state, and sending the serial number to be recovered corresponding to the serial number application interruption message to the serial number server through the serial number recovery interface.
5. The method according to claim 4, characterized in that The step of constructing a target sequence number set based on the recovered sequence numbers in response to the sequence number acquisition request sent by the sequence number client includes: Receive a sequence number acquisition request sent by the sequence number client; the sequence number acquisition request carries a service identifier and sequence number requirement information; the sequence number requirement information includes the number of first sequence numbers; If the first number of sequence numbers is less than or equal to a second number of the recycled sequence numbers in the recycling buffer pool, obtaining the first number of recycled sequence numbers from the recycled sequence numbers in the recycling buffer pool that contain the service identifier, and determining the recycled sequence numbers as the target sequence number set; If the number of the first sequence numbers is greater than the number of the second sequence numbers, obtaining a target recycled sequence number from the recycled sequence numbers containing the service identifier in the recycling buffer pool based on the difference between the first sequence numbers and the second sequence numbers, and generating an original sequence number in a sequence number resource pool; A target sequence number set is constructed based on the target recycled sequence number and the original sequence number.
6. A serial number recovery system, characterized in that: The system comprises: The sequence number client is configured to, upon monitoring that the operating state of the business system satisfies a preset operating state condition, determine a sequence number to be recycled from cached sequence numbers based on a sequence number identifier before the business system is stopped or restarted; the sequence number identifier indicates that the sequence number is unused; and send the sequence number to be recycled to the sequence number server; the sequence number to be recycled is used to be stored in a recycling cache pool of the sequence number server for reuse of sequence number resources, and the recycling cache pool adopts a caching mechanism to store the sequence number to be recycled in a cache. The sequence number server is used to store the sequence number to be recycled in the recycling buffer pool of the sequence number server for reusing the sequence number resources; The preset operation status condition includes a service interruption, and the serial number client is specifically used to determine the serial number status of the service operation interruption condition if the service operation interruption condition of the service system is monitored; If the business system feedback message is a sequence number application interruption message, the sequence number status of the sequence number corresponding to the sequence number application interruption message is determined to be a sequence number available state, and the sequence number to be recovered corresponding to the sequence number application interruption message is sent to the sequence number service end through the sequence number recovery interface as the sequence number to be recovered.
7. The system according to claim 6, characterized in that The sequence number server is specifically used to receive the sequence number to be recycled sent by the sequence number client; Storing the sequence numbers to be recycled in a recycling buffer pool, updating the sequence numbers to be recycled to recycled sequence numbers, and constructing a target sequence number set based on the recycled sequence numbers in response to a sequence number acquisition request sent by the sequence number client; Return the target sequence number set to the sequence number client.
8. A serial number recovery device, characterized in that: The device comprises: A monitoring module, configured to determine a sequence number to be recycled from cached sequence numbers based on a sequence number identifier if it is monitored that the operating state of the business system meets a preset operating state condition, before the business system is stopped or restarted; the sequence number identifier indicates that the sequence number is unused; A first sending module is used to send the sequence number to be recycled to the sequence number server; the sequence number to be recycled is used to be stored in a recycling buffer pool of the sequence number server for reuse of sequence number resources, and the recycling buffer pool adopts a caching mechanism to store the sequence number to be recycled in the cache; The preset operation status condition includes a business interruption, and the monitoring module is specifically configured to determine a sequence number status of the business operation interruption condition if a business operation interruption condition of the business system is monitored; If the business system feedback message is a sequence number application interruption message, the sequence number status of the sequence number corresponding to the sequence number application interruption message is determined to be a sequence number available state, and the sequence number to be recovered corresponding to the sequence number application interruption message is sent to the sequence number service end through the sequence number recovery interface as the sequence number to be recovered.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 and 4 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 and 4 to 5 are implemented.
Citation Information
Patent Citations
Inode number distribution management method for distributed storage system and related component
CN111858474A
Numbered resource allocation processing method and device, computer and storage medium
CN111949406A
Serial number distribution method and device, computer equipment and storage medium
CN117076519A