Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method, device, server and system for obtaining cardinal number

A server and cardinality technology, applied in the database field, can solve problems such as large resources and long computing time, and achieve the effect of reducing time and resource consumption.

Active Publication Date: 2014-10-08
SHENZHEN TENCENT COMP SYST CO LTD
View PDF2 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Since the above method needs to read the data to be obtained base one by one, and compare the read data with the remaining data in the data to be obtained base, to determine whether the read data has the same data in the data to be obtained base, so , when the amount of data to be acquired is large, the above method takes a long time to calculate and consumes a lot of resources

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
  • Method, device, server and system for obtaining cardinal number
  • Method, device, server and system for obtaining cardinal number
  • Method, device, server and system for obtaining cardinal number

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] combine figure 1 In the implementation environment shown, this embodiment provides a method for obtaining the cardinality, see figure 2 , the method flow provided by this embodiment is specifically as follows:

[0044] 201: Obtain the data stored in each data storage server, the data is the data of the same data warehouse;

[0045] 202: Determine the key value corresponding to each data according to the first parameter of each data, and determine the reference value corresponding to each data according to the second parameter corresponding to each data, where the first parameter and the second parameter are at least one;

[0046]Wherein, the reference value corresponding to each data is determined according to the second parameter corresponding to each data, including but not limited to:

[0047] Perform hash calculation according to the second parameter corresponding to each data to obtain the hash value corresponding to each data;

[0048] The hash value correspon...

Embodiment 2

[0063] Embodiment two

[0064] This embodiment provides a method for obtaining the cardinality. For the convenience of description, this embodiment uses figure 1 In the implementation environment shown, the cardinality acquisition server 1 in the data analysis layer acquires the cardinality of the data in the data warehouse 1, and the first parameter of the data used when acquiring the cardinality is the column name D, and the second parameter is the column name E , the first preset number of bits is 64 bits, and the second preset number of bits is 16 bits. The data stored in the data warehouse is distributed and stored in two data storage servers, namely data storage server 1 and data storage server 2 As an example, the method provided in this embodiment is illustrated in detail. see image 3 , the method flow provided by this embodiment is specifically as follows:

[0065] 301: Obtain the data stored in each data storage server, the data is the data of the same data wareh...

Embodiment 3

[0129] This embodiment provides a device for obtaining a base number, and the device is used to implement the method for obtaining a base number provided in the first or second embodiment above. see Figure 7 , the device consists of:

[0130] The first obtaining module 501 is used to obtain the data stored in each data storage server, and the data is the data of the same data warehouse;

[0131] The first determination module 502 is configured to determine a key value corresponding to each data according to a first parameter of each data, where the first parameter is at least one;

[0132] The second determination module 503 is configured to determine a reference value corresponding to each data according to a second parameter corresponding to each data, where the second parameter is at least one;

[0133] The second obtaining module 504 is used to obtain the key-value array pair corresponding to each data storage server according to the key value and reference value corres...

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 invention discloses a method, device, server and system for obtaining a cardinal number, and belongs to the technical field of databases. The method comprises the following steps: obtaining data stored in each data storage server, and obtaining key value array pairs according to a key value and a reference value which correspond to each datum; classifying the key value array pairs according to the key value, merging arrays in each kind of key value array pairs to obtain a global array corresponding to each kind of key value, and obtaining the cardinal number according to the global array corresponding to each kind of the key value. In the method disclosed by the invention, after the data stored in each data storage server is obtained, the corresponding key value array pairs are obtained according to the key value and the reference value which correspond to each datum, key value arrays corresponding to each data storage server are merged to obtain the global array corresponding to each kind of key value, and the cardinal number is obtained according to the global array corresponding to each kind of key value, so that the trouble of obtaining the cardinal number by reading the data stored in each data storage server item by item is avoided, the time required for obtaining the cardinal number is shortened, and the resource consumption is reduced.

Description

technical field [0001] The present invention relates to the technical field of databases, in particular to a method, device, server and system for acquiring cardinality. Background technique [0002] As the channels for generating data increase, the same content will generate the same data through different channels at the same time, resulting in data duplication, which makes a lot of duplicate data stored in the distributed data warehouse for data storage. For example, for the same content, three identical data will be generated through the three channels of the Internet, newspapers, and television at the same time, and the three identical data will be stored in the distributed data warehouse at the same time. When performing data analysis on a distributed data warehouse, the basis for data analysis is to obtain the number of different data, that is, the cardinality. Therefore, the method of obtaining cardinality is closely related to the accuracy of data analysis, time ta...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/215
Inventor 肖品
Owner SHENZHEN TENCENT COMP SYST CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products