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

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

Info

Publication number
CN112182027B
CN112182027B CN202010957893.4A CN202010957893A CN112182027B CN 112182027 B CN112182027 B CN 112182027B CN 202010957893 A CN202010957893 A CN 202010957893A CN 112182027 B CN112182027 B CN 112182027B
Authority
CN
China
Prior art keywords
information
state information
target
relation
identification
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.)
Active
Application number
CN202010957893.4A
Other languages
Chinese (zh)
Other versions
CN112182027A (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

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

Abstract

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

Description

Information query method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to an information query method, an information query device, electronic equipment and a storage medium.
Background
At present, pets in a living room introduce a social relationship state, and a host can pay attention to operations such as opponents, black-drawing opponents and the like between two pets. In the present storage manner, each relationship between pets is stored separately, for example, whether pet a pays attention to pet B, whether pet a draws black pet B, whether pet B pays attention to pet a, and whether pet B draws black pet a are stored separately.
The current storage mode has low query efficiency when the relationship between the pet pairs needs to be queried. For example, when pet a is operating to pay attention to pet B, it is necessary to inquire whether pet a is pulling black pet B, whether pet B is pulling black pet a, and whether pet a is paying attention to pet B, respectively. When checking whether pet a and pet B have a friend relationship, it is necessary to inquire whether pet a has focused on pet B and whether pet B has focused on pet a, respectively.
Disclosure of Invention
The disclosure provides an information query method, an information query device, electronic equipment and a storage medium, so as to at least solve the problem of low information query efficiency in the related technology. The technical scheme of the present 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;
inquiring to obtain target state information corresponding to a target object identification pair according to a corresponding relation between the pre-stored object identification pair and the state information, wherein the object identification pair is formed by arranging identification information of two objects, and the state information comprises relation attributes between the two objects and attribute values of the relation attributes;
and outputting the target state information.
In an alternative implementation manner, the state information is a binary sequence including a plurality of storage bits, each storage bit corresponds to a different relationship attribute, and the value of each storage bit is an attribute value of the corresponding relationship attribute.
In an alternative implementation, the query request further includes a first operation request, and after the outputting the target state information, further includes:
inquiring condition state information and preset conditions corresponding to relation 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 bits of the binary bits is the same as that of bits stored in the state information, and the condition state information and the preset conditions are used for judging whether the first operation can be executed or not;
performing bitwise and operation on the target state information and the condition state information;
when the operation result accords with the preset condition, executing the first operation;
wherein the first operation includes 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 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 in ascending order; or,
and arranging the identification information of the first object and the identification information of the second object in descending order.
In an alternative implementation, the relationship attribute between the first object and the second object includes: whether the first object associates with the second object in a first association relationship, and whether the second object associates with the first object in the first association relationship.
According to a second aspect of the present disclosure, there is provided an information inquiry apparatus, the apparatus including:
the request receiving module is configured to receive a query request, wherein the query request 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 inquiry module is configured to inquire and obtain target state information corresponding to a target object identification pair according to a corresponding relation between the pre-stored object identification pair and the state information, wherein the object identification pair is formed by arranging identification information of two objects, and the state information comprises relation attributes between the two objects and attribute values of the relation attributes;
and an information output module configured to output the target state information.
In an alternative implementation manner, the state information is a binary sequence including a plurality of storage bits, each storage bit corresponds to a different relationship attribute, and the value of each storage bit is an attribute value of the corresponding relationship attribute.
In an alternative implementation, the query request further includes a first operation request, and the apparatus further includes:
the condition query module is configured to query condition state information and preset conditions corresponding to relation 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 bits of the binary bits is the same as that of bits stored in the state information, and the condition state information and the preset conditions are used for judging whether the first operation is executable or not;
a condition operation module configured to bitwise and operate the target state information and the condition state information;
the operation execution module is configured to execute the first operation when the operation result meets the preset condition;
wherein the first operation includes modifying a relationship between the first object and the second object.
In an alternative implementation, the apparatus further includes:
the target determining module is configured to determine 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 relation information contained in the first operation request;
the information updating module is 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 arrangement module is specifically configured to:
arranging the identification information of the first object and the identification information of the second object in ascending order; or,
and arranging the identification information of the first object and the identification information of the second object in descending order.
In an alternative implementation, the relationship attribute between the first object and the second object includes: whether the first object associates with the second object in a first association relationship, and whether the second object associates with the first object in the first association relationship.
According to a third aspect of the present disclosure, there is provided an electronic device 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 according to the first aspect.
According to a fourth aspect of the present disclosure, there is provided a storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the information query method as described in the first aspect.
According to a fifth aspect of the present disclosure, there is provided a computer program product, which when executed by a processor of an electronic device, causes the electronic device to perform the information query method as described in 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 firstly, and the query request comprises identification information of a first object and a second object; then, the identification information of the first object and the identification information of the second object are arranged to obtain a target object identification pair; inquiring to obtain target state information corresponding to the target object identification pair according to the corresponding relation between the pre-stored object identification pair and the state information, wherein the object identification pair is formed by arranging identification information of two objects, and the state information comprises relation attributes between the two objects and attribute values of the relation attributes; 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 pre-stored object identification pair and the state information, and the obtained target state information comprises all the relations between the two objects, namely, the scheme can obtain all the relations between the two objects through one-time inquiry, and compared with a mode that each relation is independently stored, the scheme can effectively save storage space, reduce the relation inquiry access resource request quantity 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 disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is a flowchart illustrating a method of querying information according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating one implementation of a first operation, according to an example embodiment.
Fig. 3 is a block diagram illustrating a structure of an information query apparatus according to an exemplary embodiment.
Fig. 4 is a block diagram of an electronic device, according to an example embodiment.
Fig. 5 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of 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 foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart illustrating a method of querying information, as shown in fig. 1, according to an exemplary embodiment, which may include the following steps.
In step S11, a query request is received, where the query request includes identification information of a first object and a second object.
The execution body 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, e.g., the first object is pet 101 and the second object is 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 descending order to obtain the 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 order) to represent the target object identification pair (e.g., pet pair), i.e., <101, 102> may represent the target object identification pair composed of pet 101 and pet 102.
In step S13, according to the correspondence between the pre-stored object identifier pair and the state information, the target state information corresponding to the target object identifier pair is obtained by querying, the object identifier pair is formed by arranging the identifier information of the two objects, and the state information includes the relationship attribute between the two objects and the attribute value of the relationship attribute.
Wherein, 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 associates with the second object in the first association relationship, and whether the second object associates with the first object in the first association relationship.
The first association relationship may be a concern relationship, a blackout relationship, a comment relationship, or the like. When the first association relationship is a concern relationship, the relationship attribute between the first object and the second object includes: whether the first object is focused on the second object and whether the second object is focused on the first object. When the first association relationship is a blackout relationship, the relationship attribute between the first object and the second object includes: whether the first object blackens the second object and whether the second object blackens the first object.
In a specific implementation, the state information may be a binary sequence including a plurality of storage bits, where 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 application, the number of storage bits of the binary sequence may be first determined according to the relationship attribute type between the two objects, and the number of storage bits may be greater than or equal to the relationship attribute type between the two objects. For example, when there are 4 relationship attributes between an object identification pair contained two objects, the state information may be a binary sequence containing 4 or more bits; when there are 5 relationship attributes between two objects contained in an object identification pair, state information between the two objects can be stored in one byte, namely 8-bit binary numbers, wherein 5 bits store attribute values of the 5 relationship attributes, and redundant 3 bits support expansion.
By determining the number of storage bits of the binary sequence representing the state information, the storage bits corresponding to each relationship attribute can be determined in advance according to the relationship attribute between the two objects to be stored.
For pet pair <101, 102>, the relationship attributes between pet 101 and pet 102 include the following 4 types: whether the pet 101 is concerned with the pet 102, whether the pet 102 is concerned with the pet 101, whether the pet 101 is a black pet 102, and whether the pet 102 is a black pet 101, so that the state information between the two can be represented by a binary sequence containing 4 storage bits. Further, bit 0 in the contracted binary sequence may indicate 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 is paying attention to the former, that is, whether the pet 102 is paying attention to the pet 101, the 2 nd bit indicates whether the former is blackened, that is, whether the pet 101 is blackened, and the 3 rd bit indicates whether the latter is blackened, that is, whether the pet 102 is blackened.
In practical application, when the pet status information query is performed according to the operation requirement of the user, the corresponding target pet pair <101, 102> may be determined according to the identification information of the pet 101 and the pet 102, and the corresponding target status information of the target pet pair may be queried to obtain status information indicating all the relationships of the pet pair, for example 00000001, according to the above convention, the 0 th bit indicates whether the former focuses on the latter, that is, whether the pet 101 focuses on the pet 102, and according to the status information, the attribute value of the relationship attribute is 1, which indicates that the pet 101 focuses on the pet 102.
In terms of storage, the embodiment stores all relationship attributes and attribute values between two objects into one binary sequence, namely, all relationships between the two objects can be represented by only storing one binary sequence, and compared with a mode that each relationship attribute is independently stored, the scheme can effectively save storage space. In terms of information query, the embodiment queries the target state information according to the identification information of the two objects, and because the target state information contains all relationship attributes and corresponding attribute values between the two objects, namely, the scheme can obtain all relationships between the two objects through one-time query, thereby reducing the request quantity of relationship query access resources and improving the information query efficiency.
In step S14, target state information is output.
In practical application, the output target state information can be used for verifying whether the operation of the user is legal or not, or is sent to the user terminal to be displayed correspondingly on the terminal interface.
According to the information query method provided by the embodiment, according to the corresponding relation between the pre-stored object identification pair and the state information, all relation attributes and corresponding attribute values between two objects can be obtained through one-time query, and compared with a mode that each relation attribute is independently stored, the storage space can be effectively saved, the request quantity of relation query access resources is reduced, and the information query efficiency is improved.
In an optional implementation manner of this embodiment, the query request further includes a first operation request, referring to fig. 2, and after step S14, the method may further include:
step S21, inquiring condition state information and preset conditions corresponding to relation information contained in the first operation request, wherein the condition state information is a binary sequence containing a plurality of binary bits, the bit number of the binary bits is the same as the bit number of the storage bits in the state information, and the condition state information and the preset conditions are used for judging whether the first operation can be executed.
The condition state information and the preset condition are used for judging whether the first operation is legal or not.
Step S22, carrying out bitwise AND operation on the target state information and the condition state information.
In a specific implementation, the binary phase corresponding to the positions of the target state information and the condition state information is phase-locked.
Step S23, executing a first operation when the operation result meets the preset condition; wherein the first operation includes 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, the first operation is legal, and the first operation can be executed.
For example, a binary sequence containing 4 storage bits is used to represent the state information of a pet pair such as <101, 102> and it is agreed that bit 0 indicates whether the former is focused on the latter, bit 1 indicates whether the latter is focused on the former, bit 2 indicates whether the former is blackened, and bit 3 indicates whether the latter is blackened.
When the first operation request is that the pet 101 requests attention to the pet 102, the server may query 1101 for condition state information corresponding to relationship information (the former request requests attention to the latter) included in the first operation request, 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, the bitwise and operation result of the target state information and the conditional state information accords with a preset condition, the first operation of the pet 101 concerning the pet 102 may be performed, otherwise, the first operation is not allowed.
When the first operation request is a request to check the friend list of the pet 101, whether the pet 101 and the pet 102 have a friend relationship needs to be checked, it may be determined that condition state information corresponding to relationship information (friend relationship) included in the first operation request is 0011, a preset condition is 0011, it is assumed that target state information of the query pet pair <101, 102> is N, if 0011 +=0011, it indicates that the bit and the operation result of the target state information and the condition state information meet the preset condition, the pet 101 and the pet 102 have 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 pre-stored relationship attribute corresponding to the relationship information included in the first operation request also needs to be modified, and in an optional implementation manner, after step S23, the method may further include:
step S24, 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 relation information contained 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 is 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 (the value of the target storage bit) of the target relationship attribute is, for example, 0.
Step S25, according to the first operation, modifying the value of the target storage bit to obtain updated state information.
In a specific implementation, after the first operation is performed (pet 101 is focused on pet 102), the attribute value of the target relationship attribute may be modified to 1, i.e., the value of bit 0 (target storage bit) in the binary sequence is changed from 0 to 1.
Step S26, the updated state information is stored.
In a specific implementation, when a write operation is performed, a corresponding storage bit in the written state information is updated. For example, assuming that the first operation is that the pet 102 is focusing on the pet 101, the first bit in the existing bit storage information (target state information) 0000001 of <101, 102> needs to be updated, that is, updated to 00000011, which means that the pet 102 is also focusing on the pet 101, and the pet 102 has been focused on the pet 102 in combination with the current state, it may be determined that the pet pair <101, 102> is in a friend relationship (mutual focusing on, that is, being a friend).
The embodiment of the application provides a technical scheme based on a plurality of different relations between record objects stored according to the position, improves the storage level aiming at the problems existing in the existing scheme, effectively saves the storage space compared with a mode of independently storing each relation of a pet pair in the existing scheme, and can acquire all the relations through one-time inquiry, so that the request quantity of relation inquiry access resources is reduced.
Fig. 3 is a block diagram of an information query apparatus according to an exemplary 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 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;
the information query module 303 is configured to query and obtain target state information corresponding to a target object identification pair according to a corresponding relation between the pre-stored object identification pair and the state information, 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;
an information output module 304 configured to output the target state information.
In an alternative implementation manner, the state information is a binary sequence including a plurality of storage bits, each storage bit corresponds to a different relationship attribute, and the value of each storage bit is an attribute value of the corresponding relationship attribute.
In an alternative implementation, the query request further includes a first operation request, and the apparatus further includes:
the condition query module is configured to query condition state information and preset conditions corresponding to relation 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 bits of the binary bits is the same as that of bits stored in the state information, and the condition state information and the preset conditions are used for judging whether the first operation is executable or not;
a condition operation module configured to bitwise and operate the target state information and the condition state information;
the operation execution module is configured to execute the first operation when the operation result meets the preset condition;
wherein the first operation includes modifying a relationship between the first object and the second object.
In an alternative implementation, the apparatus further includes:
the target determining module is configured to determine 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 relation information contained in the first operation request;
the information updating module is 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 in ascending order; or,
and arranging the identification information of the first object and the identification information of the second object in descending order.
In an alternative implementation, the relationship attribute between the first object and the second object includes: whether the first object associates with the second object in a first association relationship, and whether the second object associates with the first object in the first association relationship.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 4 is a block diagram of an electronic device 800 shown in the present disclosure. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 4, the 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. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the information query method described in any of the embodiments. Further, the processing component 802 can include one or more modules that facilitate interactions 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 operations 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 nonvolatile 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 disk.
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 sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and the user that provides an output interface. 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 input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational 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 focal length and optical zoom capabilities.
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 be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further 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 a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the electronic device 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of a user's contact with the electronic device 800, an orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects 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 gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices, either wired or wireless. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, an operator network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one 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, microcontrollers, microprocessors, or other electronic elements for executing the information query method described in any embodiment.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of electronic device 800 to perform the information query method of any of the embodiments. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer program product is also provided, comprising readable program code executable by the processor 820 of the apparatus 800 to perform the information query method of any of the embodiments. Alternatively, the program code may be stored in a storage medium of apparatus 800, which may be a non-transitory computer readable storage medium, such as ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 5 is a block diagram of an electronic device 1900 shown in the present disclosure. For example, electronic device 1900 may be provided as a server.
Referring to FIG. 5, electronic device 1900 includes a processing component 1922 that further includes one or more processors and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by processing component 1922. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. Further, 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 stored in memory 1932, such as WindowsServerTM, macOSXTM, unixTM, linuxTM, freeBSDTM or the like.
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 adaptations, uses, or adaptations of the disclosure following the general 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

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;
inquiring to obtain target state information corresponding to a target object identification pair according to a corresponding relation between the pre-stored object identification pair and state information, wherein the object identification pair is formed by arranging identification information of two objects, the state information comprises relation attributes between the two objects and attribute values of the relation attributes, the state information is a binary sequence comprising a plurality of storage bits, each storage bit corresponds to different relation attributes, and the value of each storage bit is an attribute value of the corresponding relation attribute;
and outputting the target state information.
2. The information query method of claim 1, wherein the query request further comprises a first operation request, and after the outputting the target state information, further comprising:
inquiring condition state information and preset conditions corresponding to relation 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 bits of the binary bits is the same as that of bits stored in the state information, and the condition state information and the preset conditions are used for judging whether the first operation can be executed or not;
performing bitwise and operation on the target state information and the condition state information;
when the operation result accords with the preset condition, executing the first operation;
wherein the first operation includes modifying a relationship between the first object and the second object.
3. The information query method according to claim 2, further comprising, after the step of executing the first operation when the operation result meets the preset condition:
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 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.
4. A method according to any one of claims 1 to 3, 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 in ascending order; or,
and arranging the identification information of the first object and the identification information of the second object in descending order.
5. A method of querying information as in any one of claims 1 to 3, wherein the relationship attribute between the first object and the second object comprises: whether the first object associates with the second object in a first association relationship, and whether the second object associates with the first object in the first association relationship.
6. An information query apparatus, the apparatus comprising:
the request receiving module is configured to receive a query request, wherein the query request 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 inquiry module is configured to inquire and obtain target state information corresponding to a target object identification pair according to a corresponding relation between the pre-stored object identification pair and state information, wherein the object identification pair is formed by arranging identification information of two objects, the state information comprises a relation attribute between the two objects and an attribute value of the relation attribute, the state information is a binary sequence comprising a plurality of storage bits, each storage bit corresponds to different relation attributes, and the value of each storage bit is an attribute value of the corresponding relation attribute;
and an information output module configured to output the target state information.
7. The information query apparatus of claim 6, wherein the query request further comprises a first operation request, the apparatus further comprising:
the condition query module is configured to query condition state information and preset conditions corresponding to relation 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 bits of the binary bits is the same as that of bits stored in the state information, and the condition state information and the preset conditions are used for judging whether the first operation is executable or not;
a condition operation module configured to bitwise and operate the target state information and the condition state information;
the operation execution module is configured to execute the first operation when the operation result meets the preset condition;
wherein the first operation includes modifying a relationship between the first object and the second object.
8. The information query apparatus of claim 7, wherein the apparatus further comprises:
the target determining module is configured to determine 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 relation information contained in the first operation request;
the information updating module is 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.
9. The information query apparatus of any one of claims 6 to 8, wherein the information arrangement module is specifically configured to:
arranging the identification information of the first object and the identification information of the second object in ascending order; or,
and arranging the identification information of the first object and the identification information of the second object in descending order.
10. The information query apparatus of any one of claims 6 to 8, wherein the relationship attribute between the first object and the second object comprises: whether the first object associates with the second object in a first association relationship, and whether the second object associates with the first object in the first association relationship.
11. An electronic device, the electronic device 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 any one of claims 1 to 5.
12. A storage medium, characterized in that 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 5.
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 CN112182027A (en) 2021-01-05
CN112182027B true 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 (6)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10339504B2 (en) * 2014-06-29 2019-07-02 Avaya Inc. Systems and methods for presenting information extracted from one or more data sources to event participants

Patent Citations (6)

* 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
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
CN112182027A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN107370772B (en) account login method and device and computer readable storage medium
CN107423106B (en) Method and apparatus for supporting multi-frame syntax
CN106201734B (en) File sharing method and device
CN104462296B (en) File management method and device and terminal
CN109063101B (en) Video cover generation method and device
CN107608714B (en) Byte alignment method, device and computer readable storage medium
CN107463372B (en) Data-driven page updating method and device
CN105468606B (en) Webpage saving method and device
CN107463419B (en) Application restarting method and device and computer readable storage medium
CN106447747B (en) Image processing method and device
CN106506808B (en) Method and device for prompting communication message
CN107395724B (en) Network request method and device
CN112182027B (en) Information query method, device, electronic equipment and storage medium
CN113778687B (en) Memory allocation information processing method and device, electronic equipment and storage medium
CN112883073B (en) Data screening method, device, equipment, readable storage medium and product
CN112862349B (en) Data processing method, device and equipment based on ABS service data
CN112333233B (en) Event information reporting method and device, electronic equipment and storage medium
CN107257384B (en) Service state monitoring method and device
CN112581102A (en) Task management method and device, electronic equipment and storage medium
CN113191792B (en) Task processing method, device, electronic equipment, storage medium and program product
CN111597106A (en) Point burying management method and device
CN111680248A (en) Method and device for generating batch number of message pushed
CN111241097B (en) Method for processing object, device for processing object and storage medium
CN113157703B (en) Data query method and device, electronic equipment and storage medium
CN110995767B (en) Request processing 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