[go: up one dir, main page]

CN111506582A - A data storage method and device - Google Patents

A data storage method and device Download PDF

Info

Publication number
CN111506582A
CN111506582A CN201910090893.6A CN201910090893A CN111506582A CN 111506582 A CN111506582 A CN 111506582A CN 201910090893 A CN201910090893 A CN 201910090893A CN 111506582 A CN111506582 A CN 111506582A
Authority
CN
China
Prior art keywords
record
data
identification
identifier
database table
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.)
Withdrawn
Application number
CN201910090893.6A
Other languages
Chinese (zh)
Inventor
叶树军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Potevio Information Technology Co Ltd
Original Assignee
Potevio Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Potevio Information Technology Co Ltd filed Critical Potevio Information Technology Co Ltd
Priority to CN201910090893.6A priority Critical patent/CN111506582A/en
Publication of CN111506582A publication Critical patent/CN111506582A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种数据存储方法和装置,其中方法包括:当数据提供设备首次需要增加数据记录至预设的数据库表时,从数据库表中获取所述设备当前可用的记录标识,利用其将数据记录增加到数据库表中,利用预设的标识扩展数量,对该记录标识进行号码扩展,将所得到的标识号码范围保存在内存中,并将数据库表中该设备可用的记录标识更新为该标识号码范围的最大值加1;当所述设备在首次之后需要增加数据记录至数据库表时,控制当前需要增加数据记录的线程逐一访问内存获取记录标识,并利用该记录标识将数据记录保存至数据库表中,当标识号码范围中的记录标识均被使用时,触发对内存中的标识号码范围进行更新。采用本发明可以减少对数据库访问的压力。

Figure 201910090893

The present application discloses a data storage method and device, wherein the method includes: when a data providing device needs to add a data record to a preset database table for the first time, obtain the currently available record identifier of the device from the database table, and use the The data record is added to the database table, the number of the record identifier is expanded by using the preset number of identifiers, the obtained identifier number range is stored in the memory, and the available record identifier of the device in the database table is updated to The maximum value of the identification number range is increased by 1; when the device needs to add a data record to the database table after the first time, the threads that control the current need to increase the data record access the memory one by one to obtain the record identifier, and use the record identifier to save the data record to In the database table, when all the record identifiers in the identification number range are used, it is triggered to update the identification number range in the memory. By adopting the present invention, the pressure on database access can be reduced.

Figure 201910090893

Description

一种数据存储方法和装置A data storage method and device

技术领域technical field

本发明涉及计算机应用技术,特别是涉及一种数据存储方法和装置。The present invention relates to computer application technology, in particular to a data storage method and device.

背景技术Background technique

采用分布式架构的系统中,数据在存储和读取时都需要一个能够唯一区分数据记录的标识,这个标识通常称为序列号或ID。确保ID的唯一性是在系统设计时,尤其是数据库使用分库分表的时候,需要解决的问题。In a system with a distributed architecture, data needs an identifier that can uniquely distinguish data records when it is stored and read. This identifier is usually called a serial number or ID. Ensuring the uniqueness of the ID is a problem that needs to be solved during system design, especially when the database uses sub-database and sub-table.

目前,在采用分布式架构的系统中,数据提供设备每次向数据库中增加一条新的数据记录时,需要先从数据库中获取可用的数据记录标识,然后,再将该数据记录标识与该新增的数据记录关联在一起增加到数据库中。At present, in a system using a distributed architecture, each time a data providing device adds a new data record to the database, it needs to obtain an available data record identifier from the database first, and then associate the data record identifier with the new data record identifier. Additional data records are added to the database in association.

上述数据记录的增加方法中,由于每增加一条新数据记录时都要先执行ID获取操作,使得在数据高并发场景下,对数据库的访问次数过大,从而导致数据库的访问压力很大。In the above method for adding data records, since the ID acquisition operation must be performed first each time a new data record is added, in the scenario of high data concurrency, the number of accesses to the database is too large, resulting in a great pressure on the access to the database.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的主要目的在于提供一种数据存储方法和装置,可以有效降低新增数据记录对数据库的访问压力。In view of this, the main purpose of the present invention is to provide a data storage method and device, which can effectively reduce the access pressure of newly added data records to the database.

为了达到上述目的,本发明提出的技术方案为:In order to achieve the above object, the technical scheme proposed by the present invention is:

一种数据存储方法,包括:A data storage method comprising:

当数据提供设备首次需要增加数据记录至预设的数据库表时,从所述数据库表中获取所述数据提供设备当前可用的记录标识,利用所述记录标识将所述数据记录增加到所述数据库表中,利用预设的标识扩展数量,对所述记录标识进行号码扩展,将号码扩展得到的标识号码范围保存在所述数据提供设备的内存中,并将所述数据库表中该数据提供设备可用的记录标识更新为所述标识号码范围的最大值加1;所述数据库表至少包括记录标识字段;When the data providing device needs to add a data record to a preset database table for the first time, it acquires the currently available record identifier of the data providing device from the database table, and uses the record identifier to add the data record to the database In the table, use the preset number of identification extensions to perform number expansion on the record identification, save the identification number range obtained by the number expansion in the memory of the data providing device, and store the data providing device in the database table. The available record identification is updated to the maximum value of the identification number range plus 1; the database table at least includes a record identification field;

当数据提供设备在所述首次之后需要增加数据记录至所述数据库表时,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新。;When the data providing device needs to add data records to the database table after the first time, it adopts a synchronous control method to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use the obtained records. The identifier stores the corresponding data records that need to be added into the database table, and when the record identifiers in the identifier number range are all used, triggering the update of the identifier number range in the memory. ;

