CN116756213A - Data query method, device, equipment and storage medium - Google Patents

Data query method, device, equipment and storage medium Download PDF

Info

Publication number
CN116756213A
CN116756213A CN202310739022.9A CN202310739022A CN116756213A CN 116756213 A CN116756213 A CN 116756213A CN 202310739022 A CN202310739022 A CN 202310739022A CN 116756213 A CN116756213 A CN 116756213A
Authority
CN
China
Prior art keywords
data set
query
target data
data
period
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.)
Pending
Application number
CN202310739022.9A
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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network 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 Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202310739022.9A priority Critical patent/CN116756213A/en
Publication of CN116756213A publication Critical patent/CN116756213A/en
Pending legal-status Critical Current

Links

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
    • G06F16/2477Temporal data 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/2455Query execution

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 disclosure provides a data query method, a device, equipment and a storage medium. The method comprises the following steps: acquiring a data query request; wherein the data query request carries a query period; determining a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set; and inquiring the target data from the target data set according to the inquiry request. According to the data query method provided by the embodiment of the disclosure, the target data set is determined through the query time period to query the target data from the target data set, so that the failure caused by query of the data from the analysis type data set when the query time period is too long can be prevented, and the success rate of data query is improved.

Description

Data query method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of data search, in particular to a data query method, a device, equipment and a storage medium.
Background
Currently, in order to improve query timeliness of data, the data is organized into analytic data, and an analytic data set is formed. There is a large amount of data in an analytical dataset, for example: the data volume of one day can reach hundreds of billions. In some query scenarios, if a user needs to query data for analysis in a longer period, the real-time query fails due to the excessive amount of scanned data.
Disclosure of Invention
The embodiment of the disclosure provides a data query method, a device, equipment and a storage medium, wherein a target data source is determined according to a query period, so that target data is queried from the target data source, and the success rate of data query can be improved.
In a first aspect, an embodiment of the present disclosure provides a data query method, including:
acquiring a data query request; wherein the data query request carries a query period;
determining a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set;
and inquiring the target data from the target data set according to the inquiry request.
In a second aspect, an embodiment of the present disclosure further provides a data query apparatus, including:
the data query request acquisition module is used for acquiring a data query request; wherein the data query request carries a query period;
a target data set determining module, configured to determine a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set;
and the data query module is used for querying the target data from the target data set according to the query request.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data query method as described in embodiments of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are for performing a data query method as described in the disclosed embodiments.
The embodiment of the disclosure discloses a data query method, a device, equipment and a storage medium, and the method, the device, the equipment and the storage medium acquire a data query request; wherein, the data query request carries a query period; determining a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set; and inquiring the target data from the target data set according to the inquiry request. According to the data query method provided by the embodiment of the disclosure, the target data set is determined through the query time period to query the target data from the target data set, so that the failure caused by query of the data from the analysis type data set when the query time period is too long can be prevented, and the success rate of data query is improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a flow chart of a data query method according to an embodiment of the disclosure;
fig. 2 is a schematic structural diagram of a data query device according to an embodiment of the disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
It will be appreciated that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
Analytical data sets are widely used because of high query timeliness, but when the query data volume is too large, query failure can be caused, and the success rate of data query is affected.
Fig. 1 is a schematic flow chart of a data query method provided by an embodiment of the present disclosure, where the embodiment of the present disclosure is applicable to a data query situation, the method may be performed by a data query device, where the device may be implemented in a form of software and/or hardware, and optionally, implemented by an electronic device, where the electronic device may be a mobile terminal, a PC side, a server, or the like.
As shown in fig. 1, the method includes:
s110, acquiring a data query request.
Wherein the data query request carries a query period. The period may be understood as a period in which data is generated, and the inquiry period may be understood as a period corresponding to data that the user wants to inquire. By way of example, assuming the query period is the last 3 months, this indicates that the user wants to query for data generated within the last 3 months; the query period is the last 1 year, indicating that the user wants to query the data generated in the last 1 year. The data query request can also carry key information, wherein the key information can be index and/or dimension information and the like and is used for querying data. In this embodiment, the data query request may be input by a user or generated by the user selecting key information and a query period in the interface.
S120, determining a target data set according to the query period.
Wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set, i.e. the analytical data set is obtained by synchronizing part of the data in the source data set. The source dataset may store a full amount of raw data, which may be embodied in the form of a common database. The analysis-type data set can provide the capability of autonomous analysis, and technicians can obtain the analysis-type data set by analyzing and sorting the original data and correlating the data according to a certain logic relationship. The analytical dataset may be embodied in the form of a hive table or a distributed file system (Hadoop Distributed File System, HDFS). Analytical datasets have a high efficiency in conducting data queries.
Optionally, the method further comprises the steps of: periodically synchronizing data of a set history period in a source data set to an analysis type data set; or periodically synchronizing the set number of data of the set history period in the source dataset to the analysis dataset.
The periodicity may be understood as that data is synchronized once for each set duration, and the period may be arbitrarily set by a user, for example: it may be every 1 day or 12 hours, etc. The set history period may be a set period that is closest to the current, for example: last 3 months or last half a year, etc. The set number may be set in units of the number of bars, or may be arbitrarily set by the user, for example: 10 billion pieces of data. In this embodiment, periodically synchronizing the data of the set history period in the source data set to the analysis data set may be: each set duration synchronizes data of a set history period in the source dataset to the analytics type dataset. Periodically synchronizing a set number of data in the source dataset for a set history period into the analytics dataset may be understood as: each set duration synchronizes a set number of data of a set history period in the source dataset to the analytics dataset. To ensure that the data in the analysis type data set is updated in real time, thereby ensuring the accuracy of the subsequent query data.
Optionally, if the data of the set history period in the source data set is periodically synchronized to the analysis data set, the method for determining the target data set according to the query period may be: if the query period falls within the set history period, the determined target data set is an analytical data set.
Wherein, the inquiry time period falls into the set history time period can be understood as a subinterval in which the inquiry time period is the set history time period. For example: assuming that the set history period is the last half year, the inquiry period is between the last 2 months and the last 1 month or the inquiry period is the last half year, the inquiry period falls within the set history period. In this embodiment, if the query period falls within the set history period, it indicates that the data to be queried is stored in the analysis-type data set, and at this time, the analysis-type data set is determined to be the target data set, so that the data query rate can be improved.
Optionally, if the data of the set history period in the source data set is periodically synchronized to the analysis data set, the method for determining the target data set according to the query period may be: if part or all of the query time periods do not fall into the set history time period, the determined target data set is the source data set.
Wherein, the fact that a part of the inquiry period does not fall into the set history period may be understood that a part of the inquiry period falls into the set history period and another part does not fall into the set history period. I.e. the inquiry period has an intersection with the set history period. In this embodiment, a part of the query period does not fall into the set history period, which indicates that the analysis-type data set stores a part of data to be queried, and at this time, all the data cannot be queried from the analysis-type data set, so the source data set is taken as the target data set. All of the inquiry periods not falling within the set history period can be understood as: there is no intersection of the inquiry period with the set history period. In this embodiment, all of the query periods do not fall into the set history period, which indicates that the analysis-type data set does not store data to be queried, and at this time, data cannot be queried from the analysis-type data set, so the source data set is taken as the target data set. The success rate of data query can be improved.
Optionally, if the set number of data of the set history period in the source data set is periodically synchronized to the analysis data set, the method for determining the target data set according to the query period may be: predicting data scanning amount according to the inquiry request; if the inquiry time period falls into the set history time period and the data scanning amount is smaller than or equal to the set amount, the determined target data set is an analysis type data set.
The method for predicting the data scanning amount according to the query request can be as follows: and extracting key information in the query request, acquiring the average data scanning amount in a unit time period in the historical query operation based on the key information, and finally predicting the data scanning amount according to the average data scanning amount in the unit time period and the query time period. Wherein the unit period may be set by the user, for example, may be 1 day or 1 week. Specifically, the manner of predicting the data scanning amount according to the average data scanning amount in the unit period and the inquiry period may be: the method comprises the steps of firstly determining the number of unit time periods contained in a query time period, and then multiplying the number of unit time periods and the average data scanning amount in the unit time period to obtain the predicted data scanning amount.
In this embodiment, if the query period falls within the set history period and the data scanning amount is less than or equal to the set amount, it indicates that the data to be queried is stored in the analysis type data set, and at this time, the analysis type data set is determined to be the target data set, so that the data query rate can be improved.
Alternatively, the manner of determining the target data set according to the query period may be: if part or all of the query time periods do not fall into the set history time period and/or the data scanning amount is greater than the set amount, the determined target data set is the source data set.
In this embodiment, if part or all of the query periods do not fall into the set history period and/or the data scanning amount is greater than the set amount, it indicates that the analysis type dataset stores part of the data to be queried or does not store the data to be queried, and at this time, all of the data cannot be queried or cannot be queried from the analysis type dataset, so the source dataset is used as the target dataset, so as to improve the query success rate.
S130, inquiring the target data from the target data set according to the inquiring request.
In this embodiment, when the target data set is an analysis data set, the manner of querying the target data from the target data set according to the query request may be: and inquiring the target data from the analysis type data set according to the inquiry request. Specifically, the method for querying the target data from the analysis data set according to the query request may be: the target data is queried from the analytics data set based on key information in the query request.
In this embodiment, when the target data set is a source data set, the manner of querying the target data from the target data set according to the query request may be: and querying target data from the source data set according to the query request. Specifically, the method for querying the target data from the source data set according to the query request may be: and inquiring the target data from the source data set according to the inquiry request in an asynchronous inquiry mode.
Asynchronous querying may be understood as starting another thread to query data in the source dataset, while the main thread does some operations. Specifically, when the determined target data set is the source data set, another thread is started, and the target data is queried from the source data set based on the thread according to key information in the data query request.
According to the technical scheme, a data query request is obtained; wherein, the data query request carries a query period; determining a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set; and inquiring the target data from the target data set according to the inquiry request. According to the data query method provided by the embodiment of the disclosure, the target data set is determined through the query time period to query the target data from the target data set, so that the failure caused by query of the data from the analysis type data set when the query time period is too long can be prevented, and the success rate of data query is improved.
Fig. 2 is a schematic structural diagram of a data query device according to an embodiment of the present disclosure, as shown in fig. 2, where the device includes:
a data query request acquisition module 210, configured to acquire a data query request; wherein, the data query request carries a query period;
a target data set determining module 220, configured to determine a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set;
the data query module 230 is configured to query the target data from the target data set according to the query request.
Optionally, the method further comprises: a data synchronization module for:
periodically synchronizing data of a set history period in a source data set to an analysis type data set; or periodically synchronizing the set number of data of the set history period in the source dataset to the analysis dataset.
Optionally, the target data set determining module 220 is further configured to:
if the query time period falls into the set history time period, the determined target data set is an analysis type data set;
accordingly, the data query module 230 is further configured to:
and inquiring the target data from the analysis type data set according to the inquiry request.
Optionally, the target data set determining module 220 is further configured to:
if part or all of the query time periods do not fall into the set history time period, the determined target data set is a source data set;
accordingly, the data query module 230 is further configured to:
and querying target data from the source data set according to the query request.
Optionally, the target data set determining module 220 is further configured to:
predicting data scanning amount according to the inquiry request;
if the inquiry time period falls into the set history time period and the data scanning quantity is smaller than or equal to the set quantity, the determined target data set is an analysis type data set;
accordingly, the data query module 230 is further configured to:
and inquiring the target data from the analysis type data set according to the inquiry request.
Optionally, the target data set determining module 220 is further configured to:
if part or all of the query time periods do not fall into the set history time periods and/or the data scanning quantity is greater than the set quantity, the determined target data set is a source data set;
accordingly, the data query module 230 is further configured to:
and querying target data from the source data set according to the query request.
Optionally, the data query module 230 is further configured to:
and inquiring the target data from the source data set according to the inquiry request in an asynchronous inquiry mode.
The data query device provided by the embodiment of the disclosure can execute the data query method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that each unit and module included in the above apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. Referring now to fig. 3, a schematic diagram of an electronic device (e.g., a terminal device or server in fig. 3) 500 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 3, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 3 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The electronic device provided in the embodiment of the present disclosure and the data query method provided in the foregoing embodiment belong to the same inventive concept, and technical details not described in detail in the present embodiment may be referred to the foregoing embodiment, and the present embodiment has the same beneficial effects as the foregoing embodiment.
The present disclosure provides a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the data query method provided by the above embodiments.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a data query request; wherein the data query request carries a query period; determining a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set; and inquiring the target data from the target data set according to the inquiry request.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a data query method including:
acquiring a data query request; wherein the data query request carries a query period;
determining a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set;
and inquiring the target data from the target data set according to the inquiry request.
Further, the method further comprises the following steps:
periodically synchronizing data of the set history period in the source dataset to the analysis dataset; or periodically synchronizing the set number of data of the set history period in the source dataset to the analysis-type dataset.
Further, determining a target data set according to the query period includes:
if the query period falls into the set history period, the determined target data set is an analysis type data set;
accordingly, querying the target data from the target data set according to the query request includes:
and inquiring target data from the analysis type data set according to the inquiry request.
Further, determining a target data set according to the query period includes:
if part or all of the query time periods do not fall into the set history time period, the determined target data set is a source data set;
accordingly, querying the target data from the target data set according to the query request includes:
and inquiring target data from the source data set according to the inquiry request.
Further, determining a target data set according to the query period includes:
predicting data scanning amount according to the inquiry request;
if the query time period falls into the set history time period and the data scanning amount is smaller than or equal to the set amount, the determined target data set is an analysis type data set;
accordingly, querying the target data from the target data set according to the query request includes:
and inquiring target data from the analysis type data set according to the inquiry request.
Further, determining a target data set according to the query period includes:
if part or all of the inquiry time periods do not fall into the set history time period and/or the data scanning quantity is larger than the set quantity, determining the target data set as a source data set;
accordingly, querying the target data from the target data set according to the query request includes:
and inquiring target data from the source data set according to the inquiry request.
Further, querying target data from the source dataset according to the query request includes:
and inquiring target data from the source data set according to the inquiry request in an asynchronous inquiry mode.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. A method of querying data, comprising:
acquiring a data query request; wherein the data query request carries a query period;
determining a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set;
and inquiring the target data from the target data set according to the inquiry request.
2. The method as recited in claim 1, further comprising:
periodically synchronizing data of the set history period in the source dataset to the analysis dataset; or periodically synchronizing the set number of data of the set history period in the source dataset to the analysis-type dataset.
3. The method of claim 2, wherein determining a target data set from the query period comprises:
if the query period falls into the set history period, the determined target data set is an analysis type data set;
accordingly, querying the target data from the target data set according to the query request includes:
and inquiring target data from the analysis type data set according to the inquiry request.
4. The method of claim 2, wherein determining a target data set from the query period comprises:
if part or all of the query time periods do not fall into the set history time period, the determined target data set is a source data set;
accordingly, querying the target data from the target data set according to the query request includes:
and inquiring target data from the source data set according to the inquiry request.
5. The method of claim 2, wherein determining a target data set from the query period comprises:
predicting data scanning amount according to the inquiry request;
if the query time period falls into the set history time period and the data scanning amount is smaller than or equal to the set amount, the determined target data set is an analysis type data set;
accordingly, querying the target data from the target data set according to the query request includes:
and inquiring target data from the analysis type data set according to the inquiry request.
6. The method of claim 2, wherein determining a target data set from the query period comprises:
if part or all of the inquiry time periods do not fall into the set history time period and/or the data scanning quantity is larger than the set quantity, determining the target data set as a source data set;
accordingly, querying the target data from the target data set according to the query request includes:
and inquiring target data from the source data set according to the inquiry request.
7. The method of claim 4 or 6, wherein querying target data from the source dataset according to the query request comprises:
and inquiring target data from the source data set according to the inquiry request in an asynchronous inquiry mode.
8. A data query device, comprising:
the data query request acquisition module is used for acquiring a data query request; wherein the data query request carries a query period;
a target data set determining module, configured to determine a target data set according to the query period; wherein the target data set comprises an analytical data set and a source data set, and the analytical data set is a subset of the source data set;
and the data query module is used for querying the target data from the target data set according to the query request.
9. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data query method of any of claims 1-7.
10. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the data query method of any of claims 1-7.
CN202310739022.9A 2023-06-20 2023-06-20 Data query method, device, equipment and storage medium Pending CN116756213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310739022.9A CN116756213A (en) 2023-06-20 2023-06-20 Data query method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310739022.9A CN116756213A (en) 2023-06-20 2023-06-20 Data query method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116756213A true CN116756213A (en) 2023-09-15

Family

ID=87960527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310739022.9A Pending CN116756213A (en) 2023-06-20 2023-06-20 Data query method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116756213A (en)

Similar Documents

Publication Publication Date Title
CN111475298B (en) Task processing method, device, equipment and storage medium
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN112099982B (en) Crash information positioning method and device, medium and electronic equipment
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN111628938A (en) Branch merging method and device, electronic equipment and computer storage medium
CN114827750B (en) Viewing angle prediction method, device, equipment and storage medium
CN116483891A (en) Information prediction method, device, equipment and storage medium
CN113176937B (en) Task processing method and device and electronic equipment
CN116756213A (en) Data query method, device, equipment and storage medium
CN110941683B (en) Method, device, medium and electronic equipment for acquiring object attribute information in space
CN111143355B (en) Data processing method and device
CN114020750A (en) Mass data read-write system and method based on distributed storage
CN115034175A (en) Table data processing method, device, terminal and storage medium
CN111581930A (en) Online form data processing method and device, electronic equipment and readable medium
CN112115154A (en) Data processing and data query method, device, equipment and computer readable medium
CN112333462A (en) Live broadcast room page jumping method, returning device and electronic equipment
CN116610719A (en) Data query method, device, equipment and storage medium
CN111400322B (en) Method, apparatus, electronic device and medium for storing data
CN112084440B (en) Data verification method, device, electronic equipment and computer readable medium
CN117692672B (en) Snapshot-based video information sending method and device, electronic equipment and medium
CN112286773A (en) Method, device, medium and electronic equipment for collecting crash information
CN116628343A (en) Data determination method, device, medium and electronic equipment
CN117009662A (en) Feature generation method and device for recommendation, medium and electronic equipment
CN116756418A (en) Data pushing method, device, equipment and storage medium
CN118260173A (en) Time-consuming information determining method and device, electronic equipment and storage medium

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