CN112035460A - Identification distribution method, device, equipment and storage medium - Google Patents
Identification distribution method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112035460A CN112035460A CN201910481673.6A CN201910481673A CN112035460A CN 112035460 A CN112035460 A CN 112035460A CN 201910481673 A CN201910481673 A CN 201910481673A CN 112035460 A CN112035460 A CN 112035460A
- Authority
- CN
- China
- Prior art keywords
- value
- target
- database
- identifier
- stored
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 239000013589 supplement Substances 0.000 claims description 23
- 230000009469 supplementation Effects 0.000 claims description 15
- 230000002159 abnormal effect Effects 0.000 claims description 8
- 238000005516 engineering process Methods 0.000 claims description 8
- 230000001502 supplementing effect Effects 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 4
- 230000003287 optical effect Effects 0.000 description 6
- 230000005856 abnormality Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000013500 data storage Methods 0.000 description 4
- 238000007792 addition Methods 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 238000011144 upstream manufacturing Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000002688 persistence Effects 0.000 description 1
- 230000036316 preload Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明实施例公开了一种标识分配方法、装置、设备和存储介质,该方法包括:在接收到针对业务数据的标识分配请求时,确定业务数据对应的当前数值集合;读取当前数值集合中存储的最小的数值,并删除当前数值集合中读取的数值,将读取到的数值作为业务数据的标识进行返回;其中,当前数值集合中的数值根据存储的业务数据对应的目标终止数值和第一预设存储数量预先生成。通过本发明实施例的技术方案,可以实现标识的绝对递增,从而可以有效地基于标识识别出业务数据的先后顺序。
The embodiments of the present invention disclose an identification allocation method, device, equipment and storage medium. The method includes: when an identification allocation request for service data is received, determining a current value set corresponding to the service data; reading the current value set in the Store the smallest value, delete the value read in the current value set, and return the read value as the identifier of the business data; among them, the value in the current value set is based on the target termination value corresponding to the stored business data and The first preset storage quantity is pre-generated. Through the technical solutions of the embodiments of the present invention, the absolute increment of the identifiers can be realized, so that the sequence of service data can be effectively identified based on the identifiers.
Description
技术领域technical field
本发明实施例涉及计算机技术,尤其涉及一种标识分配方法、装置、设备和存储介质。Embodiments of the present invention relate to computer technologies, and in particular, to an identification allocation method, apparatus, device, and storage medium.
背景技术Background technique
随着业务和数据量的日益增多,越来越多的系统都通过引入分库分表技术,来提供大量数据存储以及查询的服务。通常,在存储数据时,需要对存储的每条数据分配一个唯一标识ID,以便可以用于数据关联或者上下游交互等。With the increasing amount of business and data, more and more systems provide a large amount of data storage and query services by introducing sub-database and sub-table technology. Usually, when storing data, it is necessary to assign a unique ID to each piece of stored data, so that it can be used for data association or upstream and downstream interaction.
现有技术中,往往是基于时间序列来生成和分配相应的标识ID,以实现分布式的ID服务,从而可以解决通过数据库自增方式分配标识所存在的单点问题,即当数据库发生异常时,无法使用ID服务的问题。In the prior art, the corresponding identification IDs are often generated and assigned based on time series to realize distributed ID services, so as to solve the single-point problem of assigning identifications through the self-incrementing method of the database, that is, when an abnormality occurs in the database. , the problem that the ID service cannot be used.
然而,在实现本发明过程中,发明人发现现有技术中至少存在如下问题:However, in the process of realizing the present invention, the inventor found that there are at least the following problems in the prior art:
由于分布式的机器集群中的每台机器的时间并不统一,使得基于每台机器的时间序列所生成的标识ID是趋势递增的,而不是绝对递增的,从而无法基于标识ID来识别出每个业务数据存储的先后顺序,无法适应于依赖于ID递增的业务,具有一定的应用局限性。Since the time of each machine in the distributed machine cluster is not uniform, the identification ID generated based on the time series of each machine is trending rather than absolute increasing, so it is impossible to identify each machine based on the identification ID. The sequence of business data storage cannot be adapted to the business that depends on ID increment, and has certain application limitations.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供了一种标识分配方法、装置、设备和存储介质,以实现标识的绝对递增,从而可以有效地基于标识识别出业务数据的先后顺序。The embodiments of the present invention provide an identification allocation method, apparatus, device and storage medium, so as to realize absolute increment of the identification, so that the sequence of service data can be effectively identified based on the identification.
第一方面,本发明实施例提供了一种标识分配方法,包括:In a first aspect, an embodiment of the present invention provides an identification allocation method, including:
在接收到针对业务数据的标识分配请求时,确定所述业务数据对应的当前数值集合;When receiving an identification allocation request for service data, determine the current value set corresponding to the service data;
读取当前数值集合中存储的最小的数值,并删除当前数值集合中读取的数值,将读取到的数值作为所述业务数据的标识进行返回;Read the minimum value stored in the current value set, delete the value read in the current value set, and return the read value as the identifier of the business data;
其中,当前数值集合中的数值根据存储的所述业务数据对应的目标终止数值和第一预设存储数量预先生成。The values in the current value set are pre-generated according to the target termination value corresponding to the stored business data and the first preset storage quantity.
第二方面,本发明实施例还提供了一种标识分配装置,包括:In a second aspect, an embodiment of the present invention also provides an identification distribution device, including:
当前数值集合确定模块,用于在接收到针对业务数据的标识分配请求时,确定所述业务数据对应的当前数值集合;The current value set determination module is used to determine the current value set corresponding to the service data when receiving an identification allocation request for the service data;
标识返回模块,用于读取当前数值集合中存储的最小的数值,并删除当前数值集合中读取的数值,将读取到的数值作为所述业务数据的标识进行返回;An identification return module, used for reading the minimum value stored in the current value set, and deleting the value read in the current value set, and returning the read value as the identification of the business data;
其中,当前数值集合中的数值根据存储的所述业务数据对应的目标终止数值和第一预设存储数量预先生成。The values in the current value set are pre-generated according to the target termination value corresponding to the stored business data and the first preset storage quantity.
第三方面,本发明实施例还提供了一种设备,所述设备包括:In a third aspect, an embodiment of the present invention further provides a device, where the device includes:
一个或多个处理器;one or more processors;
存储器,用于存储一个或多个程序;memory for storing one or more programs;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本发明任意实施例所提供的标识分配方法步骤。When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the identification allocation method provided by any embodiment of the present invention.
第四方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明任意实施例所提供的标识分配方法步骤。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the steps of the identification allocation method provided by any embodiment of the present invention.
上述发明中的实施例具有如下优点或有益效果:The embodiments in the above invention have the following advantages or beneficial effects:
通过预先为每种业务设置一个相应的数值集合,数值集合中的数值可以根据存储的每种业务对应的目标终止数值和第一预设存储数量生成,每个数值集合中可以包含多个大小不同的数值。当接收到业务数据的标识分配请求时,读取该业务数据对应的当前数值集合中存储的最小的数值,并将当前数值集合中的最小数值进行删除,以便实时更新当前数值集合,使得每次分配标识时均将当前数值集合中的最小数值作为业务数据的标识进行返回,从而可以利用标识的大小来反映出业务数据存储的先后顺序,实现了标识的绝对递增,扩大了业务应用范围。By setting a corresponding value set for each service in advance, the values in the value set can be generated according to the stored target termination value corresponding to each service and the first preset storage quantity, and each value set can contain multiple numbers of different sizes. value of . When receiving an identification assignment request for business data, read the smallest value stored in the current value set corresponding to the business data, and delete the smallest value in the current value set, so as to update the current value set in real time, so that each time When assigning an identifier, the minimum value in the current value set is returned as the identifier of the business data, so that the size of the identifier can be used to reflect the sequence of business data storage, the absolute increment of the identifier is realized, and the scope of business application is expanded.
附图说明Description of drawings
图1是本发明实施例一提供的一种标识分配方法的流程图;1 is a flowchart of a method for assigning an identifier provided in Embodiment 1 of the present invention;
图2是本发明实施例二提供的一种标识分配方法的流程图;2 is a flowchart of a method for assigning an identifier provided in Embodiment 2 of the present invention;
图3是本发明实施例三提供的一种标识分配装置的结构示意图;3 is a schematic structural diagram of an identification distribution device provided in Embodiment 3 of the present invention;
图4是本发明实施例四提供的一种设备的结构示意图。FIG. 4 is a schematic structural diagram of a device provided in Embodiment 4 of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present invention.
实施例一Example 1
图1为本发明实施例一提供的一种标识分配方法的流程图,本实施例可适用于为每个业务数据分配相应的标识ID的情况。该方法可以由标识分配装置来执行,该装置可以由软件和/或硬件的方式来实现,集成于具有信息处理功能的设备中,比如服务器。如图1所示,该方法具体包括以下步骤:FIG. 1 is a flowchart of a method for allocating an identifier according to Embodiment 1 of the present invention. This embodiment is applicable to the case of allocating a corresponding identifier ID to each service data. The method may be performed by an identification distribution apparatus, which may be implemented in software and/or hardware, and integrated into a device with an information processing function, such as a server. As shown in Figure 1, the method specifically includes the following steps:
S110、在接收到针对业务数据的标识分配请求时,确定业务数据对应的当前数值集合。S110. When an identifier allocation request for the service data is received, determine a current value set corresponding to the service data.
其中,业务数据可以是指在某种业务类型下的待存储数据。示例性地,业务类型可以是但不限于采购业务类型、销售业务类型、入库业务类型或者出库业务类型等。标识分配请求可以是指为业务数据分配标识ID的请求。标识分配请求可以包括但不限于业务数据所对应的业务标识。业务标识可以由但不限于数字、字母、汉字和符号中的至少一种组成,以便区分不同类型的业务。数值集合可以是指由多个大小不同的数值组成的集合。数值集合的数据结构可以是但不限于数组结构或者队列结构。当前数值集合可以是指业务数据所对应的当前时刻下的数值集合。本实施例中的当前数值集合可以随着标识分配过程实时发生变化,即每分配一次标识,当前数值集合便缺失一个数值。The service data may refer to data to be stored under a certain service type. Exemplarily, the business type may be, but not limited to, a purchase business type, a sales business type, a warehouse-in business type, or a warehouse-out business type, and the like. The identification assignment request may refer to a request for assigning an identification ID to service data. The identifier allocation request may include, but is not limited to, the service identifier corresponding to the service data. The service identifier may be composed of, but not limited to, at least one of numbers, letters, Chinese characters and symbols, so as to distinguish different types of services. A numerical set may refer to a set consisting of multiple numerical values of different sizes. The data structure of the set of values can be, but not limited to, an array structure or a queue structure. The current value set may refer to the value set at the current moment corresponding to the service data. The current value set in this embodiment may change in real time with the identification allocation process, that is, each time an identification is allocated, the current numerical value set is missing one value.
其中,当前数值集合中的数值根据存储的业务数据对应的目标终止数值和第一预设存储数量预先生成。本实施例中的每种业务数据均对应一个目标终止数值。目标终止数值可以是指业务数据所对应的当前数值集合中的最大数值。第一预设存储数量可以是指在未分配标识之前,数值集合中的数值总数量,其可以基于业务场景和需求预先进行设置。示例性地,第一预设存储数量可以设置为数值集合的最大容量值。The values in the current value set are pre-generated according to the target termination value corresponding to the stored service data and the first preset storage quantity. Each type of service data in this embodiment corresponds to a target termination value. The target termination value may refer to the maximum value in the current value set corresponding to the service data. The first preset storage quantity may refer to the total quantity of numerical values in the numerical value set before the identifier is not assigned, which may be preset based on business scenarios and requirements. Exemplarily, the first preset storage quantity may be set as the maximum capacity value of the value set.
具体地,本实施例可以预先对每种类型的业务设置一个数值集合,并且存储每种类型的业务对应的目标终止数值。每个数值集合中的各个数值均可以根据相应业务所对应的目标终止数值和第一预设存储数量生成。示例性地,可以将目标终止数值之前的且包含目标终止数值的第一预设存储数量的数值作为数值集合中的各个数值,比如若目标终止数值为201,第一预设存储数量为100,则可以将102-201这100个数值添加至数值集合中。Specifically, in this embodiment, a value set may be set for each type of service in advance, and the target termination value corresponding to each type of service may be stored. Each value in each value set may be generated according to the target termination value corresponding to the corresponding service and the first preset storage quantity. Exemplarily, the value of the first preset storage quantity before the target termination value and including the target termination value can be used as each value in the value set, for example, if the target termination value is 201, the first preset storage quantity is 100, Then the 100 values 102-201 can be added to the value set.
具体地,当某个客户端需要将一个业务数据存储至该客户端的后台服务器时,该客户端可以针对该业务数据生成一个标识分配请求,并向执行本实施例提供的标识分配方法的分配服务器发送该标识分配请求。当分配服务器接收到该标识分配请求时,可以对该标识分配请求进行解析,获得待分配标识的业务数据所对应的业务标识,并可以基于预先存储的业务标识与数值集合之间的对应关系,确定出解析获得的业务标识所对应的数值集合,并作为该业务数据对应的当前数值集合。Specifically, when a client needs to store a service data in the client's background server, the client can generate an identification allocation request for the service data, and send an identification allocation request to the allocation server that executes the identification allocation method provided by this embodiment. Send the identity assignment request. When the distribution server receives the identification assignment request, it can parse the identification assignment request to obtain the business identification corresponding to the business data of the identification to be assigned, and based on the pre-stored correspondence between the business identification and the numerical value set, A value set corresponding to the service identifier obtained by analysis is determined and used as the current value set corresponding to the service data.
S120、读取当前数值集合中存储的最小的数值,并删除当前数值集合中读取的数值,将读取到的数值作为业务数据的标识进行返回。S120: Read the smallest value stored in the current value set, delete the read value in the current value set, and return the read value as an identifier of the service data.
具体地,在确定出业务数据所对应的当前数值集合后,可以将当前数值集合中存储的最小的数值作为该业务数据的标识发送至客户端中,从而实现标识的自动分配,并且使得客户端可以将接收的标识作为待存储的业务数据的标识ID存储至后台服务器中,以便后续进行数据关联或者上下游交互等。在读取当前数值集合中的最小数值后,需要将读取的最小数值从当前数值集合中删除,以便实时更新当前数值集合,使得每次分配的标识都是更新后的当前数值集合中的最小数值,即每次分配的标识均是逐渐增大的数值,从而实现了标识的绝对递增,并且可以有效地基于标识对业务数据进行排列或者识别出业务数据的先后顺序,适应于依赖于ID递增的业务场景,解决了现有技术中应用局限性的问题。Specifically, after the current value set corresponding to the service data is determined, the smallest value stored in the current value set can be sent to the client as the identifier of the service data, so as to realize automatic assignment of the identifier, and make the client The received identifier can be stored in the backend server as the identifier ID of the business data to be stored, so as to perform data association or upstream and downstream interaction later. After reading the minimum value in the current value set, it is necessary to delete the read minimum value from the current value set, so as to update the current value set in real time, so that each assigned identifier is the smallest value in the updated current value set. Numerical value, that is, the identifiers assigned each time are gradually increasing values, thereby realizing the absolute increment of the identifiers, and can effectively rank the business data or identify the sequence of the business data based on the identifiers, which is suitable for depending on the ID increment. It solves the problem of application limitations in the existing technology.
示例性地,在数值集合为队列结构的数值队列时,S120可以包括:取出当前数值队列中一个数值,并将取出的数值作为业务数据的标识进行返回,其中,当前数值队列中的各个数值从小到大依次排列。Exemplarily, when the value set is a value queue of a queue structure, S120 may include: taking out a value in the current value queue, and returning the taken value as an identifier of the service data, wherein each value in the current value queue is from small Arranged in order of largest.
其中,数值队列中的各个数值遵循先进先出的取值规则,即最先添加至数值队列中的数值可以最先从数值队列中取出。具体地,在将大小不同的多个数值添加至数值队列时,可以按照从小到大的顺序将各个数值添加至数值队列中,以便可以从数值队列的队头中直接取出最小的数值,作为业务数据的标识进行返回,并且通过队列的方式可以自动删除取出的最小数值,从而进一步提高了分配效率。Wherein, each value in the value queue follows the first-in, first-out value rule, that is, the value added to the value queue first can be taken out of the value queue first. Specifically, when adding multiple values of different sizes to the value queue, each value can be added to the value queue in ascending order, so that the smallest value can be directly taken from the head of the value queue as a service The identifier of the data is returned, and the minimum value taken out can be automatically deleted by means of a queue, thereby further improving the allocation efficiency.
本实施例的技术方案,通过预先为每种业务设置一个相应的数值集合,数值集合中的数值可以根据存储的每种业务对应的目标终止数值和第一预设存储数量生成,每个数值集合中可以包含多个大小不同的数值。当接收到业务数据的标识分配请求时,读取该业务数据对应的当前数值集合中存储的最小的数值,并将当前数值集合中的最小数值进行删除,以便实时更新当前数值集合,使得每次分配标识时均将当前数值集合中的最小数值作为业务数据的标识进行返回,从而可以利用标识的大小来反映出业务数据存储的先后顺序,实现了标识的绝对递增,扩大了业务应用范围。In the technical solution of this embodiment, by presetting a corresponding value set for each service, the values in the value set can be generated according to the stored target termination value corresponding to each service and the first preset storage quantity, and each value set can contain multiple values of different sizes. When receiving an identification assignment request for business data, read the smallest value stored in the current value set corresponding to the business data, and delete the smallest value in the current value set, so as to update the current value set in real time, so that each time When assigning an identifier, the minimum value in the current value set is returned as the identifier of the business data, so that the size of the identifier can be used to reflect the sequence of business data storage, the absolute increment of the identifier is realized, and the scope of business application is expanded.
在上述技术方案的基础上,S110中的“确定业务数据对应的当前数值集合”,可以包括:获取服务器中存储的目标第一数据库标识;基于预设的业务标识与数值集合之间的对应关系和业务数据对应的目标业务标识,从目标第一数据库标识对应的目标第一数据库中,确定目标业务标识对应的当前数值集合。On the basis of the above technical solution, "determining the current value set corresponding to the service data" in S110 may include: acquiring the target first database identifier stored in the server; based on the preset correspondence between the service identifier and the value set The target service identifier corresponding to the service data is determined from the target first database corresponding to the target first database identifier, and the current value set corresponding to the target service identifier is determined.
其中,服务器可以是指本实施例中的分配服务器或者额外设置的服务器。第一数据库可以是指用于存储各个数值集合的数据库。示例性地,第一数据库可以为具有Key-Value键值对的Redis数据库,其中键信息Key可以用于存储业务标识,值信息Value可以用于存储相应的数值集合。本实施例中的第一数据库可以为一个或多个,当存在多个第一数据库时,每个第一数据库均存储有各个数值集合。本实施例中的每个第一数据库可以为由多个数据库组成的分布式数据库集群,以便存储更多的数值集合,提高标识分配服务的可扩展性。目标第一数据库可以是指当前正在使用的第一数据库。第一数据库标识可以是由但不限于数字、字母、汉字和符号中的至少一种组成,以便区分不同的第一数据库。目标业务标识可以是指待分配标识的业务数据所对应的业务标识。The server may refer to the distribution server in this embodiment or an additionally set server. The first database may refer to a database for storing respective sets of numerical values. Exemplarily, the first database may be a Redis database having a Key-Value key-value pair, wherein the key information Key may be used to store the service identifier, and the value information Value may be used to store a corresponding set of values. There may be one or more first databases in this embodiment, and when there are multiple first databases, each first database stores various value sets. Each first database in this embodiment may be a distributed database cluster composed of multiple databases, so as to store more value sets and improve the scalability of the identification distribution service. The target first database may refer to the first database currently being used. The first database identifier may be composed of, but not limited to, at least one of numbers, letters, Chinese characters and symbols, so as to distinguish different first databases. The target service identifier may refer to the service identifier corresponding to the service data to be assigned the identifier.
具体地,本实施例可以将当前使用的目标第一数据库标识预先存储在服务器中,以便可以通过服务器获得目标第一数据库标识,并基于该目标第一数据库标识确定出目标第一数据库,并可以根据目标第一数据库中预先存储的业务标识与数值集合之间的对应关系,在目标第一数据库中获得目标业务标识对应的当前数值集合。Specifically, in this embodiment, the currently used target first database identifier can be pre-stored in the server, so that the target first database identifier can be obtained through the server, and the target first database identifier can be determined based on the target first database identifier, and the target first database identifier can be determined. According to the correspondence between the service identifier and the value set pre-stored in the target first database, the current value set corresponding to the target service identifier is obtained in the target first database.
示例性地,获取服务器中存储的目标第一数据库标识,可以包括:获取服务器集群中的目标服务器中存储的目标第一数据库标识,其中服务器集群中的每台服务器均是采用Zookeeper协调服务技术的服务器。Exemplarily, obtaining the target first database identifier stored in the server may include: obtaining the target first database identifier stored in the target server in the server cluster, wherein each server in the server cluster adopts the Zookeeper coordination service technology. server.
其中,Zookeeper协调服务技术是一个开放源码的分布式应用程序协调服务,它可以为分布式应用提供一致性服务功能,比如分布式协调/通知、配置维护、分布式锁和分布式队列等功能。服务器集群中的每台服务器均存储有目标第一数据库标识。目标服务器可以是指当前正在使用的服务器。在每台服务器采用Zookeeper协调服务技术后,可以自动避免存在单点问题,也就是说,在当前使用的目标服务器存在异常情况时,可以自动切换至其他服务器,从其他服务器中获得目标第一数据库标识,从而保证始终可以获取到存储的目标第一数据库标识,提高了标识分配服务的可用性。Among them, the Zookeeper coordination service technology is an open source distributed application coordination service, which can provide consistent service functions for distributed applications, such as distributed coordination/notification, configuration maintenance, distributed locks, and distributed queues. Each server in the server cluster stores the target first database identifier. The target server can refer to the server currently in use. After each server adopts the Zookeeper coordination service technology, it can automatically avoid the existence of single point problems, that is, when there is an abnormal situation in the currently used target server, it can automatically switch to other servers and obtain the target first database from other servers. identification, thereby ensuring that the stored target first database identification can always be obtained, and improving the availability of the identification distribution service.
在上述技术方案的基础上,“根据存储的业务数据对应的目标终止数值和第一预设存储数量生成当前数值集合中的数值”,可以包括:获取服务器中存储的目标第二数据库标识;根据预设的业务标识与终止数值之间的对应关系和业务数据对应的目标业务标识,从目标第二数据库标识对应的目标第二数据库中,获取目标业务标识对应的目标终止数值;基于预设数值间隔,将目标终止数值和目标终止数值之前的第二预设存储数量的数值均作为当前数值集合中的数值,其中第二预设存储数量为第一预设存储数量与1的差值。On the basis of the above technical solution, "generating the value in the current value set according to the target termination value corresponding to the stored business data and the first preset storage quantity" may include: obtaining the target second database identifier stored in the server; The correspondence between the preset service identifier and the termination value and the target service identifier corresponding to the service data, obtain the target termination value corresponding to the target service identifier from the target second database corresponding to the target second database identifier; based on the preset value interval, taking the target termination value and the value of the second preset storage quantity before the target termination value as the value in the current value set, wherein the second preset storage quantity is the difference between the first preset storage quantity and 1.
其中,第二数据库可以用于存储每种业务对应的终止数值。通过利用第二数据库存储各个终止数值,可以避免宕机后数据丢失的情况,从而保证数据的持久化,提高分配服务的可用性。本实施例中的第二数据库可以为一个或多个。当存在多个第二数据库时,每个第二数据库均存储有各个终止数值,以便避免单点问题。目标第二数据库可以是指当前正在使用的第二数据库。第二数据库标识可以是由但不限于数字、字母、汉字和符号中的至少一种组成,以便区分不同的第二数据库。预设数值间隔可以是指两个相邻数值之间的间隔,其可以基于业务场景预先进行确定。比如预设数值间隔可以设置为1。Wherein, the second database may be used to store the termination value corresponding to each service. By using the second database to store each termination value, the situation of data loss after downtime can be avoided, thereby ensuring the persistence of data and improving the availability of the distribution service. There may be one or more second databases in this embodiment. When there are multiple second databases, each second database stores a respective termination value in order to avoid single point problems. The target second database may refer to the second database currently being used. The second database identifier may be composed of, but not limited to, at least one of numbers, letters, Chinese characters and symbols, so as to distinguish different second databases. The preset value interval may refer to an interval between two adjacent values, which may be determined in advance based on a business scenario. For example, the preset value interval can be set to 1.
具体地,服务器除了可以存储目标第一数据库标识之外,还可以存储目标第二数据库标识,从而可以通过该服务器获得当前使用的目标第二数据库标识,并基于该目标第二数据库标识确定出目标第二数据库,并可以根据目标第二数据库中预先存储的业务标识与终止数值之间的对应关系,在目标第二数据库中获得目标业务标识对应的目标终止数值。将目标终止数值之前每隔预设数值间隔的距离,可以获得第二预设存储数量的数值,以及将获得的各个数值和目标终止数值均添加至当前数值集合中,从而可以生成当前数值集合。例如,当第一预设存储数量为1000,即第二预设存储数量为999,目标终止数值为3001,预设数值间隔为1,则第二预设存储数量的数值为:2002-3000,此时可以将2002-3001这1000个数值添加至当前数值集合中。Specifically, in addition to storing the target first database identifier, the server can also store the target second database identifier, so that the currently used target second database identifier can be obtained through the server, and the target second database identifier can be determined based on the target second database identifier. The second database can obtain the target termination value corresponding to the target service identifier in the target second database according to the correspondence between the service identifier and the termination value pre-stored in the target second database. The distance at every preset value interval before the target termination value can obtain the value of the second preset storage quantity, and each obtained value and the target termination value are added to the current value set, so that the current value set can be generated. For example, when the first preset storage quantity is 1000, that is, the second preset storage quantity is 999, the target termination value is 3001, and the preset value interval is 1, the value of the second preset storage quantity is: 2002-3000, At this point, the 1000 values 2002-3001 can be added to the current value set.
实施例二Embodiment 2
图2为本发明实施例二提供的一种标识分配方法的流程图,本实施例在上述实施例的基础上,增加了步骤“在检测到当前数值集合满足预设补充条件时,根据存储的业务数据对应的目标终止数值,对当前数值集合进行数值补充”。其中与上述实施例相同或相应的术语的解释在此不再赘述。FIG. 2 is a flowchart of a method for assigning an identifier according to Embodiment 2 of the present invention. On the basis of the above-mentioned embodiment, this embodiment adds a step of “when it is detected that the current value set satisfies the preset supplementary condition, according to the stored The target termination value corresponding to the business data, to supplement the current value set”. The explanations of the terms that are the same as or corresponding to the above-mentioned embodiments are not repeated here.
参见图2,本实施例提供的标识分配方法具体包括以下步骤:Referring to FIG. 2 , the identification allocation method provided by this embodiment specifically includes the following steps:
S210、在接收到针对业务数据的标识分配请求时,确定业务数据对应的当前数值集合;S210, when receiving the identification allocation request for the service data, determine the current value set corresponding to the service data;
S220、读取当前数值集合中存储的最小的数值,并删除当前数值集合中读取的数值,将读取到的数值作为业务数据的标识进行返回。S220: Read the smallest value stored in the current value set, delete the read value in the current value set, and return the read value as an identifier of the service data.
S230、在检测到当前数值集合满足预设补充条件时,根据存储的业务数据对应的目标终止数值,对当前数值集合进行数值补充。S230. When it is detected that the current value set satisfies the preset supplementary condition, perform value supplementation on the current value set according to the target termination value corresponding to the stored service data.
其中,预设补充条件可以是指需要向当前数值集合补充数值时满足的条件,比如当前数值集合中不存在任何数值、或者当前数值集合中的数值使用率大于或等于预设使用率。比如预设使用率可以为70%。The preset supplementary condition may refer to a condition that is satisfied when a value needs to be supplemented to the current value set, for example, there is no value in the current value set, or the value usage rate in the current value set is greater than or equal to the preset usage rate. For example, the default usage rate may be 70%.
具体地,本实施例在将当前数值集合中的最小数值作为业务数据的标识进行返回,且删除最小数值后,此时的当前数值集合是删除后的当前数值集合,即当前数值集合是实时更新后的数值集合。通过检测当前数值集合是否满足预设补充条件,可以判断出是否需要向当前数值集合中补充新的数值,以便进行后续的标识分配。若检测到当前数值集合中不存在任何数值或者当前数值集合中的数值使用率大于或等于预设使用率,则可以确定出需要对当前数值集合进行数值补充,此时可以基于业务数据对应的目标终止数值确定出新的数值,并将这些新的数值添加至当前数值集合中,以完成数值的补充。示例性地,本实施例可以通过启动异步线程来检测当前数值集合是否满足预设补充条件,以便可以更加及时地对当前数值集合进行数值补充,避免针对其他业务数据的标识分配等待时间过长,从而提高标识分配效率。Specifically, in this embodiment, the minimum value in the current value set is returned as the identifier of the service data, and after the minimum value is deleted, the current value set at this time is the deleted current value set, that is, the current value set is updated in real time The set of values after. By detecting whether the current value set satisfies the preset replenishment condition, it can be determined whether new values need to be added to the current value set for subsequent identification assignment. If it is detected that there is no value in the current value set or the value usage rate in the current value set is greater than or equal to the preset usage rate, it can be determined that the current value set needs to be supplemented with a value. At this time, the target corresponding to the business data can be used. The termination value determines new values, and adds these new values to the current value set to complete the value addition. Exemplarily, in this embodiment, an asynchronous thread can be started to detect whether the current value set satisfies the preset supplementary condition, so that the current value set can be supplemented in time in a more timely manner, so as to avoid too long waiting time for the identification allocation of other business data, Thereby, the efficiency of identification allocation is improved.
需要说明的是,在步骤S210确定当前数值集合后,也可以先检测当前数值集合是否满足预设补充条件,若否,则可以执行步骤S220的操作;若是,则可以根据存储的业务数据对应的目标终止数值,对当前数值集合进行数值补充,并在数值补充后再执行步骤S220的操作。It should be noted that, after the current value set is determined in step S210, it is also possible to first detect whether the current value set satisfies the preset supplementary conditions, if not, the operation of step S220 can be performed; For the target termination value, the current value set is supplemented by the value, and the operation of step S220 is performed after the value is supplemented.
示例性地,S230中的“根据存储的业务数据对应的目标终止数值,对当前数值集合进行数值补充”,可以包括:根据存储的业务数据对应的目标终止数值和第三预设存储数量确定第一终止数值,并将存储的目标终止数值更新为第一终止数值;根据更新后的目标终止数值和第三预设存储数量生成各个目标数值,并将各目标数值补充至当前数值集合中。Exemplarily, in S230 "according to the target termination value corresponding to the stored business data, the current value set is numerically supplemented", can include: according to the target termination value corresponding to the stored business data and the third preset storage quantity. A termination value, and the stored target termination value is updated to the first termination value; each target value is generated according to the updated target termination value and the third preset storage quantity, and each target value is added to the current value set.
其中,第三预设存储数量可以是指与预设补充条件相匹配的存储数量。示例性地,当预设补充条件为当前数值集合中不存在任何数值时,第三预设存储数量可以等于第一预设存储数量;当预设补充条件为当前数值集合中的数值使用率大于或等于预设使用率时,第三预设存储数量可以等于第一预设存储数量的预设使用率。第一终止数值可以是指补充后的当前数值集合中的最大数值。目标数值可以是指待补充的新数值。Wherein, the third preset storage quantity may refer to the storage quantity matching the preset supplementary condition. Exemplarily, when the preset supplementary condition is that there is no value in the current value set, the third preset storage quantity may be equal to the first preset storage quantity; when the preset supplementary condition is that the value usage rate in the current value set is greater than When equal to or equal to the preset usage rate, the third preset storage quantity may be equal to the preset usage rate of the first preset storage quantity. The first termination value may refer to the maximum value in the supplemented current value set. The target value may refer to the new value to be supplemented.
具体地,本实施例可以将目标终止数值与第三预设存储数量之和作为业务数据对应的第一终止数值,并通过将存储的该业务数据对应的目标终止数值更新为第一终止数值,以便下次补充时可以补充该第一终止数值之后的数值,从而使得数值集合中的数值始终是逐渐增大的,进而保证了数值的绝对递增。本实施例中每补充一次数值,目标终止数值更新一次,当进行当次数值补充时,需要将更新后的目标终止数值之前的且包含更新后的目标终止数值的第三预设存储数量的数值作为各个目标数值。可以将各个目标数值从小到大的顺序补充至当前数值集合中,以便可以更加快速地获得当前数值集合中的最小数值,提高分配效率。Specifically, in this embodiment, the sum of the target termination value and the third preset storage quantity may be used as the first termination value corresponding to the service data, and by updating the stored target termination value corresponding to the service data to the first termination value, So that the value after the first termination value can be supplemented next time, so that the value in the value set always increases gradually, thereby ensuring the absolute increase of the value. In this embodiment, each time the value is supplemented, the target termination value is updated once. When the current times value is supplemented, it is necessary to store the value of the third preset storage quantity before the updated target termination value and including the updated target termination value. as each target value. Each target value can be added to the current value set in ascending order, so that the minimum value in the current value set can be obtained more quickly and the allocation efficiency can be improved.
本实施例的技术方案,通过在将当前数值集合中的最小数值作为业务数据的标识进行返回后,若检测到当前数值集合满足预设补充条件,则可以基于业务数据对应的目标终止数值,及时地对当前数值集合进行数值补充,从而可以避免其他业务数据的标识分配请求等待时间过长,提高了标识分配效率。In the technical solution of this embodiment, after returning the minimum value in the current value set as the identifier of the service data, if it is detected that the current value set satisfies the preset supplementary condition, the value can be terminated based on the target corresponding to the service data, and timely The current numerical value set is supplemented by numerical value, so that the waiting time of the identification allocation request of other business data can be avoided too long, and the identification allocation efficiency is improved.
在上述方案的基础上,S230中的“根据存储的业务数据对应的目标终止数值,对当前数值集合进行数值补充”,可以包括:检测当前是否存在业务数据对应的预加载标识;若是,则停止对当前数值集合进行数值补充的操作;若否,则设置预加载标识,根据存储的业务数据对应的目标终止数值,对当前数值集合进行数值补充,并在补充结束后,删除预设加载标识。On the basis of the above scheme, in S230, "complementing the current value set with a value according to the target termination value corresponding to the stored service data" may include: detecting whether there is currently a preloading identifier corresponding to the service data; if so, stopping The operation of performing value supplementation on the current value set; if not, set the preload flag, perform value supplementation on the current value set according to the target termination value corresponding to the stored business data, and delete the preset loading flag after the supplementation is completed.
其中,预加载标识可以是指用于反映当前正在进行数值补充的标识。本实施例中的每种业务可以对应一个预加载标识。示例性地,各个预加载标识可以存储在服务器中,以便进行更好地协调服务。具体地,当检测到当前数值集合需要进行数值补充时,可以通过检测服务器中是否设置有该业务数据所对应的预加载标识,以便确定是否对当前数值集合进行数值补充操作。若存在业务数据对应的预加载标识,则表明针对于与该业务数据属于同种业务类型的其他业务数据的标识分配请求,正在对当前数值集合进行数值补充的操作,此时可以停止对当前数值集合进行数值补充的操作。若不存在业务数据对应的预加载标识,则表明当前并没有对当前数值集合进行数值补充的操作,此时可以设置预加载标识并进行数值补充操作,当补充结束后需要删除该预加载标识,从而可以基于预加载标识确定当前数值集合的状态,进而防止并发操作,提高服务性能。Wherein, the preloaded identifier may refer to an identifier used to reflect the current value supplementation being performed. Each service in this embodiment may correspond to a preloaded identifier. Exemplarily, various preloaded identities may be stored in the server for better coordination of services. Specifically, when it is detected that the current value set needs to be supplemented, it can be determined whether to perform a value supplement operation on the current value set by detecting whether a preloading flag corresponding to the service data is set in the server. If there is a preloaded identifier corresponding to the service data, it indicates that the current value set is being supplemented with the value of the identifier allocation request for other service data belonging to the same service type as the service data, and the current value set can be stopped at this time. The set performs the operation of numerical complementation. If there is no preloading flag corresponding to the business data, it means that there is currently no operation to supplement the current value set. At this time, the preloading flag can be set and the value supplementing operation can be performed. When the supplementation is completed, the preloading flag needs to be deleted. Therefore, the state of the current value set can be determined based on the preloaded identifier, thereby preventing concurrent operations and improving service performance.
在上述方案的基础上,在将存储的目标终止数值更新为第一终止数值之后,还包括:将当次数值补充时更新后的目标终止数值存储至服务器中;相应地,在进行下次数值补充时,若用于存储目标终止数值的目标第二数据库存在异常情况,则根据服务器中存储的最大目标终止数值和第三预设存储数量确定出第二终止数值;将第二终止数值存储至备用第二数据库中业务数据对应的存储位置处,并基于第二终止数值对当前数值集合进行数值补充;将服务器中存储的目标第二数据库标识更新为备用第二数据库对应的标识。On the basis of the above scheme, after updating the stored target termination value to the first termination value, the method further includes: storing the updated target termination value in the server when the times value is supplemented; When supplementing, if there is an abnormality in the target second database used to store the target termination value, the second termination value is determined according to the maximum target termination value stored in the server and the third preset storage quantity; the second termination value is stored in At the storage location corresponding to the business data in the standby second database, and based on the second termination value, the current value set is numerically supplemented; the target second database identifier stored in the server is updated to the identifier corresponding to the standby second database.
具体地,本实施例可以将每次数值补充时,确定出的第一终止数值存储在服务器中,以便可以在目标第二数据库存在异常时进行数据恢复,从而提高分配服务的可用性。示例性地,若在进行数值补充时,用于存储目标终止数值的目标第二数据库存在异常情况,即无法从目标第二数据库中获得目标终止数值,则可以从服务器中获得存储的该业务数据对应的最大目标终止数值,并将最大目标终止数值与第三预设存储数量之和作为第二终止数值,并利用备用第二数据库来存储该第二终止数值,同时也将服务器中存储的目标第二数据库标识更新为备用第二数据库对应的标识,以便后续数值补充时可以直接从备用第二数据库中读取目标终止数值,从而实现了目标终止数值的恢复,同时可以基于第二终止数值进行数值补充,提高了第二数据库的可用性以及分配服务性能。Specifically, in this embodiment, the determined first termination value can be stored in the server each time the value is supplemented, so that data recovery can be performed when the target second database is abnormal, thereby improving the availability of the distribution service. Exemplarily, if there is an abnormal situation in the target second database for storing the target termination value when the value is supplemented, that is, the target termination value cannot be obtained from the target second database, then the stored service data can be obtained from the server. The corresponding maximum target termination value, and the sum of the maximum target termination value and the third preset storage quantity is used as the second termination value, and the second termination value is stored by using the standby second database, and the target stored in the server is also used. The second database identifier is updated to the identifier corresponding to the standby second database, so that the target termination value can be directly read from the standby second database when the subsequent value is supplemented, thereby realizing the recovery of the target termination value. Numerical supplementation improves the availability of the second database and the performance of the allocation service.
示例性地,若用于存储目标终止数值的目标第二数据库存在异常情况,则可以先检测服务器中当前是否存在第二数据库切换标识,若是,则可以停止对“根据服务器中存储的最大目标终止数值和第三预设存储数量确定出第二终止数值”的操作;若否,则可以设置第二数据库切换标识,并执行“根据服务器中存储的最大目标终止数值和第三预设存储数量确定出第二终止数值,将第二终止数值存储至备用第二数据库中业务数据对应的存储位置处,并基于第二终止数值对当前数值集合进行数值补充;将服务器中存储的目标第二数据库标识更新为备用第二数据库对应的标识”的操作,并在执行结束后,删除第二数据库切换标识,从而可以防止第二数据库切换的并发操作。Exemplarily, if there is an abnormality in the target second database used to store the target termination value, it is possible to first detect whether there is currently a second database switching identifier in the server, and if so, stop the "termination according to the maximum target stored in the server". value and the third preset storage quantity to determine the second termination value"; if not, the second database switching flag can be set, and execute "determine according to the maximum target termination value stored in the server and the third preset storage quantity" The second termination value is obtained, the second termination value is stored in the storage location corresponding to the business data in the standby second database, and the current value set is numerically supplemented based on the second termination value; the target second database stored in the server is identified. The operation of updating to the identifier corresponding to the standby second database", and after the execution ends, delete the switch identifier of the second database, so that concurrent operations of the switch of the second database can be prevented.
在上述方案的基础上,“在从目标第一数据库标识对应的目标第一数据库中,确定目标业务标识对应的当前数值集合时”,还可以包括:若目标第一数据库存在异常情况,则根据存储的业务数据对应的目标终止数值,对备用第一数据库中的业务数据对应的当前数值集合进行数值补充;将服务器中存储的目标第一数据库标识更新为备用第一数据库对应的标识,以从备用第一数据库中确定出目标业务标识对应的当前数值集合。On the basis of the above solution, "when determining the current value set corresponding to the target service identifier in the target first database corresponding to the target first database identifier", it may also include: if there is an abnormal situation in the target first database, according to The target termination value corresponding to the stored business data is used to supplement the current value set corresponding to the business data in the standby first database; the target first database identifier stored in the server is updated to the identifier corresponding to the standby first database, so as to change from The current value set corresponding to the target service identifier is determined in the standby first database.
具体地,若用于存储当前数值集合的目标第一数据库存在异常情况,即无法从目标第一数据库中获得当前数值集合,则可以基于目标第二数据库中存储的目标终止数值确定出新的数值,并将这些新的数值添加至备用第一数据库中的当前数值集合中。本实施例通过将服务器存储的目标第一数据库标识更新为备用第一数据库对应的标识,以便可以从备用第一数据库中确定出目标业务标识对应的当前数值集合,从而保证可以始终获得当前数值集合,提高了第一数据库的可用性以及分配服务性能。需要说明的是,在将目标第一数据库切换至备用第一数据库时,由于备用第一数据库中的当前数值集合是空集合,从而需要对备用第一数据库中的当前数值集合进行数值补充,以便可以利用备用第一数据库中的当前数值集合进行标识分配。Specifically, if the target first database used for storing the current value set is abnormal, that is, the current value set cannot be obtained from the target first database, a new value can be determined based on the target termination value stored in the target second database , and add these new values to the current set of values in the standby first database. In this embodiment, the identifier of the target first database stored in the server is updated to the identifier corresponding to the standby first database, so that the current value set corresponding to the target service identifier can be determined from the standby first database, thereby ensuring that the current value set can always be obtained , which improves the availability of the first database and the performance of the allocation service. It should be noted that when the target first database is switched to the standby first database, since the current value set in the standby first database is an empty set, it is necessary to supplement the current value set in the standby first database in order to The identification assignment may be performed using the current set of values in the alternate first database.
示例性地,“根据存储的业务数据对应的目标终止数值,对备用第一数据库中的业务数据对应的当前数值集合进行数值补充”,可以包括:检测当前是否存在第一数据库切换标识;若是,则停止对备用第一数据库中的业务数据对应的当前数值集合进行数值补充的操作;若否,则设置第一数据库切换标识,根据存储的业务数据对应的目标终止数值,对备用第一数据库中的业务数据对应的当前数值集合进行数值补充,并在补充结束后,删除第一数据库切换标识。Exemplarily, "complementing the current value set corresponding to the business data in the standby first database according to the target termination value corresponding to the stored business data" may include: detecting whether there is currently a first database switching identifier; if so, Then stop the operation of performing value supplementation on the current value set corresponding to the business data in the standby first database; if not, set the first database switching flag, and perform the operation of the standby first database according to the target termination value corresponding to the stored business data. The current numerical value set corresponding to the business data of the user interface is supplemented by the value, and after the supplement is completed, the first database switching identifier is deleted.
其中,第一数据库切换标识可以是指用于反映出对目标第一数据进行切换的标识。示例性地,第一数据库切换标识可以存储在服务器中,以便进行更好地协调服务。具体地,当检测到目标第一数据库存在异常情况时,可以通过检测服务器中是否设置有第一数据库切换标识,以便确定是否对目标第一数据库进行切换。若存在第一数据库切换标识,则表明针对于与该业务数据属于同种业务类型的其他业务数据的标识分配请求,正在对目标第一数据库进行切换的操作,此时可以停止对目标第一数据库的切换操作。若不存在第一数据库切换标识,则表明当前并没有对目标第一数据库进行切换,此时可以设置第一数据库切换标识并进行目标第一数据库的切换操作,以及对备用第一数据库中的当前数值集合进行数值补充,当补充结束后需要删除第一数据库切换标识,从而可以基于第一数据库切换标识确定第一数据库的状态,进而防止并发操作,提高服务性能。The first database switching identifier may refer to an identifier used to reflect the switching of the target first data. Exemplarily, the first database switching identifier may be stored in the server, so as to better coordinate the service. Specifically, when it is detected that there is an abnormality in the target first database, it can be determined whether to switch the target first database by detecting whether a first database switching flag is set in the server. If there is a first database switching identifier, it indicates that the target first database is being switched for the identifier allocation request of other service data belonging to the same service type as the service data, and the target first database can be stopped at this time. switching operation. If the first database switching flag does not exist, it indicates that the target first database is not currently switched. At this time, the first database switching flag can be set and the switching operation of the target first database can be performed. The numerical value set is supplemented with values, and the first database switching identifier needs to be deleted after the supplementation is completed, so that the state of the first database can be determined based on the first database switching identifier, thereby preventing concurrent operations and improving service performance.
以下是本发明实施例提供的标识分配装置的实施例,该装置与上述各实施例的标识分配方法属于同一个发明构思,在标识分配装置的实施例中未详尽描述的细节内容,可以参考上述标识分配方法的实施例。The following is an example of the identification distribution device provided by the embodiments of the present invention, which belongs to the same inventive concept as the identification distribution methods of the above-mentioned embodiments. Embodiments of identity assignment methods.
实施例三Embodiment 3
图3为本发明实施例三提供的一种标识分配装置的结构示意图,本实施例可适用于为每个业务数据分配相应的标识ID的情况。该装置可以包括:当前数值集合确定模块310和标识返回模块320。FIG. 3 is a schematic structural diagram of an identification allocating apparatus according to Embodiment 3 of the present invention. This embodiment is applicable to the case of allocating a corresponding identification ID to each service data. The apparatus may include: a current value set
其中,当前数值集合确定模块310,用于在接收到针对业务数据的标识分配请求时,确定业务数据对应的当前数值集合;标识返回模块320,用于读取当前数值集合中存储的最小的数值,并删除当前数值集合中读取的数值,将读取到的数值作为业务数据的标识进行返回;其中,当前数值集合中的数值根据存储的业务数据对应的目标终止数值和第一预设存储数量预先生成。Wherein, the current value set
可选地,当前数值集合确定模块310包括:Optionally, the current value set
目标第一数据库标识获取单元,用于获取服务器中存储的目标第一数据库标识;a target first database identifier acquisition unit, used for acquiring the target first database identifier stored in the server;
当前数值集合确定单元,用于基于预设的业务标识与数值集合之间的对应关系和业务数据对应的目标业务标识,从目标第一数据库标识对应的目标第一数据库中,确定目标业务标识对应的当前数值集合。The current value set determining unit is configured to, based on the preset correspondence between the service identifier and the value set and the target service identifier corresponding to the service data, determine the corresponding target service identifier from the target first database corresponding to the target first database identifier the current set of values.
可选地,目标第一数据库标识获取单元,具体用于:获取服务器集群中的目标服务器中存储的目标第一数据库标识,其中服务器集群中的每台服务器均是采用Zookeeper协调服务技术的服务器。Optionally, the target first database identifier acquisition unit is specifically configured to: acquire the target first database identifier stored in the target server in the server cluster, wherein each server in the server cluster is a server using the Zookeeper coordination service technology.
可选地,数值集合为队列结构的数值队列;相应地,标识返回模块320,具体用于:取出当前数值队列中一个数值,并将取出的数值作为业务数据的标识进行返回,其中,当前数值队列中的各个数值从小到大依次排列。Optionally, the value set is a value queue of a queue structure; correspondingly, the
可选地,该装置还包括:数值确定模块,具体用于:Optionally, the device further includes: a numerical value determination module, which is specifically used for:
获取服务器中存储的目标第二数据库标识;根据预设的业务标识与终止数值之间的对应关系和业务数据对应的目标业务标识,从目标第二数据库标识对应的目标第二数据库中,获取目标业务标识对应的目标终止数值;基于预设数值间隔,将目标终止数值和目标终止数值之前的第二预设存储数量的数值均作为当前数值集合中的数值,其中第二预设存储数量为第一预设存储数量与1的差值。Obtain the target second database identifier stored in the server; according to the preset correspondence between the service identifier and the termination value and the target service identifier corresponding to the service data, obtain the target second database from the target second database corresponding to the target second database identifier The target termination value corresponding to the service identifier; based on the preset value interval, the target termination value and the value of the second preset storage quantity before the target termination value are both used as the values in the current value set, wherein the second preset storage quantity is the first A difference between the preset storage quantity and 1.
可选地,该装置还包括:Optionally, the device also includes:
数值补充模块,用于在将读取到的数值作为业务数据的标识进行返回之后,在检测到当前数值集合满足预设补充条件时,根据存储的业务数据对应的目标终止数值,对当前数值集合进行数值补充。The value supplement module is used to, after returning the read value as the identifier of the business data, when it is detected that the current value set meets the preset supplementary condition, according to the target termination value corresponding to the stored business data, the current value set is Numerical additions are made.
可选地,数值补充模块具体包括:Optionally, the numerical supplementary module specifically includes:
目标终止数值更新单元,用于根据存储的业务数据对应的目标终止数值和第三预设存储数量确定第一终止数值,并将存储的目标终止数值更新为第一终止数值;The target termination value updating unit is used to determine the first termination value according to the target termination value corresponding to the stored business data and the third preset storage quantity, and update the stored target termination value to the first termination value;
数值补充单元,用于根据更新后的目标终止数值和第三预设存储数量生成各个目标数值,并将各目标数值补充至当前数值集合中。The value supplementing unit is configured to generate each target value according to the updated target termination value and the third preset storage quantity, and supplement each target value to the current value set.
可选地,数值补充模块,还具体用于:检测当前是否存在业务数据对应的预加载标识;若是,则停止对当前数值集合进行数值补充的操作;若否,则设置预加载标识,根据存储的业务数据对应的目标终止数值,对当前数值集合进行数值补充,并在补充结束后,删除预设加载标识。Optionally, the value supplement module is also specifically used to: detect whether there is currently a preloading flag corresponding to the business data; if so, stop the operation of performing value supplementation on the current value set; if not, set the preloading flag, according to the storage The target termination value corresponding to the business data of the current value is supplemented to the current value set, and after the supplement is completed, the preset loading flag is deleted.
可选地,该装置还包括:Optionally, the device also includes:
目标终止数值存储模块,用于在将存储的目标终止数值更新为第一终止数值之后,将当次数值补充时更新后的目标终止数值存储至服务器中;相应地,该装置包括:The target termination value storage module is used to store the updated target termination value in the server when the number of times value is supplemented after updating the stored target termination value to the first termination value; Correspondingly, the device includes:
第二终止数值确定模块,用于在进行下次数值补充时,若用于存储目标终止数值的目标第二数据库存在异常情况,则根据服务器中存储的最大目标终止数值和第三预设存储数量确定出第二终止数值;The second termination value determination module is configured to, when performing the next value supplementation, if there is an abnormality in the target second database used for storing the target termination value, according to the maximum target termination value stored in the server and the third preset storage quantity determining the second termination value;
第二终止数值存储模块,用于将第二终止数值存储至备用第二数据库中业务数据对应的存储位置处,并基于第二终止数值对当前数值集合进行数值补充;The second termination value storage module is used to store the second termination value in the storage location corresponding to the business data in the standby second database, and perform numerical supplementation on the current value set based on the second termination value;
目标第二数据库标识更新模块,用于将服务器中存储的目标第二数据库标识更新为备用第二数据库对应的标识。The target second database identifier updating module is configured to update the target second database identifier stored in the server to the identifier corresponding to the standby second database.
可选地,该装置还包括:Optionally, the device also includes:
目标第一数据库切换模块,用于在从目标第一数据库标识对应的目标第一数据库中,确定目标业务标识对应的当前数值集合时,若目标第一数据库存在异常情况,则根据存储的业务数据对应的目标终止数值,对备用第一数据库中的业务数据对应的当前数值集合进行数值补充;The target first database switching module is used to determine the current value set corresponding to the target service identifier in the target first database corresponding to the target first database identifier, if there is an abnormal situation in the target first database, according to the stored service data The corresponding target termination value is used to supplement the current value set corresponding to the business data in the standby first database;
目标第一数据库标识更新模块,用于将服务器中存储的目标第一数据库标识更新为备用第一数据库对应的标识,以从备用第一数据库中确定出目标业务标识对应的当前数值集合。The target first database identifier updating module is used to update the target first database identifier stored in the server to the identifier corresponding to the standby first database, so as to determine the current value set corresponding to the target service identifier from the standby first database.
可选地,目标第一数据库切换模块,具体用于:Optionally, the target first database switching module is specifically used for:
检测当前是否存在第一数据库切换标识;若是,则停止对备用第一数据库中的业务数据对应的当前数值集合进行数值补充的操作;若否,则设置第一数据库切换标识,根据存储的业务数据对应的目标终止数值,对备用第一数据库中的业务数据对应的当前数值集合进行数值补充,并在补充结束后,删除第一数据库切换标识。Detect whether there is currently a first database switching identifier; if so, stop the operation of performing value supplementation on the current value set corresponding to the business data in the standby first database; if not, set the first database switching identifier, according to the stored business data The corresponding target termination value is used to supplement the current value set corresponding to the business data in the standby first database, and after the supplement is completed, the first database switching identifier is deleted.
本发明实施例所提供的标识分配装置可执行本发明任意实施例所提供的标识分配方法,具备执行标识分配方法相应的功能模块和有益效果。The identification distribution apparatus provided by the embodiment of the present invention can execute the identification distribution method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the identification distribution method.
实施例四Embodiment 4
图4为本发明实施例四提供的一种设备的结构示意图。图4示出了适于用来实现本发明实施方式的示例性设备12的框图。图4显示的设备12仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。FIG. 4 is a schematic structural diagram of a device according to Embodiment 4 of the present invention. Figure 4 shows a block diagram of an
如图4所示,设备12以通用计算设备的形式表现。设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in FIG. 4,
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。
设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)30和/或高速缓存存储器32。设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图4未显示,通常称为“硬盘驱动器”)。尽管图4中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。系统存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如系统存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本发明所描述的实施例中的功能和/或方法。A program/
设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该设备12交互的设备通信,和/或与使得该设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与设备12的其它模块通信。应当明白,尽管图中未示出,可以结合设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现本发实施例所提供的一种标识分配方法步骤,该方法包括:The
在接收到针对业务数据的标识分配请求时,确定业务数据对应的当前数值集合;When receiving the identification allocation request for the business data, determine the current value set corresponding to the business data;
读取当前数值集合中存储的最小的数值,并删除当前数值集合中读取的数值,将读取到的数值作为业务数据的标识进行返回;Read the smallest value stored in the current value set, delete the value read in the current value set, and return the read value as the identifier of the business data;
其中,当前数值集合中的数值根据存储的业务数据对应的目标终止数值和第一预设存储数量预先生成。The values in the current value set are pre-generated according to the target termination value corresponding to the stored service data and the first preset storage quantity.
当然,本领域技术人员可以理解,处理器还可以实现本发明任意实施例所提供的标识分配方法的技术方案。Of course, those skilled in the art can understand that the processor can also implement the technical solution of the identification allocation method provided by any embodiment of the present invention.
实施例五Embodiment 5
本实施例五提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明任意实施例所提供的标识分配方法步骤,该方法包括:The fifth embodiment provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the steps of the identification allocation method provided by any embodiment of the present invention, and the method includes:
在接收到针对业务数据的标识分配请求时,确定业务数据对应的当前数值集合;When receiving the identification allocation request for the business data, determine the current value set corresponding to the business data;
读取当前数值集合中存储的最小的数值,并删除当前数值集合中读取的数值,将读取到的数值作为业务数据的标识进行返回;Read the smallest value stored in the current value set, delete the value read in the current value set, and return the read value as the identifier of the business data;
其中,当前数值集合中的数值根据存储的业务数据对应的目标终止数值和第一预设存储数量预先生成。The values in the current value set are pre-generated according to the target termination value corresponding to the stored service data and the first preset storage quantity.
本发明实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是但不限于:电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium in the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional Procedural programming language - such as the "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (eg, through the Internet using an Internet service provider) connect).
本领域普通技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个计算装置上,或者分布在多个计算装置所组成的网络上,可选地,他们可以用计算机装置可执行的程序代码来实现,从而可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件的结合。Those of ordinary skill in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device, and they can be centralized on a single computing device, or distributed on a network composed of multiple computing devices. Optionally, they may be implemented in program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be fabricated separately into individual integrated circuit modules, or a plurality of modules of them Or the steps are made into a single integrated circuit module to realize. As such, the present invention is not limited to any specific combination of hardware and software.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope is determined by the scope of the appended claims.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910481673.6A CN112035460B (en) | 2019-06-04 | 2019-06-04 | A method, device, equipment and storage medium for assigning identification |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910481673.6A CN112035460B (en) | 2019-06-04 | 2019-06-04 | A method, device, equipment and storage medium for assigning identification |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112035460A true CN112035460A (en) | 2020-12-04 |
CN112035460B CN112035460B (en) | 2025-01-14 |
Family
ID=73575894
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910481673.6A Active CN112035460B (en) | 2019-06-04 | 2019-06-04 | A method, device, equipment and storage medium for assigning identification |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112035460B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113342851A (en) * | 2021-05-28 | 2021-09-03 | 北京银行股份有限公司 | Sequence capacity expansion method |
CN114124541A (en) * | 2021-11-25 | 2022-03-01 | 北京锐安科技有限公司 | Data processing method, device and equipment for rule ID and storage medium |
CN114780557A (en) * | 2022-03-29 | 2022-07-22 | 深信服科技股份有限公司 | Identification determination method, device, equipment and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105447023A (en) * | 2014-08-25 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Service identifier generation method and apparatus |
CN107968847A (en) * | 2017-11-13 | 2018-04-27 | 深圳市华阅文化传媒有限公司 | High Availabitity ID makers and its ID generation methods and device |
CN108243264A (en) * | 2016-12-27 | 2018-07-03 | 中国移动通信有限公司研究院 | Method and system for generating a serial number |
CN109104490A (en) * | 2018-08-29 | 2018-12-28 | 北京达佳互联信息技术有限公司 | Service identification management method, device, electronic equipment and storage medium |
-
2019
- 2019-06-04 CN CN201910481673.6A patent/CN112035460B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105447023A (en) * | 2014-08-25 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Service identifier generation method and apparatus |
CN108243264A (en) * | 2016-12-27 | 2018-07-03 | 中国移动通信有限公司研究院 | Method and system for generating a serial number |
CN107968847A (en) * | 2017-11-13 | 2018-04-27 | 深圳市华阅文化传媒有限公司 | High Availabitity ID makers and its ID generation methods and device |
CN109104490A (en) * | 2018-08-29 | 2018-12-28 | 北京达佳互联信息技术有限公司 | Service identification management method, device, electronic equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
NICK HAO: "分布式系统唯一ID生成方案汇总", pages 6 - 7, Retrieved from the Internet <URL:https://www.cnblogs.com/haoxinyue/p/5208136.html> * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113342851A (en) * | 2021-05-28 | 2021-09-03 | 北京银行股份有限公司 | Sequence capacity expansion method |
CN113342851B (en) * | 2021-05-28 | 2024-04-02 | 北京银行股份有限公司 | Sequence capacity expansion method |
CN114124541A (en) * | 2021-11-25 | 2022-03-01 | 北京锐安科技有限公司 | Data processing method, device and equipment for rule ID and storage medium |
CN114124541B (en) * | 2021-11-25 | 2024-02-09 | 北京锐安科技有限公司 | Data processing method, device and equipment for rule ID and storage medium |
CN114780557A (en) * | 2022-03-29 | 2022-07-22 | 深信服科技股份有限公司 | Identification determination method, device, equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112035460B (en) | 2025-01-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108848039B (en) | Server, message distribution method and storage medium | |
EP4155936B1 (en) | Provisioning using pre-fetched data in serverless computing environments | |
CN112685148B (en) | Asynchronous communication method and device for mass terminals, computer equipment and storage medium | |
CN110706148B (en) | Face image processing method, device, equipment and storage medium | |
CN113590329A (en) | Resource processing method and device | |
CN113438184B (en) | Network card queue management method and device and electronic equipment | |
US11194629B2 (en) | Handling expiration of resources allocated by a resource manager running a data integration job | |
CN112035460A (en) | Identification distribution method, device, equipment and storage medium | |
CN111679911B (en) | Management method, device, equipment and medium of GPU card in cloud environment | |
CN114036195B (en) | A data request processing method, device, server and storage medium | |
CN113760242B (en) | Data processing method, device, server and medium | |
US8543722B2 (en) | Message passing with queues and channels | |
CN110781159B (en) | Ceph directory file information reading method and device, server and storage medium | |
US9754004B2 (en) | Asynchronous notification method for data storage systems | |
CN113760920B (en) | Data synchronization method and device, electronic equipment and storage medium | |
CN114518833A (en) | Method, electronic device and computer program product for storage management | |
CN115878333A (en) | Method, device and equipment for judging consistency between process groups | |
CN116095007A (en) | Load scheduling method, device, computer equipment and storage medium | |
CN118916307B (en) | Descriptor transmission method, device, equipment and storage medium | |
CN113590043B (en) | Data storage method, device, equipment and storage medium | |
CN111008074B (en) | File processing method, device, equipment and medium | |
CN109710673B (en) | Work processing method, device, equipment and medium | |
CN110134691B (en) | Data verification method, device, equipment and medium | |
CN117057815A (en) | Unmanned network virtual seat service method, system, equipment and storage medium | |
CN117149463A (en) | Message processing method, device, computer readable storage medium and terminal equipment |
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 |