CN114117192A - Object query method, device, server and storage medium - Google Patents

Object query method, device, server and storage medium Download PDF

Info

Publication number
CN114117192A
CN114117192A CN202010877617.7A CN202010877617A CN114117192A CN 114117192 A CN114117192 A CN 114117192A CN 202010877617 A CN202010877617 A CN 202010877617A CN 114117192 A CN114117192 A CN 114117192A
Authority
CN
China
Prior art keywords
feature
target
query
objects
combination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010877617.7A
Other languages
Chinese (zh)
Inventor
冯锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202010877617.7A priority Critical patent/CN114117192A/en
Publication of CN114117192A publication Critical patent/CN114117192A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Abstract

The application discloses an object query method, an object query device, a server and a storage medium, wherein the object query method, the device, the server and the storage medium are applied to a query server, a plurality of objects are stored in the query server, the objects are classified into object sets corresponding to a plurality of different feature combinations, the feature combinations comprise a combination relation of at least one object feature, at least one object feature associated with the objects in the object sets all accords with the combination relation of at least one object feature in the feature combinations corresponding to the object sets, correspondingly, after the query condition is obtained, at least one target feature combination matched with at least one target object feature in the query condition is determined from the feature combinations, and the objects in the object sets corresponding to at least one target feature combination are obtained. The scheme of the application can improve the query efficiency of object query.

Description

Object query method, device, server and storage medium
Technical Field
The present application relates to the field of data query processing technologies, and in particular, to an object query method, an object query device, a server, and a storage medium.
Background
In scenarios such as information recommendation and content search, queries for objects are involved. For example, based on the query requirement of the user, the application meeting the condition is recommended to the user, or based on the search keyword provided by the user, the matched data result is searched, and the like.
In the object query process, the query server generally traverses each object stored in the database according to the query condition to match the object meeting the query condition. However, when the number of objects stored in the database is large, it is necessary to take a long time to sequentially traverse each object in the database, which results in low efficiency of object query.
Disclosure of Invention
In view of this, the present application provides an object query method, device, server and storage medium, so as to improve query efficiency of object query.
In order to achieve the purpose, the application provides the following technical scheme:
in one aspect, the present application provides an object query method, which is applied to a query server, where a plurality of objects are stored in the query server, and at least one object feature is associated with each object; the method comprises the following steps of classifying a plurality of objects into object sets corresponding to a plurality of different feature combinations, wherein the feature combinations comprise a combination relation of at least one object feature, and at least one object feature related to the objects in the object sets conforms to the combination relation of at least one object feature in the feature combinations corresponding to the object sets, and the method comprises the following steps:
obtaining a query condition, the query condition comprising: at least one target object characteristic satisfied by the object to be queried;
determining at least one target feature combination matched with the at least one target object feature from the plurality of feature combinations;
and querying out the object in the object set corresponding to the at least one target feature combination.
In one possible implementation, the feature combination is a boolean logical relationship between at least one object feature;
the determining at least one target feature combination matching the at least one target object feature from the plurality of feature combinations comprises:
constructing a Boolean search formula based on the at least one target object feature, wherein the Boolean search formula is used for representing at least one target object feature required to be met by the object to be queried;
and determining at least one target feature combination which meets the Boolean search formula in the plurality of feature combinations.
In yet another possible implementation manner, the object stored in the query server is further associated with at least one user attribute, and the user attribute associated with the object is a user attribute that a user matching the object has;
the query condition further includes: at least one target user attribute associated with the object to be queried;
after the querying out the object in the object set corresponding to the at least one target feature combination, the method further includes:
and determining at least one target object associated with the at least one target user attribute from the object set corresponding to the at least one target feature combination.
In yet another possible implementation manner, the query server stores an attribute bitmap of the object, where the attribute bitmap of the object is used to characterize at least one user attribute associated with the object; each element in the attribute bitmap of the object represents a user attribute, the value of the element is a first value, which indicates that the object has the user attribute represented by the element, and the value of the element is a second value, which indicates that the object does not have the user attribute represented by the element;
the determining at least one target object associated with the at least one target attribute information from the object set corresponding to the at least one target feature combination includes:
constructing a target attribute bitmap of the object to be inquired according to the at least one target user attribute;
and determining at least one target object with the attribute bitmap matched with the target attribute bitmap from the object set corresponding to the at least one target feature combination.
In another aspect, the present application further provides an object query apparatus, applied to a query server, where a plurality of objects are stored in the query server, and at least one object feature is associated with each object; wherein the objects are classified into object sets corresponding to different feature combinations, the feature combinations include a combination relation of at least one object feature, and at least one object feature associated with the objects in the object sets all conform to the combination relation of at least one object feature in the feature combinations corresponding to the object sets, the apparatus includes:
a condition obtaining unit, configured to obtain a query condition, where the query condition includes: at least one target object characteristic satisfied by the object to be queried;
a combination determination unit, configured to determine at least one target feature combination matching the at least one target object feature from the plurality of feature combinations;
and the first object query unit is used for querying out the objects in the object set corresponding to the at least one target characteristic combination.
In yet another aspect, the present application further provides a server comprising a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is specifically configured to implement the object query method as described in any one of the above.
In still another aspect, the present application further provides a storage medium for storing a program, which when executed, is used to implement the object query method as described in any one of the above.
As can be seen from the above, in the present application, the query server classifies a plurality of objects into a plurality of object sets corresponding to different feature combinations, so that the objects in the same object set all conform to the combination relationship of at least one object feature in the same feature combination. On the basis, after the query server obtains the query conditions, the feature combination matched with at least one target object feature met by the object to be queried in the query conditions can be determined, and the object set corresponding to the matched feature combination comprises the object which is matched with the at least one target object feature, so that the object which is in line with the query conditions can be determined quickly without traversing all objects, and the object query efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on the provided drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating the architecture of a scenario to which the present application is applicable;
FIG. 2 is a flow chart illustrating an embodiment of an object query method provided by the present application;
FIG. 3 is a flow chart illustrating an object query method according to another embodiment of the present application;
FIG. 4 is a flow interaction diagram of an object query method provided by the present application;
FIG. 5 is a schematic diagram illustrating an exemplary structure of an object query device according to the present application;
fig. 6 is a schematic diagram illustrating a component structure of a server according to the present application.
Detailed Description
The scheme of the application is suitable for the query server to perform object query so as to realize more efficient query of the objects meeting the query conditions.
For ease of understanding, a description will be given of a scenario in which the scheme of the present application is applied. Fig. 1 is a schematic diagram illustrating a composition architecture of a scenario to which the present application is applied.
As can be seen from fig. 1, at least a query server 101 and a user terminal 102 are included in the scenario.
Wherein, the user terminal 102 is configured to send an inquiry request to the inquiry server 101.
The query server is used for obtaining query conditions based on a query request of the user terminal, determining at least one object meeting the query conditions, and returning the queried object to the user terminal.
In the present application, a plurality of selectable objects may be stored in the query server. Wherein the query server may persistently store a plurality of objects. As an optional manner, in order to improve the security of data storage, the scenario further includes a database 103, and accordingly, the query server may perform data synchronization with the database at regular time, obtain a plurality of objects stored in the database, and cache the objects in the memory of the query server.
It will be appreciated that the types of objects available for querying may vary in different application scenarios. For example, in a multimedia recommendation scenario, multimedia meeting the query condition may be taken as an object to be recommended. As another example, in a gaming application search scenario, the objects available for querying are different gaming applications.
The query server may obtain the query condition in multiple ways:
for example, in a possible implementation manner, the query server may directly obtain the query request of the user terminal, and determine the query condition based on at least the query parameter carried in the query request of the user terminal. For example, the query condition may be determined based on only the query parameter carried in the query request of the user terminal, or may be determined by combining the query parameter and the user attribute of the user terminal.
In yet another possible implementation manner, the scenario of the present application may further include a front-end server 104, where the front-end server is connected to the user terminal, and the user terminal sends the query request to the front-end server, and the front-end server determines the query condition based on the query request.
The present application does not limit the specific process of determining the query condition based on the query request by the query server or the front-end server.
It should be noted that the scenario in fig. 1 is described by way of example, where the query condition is determined based on a query request sent by a user terminal. However, it can be understood that in some information recommendation scenarios, even if the user terminal does not send the query request, the object query may be involved, and in this case, the query server may generate the query condition according to the actual need, and therefore, the present application does not limit the specific manner and the specific source of the query condition obtained by the query server.
It will be appreciated that a plurality of objects stored by the query server are each associated with at least one object characteristic. An object feature of an object is a feature that is related to the object itself. The object characteristics of the object may include an object type to which the object belongs and an object attribute of the object, where the object type represents a kind of the object, and the object attribute of the object is an attribute of the object. For example, when the object is multimedia, the object type of the object may be classified into video, audio, picture, and the like, and the object attribute of the object may include a multimedia name, a content feature in the multimedia, and a data amount of the multimedia, and the like.
In order to efficiently query the objects meeting the query conditions, the plurality of objects in the query server are classified into a plurality of object sets corresponding to different feature combinations. The feature combinations and the object sets have one-to-one correspondence, wherein the feature combinations comprise a combination relationship of at least one object feature. And at least one object feature associated with the object in the object set conforms to the combination relation of at least one object feature in the feature combination corresponding to the object set. Wherein, an object can belong to an object set corresponding to one or more feature combinations.
The combination relationship of the at least one object feature may be that the at least one object feature is combined according to different logical relationships, and accordingly, the combination relationship of the at least one object feature may characterize the logical condition that is satisfied by the at least one object feature.
For example, in one possible case, the combination relationship of at least one object feature may be a combination of at least one object feature, and accordingly, the object set of feature combinations is a set of objects that simultaneously conform to the at least one object feature.
In yet another possible scenario, the combined relationship of the at least one object feature may be a boolean logical relationship between the at least one object feature. The Boolean logic relationship is a logic relationship formed by connecting different object characteristics through Boolean logic symbols. The boolean logic symbol may include a logical and (and), a logical not (not), and a logical or (or).
For example, the boolean logical relationship formed between object feature 1, object feature 2, and object feature 3 may be: (object feature 1or object feature 2) and (not object feature 3). Accordingly, each object in the object set corresponding to the feature combination having the boolean logic relationship has object feature 1or object feature 2, and does not have object feature 3.
In particular, in the case where a feature combination includes only one object feature, the boolean logic relationship corresponding to the feature combination may be regarded as the object feature itself.
Of course, the above description has been given by taking boolean logic as an example to represent the logical relationship between object features in a feature combination, and the same applies to this embodiment if the logical relationship between object features in a feature combination is represented in another form.
It can be understood that, in a case that all object features associated with a plurality of objects are determined, the query server may enumerate possible combination relationships among all object features, thereby obtaining a plurality of feature combinations including different combination relationships.
Correspondingly, for each object, if the object features associated with the object conform to the combination relationship of the object features in a certain feature combination, that is, the combination relationship of the object features in a certain feature combination may include at least one object feature associated with the object, in this case, the object may be added to the object set corresponding to the combination feature.
For example, it is assumed that the feature combination 1 is a combination relationship including both the object feature 1 and the object feature 2, the feature combination 2 is a combination relationship including both the object feature 1, the object feature 2, and the object feature 3, and the feature combination 3 is a combination relationship including the object feature 1 and the object feature 2 but not including the object feature 3.
If an object has associated with it object feature 1, object feature 2, and object feature 3, it is described that the object belongs to an object having object feature 1, object feature 2, and object feature 3, and therefore the object corresponds to the combination relationship between the object features in feature combination 1. Meanwhile, since the object has the object feature 1 and the object feature 2, the object also conforms to the combination relationship corresponding to the feature combination 2. However, the object does not conform to the combination relationship of the object features in the feature combination 3. On this basis, the object can be added to the object set of feature combination 1 and the object set of feature combination 2, respectively.
In fig. 2, the query server is described as an independent server. However, it is understood that, in practical applications, the query server of the present application may be regarded as any one node in a server cluster or a system such as a cloud platform.
For example, the cloud platform is also called a cloud computing platform, which is a network platform constructed based on cloud technology. The Cloud technology (Cloud technology) is a hosting technology for unifying series resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The object query method in the present application may be executed by a cloud platform, and correspondingly, the query server may be a node in the cloud platform. Based on cloud computing in the cloud platform, the query efficiency of the query server can be further improved.
Among them, cloud computing (cloud computing) is a computing mode that distributes computing tasks over a resource pool formed by a large number of computers, so that various application systems can acquire computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the "cloud" appear to the user as being infinitely expandable and available at any time, available on demand, expandable at any time, and paid for on-demand.
With the above generality, the object query method of the present application is described below with reference to a flowchart.
As shown in fig. 2, which shows a schematic flow chart of a further embodiment of the object query method according to the present application, the present embodiment may be applied to a query server, as described above, a plurality of objects are stored in the query server, each object is associated with at least one object feature, and the plurality of objects are classified into object sets corresponding to a plurality of different feature combinations, each feature combination includes a combination relationship of at least one object feature, and at least one object feature associated with an object in an object set all conforms to a combination relationship of at least one object feature in a feature combination corresponding to the object set.
The method of the embodiment comprises the following steps:
s201, obtaining the query condition.
Wherein the query condition comprises: at least one target object characteristic satisfied by the object to be queried. For convenience of distinguishing, the object features carried in the query conditions and used for characterizing the object to be queried are called target object features.
As with the aforementioned object features, the target object features may be feature information that the object to be queried has. For example, the target object characteristics may include at least an object type and an object attribute of the object to be queried.
The manner in which the query server obtains the query condition can be as described above.
S202, determining at least one target feature combination matching the at least one target object feature from the plurality of feature combinations.
Wherein, if at least one target feature object belongs to the combination relation of at least one object feature in the feature combination, the feature combination is matched with the at least one target object feature. Thus, the at least one target object feature belongs to a combination relation of at least one object feature in the target feature combination.
For example, if the feature combination includes the object feature 1, the object feature 2, and the object feature 3, and if the feature combination has a combination relationship between the object feature 1 and the object feature 2, the case where the at least one target object feature belongs to the combination relationship corresponding to the feature combination is described, and thus, the feature combination is the target feature combination.
In an alternative, if the combination of features in the query server is a boolean logical relationship between at least one object feature, a boolean search formula may be constructed based on at least one target object feature that needs to be satisfied by the query object, the boolean search formula being used to characterize the at least one target object feature that needs to be satisfied by the query object.
For example, at least one target object characteristic satisfied by the object to be queried is: the object feature a or the object feature B may be constructed as follows: (object feature a) or (object feature B). As another example, at least one target object characteristic satisfied by the object to be queried is: if the object feature a and the non-object feature B are used, the boolean search formula may be constructed as follows: (object characteristics A) and (not object characteristics B).
Correspondingly, after the boolean search expression used for characterizing the at least one target object feature that needs to be satisfied by the object to be queried is constructed, at least one target feature combination that meets the boolean search expression among the plurality of feature combinations may be determined, that is, the boolean logic relationship of the target feature combination matches the boolean logic relationship corresponding to the boolean search expression.
Still as illustrated in the above example, if the boolean search equation is: (object feature a) or (object feature B), then the boolean logic relationship corresponding to the feature combination of the boolean search match may be (object feature a) or (object feature B). Alternatively, if the boolean logic relationship of the feature combination is the object feature a, the feature combination may also be determined as the target feature combination because the boolean logic relationship may include a boolean logic relationship corresponding to the boolean search expression (object feature a) or (object feature B).
It is to be understood that, in the case that the object characteristics associated with the object include an object type of the object and at least one object attribute of the object, the at least one target object characteristic in the query condition of the present application also includes a target object type and at least one target object attribute of the target object.
S203, querying out the object in the object set corresponding to the at least one target feature combination.
It can be understood that, after the target feature combination is located, the set of objects corresponding to the target feature combination can be directly queried from the query server, and the objects in the set of objects are the objects meeting the query condition.
It can be understood that, if the query condition is generated based on the query parameter sent by the user terminal, after the object meeting the query condition is queried, the queried object may also be returned to the user terminal, so that the information of the object queried by the query server is presented at the user terminal.
Optionally, each object in the query server in the present application may also be set with an importance level, for example, the importance level may be a weight or a priority level. Accordingly, after the objects in the object set are queried, the queried objects can be ranked based on the importance levels of the queried objects. If the query is sent by the user terminal, the sorted objects can be returned to the user terminal.
Therefore, in the application, a plurality of objects in the query server are classified into a plurality of object sets corresponding to different feature combinations, so that the objects in the same object set all conform to the combination relation of at least one object feature in the same feature combination. On the basis, after the query server obtains the query conditions, the feature combination matched with at least one target object feature met by the object to be queried in the query conditions can be determined, and the object set corresponding to the matched feature combination comprises the object which is matched with the at least one target object feature, so that the object which is in line with the query conditions can be determined quickly without traversing all objects, and the object query efficiency is improved.
It is understood that, in order to reduce the data maintenance amount of the query server, the present application may persistently store a plurality of objects in the database, and the plurality of objects stored by the query server may be synchronized from the database to the query server, for example, the query server may perform data synchronization with the database at regular or irregular time, so that the plurality of objects stored in the query server and the objects stored by the database are kept synchronized.
Accordingly, when the object synchronization condition is satisfied, the plurality of objects in the query server may be synchronized based on the objects stored in the database. And then classifying the synchronized objects into object sets corresponding to different feature combinations according to at least one object feature associated with the synchronized objects.
The object synchronization condition may be that the object synchronization time is reached according to a set synchronization cycle, or that a data synchronization command is detected, or the like.
Meanwhile, in order to further improve the query efficiency, the query server may store a plurality of objects in a memory.
It is understood that the attribute information associated with the object may include attribute information of other dimensions in addition to its own characteristic attribute. Optionally, in this application, the object stored in the query server is further associated with at least one user attribute. The user attribute associated with the object is the user attribute which the user suitable for the object has.
For example, taking an object as a game application, the game applications that are interested in users of different ages, different professions, and different regions may also be different, and therefore, the user attribute associated with the game application is the user attribute of the age zone, the profession, and the region that the user matched with the game application has.
Correspondingly, the query conditions obtained by the query server further include: at least one target user attribute associated with the object to be queried. On this basis, after the object set corresponding to at least one target feature combination is determined, at least one target object associated with the at least one target attribute information may be determined from the object set corresponding to at least one target feature combination, so as to filter out the objects in the queried object set that do not meet the target user attribute.
There are many specific ways to filter the objects that do not meet the target user attribute from the queried object set. Optionally, in order to improve the filtering efficiency, the object in the object set may be filtered based on a bitmap filtering manner.
Fig. 3 is a schematic flowchart illustrating an object query method according to another embodiment of the present application, where the method of this embodiment is applied to a query server, and a plurality of objects in the query server are classified into object sets corresponding to different feature combinations, as described above. In this embodiment, the attribute bitmap of the object is further stored in the query server, and the attribute bitmap of the object is used to represent at least one user attribute associated with the object.
The method of the embodiment may include:
s301, obtaining the query condition.
Wherein the query condition comprises: at least one target object characteristic met by the object to be queried and at least one target user attribute associated with the object to be queried.
The user attribute associated with the object is the user attribute that the user to which the object is adapted has.
S302, at least one target feature combination matched with the at least one target object feature is determined from the plurality of feature combinations.
S303, querying out the object in the object set corresponding to the at least one target feature combination.
The above steps S301 to S303 can refer to the related description of any of the previous embodiments, and are not described herein again.
S304, constructing a target attribute bitmap of the object to be inquired according to the at least one target user attribute.
Wherein, as can be seen from the foregoing, the attribute bitmap of the object is used to characterize at least one user attribute associated with the object. Specifically, each element in the attribute bitmap of the object represents a user attribute, and the value of the element is the first value indicating that the object has the user attribute represented by the element, and the value of the element is the second value indicating that the object does not have the user attribute represented by the element.
For example, the first value may be 1 and the second value may be 0.
For example, assuming that there are 9 user attributes in total, which are user attribute 1 to user attribute 9 in sequence, the attribute bitmap may include 9 elements, and the nine elements respectively represent the 9 user attributes. Assuming that the user attribute associated with a certain object includes a user attribute 1 and a user attribute 3, values of the two elements representing the user attribute 1 and the user attribute 3 in the attribute bitmap of the user are 1, and values of other elements in the attribute bitmap are all zero.
Correspondingly, after at least one target user attribute of the user to be queried is obtained, a target attribute bitmap can be constructed according to the user attributes represented by different elements in the attribute bitmap and the at least one target user attribute. And representing that each element of the at least one target user attribute takes a first value in the target attribute bitmap, and the values of other elements except the element corresponding to the at least one target user attribute take a second value.
For example, assume that the attribute bitmap includes 6 elements, where the first element represents male, the second element represents female, the third element represents the user's scholarly as the subject, the fourth element represents the user's student of the scholarly, the fifth element represents the user's scholarly as a doctor, and the sixth element represents the scholarly as a subject. Then assume that the target user attributes of the user to be queried include: if the user age is female and the academic calendar is a student, the values of the second element and the 4 th element in the constructed target attribute bitmap are 1, and the values of the other elements are 0.
S305, determining at least one target object with the attribute bitmap matched with the target attribute bitmap from the object set corresponding to the at least one target feature combination.
If two attribute bitmaps are identical or the similarity exceeds a set threshold, the two attribute bitmaps may be considered to match. The calculation method of the similarity between the attribute bitmaps may be various, and may be calculated based on the number of the same elements in the attribute bitmaps, or may be other methods, which are not limited to this.
It can be understood that if the attribute bitmap of an object in the object set matches with the target attribute bitmap, the object is satisfied with the query condition, and therefore, the object can be regarded as a target object to be queried.
S306, ranking the at least one target object based on the importance level of the at least one target object.
The importance level may be preset as needed. For example, the importance level may be in the form of a weight or priority of the object.
It can be understood that, the target objects meeting the condition are sorted based on the importance level, so that the objects with higher importance or more desirable to be recommended are sorted more ahead, and a better object recommendation effect is achieved.
Similar to the previous embodiment, after determining the rank of the at least one target object, the rank of the at least one target object may also be sent to the user terminal.
It should be noted that, in this embodiment, the sorting of the target objects is an optional manner, and in practical applications, the step S306 may not be executed as needed.
In order to facilitate understanding of the solution of the embodiment of the present application, a description is given below of a real-time solution of the present application from a flow interaction perspective, and in this embodiment, an application scenario in which a server downloading an application of software recommends a game gift package to a user is comprehensively described.
As shown in fig. 4, which outputs a flow interaction diagram of an object query method according to the present application, the method in this embodiment may include:
s401, when the query server meets the synchronization condition, the query server obtains a plurality of objects stored in the database and stores the plurality of objects in the memory of the query server, so that the plurality of objects stored in the memory of the query server are synchronized with the plurality of objects stored in the database.
In the game gift package recommendation scenario, the database may be a database storing the game gift package or identification information of the game gift package.
S402, the query server classifies the plurality of synchronized objects into a plurality of object sets corresponding to different Boolean logic relations according to at least one object characteristic associated with each of the plurality of synchronized objects.
Each Boolean logic relationship is a logic relationship constructed by utilizing Boolean logic symbols and at least one object feature, and therefore each Boolean logic relationship represents a combination relationship of at least one object feature.
Each object set corresponds to a Boolean logic relationship, and at least one object feature associated with any object in the object sets can determine the object feature according to the Boolean logic relationship corresponding to the object set.
And storing the corresponding relations between the plurality of Boolean logic relations and the object sets in the memory of the query server.
It will be appreciated that an object may be classified into a plurality of object sets because of the overlap of the ranges of object features determined by different boolean logical relationships.
It should be noted that the order of steps S401 and S402 is not limited to that shown in fig. 4, and in practical applications, these two steps may be executed as long as the object synchronization condition is satisfied.
S403, the user terminal sends a query request to the query server.
The query request may include query parameters for characterizing the object to be queried, such as keywords of the object to be queried.
For example, in a scenario where a server that downloads an application via software recommends a game gift package to a user, the user terminal sends an inquiry request for the game gift package to an inquiry server corresponding to the software downloading application via the software downloading application. The query request indicates that the type of the object to be queried is a game gift package, and the query request may also carry object features such as keywords of the game gift package, and of course, the query request may also carry user attributes of the user terminal.
S404, the query server determines a query condition based on the query request.
For example, the query server determines the query condition based on the keyword carried by the query request, the user attribute information of the user corresponding to the user terminal sending the query request, and the like.
Wherein the query condition comprises: at least one target object characteristic met by the object to be queried and at least one target user attribute associated with the object to be queried.
For example, taking a game gift package recommendation scenario as an example, the query condition may include attribute information such as a type of the object to be queried being a game gift package, a type satisfied by the game gift package, and at least one user attribute associated with a user corresponding to the user terminal.
In the present embodiment, the query server determines the query condition based on the query request as an example, but it is understood that the case where the query server obtains the query condition in other ways is also applicable to the present embodiment.
S405, the query server constructs a Boolean search formula based on the at least one target object characteristic.
The Boolean search formula is used for characterizing at least one target object characteristic required to be met by the object to be queried.
S406, the query server determines an object set corresponding to at least one target Boolean logic relation in accordance with the Boolean search formula from the object sets corresponding to the Boolean logic relations.
For example, taking game gift package recommendation as an example, the object set corresponding to each boolean logic relationship includes an identifier of at least one game gift package.
S407, the query server constructs a target attribute bitmap of the object to be queried according to the at least one target user attribute.
S408, the query server determines at least one target object matched with the attribute bitmap from the object set corresponding to the at least one target Boolean logic relationship.
S409, the query server ranks the at least one target object according to the importance level associated with the target object.
S410, the query server returns the at least one sorted target object to the user terminal so as to display a list of the at least one sorted target object on the user terminal.
For example, still taking the game gift package recommendation as an example, after determining a plurality of game gift packages meeting the query condition, the identifiers of the plurality of game gift packages may be sequentially sorted according to the order to obtain a sorted list including the identifiers of the plurality of game gift packages, and the sorted list is returned to the user terminal, so that the user of the user terminal may see the information of the sequentially-arranged game gift packages returned by the query server.
The application also provides an object query device corresponding to the object query method.
As shown in fig. 5, which shows a schematic structural diagram of an embodiment of an object query apparatus according to the present application, the apparatus of the present embodiment is applied to a query server, where a plurality of objects are stored in the query server, and the object is associated with at least one object feature; the objects are classified into object sets corresponding to different feature combinations, the feature combinations comprise a combination relation of at least one object feature, and at least one object feature related to the objects in the object sets all conform to the combination relation of at least one object feature in the feature combinations corresponding to the object sets. The device of the embodiment comprises:
a condition obtaining unit 501, configured to obtain a query condition, where the query condition includes: at least one target object characteristic satisfied by the object to be queried;
a combination determining unit 502, configured to determine at least one target feature combination matching the at least one target object feature from the plurality of feature combinations;
a first object querying unit 503, configured to query out an object in the object set corresponding to the at least one target feature combination.
In one possible implementation, the combination of features stored in the query server is a boolean logical relationship between at least one object feature;
the combination determination unit includes:
the Boolean construction unit is used for constructing a Boolean search formula based on the at least one target object characteristic, and the Boolean search formula is used for representing the at least one target object characteristic required to be met by the object to be inquired;
and the combination matching unit is used for determining at least one target feature combination which accords with the Boolean search formula in the plurality of feature combinations.
In yet another possible implementation manner, the object stored in the query server is further associated with at least one user attribute, and the user attribute associated with the object is a user attribute that a user matching the object has;
the query condition obtained by the condition obtaining unit further includes: at least one target user attribute associated with the object to be queried;
the device also includes:
and the second object query unit is used for determining at least one target object associated with the at least one target user attribute from the object set corresponding to the at least one target feature combination after the first object query unit queries the objects in the object set corresponding to the at least one target feature combination.
In a possible implementation manner, the query server stores an attribute bitmap of the object, where the attribute bitmap of the object is used to represent at least one user attribute associated with the object; each element in the attribute bitmap of the object represents a user attribute, the value of the element is a first value, which indicates that the object has the user attribute represented by the element, and the value of the element is a second value, which indicates that the object does not have the user attribute represented by the element;
a second query unit comprising:
the bitmap construction unit is used for constructing a target attribute bitmap of the object to be inquired according to the at least one target user attribute;
and the object filtering unit is used for determining at least one target object matched with the attribute bitmap and the target attribute bitmap from the object set corresponding to the at least one target feature combination.
In yet another possible implementation, the objects stored in the query server are further associated with importance levels;
the device also includes:
and the object sorting unit is used for sorting the at least one target object based on the importance level of the at least one target object after the object filtering unit determines the at least one target object associated with the at least one target attribute information.
In yet another possible implementation manner, the query server stores the plurality of objects in a memory, and the plurality of objects are synchronized from a database to the query server;
the device also includes:
the object synchronization unit is used for synchronizing a plurality of objects in the memory of the query server based on the objects stored in the database when the object synchronization condition is met;
and the relationship updating unit is used for classifying the synchronized objects into object sets corresponding to different feature combinations according to at least one object feature associated with the synchronized objects.
Optionally, in an embodiment of the above apparatus, the condition obtaining unit obtains the query condition generated based on a query parameter sent by the user terminal;
the device also includes: and the object returning unit is used for sending the inquired object to the user terminal.
In yet another aspect, the present application further provides a server, which may be an independent server, a server in a server cluster, or a node in a cloud platform, etc. Fig. 6 is a schematic diagram illustrating a component architecture of the server provided in the present application. In fig. 6, the server 600 may include: a processor 601 and a memory 602.
Optionally, the server may further include: a communication interface 603, an input unit 604, a display 605, and a communication bus 606.
The processor 601, the memory 602, the communication interface 603, the input unit 604 and the display 605 all communicate with each other through the communication bus 606.
In the embodiment of the present application, the processor 601 may be a central processing unit, an application specific integrated circuit, or the like.
The processor may call a program stored in the memory 602, and in particular, the processor may perform the operations performed by the query server in the above embodiments.
The memory 602 is used for storing one or more programs, which may include program codes including computer operation instructions, and in this embodiment, the memory stores at least a program for implementing the object query method in any one of the above embodiments.
In one possible implementation, the memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, the above-mentioned programs, and application programs required for image playing and other functions; the storage data area may store data created according to the use of the server.
The communication interface 603 may be an interface of a communication module.
The present application may further include an input unit 604, which may include a touch sensing unit, a keyboard, and the like.
The display 605 includes a display panel such as a touch display panel or the like.
Of course, the server structure shown in fig. 6 does not constitute a limitation to the server in the embodiment of the present application, and in practical applications, the server may include more or less components than those shown in fig. 6, or some components may be combined.
In another aspect, the present application further provides a storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the object query method in any one of the above embodiments is implemented.
The present application also proposes a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the computer device executes the methods provided in the various optional implementation manners in the aspect of the object query method or the aspect of the object query device.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements should also be considered as the protection scope of the present invention.

Claims (10)

1. An object query method is applied to a query server, a plurality of objects are stored in the query server, and at least one object characteristic is associated with the objects; the method comprises the following steps of classifying a plurality of objects into object sets corresponding to a plurality of different feature combinations, wherein the feature combinations comprise a combination relation of at least one object feature, and at least one object feature related to the objects in the object sets conforms to the combination relation of at least one object feature in the feature combinations corresponding to the object sets, and the method comprises the following steps:
obtaining a query condition, the query condition comprising: at least one target object characteristic satisfied by the object to be queried;
determining at least one target feature combination matched with the at least one target object feature from the plurality of feature combinations;
and querying out the object in the object set corresponding to the at least one target feature combination.
2. The method of claim 1, wherein the combination of features is a boolean logical relationship between at least one object feature;
the determining at least one target feature combination matching the at least one target object feature from the plurality of feature combinations comprises:
constructing a Boolean search formula based on the at least one target object feature, wherein the Boolean search formula is used for representing at least one target object feature required to be met by the object to be queried;
and determining at least one target feature combination which meets the Boolean search formula in the plurality of feature combinations.
3. The method according to claim 1, wherein the object stored in the query server is further associated with at least one user attribute, and the user attribute associated with the object is a user attribute possessed by a user matching the object;
the query condition further includes: at least one target user attribute associated with the object to be queried;
after the querying out the object in the object set corresponding to the at least one target feature combination, the method further includes:
and determining at least one target object associated with the at least one target user attribute from the object set corresponding to the at least one target feature combination.
4. The method according to claim 3, wherein the query server stores an attribute bitmap of the object, the attribute bitmap of the object being used for characterizing at least one user attribute associated with the object; each element in the attribute bitmap of the object represents a user attribute, the value of the element is a first value, which indicates that the object has the user attribute represented by the element, and the value of the element is a second value, which indicates that the object does not have the user attribute represented by the element;
the determining at least one target object associated with the at least one target attribute information from the object set corresponding to the at least one target feature combination includes:
constructing a target attribute bitmap of the object to be inquired according to the at least one target user attribute;
and determining at least one target object with the attribute bitmap matched with the target attribute bitmap from the object set corresponding to the at least one target feature combination.
5. The method of claim 3, wherein the objects stored in the query server are further associated with a level of importance;
after the determining of the at least one target object associated with the at least one target attribute information, further comprising:
ranking the at least one target object based on the importance level of the at least one target object.
6. The method of claim 1, wherein the query server stores the plurality of objects in memory, and wherein the plurality of objects are synchronized from a database to the query server;
the method further comprises the following steps:
when the object synchronization condition is met, synchronizing a plurality of objects in the memory of the query server based on the objects stored in the database;
and classifying the synchronized objects into object sets corresponding to different feature combinations according to at least one object feature associated with the synchronized objects.
7. The method according to claim 1or 3, wherein the query condition is generated based on a query parameter sent by a user terminal;
the method further comprises the following steps:
and sending the inquired object to the user terminal.
8. An object query device is applied to a query server, wherein a plurality of objects are stored in the query server, and at least one object characteristic is associated with each object; wherein the objects are classified into object sets corresponding to different feature combinations, the feature combinations include a combination relation of at least one object feature, and at least one object feature associated with the objects in the object sets all conform to the combination relation of at least one object feature in the feature combinations corresponding to the object sets, the apparatus includes:
a condition obtaining unit, configured to obtain a query condition, where the query condition includes: at least one target object characteristic satisfied by the object to be queried;
a combination determination unit, configured to determine at least one target feature combination matching the at least one target object feature from the plurality of feature combinations;
and the first object query unit is used for querying out the objects in the object set corresponding to the at least one target characteristic combination.
9. A server, comprising a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, which when executed is specifically configured to implement the object querying method according to any one of claims 1 to 7.
10. A storage medium storing a program for implementing the object query method according to any one of claims 1 to 7 when the program is executed.
CN202010877617.7A 2020-08-27 2020-08-27 Object query method, device, server and storage medium Pending CN114117192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010877617.7A CN114117192A (en) 2020-08-27 2020-08-27 Object query method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010877617.7A CN114117192A (en) 2020-08-27 2020-08-27 Object query method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN114117192A true CN114117192A (en) 2022-03-01

Family

ID=80374360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010877617.7A Pending CN114117192A (en) 2020-08-27 2020-08-27 Object query method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN114117192A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115017875A (en) * 2022-08-09 2022-09-06 建信金融科技有限责任公司 Enterprise information processing method, device, system, equipment, medium and program product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115017875A (en) * 2022-08-09 2022-09-06 建信金融科技有限责任公司 Enterprise information processing method, device, system, equipment, medium and program product
CN115017875B (en) * 2022-08-09 2022-11-25 建信金融科技有限责任公司 Enterprise information processing method, device, system, equipment and medium

Similar Documents

Publication Publication Date Title
US11163957B2 (en) Performing semantic graph search
CN109241412B (en) Recommendation method and system based on network representation learning and electronic equipment
US20150234927A1 (en) Application search method, apparatus, and terminal
CN104794242B (en) Searching method
CN105956148A (en) Resource information recommendation method and apparatus
US9129296B2 (en) Augmenting recommendation algorithms based on similarity between electronic content
CN111930770A (en) Data query method and device and electronic equipment
CN109829073B (en) Image searching method and device
CN109753504A (en) Data query method and device
US20180107720A1 (en) Dynamic assignment of search parameters to search phrases
US20150120697A1 (en) System and method for analysis of a database proxy
WO2022247868A1 (en) Multi-sub-graph matching method, apparatus and device
WO2019129831A1 (en) Systems and methods for determining database permissions
CN110555034B (en) Data query paging method, device, server and medium
CN104484413A (en) Method and device for obtaining searching results
CN114117192A (en) Object query method, device, server and storage medium
WO2020135420A1 (en) Method and apparatus for classifying users
CN114969165B (en) Data query request processing method, device, equipment and storage medium
US9542457B1 (en) Methods for displaying object history information
CN109885651A (en) A kind of question pushing method and device
CN110321444B (en) Graph database-based storage method, device and storage medium
CN114547476A (en) Community search method, device and processing equipment based on bipartite graph
CN113468258A (en) Heterogeneous data conversion method and device and storage medium
CN112527847A (en) Data sorting method and device, electronic medium and storage medium
CN112667682A (en) Data processing method, data processing device, computer equipment and storage medium

Legal Events

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