CN112307264A - Data query method and device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN112307264A
CN112307264A CN202011136962.1A CN202011136962A CN112307264A CN 112307264 A CN112307264 A CN 112307264A CN 202011136962 A CN202011136962 A CN 202011136962A CN 112307264 A CN112307264 A CN 112307264A
Authority
CN
China
Prior art keywords
information
user
piece
user identification
identification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011136962.1A
Other languages
Chinese (zh)
Inventor
顾代辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai 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 Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011136962.1A priority Critical patent/CN112307264A/en
Publication of CN112307264A publication Critical patent/CN112307264A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/81Indexing, e.g. XML tags; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying
    • G06F16/835Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying
    • G06F16/838Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • G06F16/86Mapping to a database

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)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data query method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: by receiving a query request input by a user; responding to the query request, querying a preset database according to at least one piece of label information, and outputting a query result; wherein, the query request carries at least one label information; the preset database includes: the system comprises at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information. Therefore, the user identification information with corresponding characteristics can be quickly retrieved by setting the label information, the characteristic information of each user does not need to be retrieved one by one, the query results such as the user quantity information and/or the user identification information can be obtained, and the data query speed is effectively improved.

Description

Data query method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data query method and apparatus, a storage medium, and an electronic device.
Background
Generally, the mobile phone industry needs to analyze the degree of demands of different user groups for different mobile phone models, service types and functions according to the characteristic information of social attributes, living habits, consumption behaviors and the like of users. At present, tools such as Hive and Spark can be used for counting different feature information of each user one by one, but Hive and Spark are off-line tools and cannot meet the requirement of workers on real-time query of massive user information.
Disclosure of Invention
The embodiment of the application provides a data query method and device, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present application provides a data query method, where the method includes:
receiving a query request input by a user; wherein the query request carries at least one tag information;
responding to the query request, querying a preset database according to the at least one label information, and outputting a query result;
wherein the preset database comprises: at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information.
In a second aspect, an embodiment of the present application provides a data query apparatus, including: the device comprises:
the receiving module is used for receiving a query request input by a user; wherein the query request carries at least one tag information;
the output module is used for responding to the query request, querying a preset database according to the at least one label information and outputting a query result;
wherein the preset database comprises: at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory;
wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
in the embodiment of the application, a query request input by a user is received; responding to the query request, querying a preset database according to at least one piece of label information, and outputting a query result; wherein, the query request carries at least one label information; the preset database includes: the system comprises at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information. Therefore, the user identification information with corresponding characteristics can be quickly retrieved by setting the label information, the characteristic information of each user does not need to be retrieved one by one, the query results such as the user quantity information and/or the user identification information can be obtained, and the data query speed is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic architecture diagram of a data query system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data query method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a data query method according to another embodiment of the present application;
fig. 4 is a schematic flowchart of a data query method according to yet another embodiment of the present application;
fig. 5 is a schematic flowchart of a data query method according to another embodiment of the present application;
fig. 6 is a schematic application diagram of a data query method according to an embodiment of the present application;
fig. 7 is a schematic application diagram of a data query method according to another embodiment of the present application;
FIG. 8 is a schematic structural diagram of a data query device according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a data query device according to another embodiment of the present application;
FIG. 10 is a schematic structural diagram of a data query device according to yet another embodiment of the present application;
fig. 11 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Fig. 1 is an application scenario diagram of a data query method in one embodiment. As shown in fig. 1, the data query system may include: the system comprises an optional user label information display interface 11, a target user label information display interface 12 and a target user number display interface 13. The user tags of the target user cluster to be queried can be selected from the selectable user tag presentation interface 11, the target user tag presentation interface 12 is used for presenting the selected user tags, and the target user number presentation interface 13 is used for presenting the number of users of the selected user tags.
For example, the target user cluster that user a wants to query is: for the minor male population who madly uses the phone in Sichuan province, user A may click to select "age: under 17 years old, sex: male, province: sichuan province, degree of dependence on mobile phone: the "4 tag information" is crazy, and further, the selected target user tag information appears in the target user tag presentation interface 12, and the user number XXX corresponding to the target user tags appears in the target user number presentation interface 13.
In addition, a target user ID list presentation button 14 may be further included in the target user number presentation interface 13. For example, user A may click on the target user ID list presentation button 14 and the system will automatically generate a list of target user IDs with this tag information.
As shown in fig. 2, in one embodiment, a data query method is provided, which may include the following steps:
s201, receiving an inquiry request input by a user.
The query request in the present application may carry at least one tag information. The user can also select one or more pieces of label information to be queried according to the same dimension information, wherein the dimension information is used for representing a plurality of pieces of label information with the same attribute.
For example, the age dimension information in fig. 1 includes: under 17 years old, 18-22 years old, 23-29 years old, over 30 years old, 4 tag information. The user a may select only tag information under 17 years old or may select tag information of two or more ages under 17 years old and 18-22 years old at the same time, as necessary.
S202, responding to the query request, querying a preset database according to at least one piece of label information, and outputting a query result.
The preset database in the embodiment of the present application may include: the system comprises at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information. The query results may include user quantity information and/or user identification information.
From the information in the preset database shown in table 1, it can be observed that: the preset database comprises 4 dimensional information of 'age', 'gender', 'marital status', 'cell phone dependence', wherein the 'age' dimensional information comprises: 4 label information of 'under 17 years old', '18-22 years old', '23-29 years old' and 'over 30 years old'; "gender" dimension information includes: 3 label information of "male", "female", "unknown"; the "marital status" dimension information includes: 3 pieces of tag information of "married", "singles", "unknown"; the dimension information of the 'dependence degree of the mobile phone' comprises: the label information includes 4 label information of "wild", "serious", "general" and "mild", wherein each label information corresponds to respective user ID information. For example, the user ID information corresponding to the tag information "under 17" includes 1,2, and 4.
TABLE 1
Figure BDA0002737030230000041
Figure BDA0002737030230000051
Specifically, embodiments in the present application may abstract multiple tag information into one user representation, and the process of receiving a query request input by a user may be specifically described as: an insight is made into user information having a certain user profile in a pre-set database.
In a specific example, the user a needs to have an insight that the user is represented by the number of users with single males in 18-22 years old who depend on the mobile phone seriously, and accordingly, the data query system can receive the query request input by the user a and carry the following 4 tag information: "18-22 years of age", "male", "single", "severe". Then, in response to the query request of the user a, the data query system queries the user ID information corresponding to the 4 pieces of tag information carried in the query request in the preset database corresponding to table 1, and then outputs a query result: user number information: 1, and/or user identification information: 3.
in the embodiment of the application, a query request input by a user is received; responding to the query request, querying a preset database according to at least one piece of label information, and outputting a query result; wherein, the query request carries at least one label information; the preset database includes: the system comprises at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information. Therefore, the user identification information with corresponding characteristics can be quickly retrieved by setting the label information, the characteristic information of each user does not need to be retrieved one by one, the query results such as the user quantity information and/or the user identification information can be obtained, and the data query speed is effectively improved.
In addition, when new user registration information or new label information exists, the preset database can directly import the new user registration information or the new label information into the corresponding dimension information or establish the new dimension information, and then a new mapping relation is formed, so that the expansion of the label information is facilitated, the storage space is saved, and the operating efficiency of the system is improved.
In some optional embodiments, step S201 may be preceded by step S200: and establishing a preset database corresponding to each service type based on the plurality of service types. For example, for 3 traffic types involved in an X-model handset: browser service, video service, lock screen magazine establish 3 corresponding databases in advance: a browser database, a video database, and a lock screen magazine database.
Further, the label information of the users in each service database can be determined according to the user attribute feature information and the use condition of each service type.
Specifically, it can be observed from the information stored in the browser database shown in table 2 that, in addition to the dimensional information including the basic user attributes: age, gender, and marital status, but also include browser database-specific dimensional information: the page type. Wherein the page types include: news, games, entertainment, and academia 4 pieces of tag information, where the 4 pieces of tag information correspond to the user ID information having the tag, respectively, for example, the user ID information corresponding to the news tag information includes: 4,8,11.
TABLE 2
Figure BDA0002737030230000061
It can be observed from the information stored in the video database shown in table 3 that, in addition to the dimensional information comprising the basic user attributes: age, gender, and marital status, along with dimensional information specific to the video database: the type of play. Wherein, the playing type comprises: the method includes the following steps that 4 pieces of label information of animation, art, movie and television play correspond to user ID information with the label, for example, the user ID information corresponding to the art label information includes: 1,2,3.
TABLE 3
Figure BDA0002737030230000071
As can be observed from the information stored in the lock screen magazine database shown in table 4, in addition to the dimensional information including the basic user attributes: age, gender, and marital status, including dimensional information specific to the lock screen magazine database: lock screen mode and magazine type. Wherein, the lock screen mode includes 2 dynamic and static label information, and the magazine type includes: the tag information of star, landscape, car, and cartoon is 4, and the tag information corresponds to the user ID information with the tag, for example, the user ID information corresponding to the dynamic tag information includes: 4,6,7,8. The user ID information corresponding to the automobile tag information includes: 3,8,11.
TABLE 4
Figure BDA0002737030230000072
Figure BDA0002737030230000081
Therefore, the corresponding databases can be pre-established according to different business types of enterprises, so that the flexibility of data query is improved, workers can be helped to quickly query accurate target user clusters, and the data retrieval capability is effectively improved.
Referring to fig. 3, a schematic flow chart of a data query method is provided in an embodiment of the present application. As shown in fig. 3, the method of the embodiment of the present application may further include the steps of: s301, acquiring an initial table for storing user information of each service type.
Wherein, a service type corresponds to an initial table, and the initial table comprises: the tag information comprises a plurality of user identification information and at least one tag information corresponding to each user identification information.
S302, importing a plurality of user identification information into a preset database.
From the initial table corresponding to the lock screen magazine service shown in table 5, it can be observed that the initial table includes user ID information of 15 users, 5 dimensional information of age, gender, marital status, lock screen mode, magazine type, and tag information of 5 dimensional information corresponding to each user ID information, for example: the user whose user ID information is 1 has the following 5 tag information: 12, male, single body, static, cartoon. The 3-dimensional information of age, gender and marital state can be generated when the user registers, and the screen locking mode and the magazine type can be determined by the use duration and the use frequency of the user within the preset time. Further, the user ID information in table 5 is imported into the lock screen magazine service database.
TABLE 5
Figure BDA0002737030230000082
Figure BDA0002737030230000091
S303, receiving a query request input by a user.
Specifically, S303 is identical to S201, and is not described herein again.
S304, responding to the query request, querying a preset database according to the at least one label information, and outputting a query result.
Specifically, S304 is identical to S202, and is not described herein again.
Referring to fig. 4, a schematic flow chart of a data query method according to an embodiment of the present application is provided. As shown in fig. 4, the method of the embodiment of the present application may further include the following steps:
s401, acquiring an initial table used for storing user information for each service type.
Specifically, S401 is identical to S301, and is not described herein again.
S402, determining the mapping relation between at least one label information corresponding to each user identification information in the initial table and the label information in the preset database.
From the tag information in the lock-screen magazine database shown in table 4 and the tag information in the initial table corresponding to the lock-screen magazine service shown in table 5, the mapping relationship between the tag information in the two tables can be observed. For example, if the user age tag information in table 5 with the user ID information of 1 is 12 (less than 18), it is mapped with the tag information of "18 years old or less" in the age dimension information in table 4, and similarly, the two user age information in table 5 with the user ID information of 2 and 4 are respectively 10 and 13 (less than 18), which are also mapped with the tag information of "18 years old or less" in the age dimension information in table 4.
And S403, determining at least one piece of user identification information corresponding to each piece of label information in the preset database based on the mapping relation.
Further, based on the mapping relationship between the initial table and each tag information in the preset database, the user ID information in the initial table is imported into the user ID information corresponding to each tag information in the preset database. For example, if the tag information in the age dimension information in table 5, in which the user ID information is 1,2, and 4, has a mapping relationship with the tag information "under 18 years" in the lock screen magazine service database shown in table 4, the 3 pieces of user ID information 1,2, and 4 are imported into the user ID information corresponding to the tag information "under 18 years" in table 4.
In a specific example, the initial table may be a Hive table, the preset database may be an ES (distributed full-text retrieval) search frame, an ES-hadoop plugin is added to the ES search frame to establish a mapping relationship between tag information in the Hive table and tag information in the ES search frame, and the user ID information in the Hive table and the tag information corresponding to the user ID information are written into the ES search frame by writing data into the Hive table. In addition, Spark engine can be used as an execution engine to write tag information of massive users into an ES search framework in a large scale. Because the ES search framework can construct the inverted index, namely, the user identification information is queried in the method of searching the tag information in the application, after the construction of the inverted index in the ES search framework is completed, various requirements of the user needing to be insights can be converted into the method of searching the corresponding tag information in the ES search framework in real time to perform data query.
S404, receiving a query request input by a user.
Specifically, S404 is identical to S201, and is not described herein again.
S405, responding to the query request, querying a preset database according to at least one piece of label information, and outputting a query result.
Specifically, S405 is identical to S202, and is not described herein again.
Referring to fig. 5, a schematic flow chart of a data query method according to an embodiment of the present application is provided. As shown in fig. 5, the method of the embodiment of the present application may further include the following steps: s501, acquiring an initial table used for storing user information for each service type.
Specifically, S501 is identical to S301, and is not described herein again.
S502, querying corresponding label information in a preset database according to the at least one label information carried by the query request, and acquiring at least one user identification information corresponding to the at least one label information carried by the query request.
S503, outputting a query result based on at least one user identification information corresponding to at least one tag information carried by the query request.
Specifically, when the query request carries a tag information, the step S502 may specifically include: and outputting the number of users and/or at least one piece of user identification information corresponding to one piece of label information carried by the query request based on at least one piece of user identification information corresponding to one piece of label information carried by the query request.
As shown in the data query system interface of FIG. 6, the query request input by user A only carries the tag information of "more than 30 years old". Wherein, according to the "above 30 years" label information corresponding to the user ID information of "8, 11, 12" shown in table 2, the corresponding output user number 3 on the right side of the data query system interface, and after clicking the "target user ID" button, the user list will pop up and display the user identifier: 8,11,12.
Specifically, when the query request carries a plurality of tag information, the step S502 may specifically include: and performing parallel processing on at least one user identification information corresponding to a plurality of label information in the same dimension information carried by the query request, performing intersection processing on at least one user identification information corresponding to label information in different dimension information, and outputting the user number and/or at least one user identification information corresponding to the plurality of label information carried by the query request.
As shown in the data query system interface of fig. 7, the query request input by the user a carries 5 tag information of "under 18 years old", "male", "single body", "game", "entertainment", wherein the information in table 2 can be determined: the "under 18 years" tag information corresponds to user ID information of "1, 2, 4", "male" tag information corresponds to user ID information of "1, 2,3,4,9,10, 12", "single" tag information corresponds to user ID information of "1, 2,3,4,7,10, 12", "game" tag information corresponds to user ID information of "1, 2,3, 9", "entertainment" tag information corresponds to user ID information of "6, 10, 12", and after the user ID information corresponding to the "game" and "entertainment" tag information in the above 5 tag information is merged to obtain corresponding user ID information, the user ID information is intersected with the user ID information corresponding to tag information in other dimension information, and the specific processing procedure is as follows:
(1,2,4) Cross (1,2,3,4,9,10,12) Cross (1,2,3,4,7,10,12) Cross ((1,2,3,9) and (6,10,12))
No. (1,2,4) cross (1,2,3,4,7,10,12) cross (1,2,3,6,9,10,12)
To (1,2,4) intersection (1,2,3,6,9,10,12)
=(1,2)
The number of users 2 is correspondingly output above the right side of the data query system interface, and a user list is popped up and user identification is displayed after a 'target user ID' button is clicked: 1,2.
Therefore, the embodiment in the application can solve the union of a plurality of label information in the same dimension information and solve the intersection between different dimension information so as to complete the merging and cross query of the label information in any dimension information and the retrieval analysis of the number of target users.
Fig. 8 is a schematic structural diagram of a data query device 80 according to an exemplary embodiment of the present application. The data query device 80 may be disposed in an electronic device such as a terminal device or a server, and execute the positioning method according to any of the embodiments of the present application. As shown in fig. 8, the data query device 80 includes:
a receiving module 810, configured to receive a query request input by a user;
wherein the query request carries at least one tag information;
an output module 820, configured to respond to the query request, query a preset database according to the at least one tag information, and output a query result;
wherein the preset database comprises: at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information.
Optionally, before the receiving module 810, an establishing module 800 is further included, configured to establish a preset database corresponding to each service type based on a plurality of service types.
Optionally, as shown in fig. 9, the establishing module 800 includes:
a first obtaining unit 910, configured to obtain an initial table for storing user information for each service type;
wherein, a service type corresponds to an initial table, the initial table includes: a plurality of user identification information and at least one label information corresponding to each user identification information;
an importing unit 920, configured to import the multiple pieces of user identification information into the preset database.
Optionally, the importing unit 920 is specifically configured to:
determining a mapping relation between at least one piece of label information corresponding to each piece of user identification information in the initial table and the label information in the preset database;
and determining at least one piece of user identification information corresponding to each piece of label information in the preset database based on the mapping relation.
Optionally, as shown in fig. 10, the output module 820 includes:
a second obtaining unit 110, configured to query, according to at least one piece of tag information carried in the query request, corresponding tag information in the preset database, and obtain at least one piece of user identification information corresponding to the at least one piece of tag information carried in the query request;
an output unit 120, configured to output the query result based on at least one piece of user identification information corresponding to at least one piece of tag information carried in the query request; and the query result comprises user number information and/or user identification information.
Optionally, the query request carries a tag information;
the output unit 120 is specifically configured to: and outputting the number of users and/or at least one piece of user identification information corresponding to one piece of label information carried by the query request based on at least one piece of user identification information corresponding to one piece of label information carried by the query request.
Optionally, the query request carries a plurality of tag information;
the output unit 120 is specifically configured to: performing merging and processing on at least one user identification information corresponding to a plurality of label information in the same dimension information carried by the query request, performing intersection processing on at least one user identification information corresponding to label information in different dimension information, and outputting the number of users and/or at least one user identification information corresponding to the plurality of label information carried by the query request; the dimension information is used for representing label information of the same attribute.
It should be noted that, when the data query apparatus provided in the foregoing embodiment executes the data query method, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the data query apparatus and the data query method provided in the above embodiments belong to the same concept, and details of implementation processes thereof are referred to in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Please refer to fig. 11, which is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 11, the electronic device 111 may include: at least one processor 1101, at least one network interface 1104, a user interface 1103, a memory 1105, at least one communication bus 1002.
Wherein a communication bus 1002 is used to enable connective communication between these components.
The user interface 1103 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1103 may also include a standard wired interface and a wireless interface.
The network interface 1104 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Processor 1101 may include one or more processing cores, among other things. The processor 1101 connects various parts throughout the electronic device 111 using various interfaces and lines to perform various functions of the electronic device 111 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1105 and invoking data stored in the memory 1105. Optionally, the processor 1101 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1101 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1101, but may be implemented by a single chip.
The Memory 1105 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1105 includes non-transitory computer-readable storage media. The memory 1105 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1105 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1105 may alternatively be at least one storage device located remotely from the processor 1101. As shown in fig. 11, the memory 1105, which is a type of computer storage medium, may include an operating system, a network communication module, a user interface module, and a data query application program.
In the electronic device 111 shown in fig. 11, the user interface 1103 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1101 may be configured to invoke the data query application stored in the memory 1105, and specifically perform the following operations:
receiving a query request input by a user;
responding to the query request, querying a preset database according to the at least one label information, and outputting a query result.
In a possible embodiment, before the processor 1101 executes the query request received from the user, the method further includes: and establishing a preset database corresponding to each service type based on the plurality of service types.
In a possible embodiment, when the processor 1101 executes the preset database for each service type based on a plurality of service types, specifically:
acquiring an initial table for storing user information of each service type;
and importing the user identification information into the preset database.
In a possible embodiment, the processor 1101 executes querying a preset database according to the at least one tag information, and when outputting a query result, specifically executes:
determining a mapping relation between at least one piece of label information corresponding to each piece of user identification information in the initial table and the label information in the preset database;
and determining at least one piece of user identification information corresponding to each piece of label information in the preset database based on the mapping relation.
In a possible embodiment, when the processor 1101 imports the plurality of user identification information into the preset database, the following steps are specifically performed:
inquiring corresponding label information in the preset database according to at least one label information carried by the inquiry request, and acquiring at least one user identification information corresponding to the at least one label information carried by the inquiry request;
outputting the query result based on at least one user identification information corresponding to at least one tag information carried by the query request
In a possible embodiment, the query request carries a tag information; the processor 1101 executes the at least one piece of user identification information corresponding to the at least one piece of tag information carried in the query request, and when outputting the query result, specifically executes: and outputting the number of users and/or at least one piece of user identification information corresponding to one piece of label information carried by the query request based on at least one piece of user identification information corresponding to one piece of label information carried by the query request.
In one possible embodiment, the query request carries a plurality of tag information; the processor 1101 executes the at least one piece of user identification information corresponding to the at least one piece of tag information carried in the query request, and when outputting the query result, specifically executes: and performing parallel processing on at least one user identification information corresponding to a plurality of label information in the same dimension information carried by the query request, performing intersection processing on at least one user identification information corresponding to label information in different dimension information, and outputting the number of users and/or at least one user identification information corresponding to the plurality of label information carried by the query request.
The embodiment of the application can be implemented by receiving a query request input by a user; responding to the query request, querying a preset database according to at least one piece of label information, and outputting a query result; wherein, the query request carries at least one label information; the preset database includes: the system comprises at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information. Therefore, the user identification information with corresponding characteristics can be quickly retrieved by setting the label information, the characteristic information of each user does not need to be retrieved one by one, the query results such as the user quantity information and/or the user identification information can be obtained, and the data query speed is effectively improved.
Embodiments of the present application also provide a computer-readable storage medium, which stores instructions that, when executed on a computer or a processor, cause the computer or the processor to perform one or more of the steps in the embodiments shown in fig. 2 to 5. The respective constituent modules of the data query apparatus may be stored in the computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. And the aforementioned storage medium includes: various media capable of storing program codes, such as a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk. The technical features in the present examples and embodiments may be arbitrarily combined without conflict.
The above-described embodiments are merely preferred embodiments of the present application, and are not intended to limit the scope of the present application, and various modifications and improvements made to the technical solutions of the present application by those skilled in the art without departing from the design spirit of the present application should fall within the protection scope defined by the claims of the present application.

Claims (10)

1. A method for data query, the method comprising:
receiving a query request input by a user; wherein the query request carries at least one tag information;
responding to the query request, querying a preset database according to the at least one label information, and outputting a query result;
wherein the preset database comprises: at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information.
2. The method of claim 1, wherein prior to receiving the query request input by the user, further comprising: and establishing a preset database corresponding to each service type based on the plurality of service types.
3. The method of claim 2, wherein the establishing a predetermined database of each service type based on a plurality of service types comprises:
acquiring an initial table for storing user information of each service type; wherein, a service type corresponds to an initial table, the initial table includes: a plurality of user identification information and at least one label information corresponding to each user identification information;
and importing the user identification information into the preset database.
4. The method of claim 3, wherein importing the plurality of user identification information into the predetermined database comprises:
determining a mapping relation between at least one piece of label information corresponding to each piece of user identification information in the initial table and the label information in the preset database;
and determining at least one piece of user identification information corresponding to each piece of label information in the preset database based on the mapping relation.
5. The method according to any one of claims 1 to 4, wherein the querying a preset database according to the at least one tag information and outputting a query result comprises:
inquiring corresponding label information in the preset database according to at least one label information carried by the inquiry request, and acquiring at least one user identification information corresponding to the at least one label information carried by the inquiry request;
outputting the query result based on at least one user identification information corresponding to at least one tag information carried by the query request; and the query result comprises user number information and/or user identification information.
6. The method of claim 5, wherein the query request carries a tag information;
the outputting the query result based on at least one user identification information corresponding to at least one tag information carried by the query request includes: and outputting the number of users and/or at least one piece of user identification information corresponding to one piece of label information carried by the query request based on at least one piece of user identification information corresponding to one piece of label information carried by the query request.
7. The method of claim 5, wherein the query request carries a plurality of tag information;
the outputting the query result based on at least one user identification information corresponding to at least one tag information carried by the query request includes: performing merging and processing on at least one user identification information corresponding to a plurality of label information in the same dimension information carried by the query request, performing intersection processing on at least one user identification information corresponding to label information in different dimension information, and outputting the number of users and/or at least one user identification information corresponding to the plurality of label information carried by the query request; the dimension information is used for representing label information of the same attribute.
8. A data query apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving a query request input by a user; wherein the query request carries at least one tag information;
the output module is used for responding to the query request, querying a preset database according to the at least one label information and outputting a query result;
wherein the preset database comprises: at least one piece of label information and at least one piece of user identification information corresponding to the at least one piece of label information.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any of claims 1-7.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps according to any of claims 1-7.
CN202011136962.1A 2020-10-22 2020-10-22 Data query method and device, storage medium and electronic equipment Pending CN112307264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011136962.1A CN112307264A (en) 2020-10-22 2020-10-22 Data query method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011136962.1A CN112307264A (en) 2020-10-22 2020-10-22 Data query method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112307264A true CN112307264A (en) 2021-02-02

Family

ID=74328385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011136962.1A Pending CN112307264A (en) 2020-10-22 2020-10-22 Data query method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112307264A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835938A (en) * 2021-02-23 2021-05-25 百度在线网络技术(北京)有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN113723062A (en) * 2021-08-31 2021-11-30 远光软件股份有限公司 Report label editing method and device, storage medium and terminal equipment
CN115470254A (en) * 2022-09-20 2022-12-13 中国建设银行股份有限公司 Data query method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160275148A1 (en) * 2015-03-20 2016-09-22 Huawei Technologies Co., Ltd. Database query method and device
CN107545039A (en) * 2017-07-31 2018-01-05 腾讯科技(深圳)有限公司 The index acquisition methods and device of keyword, computer equipment and storage medium
CN107704527A (en) * 2017-09-18 2018-02-16 华为技术有限公司 Date storage method, device and storage medium
CN108415978A (en) * 2018-02-09 2018-08-17 北京腾云天下科技有限公司 User tag storage method, user's portrait computational methods and computing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160275148A1 (en) * 2015-03-20 2016-09-22 Huawei Technologies Co., Ltd. Database query method and device
CN107545039A (en) * 2017-07-31 2018-01-05 腾讯科技(深圳)有限公司 The index acquisition methods and device of keyword, computer equipment and storage medium
CN107704527A (en) * 2017-09-18 2018-02-16 华为技术有限公司 Date storage method, device and storage medium
CN108415978A (en) * 2018-02-09 2018-08-17 北京腾云天下科技有限公司 User tag storage method, user's portrait computational methods and computing device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835938A (en) * 2021-02-23 2021-05-25 百度在线网络技术(北京)有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN113723062A (en) * 2021-08-31 2021-11-30 远光软件股份有限公司 Report label editing method and device, storage medium and terminal equipment
CN115470254A (en) * 2022-09-20 2022-12-13 中国建设银行股份有限公司 Data query method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108733713B (en) Data query method and device in data warehouse
CN112307264A (en) Data query method and device, storage medium and electronic equipment
US20200042507A1 (en) Information Processing Method and Apparatus
KR20080028574A (en) Integrated search service system and method
CN107015987B (en) Method and equipment for updating and searching database
US10496645B1 (en) System and method for analysis of a database proxy
CN111814065B (en) Information propagation path analysis method and device, computer equipment and storage medium
CN102929987A (en) Search method and search device based on identifier combination
CN109360106B (en) Sketch construction method, system, medium and computer system
CN108363741B (en) Big data unified interface method, device, equipment and storage medium
CN111435376A (en) Information processing method and system, computer system, and computer-readable storage medium
CN112000911A (en) Page management method and device, electronic equipment and storage medium
CN111382182A (en) Data processing method and device, electronic equipment and storage medium
CN112507218A (en) Business object recommendation method and device, electronic equipment and storage medium
WO2021189195A1 (en) Data querying method and apparatus, server, and storage medium
CN112487018B (en) Method and device for generating list, electronic equipment and computer readable storage medium
CN112100493A (en) Document sorting method, device, equipment and storage medium
CN110728379A (en) Configuration information management method and device, electronic equipment and non-transitory storage medium
CN116028696A (en) Resource information acquisition method and device, electronic equipment and storage medium
CN115481026A (en) Test case generation method and device, computer equipment and storage medium
CN112000669B (en) Environment monitoring data processing method and device, storage medium and terminal
CN113821514A (en) Data splitting method and device, electronic equipment and readable storage medium
CN114297381A (en) Text processing method, device, equipment and storage medium
CN110737662A (en) data analysis method, device, server and computer storage medium
CN112612817A (en) Data processing method and device, terminal equipment and computer readable storage medium

Legal Events

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