当数据提供设备在所述首次之后需要增加数据记录至所述数据库表时,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新。When the data providing device needs to add data records to the database table after the first time, it adopts a synchronous control method to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use the obtained records. The identifier stores the corresponding data records that need to be added into the database table, and when the record identifiers in the identifier number range are all used, triggering the update of the identifier number range in the memory.

较佳地,所述标识号码范围为[a,b],其中,a为当前获取的所述记录标识;b=a+n-1,n为所述标识扩展数量。Preferably, the identification number range is [a, b], where a is the currently acquired record identification; b=a+n-1, n is the identification extension number.

较佳地,所述采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新包括:Preferably, the synchronous control method is used to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use the acquired record identifiers to store the corresponding data records that need to be added to the database table. , when the record identifiers in the identification number range are all used, triggering the update of the identification number range in the memory includes:

a1、所述数据提供设备采用同步控制的方式,从本数据提供设备中当前需要增加数据记录的线程中,选择出一个线程,作为当前可以增加数据记录的工作线程,并阻塞其他所述线程;a1, the data providing equipment adopts the mode of synchronous control, selects a thread from the thread that currently needs to increase the data record in this data providing equipment, as the working thread that can currently increase the data record, and blocks other described threads;

a2、从所述数据提供设备的内存中,取出所述标识号码范围中未被取出的最小标识,触发该工作线程使用该最小标识将相应需要增加的数据记录增加至所述数据库表中;当该最小标识等于所述标识号码范围的最大值时,所述数据提供设备从所述数据库表中,重新获取所述数据提供设备对应的可用的记录标识,利用所述标识扩展数量,对重新获取的记录标识进行号码扩展,将内存中的所述标识号码范围替换为当前号码扩展得到的标识号码范围,并将所述数据库表中该数据提供设备可用的记录标识更新为当前号码扩展得到的标识号码范围的最大值加1;a2. From the memory of the data providing device, take out the smallest identifier that has not been taken out in the identifier number range, and trigger the worker thread to use the smallest identifier to add the corresponding data records that need to be added to the database table; when When the minimum identifier is equal to the maximum value of the identifier number range, the data providing device re-acquires the available record identifiers corresponding to the data providing device from the database table, and uses the identifier extension number to re-acquire The record identification carries out number expansion, replaces the identification number range in the memory with the identification number range obtained by the current number expansion, and updates the available record identification of the data providing equipment in the database table to the identification obtained by the current number expansion Add 1 to the maximum value of the number range;

a3、如果当前存在被阻塞的所述线程,则所述数据提供设备采用同步控制的方式,从当前被阻塞的所述线程中,选择出一个线程并唤醒,将该线程作为当前的工作线程,执行步骤a2。a3. If there is currently a blocked thread, the data providing device adopts a synchronous control method to select a thread from the currently blocked threads and wake up, and use the thread as the current working thread, Go to step a2.

较佳地,所述数据提供设备为服务器。Preferably, the data providing device is a server.

一种数据存储装置,设于数据提供设备中,包括:A data storage device, set in a data providing device, includes:

第一单元,当数据提供设备首次需要增加数据记录至预设的数据库表时,从所述数据库表中获取所述数据提供设备当前可用的记录标识,利用所述记录标识将所述数据记录增加到所述数据库表中,利用预设的标识扩展数量,对所述记录标识进行号码扩展,将号码扩展得到的标识号码范围保存在所述数据提供设备的内存中,并将所述数据库表中该数据提供设备可用的记录标识更新为所述标识号码范围的最大值加1;所述数据库表至少包括记录标识字段;The first unit, when the data providing device needs to add a data record to a preset database table for the first time, obtains the currently available record identifier of the data providing device from the database table, and uses the record identifier to add the data record. In the database table, use the preset number of identification extensions to perform number expansion on the record identification, save the identification number range obtained by the number expansion in the memory of the data providing device, and store the data in the database table. The record identification available to the data providing device is updated to the maximum value of the identification number range plus 1; the database table at least includes a record identification field;

第二单元,当数据提供设备在所述首次之后需要增加数据记录至所述数据库表时,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新。The second unit, when the data providing device needs to add data records to the database table after the first time, adopts a synchronous control method to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use all The acquired record identifiers store corresponding data records that need to be added in the database table, and when all record identifiers in the identifier number range are used, triggering the update of the identifier number range in the memory.

较佳地,所述标识号码范围为[a,b],其中,a为当前获取的所述记录标识;b=a+n-1,n为所述标识扩展数量。Preferably, the identification number range is [a, b], where a is the currently acquired record identification; b=a+n-1, n is the identification extension number.

较佳地,所述第二单元,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新包括:Preferably, the second unit adopts a synchronous control method to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use the acquired record identifiers to store the corresponding data records that need to be added to the memory. In the database table, when the record identifiers in the identification number range are all used, triggering the update of the identification number range in the memory includes:

a1、所述数据提供设备采用同步控制的方式,从本数据提供设备中当前需要增加数据记录的线程中,选择出一个线程,作为当前可以增加数据记录的工作线程,并阻塞其他所述线程;a1, the data providing equipment adopts the mode of synchronous control, selects a thread from the thread that currently needs to increase the data record in this data providing equipment, as the working thread that can currently increase the data record, and blocks other described threads;

a2、从所述数据提供设备的内存中,取出所述标识号码范围中未被取出的最小标识,触发该工作线程使用该最小标识将相应需要增加的数据记录增加至所述数据库表中;当该最小标识等于所述标识号码范围的最大值时,所述数据提供设备从所述数据库表中,重新获取所述数据提供设备对应的可用的记录标识,利用所述标识扩展数量,对重新获取的记录标识进行号码扩展,将内存中的所述标识号码范围替换为当前号码扩展得到的标识号码范围,并将所述数据库表中该数据提供设备可用的记录标识更新为当前号码扩展得到的标识号码范围的最大值加1;a2. From the memory of the data providing device, take out the smallest identifier that has not been taken out in the identifier number range, and trigger the worker thread to use the smallest identifier to add the corresponding data records that need to be added to the database table; when When the minimum identifier is equal to the maximum value of the identifier number range, the data providing device re-acquires the available record identifiers corresponding to the data providing device from the database table, and uses the identifier extension number to re-acquire The record identification carries out number expansion, replaces the identification number range in the memory with the identification number range obtained by the current number expansion, and updates the available record identification of the data providing equipment in the database table to the identification obtained by the current number expansion Add 1 to the maximum value of the number range;

a3、如果当前存在被阻塞的所述线程,则所述数据提供设备采用同步控制的方式,从当前被阻塞的所述线程中,选择出一个线程并唤醒,将该线程作为当前的工作线程,执行步骤a2。a3. If there is currently a blocked thread, the data providing device adopts a synchronous control method to select a thread from the currently blocked threads and wake up, and use the thread as the current working thread, Go to step a2.

较佳地,所述数据提供设备为服务器。Preferably, the data providing device is a server.

一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储指令,所述指令在由处理器执行时使得所述处理器执行上述的数据存储方法的步骤。A non-volatile computer-readable storage medium stores instructions that, when executed by a processor, cause the processor to perform the steps of the above-described data storage method.

一种电子设备,包括如上述的非易失性计算机可读存储介质、以及可访问所述非易失性计算机可读存储介质的所述处理器。An electronic device includes a non-volatile computer-readable storage medium as described above, and the processor accessible to the non-volatile computer-readable storage medium.

综上所述,本发明提出的数据存储方案,在从数据库中获取的记录标识的基础上,进行号码扩展,生成一段标识号码段,并保存在内存中,这样,数据提供设备通过一次访问数据库,可以获得多个可用的数据记录标识资源,而不是一个标识,并保存在内存中,如此,数据提供设备每次需要增加数据记录到数据库时,只需要从自身的内存中获取可用的数据记录标识即可,只有在内存中的标识号码段中的标识全被使用完后,才从数据库中请求新的可用数据记录标识,再利用新获得的标识,生成一段标识号码段并保存至内存中。因此,可以减少对数据库的访问次数,从而可以在数据高并发场景下,降低对数据库的访问压力,并且易于实现。To sum up, the data storage scheme proposed by the present invention performs number expansion on the basis of the record identification obtained from the database, generates a segment of identification number, and saves it in the memory. In this way, the data providing device can access the database once , you can obtain multiple available data record identification resources instead of one identification, and save them in the memory. In this way, each time the data providing device needs to add data records to the database, it only needs to obtain the available data records from its own memory. Only after all the identification numbers in the identification number segment in the memory are used, the new available data record identification is requested from the database, and then the newly obtained identification is used to generate an identification number segment and save it in the memory. . Therefore, the number of accesses to the database can be reduced, so that the access pressure on the database can be reduced in a scenario of high data concurrency, and it is easy to implement.

附图说明Description of drawings

图1为本发明实施例的方法流程示意图;1 is a schematic flowchart of a method according to an embodiment of the present invention;

图2为本发明实施例的装置结构示意图。FIG. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图及具体实施例对本发明作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

图1为本发明实施例的方法流程示意图,如图1所示,该实施例实现的数据存储方法主要包括:FIG. 1 is a schematic flowchart of a method according to an embodiment of the present invention. As shown in FIG. 1 , the data storage method implemented by this embodiment mainly includes:

步骤101、当数据提供设备首次需要增加数据记录至预设的数据库表时,从所述数据库表中获取所述数据提供设备当前可用的记录标识,利用所述记录标识将所述数据记录增加到所述数据库表中,利用预设的标识扩展数量,对所述记录标识进行号码扩展,将号码扩展得到的标识号码范围保存在所述数据提供设备的内存中,并将所述数据库表中该数据提供设备可用的记录标识更新为所述标识号码范围的最大值加1。Step 101: When the data providing device needs to add a data record to a preset database table for the first time, obtain the currently available record identifier of the data providing device from the database table, and use the record identifier to add the data record to the preset database table. In the database table, use the preset number of identification extensions to perform number expansion on the record identification, save the identification number range obtained by the number expansion in the memory of the data providing device, and store the number in the database table. The record identification available to the data providing device is updated to the maximum value of the identification number range plus one.

所述数据库表至少包括记录标识字段,但不限于此,还可以根据实际应用需要设置其他字段,如在微服务应用场景下,为便于生成全局标识,还可以包括微服务标识字段(用于区分不用的微服务应用服务器)、功能模块标识模块(用于区分不同的服务提供渠道)等,将这些字段组合可以生成全局标识,以方便数据库的全局检索。另外,为了提高检索效率,上述字段都可以采用编码的方式表征。The database table includes at least a record identification field, but is not limited to this, and other fields can also be set according to actual application needs. For example, in a microservice application scenario, in order to facilitate the generation of a global identification, it These fields can be combined to generate a global identifier to facilitate the global retrieval of the database. In addition, in order to improve retrieval efficiency, the above fields can be represented by coding.

本步骤中,数据提供设备首次需要增加数据记录至预设的数据库表时,在获得本数据提供设备当前可用的记录标识后,不仅利用该记录标识将需要增加的数据记录保存至数据库表中,还需要基于该记录标识进行号码扩展,得到一个标识号码范围(即一段标识号码),该标识号码范围所包含的标识号将作为预先分配给该数据提供设备的记录标识保存在内存中,同时需要将数据库表中该数据提供设备可用的记录标识更新为该标识号码范围的下一个标识号,即该标识号码范围的最大值加一,这样,该标识号码范围中的标识号不会再分配给其他数据提供设备使用。如此,相当于一次数据库的访问可以获取一段数据记录标识资源使用,从而可以大幅度减少数据提供设备对数据库的访问次数,进而降低对数据库的访问压力。In this step, when the data providing device needs to add data records to the preset database table for the first time, after obtaining the currently available record identifier of the data providing device, it not only uses the record identifier to save the data record to be added in the database table, It is also necessary to carry out number expansion based on the record identification to obtain an identification number range (that is, a section of identification number), and the identification number contained in the identification number range will be stored in the memory as the record identification pre-allocated to the data providing device. Update the available record identification of the data providing device in the database table to the next identification number in the identification number range, that is, add one to the maximum value of the identification number range, so that the identification number in the identification number range will not be assigned to Other data provides device usage. In this way, equivalent to one database access, a segment of data record can be obtained to identify resource usage, thereby greatly reducing the number of accesses to the database by the data providing device, thereby reducing the access pressure on the database.

较佳地,所述标识号码范围可以表示为[a,b]。Preferably, the identification number range can be expressed as [a,b].

其中,a为当前获取的所述记录标识,即所述所述标识号码范围的最小值。Wherein, a is the currently acquired record identifier, that is, the minimum value of the identifier number range.

b为所述标识号码范围的最大值,b=a+n-1。b is the maximum value of the identification number range, b=a+n-1.

n为所述预设的标识扩展数量,该值可由本领域技术人员根据实际需要进行设置。n is the preset number of identification extensions, and the value can be set by those skilled in the art according to actual needs.

具体地,所述数据提供设备可以为服务器,不限于此,也可以为其他可以向数据库中存储数据的设备。Specifically, the data providing device may be a server, which is not limited thereto, and may also be other devices that can store data in a database.

下面结合一具体应用场景对本实施例中标识号码范围的具体生成方法进行详细说明:The specific generation method of the identification number range in this embodiment will be described in detail below in conjunction with a specific application scenario:

应用场景:微服务应用场景。Application Scenario: Microservice application scenario.

所述数据提供设备为微服务服务器,需要访问的数据库表至少具有两个字段,记录标识字段和微服务标识(address)字段。The data providing device is a microservice server, and the database table to be accessed has at least two fields, a record identification field and a microservice identification (address) field.

其中,记录标识字段属于主键,自增设置,bigint无符号类型。Among them, the record identification field belongs to the primary key, auto-increment setting, bigint unsigned type.

address字段是注册的微服务名称标识,字符串类型,表中唯一索引。The address field is the registered microservice name identifier, string type, and unique index in the table.

具体地,基于MySQL语言,该数据库表对应的表结构如下:Specifically, based on the MySQL language, the table structure corresponding to the database table is as follows:

CREATE TABLE uid_microservice(CREATE TABLE uid_microservice(

`id`bigint(20)unsigned NOT NULL auto_increment,`id` bigint(20) unsigned NOT NULL auto_increment,

`address`varchar(20)NOT NULL default”,`address`varchar(20) NOT NULL default",

PRIMARY KEY(`id`),PRIMARY KEY(`id`),

UNIQUE KEY`address`(`address`)UNIQUE KEY `address`(`address`)

)ENGINE=MyISAM;)ENGINE=MyISAM;

当微服务服务器首次向数据库中增加数据时,需要通过SELECT查询语句查询出相应微服务对象的记录标识ID,如:SELECT id FROM uid_microservice WHERE address="pt_ums_service"。When the microservice server adds data to the database for the first time, it needs to query the record ID of the corresponding microservice object through the SELECT query statement, such as: SELECT id FROM uid_microservice WHERE address="pt_ums_service".

然后,利用取出的ID增加数据记录至数据库表中,并对取出的ID进行号码扩展,例如,取出的ID值为1000,如果所设置的标识扩展数量为1000,即想要每次生成1000个ID,则对应的标识号码范围是1000-1999,将这个标识号码范围保存到内存中;同时,使用REPLACEINTO语句更新数据库表中address="pt_ums_service"的ID为2000。Then, use the ID taken out to add data records to the database table, and perform number expansion on the ID taken out. For example, if the ID value taken out is 1000, if the number of ID extensions set is 1000, that is, you want to generate 1000 IDs each time ID, the corresponding identification number range is 1000-1999, save this identification number range in the memory; at the same time, use the REPLACEINTO statement to update the ID of address="pt_ums_service" in the database table to 2000.

步骤102、当数据提供设备在所述首次之后需要增加数据记录至所述数据库表时,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新。Step 102, when the data providing device needs to add data records to the database table after the first time, the method of synchronous control is adopted to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use all the records. The acquired record identifiers store corresponding data records that need to be added in the database table, and when all record identifiers in the identifier number range are used, triggering the update of the identifier number range in the memory.

本步骤中,考虑到当数据提供设备中有多个线程并发从内存中获取记录标识时,会存在多个线程从设备内存中获取相同的ID,从而会导致数据操作出现错误,采用了同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,以确保各线程所使用的ID具有唯一性,从而可以有效避免数据增加操作的错误。In this step, considering that when there are multiple threads in the data providing device concurrently acquiring the record ID from the memory, there will be multiple threads acquiring the same ID from the device memory, which will lead to errors in data operations, so synchronization control is adopted. In this way, the threads that currently need to add data records are controlled to access the memory one by one to obtain the corresponding available record identifiers, so as to ensure that the IDs used by each thread are unique, so that errors in data addition operations can be effectively avoided.

在实际应用中,具体可以利用JAVA语言中AtomicLong的原子特性,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识。具体实现方法为本领域技术人员所掌握。In practical applications, the atomic feature of AtomicLong in the JAVA language can be used to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers. The specific implementation method is mastered by those skilled in the art.

较佳地,本步骤中,对于采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新,具体可以采用下述方法实现:Preferably, in this step, for the method of synchronous control, the threads that control the current need to increase data records access the memory one by one to obtain the corresponding available record identifiers, and use the acquired record identifiers to store the corresponding data records that need to be added to all the records. In the described database table, when the record identification in the described identification number range is all used, trigger to the described identification number range in the memory to be updated, specifically can adopt the following method to realize:

步骤1021、所述数据提供设备采用同步控制的方式,从本数据提供设备中当前需要增加数据记录的线程中,选择出一个线程,作为当前可以增加数据记录的工作线程,并阻塞其他所述线程。Step 1021, the data providing device adopts a synchronous control method, selects a thread from the threads that currently need to add data records in the data providing device, as the working thread that can currently add data records, and blocks other described threads .

步骤1022、从所述数据提供设备的内存中,取出所述标识号码范围中未被取出的最小标识,触发该工作线程使用该最小标识将相应需要增加的数据记录增加至所述数据库表中;当该最小标识等于所述标识号码范围的最大值时,所述数据提供设备从所述数据库表中,重新获取所述数据提供设备对应的可用的记录标识,利用所述标识扩展数量,对重新获取的记录标识进行号码扩展,将内存中的所述标识号码范围替换为当前号码扩展得到的标识号码范围,并将所述数据库表中该数据提供设备可用的记录标识更新为当前号码扩展得到的标识号码范围的最大值加1。Step 1022, from the memory of the data providing device, take out the minimum mark that has not been taken out in the identification number range, and trigger the worker thread to use the minimum mark to add the corresponding data records that need to be added to the database table; When the minimum identifier is equal to the maximum value of the identifier number range, the data providing device re-acquires the available record identifiers corresponding to the data providing device from the database table, and uses the identifier to expand the number of new records. The obtained record identification carries out number expansion, and the identification number range in the memory is replaced by the identification number scope obtained by the current number expansion, and the available record identification of the data providing equipment in the database table is updated to the current number expansion obtained. The maximum value of the identification number range is incremented by 1.

步骤1023、如果当前存在被阻塞的所述线程,则所述数据提供设备采用同步控制的方式,从当前被阻塞的所述线程中,选择出一个线程并唤醒,将该线程作为当前的工作线程,执行步骤1022。Step 1023: If there is currently a blocked thread, the data providing device adopts a synchronous control method to select a thread from the currently blocked threads and wake up, and use the thread as the current working thread. , and step 1022 is executed.

采用上述方法实施例可以减少向数据库中增加数据时对数据库的访问次数,从而可以在数据高并发场景下,降低对数据库的访问压力。Using the above method embodiments can reduce the number of accesses to the database when adding data to the database, thereby reducing the access pressure to the database in a scenario of high data concurrency.

图2为与上述方法相对应的一种数据存储装置,该装置设于数据提供设备中,包括:Fig. 2 is a kind of data storage device corresponding to the above-mentioned method, and this device is provided in the data providing equipment, including:

第一单元,当数据提供设备首次需要增加数据记录至预设的数据库表时,从所述数据库表中获取所述数据提供设备当前可用的记录标识,利用所述记录标识将所述数据记录增加到所述数据库表中,利用预设的标识扩展数量,对所述记录标识进行号码扩展,将号码扩展得到的标识号码范围保存在所述数据提供设备的内存中,并将所述数据库表中该数据提供设备可用的记录标识更新为所述标识号码范围的最大值加1;所述数据库表至少包括记录标识字段。The first unit, when the data providing device needs to add a data record to a preset database table for the first time, obtains the currently available record identifier of the data providing device from the database table, and uses the record identifier to add the data record. In the database table, use the preset number of identification extensions to perform number expansion on the record identification, save the identification number range obtained by the number expansion in the memory of the data providing device, and store the data in the database table. The record identifier available to the data providing device is updated to the maximum value of the identifier number range plus 1; the database table at least includes a record identifier field.

第二单元,当数据提供设备在所述首次之后需要增加数据记录至所述数据库表时,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新。The second unit, when the data providing device needs to add data records to the database table after the first time, adopts a synchronous control method to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use The acquired record identifier saves the corresponding data record that needs to be added in the database table, and when all record identifiers in the identifier number range are used, it is triggered to update the identifier number range in the memory.

较佳地,所述标识号码范围为[a,b]。Preferably, the range of the identification number is [a,b].

其中,a为当前获取的所述记录标识;b=a+n-1,n为所述标识扩展数量。Wherein, a is the currently acquired record identifier; b=a+n-1, and n is the identifier extension number.

较佳地,所述第二单元,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新包括:Preferably, the second unit adopts a synchronous control method to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use the acquired record identifiers to store the corresponding data records that need to be added to the memory. In the database table, when the record identifiers in the identification number range are all used, triggering the update of the identification number range in the memory includes:

步骤a1、所述数据提供设备采用同步控制的方式,从本数据提供设备中当前需要增加数据记录的线程中,选择出一个线程,作为当前可以增加数据记录的工作线程,并阻塞其他所述线程。Step a1, the data providing equipment adopts the mode of synchronous control, selects a thread from the thread that currently needs to increase the data record in the data providing equipment, as the working thread that can currently increase the data record, and blocks other described threads .

步骤a2、从所述数据提供设备的内存中,取出所述标识号码范围中未被取出的最小标识,触发该工作线程使用该最小标识将相应需要增加的数据记录增加至所述数据库表中;当该最小标识等于所述标识号码范围的最大值时,所述数据提供设备从所述数据库表中,重新获取所述数据提供设备对应的可用的记录标识,利用所述标识扩展数量,对重新获取的记录标识进行号码扩展,将内存中的所述标识号码范围替换为当前号码扩展得到的标识号码范围,并将所述数据库表中该数据提供设备可用的记录标识更新为当前号码扩展得到的标识号码范围的最大值加1。Step a2, from the memory of the data providing device, take out the minimum mark that has not been taken out in the range of the identification number, trigger the working thread to use the minimum mark to add the corresponding data record that needs to be added to the database table; When the minimum identifier is equal to the maximum value of the identifier number range, the data providing device re-acquires the available record identifiers corresponding to the data providing device from the database table, and uses the identifier to expand the number of new records. The obtained record identification carries out number expansion, and the identification number range in the memory is replaced by the identification number scope obtained by the current number expansion, and the available record identification of the data providing equipment in the database table is updated to the current number expansion obtained. The maximum value of the identification number range is incremented by 1.

步骤a3、如果当前存在被阻塞的所述线程,则所述数据提供设备采用同步控制的方式,从当前被阻塞的所述线程中,选择出一个线程并唤醒,将该线程作为当前的工作线程,执行步骤a2。Step a3: If there is currently a blocked thread, the data providing device adopts a synchronous control method, selects a thread from the currently blocked thread and wakes up, and uses the thread as the current working thread. , go to step a2.

较佳地,所述数据提供设备为服务器。Preferably, the data providing device is a server.

本发明实施例还提供一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储指令,所述指令在由处理器执行时使得所述处理器执行上述的数据存储方法实施例的步骤。Embodiments of the present invention further provide a non-volatile computer-readable storage medium, where the non-volatile computer-readable storage medium stores instructions, which, when executed by a processor, cause the processor to execute the above-mentioned data Store the steps of a method embodiment.

相应地,本发明实施例还提供一种电子设备,包括如上述的非易失性计算机可读存储介质、以及可访问所述非易失性计算机可读存储介质的所述处理器。Correspondingly, an embodiment of the present invention further provides an electronic device, including the non-volatile computer-readable storage medium as described above, and the processor that can access the non-volatile computer-readable storage medium.

综上所述,本发明提出的数据存储方案,在从数据库中获取的记录标识的基础上,进行号码扩展,生成一标识号码段,并保存在内存中,这样,数据提供设备每次需要增加数据记录到数据库时,只需要从自身的内存中获取可用的数据记录标识即可,只有在内存中的标识号码段中的标识全被使用完后,才从数据库中请求新的可用数据记录标识,再利用新获得的标识,生成一段标识号码段并保存至内存中。这样,可以减少对数据库的访问次数,从而可以在数据高并发场景下,降低对数据库的访问压力。To sum up, the data storage scheme proposed by the present invention performs number expansion on the basis of the record identification obtained from the database, generates an identification number segment, and saves it in the memory. In this way, the data providing equipment needs to increase each time. When the data is recorded to the database, it is only necessary to obtain the available data record identifiers from its own memory. Only after the identifiers in the identification number segment in the memory are all used, the new available data record identifiers are requested from the database. , and then use the newly obtained identification to generate an identification number segment and save it to the memory. In this way, the number of accesses to the database can be reduced, thereby reducing the access pressure to the database in the scenario of high data concurrency.

综上所述,以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。To sum up, the above are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1.一种数据存储方法,其特征在于,包括:1. a data storage method, is characterized in that, comprises: 当数据提供设备首次需要增加数据记录至预设的数据库表时,从所述数据库表中获取所述数据提供设备当前可用的记录标识,利用所述记录标识将所述数据记录增加到所述数据库表中,利用预设的标识扩展数量,对所述记录标识进行号码扩展,将号码扩展得到的标识号码范围保存在所述数据提供设备的内存中,并将所述数据库表中该数据提供设备可用的记录标识更新为所述标识号码范围的最大值加1;所述数据库表至少包括记录标识字段;When the data providing device needs to add a data record to a preset database table for the first time, it acquires the currently available record identifier of the data providing device from the database table, and uses the record identifier to add the data record to the database In the table, use the preset number of identification extensions to perform number expansion on the record identification, save the identification number range obtained by the number expansion in the memory of the data providing device, and store the data providing device in the database table. The available record identification is updated to the maximum value of the identification number range plus 1; the database table at least includes a record identification field; 当数据提供设备在所述首次之后需要增加数据记录至所述数据库表时,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新。When the data providing device needs to add data records to the database table after the first time, it adopts a synchronous control method to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use the obtained records. The identifier stores the corresponding data records that need to be added into the database table, and when the record identifiers in the identifier number range are all used, triggering the update of the identifier number range in the memory. 2.根据权利要求1所述的方法,其特征在于,所述标识号码范围为[a,b],其中,a为当前获取的所述记录标识;b=a+n-1,n为所述标识扩展数量。2. The method according to claim 1, wherein the identification number range is [a, b], wherein a is the currently acquired record identification; b=a+n-1, n is the Describe the number of ID extensions. 3.根据权利要求1所述的方法,其特征在于,所述采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新包括:3. method according to claim 1, is characterized in that, described adopting the mode of synchronous control, control the thread that currently needs to increase data record to access memory one by one to obtain corresponding available record identification, and utilize the acquired record identification to correspond to The data records that need to be added are stored in the database table, and when the record identifiers in the identification number range are all used, triggering the update of the identification number range in the memory includes: a1、所述数据提供设备采用同步控制的方式,从本数据提供设备中当前需要增加数据记录的线程中,选择出一个线程,作为当前可以增加数据记录的工作线程,并阻塞其他所述线程;a1, the data providing equipment adopts the mode of synchronous control, selects a thread from the thread that currently needs to increase the data record in this data providing equipment, as the working thread that can currently increase the data record, and blocks other described threads; a2、从所述数据提供设备的内存中,取出所述标识号码范围中未被取出的最小标识,触发该工作线程使用该最小标识将相应需要增加的数据记录增加至所述数据库表中;当该最小标识等于所述标识号码范围的最大值时,所述数据提供设备从所述数据库表中,重新获取所述数据提供设备对应的可用的记录标识,利用所述标识扩展数量,对重新获取的记录标识进行号码扩展,将内存中的所述标识号码范围替换为当前号码扩展得到的标识号码范围,并将所述数据库表中该数据提供设备可用的记录标识更新为当前号码扩展得到的标识号码范围的最大值加1;a2. From the memory of the data providing device, take out the smallest identifier that has not been taken out in the identifier number range, and trigger the worker thread to use the smallest identifier to add the corresponding data records that need to be added to the database table; when When the minimum identifier is equal to the maximum value of the identifier number range, the data providing device re-acquires the available record identifiers corresponding to the data providing device from the database table, and uses the identifier extension number to re-acquire The record identification carries out number expansion, replaces the identification number range in the memory with the identification number range obtained by the current number expansion, and updates the available record identification of the data providing equipment in the database table to the identification obtained by the current number expansion Add 1 to the maximum value of the number range; a3、如果当前存在被阻塞的所述线程,则所述数据提供设备采用同步控制的方式,从当前被阻塞的所述线程中,选择出一个线程并唤醒,将该线程作为当前的工作线程,执行步骤a2。a3. If there is currently a blocked thread, the data providing device adopts a synchronous control method to select a thread from the currently blocked threads and wake up, and use the thread as the current working thread, Go to step a2. 4.根据权利要求1所述的方法,其特征在于,所述数据提供设备为服务器。4. The method according to claim 1, wherein the data providing device is a server. 5.一种数据存储装置,其特征在于,设于数据提供设备中,包括:5. A data storage device, characterized in that it is located in a data providing device, comprising: 第一单元,当数据提供设备首次需要增加数据记录至预设的数据库表时,从所述数据库表中获取所述数据提供设备当前可用的记录标识,利用所述记录标识将所述数据记录增加到所述数据库表中,利用预设的标识扩展数量,对所述记录标识进行号码扩展,将号码扩展得到的标识号码范围保存在所述数据提供设备的内存中,并将所述数据库表中该数据提供设备可用的记录标识更新为所述标识号码范围的最大值加1;所述数据库表至少包括记录标识字段;The first unit, when the data providing device needs to add a data record to a preset database table for the first time, obtains the currently available record identifier of the data providing device from the database table, and uses the record identifier to add the data record. In the database table, use the preset number of identification extensions to perform number expansion on the record identification, save the identification number range obtained by the number expansion in the memory of the data providing device, and store the data in the database table. The record identification available to the data providing device is updated to the maximum value of the identification number range plus 1; the database table at least includes a record identification field; 第二单元,当数据提供设备在所述首次之后需要增加数据记录至所述数据库表时,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新。The second unit, when the data providing device needs to add data records to the database table after the first time, adopts a synchronous control method to control the threads that currently need to add data records to access the memory one by one to obtain the corresponding available record identifiers, and use all The acquired record identifiers store corresponding data records that need to be added in the database table, and when all record identifiers in the identifier number range are used, triggering the update of the identifier number range in the memory. 6.根据权利要求5所述的装置,其特征在于,所述标识号码范围为[a,b],其中,a为当前获取的所述记录标识;b=a+n-1,n为所述标识扩展数量。6. The device according to claim 5, wherein the identification number range is [a, b], wherein a is the currently acquired record identification; b=a+n-1, n is the Describes the number of ID extensions. 7.根据权利要求5所述的装置,其特征在于,所述第二单元,采用同步控制的方式,控制当前需要增加数据记录的线程逐一访问内存获取相应可用的记录标识,并利用所获取的记录标识将相应需要增加的数据记录保存至所述数据库表中,当所述标识号码范围中的记录标识均被使用时,触发对内存中的所述标识号码范围进行更新包括:7. device according to claim 5, is characterized in that, described second unit, adopts the mode of synchronous control, controls the thread that currently needs to increase data record to access memory one by one to obtain corresponding available record identification, and utilize the acquired The record identifier saves the corresponding data records that need to be added to the database table, and when the record identifiers in the identifier number range are all used, triggering to update the identifier number range in the memory includes: a1、所述数据提供设备采用同步控制的方式,从本数据提供设备中当前需要增加数据记录的线程中,选择出一个线程,作为当前可以增加数据记录的工作线程,并阻塞其他所述线程;a1, the data providing equipment adopts the mode of synchronous control, selects a thread from the thread that currently needs to increase the data record in this data providing equipment, as the working thread that can currently increase the data record, and blocks other described threads; a2、从所述数据提供设备的内存中,取出所述标识号码范围中未被取出的最小标识,触发该工作线程使用该最小标识将相应需要增加的数据记录增加至所述数据库表中;当该最小标识等于所述标识号码范围的最大值时,所述数据提供设备从所述数据库表中,重新获取所述数据提供设备对应的可用的记录标识,利用所述标识扩展数量,对重新获取的记录标识进行号码扩展,将内存中的所述标识号码范围替换为当前号码扩展得到的标识号码范围,并将所述数据库表中该数据提供设备可用的记录标识更新为当前号码扩展得到的标识号码范围的最大值加1;a2. From the memory of the data providing device, take out the smallest identifier that has not been taken out in the identifier number range, and trigger the worker thread to use the smallest identifier to add the corresponding data records that need to be added to the database table; when When the minimum identifier is equal to the maximum value of the identifier number range, the data providing device re-acquires the available record identifiers corresponding to the data providing device from the database table, and uses the identifier extension number to re-acquire The record identification carries out number expansion, replaces the identification number range in the memory with the identification number range obtained by the current number expansion, and updates the available record identification of the data providing equipment in the database table to the identification obtained by the current number expansion Add 1 to the maximum value of the number range; a3、如果当前存在被阻塞的所述线程,则所述数据提供设备采用同步控制的方式,从当前被阻塞的所述线程中,选择出一个线程并唤醒,将该线程作为当前的工作线程,执行步骤a2。a3. If there is currently a blocked thread, the data providing device adopts a synchronous control method to select a thread from the currently blocked thread and wake it up, and use the thread as the current working thread, Go to step a2. 8.根据权利要求5所述的装置,其特征在于,所述数据提供设备为服务器。8. The apparatus according to claim 5, wherein the data providing device is a server. 9.一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储指令,其特征在于,所述指令在由处理器执行时使得所述处理器执行如权利要求1至4中任一项所述的数据存储方法的步骤。9. A non-volatile computer-readable storage medium storing instructions, wherein the instructions, when executed by a processor, cause the processor to execute the method as claimed in the claims Steps of the data storage method described in any one of 1 to 4. 10.一种电子设备,其特征在于,包括如权利要求9所述的非易失性计算机可读存储介质、以及可访问所述非易失性计算机可读存储介质的所述处理器。10. An electronic device, comprising the non-volatile computer-readable storage medium of claim 9, and the processor that can access the non-volatile computer-readable storage medium.
CN201910090893.6A 2019-01-30 2019-01-30 A data storage method and device Withdrawn CN111506582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910090893.6A CN111506582A (en) 2019-01-30 2019-01-30 A data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910090893.6A CN111506582A (en) 2019-01-30 2019-01-30 A data storage method and device

Publications (1)

Publication Number Publication Date
CN111506582A true CN111506582A (en) 2020-08-07

Family

ID=71863786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910090893.6A Withdrawn CN111506582A (en) 2019-01-30 2019-01-30 A data storage method and device

Country Status (1)

Country Link
CN (1) CN111506582A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061537A1 (en) * 2001-07-16 2003-03-27 Cha Sang K. Parallelized redo-only logging and recovery for highly available main memory database systems
US20110252000A1 (en) * 2010-04-08 2011-10-13 Microsoft Corporation In-memory database system
CN106506663A (en) * 2016-11-22 2017-03-15 北京科摩仕捷科技有限公司 A kind of number distributing method, server and system
CN106776795A (en) * 2016-11-23 2017-05-31 黄健文 Method for writing data and device based on Hbase databases
CN108460041A (en) * 2017-02-20 2018-08-28 腾讯科技(深圳)有限公司 The treating method and apparatus of data
CN108509260A (en) * 2018-01-31 2018-09-07 深圳市万普拉斯科技有限公司 Thread identifying processing method, apparatus, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061537A1 (en) * 2001-07-16 2003-03-27 Cha Sang K. Parallelized redo-only logging and recovery for highly available main memory database systems
US20110252000A1 (en) * 2010-04-08 2011-10-13 Microsoft Corporation In-memory database system
CN106506663A (en) * 2016-11-22 2017-03-15 北京科摩仕捷科技有限公司 A kind of number distributing method, server and system
CN106776795A (en) * 2016-11-23 2017-05-31 黄健文 Method for writing data and device based on Hbase databases
CN108460041A (en) * 2017-02-20 2018-08-28 腾讯科技(深圳)有限公司 The treating method and apparatus of data
CN108509260A (en) * 2018-01-31 2018-09-07 深圳市万普拉斯科技有限公司 Thread identifying processing method, apparatus, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许浩;: "SIP应用服务器内存数据库的设计" *

Similar Documents

Publication Publication Date Title
US8819074B2 (en) Replacement policy for resource container
CN104537013B (en) A kind of method and apparatus of processing data
WO2017092470A1 (en) Data storage method and device
US8793288B2 (en) Online access to database snapshots
CN103270499B (en) log storing method and system
US8645338B2 (en) Active memory expansion and RDBMS meta data and tooling
CN107766258B (en) Memory storage method and device and memory query method and device
CN111723137B (en) Database fusion, expansion and modification method for power grid intelligent regulation and control platform and corresponding computer equipment
CN102073690B (en) Method for constructing memory database supporting historical Key information
CN110413679B (en) Database information processing method, device, equipment and readable storage medium
CN115994148B (en) Multi-table data updating method and device, electronic equipment and readable storage medium
CN109063210B (en) Resource object query method, device, equipment and storage medium of storage system
CN105357297A (en) Data caching system and method
CN106934066B (en) Metadata processing method and device and storage equipment
US11500943B2 (en) Method and system for cached early-binding document search
CN101526959B (en) Data storing method and device
CN115481103A (en) Method, device, and computer-readable storage medium for database expansion and contraction
CN110825732A (en) Data query method and device, computer equipment and readable storage medium
EP3991056A1 (en) Three-dimensional probabilistic data structure
CN111506582A (en) A data storage method and device
KR101368441B1 (en) Apparatus, method and computer readable recording medium for reusing a free space of database
CN118152357A (en) Data storage method and device of data lake, storage medium and electronic equipment
CN114579624B (en) Data processing method, device, storage medium and computer program product
US10762139B1 (en) Method and system for managing a document search index
US10423599B2 (en) Global and local temporary database tables

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200807