CN112182027A - Information query method and device, electronic equipment and storage medium - Google Patents

Information query method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112182027A
CN112182027A CN202010957893.4A CN202010957893A CN112182027A CN 112182027 A CN112182027 A CN 112182027A CN 202010957893 A CN202010957893 A CN 202010957893A CN 112182027 A CN112182027 A CN 112182027A
Authority
CN
China
Prior art keywords
information
state information
query
target
attribute
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
CN202010957893.4A
Other languages
Chinese (zh)
Other versions
CN112182027B (en
Inventor
段勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010957893.4A priority Critical patent/CN112182027B/en
Publication of CN112182027A publication Critical patent/CN112182027A/en
Application granted granted Critical
Publication of CN112182027B publication Critical patent/CN112182027B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models

Landscapes

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

Abstract

The disclosure shows an information query method, an information query device, an electronic device and a storage medium, first receiving a query request, wherein the query request comprises identification information of a first object and a second object; then arranging the identification information of the first object and the identification information of the second object to obtain a target object identification pair; then, according to the corresponding relation between the pre-stored object identification pair and the state information, inquiring to obtain the target state information corresponding to the target object identification pair, wherein the object identification pair is formed by arranging the identification information of two objects, and the state information comprises the relation attribute between the two objects and the attribute value of the relation attribute; and outputting the target state information. According to the technical scheme, all relations between the two objects can be obtained through one-time query, and compared with a mode that every relation is stored independently, the scheme can effectively save storage space, reduce the relation query access resource request amount and improve the information query efficiency.

Description

Information query method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an information query method and apparatus, an electronic device, and a storage medium.
Background
At present, a social relationship state is introduced into a pet in a live broadcast room, and between two pets, an anchor can have operations of paying attention to the other side, blacking out the other side and the like. The current storage method is to store each relationship between pets individually, for example, whether pet a pays attention to pet B, whether pet a blackens pet B, whether pet B pays attention to pet a, and whether pet B blackens pet a.
The current storage mode has low query efficiency when the relationship between the pet pairs needs to be queried. For example, when the pet a focuses on the pet B, it is required to respectively inquire whether the pet a is drawn black, whether the pet B is drawn black, and whether the pet a focuses on the pet B. When checking whether the pet A and the pet B have a friend relationship, whether the pet A pays attention to the pet B and whether the pet B pays attention to the pet A need to be respectively inquired.
Disclosure of Invention
The present disclosure provides an information query method, an information query apparatus, an electronic device, and a storage medium, so as to at least solve the problem of low information query efficiency in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the present disclosure, there is provided an information query method, the method including:
receiving a query request, wherein the query request comprises identification information of a first object and a second object;
arranging the identification information of the first object and the identification information of the second object to obtain a target object identification pair;
according to a corresponding relation between a pre-stored object identification pair and state information, inquiring to obtain target state information corresponding to the target object identification pair, wherein the object identification pair is formed by arranging identification information of two objects, and the state information comprises a relation attribute between the two objects and an attribute value of the relation attribute;
and outputting the target state information.
In an optional implementation manner, the state information is a binary sequence including a plurality of storage bits, each of the storage bits corresponds to a different relationship attribute, and a value of each of the storage bits is an attribute value of the corresponding relationship attribute.
In an optional implementation manner, the query request further includes a first operation request, and after the outputting the target state information, the method further includes:
querying condition state information and a preset condition corresponding to relationship information contained in the first operation request, wherein the condition state information is a binary sequence containing a plurality of binary bits, the number of the binary bits is the same as the number of the storage bits in the state information, and the condition state information and the preset condition are used for judging whether a first operation is executable or not;
carrying out bitwise AND operation on the target state information and the condition state information;
when the operation result meets the preset condition, executing the first operation;
wherein the first operation comprises modifying a relationship between the first object and the second object.
In an optional implementation manner, after the step of executing the first operation when the operation result meets the preset condition, the method further includes:
determining a target storage bit corresponding to a target relation attribute in the target state information, wherein the target relation attribute is a relation attribute corresponding to the relation information contained in the first operation request;
modifying the value of the target storage bit according to the first operation to obtain updated state information;
and storing the updated state information.
In an alternative implementation manner, the step of arranging the identification information of the first object and the identification information of the second object includes:
arranging the identification information of the first object and the identification information of the second object according to an ascending order; alternatively, the first and second electrodes may be,
and arranging the identification information of the first object and the identification information of the second object according to a descending order.
In an alternative implementation, the relationship attribute between the first object and the second object includes: whether the first object is associated with the second object in a first association relationship, and whether the second object is associated with the first object in the first association relationship.
According to a second aspect of the present disclosure, there is provided an information query apparatus, the apparatus comprising:
the device comprises a request receiving module, a query processing module and a query processing module, wherein the request receiving module is configured to receive a query request which comprises identification information of a first object and a second object;
the information arrangement module is configured to arrange the identification information of the first object and the identification information of the second object to obtain a target object identification pair;
the information query module is configured to query and obtain target state information corresponding to a target object identifier pair according to a corresponding relation between the pre-stored object identifier pair and the state information, wherein the object identifier pair is formed by arranging identification information of two objects, and the state information comprises a relation attribute between the two objects and an attribute value of the relation attribute;
an information output module configured to output the target state information.
In an optional implementation manner, the state information is a binary sequence including a plurality of storage bits, each of the storage bits corresponds to a different relationship attribute, and a value of each of the storage bits is an attribute value of the corresponding relationship attribute.
In an optional implementation manner, the query request further includes a first operation request, and the apparatus further includes:
a condition query module configured to query condition state information and a preset condition corresponding to relationship information included in the first operation request, wherein the condition state information is a binary sequence including a plurality of binary bits, the number of the binary bits is the same as the number of bits of storage bits in the state information, and the condition state information and the preset condition are used for judging whether a first operation is executable or not;
a conditional operation module configured to perform a bitwise AND operation on the target state information and the conditional state information;
the operation execution module is configured to execute the first operation when an operation result meets the preset condition;
wherein the first operation comprises modifying a relationship between the first object and the second object.
In an optional implementation, the apparatus further includes:
a target determination module configured to determine a target storage bit corresponding to a target relationship attribute in the target state information, where the target relationship attribute is a relationship attribute corresponding to the relationship information included in the first operation request;
an information updating module configured to modify the value of the target storage bit according to the first operation to obtain updated state information;
and the information storage module is configured to store the updated state information.
In an alternative implementation, the information ranking module is specifically configured to:
arranging the identification information of the first object and the identification information of the second object according to an ascending order; alternatively, the first and second electrodes may be,
and arranging the identification information of the first object and the identification information of the second object according to a descending order.
In an alternative implementation, the relationship attribute between the first object and the second object includes: whether the first object is associated with the second object in a first association relationship, and whether the second object is associated with the first object in the first association relationship.
According to a third aspect of the present disclosure, there is provided an electronic apparatus comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the information query method of the first aspect.
According to a fourth aspect of the present disclosure, there is provided a storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the information query method according to the first aspect.
According to a fifth aspect of the present disclosure, there is provided a computer program product, wherein instructions of the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the information query method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the technical scheme of the disclosure provides an information query method, an information query device, electronic equipment and a storage medium, wherein a query request is received at first, and the query request comprises identification information of a first object and identification information of a second object; then arranging the identification information of the first object and the identification information of the second object to obtain a target object identification pair; then, according to the corresponding relation between the pre-stored object identification pair and the state information, inquiring to obtain the target state information corresponding to the target object identification pair, wherein the object identification pair is formed by arranging the identification information of two objects, and the state information comprises the relation attribute between the two objects and the attribute value of the relation attribute; and outputting the target state information. According to the technical scheme, the target state information corresponding to the target object identification pair is inquired according to the corresponding relation between the prestored object identification pair and the state information, the obtained target state information contains all relations between the two objects, namely all relations between the two objects can be obtained through one-time inquiry, and compared with a mode that each relation is stored independently, the scheme can effectively save storage space, reduce the relation inquiry and access resource request amount and improve the information inquiry efficiency.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flow chart illustrating a method of information querying in accordance with an exemplary embodiment.
FIG. 2 is a flowchart illustrating a first operation performed in accordance with an exemplary embodiment.
Fig. 3 is a block diagram illustrating a configuration of an information inquiry apparatus according to an exemplary embodiment.
FIG. 4 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flow chart illustrating a method of querying information, which may include the following steps, as shown in fig. 1, according to an example embodiment.
In step S11, a query request is received, where the query request includes the identification information of the first object and the second object.
The execution subject of the embodiment may be an electronic device (such as a server).
In practical application, the object may be a pet in a live broadcast room or a live broadcast user. Each object (e.g., pet, user, etc.) has unique identification information, such as the first object being pet 101 and the second object being pet 102.
In step S12, the identification information of the first object and the identification information of the second object are arranged to obtain a target object identification pair.
In a specific implementation, the identification information of the first object and the identification information of the second object may be arranged in ascending order to obtain a target object identification pair; or the identification information of the first object and the identification information of the second object can be arranged according to a descending order to obtain a target object identification pair.
And determining a target object identification pair according to the identification information of the first object and the second object. For example, it is agreed that the identification information of the first object (e.g., pet 101) and the identification information of the second object (e.g., pet 102) are arranged in ascending order (from small to large) to represent the target object identification pair (e.g., pet pair), i.e., <101, 102> may represent the target object identification pair consisting of pet 101 and pet 102.
In step S13, target status information corresponding to the target object id pair is obtained by querying according to a pre-stored correspondence between the object id pair and the status information, where the object id pair is formed by arranging identification information of two objects, and the status information includes a relationship attribute between the two objects and an attribute value of the relationship attribute.
The relationship attribute between two objects, such as the relationship attribute between the first object and the second object, may include: whether the first object is associated with the second object in a first association relationship, and whether the second object is associated with the first object in the first association relationship.
The first association relationship may be an attention relationship, a blackout relationship, a comment relationship, or the like. When the first association relationship is an attention relationship, the relationship attribute between the first object and the second object includes: whether the first object is paying attention to the second object and whether the second object is paying attention to the first object. When the first association relationship is a black-out relationship, the relationship attribute between the first object and the second object includes: whether the first object is to pull black the second object, and whether the second object is to pull black the first object.
In a specific implementation, the state information may be a binary sequence including a plurality of storage bits, each storage bit corresponds to a different relationship attribute, and a value of each storage bit is an attribute value of the corresponding relationship attribute.
In practical applications, the number of storage bits of the binary sequence may be determined according to the type of the relationship attribute between the two objects, and the number of the storage bits may be greater than or equal to the type of the relationship attribute between the two objects. For example, when there are 4 relationship attributes between two objects contained in an object identification pair, the state information may be a binary sequence containing 4 or more bits; when there are 5 relation attributes between two objects contained in the object identification pair, a byte, i.e. an 8-bit binary number, may be used to store the state information between the two objects, where 5 bits store the attribute values of the 5 relation attributes, and 3 bits of redundancy support extension.
The storage bit number of the binary sequence representing the state information is determined, and the storage bit occupied by each relation attribute can be determined in advance according to the relation attribute between two objects to be stored.
For pet pair <101, 102>, the relationship attributes between pet 101 and pet 102 include the following 4: whether pet 101 is interested in pet 102, whether pet 102 is interested in pet 101, whether pet 101 is drawn black to pet 102, and whether pet 102 is drawn black to pet 101, the status information between the two can be represented in a binary sequence containing 4 memory bits. Further, it may be agreed that bit 0 in the binary sequence indicates whether the former is concerned with the latter, i.e., whether pet 101 is concerned with pet 102; the 1 st bit indicates whether the latter pays attention to the former, i.e., whether the pet 102 pays attention to the pet 101, the 2 nd bit indicates whether the former is blackened, i.e., whether the pet 101 is blackened, and the 3 rd bit indicates whether the latter is blackened, i.e., whether the pet 102 is blackened.
In practical application, when the pet status information is queried according to the operation requirement of the user, the corresponding target pet pair <101, 102> is determined according to the identification information of the pet 101 and the pet 102, the target status information corresponding to the target pet pair is queried, and status information indicating all relationships of the pet pair, such as 00000001, is obtained, according to the above convention, the 0 th bit indicates whether the former pays attention to the latter, that is, whether the pet 101 pays attention to the pet 102, and the attribute value of the relationship attribute is 1 according to the status information, which indicates that the pet 101 pays attention to the pet 102.
In the aspect of storage, all the relationship attributes and attribute values between two objects are stored in one binary sequence, that is, all the relationships between two objects can be represented by only storing one binary sequence. In the aspect of information query, in this embodiment, the target state information is queried according to the identification information of the two objects, and the target state information includes all relationship attributes and corresponding attribute values between the two objects, that is, all relationships between the two objects can be obtained through one-time query in the present solution, so that the amount of requests for relationship query access to resources can be reduced, and the information query efficiency can be improved.
In step S14, the target state information is output.
In practical application, the output target state information may be used to verify whether the operation of the user is legal or not, or may be sent to the user terminal to be correspondingly displayed on the terminal interface.
According to the information query method provided by the embodiment, all the relationship attributes and corresponding attribute values between two objects can be obtained through one-time query according to the corresponding relationship between the pre-stored object identification pairs and the state information, and compared with a mode that each relationship attribute is stored independently, the scheme can effectively save storage space, reduce the request amount of relationship query access resources and improve the information query efficiency.
In an optional implementation manner of this embodiment, the query request further includes a first operation request, and referring to fig. 2, after step S14, the method may further include:
step S21, querying condition status information and a preset condition corresponding to the relationship information included in the first operation request, where the condition status information is a binary sequence including a plurality of binary bits, the number of the binary bits is the same as the number of the storage bits in the status information, and the condition status information and the preset condition are used to determine whether the first operation is executable.
And the condition state information and the preset condition are used for judging whether the first operation is legal or not.
In step S22, the target status information and the condition status information are bitwise and-operated.
In a specific implementation, the target state information and the binary phase corresponding to the position in the condition state information are summed.
Step S23, when the operation result meets the preset condition, executing a first operation; wherein the first operation comprises modifying a relationship between the first object and the second object.
In a specific implementation, when the result of the bitwise and operation meets a preset condition, it indicates that the first operation is legal, and the first operation may be executed.
For example, a binary sequence containing 4 storage bits is used to represent status information of a pet pair such as <101, 102>, and it is agreed that the 0 th bit indicates whether the former is concerned with the latter, the 1 st bit indicates whether the latter is concerned with the former, the 2 nd bit indicates whether the former is blackened, and the 3 rd bit indicates whether the latter is blackened.
When the first operation request is that the pet 101 requests to pay attention to the pet 102, the server may inquire that the condition state information corresponding to the relationship information (the former requests to pay attention to the latter) included in the first operation request is 1101, and the preset condition is 0. Assuming that the target state information of the query pet pair <101, 102> is N, if 1101& & N ═ 0, indicating that the bitwise and operation result of the target state information and the conditional state information meets the preset condition, a first operation of the pet 101 focusing on the pet 102 may be performed, otherwise, not allowed.
When the first operation request is a request for viewing a friend list of the pet 101, it is required to query whether the pet 101 and the pet 102 have a friend relationship, it may be determined that condition state information corresponding to relationship information (friend relationship) included in the first operation request is 0011, and a preset condition is 0011, assuming that target state information of a query pet pair <101, 102> is N, if 0011& & N & & & 0011, it indicates that a bitwise and operation result of the target state information and the condition state information conforms to the preset condition, the pet 101 and the pet 102 are in a friend relationship, and the pet 102 may be displayed in the friend list of the pet 101.
When the first operation is performed and the first operation includes modifying the relationship between the first object and the second object, the attribute value of the relationship attribute corresponding to the relationship information included in the first operation request, which is stored in advance, also needs to be modified, and in an optional implementation manner, after step S23, the method may further include:
step S24, determine a target storage bit corresponding to the target relationship attribute in the target status information, where the target relationship attribute is a relationship attribute corresponding to the relationship information included in the first operation request.
In a specific implementation, when the first operation request is that the pet 101 requests attention to the pet 102, since the 0 th bit in the target state information of the pet pair <101, 102> indicates whether the pet 101 pays attention to the pet 102, the target storage bit corresponding to the target relationship attribute is the 0 th bit. Before the first operation is performed, the attribute value of the target relationship attribute (the value of the target storage bit) is, for example, 0.
And step S25, according to the first operation, modifying the value of the target storage bit to obtain the updated state information.
In a particular implementation, after performing the first operation (pet 101 focuses on pet 102), the attribute value of the target relationship attribute may be modified to 1, i.e., the value of the 0 th bit (target storage bit) in the binary sequence is changed from 0 to 1.
In step S26, the updated state information is stored.
In a specific implementation, when a write operation is performed, the corresponding storage bit in the written state information is updated. For example, assuming that the first operation is that the pet 102 pays attention to the pet 101, the first bit in the existing bit storage information (target state information) 0000001 of the pet pair <101, 102> needs to be updated to 00000011, which indicates that the pet 102 pays attention to the pet 101, and in combination with the current state that the pet 101 has paid attention to the pet 102, it can be determined that the pet pair <101, 102> is a friend relationship (i.e., a friend pays attention to each other).
The embodiment of the application provides a technical scheme based on storing a plurality of different relations between record objects according to the position, the storage layer is improved aiming at the problems existing in the existing scheme, compared with the mode that each relation of a pet pair in the existing scheme is stored independently, the storage space is effectively saved, and all relations can be obtained through one-time query, so that the relation query access resource request amount is reduced.
Fig. 3 is a block diagram illustrating an information query device according to an example embodiment. Referring to fig. 3, may include:
a request receiving module 301 configured to receive a query request, where the query request includes identification information of a first object and a second object;
an information arrangement module 302 configured to arrange the identification information of the first object and the identification information of the second object to obtain a target object identification pair;
an information query module 303, configured to query, according to a correspondence between a pre-stored object identifier pair and state information, to obtain target state information corresponding to the target object identifier pair, where the object identifier pair is formed by arranging identifier information of two objects, and the state information includes a relationship attribute between the two objects and an attribute value of the relationship attribute;
an information output module 304 configured to output the target state information.
In an optional implementation manner, the state information is a binary sequence including a plurality of storage bits, each of the storage bits corresponds to a different relationship attribute, and a value of each of the storage bits is an attribute value of the corresponding relationship attribute.
In an optional implementation manner, the query request further includes a first operation request, and the apparatus further includes:
a condition query module configured to query condition state information and a preset condition corresponding to relationship information included in the first operation request, wherein the condition state information is a binary sequence including a plurality of binary bits, the number of the binary bits is the same as the number of bits of storage bits in the state information, and the condition state information and the preset condition are used for judging whether a first operation is executable or not;
a conditional operation module configured to perform a bitwise AND operation on the target state information and the conditional state information;
the operation execution module is configured to execute the first operation when an operation result meets the preset condition;
wherein the first operation comprises modifying a relationship between the first object and the second object.
In an optional implementation, the apparatus further includes:
a target determination module configured to determine a target storage bit corresponding to a target relationship attribute in the target state information, where the target relationship attribute is a relationship attribute corresponding to the relationship information included in the first operation request;
an information updating module configured to modify the value of the target storage bit according to the first operation to obtain updated state information;
and the information storage module is configured to store the updated state information.
In an alternative implementation, the information ranking module 302 is specifically configured to:
arranging the identification information of the first object and the identification information of the second object according to an ascending order; alternatively, the first and second electrodes may be,
and arranging the identification information of the first object and the identification information of the second object according to a descending order.
In an alternative implementation, the relationship attribute between the first object and the second object includes: whether the first object is associated with the second object in a first association relationship, and whether the second object is associated with the first object in the first association relationship.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a block diagram of one type of electronic device 800 shown in the present disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the information query method described in any embodiment. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the information query method described in any of the embodiments.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the information query method of any of the embodiments is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which comprises readable program code executable by the processor 820 of the device 800 to perform the information query method according to any of the embodiments. Alternatively, the program code may be stored in a storage medium of the apparatus 800, which may be a non-transitory computer readable storage medium, for example, ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
Fig. 5 is a block diagram of one type of electronic device 1900 shown in the present disclosure. For example, the electronic device 1900 may be provided as a server.
Referring to fig. 5, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the information query method of any of the embodiments.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system, such as Windows Server, MacOSXTM, UnixTM, LinuxTM, FreeBSDTM, or the like, stored in memory 1932.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An information query method, the method comprising:
receiving a query request, wherein the query request comprises identification information of a first object and a second object;
arranging the identification information of the first object and the identification information of the second object to obtain a target object identification pair;
according to a corresponding relation between a pre-stored object identification pair and state information, inquiring to obtain target state information corresponding to the target object identification pair, wherein the object identification pair is formed by arranging identification information of two objects, and the state information comprises a relation attribute between the two objects and an attribute value of the relation attribute;
and outputting the target state information.
2. The method of claim 1, wherein the status information is a binary sequence comprising a plurality of storage bits, each of the storage bits corresponding to a different relationship attribute, and a value of each of the storage bits is an attribute value corresponding to the relationship attribute.
3. The information query method of claim 2, wherein the query request further comprises a first operation request, and after the outputting the target state information, further comprises:
querying condition state information and a preset condition corresponding to relationship information contained in the first operation request, wherein the condition state information is a binary sequence containing a plurality of binary bits, the number of the binary bits is the same as the number of the storage bits in the state information, and the condition state information and the preset condition are used for judging whether a first operation is executable or not;
carrying out bitwise AND operation on the target state information and the condition state information;
when the operation result meets the preset condition, executing the first operation;
wherein the first operation comprises modifying a relationship between the first object and the second object.
4. The information query method according to claim 3, wherein after the step of performing the first operation when the operation result meets the preset condition, the method further comprises:
determining a target storage bit corresponding to a target relation attribute in the target state information, wherein the target relation attribute is a relation attribute corresponding to the relation information contained in the first operation request;
modifying the value of the target storage bit according to the first operation to obtain updated state information;
and storing the updated state information.
5. The information query method according to any one of claims 1 to 4, wherein the step of arranging the identification information of the first object and the identification information of the second object includes:
arranging the identification information of the first object and the identification information of the second object according to an ascending order; alternatively, the first and second electrodes may be,
and arranging the identification information of the first object and the identification information of the second object according to a descending order.
6. The information query method according to any one of claims 1 to 4, wherein the relationship attribute between the first object and the second object includes: whether the first object is associated with the second object in a first association relationship, and whether the second object is associated with the first object in the first association relationship.
7. An information query apparatus, comprising:
the device comprises a request receiving module, a query processing module and a query processing module, wherein the request receiving module is configured to receive a query request which comprises identification information of a first object and a second object;
the information arrangement module is configured to arrange the identification information of the first object and the identification information of the second object to obtain a target object identification pair;
the information query module is configured to query and obtain target state information corresponding to a target object identifier pair according to a corresponding relation between the pre-stored object identifier pair and the state information, wherein the object identifier pair is formed by arranging identification information of two objects, and the state information comprises a relation attribute between the two objects and an attribute value of the relation attribute;
an information output module configured to output the target state information.
8. The information query device of claim 7, wherein the status information is a binary sequence comprising a plurality of storage bits, each of the storage bits corresponding to a different relationship attribute, and a value of each of the storage bits is an attribute value corresponding to the relationship attribute.
9. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the information query method of any one of claims 1 to 6.
10. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the information query method of any one of claims 1 to 6.
CN202010957893.4A 2020-09-11 2020-09-11 Information query method, device, electronic equipment and storage medium Active CN112182027B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010957893.4A CN112182027B (en) 2020-09-11 2020-09-11 Information query method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010957893.4A CN112182027B (en) 2020-09-11 2020-09-11 Information query method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112182027A true CN112182027A (en) 2021-01-05
CN112182027B CN112182027B (en) 2024-03-01

Family

ID=73921845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010957893.4A Active CN112182027B (en) 2020-09-11 2020-09-11 Information query method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112182027B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130058113A (en) * 2011-11-25 2013-06-04 엘지전자 주식회사 A method for transmitting contents, an apparatus using it and contents transmitting system
US20150379478A1 (en) * 2014-06-29 2015-12-31 Avaya Inc. Systems and Methods For Presenting Information Extracted From One or More Data Sources to Event Participants
CN106470150A (en) * 2015-08-21 2017-03-01 腾讯科技(深圳)有限公司 Relation chain storage method and device
CN108984723A (en) * 2018-07-10 2018-12-11 阿里巴巴集团控股有限公司 Creation index, data query method, apparatus and computer equipment
CN109145201A (en) * 2018-07-26 2019-01-04 百度在线网络技术(北京)有限公司 A kind of approaches to IM based on block chain, device, equipment and storage medium
CN110727720A (en) * 2019-10-21 2020-01-24 腾讯科技(深圳)有限公司 List display and query method and device, storage medium and computer equipment
CN110764847A (en) * 2019-10-09 2020-02-07 北京达佳互联信息技术有限公司 User information processing method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130058113A (en) * 2011-11-25 2013-06-04 엘지전자 주식회사 A method for transmitting contents, an apparatus using it and contents transmitting system
US20150379478A1 (en) * 2014-06-29 2015-12-31 Avaya Inc. Systems and Methods For Presenting Information Extracted From One or More Data Sources to Event Participants
CN106470150A (en) * 2015-08-21 2017-03-01 腾讯科技(深圳)有限公司 Relation chain storage method and device
CN108984723A (en) * 2018-07-10 2018-12-11 阿里巴巴集团控股有限公司 Creation index, data query method, apparatus and computer equipment
CN109145201A (en) * 2018-07-26 2019-01-04 百度在线网络技术(北京)有限公司 A kind of approaches to IM based on block chain, device, equipment and storage medium
CN110764847A (en) * 2019-10-09 2020-02-07 北京达佳互联信息技术有限公司 User information processing method and device, electronic equipment and storage medium
CN110727720A (en) * 2019-10-21 2020-01-24 腾讯科技(深圳)有限公司 List display and query method and device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN112182027B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
EP3188066B1 (en) A method and an apparatus for managing an application
CN107370772B (en) account login method and device and computer readable storage medium
CN109274510B (en) Message processing method, device, client, server and storage medium
CN109521918B (en) Information sharing method and device, electronic equipment and storage medium
CN107094094B (en) Application networking method and device and terminal
CN108495168B (en) Bullet screen information display method and device
CN109063101B (en) Video cover generation method and device
CN112291631A (en) Information acquisition method, device, terminal and storage medium
CN107402767B (en) Method and device for displaying push message
CN106506808B (en) Method and device for prompting communication message
CN106447747B (en) Image processing method and device
CN110690979B (en) Group message processing method, device, server, client and storage medium
EP3190555A1 (en) Method for operating a display device and display
CN109245992B (en) Request processing method and device, electronic equipment and storage medium
CN107885464B (en) Data storage method, device and computer readable storage medium
CN107395724B (en) Network request method and device
CN105873154B (en) Network access method and device
CN112883073B (en) Data screening method, device, equipment, readable storage medium and product
CN109981729B (en) File processing method and device, electronic equipment and computer readable storage medium
CN112182027B (en) Information query method, device, electronic equipment and storage medium
CN110263211B (en) Resource synchronization method and device
CN110457084B (en) Loading method and device
CN109246322B (en) Information processing method and system
CN112102009A (en) Advertisement display method, device, equipment and storage medium
CN107257384B (en) Service state monitoring method and device

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