Database data counting method, device and apparatus, and storage medium

A counting method and database technology, used in database indexing, database updating, database management systems, etc., can solve the problems of counting errors, lack of data volume, inconsistent database information, etc., and achieve the effect of improving accuracy

Pending Publication Date: 2020-10-30
北京青云科技股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in most kv databases, there is no functional interface to obtain the amount of data, so the application needs to implement the logic of statistical counting
[0003] In the existing technology, the following three methods are usually used to realize the counting of data: the first method uses heterogeneous databases to store the counts, and in this method, the information of the two databases will not be unified, resulting in counting errors; the second method uses key value to store the counting information. In this way, the data can only be processed serially, which affects the efficiency of data processing. The third method does not store the counting information. When it is necessary to obtain the amount of database data, the database is scanned in its entirety. It takes a lot of time to query

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Database data counting method, device and apparatus, and storage medium
  • Database data counting method, device and apparatus, and storage medium
  • Database data counting method, device and apparatus, and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0033] figure 1 It is a flow chart of a method for counting database data provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of counting the amount of data in the database. The method can be executed by a counting device for database data. The device It can be composed of hardware and / or software, and generally can be integrated into a device with data access function, which can be an electronic device such as a server or a server cluster. like figure 1 As shown, the method specifically includes the following steps:

[0034] Step 110, generating count variation data according to the data volume of the data to be processed.

[0035] Wherein, the data to be processed may include data to be written and data to be deleted. The amount of data can be reflected by the number of data items. The counting variation data carries a setting identification code, and the setting identification code may be a setting prefix. The form of counting v...

Embodiment 2

[0048] figure 2 It is a schematic structural diagram of a database data counting device provided by Embodiment 1 of the present invention. like figure 2 As shown, the device includes: a count variation data generating module 210 , a data writing module 220 and a count value updating module 230 .

[0049] A counting variation data generation module 210, configured to generate counting variation data according to the data volume of the data to be processed;

[0050] Data write-in module 220, for writing count variation data in the database;

[0051] The count value updating module 230 is configured to update the count value of the database according to the count variation data.

[0052] Optionally, the count variation data carries a setting identification code.

[0053]Optionally, the data to be processed includes data to be written and data to be deleted.

[0054] Optionally, if the data to be processed is data to be written, the data writing module 220 is also used for:...

Embodiment 3

[0066] image 3 It is a schematic structural diagram of a computer device provided by Embodiment 3 of the present invention. image 3 A block diagram of a computer device 312 suitable for implementing embodiments of the invention is shown. image 3 The computer device 312 shown is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present invention. Device 312 is typically a computing device that counts database data.

[0067] like image 3 As shown, computer device 312 takes the form of a general-purpose computing device. Components of computer device 312 may include, but are not limited to: one or more processors 316, storage 328, bus 318 connecting various system components including storage 328 and processor 316.

[0068] Bus 318 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention discloses a database data counting method, device and apparatus and a storage medium. The method comprises: generating counting variation data according to the data volume of to-be-processed data, writing the counting variation data into a database, and updating the count value of the database according to the count variation data. According to the counting method of the database data disclosed by the embodiment of the invention, the counting variable quantity data is processed into the database together, so that the counting value of the database is updated according to the counting variable quantity data, the accuracy of data counting can be improved, and the normal service of the database is not influenced.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of data counting, and in particular, to a database data counting method, device, equipment, and storage medium. Background technique [0002] The amount of data stored in the database is a very common requirement. In a SQL database, if you need to count the amount of data in a table, you can use a statement such as SELECT COUNT(1) FROM table. Execution of this statement returns the table The number of record rows. However, in most kv databases, there is no functional interface for obtaining data volume, so the application program is required to implement the logic of statistical counting. [0003] In the existing technology, the following three methods are usually used to realize the counting of data: the first method uses heterogeneous databases to store the counts, and in this method, the information of the two databases will not be unified, resulting in counting errors; the seco...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/22G06F16/23G06F16/25
CPCG06F16/2386G06F16/2282G06F16/25
Inventor 汪杰
Owner 北京青云科技股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products