CN113448981A - Data display method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113448981A
CN113448981A CN202110705853.5A CN202110705853A CN113448981A CN 113448981 A CN113448981 A CN 113448981A CN 202110705853 A CN202110705853 A CN 202110705853A CN 113448981 A CN113448981 A CN 113448981A
Authority
CN
China
Prior art keywords
user
identity
query result
structured query
query statement
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
CN202110705853.5A
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.)
Weikun Shanghai Technology Service Co Ltd
Original Assignee
Weikun Shanghai Technology Service 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 Weikun Shanghai Technology Service Co Ltd filed Critical Weikun Shanghai Technology Service Co Ltd
Priority to CN202110705853.5A priority Critical patent/CN113448981A/en
Publication of CN113448981A publication Critical patent/CN113448981A/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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • 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

Abstract

The application relates to data display and discloses a data display method, a data display device, electronic equipment and a storage medium, wherein the method comprises the following steps: obtaining a plurality of components; generating a target structured query statement according to the plurality of components; acquiring an identity of a first user and an identity of a second user, wherein the data access authority corresponding to the identity of the first user is different from the data access authority corresponding to the identity of the second user; acquiring a first query result according to the target structured query statement and the identity of the first user; acquiring a second query result according to the target structured query statement and the identity of the second user, wherein the first query result and the second query result are partially the same; displaying a first query result on a display interface corresponding to a first user; and displaying the second query result on a display interface corresponding to the second user. By implementing the embodiment of the application, the problem of insufficient data security existing when the visible data of all users are consistent is solved.

Description

Data display method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data display method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of information technology, data security becomes a more and more important issue for various industries. Data security situations currently present three major trends. First, with the rapid development of the big data industry, the possibility of leakage of massive sensitive data is higher due to the high convergence of massive data. Secondly, the harm after data leakage is larger and wider, and the range is wider and wider. Third, the manner and approach of data leakage is diverse. Therefore, under the current development trend, how to improve the security of data access becomes a technical problem to be solved urgently at the current stage.
Disclosure of Invention
The embodiment of the application provides a data display method, a data display device, electronic equipment and a storage medium, and can avoid the problem of insufficient data security when visible data of all users are consistent.
A first aspect of the present application provides a data display method, including:
when the selection operation aiming at a plurality of components is detected on a component selection interface, the plurality of components are obtained and are used for inquiring data;
generating a target structured query statement for querying data according to the plurality of components;
acquiring an identity of a first user and an identity of a second user, wherein the data access authority corresponding to the identity of the first user is different from the data access authority corresponding to the identity of the second user;
acquiring a first query result according to the target structured query statement and the identity of the first user;
acquiring a second query result according to the target structured query statement and the identity of the second user, wherein the first query result and the second query result are partially the same;
displaying the first query result on a display interface corresponding to the first user;
and displaying the second query result on a display interface corresponding to the second user.
A second aspect of the present application provides a data display apparatus comprising a first obtaining module, a generating module, a second obtaining module, a third obtaining module, a fourth obtaining module, a first display module and a second display module, wherein,
the first obtaining module is used for obtaining a plurality of components when the selecting operation aiming at the plurality of components is detected on a component selecting interface, and the plurality of components are used for inquiring data;
the generating module is used for generating a target structured query statement for querying data according to the plurality of components;
the second obtaining module is used for obtaining the identity of the first user and the identity of the second user;
the third obtaining module is configured to obtain a first query result according to the target structured query statement and the identity of the first user;
the fourth obtaining module is configured to obtain a second query result according to the target structured query statement and the identity of the second user, where the first query result and the second query result are partially the same;
the first display module is used for displaying the first query result on a display interface corresponding to the first user;
and the second display module is used for displaying the second query result on a display interface corresponding to the second user.
A third aspect of the application provides an electronic device for data display comprising a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and are generated as instructions for execution by the processor to perform steps in any of the methods of a method for data display.
A fourth aspect of the present application provides a computer readable storage medium for storing a computer program for execution by the processor to implement the method of any one of the data display methods.
It can be seen that in the above technical scheme, when a selection operation for a plurality of components for querying data is detected on the component selection interface, the plurality of components for querying data are acquired, so that a plurality of components for querying data are visually selected by a non-developer. In addition, after the plurality of components for querying data are obtained, the target structured query statement can be generated according to the plurality of components for querying data, so that the problem of low efficiency caused by the fact that the target structured query statement needs to be manually input in the prior art is solved. Meanwhile, by acquiring the identity of the first user and the identity of the second user, the data access right corresponding to the identity of the first user is different from the data access right corresponding to the identity of the second user, so that two query results, namely the query results obtained by different users are different according to the same target structured query statement and the identities of different users, and the problem of insufficient data security when the visible data of all the users are consistent is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a schematic diagram of a data display system provided by an embodiment of the present application;
fig. 2 is a schematic flowchart of a data display method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating a further data display method provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a data display device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following are detailed below.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a schematic diagram of a data display system provided in an embodiment of the present application, where the data display system 100 includes a data display device 110. The data display device 110 is used for acquiring and processing a target structured query statement used for querying data, an identity of a first user, an identity of a second user, and the like. The data display system 100 may include an integrated single device or multiple devices, and for convenience of description, the data display device 110 is referred to as an electronic device or a cloud server, which is not limited herein.
The electronic device may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication functions, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and so on.
Optionally, the technical solution related to the embodiment of the present application may also be applied to another data display system, where the data display system may include an electronic device or a cloud server. The data display system may also include a server cluster, which may include a plurality of servers. It is to be appreciated that an electronic device or cloud server can communicate with multiple servers in a server cluster.
Referring to fig. 2, fig. 2 is a schematic flow chart of a data display method according to an embodiment of the present application. The data display method can be applied to an electronic device or a cloud server, and as shown in fig. 2, the method includes:
201. when the selection operation aiming at the components is detected on the component selection interface, the components are obtained and used for inquiring data.
Wherein the plurality of components may include one or more of: a select component, a from component, a where component, a group by component, a having component, a limit component, a table name component of a data table, a function component, etc., without limitation. It is to be understood that the function component, i.e. the component of the encapsulation function, may be an aggregation function component, for example, the aggregation function may be sum, count, avg, max, min, etc., and is not limited herein.
202. A target structured query statement for querying the data is generated from the plurality of components.
Wherein the target structured query statement includes one or more of: identification of the database, identification of the target object, wildcards, operators, etc., without limitation. It will be appreciated that the identification of the target object may be, for example, the identification of a plurality of target fields. The plurality of target fields may be fields in a database.
The wildcard may include, for example: % (instead of one or more characters), - (instead of only one character), [ charlist ] (any single character in the character column), [ ^ charlist ] (any single character not in the character column), or [! charlist ] (any single character not in a character string), without limitation.
Wherein, the operator may include, for example: AND (combining two conditions AND taking value true when both conditions are true), OR (combining two conditions AND taking value true when one of the two conditions is true), AND NOT (used with other operators, the inverse operation).
By way of example, the target structured query statement may be: select from student where score, between 90and 100 (query student table for all information of students with score 90-100). The identifier of the database may be: a student; the identification of the target object may be: the achievement.
Optionally, step 202 may include: acquiring a preset rule, wherein the preset rule comprises an arrangement rule of a plurality of preset components; sequencing the plurality of components according to the arrangement rule of the plurality of preset components to obtain a plurality of sequenced components; and generating a target structured query statement according to the sequenced components.
The preset rules can be configured in a configuration file.
Illustratively, the plurality of preset components may include, for example: the preset rule can be, for example: the select component is located before the from component, the from component is located before the table name component of the data table, and the table name component of the data table is located before the where component.
According to the technical scheme, the multiple components for querying data are obtained when the selection operation aiming at the multiple components is detected on the component selection interface, so that the visual selection of the multiple components for querying data by non-developers is realized. In addition, after the plurality of components for querying data are obtained, the plurality of components for querying data can be sequenced according to a preset rule, so that a target structured query statement can be generated according to the sequenced plurality of components, and the problem of low efficiency caused by the fact that the target structured query statement needs to be manually input in the prior art is solved.
203. And acquiring the identity of the first user and the identity of the second user, wherein the data access authority corresponding to the identity of the first user is different from the data access authority corresponding to the identity of the second user.
The identity of the first user may be, for example, a job number or other identity of the first user, and the identity of the second user may be, for example, a job number or other identity of the second user, which is not limited herein. It will be appreciated that the identity of the first user is different from the identity of the second user.
The data access right corresponding to the identity of the first user is different from the data access right corresponding to the identity of the second user, and can be understood as follows: the data access right corresponding to the identity of the first user is higher or lower than the data access right corresponding to the identity of the second user, which is not limited herein.
204. And acquiring a first query result according to the target structured query statement and the identity of the first user.
Optionally, step 204 may include: writing the target structured query statement into a first message queue; when the number of the structured query statements in the first message queue is the same as the maximum capacity of the first message queue, concurrently acquiring query results corresponding to the structured query statements in the first message queue according to the structured query statements in the first message queue, wherein the query results corresponding to the structured query statements in the first message queue comprise query results corresponding to a target structured query statement; and acquiring a first query result from the query result corresponding to the target structured query statement according to the identity of the first user.
The maximum capacity of the first message queue may be set by an administrator or configured in a configuration file, which is not limited herein.
The first message queue may be a system message queue, and the databases corresponding to the structured query statements in the system message queue are the same database.
It can be seen that, in the above technical solution, by writing the target structured query statement into the first message queue, when the number of structured query statements in the first message queue is the same as the maximum capacity of the first message queue, concurrently obtaining a query result corresponding to the structured query statement in the first message queue according to the structured query statements in the first message queue, and by limiting the number of structured query statements, the problems of an excessive load and an excessive resource occupation caused when a large number of query results are obtained at the same time are avoided. Meanwhile, the efficiency of data query is improved by concurrently acquiring a certain number of query results. In addition, the first query result is obtained from the query result corresponding to the target structured query statement according to the identity of the first user, so that the query result corresponding to the user is obtained according to the identity of the user, and the security of data access is improved.
Optionally, writing the target structured query statement into the first message queue includes: writing the target structured query statement into a second message queue; and when the target structured query statement is the first structured query statement of the second message queue, acquiring the target structured query statement from the second message queue, and writing the target structured query statement into the first message queue.
The second message queue is a user message queue, and the structured query statements in the user message queue are structured query statements corresponding to the same user.
For example, the structured query statement in the second message queue may be a structured query statement corresponding to the first user, or the structured query statement in the second message queue may be a structured query statement corresponding to the second user.
It can be seen that, in the above technical solution, the target structured query statement is written into the second message queue; when the target structured query statement is the first structured query statement of the second message queue, the target structured query statement is obtained from the second message queue and written into the first message queue, namely, the target structured query statement is queued in a double-queue mode and then concurrently queried, so that the problems of overlarge load occupation and overlarge source occupation caused by that resources are not queued in the process of querying a large amount of data by a single system and a single user are avoided, and the efficiency of data query is also improved.
Optionally, concurrently obtaining a query result corresponding to the structured query statement in the first message queue according to the structured query statement in the first message queue, includes: sending a structured query statement in a first message queue to a target server in a server cluster; and receiving a query result corresponding to the structured query statement in the first message queue sent by the target server, wherein the query result corresponding to the structured query statement in the first message queue is a query result obtained by concurrently querying according to the structured query statement in the first message queue by the target server.
The server cluster may include a plurality of servers, and the target server is one or more servers of a plurality of servers (server cluster), which is not limited herein.
Optionally, the query result corresponding to the structured query statement in the first message queue is a query result obtained by concurrently querying by the target server according to the identifier of the database analyzed by the structured query statement in the first message queue and the identifier of the target object.
It can be seen that, in the above technical solution, by sending the structured query statement in the first message queue to the target server in the server cluster, the target server is enabled to query data concurrently with limited quantity, and the problems of excessive load and excessive resource occupation caused by simultaneously obtaining a large number of query results are avoided. Meanwhile, the efficiency of data query is improved by concurrently acquiring a certain number of query results.
Optionally, obtaining the first query result from the query result corresponding to the target structured query statement according to the identity of the first user includes: determining data access authority corresponding to the identity of the first user according to the identity of the first user; determining a field visible to the first user according to the data access authority corresponding to the identity of the first user; and acquiring a first query result from the query result corresponding to the target structured query statement according to the field visible to the first user.
Optionally, the obtaining the first query result from the query result corresponding to the target structured query statement according to the field visible to the first user may include: determining at least one field from the plurality of fields that is the same as the field visible to the first user; and determining at least one query result corresponding to at least one field which is the same as the field visible to the first user as the first query result.
It can be seen that, in the above technical solution, the data access right corresponding to the identity of the first user is determined according to the identity of the first user, so that the field visible to the first user can be determined according to the data access right corresponding to the identity of the first user, and further, the first query result can be obtained from the query result corresponding to the target structured query statement according to the field visible to the first user, so as to obtain the query result corresponding to the data access right, thereby improving the security of data access.
205. And acquiring a second query result according to the target structured query statement and the identity of the second user, wherein the first query result and the second query result are partially the same.
Optionally, in step 205, the first query result may be completely different from the second query result, which is not limited herein.
Optionally, step 205 may include: and acquiring a second query result from the query result corresponding to the target structured query statement according to the identity of the second user.
It can be seen that, in the above technical solution, the second query result is obtained from the query result corresponding to the target structured query statement according to the identity of the second user, so that the query result corresponding to the user is obtained according to the identity of the user, and the security of data access is improved.
Optionally, obtaining a second query result from the query result corresponding to the target structured query statement according to the identity of the second user includes: determining the data access authority corresponding to the identity of the second user according to the identity of the second user; determining a field visible to the second user according to the data access authority corresponding to the identity of the second user; and acquiring a second query result from the query result corresponding to the target structured query statement according to the field visible by the second user.
Optionally, the query result corresponding to the target structured query statement includes a query result corresponding to each field in a plurality of fields, and obtaining a second query result from the query result corresponding to the target structured query statement according to a field visible to a second user may include: determining at least one field from the plurality of fields that is the same as a field visible to the second user; and determining at least one query result corresponding to at least one field which is the same as the field visible by the second user as the second query result.
Optionally, if the data access right corresponding to the identifier of the first user is higher than the data access right corresponding to the identifier of the second user, the query result corresponding to the target structured query statement is partially or completely the same as the first query result, and the query result corresponding to the target structured query statement is partially the same as the second query result, which is not limited herein. It will be appreciated that the number of fields visible to the first user is greater than the number of fields visible to the second user.
For example, the query result and the first query result corresponding to the target structured query statement may each include a name, an age, a gender, a contact address, a family address, and the like, and the second query result may include a name, an age, and a gender.
Optionally, if the data access right corresponding to the identity of the first user is lower than the data access right corresponding to the identity of the second user, the query result corresponding to the target structured query statement is partially the same as the first query result, and the query result corresponding to the target structured query statement is partially or completely the same as the second query result, which is not limited herein. It will be appreciated that the number of fields visible to the first user is less than the number of fields visible to the second user.
For example, the query result and the second query result corresponding to the target structured query statement may each include a name, an age, a gender, a contact address, a family address, and the like, and the first query result may include a name, an age, and a gender.
It can be seen that, in the above technical solution, the data access right corresponding to the identity of the second user is determined according to the identity of the second user, so that the field visible to the second user can be determined according to the data access right corresponding to the identity of the second user, and further, the second query result can be obtained from the query result corresponding to the target structured query statement according to the field visible to the second user, so as to obtain the query result corresponding to the data access right, thereby improving the security of data access.
206. And displaying the first query result on a display interface corresponding to the first user.
207. And displaying the second query result on a display interface corresponding to the second user.
It can be seen that in the above technical scheme, when a selection operation for a plurality of components for querying data is detected on the component selection interface, the plurality of components for querying data are acquired, so that a plurality of components for querying data are visually selected by a non-developer. In addition, after the plurality of components for querying data are obtained, the target structured query statement can be generated according to the plurality of components for querying data, so that the problem of low efficiency caused by the fact that the target structured query statement needs to be manually input in the prior art is solved. Meanwhile, by acquiring the identity of the first user and the identity of the second user, the data access right corresponding to the identity of the first user is different from the data access right corresponding to the identity of the second user, so that two query results, namely the query results obtained by different users are different according to the same target structured query statement and the identities of different users, and the problem of insufficient data security when the visible data of all the users are consistent is solved.
Referring to fig. 3, fig. 3 is a schematic flowchart of another data display method provided in the embodiment of the present application. The data display method can be applied to an electronic device or a cloud server, and as shown in fig. 3, the method includes:
301. when the selection operation aiming at the components is detected on the component selection interface, the components are obtained and used for inquiring data.
Step 301 is the same as step 201 in fig. 2, and is not described herein again.
302. And acquiring a preset rule, wherein the preset rule comprises a configuration rule of a plurality of preset components.
Step 302 may refer to the related description of step 202 in fig. 2, which is not repeated herein.
303. And sequencing the plurality of components according to the arrangement rule of the plurality of preset components to obtain a plurality of sequenced components.
Step 303 may refer to the related description of step 202 in fig. 2, which is not repeated herein.
304. And generating a target structured query statement according to the sequenced components.
Step 304 may refer to the related description of step 202 in fig. 2, which is not repeated herein.
305. And acquiring the identity of the first user and the identity of the second user, wherein the data access authority corresponding to the identity of the first user is different from the data access authority corresponding to the identity of the second user.
Step 305 is the same as step 203 in fig. 2, and is not repeated herein.
306. And acquiring a first query result according to the target structured query statement and the identity of the first user.
Step 306 is the same as step 204 in fig. 2, and is not repeated herein.
307. And acquiring a second query result according to the target structured query statement and the identity of the second user, wherein the first query result and the second query result are partially the same.
Step 307 is the same as step 205 in fig. 2, and is not repeated herein.
308. And displaying the first query result on a display interface corresponding to the first user.
Step 308 is the same as step 206 in fig. 2, and is not described herein again.
309. And displaying the second query result on a display interface corresponding to the second user.
Step 309 is the same as step 207 in fig. 2, and is not described herein again.
It can be seen that in the above technical scheme, when a selection operation for a plurality of components for querying data is detected on the component selection interface, the plurality of components for querying data are acquired, so that a plurality of components for querying data are visually selected by a non-developer. In addition, after the plurality of components for querying data are obtained, the plurality of components for querying data can be sequenced according to a preset rule, so that a target structured query statement can be generated according to the sequenced plurality of components, and the problem of low efficiency caused by the fact that the target structured query statement needs to be manually input in the prior art is solved. Meanwhile, by acquiring the identity of the first user and the identity of the second user, the data access right corresponding to the identity of the first user is different from the data access right corresponding to the identity of the second user, so that two query results, namely the query results obtained by different users are different according to the same target structured query statement and the identities of different users, and the problem of insufficient data security when the visible data of all the users are consistent is solved.
Referring to fig. 4, fig. 4 is a schematic diagram of a data display device according to an embodiment of the present application. As shown in fig. 4, a data display apparatus 500 provided in an embodiment of the present application includes a first obtaining module 401, a generating module 402, a second obtaining module 403, a third obtaining module 404, a fourth obtaining module 405, a first display module 406, and a second display module 407, where,
a first obtaining module 401, configured to obtain a plurality of components when a selection operation for the plurality of components is detected on a component selection interface, where the plurality of components are used to query data; a generation module 402 for generating a target structured query statement for querying data according to a plurality of components; a second obtaining module 403, configured to obtain an identity of the first user and an identity of the second user; a third obtaining module 404, configured to obtain a first query result according to the target structured query statement and the identity of the first user; a fourth obtaining module 405, configured to obtain a second query result according to the target structured query statement and the identity of the second user, where the first query result and the second query result are partially the same; a first display module 406, configured to display a first query result on a display interface corresponding to a first user; the second display module 407 is configured to display the second query result on a display interface corresponding to the second user.
It can be seen that in the above technical scheme, when a selection operation for a plurality of components for querying data is detected on the component selection interface, the plurality of components for querying data are acquired, so that a plurality of components for querying data are visually selected by a non-developer. In addition, after the plurality of components for querying data are obtained, the target structured query statement can be generated according to the plurality of components for querying data, so that the problem of low efficiency caused by the fact that the target structured query statement needs to be manually input in the prior art is solved. Meanwhile, by acquiring the identity of the first user and the identity of the second user, the data access right corresponding to the identity of the first user is different from the data access right corresponding to the identity of the second user, so that two query results, namely the query results obtained by different users are different according to the same target structured query statement and the identities of different users, and the problem of insufficient data security when the visible data of all the users are consistent is solved.
Optionally, when generating a target structured query statement for querying data according to a plurality of components, the generating module 402 is configured to obtain a preset rule, where the preset rule includes an arrangement rule of the plurality of preset components; sequencing the plurality of components according to the arrangement rule of the plurality of preset components to obtain a plurality of sequenced components; and generating a target structured query statement according to the sequenced components.
It can be seen that in the above technical scheme, when a selection operation for a plurality of components for querying data is detected on the component selection interface, the plurality of components for querying data are acquired, so that a plurality of components for querying data are visually selected by a non-developer. In addition, after the plurality of components for querying data are obtained, the plurality of components for querying data can be sequenced according to a preset rule, so that a target structured query statement can be generated according to the sequenced plurality of components, and the problem of low efficiency caused by the fact that the target structured query statement needs to be manually input in the prior art is solved.
Optionally, when obtaining the first query result according to the target structured query statement and the identity of the first user, the second obtaining module 403 is configured to obtain the first query result according to the target structured query statement and the identity of the first user
Writing the target structured query statement into a first message queue; when the number of the structured query sentences in the first message queue is the same as the length of the first message queue, concurrently acquiring query results corresponding to the structured query sentences in the first message queue according to the structured query sentences in the first message queue, wherein the query results corresponding to the structured query sentences in the first message queue comprise query results corresponding to a target structured query sentence; and acquiring a first query result from the query result corresponding to the target structured query statement according to the identity of the first user.
It can be seen that, in the above technical solution, by writing the target structured query statement into the first message queue, when the number of the structured query statements in the first message queue is the same as the length of the first message queue, concurrently obtaining the query result corresponding to the structured query statement in the first message queue according to the structured query statements in the first message queue, and by limiting the number of the structured query statements, the problems of an excessive load and an excessive resource occupation caused when a large number of query results are obtained at the same time are avoided. Meanwhile, the efficiency of data query is improved by concurrently acquiring a certain number of query results. In addition, the first query result is obtained from the query result corresponding to the target structured query statement according to the identity of the first user, so that the query result corresponding to the user is obtained according to the identity of the user, and the security of data access is improved.
Optionally, the second obtaining module 403 is configured to, when the target structured query statement is written into the first message queue, obtain the target structured query statement from the first message queue
Writing the target structured query statement into a second message queue; and when the target structured query statement is the first structured query statement of the second message queue, acquiring the target structured query statement from the second message queue, and writing the target structured query statement into the first message queue.
It can be seen that, in the above technical solution, the target structured query statement is written into the second message queue; when the target structured query statement is the first structured query statement of the second message queue, the target structured query statement is obtained from the second message queue and written into the first message queue, namely, the target structured query statement is queued in a double-queue mode and then concurrently queried, so that the problems of overlarge load occupation and overlarge source occupation caused by that resources are not queued in the process of querying a large amount of data by a single system and a single user are avoided, and the efficiency of data query is also improved.
Optionally, when concurrently acquiring a query result corresponding to the structured query statement in the first message queue according to the structured query statement in the first message queue, the second acquiring module 403 is configured to acquire the query result corresponding to the structured query statement in the first message queue, where the query result corresponds to the structured query statement in the first message queue
Sending a structured query statement in a first message queue to a target server in a server cluster; and receiving a query result corresponding to the structured query statement in the first message queue sent by the target server, wherein the query result corresponding to the structured query statement in the first message queue is a query result obtained by concurrently querying according to the structured query statement in the first message queue by the target server.
It can be seen that, in the above technical solution, by sending the structured query statement in the first message queue to the target server in the server cluster, the target server is enabled to query data concurrently with limited quantity, and the problems of excessive load and excessive resource occupation caused by simultaneously obtaining a large number of query results are avoided. Meanwhile, the efficiency of data query is improved by concurrently acquiring a certain number of query results.
Optionally, when the first query result is obtained from the query result corresponding to the target structured query statement according to the identity of the first user, the second obtaining module 403 is configured to obtain the first query result from the query result corresponding to the target structured query statement
Determining data access authority corresponding to the identity of the first user according to the identity of the first user; determining a field visible to the first user according to the data access authority corresponding to the identity of the first user; and acquiring a first query result from the query result corresponding to the target structured query statement according to the field visible to the first user.
It can be seen that, in the above technical solution, the access right of the first user is determined according to the identity of the first user, so that the field visible to the first user can be determined according to the access right of the first user, and further, the first query result can be obtained from the query result corresponding to the target structured query statement according to the field visible to the first user, so as to obtain the query result corresponding to the data access right of the first query result, thereby improving the security of data access.
Optionally, if the data access right corresponding to the identifier of the first user is higher than the data access right corresponding to the identifier of the second user, the query result corresponding to the target structured query statement is partially or completely the same as the first query result, and the query result corresponding to the target structured query statement is partially the same as the second query result.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application.
Embodiments of the present application provide an electronic device for data display, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor to perform instructions comprising steps in any of the data display methods. As shown in fig. 5, an electronic device of a hardware operating environment according to an embodiment of the present application may include:
a processor 501, such as a CPU.
The memory 502 may alternatively be a high speed RAM memory or a stable memory such as a disk memory.
A communication interface 503 for implementing connection communication between the processor 501 and the memory 502.
Those skilled in the art will appreciate that the configuration of the electronic device shown in fig. 5 is not intended to be limiting and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 5, the memory 502 may include an operating system, a network communication module, and one or more programs. An operating system is a program that manages and controls the server hardware and software resources, supporting the execution of one or more programs. The network communication module is used for communication among the components in the memory 502 and with other hardware and software in the electronic device.
In the electronic device shown in fig. 5, the processor 501 is configured to execute one or more programs in the memory 502, and to implement the following steps:
when the selection operation aiming at the components is detected on the component selection interface, acquiring the components, wherein the components are used for inquiring data; generating a target structured query statement for querying data according to the plurality of components; acquiring an identity of a first user and an identity of a second user, wherein the data access authority corresponding to the identity of the first user is different from the data access authority corresponding to the identity of the second user; acquiring a first query result according to the target structured query statement and the identity of the first user; acquiring a second query result according to the target structured query statement and the identity of the second user, wherein the first query result and the second query result are partially the same; displaying a first query result on a display interface corresponding to a first user; and displaying the second query result on a display interface corresponding to the second user.
For specific implementation of the electronic device related to the present application, reference may be made to various embodiments of the data display method, which are not described herein again.
The present application also provides a computer readable storage medium for storing a computer program, the stored computer program being executable by a processor to perform the steps of:
when the selection operation aiming at the components is detected on the component selection interface, acquiring the components, wherein the components are used for inquiring data; generating a target structured query statement for querying data according to the plurality of components; acquiring an identity of a first user and an identity of a second user, wherein the data access authority corresponding to the identity of the first user is different from the data access authority corresponding to the identity of the second user; acquiring a first query result according to the target structured query statement and the identity of the first user; acquiring a second query result according to the target structured query statement and the identity of the second user, wherein the first query result and the second query result are partially the same; displaying a first query result on a display interface corresponding to a first user; and displaying the second query result on a display interface corresponding to the second user.
For specific implementation of the computer-readable storage medium related to the present application, reference may be made to the embodiments of the data display method, which are not described herein again.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required in the present application.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method of displaying data, comprising:
when the selection operation aiming at a plurality of components is detected on a component selection interface, the plurality of components are obtained and are used for inquiring data;
generating a target structured query statement for querying data according to the plurality of components;
acquiring an identity of a first user and an identity of a second user, wherein the data access authority corresponding to the identity of the first user is different from the data access authority corresponding to the identity of the second user;
acquiring a first query result according to the target structured query statement and the identity of the first user;
acquiring a second query result according to the target structured query statement and the identity of the second user, wherein the first query result and the second query result are partially the same;
displaying the first query result on a display interface corresponding to the first user;
and displaying the second query result on a display interface corresponding to the second user.
2. The method of claim 1, wherein generating a target structured query statement for querying data from the plurality of components comprises:
acquiring a preset rule, wherein the preset rule comprises an arrangement rule of a plurality of preset components;
sequencing the plurality of components according to the arrangement rule of the plurality of preset components to obtain a plurality of sequenced components;
and generating the target structured query statement according to the sequenced components.
3. The method of claim 1 or 2, wherein obtaining a first query result according to the target structured query statement and the identity of the first user comprises:
writing the target structured query statement into a first message queue;
when the number of the structured query statements in the first message queue is the same as the maximum capacity of the first message queue, concurrently obtaining a query result corresponding to the structured query statements in the first message queue according to the structured query statements in the first message queue, wherein the query result corresponding to the structured query statements in the first message queue comprises a query result corresponding to the target structured query statement;
and acquiring the first query result from the query result corresponding to the target structured query statement according to the identity of the first user.
4. The method of claim 3, wherein writing the target structured query statement to a first message queue comprises:
writing the target structured query statement into a second message queue;
and when the target structured query statement is the first structured query statement of a second message queue, acquiring the target structured query statement from the second message queue, and writing the target structured query statement into the first message queue.
5. The method according to claim 3, wherein the concurrently obtaining the query result corresponding to the structured query statement in the first message queue according to the structured query statement in the first message queue comprises:
sending the structured query statement in the first message queue to a target server in a server cluster;
and receiving a query result corresponding to the structured query statement in the first message queue, which is sent by the target server, wherein the query result corresponding to the structured query statement in the first message queue is a query result obtained by the target server by concurrently querying according to the structured query statement in the first message queue.
6. The method of claim 3, wherein obtaining the first query result from the query result corresponding to the target structured query statement according to the identity of the first user comprises:
determining data access authority corresponding to the identity of the first user according to the identity of the first user;
determining a field visible to the first user according to the data access authority corresponding to the identity of the first user;
and acquiring the first query result from the query result corresponding to the target structured query statement according to the field visible to the first user.
7. The method of claim 6,
if the data access right corresponding to the identity of the first user is higher than the data access right corresponding to the identity of the second user, the query result corresponding to the target structured query statement is partially or completely the same as the first query result, and the query result corresponding to the target structured query statement is partially the same as the second query result.
8. A data display device is characterized in that the device comprises a first acquisition module, a generation module, a second acquisition module, a third acquisition module, a fourth acquisition module, a first display module and a second display module, wherein,
the first obtaining module is used for obtaining a plurality of components when the selecting operation aiming at the plurality of components is detected on a component selecting interface, and the plurality of components are used for inquiring data;
the generating module is used for generating a target structured query statement for querying data according to the plurality of components;
the second obtaining module is used for obtaining the identity of the first user and the identity of the second user;
the third obtaining module is configured to obtain a first query result according to the target structured query statement and the identity of the first user;
the fourth obtaining module is configured to obtain a second query result according to the target structured query statement and the identity of the second user, where the first query result and the second query result are partially the same;
the first display module is used for displaying the first query result on a display interface corresponding to the first user;
and the second display module is used for displaying the second query result on a display interface corresponding to the second user.
9. An electronic device for data display, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are generated as instructions for execution by the processor to perform the steps of the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, which is executed by the processor, to implement the method of any of claims 1-7.
CN202110705853.5A 2021-06-24 2021-06-24 Data display method and device, electronic equipment and storage medium Pending CN113448981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110705853.5A CN113448981A (en) 2021-06-24 2021-06-24 Data display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110705853.5A CN113448981A (en) 2021-06-24 2021-06-24 Data display method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113448981A true CN113448981A (en) 2021-09-28

Family

ID=77812580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110705853.5A Pending CN113448981A (en) 2021-06-24 2021-06-24 Data display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113448981A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117648718A (en) * 2024-01-30 2024-03-05 北京衡石科技有限公司 Business object display method and device based on data source, electronic equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117648718A (en) * 2024-01-30 2024-03-05 北京衡石科技有限公司 Business object display method and device based on data source, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN108881396B (en) Network data loading method, device, equipment and computer storage medium
CN109829287A (en) Api interface permission access method, equipment, storage medium and device
CN107239701B (en) Method and device for identifying malicious website
CN111163072B (en) Method and device for determining characteristic value in machine learning model and electronic equipment
CN110795756A (en) Data desensitization method and device, computer equipment and computer readable storage medium
CN110471848B (en) Method and device for dynamically returning message
CN108038135A (en) Electronic device, the method for multilist correlation inquiry and storage medium
CN114095567A (en) Data access request processing method and device, computer equipment and medium
CN111586695A (en) Short message identification method and related equipment
CN113448981A (en) Data display method and device, electronic equipment and storage medium
CN113761565B (en) Data desensitization method and device
CN111885184A (en) Method and device for processing hot spot access keywords in high concurrency scene
CN110515979B (en) Data query method, device, equipment and storage medium
CN110933070A (en) User identification method, system, equipment and computer readable storage medium
CN110929131A (en) Data export method, device, equipment and storage medium
CN110674383A (en) Public opinion query method, device and equipment
CN111752964A (en) Data processing method and device based on data interface
CN114124883B (en) Data access method and device based on cloud storage address, computer equipment and medium
CN114489603A (en) Code generation method, apparatus, electronic device, medium, and product
CN112698879A (en) Method and device for loading source file
US11423109B2 (en) Information processing method, server and computer program product
CN111125548A (en) Public opinion supervision method and device, electronic equipment and storage medium
CN111228815A (en) Method, apparatus, storage medium, and system for processing configuration table of game
CN112417324A (en) Chrome-based URL (Uniform resource locator) interception method and device and computer equipment
CN116861455B (en) Event data processing method, system, electronic device and storage medium

Legal Events

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