CN108427688B - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN108427688B
CN108427688B CN201710081643.7A CN201710081643A CN108427688B CN 108427688 B CN108427688 B CN 108427688B CN 201710081643 A CN201710081643 A CN 201710081643A CN 108427688 B CN108427688 B CN 108427688B
Authority
CN
China
Prior art keywords
data query
data
requirement
function
preset database
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
CN201710081643.7A
Other languages
Chinese (zh)
Other versions
CN108427688A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710081643.7A priority Critical patent/CN108427688B/en
Publication of CN108427688A publication Critical patent/CN108427688A/en
Application granted granted Critical
Publication of CN108427688B publication Critical patent/CN108427688B/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/2457Query processing with adaptation to user needs
    • G06F16/24573Query processing with adaptation to user needs using data annotations, e.g. user-defined metadata
    • 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
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24547Optimisations to support specific applications; Extensibility of optimisers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/61Network physical structure; Signal processing
    • H04N21/6106Network physical structure; Signal processing specially adapted to the downstream path of the transmission network
    • H04N21/6125Network physical structure; Signal processing specially adapted to the downstream path of the transmission network involving transmission via Internet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/64322IP

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data query method and a data query device, which are used for expanding the range of data query. The method provided by the embodiment of the invention comprises the following steps: receiving an input data query requirement; determining a data query function according to the data query requirement; acquiring metadata corresponding to a data query function according to information describing the data query function carried in pre-stored metadata; configuring the data query function in a preset database according to the corresponding metadata; and executing data query in the database by adopting the data query function. Therefore, after the required metadata are screened out according to the data query requirement, the data query function is configured through the metadata, the data query function can execute new data query, and the data query range of the system is expanded.

Description

Data query method and device
Technical Field
The present invention relates to the field of information processing, and in particular, to a data query method and apparatus.
Background
In the conventional data query method, a system is generally pre-established with a function device for executing a required data query, and a user uses the pre-established function device to perform a corresponding data query. This results in a smaller range of data queries that can be performed by the system and fails to satisfy more demands of the user.
For example, in the IPTV field, the data query type provided by the IPTV system is often preset and completed, and a user can only query using the data query function pre-established by the IPTV system, and if the user wants to query other information and the IPTV system does not provide the corresponding data query function, the user cannot query the information that the user wants to query.
Disclosure of Invention
The embodiment of the invention provides a data query method and a data query device, which are used for expanding the range of data query.
In order to solve the above technical problem, an embodiment of the present invention provides the following technical solutions:
a method of data query, comprising:
receiving an input data query requirement;
determining a data query function according to the data query requirement;
acquiring metadata corresponding to a data query function according to information describing the data query function carried in pre-stored metadata;
configuring the data query function in a preset database according to the corresponding metadata;
and performing data query in the preset database by adopting the data query function.
Optionally, the determining a data query function according to the data query requirement includes:
extracting key words from the data query requirement;
providing a plurality of data query function options to be selected according to the keywords;
receiving a selection instruction, wherein the selection instruction is used for selecting at least one data query function option from the plurality of data query function options to be selected;
and determining at least one data query function option selected by the selection instruction as the data query function.
Optionally, after receiving the input data query requirement, the method further includes:
analyzing the content of the data query requirement to obtain an analysis result;
classifying the data query requirements according to the analysis result, wherein each type of data query requirements corresponds to at least one data query function;
counting the input times of each type of data query requirement respectively;
determining a data query function according to the data query requirement, wherein the data query function comprises the following steps:
acquiring the input times of each type of data query requirement;
and determining at least one data query function corresponding to the data query requirement with the input times larger than a preset threshold value as the data query function.
Optionally, before configuring the data query function in a preset database according to the corresponding metadata, the method further includes:
determining basic data required for executing the data query function;
judging whether the preset database contains the basic data or not;
if the preset database does not contain the basic data, acquiring the basic data;
and storing the acquired basic data in the preset database, or filtering the acquired basic data and storing the filtered basic data in the preset database.
Optionally, the data query requirements are multiple, each data query requirement carries importance information of a corresponding data query requirement, the preset database stores execution frequency information of each data query requirement, and the data query performed by the data query function in the database includes:
determining the query priority of each data query requirement according to the importance degree information of the data query requirement and the execution frequency information of the data query requirement;
respectively searching data matched with each data query requirement in the preset database according to the query priority;
and if the data matched with the data query requirement is not found within a preset time period, stopping executing the data query corresponding to the data query requirement and outputting query state information.
In order to solve the above technical problem, an embodiment of the present invention further provides the following technical solutions:
a data query apparatus, comprising:
the receiving unit is used for receiving input data query requirements;
the determining unit is used for determining a data query function according to the data query requirement;
the metadata acquisition unit is used for acquiring metadata corresponding to the data query function according to information which is carried in pre-stored metadata and describes the data query function;
the configuration unit is used for configuring the data query function in a preset database according to the corresponding metadata;
and the execution unit is used for executing data query in the preset database by adopting the data query function.
Optionally, the determining unit includes:
the extraction module is used for extracting key words from the data query requirement;
the providing module is used for providing a plurality of data query function options to be selected according to the keywords;
a receiving module, configured to receive a selection instruction, where the selection instruction is used to select at least one data query function option from the multiple data query function options to be selected;
and the first determination module is used for determining at least one data query function option selected by the selection instruction as the data query function.
Optionally, the apparatus further comprises:
the analysis unit is used for analyzing the content of the data query requirement to obtain an analysis result;
the classification unit is used for classifying the data query requirements according to the analysis result, and each type of data query requirements corresponds to at least one data query function;
the counting unit is used for respectively counting the input times of each type of data query requirement;
the determination unit includes:
the frequency acquisition module is used for acquiring the input frequency of each type of data query requirement;
and the second determining module is used for determining at least one data query function corresponding to the data query requirement with the input times larger than the preset threshold value as the data query function.
Optionally, the apparatus further comprises:
the data determining unit is used for determining basic data required for executing the data query function;
the judging unit is used for judging whether the preset database contains the basic data or not;
the acquisition unit is used for acquiring the basic data if the preset database does not contain the basic data;
and the storage unit is used for storing the acquired basic data in the preset database, or filtering the acquired basic data and then storing the filtered basic data in the preset database.
Optionally, the number of the data query demands is multiple, each data query demand carries importance information of a corresponding data query demand, the preset database stores execution frequency information of each data query demand, and the execution unit includes:
the priority determining module is used for determining the query priority of each data query requirement according to the importance degree information of the data query requirement and the execution frequency information of the data query requirement;
the searching module is used for respectively searching data matched with each data searching requirement in the preset database according to the searching priority;
and the output module is used for stopping executing the data query corresponding to the data query requirement and outputting query state information if the data matched with the data query requirement is not found in a preset time period.
According to the technical scheme, the embodiment of the invention has the following advantages:
and after receiving the input data query requirement, determining a data query function according to the data query requirement. And then, according to the information describing the data query function carried in the preset metadata, acquiring the metadata corresponding to the data query function. And configuring the data query function in a preset database according to the corresponding metadata, and executing data query by adopting the data query function in the preset database. Therefore, after the required metadata are screened out according to the data query requirement, the data query function capable of executing the query operation can be configured according to the metadata, the data query operation can be executed by using the data query function, the data query operation is the operation which can not be executed by the system before the data query function is configured, so that after the data query function is configured through the metadata, the data query function can execute new data query, and the data query range of the system is expanded.
Drawings
Fig. 1 is a flowchart of a method of querying data according to an embodiment of the present invention;
FIG. 2 is a flowchart of a data query method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data query apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data query apparatus according to another embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a data query method and a data query device, which are used for expanding the range of data query.
Fig. 1 is a flowchart of a method of a data query method according to an embodiment of the present invention, and referring to fig. 1, the data query method according to the embodiment of the present invention includes:
step 101: an input data query requirement is received.
Step 102: and determining a data query function according to the data query requirement.
Step 103: and acquiring metadata corresponding to the data query function according to the information describing the data query function carried in the pre-stored metadata.
Step 104: and configuring a data query function in a preset database according to the corresponding metadata.
Step 105: and performing data query in a preset database by adopting a data query function.
Optionally, determining a data query function according to a data query requirement includes:
extracting key words from data query requirements;
providing a plurality of data query function options to be selected according to the keywords;
receiving a selection instruction, wherein the selection instruction is used for selecting at least one data query function option from a plurality of data query function options to be selected;
and determining at least one data query function option selected by the selection instruction as a data query function.
Optionally, after receiving the input data query requirement, the method of the embodiment of the present invention further includes:
analyzing the content of the data query requirement to obtain an analysis result;
classifying the data query requirements according to the analysis result, wherein each type of data query requirements corresponds to at least one data query function;
counting the input times of each type of data query requirement respectively;
determining a data query function according to data query requirements, wherein the data query function comprises the following steps:
acquiring the input times of each type of data query requirement;
and determining at least one data query function corresponding to the data query requirement with the input times larger than the preset threshold value as the data query function.
Optionally, before configuring the data query function in the preset database according to the corresponding metadata, the method of the embodiment of the present invention further includes:
determining basic data required for executing a data query function;
judging whether a preset database contains basic data or not;
if the preset database does not contain the basic data, acquiring the basic data;
and storing the acquired basic data in a preset database, or filtering the acquired basic data and storing the filtered basic data in the preset database.
Optionally, the data query requirement includes a plurality of data query requirements, each data query requirement carries importance information of a corresponding data query requirement, the preset database stores execution frequency information of each data query requirement, and a data query function is adopted in the database to perform data query, where the data query function includes:
determining the query priority of each data query requirement according to the importance degree information of the data query requirement and the execution frequency information of the data query requirement;
respectively searching data matched with each data query requirement in a preset database according to the query priority;
and if the data matched with the data query requirement is not found within the preset time period, stopping executing the data query corresponding to the data query requirement, and outputting query state information.
In summary, after receiving the input data query requirement, the data query function is determined according to the data query requirement. And then, acquiring metadata corresponding to the data query function according to the information describing the data query function carried in the preset metadata. And then, configuring a data query function in the preset database according to the corresponding metadata, and executing data query in the preset database by adopting the data query function. Therefore, after the required metadata are screened out according to the data query requirement, the data query function capable of executing the query operation can be configured according to the metadata, the data query operation can be executed by using the data query function, the data query operation is the operation which can not be executed by the system before the data query function is configured, so that after the data query function is configured through the metadata, the data query function can execute new data query, and the data query range of the system is expanded.
Fig. 2 is a flowchart of a method of querying data according to an embodiment of the present invention, and referring to fig. 2, the method of querying data according to the embodiment of the present invention includes:
step 201: an input data query requirement is received.
The device receives a data query requirement input by a user, wherein the data query requirement can be information representing data required to be queried by the user.
After the device obtains the data query requirement input by the user, corresponding operation can be executed according to the data query requirement. And the data query requirement comprises the attention point of the data queried by the user, so that the equipment acquires the attention point of the user according to the data query requirement.
The device in which the method of an embodiment of the invention is performed may be, for example, a computer or the like.
For example, a user inputs a data query requirement "daily rating" to be queried to an interface of an IPTV (interactive network television) task processing device to perform a task related to the daily rating query through the task processing device.
Step 202: and determining a data query function according to the data query requirement.
After the device acquires the data query requirement, the data query function required by the user can be determined according to the data query requirement, and the data query function is not set on a system of the device at present and is a data query function to be configured. After the data query function to be configured is determined, the system of the device can configure the data query function subsequently, so that the data query function is used for executing corresponding query operation.
After the data query function is determined, the configuration operation is executed, and the data query function is not set on the equipment system before configuration, so that the functions of the equipment can be simplified.
There are various specific implementation methods for determining the data query function according to the data query requirement, and two examples are given below.
The first embodiment is as follows:
step A1: keywords are extracted from the data query requirements.
The data query requirement is related information of data to be queried of a user, the information of the data query requirement comprises a plurality of key words, and the key words can be input or set to the equipment in advance by a worker, so that the equipment can match the data query requirement input by the user according to the key words set in advance, and the matched key words are determined, and the purpose of extracting the key words from the data query requirement is achieved.
Step A2: and providing a plurality of data query function options to be selected according to the keywords.
The keyword extracted in step a1 may correspond to a data query function option, so that the device may provide the user with the data query function option corresponding to the keyword for the user to select.
For example, after acquiring a data query requirement "audience rating per day" input by a user, the device extracts a keyword "audience rating", so as to provide a plurality of data query function options to be selected for the user according to the keyword "audience rating": "Beijing satellite television rating query", "prime time rating query", and the like.
Step A3: a selection instruction is received.
The selection instruction is used for selecting at least one data query function option from a plurality of data query function options to be selected.
After seeing a plurality of data query function options to be selected provided by the equipment, a user inputs a receiving instruction to the equipment through modes of mouse clicking and the like so as to select the options and select a data query function required by the user.
Step A4: and determining at least one data query function option selected by the selection instruction as a data query function.
And the equipment determines the data query function to be configured corresponding to the selection according to the data query option selected by the selection instruction.
For example, the user selects an option of adding "beijing satellite television rating query", and after the addition, the IPTV system determines that "beijing satellite television rating query" is a data query function to be configured.
Example two
After receiving the input data query requirement, the method of the embodiment of the present invention further includes:
step B1: analyzing the content of the data query requirement to obtain an analysis result;
the data query requirement is related information of data to be queried by a user, and the information of the data query requirement comprises various information, so that the equipment can analyze the content of the data query requirement, for example, perform word segmentation processing on the data query requirement to obtain a word group forming the data query requirement.
Step B2: and classifying the data query requirements according to the analysis result.
Each type of data query requirement corresponds to at least one data query function.
According to the analysis result obtained in the above steps, the data query requirement can be classified, for example, according to the phrases contained in the data query requirement, so as to determine which data query function the data query requirement belongs to.
Step B3: counting the input times of each type of data query requirement respectively;
after determining which data query function the data query requirement belongs to, statistics can be performed on the data query requirements classified by the data query function.
Therefore, according to the data query requirement, the data query function is determined, and the method comprises the following steps:
step B4: and acquiring the input times required by each type of data query.
After counting the data query requirements, the input times of the data query requirements of each type are obtained, wherein the input times are obtained. A greater number of inputs indicates that the user is more interested in the data query.
Step B5: and determining at least one data query function corresponding to the data query requirement with the input times larger than the preset threshold value as the data query function.
And judging whether the input times of the data query function is greater than a preset threshold value, if so, indicating that the user pays more attention to the data query function, so that the equipment can determine that the data query function is the data query function to be configured.
For example, the system automatically identifies and adds some functionality based on the data query requirements often input by the user. For example, the customer often inputs the Beijing satellite television, but the current system does not have related data of the Beijing satellite television, and the customer does not select to add, and when the channel input by the customer reaches a threshold value, the equipment automatically adds the function.
It is understood that in some embodiments of the present invention, some basic functions, such as number of viewers per hour and viewing duration, are set by default in the system of the device, and if the customer inputs data query requirements related to these queries, the device automatically returns corresponding query results to the user.
Step 203: and acquiring metadata corresponding to the data query function according to the information describing the data query function carried in the pre-stored metadata.
Metadata is pre-stored on the device, which holds information relevant to the data query function. The data query function determined in step 202 may be configured according to the metadata. Because different metadata correspond to different data query functions, when pre-stored metadata correspond to a plurality of different data query functions, the metadata corresponding to the data query function to be configured needs to be determined according to information describing the data query function carried by the metadata.
Step 204: and configuring a data query function in a preset database according to the corresponding metadata.
The metadata holds information about the data query function, so that preparation for automated processing is possible. After the required metadata are screened out, a data query function can be configured in the database according to the metadata, so that a data query task corresponding to the data query requirement input by the user can be executed through the data query function.
The preset database may be a system for performing a data query function, such as an IPTV service system. The data query function is a functional module capable of executing data query.
Optionally, before configuring the data query function in the preset database according to the corresponding metadata, the method of the embodiment of the present invention further includes: determining basic data required for executing a data query function; judging whether a preset database contains basic data or not; if the preset database does not contain the basic data, acquiring the basic data; and storing the acquired basic data in a preset database, or filtering the acquired basic data and storing the filtered basic data in the preset database. Thus, after the data query function is configured, the basic data in the preset database can be used for executing the query data.
With regard to the configuration of the data query function, a specific method may be as follows:
1) and automatically configuring the data processing module.
And configuring a processing module of the data query function according to the metadata of the system.
For example, the data query function to be configured includes a function of querying the viewership rating of the beijing satellite television, and according to the information stored in the metadata, the data query function needs a data filtering module to filter out data of the beijing satellite television and analyze the viewership rating.
2) And automatically constructing a basic data storage module.
According to metadata of a system, basic data required by a data query function need to be stored, and the data need to construct a temporary data storage unit according to a structure specified by the metadata; if the existing system can satisfy the storage of the data, the storage units can be reused, and if the existing system cannot satisfy the storage, new storage units are created.
3) And automatically configuring a data acquisition module.
According to the metadata of the system, data required by a new function needs to be collected, if the data range collected by the existing system contains the data, multiplexing is only needed, and if the data range does not contain the data, the collection system needs to be configured to ensure that the data can be collected.
Step 205: and performing data query in a preset database by adopting a data query function.
After the data query function is configured, the data query function is adopted in the preset database to execute the data query corresponding to the data query requirement in step 201, so as to return a data query result to the user.
The method of the embodiment of the invention can be used in various fields, for example, can be applied to the field of IPTV, so that the operation of IPTV can be executed by an aspect user.
In the IPTV service, the system of the IPTV service includes a real-time system and a non-real-time system, where the non-real-time system refers to a system with a relatively long processing time, such as a system that processes once a day or processes several times a day; a real-time system refers to a system in which the time from data acquisition by a client, data processing, and presentation by a page does not exceed a few minutes or a few seconds.
The system of the IPTV service device may further include a pseudo real-time system, which is a system between a real-time system and a non-real-time system, and the pseudo real-time system is a system that completes data processing within 10 minutes, 30 minutes, or 1 hour.
The method of the embodiment of the present invention may be applied to the real-time system, the non-real-time system, and the pseudo-real-time system, which are not specifically limited in this respect.
The method of the embodiment of the invention can be particularly used in a pseudo real-time system, thereby shortening the processing time of the pseudo real-time system and improving the processing performance of equipment. In this way, the cost of functionality and cost of the device may be reduced compared to real-time systems. Compared with a non-real-time system, the pseudo-real-time system is an improvement on the non-real-time system in terms of both hardware requirements and software development.
In executing the method of the embodiment of the present invention, sometimes it is necessary to consider a specific usage scenario for optimization of the method, for example, priority of executed tasks and correct interruption of tasks.
Particularly in pseudo real-time processing of IPTV, due to a limitation of processing time, priority of tasks of the data query function and correct interruption of tasks need to be considered. At this point, a task scheduling system may be set up to handle the priority of the task and the correct interruption of the task.
Therefore, in some embodiments of the present invention, the data query requirement is multiple, each data query requirement carries the importance information of the corresponding data query requirement, the preset database stores the execution frequency information of each data query requirement,
executing data query corresponding to the data query requirement in a preset database, wherein the data query comprises the following steps:
step C1: and determining the query priority of each data query requirement according to the importance degree information of the data query requirement and the execution frequency information of the data query requirement.
Since all the indicators may not be processed in a unit time for the pseudo real-time system, all the indicators need to have a priority, preferably higher, and preferably processed.
Wherein, the query priority for determining each data query requirement can be specifically calculated by using a priority formula:
priority is importance information × execution frequency information.
The importance information is stored in metadata, configured during system initialization, and modified at a later stage. The execution frequency information is the frequency of use of the new function by the client in actual operation.
Step C2: respectively searching data matched with each data query requirement in a preset database according to the query priority;
step C3: and if the data matched with the data query requirement is not found within the preset time period, stopping executing the data query corresponding to the data query requirement, and outputting query state information.
The pseudo real-time system requires that the data processing must be completed within a certain time, otherwise, the next data processing task is affected, so that during the data processing, if the task processing time is overtime, the current data query function needs to be automatically terminated.
The automatic termination process cannot affect the subsequent process, and all the termination refers to that the current process is not simply stopped, the field information is saved, the process log is added, and particularly for some accumulated data, the accumulated data needs to be merged into the next task process, cannot be repeatedly processed, and cannot be missed. Therefore, the method of the embodiment of the present invention needs to output the query status information after stopping executing the data query corresponding to the data query requirement, and the query status information is recorded with the field information when the data query function is terminated. Therefore, when the data query function is executed next time, the data query function can be executed according to the data query function state point of which the query state information is stopped last time.
The method of the embodiment of the invention is used in the pseudo real-time system of the IPTV service, can automatically focus the focus concerned by the user by acquiring the data query requirement input by the user, and then preferentially processes the most concerned problem of the client according to the priority. The requirement of the user on the data real-time performance is met within a certain condition, and the paid cost is only that of a non-real-time system.
In summary, after receiving the input data query requirement, the data query function is determined according to the data query requirement. And then, acquiring metadata corresponding to the data query function according to the information describing the data query function carried in the preset metadata. Therefore, a data query function is configured in the preset database according to the corresponding metadata, and then the data query is executed in the database by adopting the data query function. Therefore, after the required metadata are screened out according to the data query requirement, the data query function capable of executing the query operation can be configured according to the metadata, the data query operation can be executed by using the data query function, the data query operation is the operation which can not be executed by the system before the data query function is configured, so that after the data query function is configured through the metadata, the data query function can execute new data query, and the data query range of the system is expanded.
Fig. 3 is a schematic structural diagram of a data query device according to an embodiment of the present invention, and referring to fig. 3, the data query device according to the embodiment of the present invention includes:
a receiving unit 301, configured to receive an input data query requirement;
a determining unit 302, configured to determine a data query function according to a data query requirement;
a metadata obtaining unit 303, configured to obtain metadata corresponding to a data query function according to information describing the data query function carried in pre-stored metadata;
a configuration unit 304, configured to configure a data query function in a preset database according to the corresponding metadata;
an executing unit 305, configured to execute a data query in a preset database by using a data query function.
An embodiment of the present invention provides a schematic structural diagram of a data query device, as shown in fig. 4, including:
a receiving unit 401, configured to receive an input data query requirement;
a determining unit 402, configured to determine a data query function according to a data query requirement;
a metadata obtaining unit 403, configured to obtain metadata corresponding to a data query function according to information describing the data query function carried in pre-stored metadata;
a configuration unit 404, configured to configure a data query function in a preset database according to the corresponding metadata;
an executing unit 405, configured to perform a data query in a preset database by using a data query function.
Wherein, the determining unit 402 includes:
an extraction module 406, configured to extract keywords from the data query requirement;
a providing module 407, configured to provide a plurality of data query function options to be selected according to the keyword;
a receiving module 408, configured to receive a selection instruction, where the selection instruction is used to select at least one data query function option from a plurality of data query function options to be selected;
the first determining module 409 is configured to determine at least one data query function option selected by the selecting instruction as a data query function.
Optionally, the apparatus in the embodiment of the present invention further includes:
the analyzing unit 410 is configured to analyze content of the data query requirement to obtain an analysis result;
the classifying unit 411 is configured to classify the data query requirements according to the analysis result, where each type of data query requirement corresponds to at least one data query function;
a counting unit 412, configured to count the input times of each type of data query requirement;
a determining unit 402, comprising:
a number obtaining module 413, configured to obtain an input number of each type of data query requirement;
the second determining module 414 is configured to determine at least one data query function corresponding to the data query requirement whose input times are greater than the preset threshold as the data query function.
Optionally, the apparatus in the embodiment of the present invention further includes:
a data determination unit 415 for determining basic data required for performing a data query function;
a determining unit 416, configured to determine whether the preset database includes basic data;
an acquisition unit 417, configured to acquire basic data if the preset database does not include the basic data;
the storage unit 418 is configured to store the acquired basic data in a preset database, or store the acquired basic data in the preset database after filtering the acquired basic data.
Optionally, the number of the data query demands is multiple, each data query demand carries importance information of the corresponding data query demand, the preset database stores execution frequency information of each data query demand,
an execution unit 405, comprising:
the priority determining module 419 is configured to determine a query priority of each data query requirement according to the importance information of the data query requirement and the execution frequency information of the data query requirement;
the searching module 420 is configured to search, according to the query priority, data matched with each data query requirement in a preset database;
the output module 421 is configured to stop executing the data query corresponding to the data query requirement and output query status information if the data matching the data query requirement is not found within the preset time period.
In summary, after the receiving unit 301 receives the input data query requirement, the determining unit 302 determines the data query function according to the data query requirement. Then, the metadata obtaining unit 303 obtains metadata corresponding to the data query function according to information describing the data query function carried in the preset metadata. Accordingly, the configuration unit 304 configures the data query function in the preset database according to the corresponding metadata, and the execution unit 305 performs the data query in the preset database using the data query function. Therefore, after the required metadata are screened out according to the data query requirement, the data query function capable of executing the query operation can be configured according to the metadata, the data query operation can be executed by using the data query function, the data query operation is the operation which can not be executed by the system before the data query function is configured, so that after the data query function is configured through the metadata, the data query function can execute new data query, and the data query range of the system is expanded.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (6)

1. A method for querying data, comprising:
receiving an input data query requirement;
analyzing the content of the data query requirement to obtain an analysis result;
classifying the data query requirements according to the analysis result, wherein each type of data query requirements corresponds to at least one data query function;
counting the input times of each type of data query requirement respectively;
acquiring the input times of each type of data query requirement;
determining at least one data query function corresponding to the data query requirement with the input times larger than a preset threshold as the data query function, wherein the data query function is a function which is not configured in a preset database;
acquiring metadata corresponding to a data query function according to information describing the data query function carried in pre-stored metadata;
configuring the data query function in the preset database according to the corresponding metadata;
and performing data query in the preset database by adopting the data query function.
2. The method of claim 1, wherein before configuring the data query function in a preset database according to the corresponding metadata, the method further comprises:
determining basic data required for executing the data query function;
judging whether the preset database contains the basic data or not;
if the preset database does not contain the basic data, acquiring the basic data;
and storing the acquired basic data in the preset database, or filtering the acquired basic data and storing the filtered basic data in the preset database.
3. The method according to claim 1 or 2, wherein the data query requirements are multiple, each data query requirement carries importance information of a corresponding data query requirement, the preset database stores execution frequency information of each data query requirement, and the executing data query in the database by using the data query function includes:
determining the query priority of each data query requirement according to the importance degree information of the data query requirement and the execution frequency information of the data query requirement;
respectively searching data matched with each data query requirement in the preset database according to the query priority;
and if the data matched with the data query requirement is not found within a preset time period, stopping executing the data query corresponding to the data query requirement and outputting query state information.
4. A data query apparatus, comprising:
the receiving unit is used for receiving input data query requirements;
the analysis unit is used for analyzing the content of the data query requirement to obtain an analysis result;
the classification unit is used for classifying the data query requirements according to the analysis result, and each type of data query requirements corresponds to at least one data query function;
the counting unit is used for respectively counting the input times of each type of data query requirement;
the determining unit is used for acquiring the input times of each type of the data query requirements;
the determining unit is further configured to determine at least one data query function corresponding to the data query requirement with the input frequency greater than a preset threshold as the data query function, where the data query function is a function not configured in a preset database;
the metadata acquisition unit is used for acquiring metadata corresponding to the data query function according to information which is carried in pre-stored metadata and describes the data query function;
the configuration unit is used for configuring the data query function in the preset database according to the corresponding metadata;
and the execution unit is used for executing data query in the database by adopting the data query function.
5. The apparatus of claim 4,
the device further comprises:
the data determining unit is used for determining basic data required for executing the data query function;
the judging unit is used for judging whether the preset database contains the basic data or not;
the acquisition unit is used for acquiring the basic data if the preset database does not contain the basic data;
and the storage unit is used for storing the acquired basic data in the preset database, or filtering the acquired basic data and then storing the filtered basic data in the preset database.
6. The apparatus according to claim 4 or 5, wherein the data query requirements are multiple, each data query requirement carries importance information of a corresponding data query requirement, the preset database stores execution frequency information of each data query requirement, and the execution unit includes:
the priority determining module is used for determining the query priority of each data query requirement according to the importance degree information of the data query requirement and the execution frequency information of the data query requirement;
the searching module is used for respectively searching data matched with each data searching requirement in the preset database according to the searching priority;
and the output module is used for stopping executing the data query corresponding to the data query requirement and outputting query state information if the data matched with the data query requirement is not found in a preset time period.
CN201710081643.7A 2017-02-15 2017-02-15 Data query method and device Active CN108427688B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710081643.7A CN108427688B (en) 2017-02-15 2017-02-15 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710081643.7A CN108427688B (en) 2017-02-15 2017-02-15 Data query method and device

Publications (2)

Publication Number Publication Date
CN108427688A CN108427688A (en) 2018-08-21
CN108427688B true CN108427688B (en) 2022-01-28

Family

ID=63155467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710081643.7A Active CN108427688B (en) 2017-02-15 2017-02-15 Data query method and device

Country Status (1)

Country Link
CN (1) CN108427688B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11455652B2 (en) * 2020-06-30 2022-09-27 The Nielsen Company (Us), Llc Methods and apparatus to estimate the second frequency moment for computer-monitored media accesses

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079056A (en) * 2007-02-06 2007-11-28 腾讯科技(深圳)有限公司 Retrieving method and system
CN103678619A (en) * 2013-12-17 2014-03-26 北京国双科技有限公司 Database index processing method and device
CN106156088A (en) * 2015-04-01 2016-11-23 阿里巴巴集团控股有限公司 A kind of index data processing method, data query method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799811B (en) * 2009-02-06 2012-02-22 北京数政科技有限公司 Certificate information inquiring method and inquiring system
US9465879B2 (en) * 2010-01-14 2016-10-11 Excalibur Ip, Llc Search engine recency using content preview

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079056A (en) * 2007-02-06 2007-11-28 腾讯科技(深圳)有限公司 Retrieving method and system
CN103678619A (en) * 2013-12-17 2014-03-26 北京国双科技有限公司 Database index processing method and device
CN106156088A (en) * 2015-04-01 2016-11-23 阿里巴巴集团控股有限公司 A kind of index data processing method, data query method and device

Also Published As

Publication number Publication date
CN108427688A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
CN109189951B (en) Multimedia resource recommendation method, equipment and storage medium
CN106487664B (en) Information recommendation method and device and mobile terminal
CN101425135B (en) Real time new elevent detecting device and method for vedio stream
CN103402142A (en) Program list pushing method and device
CN109359188B (en) Component arranging method and system
US20170344542A1 (en) Information query method, terminal device, system and computer storage medium
CN111327955A (en) User portrait based on-demand method, storage medium and smart television
CN110968380B (en) Data visualization method and system
CN103577593A (en) Method and system for video aggregation based on microblog hot topics
CN110881131B (en) Classification method of live review videos and related device thereof
US9799048B2 (en) Intelligent tool to support manual scheduling of ads
CN103312851A (en) Intelligent cellphone application interaction interface program usability testing method
CN111432263A (en) Bullet screen information display, processing and publishing method, electronic equipment and medium
CN108427688B (en) Data query method and device
CN102164305A (en) Video processing method and device and mobile communication terminal
CN105224394B (en) A kind of classification method and device of application program
CN106844406B (en) Search method and search device
CN108090089B (en) Method, device and system for detecting hot point data in website
US20090172714A1 (en) Method and apparatus for collecting metadata during session recording
CN104394435A (en) Digital set top box startup detecting method and device
CN106777010B (en) Log providing method and device and log obtaining method, device and system
CN110633430B (en) Event discovery method, apparatus, device, and computer-readable storage medium
CN111061554B (en) Intelligent task scheduling method and device, computer equipment and storage medium
CN113806651A (en) Data caching method, device, server and storage medium
CN111427858A (en) Log processing system and processing method thereof

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant