CN107451204B - Data query method, device and equipment - Google Patents

Data query method, device and equipment Download PDF

Info

Publication number
CN107451204B
CN107451204B CN201710555633.2A CN201710555633A CN107451204B CN 107451204 B CN107451204 B CN 107451204B CN 201710555633 A CN201710555633 A CN 201710555633A CN 107451204 B CN107451204 B CN 107451204B
Authority
CN
China
Prior art keywords
data
partition
historical
historical data
query
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.)
Active
Application number
CN201710555633.2A
Other languages
Chinese (zh)
Other versions
CN107451204A (en
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201710555633.2A priority Critical patent/CN107451204B/en
Publication of CN107451204A publication Critical patent/CN107451204A/en
Application granted granted Critical
Publication of CN107451204B publication Critical patent/CN107451204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification discloses a data query method, a data query device and data query equipment. And during matching, the historical data is subjected to partition matching, and each matching removes a part of data in the filtered data to be inquired.

Description

Data query method, device and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data query method, apparatus, and device.
Background
Currently, when a user performs data query on structured data, a traversal query method is generally used.
In the prior art, in some application scenarios, for a data table or a data set to be queried, it may need to analyze whether there is some correlation between data in the data table or the data set to be queried and existing historical data, and the adopted method is generally: and performing traversal query item by item in the characteristic information corresponding to the historical data according to certain characteristic information of the data to be queried, and then associating two data with the same or corresponding characteristic information so as to perform certain data analysis.
Based on this, a more efficient data query method is needed.
Disclosure of Invention
The embodiment of the specification provides a data query method, a data query device and data query equipment, which are used for solving the following problems: to provide a more efficient data query method.
The data query method provided by the embodiment of the specification comprises the following steps:
acquiring data to be queried and determining characteristic information of the data to be queried;
selecting one of the partitioned historical data;
filtering data with the same characteristic information as the selected partition historical data from the data to be inquired to generate intermediate data;
and generating a query result according to the intermediate data and the residual partitioning historical data.
In accordance with the same idea, the present specification also provides a data query apparatus including:
the acquisition module acquires data to be queried and determines characteristic information of the data to be queried;
the selection module selects and selects the partition historical data from the plurality of partitioned partition historical data;
the filtering module is used for filtering data which has the same characteristic information with the selected partition historical data from the data to be inquired to generate intermediate data;
and the generating module generates a query result according to the intermediate data and the residual partition historical data.
Correspondingly, this specification also provides a data query device, including:
the memory is used for storing data to be inquired, a plurality of partitioned historical data and a data inquiry program;
the processor calls the data query program in the memory and executes:
after data to be queried is obtained, determining characteristic information of the data to be queried;
selecting one of the partitioned historical data;
filtering data with the same characteristic information as the selected partition historical data from the data to be inquired to generate intermediate data;
and generating a query result according to the intermediate data and the residual partitioning historical data.
Correspondingly, the embodiments of the present specification also provide a corresponding non-volatile computer storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are configured to:
acquiring data to be queried and determining characteristic information of the data to be queried; selecting one of the partitioned historical data; filtering data with the same characteristic information as the selected partition historical data from the data to be inquired to generate intermediate data; and generating a query result according to the intermediate data and the residual partitioning historical data.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
for a specific service content, a certain characteristic service attribute is determined according to service requirements, and data to be inquired is matched with historical data according to the service attribute. And during matching, the historical data is subjected to partition matching, and each matching is to filter out part of data in the data to be inquired.
According to the embodiment of the description, according to the partition data of the historical data, the partition historical data is firstly inquired, part of data in the data to be inquired is filtered, and then the next inquiry work is carried out according to the filtered data to be inquired, so that the data volume of the data to be inquired is reduced, the calculation amount of the whole inquiry is reduced, and the inquiry efficiency is improved. In addition, in the embodiment of the present specification, setting conditions are introduced, partition history data is selected according to the setting conditions, and the designated partition history data meeting the setting conditions is compared and queried, so that the fastest simplification of the data to be queried is realized, and the query efficiency is improved.
Drawings
FIG. 1 is a schematic flow chart of a data query method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a portion of a process provided in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a portion of a process provided in an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a portion of a method provided by embodiments of the present disclosure;
FIG. 5 is a flow chart illustrating a transaction data query method according to an embodiment of the present disclosure;
fig. 6a to fig. 6e are schematic diagrams illustrating a transaction data query method according to an embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of a data query device provided in an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a data query server provided in an embodiment of the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step are within the scope of the present application.
Based on the foregoing, it should be noted that the history data may include: historical transaction records, historical login records, resource reference, uploading or downloading records and the like, and of course, different forms of historical data exist in an actual business scene, and are not listed. Different historical data corresponds to different business content.
The data to be queried is usually data having an association relationship with historical data according to certain characteristic information, and may have the same data structure as the historical data or may have a different data structure from the historical data. The characteristic information includes, but is not limited to, transaction party ID, user ID, client ID, resource unique identifier, etc., and the association relationship is determined by querying the determined query result. For example, it is determined by query which feature information appears in the data to be queried but not in the historical data, so as to count newly-occurring transaction records, new user registration situations, new client login situations, latest uploading records of resources, and the like.
In the embodiment of the present specification, the data query method may adopt the flow shown in fig. 1.
The following describes in detail a data query process provided in an embodiment of the present specification based on a flow shown in fig. 1, where the data query process specifically includes the following steps:
step S101, obtaining data to be queried and determining characteristic information of the data to be queried.
That is, after the data to be queried is obtained, the characteristic information is first determined according to the purpose of the query. It is easy to understand that the historical data also contains the characteristic information, so that the association relationship between the data to be queried and the historical data can be obtained according to the characteristic information.
When the data to be queried and the historical data are both structured data, the characteristic information is usually an attribute value of one or more columns. For example, in order to count which seller and buyer have the first transaction in the current day transaction record, the historical data (i.e. the historical transaction record) containing the array is queried by using the ID of both parties as the characteristic information.
It should be noted that the data to be queried and the historical data have the same structure, but in practical application, the structures may be different. For example, for query convenience, some redundant data of the data to be queried are removed, and columns containing characteristic information in the data to be queried are directly extracted to form a group of new data to be queried, and at the moment, the data structures of the data to be queried are different.
The data to be queried and the historical data may not be structured data, for example, which of the images or videos uploaded on the same day that the query server receives are not available before is needed, and since the received resource name may be freely obtained by the user during uploading, the comparison may be performed according to a hash value generated by the images or the videos according to some algorithm, where the hash value uniquely corresponds to one resource.
Step S103, selecting one of the plurality of partitioned historical data to select the partitioned historical data.
It should be noted that, the acquisition and partitioning of the history data may be completed in advance, and the sum of the history data of a plurality of partitions is the history data. And the historical data of the partitions have no intersection.
The plurality of subarea historical data are divided according to the historical data. That is, after obtaining the historical data (e.g. historical transaction records), the historical data is divided according to the distribution attribute of the characteristic information (e.g. according to the time or region of the transaction occurrence or the transaction amount, etc.), and a plurality of partition historical data is generated, naturally, each partition historical data also contains the distribution attribute, and the specific dividing method is determined according to the business situation. Generally, the data amount of each area does not differ much.
After a plurality of subarea historical data are obtained, one subarea historical data is selected from the subarea historical data to be compared with the data to be inquired.
And step S105, filtering data with the same characteristic information as the selected partition historical data in the data to be inquired to generate intermediate data.
After the first partition history data is determined, traversal comparison is performed according to the characteristic information. And acquiring the characteristic information which appears in the partition historical data and the data to be inquired at the same time, and filtering records corresponding to the characteristic information in the data to be inquired according to the characteristic information which appears at the same time, wherein the filtered data to be inquired is intermediate data.
And step S107, generating a query result according to the intermediate data and the residual partition historical data.
By the method, the historical data is firstly queried in a partitioning mode according to the partitioned data of the historical data, a part of data in the data to be queried is filtered, and the data volume of the data to be queried is reduced, so that the calculation amount of the whole query is reduced, and the query efficiency is improved.
As an alternative to the embodiment of the present specification, when the alternative selection of the partition history data in step S102 is performed, the following two ways are included, as shown in fig. 2:
step S201, randomly selecting a piece of partition history data.
That is, when the probability of the same feature information appearing in the data to be queried and the partition history data is irregular and randomly distributed, the partition data does not need to be selected under a set condition, and one partition history data is randomly selected.
In step S203, a selection of the partition history data meeting the set condition is selected.
Generally, the data amount of each partition does not differ much. When the probability distribution of the same feature information in the data to be queried and the partition history data is regular, conditions can be set according to the probability distribution, and selection can be performed alternatively, for example, the partition history data with the highest probability of the same feature information is selected. The probability distribution can be statistically calculated from previous historical data.
For example, according to the rule, if the buyer and the seller have a transaction, the probability that the buyer and the seller have had a transaction record is the highest in the last 30 days compared with the other 30 days, and the partition history data containing the last 30 days is selected.
For example, according to the rule, if the user logs in a website and is divided into hours, and compared with other time periods, the probability that the user logs in at 0 point to 1 point every day is the largest, the partition history data containing 0 point to 1 point is selected.
For example, according to the rule, if the buyer and the seller have reached a transaction, the probability that the buyer and the seller have already had the transaction record is the highest in the amount range of 100 to 500 dollars, and then the partition history data containing the amount range of 100 to 500 dollars is selected.
For example, according to the rule, if the buyer and the seller reach a transaction, the probability that the buyer and the seller have the transaction records is the highest in the province Zhejiang, and then the partition history data corresponding to the province Zhejiang is selected.
In other words, the probability that the same feature information appears in the data to be queried and the partition history data is counted. And selecting the partition historical data corresponding to the interval with the maximum probability according to the statistical rule so as to perform subsequent query.
When the data volume difference of each partition is large, the relationship between the probability distribution and the data volume is balanced, and other condition setting is performed, for example, the partition history data of which the data volume and the probability value simultaneously accord with the set conditions is selected.
Correspondingly, in the subsequent filtering, that is, the data to be queried is filtered according to the selected partition history data, taking the probability distribution condition in the foregoing example as an example:
for example, if the buyer and the seller have a transaction, the probability that the buyer and the seller have transaction records is the highest in the last 30 days compared with the other 30 days, then the transaction record of the current day is obtained, the transaction record of the last 30 days is selected, the query is performed according to [ buyer ID, seller ID ], the [ buyer ID, seller ID ] which is simultaneously appeared in the transaction record of the current day and the transaction record of the last 30 days is obtained, and then the data corresponding to the [ buyer ID, seller ID ] is filtered in the transaction of the current day.
For example, if a certain user logs in a website, selecting a historical login record from 0 point to 1 point every day, inquiring the login record of the day according to the user ID to obtain the user ID which appears in the login record of the day and the historical login record from 0 point to 1 point every day at the same time, and then filtering data corresponding to the user ID which appears at the same time in the login record of the day.
For example, if the buyer and the seller have made a transaction in the same day, the transaction record of the province in Zhejiang province is selected, and the query is performed according to [ buyer ID, seller ID ], so as to obtain [ buyer ID, seller ID ] appearing in the transaction record of the same day and the transaction record of the province in Zhejiang province at the same time, and then the data corresponding to [ buyer ID, seller ID ] is filtered out from the transaction record of the same day.
For example, if the buyer and the seller have made a transaction on the same day, the 100-500 yuan historical transaction record is selected, and the query is performed according to the [ buyer ID, seller ID ], so as to obtain the [ buyer ID, seller ID ] that appears in the transaction record on the same day and the 100-500 yuan historical transaction record, and then the data corresponding to the [ buyer ID, seller ID ] is filtered from the transaction record on the same day.
Through comparison query and filtering of the partition historical data once, particularly when the data distribution is regular, the partition historical records selected according to the set conditions are compared with the data to be queried, and the characteristic information which is contained in the data to be queried and already appears in the historical data can be filtered out to the greatest extent, so that the data volume of the intermediate data is reduced, and the calculation amount in the subsequent query is reduced as much as possible.
In addition, for the step S104, there are various implementation methods for generating a query result according to the intermediate data and the remaining partition history data, and specifically, as an implementation of this embodiment of this specification, the following steps are included, as shown in fig. 3:
step S301, traversing the rest of the partition history data, and filtering out data with the same characteristic information as the rest of the partition history data in the intermediate data.
Namely, the filtered data to be queried is generated as intermediate data. And then, according to the intermediate data, further performing traversal query on the remaining partition history records, searching the same characteristic information appearing in each partition history record, and filtering records corresponding to the same characteristic information in the data to be queried.
Step S303, determining that the data obtained when the traversal is finished is a query result.
Before the traversal process, the traversal speed is improved because a part of data in the data to be queried is filtered.
As another implementable solution in the embodiment of the present specification, according to the foregoing idea, the intermediate data may be subjected to iterative processing, and the intermediate data at the end of each filtering operation is used as the intermediate data of the next iteration, so as to reduce the data amount of the intermediate data as much as possible and reduce the data amount of the next query calculation, as shown in fig. 4:
step S401, selecting selected partition historical data from the rest partition historical data;
step S403, filtering out data with the same characteristic information as the selected partition historical data from the intermediate data to perform iterative processing;
step S405, until the remaining partitioning history data are traversed, determining data obtained when the traversal is finished as a query result.
Furthermore, before traversal, the traversal sequence of the partition historical data can be sorted according to the probability distribution of the same characteristic information, the partition historical data with the same characteristic information and higher probability is preferentially traversed, and therefore the data volume of the intermediate data is reduced at the fastest speed.
The foregoing method of the present specification is described below with a specific example to make the method of the present specification more apparent.
For e-commerce or the O2O website (platform), the number of buyers transacting each day is huge. If the platform needs to count the new buyers of each store on the same day, the platform needs to search from the historical record by taking the store id and the buyer id as characteristic information according to the transaction record on the same day.
It is readily understood that if [ store s1, buyer u1] is not in the historical transaction record, then buyer u1 is the new buyer for store s 1; if [ store s1, buyer u1] appears in the historical transaction record, then buyer u1 is not a new buyer for store s 1.
Regularly, it shows that if buyer u1 has made a transaction at store s1 the day, then in the last 30 days, buyer u1 has had the highest probability of having made a transaction at store s1, and from the last 30 days to the last 60 days, buyer u1 has had the next lowest probability of having made a transaction at store s 1.
By utilizing the rule, partial data of the current transaction data is eliminated to obtain intermediate data with smaller data volume, so that the effect of reducing the data volume needing to be searched is achieved.
For example, the historical transaction records are the transaction record table t2 of the past 720 days, the consumption record of the current day (namely, the day 721) is recorded as a table t1, the consumption date of the buyer in the store is used as a partition column, the historical transaction record table t2 is partitioned every 30 days, the partition history data table k1 of the last 30 days, the partition history data k2 of the last 31 days to 60 days and other 22 partition history records k3 to k24 are obtained, and the partition history records k3 to k24 may be sorted randomly or sorted from large to small according to the probability distribution that the buyer u1 has transacted in the store s 1.
It is assumed that table t1 includes three sets of characteristic information of [ store s1, buyer u1], [ store s2, buyer u2], [ store s3, buyer u3] and its transaction record, while [ store s1, buyer u1] exists in table k1, [ store s2, buyer u2] exists in table k2, and [ store s3, buyer u3] does not exist in the historical transaction record.
It is easy to understand that the query at this time uses the feature information [ store, buyer ] as a link to perform a comparison query, in this embodiment, the specific method is as follows, and the flow is shown in fig. 5:
in step S502, table t1 links partition history data k 1. If the record [ store, buyer ] of table t1 also appears in table k1, then the buyer is not a new buyer for the store, as shown in FIG. 6 a.
In step S504, the data appearing in both Table t1 and Table k1 are filtered out to obtain filtered Table 1, as shown in FIG. 6 b. It is estimated that a portion of the data volume, including the transaction records corresponding to the store s1 and the buyer u1, has been filtered out from the table t 1.
In step S506, the filtered table t1 is connected to the partition history k 2. If the filtered record [ store, buyer ] of table t1 also appears in partition table k2, then the buyer is not a new buyer for the store, as shown in FIG. 6 c.
In step S508, the data in both table t1 and table k2 after filtering are filtered out, and the generated table is used as table t1 for the next iteration. At this time, the table t1 has been filtered to remove more data, including the transaction records corresponding to the store s2 and the buyer u2, as shown in FIG. 6 d.
Step S510, traverse and query the remaining tables k3 to k24, filter out records corresponding to [ store, buyer ] appearing at the same time in table 1, iterate table t1 until the iteration is finished, as shown in fig. 6e, generate a query result, where the query result includes [ store S3, buyer u3], that is, it is known that buyer u3 is a new buyer of store S3 on the same day. Before this traversal process, tables k3 through k24 may also be sorted by probability size to speed up the data reduction of table t 1.
In this embodiment, when the second query is performed, a larger part of the data amount in the table t1 is filtered, so that the subsequent query speed is greatly increased.
Based on the same idea, the present specification also provides a data query apparatus, as shown in fig. 7, including:
an obtaining module 701, configured to obtain data to be queried and determine feature information of the data to be queried;
a selecting module 702, selecting one of the partitioned historical data;
the filtering module 703 is configured to filter, from the data to be queried, data having the same characteristic information as the selected partition history data, and generate intermediate data;
and the generating module 704 generates a query result according to the intermediate data and the remaining partition history data.
Further, the apparatus further includes a partitioning module 705, which partitions the historical data according to the distribution attribute of the feature information, and generates a plurality of partitioned historical data including the distribution attribute.
Further, when the selection module selects the partition history data, one partition history data is selected randomly, or the selection module selects the partition history data meeting the set conditions.
Further, the generation module selects and selects the historical data of the partition from the residual historical data of the partition; filtering data with the same characteristic information as the selected partitioning historical data from the intermediate data to perform iterative processing; and determining the data obtained when the traversal is finished as a query result until the residual partitioning historical data is traversed.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps or modules recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Correspondingly, the present specification further provides a data query device, as shown in fig. 8, including a data query server, where the server includes:
a memory 801 for storing a plurality of partitioned historical data, data to be queried, and a data query program;
the processor 802 calls the data query program in the memory and executes:
after data to be queried is obtained, determining characteristic information of the data to be queried;
selecting one of the partitioned historical data;
filtering data with the same characteristic information as the selected partition historical data from the data to be inquired to generate intermediate data;
and generating a query result according to the intermediate data and the residual partitioning historical data.
Based on the same inventive concept, embodiments of the present specification further provide a corresponding non-volatile computer storage medium, in which computer-executable instructions are stored, where the computer-executable instructions are configured to:
acquiring data to be queried and determining characteristic information of the data to be queried; selecting one of the partitioned historical data; filtering data with the same characteristic information as the selected partition historical data from the data to be inquired to generate intermediate data; and generating a query result according to the intermediate data and the residual partitioning historical data.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. Especially, as for the device, apparatus and medium type embodiments, since they are basically similar to the method embodiments, the description is simple, and the related points may refer to part of the description of the method embodiments, which is not repeated here.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in one or more pieces of software and/or hardware when implementing the embodiments of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments in the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments in the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transient media) such as modulated data signal numbers and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular transactions or implement particular abstract data types. Embodiments of the present description may also be practiced in distributed computing environments where transactions are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present application. Various modifications and changes may occur to the embodiments described herein, as will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present specification should be included in the scope of the claims of the present application.

Claims (11)

1. A method of data query, comprising:
acquiring data to be queried and determining characteristic information of the data to be queried;
selecting one of the partitioned historical data, wherein the partitioned historical data have no intersection;
filtering data with the same characteristic information as the selected partition historical data in the data to be inquired to generate intermediate data;
and generating a query result according to the intermediate data and the rest of the partition historical data, wherein the query result exists in the data to be queried but does not exist in the plurality of partition historical data.
2. The data query method of claim 1, partitioning the plurality of partitioned historical data by:
acquiring historical data;
and dividing the historical data according to the distribution attribute of the characteristic information to generate a plurality of partitioned historical data.
3. The data query method of claim 1, selecting the partition history data, specifically comprising:
randomly selecting one partition history data, or selecting one partition history data meeting the set conditions.
4. The data query method according to claim 1, wherein generating a query result according to the intermediate data and the remaining partition history data specifically comprises:
traversing the rest of the partition historical data, and filtering out data with the same characteristic information as the rest of the partition historical data in the intermediate data;
and determining the data obtained when the traversal is ended as a query result.
5. The data query method according to claim 1, wherein generating a query result according to the intermediate data and the remaining partition history data specifically comprises:
selecting the historical data of the selected partition from the rest historical data of the partitions;
filtering data with the same characteristic information as the selected partitioning historical data from the intermediate data to perform iterative processing;
and determining the data obtained when the traversal is finished as a query result until the residual partitioning historical data is traversed.
6. A data query apparatus, comprising:
the acquisition module acquires data to be queried and determines characteristic information of the data to be queried;
the selection module selects and selects the partition historical data from the partitioned multiple partition historical data, and the partition historical data do not have intersection;
the filtering module is used for filtering data which has the same characteristic information with the selected partition historical data from the data to be inquired to generate intermediate data;
and the generating module generates a query result according to the intermediate data and the rest of the partition historical data, wherein the query result exists in the data to be queried but does not exist in the plurality of partition historical data.
7. The data query apparatus according to claim 6, further comprising a partitioning module, wherein the partitioning module partitions the historical data according to distribution attributes of the feature information, and generates a plurality of partitioned historical data including the distribution attributes.
8. The data query apparatus according to claim 6, wherein the selection module selects a partition history data randomly when selecting the partition history data, or selects the partition history data.
9. The data query device of claim 6, wherein the generating module traverses the remaining partition history data, filters out data having the same characteristic information as the remaining partition history data from the intermediate data, and determines that the data obtained at the end of the traversal is the query result.
10. The data query device of claim 6, wherein the generating module selects the historical data of the selected partition from the historical data of the remaining partitions; filtering data with the same characteristic information as the selected partitioning historical data from the intermediate data to perform iterative processing; and determining the data obtained when the traversal is finished as a query result until the residual partitioning historical data is traversed.
11. A data querying device, the device comprising:
the memory is used for storing data to be inquired, a plurality of partitioned historical data and a data inquiry program;
the processor calls the data query program in the memory and executes:
after data to be inquired is obtained, determining characteristic information of the data to be inquired,
selecting one of the partitioned historical data, wherein the partitioned historical data have no intersection;
filtering data with the same characteristic information as the selected partition historical data from the data to be inquired to generate intermediate data;
and generating a query result according to the intermediate data and the rest of the partition historical data, wherein the query result exists in the data to be queried but does not exist in the plurality of partition historical data.
CN201710555633.2A 2017-07-10 2017-07-10 Data query method, device and equipment Active CN107451204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710555633.2A CN107451204B (en) 2017-07-10 2017-07-10 Data query method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710555633.2A CN107451204B (en) 2017-07-10 2017-07-10 Data query method, device and equipment

Publications (2)

Publication Number Publication Date
CN107451204A CN107451204A (en) 2017-12-08
CN107451204B true CN107451204B (en) 2021-01-05

Family

ID=60487884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710555633.2A Active CN107451204B (en) 2017-07-10 2017-07-10 Data query method, device and equipment

Country Status (1)

Country Link
CN (1) CN107451204B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362442B (en) * 2018-04-09 2023-09-22 创新先进技术有限公司 Data monitoring method, device and equipment
CN110688406A (en) * 2019-09-06 2020-01-14 平安医疗健康管理股份有限公司 Data processing method, data processing device, computer equipment and storage medium
CN113205339B (en) * 2019-09-30 2023-01-10 支付宝(杭州)信息技术有限公司 Transaction query and transaction data processing method, device and equipment based on block chain
CN112836239A (en) * 2021-02-19 2021-05-25 支付宝(杭州)信息技术有限公司 Method and device for cooperatively determining target object data by two parties for protecting privacy

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464820A (en) * 2009-01-16 2009-06-24 中国科学院计算技术研究所 Continuous data protection method and system for disk apparatus
CN101996233A (en) * 2009-08-11 2011-03-30 国际商业机器公司 Method and system for replicating deduplicated data
CN102682052A (en) * 2010-12-28 2012-09-19 微软公司 Filtering queried data on data stores
CN103746834A (en) * 2013-12-25 2014-04-23 华为技术有限公司 Transmission network service route searching method and correlation device, and communication system
CN105917304A (en) * 2014-12-09 2016-08-31 华为技术有限公司 Apparatus and method for de-duplication of data

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7343588B2 (en) * 2004-01-30 2008-03-11 International Business Machines Corporation Method of generating and utilizing debug history
CN101436192B (en) * 2007-11-16 2011-03-16 国际商业机器公司 Method and apparatus for optimizing inquiry aiming at vertical storage type database
CN101216853B (en) * 2008-01-11 2010-12-29 孟小峰 Intelligent web enquiry interface system and its method
CN101639839B (en) * 2008-07-30 2011-10-26 中兴通讯股份有限公司 Method for searching multi-archive file based on temporary table
CN101754241B (en) * 2008-12-18 2012-12-19 中兴通讯股份有限公司 Early warning system for wireless communication and method
CN102043789A (en) * 2009-10-21 2011-05-04 阿里巴巴集团控股有限公司 Method and device for updating data table
CN103150260B (en) * 2011-11-25 2016-06-08 华为数字技术(成都)有限公司 Data de-duplication method and device
CN102436503A (en) * 2011-12-22 2012-05-02 中国电子科技集团公司第十五研究所 Data condition filtering and screening method and screener
CN104572727B (en) * 2013-10-22 2018-09-28 阿里巴巴集团控股有限公司 A kind of data query method and device
US10025824B2 (en) * 2015-05-27 2018-07-17 International Business Machines Corporation Filter optimizer for data streams
CN106933850B (en) * 2015-12-29 2020-08-07 阿里巴巴集团控股有限公司 Network data query method, device and system
CN106886548B (en) * 2016-08-03 2020-06-30 阿里巴巴集团控股有限公司 Data query method and device
CN106557578B (en) * 2016-11-23 2020-08-04 中国工商银行股份有限公司 Historical data query method and system
CN106649831B (en) * 2016-12-29 2020-09-04 北京奇艺世纪科技有限公司 Data filtering method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464820A (en) * 2009-01-16 2009-06-24 中国科学院计算技术研究所 Continuous data protection method and system for disk apparatus
CN101996233A (en) * 2009-08-11 2011-03-30 国际商业机器公司 Method and system for replicating deduplicated data
CN102682052A (en) * 2010-12-28 2012-09-19 微软公司 Filtering queried data on data stores
CN103746834A (en) * 2013-12-25 2014-04-23 华为技术有限公司 Transmission network service route searching method and correlation device, and communication system
CN105917304A (en) * 2014-12-09 2016-08-31 华为技术有限公司 Apparatus and method for de-duplication of data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于匹配区域特征的相似字符串匹配过滤算法";孙德才 等;《计算机研究与发展》;20100415;第47卷(第4期);第663-670页 *
"海量数据过滤系统中匹配算法的研究";梁威 等;《电视技术》;20130102;第37卷(第1期);第87-90页 *

Also Published As

Publication number Publication date
CN107451204A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
CN107450979B (en) Block chain consensus method and device
CN107451204B (en) Data query method, device and equipment
CN108268617B (en) User intention determining method and device
CN107577697B (en) Data processing method, device and equipment
EP3640813B1 (en) Cluster-based random walk method and apparatus
CN108599973B (en) Log association method, device and equipment
CN105956148A (en) Resource information recommendation method and apparatus
CN109725989B (en) Task execution method and device
CN112506671B (en) Transaction processing method and device in block chain and electronic equipment
CN108415912B (en) Data processing method and device based on MapReduce model
CN108205571B (en) Key value data table connection method and device
CN109597678B (en) Task processing method and device
CN107609011B (en) Database record maintenance method and device
CN111784468A (en) Account association method and device and electronic equipment
CN108959330B (en) Database processing and data query method and device
CN110083602B (en) Method and device for data storage and data processing based on hive table
CN107562533B (en) Data loading processing method and device
CN110008382B (en) Method, system and equipment for determining TopN data
CN110019975B (en) Random walk, random walk method based on cluster, random walk device and equipment
CN109658094B (en) Random walk, random walk method based on cluster, random walk device and equipment
CN110019357B (en) Database query script generation method and device
CN107368281B (en) Data processing method and device
CN115563116A (en) Database table scanning method, device and equipment
CN115391426A (en) Data query method and device, storage medium and electronic equipment
CN113343141A (en) Webpage obtaining method and device

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant