CN106610973A - Television data query method and device - Google Patents
Television data query method and device Download PDFInfo
- Publication number
- CN106610973A CN106610973A CN201510689272.1A CN201510689272A CN106610973A CN 106610973 A CN106610973 A CN 106610973A CN 201510689272 A CN201510689272 A CN 201510689272A CN 106610973 A CN106610973 A CN 106610973A
- Authority
- CN
- China
- Prior art keywords
- query
- data
- characteristics field
- field
- inquiry
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a television data query method and device, relates to the technical field of information and can be used for achieving television data query with regard to different query demands of a user. The method comprises the steps of receiving a television data query instruction, wherein the television data query instruction carries a query characteristic field and a type corresponding to the query characteristic field; acquiring a query word corresponding to the type of the query characteristic field from a preset storage position according to the type corresponding to the query characteristic field, wherein different types of the query characteristic fields and query words corresponding to different types of the query characteristics fields are stored in the preset storage position; generating a query sentence according to the query characteristic field and the query word corresponding to the type of the query characteristic field; and inquiring television data from a data set according to the query sentence, wherein the television data is stored in the data set. The method is suitably used for inquiring the television data.
Description
Technical field
The present invention relates to areas of information technology, more particularly to a kind of TV data querying method and device.
Background technology
With the continuous development and TV popularization of information technology, television channel is more and more with TV programme.Its
In, in order to weigh the quality of television channel or TV programme, many viewership statistics platforms can count TV
Viewership, such as audience ratings, rating share be saved in data base.Then, user can pass through defeated
Entering TV data query statement carries out the inquiry of TV data, so as to know television program receiving situation.
At present, the mode for carrying out TV data inquiry is the query demand for mainly being proposed according to user, by opening
The personnel of sending out individually develop a query interface for user's request, carry out the combination of various conditions for user
Inquiry.However, when carrying out TV data inquiry by above-mentioned inquiry mode, if the query demand of user is more
Change or increase, developer must modify to program or code, or develop again one completely
Foot disclosure satisfy that the query interface of user's query demand, so as to cause workload to increase.For example, television channel
The inquiry of audience ratings and the rating share of somewhere TV programme be the different query demand of user, mesh
Front developer needs the inquiry of the rating part for audience ratings and somewhere TV programme to need in exploitation
Ask, so as to cause workload to increase.Therefore, how to realize by an inquiry circle
Face meets the inquiry mode of user's difference query demand and has become a hot issue, i.e., when the inquiry of user
Demand is changed, it is not necessary to is carried out the coding change of complexity or is developed again query interface, it is possible to meets and use
The inquiry of family TV data.But, not currently exist and user's difference is met enough by a query interface look into
The inquiry mode of inquiry demand.
The content of the invention
In view of this, the present invention provides a kind of TV data querying method and device, and main purpose is can
Realize meeting user's difference query demand by a query interface.
According to one aspect of the present invention, there is provided a kind of TV data querying method, including:
TV data query statement is received, the TV data query statement carries query characteristics field and institute
State the corresponding classification of query characteristics field;
According to the corresponding classification of the query characteristics field, obtain and the query characteristics from preset storage location
The corresponding query terms of field classification, preserve different query characteristics field classes in the preset storage location
Other and different query characteristics field classification distinguishes corresponding query terms;
It is according to the corresponding query terms of classification of the query characteristics field and the query characteristics field, raw
Into query statement;
According to the query statement, from data Integrated query TV data, wherein, the data set is preserved
TV data.
According to another aspect of the present invention, there is provided a kind of TV data inquiry unit, including:
Receiving unit, for receiving TV data query statement, the TV data query statement carries inquiry
Feature field;
Acquiring unit, for according to the corresponding classification of the query characteristics field, obtaining from preset storage location
Query terms corresponding with the query characteristics field classification, preserve different in the preset storage location
Query characteristics field classification and different query characteristics field classifications distinguish corresponding query terms;
Signal generating unit, for the query characteristics field that received according to the receiving unit and the acquiring unit
The corresponding query terms of classification of the query characteristics field of acquisition, generate query statement;
Query unit, for according to the query statement, inquiring about TV data.
By above-mentioned technical proposal, technical scheme provided in an embodiment of the present invention at least has following advantages:
The present invention provides a kind of TV data querying method and device, after TV data query statement is received,
According to the corresponding classification of the query characteristics field, obtain and the query characteristics field from preset storage location
The corresponding query terms of classification, different query characteristics field classifications are preserved in the preset storage location with
And different query characteristics field classifications distinguishes corresponding query terms;According to the query characteristics field and
The corresponding query terms of classification of the query characteristics field, generate query statement;According to the query statement,
From data Integrated query TV data, wherein, the data set preserves TV data.With it is current, entering
Row TV data can only carry out inquiry for the particular demands of user when inquiring about and compare, and the embodiment of the present invention passes through
Query characteristics field and query terms corresponding with the query characteristics field classification generate query statement, then
According to the query statement, the inquiry of TV data is carried out, can realize meeting by a query interface and use
The different query demand in family, i.e., when the query demand of user is changed, only need to change query characteristics field, just
TV data corresponding with the query demand after the change can be realized such that it is able to realize different for user
Query demand carries out the inquiry of TV data.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technology of the present invention
Means, and being practiced according to the content of description, and in order to allow above and other mesh of the present invention
, feature and advantage can become apparent, below especially exemplified by the present invention specific embodiment.
Description of the drawings
By the detailed description for reading hereafter preferred implementation, various other advantages and benefit are for ability
Domain those of ordinary skill will be clear from understanding.Accompanying drawing is only used for the purpose for illustrating preferred implementation, and and
It is not considered as limitation of the present invention.And in whole accompanying drawing, it is denoted by the same reference numerals identical
Part.In the accompanying drawings:
The flow chart that Fig. 1 shows a kind of TV data querying method provided in an embodiment of the present invention;
The flow chart that Fig. 2 shows another kind of TV data querying method provided in an embodiment of the present invention;
Fig. 3 shows a kind of structural representation of TV data inquiry unit provided in an embodiment of the present invention;
Fig. 4 shows the structural representation of another kind of TV data inquiry unit provided in an embodiment of the present invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing in accompanying drawing
The exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should not be by
Embodiments set forth here is limited.On the contrary, there is provided these embodiments are able to be best understood from this
It is open, and the scope of the present disclosure complete can be conveyed to those skilled in the art.
A kind of TV data querying method is embodiments provided, as shown in figure 1, methods described bag
Include:
101st, receive TV data query statement.
Wherein, the TV data query statement carries query characteristics field and the query characteristics field pair
The classification answered.The TV data query statement can be for the instruction of the audience ratings of television channel, when user's inquiry
When demand is changed, TV data query statement can be that the audience ratings of the current television program of all channels refers to
Order, or the query statement of the rating share of somewhere TV programme, user were seen in certain time period
The query statement of certain television channel number of times is seen, the embodiment of the present invention is not limited.Audience ratings refers to certain region
Actually watch in current time collection period the number of certain television channel or TV programme divided by region Zong Guan
Everybody's number, rating share is referred in certain region current time collection period watches certain television channel or TV Festival
Purpose attendance is seeing TV number divided by the region is all.The query characteristics field can reflect use
The query demand at family, the corresponding query terms of query characteristics field can be SQL
In (Structured Query Language, SQL) sentence commonly use query terms, such as Select, From,
Where, Group by, Order by, And, Or etc..With at present when carrying out TV data and inquiring about, only
The TV data that specific needs can be inquired about is compared, the present invention can pass through user change query characteristics field with
And the corresponding classification of the query characteristics field, it is possible to realization carries out TV number according to the different demand of user
According to inquiry.
It is possible to further query characteristics field is divided into different query characteristics field classifications, such as table source word
Section, filtered fields, grouping field, display field etc..Described each query characteristics field classification respectively can be with
Correspondence multiple queries feature field, specifically can such as table 1,
Table source field | Filtered fields | Grouping field | Display field |
Television channel | City is related | Per diem | Audience ratings |
TV programme | Date | Monthly | Rating share |
City is related | Period | Per year | User watches number of times |
Table 1 is simply illustrated to the classification situation of query characteristics field, and the embodiment of the present invention is to inquiry
The packet situation of feature field does not do specific restriction.Specifically, can be according to the actual demand of user to looking into
Ask feature field to be classified and extended, it is also possible to carry out query characteristics field point according to system default pattern
Class and extension.Wherein, the corresponding data set of user's current queries demand, institute can determine according to table source field
It can be tables of data, Data View to state data set, it is also possible to which storing process, the embodiment of the present invention are not limited.
The filtered fields are used for the scope for limiting user's inquiry.The initial value of the filtered fields can be by system
Default mode is configured.The grouping field is for being grouped to the TV data that user inquires about, described
Grouping field is not limited to by time dimension to being grouped to the TV data that user inquires about, specifically can be with
Grouping field is arranged according to the demand of user.The display field is used for the display row for controlling TV data, tool
The data set that the display content of body TV data is determined to table source field is related.
For example, when the query characteristics field that user is selected from table source field classification or is configured is " upper Neptunian satellite
Depending on " or when " Beijing ", judge that " SBN " or " Beijing " is table source field, when with
Family is selected from filtered fields classification or the query characteristics field of configuration is " Shanghai " or " in August, 2015
28 days " when, judge that " Shanghai " or " on August 28th, 2015 " is filtered fields.Additionally, root
It is investigated that asking feature field " SBN " or " Beijing ", it may be determined that user's current queries demand correspondence
Tables of data " SBN is in Pekinese's viewership table ".
For the embodiment of the present invention, step 101 is specifically as follows:When user is in TV data inquiry unit
Select or configuration querying feature field on query interface, and when click or striking inquiry button, to TV
Data query arrangement sends TV data query statement, so as to TV data inquiry unit can receive TV number
According to query statement.Specifically, when user on the query interface of TV data inquiry unit selects or configures
Query characteristics field, and when click or striking inquiry button, by the Dashboard (applications of operating system
Program mode) the query characteristics field is sent to the application programming interfaces of TV data inquiry unit
(Application Programming Interface, API);The API of TV data inquiry unit is received
To after query characteristics field, you can judge that TV data inquiry unit can receive TV data query statement.
Wherein, described and TV data inquiry unit can be TV data inquiry application or software.
For the embodiment of the present invention, user can be according to the flexible configuration querying tagged word of actual queries demand
Section, can realize different TV data query demands, i.e., when the query demand of user is changed, only need weight
New configuration querying feature field simultaneously generates new query statement, and modification is flexibly and easily and without entering for new demand
The substantial amounts of R&D work of row, can reduce the workload of research staff.
102nd, according to the corresponding classification of query characteristics field, obtain and query characteristics field from preset storage location
The corresponding query terms of classification.
Wherein, different query characteristics field classifications are preserved in the preset storage location and different is looked into
Ask feature field classification and distinguish corresponding query terms.The preset storage location is specifically as follows preset storage
Table, or initialized data base, the embodiment of the present invention are not limited.When the preset storage location is pre-
When putting storage table, described each query characteristics field classification corresponds to a query terms, preset storage table respectively
Specifically can such as table 2,
Query characteristics field | Query terms |
Table source field | From |
Filtered fields | Where |
Grouping field | Group by |
Display field | Select |
Table 2 is that the corresponding relation to query characteristics field with query terms is illustrated, and the present invention is real
Apply example and specific restriction is not done with the corresponding relation of query terms to query characteristics field.Specifically, can be with root
According to the corresponding relation of the actual demand configuration querying feature field and query terms of user, it is also possible to according to system
The corresponding relation of default mode configuration querying feature field and query terms.
For example, when the query characteristics field that user is selected from table source field classification or is configured is " upper Neptunian satellite
Depending on " or when " Beijing ", query characteristics field " SBN " or " Beijing " corresponding inquiry
Word is From.Due to according to query characteristics field " SBN " or " Beijing ", it is determined that use
Current queries demand corresponding tables of data in family is " SBN is in Pekinese's viewership table ", therefore inquires about special
It can be " From SBNs to levy field " SBN " or " Beijing " corresponding inquiry substatement
In Pekinese's viewership table ".
103rd, the corresponding query terms of classification according to query characteristics field and query characteristics field, generation are looked into
Ask sentence.
Wherein, the query statement of generation can be SQL statement.SQL is a kind of programming language of specific purposes,
It is a kind of data base querying and programming language, for accessing data and inquiry, updating and administrative relationships
Database Systems.Therefore, it is SQL statement the when the most frequently used query statement of data query is carried out.
For example, the inquiry table that user selects on the query interface of TV data inquiry unit or configures first
Source field be " Shenzhen satellite TV, Beijing ", filtered fields for " Beijing, August in 2015-31 days on the 1st, 19
When 30 point -20 when 30 points ", grouping field for " per diem ", display field be " audience ratings ".
Then, the table source that table source field " Shenzhen satellite TV, Beijing " determines is for " Shenzhen satellite TV is in Beijing rating
Information slip ", query characteristics field " Shenzhen satellite TV " or " Beijing " corresponding query terms are From,
Inquiry substatement is " From Shenzhen satellite TV is in Pekinese's viewership table ";Query characteristics field " audience ratings "
Corresponding query terms are Select, and inquiry substatement is " Select audience ratings ";Query characteristics field " north
Capital, August in 2015-31 days on the 1st, 19 when 30 point-20 when 30 points " corresponding query terms are Where,
Inquiry substatement is " Where towns=Beijing, date=2015 on August -31 days 1, period=19
When 30 point -20 when 30 points ";The corresponding query terms of query characteristics field " per diem " are Group by, are looked into
It is " Group by are per diem " to ask substatement.
Finally, the create-rule according to SQL query statement, by looking into for generating after each inquiry substatement splicing
Ask sentence for " Select audience ratings from Shenzhen satellite TV Beijing viewership table Where towns=
Beijing, date=2015 on August -31 days 1, during period=19, when 30 point -20,30 points of Group by are pressed
Day ".
By according to according to the query characteristics field and the corresponding query terms of the query characteristics field,
Generate query statement, then carry out the inquiry of TV data, can avoid by manually according to query demand by
It is individual to write the cost of labor consumed by query statement such that it is able to improve the efficiency of TV data inquiry, while
The risk of errors brought by manual compiling query statement can be avoided such that it is able to ensure the TV number of inquiry
According to the query demand for meeting user.
104th, according to query statement, from data Integrated query TV data.
Wherein, the data set preserves TV data.The TV data preserved in the data set is basis
TV data collection log information obtain, will TV data collecting device collection log information data
Filtered, generation meets the TV data of the storage format of preset storage location.By data were carried out
Filter, it is ensured that the concordance of preset storage location data storage such that it is able to improve the accurate of TV inquiry
Rate.The data set, is specifically as follows tables of data, or and Data View, the embodiment of the present invention do not do
Limit.
For example, the query statement of generation is " Select audience ratings from ZTVs Beijing viewership table
Where towns=Beijing, date=2015 on August 1, during period=19 30 points when 30 point -20 ",
The TV data for then obtaining from tables of data is the ZTV on the 1st of August in 2015 in 7 points of this city of Beijing
The audience ratings of half to eight thirty.Then the TV data of acquisition is returned by the API of TV data inquiry unit
Back to Dashboard, so as to user can watch the corresponding TV data of query demand.
Can be with as follows for the concrete application scene of the embodiment of the present invention, but not limited to this, including:It is first
First user is selected on the query interface of TV data inquiry unit or the inquiry table source field that configures is " river
Soviet Union satellite TV, Nanjing ", filtered fields for " Beijing, -31 days on the 1st July in 2015,19 when 30 point -20
When 30 points ", grouping field for " per diem ", display field be " rating share ".User can be according to reality
The flexible configuration querying feature field of query demand, can realize different TV data query demands, i.e., when
When the query demand of user is changed, only need to reconfigure query characteristics field and generate new query statement, repair
Change flexibly and easily and without substantial amounts of R&D work being carried out for new demand, can reduce the work of research staff
Amount.
Then, the table source that table source field " Jiangsu satellite TV, Nanjing " determines is for " Jiangsu satellite TV is in Nanjing rating
Information slip ", query characteristics field " Jiangsu satellite TV " or " Nanjing " corresponding query terms are From,
Inquiry substatement is " From Jiangsu satellite TV is in Nanjing viewership table ";Query characteristics field " rating share "
Corresponding query terms are Select, and inquiry substatement is " Select rating shares ";Query characteristics field
" Nanjing, -31 days on the 1st July in 2015,19 when 30 point -20 when 30 points " corresponding query terms are
Where, inquiry substatement for " Where towns=Nanjing, on date=2015 on July -31 1,
During period=19 30 points when 30 point -20 ";The corresponding query terms of query characteristics field " per diem " are Group
By, inquiry substatement are " Group by are per diem ".By according to the query characteristics field and the inquiry
The corresponding query terms of classification of feature field, generate query statement, then carry out the inquiry of TV data,
Can avoid by manually writing the cost of labor consumed by query statement one by one according to query demand, so as to
The efficiency of TV data inquiry is improved enough, while the mistake brought by manual compiling query statement can be avoided
Risk such that it is able to ensure that the TV data of inquiry meets the query demand of user.
Finally, the create-rule according to SQL query statement, by looking into for generating after each inquiry substatement splicing
Ask sentence for " Select audience ratings from Shenzhen satellite TV Beijing viewership table Where towns=
Beijing, date=2015 on August -31 days 1,-eight thirty of period=7 thirty Group by are per diem ".Then
The TV data obtained from tables of data is the Jiangsu satellite TV of on July 1st, 2015 at this city 19 of Nanjing
30 points of rating share when 30 point -20.Then by the TV data for obtaining by TV data inquiry unit
API returns to Dashboard, so as to user can watch TV data corresponding with the query demand.
A kind of TV data querying method provided in an embodiment of the present invention, is receiving TV data query statement
Afterwards, according to the corresponding classification of the query characteristics field, obtain and the query characteristics from preset storage location
The corresponding query terms of field classification, preserve different query characteristics field classes in the preset storage location
Other and different query characteristics field classification distinguishes corresponding query terms;According to the query characteristics field
And the corresponding query terms of classification of the query characteristics field, generate query statement;According to the inquiry
Sentence, from data Integrated query TV data, wherein, the data set preserves TV data.With it is current,
Inquiry can only be carried out for the particular demands of user when TV data inquiry is carried out to compare, the embodiment of the present invention
Query statement is generated by query characteristics field and query terms corresponding with the query characteristics field classification,
Then according to the query statement, the inquiry of TV data is carried out, can be realized full by a query interface
The different query demand of sufficient user, i.e., when the query demand of user is changed, only need to change query characteristics field,
Can be achieved with TV data corresponding with the query demand after the change such that it is able to realize different according to user
Demand carry out the inquiry of TV data.
Embodiments provide another kind of TV data querying method, below as shown in Fig. 2 the side
Method includes:
201st, receive TV data query statement.
Wherein, the TV data query statement carries query characteristics field and query characteristics field is corresponding
Query terms.The TV data query statement can be for the instruction of the audience ratings of television channel, when user's inquiry
When demand is changed, TV data query statement can be that the audience ratings of the current television program of all channels refers to
Order, or the query statement of the rating share of somewhere TV programme, user were seen in certain time period
The query statement of certain television channel number of times is seen, the embodiment of the present invention is not limited.The query characteristics field
The query demand of user can be reflected, the corresponding query terms of query characteristics field can be normal in SQL statement
Query terms, such as Select, From, Where, Group by, Order by, And, Or etc..
The specific explanations of the query characteristics field and the corresponding query terms of query characteristics field are in step 101
It is described in detail, will not be described here.With at present carry out TV data inquire about when, spy can only be inquired about
The fixed TV data for needing is compared, and the present invention can pass through the query characteristics field of user's change and described look into
Ask the corresponding classification of feature field, it becomes possible to which realization carries out the inquiry of TV data according to the different demand of user,
So as to avoid substantial amounts of R&D work being carried out for new demand, can reduce the workload of research staff.
For the embodiment of the present invention, step 201 is specifically as follows:When user is in TV data inquiry unit
Select or configuration querying feature field on query interface, and when click or striking inquiry button, to TV
Data query arrangement sends TV data query statement, so as to TV data inquiry unit can receive TV number
According to query statement.Wherein, described and TV data inquiry unit can be TV data inquiry application or
Person's software.202nd, according to the corresponding classification of query characteristics field, obtain from preset storage location and query characteristics
The corresponding query terms of field classification.
Wherein, different query characteristics field classifications are preserved in the preset storage location and different is looked into
Ask feature field classification and distinguish corresponding query terms.The preset storage location is specifically as follows preset storage
Table, or initialized data base, the embodiment of the present invention are not limited.
203rd, the corresponding query terms of classification according to query characteristics field and the query characteristics field, it is raw
Into query statement.
Wherein, the query statement of generation can be SQL statement.
For example, the inquiry table that user selects on the query interface of TV data inquiry unit or configures first
Source field is " where father go, Beijing and Shanghai ", filtered fields for " Shanghai, in June, 2015-August,
22. -23 points ", grouping field for " monthly ", display field be " rating share ".
Then, the table source that table source field " where father go, Beijing and Shanghai " determines is for " where father go
In Beijing and Shanghai viewership table ", query characteristics field " father where go " or " Beijing and Shanghai "
Corresponding query terms are From, and inquiry substatement is for " where father From is gone in Beijing and Shanghai rating feelings
Condition table ";Query characteristics field " rating share " corresponding query terms are Select, inquire about substatement and are
" Select rating shares ";Query characteristics field " Beijing and Shanghai, in June, 2015-August " is corresponding
Query terms are Where, and inquiry substatement is " Where cities group=Beijing and Shanghai, date=2015 year 6
The moon-August, -23 point of period=22 point ";The corresponding query terms of query characteristics field " monthly " are Group by,
Inquiry substatement is " Group by are monthly ".
Finally, the create-rule according to SQL query statement, by looking into for generating after each inquiry substatement splicing
Sentence is ask for " where Select rating share from fathers are gone in Beijing and Shanghai viewership table Where
City group=Beijing and Shanghai, in date=2015 year June-August, -23 point Group by of period=22 point are monthly ".
For the embodiment of the present invention, by according to according to the query characteristics field and the query characteristics word
The corresponding query terms of section, generate query statement, then carry out the inquiry of TV data, can avoid passing through
The cost of labor consumed by query statement is write one by one according to query demand manually such that it is able to improve TV number
It is investigated that the efficiency ask, while the risk of errors brought by manual compiling query statement can be avoided, so as to
Enough TV datas for ensureing inquiry meet the query demand of user.
204th, detect whether the corresponding query terms of query characteristics field meet prerequisite.
Wherein, the prerequisite can be set according to the demand of user, it is also possible to according to the silent of system
Recognize pattern to be set, the embodiment of the present invention is not limited.For example, the TV data query demand ratio of user
When more complicated, the query statement of generation is complex and loaded down with trivial details.TV is carried out by simple SQL statement only
Data query, search efficiency are slow, or even the TV data for inquiring is mismatched with user's query demand.Pass through
Detect whether the corresponding query terms of the query characteristics field meet the efficiency that prerequisite can lift inquiry
With the accuracy of inquiry.When the corresponding query terms of query characteristics field are case, else if, sum, agv
Deng when, judge that the corresponding query terms of the query characteristics field do not meet prerequisite.
For example, the query demand of user is to obtain Shenzhen satellite TV in 2014 in the bimonthly audience ratings value in Beijing, then
The query statement of generation is complex, needs to be completed by case or else if query terms.
Now, then judge that the corresponding query terms of the query characteristics field do not meet prerequisite.
If the 205, detecting, the corresponding query terms of query characteristics field do not meet prerequisite, according to inquiry language
Sentence generates storing process.
Wherein, storing process is one group of SQL statement collection in order to complete specific function, is stored in data base
Through first time compile after call again and need not compile again, user by specify storing process name simultaneously
And provide parameter to perform it.Storing process can complete the judgement and more complicated computing of complexity;Can carry
High data base performs speed.Therefore, for the embodiment of the present invention, when the detection query characteristics field correspondence
Query terms do not meet prerequisite, by according to the query statement generate storing process, then pass through
The storing process is called, and the efficiency that TV data can lift TV data inquiry is obtained from data set.
206th, by calling storing process, TV data is inquired about from data set.
Wherein, the data set preserves TV data.The TV data preserved in the data set is basis
TV data collection log information obtain, will TV data collecting device collection log information data
Filtered, generation meets the TV data of the storage format of preset storage location.By data were carried out
Filter, it is ensured that the concordance of preset storage location data storage such that it is able to improve the accurate of TV inquiry
Rate.The data set can be table, view, one or more in storing process, the embodiment of the present invention
Do not limit.
It is for the embodiment of the present invention, described according to the query statement, carry out TV data query steps it
Afterwards, can also specifically include:When TV data inquiry failure, information, the output prompting are exported
Information is used to point out TV data to fail.
Wherein, the information can be picture prompting information, text prompt information or audio prompt letter
Breath.For example, first information is specifically as follows for pointing out the picture prompting of TV data failure to believe
Breath, can be the text prompt information for pointing out TV data failure, or for pointing out TV number
According to the audio prompt information of failure.For the embodiment of the present invention, by exporting carrying for prompting TV data failure
Show that information can point out user the query characteristics field of adjustment TV inquiry, or prompting TV data statistics person
TV data is counted according to the demand of user such that it is able to lift Consumer's Experience.
Further, the embodiment of the present invention additionally provides store function, specifically includes:By query characteristics field
It is divided into different query characteristics field classifications;Set up different classes of query characteristics field and query terms it
Between mapping relations;The mapping relations are saved in the preset storage location.By by query characteristics
Field is divided into different query characteristics field classifications, is that different classes of query characteristics field is respectively configured and looks into
Word is ask, the inquiry mode of user's difference query demand can be met in fact by a query interface enough.When with
When the query demand at family is changed, it is only necessary to change query characteristics field.
Another kind of TV data querying method provided in an embodiment of the present invention, is receiving TV data query statement
Afterwards, according to the corresponding classification of the query characteristics field, obtain and the query characteristics from preset storage location
The corresponding query terms of field classification, preserve different query characteristics field classes in the preset storage location
Other and different query characteristics field classification distinguishes corresponding query terms;According to the query characteristics field
And the corresponding query terms of classification of the query characteristics field, generate query statement;According to the inquiry
Sentence, from data Integrated query TV data, wherein, the data set preserves TV data.With it is current,
Inquiry can only be carried out for the particular demands of user when TV data inquiry is carried out to compare, the embodiment of the present invention
Query statement is generated by query characteristics field and query terms corresponding with the query characteristics field classification,
Then according to the query statement, the inquiry of TV data is carried out, can be realized full by a query interface
The different query demand of sufficient user, i.e., when the query demand of user is changed, only need to change query characteristics field,
Can be achieved with TV data corresponding with the query demand after the change such that it is able to realize different according to user
Demand carry out the inquiry of TV data.
Further, implementing as method shown in Fig. 1, embodiments provides a kind of TV
Data query arrangement, as shown in figure 3, described device includes:Receiving unit 31, acquiring unit 32, generation
Unit 33, query unit 34.
Receiving unit 31, can be used for receiving TV data query statement, and the TV data query statement is taken
Band query characteristics field and the corresponding classification of the query characteristics field.
Acquiring unit 32, can be used for according to the corresponding classification of the query characteristics field, from preset storage position
Acquisition query terms corresponding with the query characteristics field classification are put, is preserved in the preset storage location
Different query characteristics field classifications and different query characteristics field classifications distinguish corresponding query terms.
Signal generating unit 33, can be used for the class according to the query characteristics field and the query characteristics field
Not corresponding query terms, generate query statement.
Query unit 34, can be used for according to the query statement, from data Integrated query TV data, its
In, the data set preserves TV data.
It should be noted that each function involved by a kind of TV data inquiry unit provided in an embodiment of the present invention
Other corresponding descriptions of unit, may be referred to the correspondence description of Fig. 1, will not be described here.
A kind of TV data inquiry unit provided in an embodiment of the present invention, is receiving TV data query statement
Afterwards, according to the corresponding classification of the query characteristics field, obtain and the query characteristics from preset storage location
The corresponding query terms of field classification, preserve different query characteristics field classes in the preset storage location
Other and different query characteristics field classification distinguishes corresponding query terms;According to the query characteristics field
And the corresponding query terms of classification of the query characteristics field, generate query statement;According to the inquiry
Sentence, from data Integrated query TV data, wherein, the data set preserves TV data.With it is current,
Inquiry can only be carried out for the particular demands of user when TV data inquiry is carried out to compare, the embodiment of the present invention
Query statement is generated by query characteristics field and query terms corresponding with the query characteristics field classification,
Then according to the query statement, the inquiry of TV data is carried out, can be realized full by a query interface
The different query demand of sufficient user, i.e., when the query demand of user is changed, only need to change query characteristics field,
Can be achieved with TV data corresponding with the query demand after the change such that it is able to realize different according to user
Demand carry out the inquiry of TV data.
Further, implementing as method shown in Fig. 2, embodiments provides another kind of electricity
Depending on data query arrangement, as shown in figure 4, receiving unit 41, acquiring unit 42, signal generating unit 43, inquiry
Unit 44.
Receiving unit 41, can be used for receiving TV data query statement, and the TV data query statement is taken
Band query characteristics field and the corresponding classification of the query characteristics field.
Acquiring unit 42, can be used for according to the corresponding classification of the query characteristics field, from preset storage position
Acquisition query terms corresponding with the query characteristics field classification are put, is preserved in the preset storage location
Different query characteristics field classifications and different query characteristics field classifications distinguish corresponding query terms.
Signal generating unit 43, can be used for the class according to the query characteristics field and the query characteristics field
Not corresponding query terms, generate query statement.
Query unit 44, can be used for according to the query statement, from data Integrated query TV data, its
In, the data set preserves TV data.
Described device also includes:Detector unit 45.
The detector unit 45, can be used for detecting that the corresponding query terms of the query characteristics field classification are
It is no to meet prerequisite.
The signal generating unit 43, if can be used for detector unit 45 detects the query characteristics field classification correspondence
Query terms meet prerequisite, then according to the query statement generate storing process.
The query unit 44, specifically can be used for by calling the storing process, from data Integrated query
TV data.
Described device also includes:Division unit 46, dispensing unit 47, set up unit 48, storage unit 49.
Division unit 46, can be used for for query characteristics field being divided into different query characteristics field classifications.
Dispensing unit 47, may be used for different classes of query characteristics field and is respectively configured query terms.
Unit 48 is set up, can be used for setting up reflecting between different classes of query characteristics field and query terms
Penetrate relation.
Storage unit 49, can be used for the mapping relations are saved in the preset storage location.
Described device also includes:Output unit 40.
Output unit 40, can be used for, when TV data inquiry failure, exporting information, the output
Information is used to point out TV data to fail.
Wherein, the data set can be one or more in table, view, storing process.
It should be noted that each work(involved by another kind of TV data inquiry unit provided in an embodiment of the present invention
Other corresponding descriptions of energy unit, may be referred to the correspondence description of Fig. 2, will not be described here.
Another kind of TV data inquiry unit provided in an embodiment of the present invention, is receiving TV data query statement
Afterwards, according to the corresponding classification of the query characteristics field, obtain and the query characteristics from preset storage location
The corresponding query terms of field classification, preserve different query characteristics field classes in the preset storage location
Other and different query characteristics field classification distinguishes corresponding query terms;According to the query characteristics field
And the corresponding query terms of classification of the query characteristics field, generate query statement;According to the inquiry
Sentence, from data Integrated query TV data, wherein, the data set preserves TV data.With it is current,
Inquiry can only be carried out for the particular demands of user when TV data inquiry is carried out to compare, the embodiment of the present invention
Query statement is generated by query characteristics field and query terms corresponding with the query characteristics field classification,
Then according to the query statement, the inquiry of TV data is carried out, can be realized full by a query interface
The different query demand of sufficient user, i.e., when the query demand of user is changed, only need to change query characteristics field,
Can be achieved with TV data corresponding with the query demand after the change such that it is able to realize different according to user
Demand carry out the inquiry of TV data.
Through the above description of the embodiments, those skilled in the art can be understood that this
It is bright to add the mode of required common hardware to realize by software, naturally it is also possible to by hardware, but a lot
In the case of the former be more preferably embodiment.Based on such understanding, technical scheme substantially or
Person says that the part contributed to prior art can be embodied in the form of software product, and the computer is soft
Part product is stored in the storage medium that can read, such as the floppy disk of computer, hard disk or CD etc., if including
Dry instruction is used so that a computer equipment (can be personal computer, server, or the network equipment
Deng) perform method described in each embodiment of the invention.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited to
This, any those familiar with the art the invention discloses technical scope in, can readily occur in
Change or replacement, should all be included within the scope of the present invention.Therefore, protection scope of the present invention should
It is defined by the scope of the claims.
Claims (10)
1. a kind of TV data querying method, it is characterised in that include:
TV data query statement is received, the TV data query statement carries query characteristics field and institute
State the corresponding classification of query characteristics field;
According to the corresponding classification of the query characteristics field, obtain and the query characteristics from preset storage location
The corresponding query terms of field classification, preserve different query characteristics field classes in the preset storage location
Other and different query characteristics field classification distinguishes corresponding query terms;
It is according to the corresponding query terms of classification of the query characteristics field and the query characteristics field, raw
Into query statement;
According to the query statement, from data Integrated query TV data, wherein, the data set is preserved
TV data.
2. TV data querying method according to claim 1, it is characterised in that described in the basis
Query statement, before carrying out the inquiry of TV data, also includes:
Detect whether the corresponding query terms of the query characteristics field classification meet prerequisite;
If not meeting, storing process is generated according to the query statement;
It is described according to the query statement, inquiry TV data includes:
By calling the storing process, from data Integrated query TV data.
3. TV data querying method according to claim 1, it is characterised in that described to deposit from preset
Storage position acquisition query characteristics field classification corresponding with the query characteristics field, and the query characteristics
Before the corresponding query terms of field classification, also include:
Query characteristics field is divided into into different query characteristics field classifications;
Query terms are respectively configured for different classes of query characteristics field;
The mapping relations set up between different classes of query characteristics field and query terms;
The mapping relations are saved in the preset storage location.
4. TV data querying method according to claim 1, it is characterised in that described in the basis
Query statement, after carrying out the inquiry of TV data, also includes:
When TV data inquiry failure, information is exported, the output information is used to point out TV
Data failure.
5. TV data querying method according to claim 1, the data set can for table, view,
One or more in storing process.
6. a kind of TV data inquiry unit, it is characterised in that include:
Receiving unit, for receiving TV data query statement, the TV data query statement carries inquiry
Feature field;
Acquiring unit, for according to the corresponding classification of the query characteristics field, obtaining from preset storage location
Query terms corresponding with the query characteristics field classification, preserve different in the preset storage location
Query characteristics field classification and different query characteristics field classifications distinguish corresponding query terms;
Signal generating unit, for the query characteristics field that received according to the receiving unit and the acquiring unit
The corresponding query terms of classification of the query characteristics field of acquisition, generate query statement;
Query unit, for according to the query statement, inquiring about TV data.
7. TV data inquiry unit according to claim 6, it is characterised in that described device is also wrapped
Include:Detector unit,
The detector unit, for detecting whether the corresponding query terms of the query characteristics field classification meet
Prerequisite;
The signal generating unit, if detecting the corresponding query word of the query characteristics field classification for detector unit
Language meets prerequisite, then generate storing process according to the query statement;
The query unit, specifically for by calling the storing process, inquiring about TV data.
8. TV data inquiry unit according to claim 7, it is characterised in that described device is also wrapped
Include:
Division unit, for query characteristics field is divided into different query characteristics field classifications;
Dispensing unit, for being respectively configured query terms for different classes of query characteristics field;
Unit is set up, for setting up the mapping relations between different classes of query characteristics field and query terms;
Storage unit, for the mapping relations are saved in the preset storage location.
9. TV data inquiry unit according to claim 6, it is characterised in that described device is also wrapped
Include:
Output unit, for when TV data inquiry fails, exporting information, the output prompting letter
Cease for pointing out TV data to fail.
10. TV data querying method according to claim 6, the data set can for table, regard
Figure, one or more in storing process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510689272.1A CN106610973B (en) | 2015-10-21 | 2015-10-21 | Television data query method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510689272.1A CN106610973B (en) | 2015-10-21 | 2015-10-21 | Television data query method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106610973A true CN106610973A (en) | 2017-05-03 |
CN106610973B CN106610973B (en) | 2020-09-04 |
Family
ID=58611583
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510689272.1A Active CN106610973B (en) | 2015-10-21 | 2015-10-21 | Television data query method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106610973B (en) |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101271473A (en) * | 2008-04-29 | 2008-09-24 | 华为技术有限公司 | Data query method, device and system |
CN101770469A (en) * | 2008-12-31 | 2010-07-07 | 中国银联股份有限公司 | Page based data query method and system thereof |
CN102004766A (en) * | 2010-11-09 | 2011-04-06 | 北京神州泰岳软件股份有限公司 | Query method and system for configurable information based on information system |
CN102110111A (en) * | 2009-12-29 | 2011-06-29 | 北京大学 | Method and system for processing database operating command |
CN102163223A (en) * | 2011-04-02 | 2011-08-24 | 锐词文化发展(北京)有限公司 | Self-service query method and device thereof for background data |
CN103473267A (en) * | 2013-08-09 | 2013-12-25 | 深圳市中科新业信息科技发展有限公司 | Data storage query method and system |
CN103544211A (en) * | 2013-09-04 | 2014-01-29 | 广东全通教育股份有限公司 | General inquiry system and method for converting objects into SQL statements |
CN103577590A (en) * | 2013-11-12 | 2014-02-12 | 北京润乾信息系统技术有限公司 | Data query method and system |
CN104239508A (en) * | 2014-09-12 | 2014-12-24 | 中国工商银行股份有限公司 | Data query method and data query device |
CN104636478A (en) * | 2015-02-13 | 2015-05-20 | 广州神马移动信息科技有限公司 | Information query method and device |
CN104714974A (en) * | 2013-12-17 | 2015-06-17 | 航天信息股份有限公司 | Method and device for parsing and reprocessing query statement |
US20150205951A1 (en) * | 2014-01-20 | 2015-07-23 | Prevoty, Inc. | Systems and methods for sql query constraint solving |
CN104809254A (en) * | 2015-05-19 | 2015-07-29 | 郑州悉知信息技术有限公司 | Data query method and device |
US9146984B1 (en) * | 2013-03-15 | 2015-09-29 | Google Inc. | Enhancing queries for data tables with nested fields |
-
2015
- 2015-10-21 CN CN201510689272.1A patent/CN106610973B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101271473A (en) * | 2008-04-29 | 2008-09-24 | 华为技术有限公司 | Data query method, device and system |
CN101770469A (en) * | 2008-12-31 | 2010-07-07 | 中国银联股份有限公司 | Page based data query method and system thereof |
CN102110111A (en) * | 2009-12-29 | 2011-06-29 | 北京大学 | Method and system for processing database operating command |
CN102004766A (en) * | 2010-11-09 | 2011-04-06 | 北京神州泰岳软件股份有限公司 | Query method and system for configurable information based on information system |
CN102163223A (en) * | 2011-04-02 | 2011-08-24 | 锐词文化发展(北京)有限公司 | Self-service query method and device thereof for background data |
US9146984B1 (en) * | 2013-03-15 | 2015-09-29 | Google Inc. | Enhancing queries for data tables with nested fields |
CN103473267A (en) * | 2013-08-09 | 2013-12-25 | 深圳市中科新业信息科技发展有限公司 | Data storage query method and system |
CN103544211A (en) * | 2013-09-04 | 2014-01-29 | 广东全通教育股份有限公司 | General inquiry system and method for converting objects into SQL statements |
CN103577590A (en) * | 2013-11-12 | 2014-02-12 | 北京润乾信息系统技术有限公司 | Data query method and system |
CN104714974A (en) * | 2013-12-17 | 2015-06-17 | 航天信息股份有限公司 | Method and device for parsing and reprocessing query statement |
US20150205951A1 (en) * | 2014-01-20 | 2015-07-23 | Prevoty, Inc. | Systems and methods for sql query constraint solving |
CN104239508A (en) * | 2014-09-12 | 2014-12-24 | 中国工商银行股份有限公司 | Data query method and data query device |
CN104636478A (en) * | 2015-02-13 | 2015-05-20 | 广州神马移动信息科技有限公司 | Information query method and device |
CN104809254A (en) * | 2015-05-19 | 2015-07-29 | 郑州悉知信息技术有限公司 | Data query method and device |
Non-Patent Citations (1)
Title |
---|
郭金锋 等: "《PHP & MySQL Web网络编程》", 31 March 2001, 北京:人民邮电出版社 * |
Also Published As
Publication number | Publication date |
---|---|
CN106610973B (en) | 2020-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102708130B (en) | Calculate the easily extensible engine that fine point of user is mated for offer | |
CN108600148B (en) | Transaction message processing method and device | |
CN110135890A (en) | The product data method for pushing and relevant device of knowledge based relation excavation | |
CN104077147A (en) | Software reusing method based on code clone automatic detection and timely prompting | |
CN107918548A (en) | Method, apparatus, computer equipment and the storage medium that business function is realized | |
WO1998044441A1 (en) | A system and method for associating services information with selected elements of an organization | |
CN106991196B (en) | Universal data tracing method and system | |
WO2009032541A2 (en) | Multiple database entity model generation using entity models | |
CN101436962A (en) | Log management method and system | |
CN112463151B (en) | Visual page construction method based on data source | |
CN110245145A (en) | Structure synchronization method and apparatus of the relevant database to Hadoop database | |
CN109299157A (en) | A kind of data export method and device of distributed big single table | |
CN111414410B (en) | Data processing method, device, equipment and storage medium | |
US20110153661A1 (en) | Navigation device and database update program | |
US5815556A (en) | Method and apparatus for extracting a subset of data wanted by a customer from a group of subsets of data wanted by different customers | |
CN103020753A (en) | Document state display system and document state display method | |
CN107229392A (en) | A kind of method for showing interface and system | |
CN110442791A (en) | Data push method and system | |
CN102521713B (en) | Data processing equipment and data processing method | |
CN103984554B (en) | The generation method and device of Software for Design document | |
CN111090803A (en) | Data processing method and device, electronic equipment and storage medium | |
CN101232538A (en) | Apparatus and method for merging business data | |
CN102043816A (en) | Method and apparatus for presenting character relation | |
CN102831123B (en) | Method and system for querying authority control of data | |
CN104123104B (en) | Daily record control system and method |
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 |
Address after: 100083 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. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |