CN108717432A - resource query method and device - Google Patents

resource query method and device Download PDF

Info

Publication number
CN108717432A
CN108717432A CN201810448602.1A CN201810448602A CN108717432A CN 108717432 A CN108717432 A CN 108717432A CN 201810448602 A CN201810448602 A CN 201810448602A CN 108717432 A CN108717432 A CN 108717432A
Authority
CN
China
Prior art keywords
resource
index
server
tag
internet resources
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
CN201810448602.1A
Other languages
Chinese (zh)
Other versions
CN108717432B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810448602.1A priority Critical patent/CN108717432B/en
Publication of CN108717432A publication Critical patent/CN108717432A/en
Application granted granted Critical
Publication of CN108717432B publication Critical patent/CN108717432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of resource query method and devices, belong to resource management field.The method is applied to the first server in resource system, including:It is stored to first database by any Internet resources, the resource tag of the Internet resources and resource index correspondence is stored into the memory space of the first server;The inquiry request of first terminal is received, which carries at least one resource tag;From the stored resource index of memory space of the first server, at least one target resource index is obtained, target resource index is the corresponding resource index of at least one resource tag;It is indexed based at least one target resource, resource query result is returned to the first terminal.The corresponding resource index of resource tag can be obtained in the present invention directly from the stored resource index of local storage space, obtains the easy to operate of resource index, acquisition is efficient, and then improves resource query efficiency.

Description

Resource query method and device
Technical field
The present invention relates to resource management field, more particularly to a kind of resource query method and device.
Background technology
With the development of internet, one's own Internet resources are often shared network by user, so that other are used Family is checked by network.For example, the Internet resources can be video, picture, article or model etc..Moreover, in practical application, it is The Internet resources for inquiring oneself needs from the Internet resources of magnanimity convenient for other users, in user's network resource sharing, It is the Internet resources setting resource tag shared that can require user, which is used to indicate the classification of the Internet resources, Later, other users can easily inquire the Internet resources of needs by resource tag.
In the related technology, server can generally store the Internet resources that user uploads into resource database, and will be every The resource index of a Internet resources is stored into index data base corresponding with the resource tag of the Internet resources, wherein network The resource index of resource is used to indicate the storage location of the Internet resources.That is to say, server generally with multiple index data bases Connection, each index data base is for storing a kind of corresponding resource index of resource tag.In practical application, terminal can basis The inquiry operation of user sends inquiry request to server, which carries at least one resource tag, with requesting query The corresponding Internet resources of at least one resource tag.When server receives the inquiry request, at least one money Each resource tag in the label of source can obtain at least one resource from index data base corresponding with each resource tag Index, the resource index that then will be obtained from index data base corresponding with each resource tag are determined as at least one mesh Resource index is marked, then at least one Internet resources are obtained from resource database based at least one target resource index, by this At least one Internet resources return to terminal.
Due to after receiving inquiry request, needing first to search the corresponding index data base of resource tag, then from number of resources According to obtaining resource index in library, and when resource tag is more, with greater need for searching each resource tag point in multiple resource tags Not corresponding index data base, and obtain resource index respectively from the corresponding resource database of each resource tag, therefore provide The acquisition of source index is less efficient, and then causes the search efficiency of Internet resources relatively low.
Invention content
An embodiment of the present invention provides a kind of resource query method and device, can be used for solving present in the relevant technologies The acquisition of resource index is less efficient, the relatively low problem of the search efficiencies of Internet resources.The technical solution is as follows:
On the one hand, a kind of resource query method is provided, the first server being applied in resource system, the method packet It includes:
It is stored to first database by any Internet resources, by the resource tag and resource index of the Internet resources Correspondence is stored into the memory space of the first server, and the first database is for storing publication in the resource system Internet resources;
The inquiry request of first terminal is received, the inquiry request carries at least one resource tag, the resource tag It is used to indicate the generic of resource to be checked;
From the stored resource index of memory space of the first server, at least one target resource rope is obtained Draw, the target resource index is the corresponding resource index of at least one resource tag;
It is indexed based at least one target resource, resource query result is returned to the first terminal.
On the one hand, a kind of resource query device, the first server in the resource system are provided, described device is also wrapped It includes:
First memory module, for being stored to first database by any Internet resources, by the Internet resources Resource tag and resource index correspondence are stored into the memory space of the first server;
Receiving module, the inquiry request for receiving first terminal, the inquiry request carry at least one resource tag, The resource tag is used to indicate the generic of resource to be checked;
First acquisition module, for from the stored resource index of memory space of the first server, obtaining extremely Few target resource index, the target resource index are the corresponding resource index of at least one resource tag;
First sending module, for based at least one target resource index, resource to be returned to the first terminal Query result.
On the one hand, a kind of server is provided, the server includes processor and memory, is stored in the memory There are at least one instruction, at least one section of program, code set or instruction set, described instruction, described program, the code set or described Instruction set is loaded by the processor and is executed to realize above-mentioned resource query method.
On the one hand, provide a kind of computer readable storage medium, be stored in the storage medium at least one instruction, At least one section of program, code set or instruction set, described instruction, described program, the code set or described instruction collection are by processor It loads and executes to realize above-mentioned resource query method.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
In the embodiment of the present invention, for any server in resource system, any Internet resources are stored to the first number Behind library, the resource tag of Internet resources and resource index can be corresponded to directly and be stored in local storage sky by first server Between in, after receiving inquiry request, directly from the stored resource index of local storage space obtain resource tag it is corresponding Resource index, and the resource index based on acquisition returns to query result, first determines that resource tag is distinguished compared in the related technology Corresponding index data base, then obtain the querying method for indexing resource respectively from corresponding index data base, obtain resource index It is easy to operate, obtain efficient, and then improve resource query efficiency.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is a kind of network forum schematic diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of resource system schematic diagram provided in an embodiment of the present invention;
Fig. 3 is another resource system schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of flow chart of resource query method provided in an embodiment of the present invention;
Fig. 5 is another resource system schematic diagram provided in an embodiment of the present invention;
Fig. 6 is a kind of resource system schematic diagram provided in the related technology;
Fig. 7 is a kind of Stored Procedure figure of Internet resources provided in an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of resource query device provided in an embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of terminal 900 provided in an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram of server 1000 provided in an embodiment of the present invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Before to the embodiment of the present invention carrying out that explanation is explained in detail, first the application scenarios of the embodiment of the present invention are given Explanation.
Before to the embodiment of the present invention carrying out that explanation is explained in detail, first the application scenarios of the embodiment of the present invention are given Explanation.
The resource query method that the embodiment of the present invention should provide is inquired on network in the scene of Internet resources for user, The Internet resources can be video, picture, model or UGC (User Generated Content, user's original content) etc..Tool Body, it is mainly used in the scene that Internet resources are inquired by resource tag.
In query process, user can select resource tag in query interface, and the resource tag based on selection carries out Inquiry, can also input resource tag, the resource tag based on input is inquired, the embodiment of the present invention pair in query interface This is not limited.
For example, can provide multiple resource tags corresponding inquiry entrance in query interface, user can be somebody's turn to do by triggering The corresponding inquiry entrance of any resource tag, inquires the corresponding Internet resources of the resource tag in multiple resource tags.With network For for video, the theme named with multiple resources label would generally be arranged in video website, such as " video display ", " move " music " resource The themes such as picture ", " making laughs ", user can inquire resource tag correspondence by clicking the theme named with some resource tag Video, when detecting the inquiry operation of user, current queries interface can jump to corresponding theme circle of the resource tag Face, and multiple videos corresponding with the resource tag are shown on the theme interface.
For another example query interface can provide search box, user can input resource tag in search box, with by defeated The resource tag entered is inquired.By taking the Internet resources are video as an example, when user wants to look up funny video, it can search Resource tag " making laughs " is inputted in rope frame, is then clicked ACK button and is confirmed inquiry.When terminal detects the point to ACK button When hitting operation, you can send inquiry request to server, and the inquiry request carries resource tag " making laughs ".
In addition, user can also on network network resource sharing, and can be share Internet resources setting resource mark Label.Specifically, it is selected in multiple resource tags that the resource tag of Internet resources can be provided by user from resource sharing interface It obtains, can also input to obtain by user.
For example, by taking the Internet resources are video as an example, user can upload the video of oneself making in video website, and be Corresponding resource tag is arranged in the video of upload, in this way, other users can be inquired by the resource tag of the user setting The video uploaded to the user.For example, user can be the music video setting music label uploaded, be the funny video uploaded Label etc. of making laughs is set.
For another example by taking the Internet resources are model as an example, user can be posted by network forum, to pass through model Oneself opinion and view are delivered, and in order to allow other users to be easier to find the model of oneself publication, user can also be note Corresponding label is arranged in son, to pass through the general classification of tag identifier model.And other users can be according to oneself induction interest Label remove on the network forum model of the inquiry with this part labels, to be able to conveniently find the content oneself liked.Show Example, the display interface of network forum can be as shown in Figure 1.
Next the system architecture of the embodiment of the present invention is explained.
The embodiment of the present invention is applied in resource system, which includes at least one server, for being user The services such as storage or the inquiry of resource are provided.
Fig. 2 is a kind of resource system schematic diagram provided in an embodiment of the present invention, as shown in Fig. 2, the resource system includes the One server 10, first database 20 and first terminal 30, first server 10 can by network respectively with first database 20 and first terminal 30 be attached.
Wherein, first server 20 is used to user and provides the server that Internet resources are shared and inquire service, such as Can be the background server of network resource platform, such as UGC.First database 20 is used to store publication in the resource system Internet resources.First terminal 30 is user terminal, is specifically as follows mobile phone, tablet computer or computer etc..
In the embodiment of the present invention, first server 30 is stored by any Internet resources to first database 20, can be with Directly Internet resources and resource index correspondence are stored into the memory space of first server 30, later, first can be received The inquiry request of terminal 30, which carries at least one resource tag, then from the memory space of first server 30 In stored resource index, obtain at least one target resource index, at least one target resource index for this at least one The corresponding resource index of a resource tag is finally based at least one target resource index, resource is returned to first terminal 30 Query result.
That is to say, in the embodiment of the present invention, first server 30 can by Internet resources and resource index correspondence store to In local storage space, when receiving inquiry request, can directly from local storage space query resource label it is corresponding Resource index, and query result is returned to based on the resource index that inquires, so as to avoid from the corresponding rope of each resource tag Draw the operation that database obtains resource index respectively, improves resource query efficiency.
Further, which can also include other servers in addition to first server 10, multiple services Server cluster can be formed between device, provide resource service to the user jointly.As shown in figure 3, the resource system further includes Two servers 40.
The resource tag of Internet resources and resource index correspondence are stored depositing to first server 10 by first server 10 After storing up in space, the resource tag of Internet resources and resource index can also be sent to second server 40, by the second clothes Business device 40 stores the resource tag of the Internet resources and resource index correspondence into the memory space of the second server 40.
Further, as shown in figure 3, the resource system can also include the second database 50, in the embodiment of the present invention, the Two databases 40 are used to store the resource tag and resource index for the Internet resources issued in the resource system.
For example, first server 10 can also store the resource tag of the Internet resources and resource index correspondence to second Database 50 obtains the resource tag and resource index that second server 40 corresponds to storage, based on acquisition from the second database 50 Resource tag and resource index, the stored resource tag of the memory space of first server and resource index are carried out more Newly.
It that is to say, each server can upload to the resource tag for the Internet resources that itself is received and resource index Second database 50 can also obtain the resource tag and resource index that other servers upload, so from the second database 50 The data that may be implemented between each server synchronize, and the inquiry request return money of user can be directed to by ensureing each server Source query result, improves reliability of service.
Further, which can also include second terminal, and second terminal can be sent to first server 10 Share request, this is shared request and carries Internet resources, and first server 10 can store the Internet resources to first database 20, and obtain the resource tag of the Internet resources, the resource tag of the Internet resources and resource index correspondence are stored to the In the memory space of one server 10.Wherein, the second terminal and above-mentioned first terminal 30 can be the same terminals, can also It is different terminals, it is not limited in the embodiment of the present invention.
Fig. 4 is a kind of flow chart of resource query method provided in an embodiment of the present invention, and this method is applied to resource system In first server, as shown in figure 4, the resource query method may include steps of:
Step 401:First server is stored by any Internet resources to first database, by the money of the Internet resources Source label and resource index correspondence are stored into the memory space of the first server.
Wherein, Internet resources refer to the resource that user can browse on the internet, for example, the Internet resources can be regarding Frequently, picture, model or UGC etc..The resource tag of Internet resources is used to indicate the affiliated classification of Internet resources, such as the money of music Source label may include " prevalence ", " rock and roll ", " folk song " or " jazz " etc..First database is for storing in the resource system The database of the Internet resources of publication.Resource index is used to indicate storage location of the Internet resources in first database, according to The resource index can obtain Internet resources from first database.
After first server gets Internet resources to be stored, it can be determined according to the storage information of first database Then the resource index of Internet resources to be stored stores Internet resources to first database according to determining resource index In.Usually, first database can be with sequential storage Internet resources, therefore can be according to the storage of the Internet resources of default setting The resource index of sequence and the Internet resources of the last storage, determines the resource index of Internet resources to be stored.
Wherein, the resource tag of Internet resources can be acquired from the transmitting terminal of Internet resources, can also be according to network What resource determined.When the transmitting terminal of Internet resources only to first server has sent Internet resources, and Internet resources are not sent When resource tag, which can also determine the resource tag of the Internet resources according to the Internet resources, such as to this The theme of Internet resources carries out keyword extraction, and the keyword of extraction is determined as to the resource tag of the Internet resources.
For example, being stored to before first database by any Internet resources, first server can receive second terminal The Internet resources of transmission and the resource tag of the Internet resources, the resource tags of the Internet resources can be user this second eventually It is Internet resources input in end.Alternatively, being stored to before first database by any Internet resources, first server can To receive the Internet resources of second terminal transmission, keyword extraction then is carried out to the theme of the Internet resources, by the pass of extraction Key word is determined as the resource tag of the Internet resources.
It should be noted that in the embodiment of the present invention, first server stores any Internet resources to first database Afterwards, directly the resource tag of the Internet resources and resource index correspondence can be stored to the memory space of the first server, It can directly store it in the local storage space of first server, without storing the resource index of the Internet resources To in index data base corresponding with the resource tag of the Internet resources.In this way, can not only improve the storage effect of resource index Rate, and can be to avoid storing resource index to index data base during, the data storage errors or number that are susceptible to The problems such as according to losing, improve the reliability of storage.
Specifically, first server can store the resource tag of the Internet resources and resource index correspondence to the first clothes In the memory or target hard disk of business device.It is stored into the memory of first server, can be improved subsequently to the network by correspondence The resource tag of resource and the reading efficiency of resource index, and then improve subsequently to the search efficiency of resource index.Pass through correspondence It stores into the target hard disk of first server, the memory pressure of first server can be alleviated, improve the place of first server Rationality energy.
Specifically, first server can be according to the resource tag of the Internet resources, by the resource tag of the Internet resources Corresponding with resource index to store into the target directory in the memory space of first server, which is and the resource mark Sign corresponding catalogue.
Further, the resource tag of the Internet resources and resource index correspondence are stored to the storage of the first server After in space, the resource tag of the Internet resources and resource index can also be sent to second server by first server, The resource tag of the Internet resources and resource index are corresponded to the storage sky stored to the second server by the second server Between in, second server refers to other servers in addition to first server in the resource system.
Wherein, first server and second server are the clothes that resource query service is provided a user in the resource system Business device, user can inquire when inquiring Internet resources to any server, i.e., terminal can send to any server and inquire Request.
In the embodiment of the present invention, first server by the resource tag of the Internet resources and resource index by being sent to Currently stored data can be synchronized to second server, in this way, the data between server may be implemented are same by two servers Step ensures that user can also inquire the Internet resources by second server, improves the reliability of resource query.
Further, the resource tag of the Internet resources and resource index correspondence are being stored into depositing to the first server After storing up in space, first server can also store the resource tag of the Internet resources and resource index correspondence to the second number It according to library, that is to say, the resource tag of the Internet resources and resource index can not only be stored in and sky are locally stored by first server Between, it can also be written into the second database.In this way, can by the second database to the resource tags of the Internet resources and Resource index is backed up, and the reliability of data storage is improved.
Further, it needs to store resource tag and resource index correspondence to the feelings of the second database in first server Under condition, first server can also obtain the resource tag and resource index that second server corresponds to storage from the second database, Resource tag based on acquisition and resource index, to the stored resource tag of the memory space of first server and resource index It is updated.Wherein, second server refers to other servers in addition to first server in the resource system.
Wherein, resource tag and resource index based on acquisition, to the stored resource of the memory space of first server It refers to the storage to first server when by resource tag and resource index based on acquisition that label and resource index, which are updated, The stored resource tag in space is supplemented, and is existed so as to can be stored with other servers in the memory space of first server The resource tag and resource index of corresponding storage in database.
It that is to say, the resource tag and money of the Internet resources that each server in resource system can receive itself Source index uploads to the second database, and the resource tag and resource rope of the upload of other servers can also be obtained from the second database Draw, the data that so may be implemented between each server synchronize, and ensure that each server can be asked for the inquiry of user It asks and returns to resource query as a result, improving reliability of service.
Further, first server can also obtain synchrodata from the second database when needed, if the first clothes The data of storage and the synchrodata of business device are inconsistent, then have stored data to this based on the synchrodata and be updated, such as The data of storage of the fruit first server are consistent with the synchrodata, then not stored data to this is updated.
Wherein, which refers to second database corresponding storage in the second preset duration before obtaining the time Resource tag and resource index, which refers to the time that the first server obtains the synchrodata, this has been stored Data refer to the first server corresponding storage in the memory space in the second preset duration before the acquisition time Resource tag and resource index.
Wherein, which can pre-set, and having can be negotiated by first server and the second database Setting, for example be configured by the agreement between first server and the second database.For example, second preset duration can be with For 1 minute, 10 minutes or half an hour etc..
It that is to say, first server can obtain the resource tag that the second database stores for a period of time recently and resource rope The resource tag and resource index for drawing, and being stored for a period of time recently according to the second database, to first server nearest one The source label and resource index of section time storage are updated, and can so make up the data storage errors of first server.
Specifically, has been stored by data and has been updated for this based on the synchrodata and may include:This has been stored data to replace It is changed to the synchrodata, is modified alternatively, having stored data to this based on the synchrodata so that modified this has stored Data are consistent with the synchrodata.
Specifically, same step number can be obtained from second database when first server receives data update instruction According to synchrodata can also be obtained from second database every the first preset duration.
Wherein, data update instruction can be triggered by specified requirements, for example, the specified requirements can be default in third Internet resources are not received in duration, alternatively, after receiving inquiry request, search the resource rope inquired less than the inquiry request Draw.By when receiving data update instruction, obtaining synchrodata from second database, and be based on the synchrodata pair The data of storage of first server are updated, and can make up the data storage errors of first server.
Wherein, which is greater than or equal to second preset duration, and first preset duration can be advance Setting, specifically can be by user setting, can also be by first server default setting, and it is not limited in the embodiment of the present invention. For example, first preset duration can be 10 minutes, half an hour or 1 hour etc..By every the first preset duration, from this Second database obtains synchrodata, i.e., periodically obtains synchrodata, and based on the synchrodata to first server It has stored data to be updated, the reliability that data store in first server can be improved.
For example, can each server receives itself in resource system Internet resources resource tag and resource rope Draw in the case of being mutually synchronized, it is additional to store the resource tag and resource index of the Internet resources to the second database, and Synchrodata is obtained from the second database, and based on synchrodata to the local feature for having stored data and being updated, so The shortage of data problem occurred during synchrodata between server can be made up, first server institute is further improved The accuracy and reliability of the resource index of storage.
In a kind of possible embodiment, the second database can be to the corresponding resource rope of stored different resource label Draw, be ranked up according to predetermined order strategy, obtains the index order result of each resource tag.Further, first service Device can also be periodically or non-periodically the index order that each resource tag is obtained from the second database as a result, if first clothes Business device is not ranked up the corresponding resource index of stored different resource label according to predetermined order strategy, then can will obtain The index order result of each resource tag taken is stored in the memory space of first server, if first server has been deposited The index order of multiple resource tags is contained as a result, then when the index order knot of the stored multiple resource tags of first server When fruit and the inconsistent index order result of each resource tag obtained from server, it is also based on each resource of acquisition The index order of label is as a result, be updated the index order result of multiple resource tags of first server storage.
In a kind of possible embodiment, when first server obtains the index order result of multiple resource tags, for Each resource tag only local can also be stored in the index order result of each resource tag position of sorting in memory space Setting in the resource index of top n, N is positive integer.For example, N can be 500,800 or 1000 etc..Further, for each The corresponding top n resource index of resource tag, i.e., sorting position is located at top n in the index order result of each resource tag Resource index, first terminal can also obtain each resource tag according to the corresponding top n resource index of each resource tag Corresponding top n Internet resources, and the corresponding top n Internet resources of each resource tag of acquisition are buffered in first server Memory space in, so as to subsequently can directly according to inquiry request carry resource tag, obtained from local storage space The corresponding Internet resources of resource tag.
In a kind of possible embodiment, first server can also be obtained from the second database to be accessed number and is more than the The resource tag and resource index of the Internet resources of one threshold value, and/or, be queried number more than second threshold resource tag and Then the resource tag of acquisition and resource index are corresponded to the storage sky stored to the first server by corresponding resource index Between in.
It that is to say, can be higher from the second database synchronization temperature, i.e., accessed number or the higher resource mark of attention rate Label and resource index, can so improve the reliability of first server resource query.
Wherein, the first threshold and second threshold can be pre-set, and can be specifically arranged as required to by user, also may be used To be arranged by Server Default, it is not limited in the embodiment of the present invention.
Further, in the embodiment of the present invention, first server can carry out full dose to resource tag and resource index and deposit Storage can also only store the part resource label and resource index met the requirements, and will be unsatisfactory for desired part resource label It is stored into the second database with resource index.
In a kind of possible realization example, first server can be from the stored resource of memory space of first server In label and resource index, obtains and be accessed resource tag and resource index of the number less than the Internet resources of third threshold value, and/ Or, resource tag of the number less than the 4th threshold value and corresponding resource index are queried, then by the resource tag of acquisition and money Source index correspondence is stored in the second database.
It that is to say, can be by the resource tag and resource index of the less Internet resources of user's access times, or looked into The smaller resource tag of number and corresponding resource index are ask, from being transferred in local storage space in the second database, so The memory space that first server can be saved improves the runnability of first server.
Wherein, the third threshold value and the 4th threshold value can be pre-set, specifically can be by user setting, can also be by first Server Default is arranged, and it is not limited in the embodiment of the present invention.
For example, Fig. 5 is the schematic diagram of another resource system provided in an embodiment of the present invention, as shown in figure 5, the resource system System includes first terminal, first server, third server and data center.Data center includes first database and the second number According to library.Wherein, first terminal can be connect by network with first server and third server respectively, and first server can be with It is connect with data center by network, third server can be connect by network with first server.
Specifically, first terminal can upload Internet resources and inquiry Internet resources by first server.Third service Device is used to provide to the user the comment service of Internet resources, and first terminal asks the comment of Internet resources to the transmission of third server It asks, and the comment information of Internet resources can be synchronized to first server by first terminal.First server can provide network Source stores the first database for including to data center, and can be according to method provided in an embodiment of the present invention and the second database It interacts.For example, first server can store the resource tag of Internet resources and resource index correspondence to the second data Library, or can synchrodata periodically be obtained from the second database, to be updated to the local data of storage, or The index order of each resource tag can be obtained from the second database as a result, with according to the index of each resource tag of acquisition The index order result of each resource tag of the ranking results to being locally stored is updated.
It should be noted that equipment shown in Fig. 5 does not constitute the restriction to resource system, resource system may include Than illustrating more or fewer equipment, or the certain equipment of combination.
Step 402:First server receives the inquiry request of first terminal, which carries at least one resource mark Label.
Wherein, which is used to indicate the generic of resource to be checked, which should for requesting query The corresponding Internet resources of at least one resource tag.
Specifically, which can be triggered by first terminal in the inquiry operation for detecting user, inquiry behaviour Make be after user inputs at least one resource tag in query interface or selects at least one resource tag, to touch Hair confirms the operation of query option.
Step 403:From the stored resource index of memory space of the first server, at least one target money is obtained Source indexes, and target resource index is the corresponding resource index of at least one resource tag.
It that is to say, in the embodiment of the present invention, directly can inquire this from the local storage space of first server at least The corresponding resource index of one resource tag, and query logic is simple, it is only necessary to the memory space for traversing first server can be real Existing, time cost is low, avoids and needs first to determine the corresponding index data of at least one resource tag in the related technology Library, then obtain the operation for indexing resource respectively from corresponding index data base, improve search efficiency.
Specifically, from the stored resource index of the memory space of the first server, at least one target money is obtained Source index may include following two realization methods:
The first realization method:The stored at least one resource tag of the memory space of the first server is corresponded to Resource index, be determined as at least one target resource index.
It that is to say, it can be by the stored all resource indexes corresponding at least one resource tag of first server It is retrieved as at least one target resource index, this realization method is easy to operate, obtains efficient.
Wherein, all resource indexes corresponding at least one resource tag can be and at least one resource tag In the corresponding resource index of any resource tag, or with whole resource tags pair at least one resource tag The resource index answered.That is to say, at least one target resource index can be include carrying at least one resource tag Any one resource tag Internet resources resource index, or with whole moneys at least one resource tag The resource index of the Internet resources of source label.
Second of realization method:It obtains to meet from the stored resource index of memory space of the first server and preset The corresponding resource index of at least one resource tag of condition, using the resource index of acquisition as at least one target resource Index.
Wherein, which can be set according to actual needs, for example, the preset condition can be to meet sort criteria Or storage time condition etc..
In a kind of possible embodiment, first server can obtain each resource mark at least one resource tag Corresponding index order is signed as a result, from the corresponding index order result of each resource tag, obtains sorting position positioned at preceding pre- If the resource index of number;The resource index that will be obtained from the corresponding index order result of each resource tag, is determined as this At least one target resource index.
Wherein, the corresponding index order of each resource tag the result is that the first server according to predetermined order strategy, it is right The corresponding resource index of stored each resource tag is ranked up to obtain.For example, the predetermined order strategy can be on time Between sequence, by temperature sequence, by favorable comment number sequence etc..
Wherein, refer to according to time sequence carrying out inverted order arrangement according to the sequencing of the uplink time of corresponding network resource, Refer to according to the accessed number sequence from big to small of corresponding network resource carrying out arrangement and/or by being queried by temperature sequence The sequence of number from big to small is arranged, and refers to favorable comment number from big to small suitable by corresponding network resource by the sequence of favorable comment number Sequence is arranged.
Wherein, which can pre-set, and specifically can be as needed configured by user, can also be by One Server Default is arranged.For example, the preset number can be 10 or 20 etc..
It is located at the resource index of preceding preset number by obtaining sorting position, it is possible to reduce the resource returned to first terminal The number of query result saves transfer resource, and can improve the precision of inquiry, improves the resource returned to user and looks into The validity for asking result ensures that the query result returned is the query result that user generally needs, avoids and returned to user Some meaningless query results.
Step 404:It is indexed based at least one target resource, resource query result is returned to the first terminal.
Specifically, it is based at least one target resource index, returning to resource query result to the first terminal can wrap Include following two realization methods:
The first realization method:It is indexed, is obtained from the first database at least one based at least one target resource At least one Internet resources are returned to the terminal by Internet resources.
By the way that at least one Internet resources are returned to terminal, the promptness that terminal obtains Internet resources can be improved, Improve user experience.
Second of realization method:By at least one target resource index as the resource query result return to this first Terminal is based on the corresponding Internet resources of at least one target network resource index accesses by the first terminal.
Wherein, which can also carry the key message of corresponding Internet resources, with Just user can probably judge whether oneself needs corresponding Internet resources according to the key message of corresponding Internet resources, into And when determining that oneself is needed, then the corresponding Internet resources of target resource index accesses that pass through acquisition.For example, Internet resources Key message is for roughly describing Internet resources, and exemplary, the key message of Internet resources can be Internet resources Theme, summary or thumbnail etc..
Specifically, it after terminal receives at least one target network resource index, can receive to any mesh When marking the access operation of network resource index, access request is sent to server, which carries the target network resource Index.When server receives the access request, it can be indexed from first database according to the target network resource and obtain mesh Internet resources are marked, and the target network resource is returned into terminal.
Since the data volume of resource index is often more much smaller than the data volume of Internet resources, by by this at least one A target resource index returns to first terminal as resource query result, can save first server and the biography of first terminal Defeated resource improves respective process performance.
In the related technology, it will usually configure multiple index data bases in advance for first server, each index data base with A kind of resource tag corresponds to, for storing a kind of corresponding resource index of resource tag.First server stores Internet resources To after in first database, need to store the resource index of the Internet resources to corresponding with the resource tag of the Internet resources In index data base, that is, need resource index index data base is written.Moreover, when the resource tag of Internet resources is more, It is stored respectively into the corresponding index data base of each resource tag with greater need for by the resource index, that is, needs the resource index point It is not written in multiple index data bases, the write-in number involved in storing process is more, due to being easy in data writing process There is the problem of write error or shortage of data, therefore can not ensure the success rate of resource index storage.
In addition, being screened for the ease of user, the corresponding resource index of each resource tag usually can also be according to a variety of sequences Mode is ranked up, for example, according to uplink time, be queried number, accessed number or comment number etc. and be ranked up.Work as one kind Can also be that the resource tag configures multiple index data bases when the corresponding resource index of resource tag has a variety of sortords, Each index data base is used to store the corresponding resource index of the resource tag according to a kind of sortord.
Fig. 6 is a kind of resource system schematic diagram provided in the related technology, as shown in fig. 6, the system include terminal 100, Server 200, resource database 300 and multiple index data bases, server 200 can respectively with terminal 100, Internet resources number It is connected with multiple index data bases according to library 300, it is assumed that the Internet resources that terminal 100 uploads include label A and label B, label A pair There are the resource index answered sortord 1 and sortord 2 both sortords, the corresponding resource index of label B to have row This kind of sortord of sequential mode 3, it is therefore desirable to the index of the Internet resources is respectively stored into index corresponding to label A and provided Index data base 410 that source is stored according to sortord 1, index resource corresponding to label A are carried out according to sortord 2 The index data base 420 of storage and the index data base that the corresponding index resource of label B is stored according to sortord 3 430。
From the foregoing, it will be observed that the increase of the sortord with the resource tag and corresponding network resource of Internet resources, resource rope Drawing the writing in index data base can also increase, for example an Internet resources carry 5 resource tags, each resource tag There are 3 kinds of sortords, then need the corresponding resource index of the resource tag being written 15 times in total and arrive different index data bases, The write-in number being related to is more, and maintenance cost is higher, and shortage of data is susceptible in ablation process.
And in the embodiment of the present invention, by the way that resource identification and resource index directly correspondence are stored depositing to first server It stores up in space, and according to inquiry request, query resource indexes directly from the memory space of first server, solves related skill Writing of the resource tag in index data base is more in art, and shortage of data, and maintenance cost are susceptible in ablation process Higher problem.
In the embodiment of the present invention, for any server in resource system, any Internet resources are stored to the first number Behind library, the resource tag of Internet resources and resource index can be corresponded to directly and be stored in local storage sky by first server Between in, after receiving inquiry request, directly from the stored resource index of local storage space obtain resource tag it is corresponding Resource index, and the resource index based on acquisition returns to query result, first determines that resource tag is distinguished compared in the related technology Corresponding index data base, then obtain the querying method for indexing resource respectively from corresponding index data base, obtain resource index It is easy to operate, obtain efficient, and then improve resource query efficiency.
Next will include first terminal, first server, first database, the second database and with the resource system For two servers, user is introduced by the flow that the Internet resources that first terminal uploads are stored, such as Fig. 7 institutes Show, the Stored Procedure of Internet resources may include steps of 701-709:
Step 701:First terminal sends Internet resources to first server.
Wherein, first terminal can send Internet resources according to the sharing operation of user to first server, that is to say, should Internet resources are the Internet resources that user shares on resource system.
Step 702:First server stores the Internet resources to first database.
Specifically, first server can first determine the resource index of the Internet resources, and being then based on the resource index will The Internet resources are stored into first database, and are subsequently also based on the resource index and are obtained from the first database The Internet resources.
Step 703:First database sends storage result to first server.
Wherein, which refers to storage result of the first database to the Internet resources, is used to indicate the first data Whether library successfully stores the Internet resources.
Step 704:Index data correspondence is stored in local storage space by first server.
Wherein, which refers to the resource tag and resource index of the Internet resources.
Specifically, which can be corresponded to and is stored in local memory or local hard drive.
Step 705:First server stores index data correspondence to the second database.
It that is to say, the resource tag of the Internet resources of reception and resource index can be synchronized to the second number by first server According in library.
Step 706:Second database returns to storage result to first server.
Wherein, which refers to storage result of second database to the index data, is used to indicate the second data Whether library successfully stores the index data.
Step 707:The index data is sent to second server by first server.
It that is to say, the resource tag of the Internet resources of reception and resource index can be synchronized to resource system by first server Other servers in system.
Step 708:Index data correspondence is stored in local storage space by second server, and to first server Return to storage result.
Similarly, which can be corresponded to and be stored in local memory or local hard drive by second server.Wherein, The storage result refers to storage result of the second server to the index data, is used to indicate whether second server successfully stores The index data.
Step 709:First server returns to the storage result of the Internet resources to client.
Wherein, which is used to indicate the various Stored Procedures correspondence of execution of the first server to the Internet resources Storage result, can also only indicate that storage result of the first database to the Internet resources, the embodiment of the present invention do not do this It limits.
Fig. 8 is a kind of structural schematic diagram of resource query device provided in an embodiment of the present invention, which is applied to resource First server in system, as shown in figure 8, the device includes:
First memory module 801, for being stored to first database by any Internet resources, by the Internet resources Resource tag and resource index correspondence are stored into the memory space of first server, and first database is for storing the resource system The Internet resources issued in system;
Receiving module 802, the inquiry request for receiving first terminal, the inquiry request carry at least one resource mark Label, the resource tag are used to indicate the generic of resource to be checked;
First acquisition module 803, for from the stored resource index of memory space of first server, obtaining at least One target resource index, target resource index are the corresponding resource index of at least one resource tag;
First sending module 804 returns to resource query for being indexed based at least one target resource to the first terminal As a result.
Optionally, the first memory module is used for:
According to the resource tag of the Internet resources, the resource tag of the Internet resources and resource index correspondence are stored to this In target directory in the memory space of server, which is catalogue corresponding with the resource tag.
Optionally, the first acquisition module includes:
First acquisition unit, for obtaining the corresponding index order knot of each resource tag at least one resource tag Fruit, each corresponding index order of resource tag the result is that the first server according to predetermined order strategy, to stored every The corresponding resource index of a resource tag is ranked up to obtain;
Second acquisition unit is located at for from the corresponding index order result of each resource tag, obtaining sorting position The resource index of preceding preset number;
Determination unit, the resource index for will be obtained from the corresponding index order result of each resource tag determine It is indexed at least one target resource.
Optionally, the first sending module 804 is used for:
It is indexed based at least one target resource, obtains at least one Internet resources from the first database, at least by this One Internet resources returns to the terminal as the resource query result;
Alternatively,
At least one target resource is indexed as the resource query result and returns to the first terminal, by the first terminal Based on the corresponding Internet resources of at least one target network resource index accesses.
Optionally, which further includes:
Second memory module, for storing the resource tag of the Internet resources and resource index correspondence to the second data Library, second database are used to store the resource tag and resource index for the Internet resources issued in the resource system;
Second acquisition module, for obtaining the resource tag and resource that second server corresponds to storage from second database Index, which refers to other servers in addition to the first server in the resource system;
Update module is used for resource tag and resource index based on acquisition, to the memory space of the first server The resource tag and resource index of storage are updated.
Optionally, which further includes:
Third acquisition module, for obtaining the money for being accessed the Internet resources that number is more than first threshold from the second database Source label and resource index, and/or, it is queried resource tag of the number more than second threshold and corresponding resource index, this Two databases are used to store the resource tag and resource index for the Internet resources issued in the resource system;
Third memory module, for the resource tag of acquisition and resource index correspondence to be stored depositing to the first server It stores up in space.
Optionally, which further includes:
4th acquisition module is used for from the stored resource tag of memory space and resource index of first server, The resource tag and resource index for being accessed the Internet resources that number is less than third threshold value are obtained, and/or, it is queried number and is less than The resource tag and corresponding resource index of 4th threshold value;
4th memory module should for the resource tag of acquisition and resource index correspondence to be stored in the second database Second database is used to store the resource tag and resource index for the Internet resources issued in the resource system.
Optionally, which further includes:
Second sending module, for the resource tag of the Internet resources and resource index to be sent to second server, by The second server stores the resource tag of the Internet resources and resource index correspondence to the memory space of the second server In, which refers to other servers in addition to first server in the resource system.
Optionally, which further includes the 5th acquisition module, and the 5th acquisition module is used for:
Receive the resource tag of the Internet resources and the Internet resources that second terminal is sent, the resource mark of the Internet resources Label are that user inputs in second terminal for the Internet resources;
Or;
The Internet resources that second terminal is sent are received, keyword extraction is carried out to the theme of the Internet resources, will be extracted Keyword be determined as the resource tags of the Internet resources.
In the embodiment of the present invention, for any server in resource system, any Internet resources are stored to the first number Behind library, the resource tag of Internet resources and resource index can be corresponded to directly and be stored in local storage sky by first server Between in, after receiving inquiry request, directly from the stored resource index of local storage space obtain resource tag it is corresponding Resource index, and the resource index based on acquisition returns to query result, first determines that resource tag is distinguished compared in the related technology Corresponding index data base, then obtain the querying method for indexing resource respectively from corresponding index data base, obtain resource index It is easy to operate, obtain efficient, and then improve resource query efficiency.
It should be noted that:The resource query device that above-described embodiment provides is when inquiring Internet resources, only with above-mentioned each The division progress of function module, can be as needed and by above-mentioned function distribution by different work(for example, in practical application Energy module is completed, i.e., the internal structure of device is divided into different function modules, to complete whole described above or portion Divide function.In addition, the resource query device that above-described embodiment provides belongs to same design with resource query method embodiment, have Body realizes that process refers to embodiment of the method, and which is not described herein again.
Fig. 9 is a kind of structural schematic diagram of terminal 900 provided in an embodiment of the present invention.The terminal 900 can be:Intelligent hand (Moving Picture Experts Group Audio Layer III, dynamic image are special for machine, tablet computer, MP3 player Family's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image Expert's compression standard audio level 4) player, laptop or desktop computer.Terminal 900 is also possible to be referred to as user to set Other titles such as standby, portable terminal, laptop terminal, terminal console.
In general, terminal 900 includes:Processor 901 and memory 902.
Processor 901 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- may be used in reason device 901 Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 901 can also include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.? In some embodiments, processor 901 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 901 can also wrap AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processors are for handling related machine learning Calculating operation.
Memory 902 may include one or more computer readable storage mediums, which can To be non-transient.Memory 902 may also include high-speed random access memory and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 902 can Storage medium is read for storing at least one instruction, at least one instruction is for performed to realize this Shen by processor 901 Please in embodiment of the method provide resource query method.
In some embodiments, terminal 900 is also optional includes:Peripheral device interface 903 and at least one peripheral equipment. It can be connected by bus or signal wire between processor 901, memory 902 and peripheral device interface 903.Each peripheral equipment It can be connected with peripheral device interface 903 by bus, signal wire or circuit board.Specifically, peripheral equipment includes:Radio circuit 904, at least one of touch display screen 905, camera 906, voicefrequency circuit 907, positioning component 908 and power supply 909.
Peripheral device interface 903 can be used for I/O (Input/Output, input/output) is relevant at least one outer Peripheral equipment is connected to processor 901 and memory 902.In some embodiments, processor 901, memory 902 and peripheral equipment Interface 903 is integrated on same chip or circuit board;In some other embodiments, processor 901, memory 902 and outer Any one or two in peripheral equipment interface 903 can realize on individual chip or circuit board, the present embodiment to this not It is limited.
Radio circuit 904 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates Frequency circuit 904 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 904 turns electric signal It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 904 wraps It includes:Antenna system, RF transceivers, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip Group, user identity module card etc..Radio circuit 904 can be carried out by least one wireless communication protocol with other terminals Communication.The wireless communication protocol includes but not limited to:Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), wireless office Domain net and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 904 may be used also To include the related circuits of NFC (Near Field Communication, wireless near field communication), the application is not subject to this It limits.
Display screen 905 is for showing UI (User Interface, user interface).The UI may include figure, text, figure Mark, video and its their arbitrary combination.When display screen 905 is touch display screen, display screen 905 also there is acquisition to show The ability of the surface of screen 905 or the touch signal of surface.The touch signal can be used as control signal to be input to processor 901 are handled.At this point, display screen 905 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or Soft keyboard.In some embodiments, display screen 905 can be one, and the front panel of terminal 900 is arranged;In other embodiments In, display screen 905 can be at least two, be separately positioned on the different surfaces of terminal 900 or in foldover design;In still other reality Apply in example, display screen 905 can be flexible display screen, be arranged on the curved surface of terminal 900 or fold plane on.Even, it shows Display screen 905 can also be arranged to non-rectangle irregular figure, namely abnormity screen.LCD (Liquid may be used in display screen 905 Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) Etc. materials prepare.
CCD camera assembly 906 is for acquiring image or video.Optionally, CCD camera assembly 906 include front camera and Rear camera.In general, the front panel in terminal is arranged in front camera, rear camera is arranged at the back side of terminal.One In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting functions or other fusions are clapped Camera shooting function.In some embodiments, CCD camera assembly 906 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp, It can also be double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, be can be used for not With the light compensation under colour temperature.
Voicefrequency circuit 907 may include microphone and loud speaker.Microphone is used to acquire the sound wave of user and environment, and will Sound wave, which is converted to electric signal and is input to processor 901, to be handled, or is input to radio circuit 904 to realize voice communication. For stereo acquisition or the purpose of noise reduction, microphone can be multiple, be separately positioned on the different parts of terminal 900.Mike Wind can also be array microphone or omnidirectional's acquisition type microphone.Loud speaker is then used to that processor 901 or radio circuit will to be come from 904 electric signal is converted to sound wave.Loud speaker can be traditional wafer speaker, can also be piezoelectric ceramic loudspeaker.When When loud speaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 907 can also include Earphone jack.
Positioning component 908 is used for the current geographic position of positioning terminal 900, to realize navigation or LBS (Location Based Service, location based service).Positioning component 908 can be the GPS (Global based on the U.S. Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union The positioning component of Galileo system.
Power supply 909 is used to be powered for the various components in terminal 900.Power supply 909 can be alternating current, direct current, Disposable battery or rechargeable battery.When power supply 909 includes rechargeable battery, which can support wired charging Or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 900 further include there are one or multiple sensors 910.The one or more sensors 910 include but not limited to:Acceleration transducer 911, gyro sensor 912, pressure sensor 913, fingerprint sensor 914, Optical sensor 915 and proximity sensor 916.
The acceleration that acceleration transducer 911 can detect in three reference axis of the coordinate system established with terminal 900 is big It is small.For example, acceleration transducer 911 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 901 can With the acceleration of gravity signal acquired according to acceleration transducer 911, control touch display screen 905 is regarded with transverse views or longitudinal direction Figure carries out the display of user interface.Acceleration transducer 911 can be also used for game or the acquisition of the exercise data of user.
Gyro sensor 912 can be with the body direction of detection terminal 900 and rotational angle, and gyro sensor 912 can To cooperate with acquisition user to act the 3D of terminal 900 with acceleration transducer 911.Processor 901 is according to gyro sensor 912 Following function may be implemented in the data of acquisition:When action induction (for example changing UI according to the tilt operation of user), shooting Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 905 in terminal 900 can be arranged in pressure sensor 913.Work as pressure The gripping signal that user can be detected in the side frame of terminal 900 to terminal 900 is arranged in sensor 913, by processor 901 Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 913 acquires.When the setting of pressure sensor 913 exists When the lower layer of touch display screen 905, the pressure operation of touch display screen 905 is realized to UI circle according to user by processor 901 Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu At least one of control.
Fingerprint sensor 914 is used to acquire the fingerprint of user, collected according to fingerprint sensor 914 by processor 901 The identity of fingerprint recognition user, alternatively, by fingerprint sensor 914 according to the identity of collected fingerprint recognition user.It is identifying When the identity for going out user is trusted identity, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 901 Include solution lock screen, check encryption information, download software, payment and change setting etc..Terminal can be set in fingerprint sensor 914 900 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 900, fingerprint sensor 914 can be with It is integrated with physical button or manufacturer Logo.
Optical sensor 915 is for acquiring ambient light intensity.In one embodiment, processor 901 can be according to optics The ambient light intensity that sensor 915 acquires controls the display brightness of touch display screen 905.Specifically, when ambient light intensity is higher When, the display brightness of touch display screen 905 is turned up;When ambient light intensity is relatively low, the display for turning down touch display screen 905 is bright Degree.In another embodiment, the ambient light intensity that processor 901 can also be acquired according to optical sensor 915, dynamic adjust The acquisition parameters of CCD camera assembly 906.
Proximity sensor 916, also referred to as range sensor are generally arranged at the front panel of terminal 900.Proximity sensor 916 The distance between front for acquiring user and terminal 900.In one embodiment, when proximity sensor 916 detects use When family and the distance between the front of terminal 900 taper into, touch display screen 905 is controlled from bright screen state by processor 901 It is switched to breath screen state;When proximity sensor 916 detects user and the distance between the front of terminal 900 becomes larger, Touch display screen 905 is controlled by processor 901 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 900 of structure shown in Fig. 9, can wrap It includes than illustrating more or fewer components, either combine certain components or is arranged using different components.
Figure 10 is a kind of structural schematic diagram of server 1000 provided in an embodiment of the present invention, which can be because matching It sets or performance is different and generate bigger difference, may include one or more processors (central Processing units, CPU) 1001 and one or more memory 1002, wherein it is deposited in the memory 1002 At least one instruction is contained, at least one instruction is loaded by the processor 1001 and executed to realize above-mentioned each method What embodiment provided applies power consumption monitoring method.Certainly, which can also have wired or wireless network interface, key The components such as disk and input/output interface, to carry out input and output, the server 1000 can also include other for realizing The component of functions of the equipments, this will not be repeated here.
In the exemplary embodiment, a kind of computer readable storage medium, such as the memory including instruction are additionally provided, Above-metioned instruction can be executed by the processor in above-mentioned terminal or server to complete the resource query method in above-described embodiment.Example Such as, the computer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light number According to storage device etc..
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (15)

1. a kind of resource query method, which is characterized in that the first server being applied in resource system, the method includes:
It is stored to first database by any Internet resources, the resource tag of the Internet resources and resource index is corresponded to It stores into the memory space of the first server, the first database is used to store the net issued in the resource system Network resource;
The inquiry request of first terminal is received, the inquiry request carries at least one resource tag, and the resource tag is used for Indicate the generic of resource to be checked;
From the stored resource index of memory space of the first server, at least one target resource index, institute are obtained It is the corresponding resource index of at least one resource tag to state target resource index;
It is indexed based at least one target resource, resource query result is returned to the first terminal.
2. the method as described in claim 1, which is characterized in that the resource tag and resource index by the Internet resources Correspondence is stored into the memory space of the first server, including:
According to the resource tag of the Internet resources, the resource tag of the Internet resources and resource index correspondence are stored to institute It states in the target directory in the memory space of first server, the target directory is catalogue corresponding with the resource tag.
3. the method as described in claim 1, which is characterized in that the memory space from the first server is stored In resource index, at least one target resource index is obtained, including:
Each corresponding index order of resource tag is obtained at least one resource tag as a result, each resource tag Corresponding index order the result is that the first server according to predetermined order strategy, to stored each resource tag Corresponding resource index is ranked up to obtain;
From the corresponding index order result of each resource tag, the resource rope that sorting position is located at preceding preset number is obtained Draw;
The resource index that will be obtained from the corresponding index order result of each resource tag, is determined as described at least one Target resource indexes.
4. the method as described in claim 1, which is characterized in that it is described based at least one target resource index, to institute It states first terminal and returns to resource query as a result, including:
It is indexed based at least one target resource, at least one Internet resources is obtained from the first database, it will be described At least one Internet resources return to the terminal as the resource query result;
Alternatively,
At least one target resource index is returned into the first terminal as the resource query result, by described the One terminal is based on the corresponding Internet resources of at least one target network resource index accesses.
5. the method as described in claim 1-4 is any, which is characterized in that the method further includes:
The resource tag of the Internet resources and resource index correspondence are stored to the second database, second database is used for Store the resource tag and resource index of the Internet resources issued in the resource system;
The resource tag and resource index that second server corresponds to storage, the second server are obtained from second database Refer to other servers in the resource system in addition to the first server;
Resource tag based on acquisition and resource index, to the stored resource tag of the memory space of the first server and Resource index is updated.
6. the method as described in claim 1-4 is any, which is characterized in that the method further includes:
It is obtained from the second database and is accessed resource tag and resource index of the number more than the Internet resources of first threshold, and/ Or, being queried resource tag of the number more than second threshold and corresponding resource index, second database is for storing institute State the resource tag and resource index of the Internet resources issued in resource system;
The resource tag of acquisition and resource index correspondence are stored into the memory space of the first server.
7. the method as described in claim 1-4 is any, which is characterized in that the resource tag and money by the Internet resources After source index correspondence is stored into the memory space of the first server, further include:
From the stored resource tag of memory space and resource index of the first server, obtains accessed number and be less than The resource tag and resource index of the Internet resources of third threshold value, and/or, it is queried the resource tag that number is less than the 4th threshold value With corresponding resource index;
The resource tag of acquisition and resource index correspondence are stored in the second database, second database is for storing institute State the resource tag and resource index of the Internet resources issued in resource system.
8. the method as described in claim 1-4 is any, which is characterized in that the resource tag and money by the Internet resources After source index correspondence is stored into the memory space of the first server, further include:
The resource tag of the Internet resources and resource index are sent to second server, it will be described by the second server Resource tag and the resource index correspondence of Internet resources are stored into the memory space of the second server, the second service Device refers to other servers in addition to the first server in the resource system.
9. the method as described in claim 1-4 is any, which is characterized in that the resource tag and money by the Internet resources Before source index correspondence is stored into the memory space of the first server, further include:
Receive the resource tag of the Internet resources and the Internet resources that second terminal is sent, the resource of the Internet resources Label is that user is that the Internet resources input in the second terminal;
Or;
The Internet resources that second terminal is sent are received, keyword extraction is carried out to the theme of the Internet resources, will be extracted Keyword be determined as the resource tags of the Internet resources.
10. a kind of resource query device, which is characterized in that the first server being applied in resource system, described device include:
First memory module, for being stored to first database by any Internet resources, by the resource of the Internet resources Label and resource index correspondence are stored into the memory space of the first server, and the first database is described for storing The Internet resources issued in resource system;
Receiving module, the inquiry request for receiving first terminal, the inquiry request carries at least one resource tag, described Resource tag is used to indicate the generic of resource to be checked;
First acquisition module, for from the stored resource index of memory space of the first server, obtaining at least one A target resource index, the target resource index are the corresponding resource index of at least one resource tag;
First sending module, for based at least one target resource index, resource query to be returned to the first terminal As a result.
11. device as claimed in claim 10, which is characterized in that first memory module is used for:
According to the resource tag of the Internet resources, the resource tag of the Internet resources and resource index correspondence are stored to institute It states in the target directory in the memory space of server, the target directory is catalogue corresponding with the resource tag.
12. device as claimed in claim 10, which is characterized in that first acquisition module includes:
First acquisition unit, for obtaining the corresponding index order knot of each resource tag at least one resource tag Fruit, each corresponding index order of resource tag the result is that the first server according to predetermined order strategy, to having deposited The corresponding resource index of each resource tag of storage is ranked up to obtain;
Second acquisition unit, for from the corresponding index order result of each resource tag, obtaining sorting position and being located at The resource index of preceding preset number;
Determination unit, the resource index for will be obtained from the corresponding index order result of each resource tag, determines It is indexed at least one target resource.
13. the device as described in claim 10-12 is any, which is characterized in that described device further includes:
Second memory module, for storing the resource tag of the Internet resources and resource index correspondence to the second database, Second database is used to store the resource tag and resource index for the Internet resources issued in the resource system;
Second acquisition module, for obtaining the resource tag and resource rope that second server corresponds to storage from second database Draw, the second server refers to other servers in addition to the first server in the resource system;
Update module is used for resource tag and resource index based on acquisition, has been deposited to the memory space of the first server The resource tag and resource index of storage are updated.
14. a kind of server, which is characterized in that the server includes processor and memory, is stored in the memory At least one instruction, at least one section of program, code set or instruction set, described instruction, described program, the code set or the finger Collection is enabled to be loaded by the processor and executed to realize such as claim 1-9 any one of them resource query methods.
15. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium Few one section of program, code set or instruction set, described instruction, described program, the code set or described instruction collection are added by processor It carries and executes to realize such as claim 1-9 any one of them resource query methods.
CN201810448602.1A 2018-05-11 2018-05-11 Resource query method and device Active CN108717432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810448602.1A CN108717432B (en) 2018-05-11 2018-05-11 Resource query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810448602.1A CN108717432B (en) 2018-05-11 2018-05-11 Resource query method and device

Publications (2)

Publication Number Publication Date
CN108717432A true CN108717432A (en) 2018-10-30
CN108717432B CN108717432B (en) 2022-02-18

Family

ID=63899787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810448602.1A Active CN108717432B (en) 2018-05-11 2018-05-11 Resource query method and device

Country Status (1)

Country Link
CN (1) CN108717432B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110006A (en) * 2019-04-15 2019-08-09 平安普惠企业管理有限公司 Data managing method and Related product
CN110110007A (en) * 2019-04-15 2019-08-09 平安普惠企业管理有限公司 Data managing method and Related product
CN110119427A (en) * 2019-04-15 2019-08-13 平安普惠企业管理有限公司 Data managing method and Related product
CN110119396A (en) * 2019-04-15 2019-08-13 平安普惠企业管理有限公司 Data managing method and Related product
CN110134698A (en) * 2019-04-15 2019-08-16 平安普惠企业管理有限公司 Data managing method and Related product
CN110659283A (en) * 2019-08-15 2020-01-07 中国平安财产保险股份有限公司 Data label processing method and device, computer equipment and storage medium
CN110717110A (en) * 2019-10-12 2020-01-21 北京达佳互联信息技术有限公司 Multimedia resource filtering method and device, electronic equipment and storage medium
CN110851431A (en) * 2019-10-30 2020-02-28 中盈优创资讯科技有限公司 Data processing method and device for data center station

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123578A (en) * 2007-09-01 2008-02-13 腾讯科技(深圳)有限公司 A method and system for improving access speed of network resource
CN101753559A (en) * 2009-12-17 2010-06-23 深圳创维-Rgb电子有限公司 Network resource obtaining system and network resource list obtaining method
US20110016085A1 (en) * 2009-07-16 2011-01-20 Netapp, Inc. Method and system for maintaining multiple inode containers in a storage server
CN104182483A (en) * 2014-08-07 2014-12-03 北京有名信实科技有限公司 Social network based service index database establishment method and service search method
CN104915449A (en) * 2015-06-30 2015-09-16 河海大学 Faceted search system and method based on water conservancy object classification labels
CN106096050A (en) * 2016-06-29 2016-11-09 乐视控股(北京)有限公司 A kind of method and apparatus of video contents search
CN106407250A (en) * 2015-07-28 2017-02-15 阿里巴巴集团控股有限公司 Information query method, device and system, server and client side
CN106489144A (en) * 2014-04-28 2017-03-08 康维达无线有限责任公司 Search engine optimization for Resource TOC

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123578A (en) * 2007-09-01 2008-02-13 腾讯科技(深圳)有限公司 A method and system for improving access speed of network resource
US20110016085A1 (en) * 2009-07-16 2011-01-20 Netapp, Inc. Method and system for maintaining multiple inode containers in a storage server
CN101753559A (en) * 2009-12-17 2010-06-23 深圳创维-Rgb电子有限公司 Network resource obtaining system and network resource list obtaining method
CN106489144A (en) * 2014-04-28 2017-03-08 康维达无线有限责任公司 Search engine optimization for Resource TOC
CN104182483A (en) * 2014-08-07 2014-12-03 北京有名信实科技有限公司 Social network based service index database establishment method and service search method
CN104915449A (en) * 2015-06-30 2015-09-16 河海大学 Faceted search system and method based on water conservancy object classification labels
CN106407250A (en) * 2015-07-28 2017-02-15 阿里巴巴集团控股有限公司 Information query method, device and system, server and client side
CN106096050A (en) * 2016-06-29 2016-11-09 乐视控股(北京)有限公司 A kind of method and apparatus of video contents search

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YE-IN CHANG等: "《An ID-tree index strategy for supporting similarity searches in information filtering systems》", 《IEEE》 *
王朗: "《云存储中的密文排序检索技术研究》", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110006A (en) * 2019-04-15 2019-08-09 平安普惠企业管理有限公司 Data managing method and Related product
CN110110007A (en) * 2019-04-15 2019-08-09 平安普惠企业管理有限公司 Data managing method and Related product
CN110119427A (en) * 2019-04-15 2019-08-13 平安普惠企业管理有限公司 Data managing method and Related product
CN110119396A (en) * 2019-04-15 2019-08-13 平安普惠企业管理有限公司 Data managing method and Related product
CN110134698A (en) * 2019-04-15 2019-08-16 平安普惠企业管理有限公司 Data managing method and Related product
CN110119396B (en) * 2019-04-15 2023-10-20 北京铠悦科技有限公司 Data management method and related product
CN110659283A (en) * 2019-08-15 2020-01-07 中国平安财产保险股份有限公司 Data label processing method and device, computer equipment and storage medium
CN110717110A (en) * 2019-10-12 2020-01-21 北京达佳互联信息技术有限公司 Multimedia resource filtering method and device, electronic equipment and storage medium
CN110717110B (en) * 2019-10-12 2022-04-22 北京达佳互联信息技术有限公司 Multimedia resource filtering method and device, electronic equipment and storage medium
CN110851431A (en) * 2019-10-30 2020-02-28 中盈优创资讯科技有限公司 Data processing method and device for data center station
CN110851431B (en) * 2019-10-30 2022-12-20 中盈优创资讯科技有限公司 Data processing method and device for data center station

Also Published As

Publication number Publication date
CN108717432B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN108717432A (en) resource query method and device
CN110134804A (en) Image search method, device and storage medium
CN108881030A (en) Gray scale issues the method for routing and device under scene
CN109656930A (en) Data query method, apparatus and system
CN109302385A (en) Multimedia resource sharing method, device and storage medium
CN111694834A (en) Method, device and equipment for putting picture data into storage and readable storage medium
CN109168073A (en) The method and apparatus that direct broadcasting room cover is shown
CN109922356A (en) Video recommendation method, device and computer readable storage medium
CN110213153A (en) Display methods, acquisition methods, device, terminal and the storage medium of unread message
CN109068160A (en) The methods, devices and systems of inking video
CN110248236A (en) Video broadcasting method, device, terminal and storage medium
CN110515688A (en) Page display method, device, terminal and storage medium
CN110266982A (en) The method and system of song is provided in recorded video
CN109218751A (en) The method, apparatus and system of recommendation of audio
CN111031391A (en) Video dubbing method, device, server, terminal and storage medium
CN109189978B (en) Method, device and storage medium for audio search based on voice message
CN110377784A (en) Sing single update method, device, terminal and storage medium
CN110244999A (en) Control method, apparatus, equipment and the storage medium of destination application operation
CN110147503A (en) Information issuing method, device, computer equipment and storage medium
CN109547847A (en) Add the method, apparatus and computer readable storage medium of video information
CN108495183A (en) The method and apparatus for showing album information
CN110149408B (en) Service data display method and device, terminal and server
CN110222224A (en) Identify the methods, devices and systems of song information
CN109101158A (en) Import the method, apparatus and storage medium of list of songs
CN110191236A (en) Playback of songs queue management method, device, terminal device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant