CN104778244A - Method and device for searching data - Google Patents

Method and device for searching data Download PDF

Info

Publication number
CN104778244A
CN104778244A CN201510167056.0A CN201510167056A CN104778244A CN 104778244 A CN104778244 A CN 104778244A CN 201510167056 A CN201510167056 A CN 201510167056A CN 104778244 A CN104778244 A CN 104778244A
Authority
CN
China
Prior art keywords
data resource
tenant
data
search
searched
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
Application number
CN201510167056.0A
Other languages
Chinese (zh)
Other versions
CN104778244B (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.)
TVMining Beijing Media Technology Co Ltd
Original Assignee
TVMining Beijing Media 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 TVMining Beijing Media Technology Co Ltd filed Critical TVMining Beijing Media Technology Co Ltd
Priority to CN201510167056.0A priority Critical patent/CN104778244B/en
Publication of CN104778244A publication Critical patent/CN104778244A/en
Application granted granted Critical
Publication of CN104778244B publication Critical patent/CN104778244B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and a device for searching data, and relates to the field of the data. The method for searching the data comprises the steps of obtaining keywords inputted by a tenant ID (Identification); judging whether a control command with an assigned searching range is inputted by the tenant ID or not, and generating a judging result; determining a to-be-searched data resource according to the judging result; carrying out the search in an index corresponding to the determined to-be-searched data resource. According to the method and the device, disclosed by the invention, the needed data resource can be conveniently searched by the tenant ID.

Description

The searching method of data and device
Technical field
The present invention relates to database technical field, particularly a kind of searching method of data and device.
Background technology
Many tenants technology is a kind of software architecture technology in cloud computing, be intended to solve how under the environment of multi-user (such as cloud computing environment) share identical system or program assembly, guarantee again the isolation of data between each user.
In many tenants technology, tenant (Tenant) refers to the user of use system or computational resource, comprise all data that identifiable design is in systems in which designated user, the account such as created in systems in which and statistical information (Accounting Data), and the various data arranged in systems in which and the customization application environment etc. set by user, all belong to the scope of tenant.
Under this framework, the data how tenant can find oneself to need easily become the problem needing to solve.
Summary of the invention
The invention provides a kind of searching method and device of data, make the data that tenant can find oneself to need easily.
On the one hand, a kind of searching method of data is provided, comprises:
Obtain the keyword that a tenant ID inputs;
Judge whether described tenant ID inputs the steering order of specified search range, generate judged result;
According to described judged result, determine data resource to be searched;
According to described keyword, search in the index that the data resource described to be searched determined is corresponding.
Described according to described judged result, determine that the step of data resource to be searched comprises:
When described judged result is for being, described steering order, determines data resource to be searched;
When described judged result is no, obtain the subscription data type of described tenant ID; Be data resource to be searched with the data resource of the described predetermined data types of described tenant ID.
Described according to described steering order, determine that the step of data resource to be searched comprises:
When the described steering order of described tenant ID be search share data type time, using the data resource of described tenant ID and there are other tenant ID of shared relationship with described tenant ID data resource together with as data resource to be searched; Or
When the steering order of described tenant ID is the data type of search appointment search example, be data resource to be searched with the data resource of the appointment of described tenant ID search example.
When the described steering order of described tenant ID be search share and specify the data type of search example time, using the data resource of the appointment of described tenant ID search example and search for example with the appointment that described tenant ID has other tenant ID of shared relationship data resource together with as data resource to be searched.
Described according to described keyword, the step of carrying out searching in the index that the data resource described to be searched determined is corresponding is specially:
According to described keyword, search in the index of the data resource described to be searched determined.
Before the step of the keyword that described acquisition one tenant ID inputs, described method comprises:
Set up the index of data resource, the index field of described data resource comprises: one or more in the user ID of the video address of the title of data resource, the summary of data resource, data resource, the tenant ID of data resource, data resource.
On the other hand, a kind of searcher of data is provided, comprises:
Acquiring unit, obtains the keyword that a tenant ID inputs;
Judging unit, judges whether described tenant ID inputs the steering order of specified search range, generates judged result;
Determining unit, according to described judged result, determines data resource to be searched;
Search unit, according to described keyword, searches in the index that the data resource described to be searched determined is corresponding.
Described determining unit comprises:
First determines subelement, when described judged result is for being, according to described steering order, determines data resource to be searched;
Second determines subelement, when described judged result is no, obtains the subscription data type of described tenant ID; Be data resource to be searched with the data resource of the described predetermined data types of described tenant ID.
3rd determination module, when the described steering order of described tenant ID be search share and specify the data type of search example time, using the data resource of the appointment of described tenant ID search example and search for example with the appointment that described tenant ID has other tenant ID of shared relationship data resource together with as data resource to be searched.
Described first determines that subelement comprises:
First determination module, when the described steering order of described tenant ID be search share data type time, using the data resource of described tenant ID and there are other tenant ID of shared relationship with described tenant ID data resource together with as data resource to be searched; Or
Second determination module, when the steering order of described tenant ID is the data type of search appointment search example, is data resource to be searched with the data resource of the appointment of described tenant ID search example.
Described search unit is specially: according to described keyword, searches in the index of the data resource described to be searched determined.
Described device, also comprises:
Set up unit, set up the index of data resource, the index field of described data resource comprises: one or more in the user ID of the video address of the title of data resource, the summary of data resource, data resource, the tenant ID of data resource, data resource.
The present invention has following beneficial effect:
In the present invention, by judging whether tenant ID inputs the steering order of specified search range, determine data resource to be searched; Then, according to keyword, search in the index that the data resource described to be searched determined is corresponding, make the data that tenant can find oneself to need easily.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from instructions, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in write instructions, claims and accompanying drawing and obtain.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions, together with embodiments of the present invention for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of an embodiment of the searching method of a kind of data in the embodiment of the present invention;
Fig. 2 is the process flow diagram of another embodiment of the searching method of a kind of data in the embodiment of the present invention;
Fig. 3 is the connection diagram of the searcher of a kind of data in the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Fig. 1 is the searching method of an embodiment of a kind of data of the present invention.As shown in Figure 1, described method comprises:
Step S11, after tenant logs in, obtains the keyword that a tenant ID inputs;
Step S12, judges whether described tenant ID inputs the steering order of specified search range, generates judged result; In this step, some hunting zone options can be provided to select for tenant ID.Such as, hunting zone is certain search example (as TV data example, picture example, document examples), or hunting zone is: other tenants share to the data of this tenant or the data etc. of tenant oneself.In this step, user also can be inputted by the form of parameter.
Step S13, according to described judged result, determines data resource to be searched;
Step S14, according to described keyword, searches in the index that the data resource described to be searched determined is corresponding.
Such as, if user have selected certain search example, then search in the index that this search example is corresponding.If the non-selected search example of user, then can default search example be tv data resource.In search, the search field of TV data resource can be: the title, summary, vocabulary etc. of data.
In the present invention, by judging whether tenant ID inputs the steering order of specified search range, determine data resource to be searched, any steering order can certainly be inputted, the data under system provides default search example and an acquiescence search to belong to this tenant; Then, according to keyword, search in the index that the data resource described to be searched determined is corresponding, in numerous search data type instance, make the data that tenant can find oneself to need quickly and easily.
Optionally, in one embodiment, before step S11, described method comprises:
Step S10, set up the index of data resource, wherein, the index field of described data resource can comprise: one or more in the user ID of the video address of the title of data resource, the summary of data resource, data resource, the tenant ID of data resource, data resource.
Fig. 2 is another embodiment of the searching method of a kind of data of the present invention.As shown in Figure 2, described method comprises:
Step S20, set up the index of data resource, wherein, the index field of described data resource can comprise: one or more in the user ID of the video address of the title of data resource, the summary of data resource, data resource, the tenant ID of data resource, data resource.
Step S21, obtains the keyword that a tenant ID inputs;
Step S22, judges whether described tenant ID inputs the steering order of specified search range, generates judged result; In this step, some hunting zone options can be provided to select for tenant ID.Such as, hunting zone is some data search examples (as: tv TV data), or hunting zone is: the data etc. shared.In this step, user also can be inputted by the form of parameter.
Step S23, when described judged result is for being, according to described steering order, determines data resource to be searched.Determine that data resource to be searched comprises: determine search example and determine whether to search for shared data;
Step S24, when described judged result is no, obtains the subscription data type of described tenant ID; Be data resource to be searched with the data resource of the described predetermined data types of described tenant ID.That is, in the example of system default, the only data of search tenant oneself.
Step S25, according to described keyword, searches in the index that the data resource described to be searched determined is corresponding.
In above-described embodiment, user can select hunting zone.Such as select search example to be searched, as selected tv data or album data.When selecting tv data, can add parameter i=tv, can the search example of default search be also tv data.
Optionally, step S23 can comprise:
Step S231, when the described steering order of described tenant ID is when searching for the data type shared, in system default search example, using the data resource of described tenant ID and there are other tenant ID of shared relationship with described tenant ID data resource together with as data resource to be searched; Or
Step S232, when the steering order of described tenant ID is for search appointment search example, is data resource to be searched with the data resource of the appointment of described tenant ID search example, and only searches for the data of this tenant oneself.
Step S233, when the described steering order of described tenant ID is shared for search and specifies search example, using the data resource of the appointment of described tenant ID search example and search for example with the appointment that described tenant ID has other tenant ID of shared relationship data resource together with as data resource to be searched.
Such as, when after the keyword obtaining tenant ID input, according to the identification field of tenant ID, acquiescence only searches for the data resource of tenant.If the steering order of tenant's input is: search for oneself data and others is shared with his data, identification field is shared then according to tenant ID, at scope of resource corresponding to tenant ID with have in scope of resource corresponding to shared tenant ID with described tenant ID, search for the resource that oneself resource and other tenant are shared with this tenant ID, simultaneously, also can select to search for example, if search example is video resource example.
In above-described embodiment, not only can search for the data resource of tenant ID, also can search for the data resource that other tenant ID share to tenant ID, expand the hunting zone of data resource.
Application scenarios of the present invention is below described.
For example, the search example that different data types is corresponding different.Further, different search examples has different structures, so index structure is also different, can the field of index also different.
For difference search example, search engine when setting up index, support under each example configuration index field set up index.Such as: configuration index field comprises: title, summary, video address, tenant ID, user ID or index name etc.
When searching for, user inputs keyword.Optionally, user can also select the search example searched for, as tv data or album data.When the search example selecting search is tv data, parameter i=tv can be added.Also can default search example be the data of tv data type.
That is, if user have selected search example, then search in the index that this search example is corresponding.If the non-selected data type of user, then default search tv data resource example.The search field of TV data resource can be: the title, summary, vocabulary etc. of data.
For the tenant ID logged in, when after the keyword obtaining tenant ID input, according to the identification field of tenant ID, the data resource of an acquiescence search tenant.If the steering order of tenant's input is: search for oneself data and others is shared with his data, identification field (this field record tenant oneself ID is shared then according to tenant ID, its tenant ID is given with other sharing data, with CSV), at scope of resource corresponding to tenant ID with have in scope of resource corresponding to shared tenant ID with described tenant ID, search for the resource that oneself resource and other tenant are shared with this tenant ID, meanwhile, the search example also can selecting search is video resource example.
Fig. 3 is the searcher to a kind of data of the present invention.As shown in Figure 3, described method comprises:
Acquiring unit 31, obtains the keyword that a tenant ID inputs;
Judging unit 32, judges whether described tenant ID inputs the steering order of specified search range, generates judged result;
Determining unit 33, according to described judged result, determines data resource to be searched.Determine that data resource to be searched comprises two aspects: determine search example and determine whether to search for shared data;
Search unit 34, according to described keyword, searches in the index of the described search example determined.
Described determining unit 33 comprises:
First determines subelement, when described judged result is for being, according to described steering order, determines data resource to be searched;
Second determines subelement, when described judged result is no, in system default example, and the only data of search tenant oneself.Obtain the subscription data type of described tenant ID; Be data resource to be searched with the data resource of the described predetermined data types of described tenant ID.
Described first determines that subelement comprises:
First determination module, when the described steering order of described tenant ID be search share data type time, using the data resource of described tenant ID and there are other tenant ID of shared relationship with described tenant ID data resource together with as data resource to be searched; Or
Second determination module, when the steering order of described tenant ID is the data type of search appointment search example, is data resource to be searched with the data resource of the appointment of described tenant ID search example;
3rd determination module, when the described steering order of described tenant ID be search share and specify the data type of search example time, using the data resource of the appointment of described tenant ID search example and search for example with the appointment that described tenant ID has other tenant ID of shared relationship data resource together with as data resource to be searched.
Described device, also comprises:
Set up unit 35, set up the index of data resource, the index field of described data resource comprises: one or more in the user ID of the video address of the title of data resource, the summary of data resource, data resource, the tenant ID of data resource, data resource.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory and optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (8)

1. a searching method for data, is characterized in that, comprising:
Obtain the keyword that a tenant ID inputs;
Judge whether described tenant ID inputs the steering order of specified search range, generate judged result;
According to described judged result, determine data resource to be searched;
According to described keyword, search in the index that the data resource described to be searched determined is corresponding.
2. method according to claim 1, is characterized in that, described according to described judged result, determines that the step of data resource to be searched comprises:
When described judged result is for being, according to described steering order, determine data resource to be searched;
When described judged result is no, obtain the subscription data type of described tenant ID; Be data resource to be searched with the data resource of the described predetermined data types of described tenant ID.
3. method according to claim 2, is characterized in that, described according to described steering order, determines that the step of data resource to be searched comprises:
When the described steering order of described tenant ID be search share data type time, using the data resource of described tenant ID and there are other tenant ID of shared relationship with described tenant ID data resource together with as data resource to be searched; Or
When the steering order of described tenant ID is the data type of search appointment search example, be data resource to be searched with the data resource of the appointment of described tenant ID search example;
When the described steering order of described tenant ID be search share and specify the data type of search example time, using the data resource of the appointment of described tenant ID search example and search for example with the appointment that described tenant ID has other tenant ID of shared relationship data resource together with as data resource to be searched.
4. method according to claim 3, is characterized in that, before the step of the keyword that described acquisition one tenant ID inputs, described method comprises:
Set up the index of data resource, the index field of described data resource comprises: one or more in the user ID of the video address of the title of data resource, the summary of data resource, data resource, the tenant ID of data resource, data resource.
5. a searcher for data, is characterized in that, comprising:
Acquiring unit, obtains the keyword that a tenant ID inputs;
Judging unit, judges whether described tenant ID inputs the steering order of specified search range, generates judged result;
Determining unit, according to described judged result, determines data resource to be searched;
Search unit, according to described keyword, searches in the index that the data resource described to be searched determined is corresponding.
6. device according to claim 5, is characterized in that, described determining unit comprises:
First determines subelement, when described judged result is for being, according to described steering order, determines data resource to be searched;
Second determines subelement, when described judged result is no, obtains the subscription data type of described tenant ID; Be data resource to be searched with the data resource of the described predetermined data types of described tenant ID.
7. device according to claim 6, is characterized in that, described first determines that subelement comprises:
First determination module, when the described steering order of described tenant ID be search share data type time, using the data resource of described tenant ID and there are other tenant ID of shared relationship with described tenant ID data resource together with as data resource to be searched; Or
Second determination module, when the steering order of described tenant ID is the data type of search appointment search example, is data resource to be searched with the data resource of the appointment of described tenant ID search example;
3rd determination module, when the described steering order of described tenant ID be search share and specify the data type of search example time, using the data resource of the appointment of described tenant ID search example and search for example with the appointment that described tenant ID has other tenant ID of shared relationship data resource together with as data resource to be searched.
8. device according to claim 6, is characterized in that, also comprises:
Set up unit, set up the index of data resource, the index field of described data resource comprises: one or more in the user ID of the video address of the title of data resource, the summary of data resource, data resource, the tenant ID of data resource, data resource.
CN201510167056.0A 2015-04-09 2015-04-09 The searching method and device of data Expired - Fee Related CN104778244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510167056.0A CN104778244B (en) 2015-04-09 2015-04-09 The searching method and device of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510167056.0A CN104778244B (en) 2015-04-09 2015-04-09 The searching method and device of data

Publications (2)

Publication Number Publication Date
CN104778244A true CN104778244A (en) 2015-07-15
CN104778244B CN104778244B (en) 2018-08-24

Family

ID=53619708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510167056.0A Expired - Fee Related CN104778244B (en) 2015-04-09 2015-04-09 The searching method and device of data

Country Status (1)

Country Link
CN (1) CN104778244B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653373A (en) * 2016-02-25 2016-06-08 腾讯科技(深圳)有限公司 Resource distributing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130042008A1 (en) * 2011-08-12 2013-02-14 Splunk Inc. Elastic scaling of data volume
CN102937901A (en) * 2012-10-17 2013-02-20 武汉钢铁(集团)公司 Multi-tenant architecture design method
CN103136272A (en) * 2011-12-02 2013-06-05 腾讯科技(深圳)有限公司 Searching method and device based on network community searching
CN104252454A (en) * 2013-06-25 2014-12-31 广州中国科学院软件应用技术研究所 Method and system for multi-tenant mode data authority control oriented to cloud calculation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130042008A1 (en) * 2011-08-12 2013-02-14 Splunk Inc. Elastic scaling of data volume
CN103136272A (en) * 2011-12-02 2013-06-05 腾讯科技(深圳)有限公司 Searching method and device based on network community searching
CN102937901A (en) * 2012-10-17 2013-02-20 武汉钢铁(集团)公司 Multi-tenant architecture design method
CN104252454A (en) * 2013-06-25 2014-12-31 广州中国科学院软件应用技术研究所 Method and system for multi-tenant mode data authority control oriented to cloud calculation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姜康等: "基于ElasticSearch的元数据搜索与共享平台", 《计算机与现代化》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653373A (en) * 2016-02-25 2016-06-08 腾讯科技(深圳)有限公司 Resource distributing method and device

Also Published As

Publication number Publication date
CN104778244B (en) 2018-08-24

Similar Documents

Publication Publication Date Title
CN106326309B (en) Data query method and device
US9659108B2 (en) Pluggable architecture for embedding analytics in clustered in-memory databases
CN109564566B (en) Discovery of calling applications for controlling file hydration behavior
AU2015204742A1 (en) Methods for generating an activity stream
CN105138547A (en) Data search method and apparatus
CN104536987A (en) Data query method and device
US20120330988A1 (en) Systems And Methods For Performing Index Joins Using Auto Generative Queries
CN104484413A (en) Method and device for obtaining searching results
CN107633080B (en) User task processing method and device
US9465658B1 (en) Task distribution over a heterogeneous environment through task and consumer categories
CN103646039A (en) Webpage searching method and device
CN109977317B (en) Data query method and device
CN104778244A (en) Method and device for searching data
US9542457B1 (en) Methods for displaying object history information
CN110109986B (en) Task processing method, system, server and task scheduling system
AU2017227739B2 (en) Automated testing method for application program user interface, electronic device, system, and storage medium
CN104935966A (en) Method and device for copying classified video information
CN105824295A (en) Method, device and system for hardware device control
US20180196886A1 (en) Devices and methods for implementing dynamic collaborative workflow systems
US11562003B2 (en) Representing search results via a three-dimensional matrix
CN110019296B (en) Database query script generation method and device, storage medium and processor
CN105279233A (en) Resource retrieving method and device
US20180054471A1 (en) Hardware Bus Redirection
US20140149419A1 (en) Complex event processing apparatus for referring to table within external database as external reference object
CN112579877A (en) Information source system control method, device, storage medium and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data search method and device

Effective date of registration: 20210104

Granted publication date: 20180824

Pledgee: Inner Mongolia Huipu Energy Co.,Ltd.

Pledgor: TVMINING (BEIJING) MEDIA TECHNOLOGY Co.,Ltd.

Registration number: Y2020990001527

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180824

Termination date: 20210409