CN117076721A - Data query method, device, equipment, medium and product - Google Patents

Data query method, device, equipment, medium and product Download PDF

Info

Publication number
CN117076721A
CN117076721A CN202310808181.XA CN202310808181A CN117076721A CN 117076721 A CN117076721 A CN 117076721A CN 202310808181 A CN202310808181 A CN 202310808181A CN 117076721 A CN117076721 A CN 117076721A
Authority
CN
China
Prior art keywords
data
query
request
identity information
authority
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
CN202310808181.XA
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310808181.XA priority Critical patent/CN117076721A/en
Publication of CN117076721A publication Critical patent/CN117076721A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a data query method, a data query device, computer equipment, a storage medium and a computer program product, which can be used in the technical field of big data. The method comprises the following steps: acquiring at least one data query request, wherein each data query request corresponds to one thread; based on the data query requests, acquiring identity information of a request initiating object corresponding to each data query request, and storing the identity information to a permission information manager; and acquiring target data corresponding to the corresponding data query requests from the database based on the thread information and the identity information corresponding to each data query request. According to the method provided by the application, based on the thread information and the identity information corresponding to each data query request, the target data corresponding to the corresponding data query request is directly obtained from the database, and new business logic is not required to be written at the business logic code, so that the development difficulty and the workload can be effectively reduced.

Description

Data query method, device, equipment, medium and product
Technical Field
The present application relates to the field of big data technology, and in particular, to a data query method, apparatus, computer device, storage medium, and computer program product.
Background
The data authority refers to the authority of different roles or institutional personnel to view different data ranges. The common processing mode at present is to write the logic controlled by the data authority into the service codes together when writing the functional service logic so as to realize the purpose of checking different data in different roles. However, this method requires writing corresponding logic at every function where data authority control is required, which results in a great amount of development effort.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data query method, apparatus, computer device, computer-readable storage medium, and computer program product that can reduce development effort.
In a first aspect, the present application provides a data query method, the method comprising:
acquiring at least one data query request, wherein each data query request corresponds to one thread;
based on the data query requests, acquiring identity information of a request initiation object corresponding to each data query request, and storing the identity information to a permission information manager;
and acquiring target data corresponding to the corresponding data query requests from a database based on the thread information and the identity information corresponding to each data query request.
In one embodiment, before the obtaining at least one data query request, the method includes:
dividing all data stored in the database into attributive data and non-attributive data, wherein the attributive data has inquiry authority limit, and the non-attributive data has no inquiry authority limit;
and establishing a mapping relation between the attributive data and an attributive ID, wherein the attributive ID is used for representing a user range with authority to inquire the corresponding attributive data.
In one embodiment, the data query request is for querying for attribution data; the target data comprises all non-attribution data and attribution data which are queried by corresponding requests of the data query requests.
In one embodiment, the obtaining, from a database, the target data corresponding to the data query request based on the thread information and the identity information corresponding to each data query request includes:
determining the query authority of a request initiating object corresponding to the identity information based on the identity information and the attribution ID of each attribution data in the database;
and acquiring target data corresponding to the corresponding data query request from a database based on the query permission and the thread information.
In one embodiment, the determining, based on the identity information and the home ID of each piece of home data in the database, the query authority of the request initiating object corresponding to the identity information includes:
determining the data range of the attributive data of the request initiating object authorized inquiry based on the identity information and the user range corresponding to the attributive ID of each attributive data;
and determining the query authority of the request initiating object based on the data range.
In one embodiment, the obtaining, based on the query authority and the thread information, target data corresponding to the corresponding data query request from a database includes:
judging whether the target data is in the query authority or not based on the thread information;
if the target data is in the query authority, acquiring the target data from a database, and sending the target data to the front end of the device for requesting to initiate an object;
and if the target data is not in the query authority, sending alarm information to the front end of the equipment, wherein the alarm information is used for representing that the request initiating object does not have the authority to query the target data.
In a second aspect, the present application also provides a data query device, where the device includes:
the first acquisition module is used for acquiring at least one data query request, and each data query request corresponds to one thread;
the second acquisition module is used for acquiring the identity information of the request initiating object corresponding to each data query request based on the data query requests and storing the identity information to the authority information manager;
and the third acquisition module is used for acquiring target data corresponding to the corresponding data query requests from the database based on the thread information and the identity information corresponding to each data query request.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments described above when the computer program is executed by the processor.
In a fourth aspect, the present application also provides a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the embodiments described above.
In a fifth aspect, the present application also provides a computer program product. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of the embodiments described above.
The data query method, the data query device, the computer equipment, the storage medium and the computer program product acquire at least one data query request, and each data query request corresponds to one thread; based on the data query requests, acquiring identity information of a request initiating object corresponding to each data query request, and storing the identity information to a permission information manager; and acquiring target data corresponding to the corresponding data query requests from the database based on the thread information and the identity information corresponding to each data query request. According to the method provided by the application, based on the thread information and the identity information corresponding to each data query request, the target data corresponding to the corresponding data query request is directly obtained from the database, and new business logic is not required to be written at the business logic code, so that the development difficulty and the workload can be effectively reduced.
Drawings
FIG. 1 is an application environment diagram of a data polling method in one embodiment;
FIG. 2 is a flow diagram of a method of data polling in one embodiment;
FIG. 3 is a flow chart of a mapping relationship establishment method in one embodiment;
FIG. 4 is a block diagram of the structure of a data polling device in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The data query method provided by the embodiment of the application can be applied to an application environment shown in figure 1. The application environment diagram includes a service system 102, a server 104, a rights information manager 106, and a database 108, specifically, the server 104 obtains at least one data query request initiated by a request initiating object in the service system 102, where each data query request corresponds to one thread; the server 104 obtains the identity information of the request initiation object corresponding to each data query request based on the data query request, and stores the identity information to the authority information manager 106; the server 104 obtains the target data corresponding to each data query request from the database 108 based on the thread information and the identity information corresponding to the data query request. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a data query method is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps:
s202, at least one data query request is obtained, and each data query request corresponds to one thread.
Wherein the data query request is initiated by a worker on the service query system; a Thread (Thread) is the minimum unit of program execution flow, and a Thread is the minimum unit that an operating system can perform operation scheduling, and is included in a process and is the actual running unit in the process.
Specifically, a data query request is intercepted by adding a filter or interceptor at the access control layer of an application of the business system.
S204, based on the data query requests, acquiring the identity information of the request initiation object corresponding to each data query request, and storing the identity information to the authority information manager.
The authority information manager takes the request as a dimension, stores the identity information of the request initiating object, and can ensure the correctness of the stored identity information in asynchronous, multithreading and other scenes.
S206, acquiring target data corresponding to the corresponding data query requests from the database based on the thread information and the identity information corresponding to each data query request.
Where thread information refers to a data structure or variable used to describe thread state and attributes in a computer program, for example, thread information may include thread ID, thread state, and thread priority.
Specifically, a filter or an interceptor is added to a data access layer of an application program of a service system, a data query request is intercepted, corresponding identity information is obtained from a right information manager based on the intercepted data query request, a data range in which a request initiating object corresponding to the identity information can be queried from a database is determined based on the corresponding relation between the identity information and data stored in the database, and finally, based on thread information, target data is obtained from the database by judging whether the target data is in the data range in which the request initiating object can be queried.
In the data query method, at least one data query request is obtained, and each data query request corresponds to one thread; based on the data query requests, acquiring identity information of a request initiating object corresponding to each data query request, and storing the identity information to a permission information manager; and acquiring target data corresponding to the corresponding data query requests from the database based on the thread information and the identity information corresponding to each data query request. According to the method provided by the application, based on the thread information and the identity information corresponding to each data query request, the target data corresponding to the corresponding data query request is directly obtained from the database, and new business logic is not required to be written at the business logic code, so that the development difficulty and the workload can be effectively reduced.
In some embodiments, as shown in fig. 3, before obtaining the at least one data query request, it includes:
s302, all data stored in the database are divided into attributive data and non-attributive data, wherein the attributive data has inquiry authority limit, and the non-attributive data has no inquiry authority limit.
The data with attribution refers to data which is related to the service and needs to be analyzed and processed, the data without attribution is the residual data which is stored in a database and is except the data with attribution, for example, the data without attribution can be the inherent data of a service system or a server.
S304, establishing a mapping relation between the attributive data and the attributive ID, wherein the attributive ID is used for representing the user range of the attributive data corresponding to the authorized inquiry.
Only the attribution data and the attribution ID establish a mapping relation, and no attribution data has no corresponding attribution ID.
Specifically, each piece of the attribution data may be marked with a corresponding attribution ID by adding a column to the database table for representing the attribution ID.
In the step, the accuracy of the subsequent data query can be improved by dividing the data stored in the database into the data with attribution and the data without attribution.
In some embodiments, the data query request is for querying for attributed data; the target data comprises all non-attribution data and attribution data which are queried by the corresponding request of the data query request.
When corresponding attributive data is queried from the database based on the data query request and the identity information, all non-attributive data are acquired at the same time.
In this step, the target data includes all non-attribution data, so that the request initiating object can more comprehensively understand the condition of the whole service system.
In some embodiments, based on the thread information and the identity information corresponding to each data query request, obtaining target data corresponding to the respective data query request from a database includes: determining the query authority of the request initiating object corresponding to the identity information based on the identity information and the attribution ID of each attribution data in the database; and acquiring target data corresponding to the corresponding data query request from the database based on the query authority and the thread information.
The query authority of the request initiation object can be determined according to the user range corresponding to the home ID of each home data.
In the step, the target data is acquired based on the inquiry authority and the thread information, so that the efficiency of acquiring the target data can be effectively improved.
In some embodiments, determining the query authority of the request initiating object corresponding to the identity information based on the identity information and the home ID of each piece of home data in the database includes: determining a data range with attribution data for requesting to initiate the authorized inquiry of the object based on the identity information and the corresponding user range of the attribution ID of each attribution data; query permissions requesting the initiating object are determined based on the data scope.
Specifically, identity information of the request initiating object is compared with a user range corresponding to the attribution ID of all attribution data, and the user range comprises all attribution data of the identity information of the request initiating object and is determined to be a data range of attribution data of authority query of the request initiating object.
In the step, the query authority of the request initiation object is determined through the user range corresponding to each piece of attribution data, so that the determination of the query authority of the request initiation object is more accurate.
In some embodiments, based on the query rights and the thread information, obtaining target data corresponding to the respective data query requests from the database includes: judging whether the target data is in the query authority or not based on the thread information; if the target data is within the query authority, acquiring the target data from the database, and sending the target data to the front end of the equipment requesting the initiating object; and if the target data is not in the query authority, sending alarm information to the front end of the device, wherein the alarm information is used for representing the authority that the request initiating object does not query the target data.
When the target data is not in the query authority, the request initiating object is reminded of applying for the authority of querying the target data by sending alarm information to the front end of the device requesting the initiating object.
In the step, when the target data is not in the query authority, the requirement that the request initiating object has the function of querying the target data is indicated, and the request initiating object is reminded to initiate the authority application for the target data at the moment, so that the method is more humanized.
In one embodiment, another data query method is provided, and the data query system corresponding to the method comprises an employee identity information querier, a right information management module and a data operation controller, and the method comprises the following steps:
(1) Employee identity information interceptor: intercepting the request to obtain the identity information of the staff and storing the information to the authority information management module.
(2) Rights information management module: and storing the identity authority information of the staff by taking the request as a dimension. And ensures the correctness of information in asynchronous, multithreading, etc. scenarios.
(3) A data operation controller: the identity information is acquired from the authority information management module through the thread information, and the data operation is controlled through the identity information, so that the range of the data operation is only maintained in the range of authority of staff (data with identity marks and data without attribution).
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a data query device for realizing the above related data query method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more data query devices provided below may refer to the limitation of the data query method hereinabove, and will not be repeated herein.
In one embodiment, as shown in FIG. 4, there is provided a data query apparatus 400 comprising: a first acquisition module 401, a second acquisition module 402, and a third acquisition module 403, wherein:
the first obtaining module 401 is configured to obtain at least one data query request, where each data query request corresponds to one thread.
The second obtaining module 402 is configured to obtain, based on the data query requests, identity information of a request initiation object corresponding to each data query request, and store the identity information to the rights information manager.
And a third obtaining module 403, configured to obtain, from a database, target data corresponding to each data query request based on the thread information and the identity information corresponding to each data query request.
In some embodiments, the data query device 400 is specifically configured to: dividing all data stored in the database into attributive data and non-attributive data, wherein the attributive data has inquiry authority limit, and the non-attributive data has no inquiry authority limit; and establishing a mapping relation between the attributive data and an attributive ID, wherein the attributive ID is used for representing a user range with authority to inquire the corresponding attributive data.
In some embodiments, the data query device 400 is further configured to: the data query request is used for querying the attributive data; the target data comprises all non-attribution data and attribution data which are queried by corresponding requests of the data query requests.
In some embodiments, the third acquisition module 403 includes:
and the determining unit is used for determining the query authority of the request initiating object corresponding to the identity information based on the identity information and the attribution ID of each attribution data in the database.
And the acquisition unit is used for acquiring target data corresponding to the corresponding data query request from the database based on the query authority and the thread information.
In some embodiments, the determining unit is further configured to: determining the data range of the attributive data of the request initiating object authorized inquiry based on the identity information and the user range corresponding to the attributive ID of each attributive data; and determining the query authority of the request initiating object based on the data range.
In some embodiments, the acquisition unit is further configured to: judging whether the target data is in the query authority or not based on the thread information; if the target data is in the query authority, acquiring the target data from a database, and sending the target data to the front end of the device for requesting to initiate an object; and if the target data is not in the query authority, sending alarm information to the front end of the equipment, wherein the alarm information is used for representing that the request initiating object does not have the authority to query the target data.
The various modules in the data querying device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing business data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data query method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: acquiring at least one data query request, wherein each data query request corresponds to one thread; based on the data query requests, acquiring identity information of a request initiation object corresponding to each data query request, and storing the identity information to a permission information manager; and acquiring target data corresponding to the corresponding data query requests from a database based on the thread information and the identity information corresponding to each data query request.
In one embodiment, before obtaining the at least one data query request, which is implemented when the processor executes the computer program, comprises: dividing all data stored in the database into attributive data and non-attributive data, wherein the attributive data has inquiry authority limit, and the non-attributive data has no inquiry authority limit; and establishing a mapping relation between the attributive data and an attributive ID, wherein the attributive ID is used for representing a user range with authority to inquire the corresponding attributive data.
In one embodiment, a data query request implemented when the processor executes a computer program is used to query for attributed data; the target data comprises all non-attribution data and attribution data which are queried by corresponding requests of the data query requests.
In one embodiment, the obtaining, by the processor when executing the computer program, the target data corresponding to the respective data query request from the database based on the thread information corresponding to each data query request and the identity information includes: determining the query authority of a request initiating object corresponding to the identity information based on the identity information and the attribution ID of each attribution data in the database; and acquiring target data corresponding to the corresponding data query request from a database based on the query permission and the thread information.
In one embodiment, determining the query authority of the request initiation object corresponding to the identity information based on the identity information and the home ID of each piece of home data in the database, which is implemented when the processor executes the computer program, includes: determining the data range of the attributive data of the request initiating object authorized inquiry based on the identity information and the user range corresponding to the attributive ID of each attributive data; and determining the query authority of the request initiating object based on the data range.
In one embodiment, the obtaining, by the processor, target data corresponding to a corresponding data query request from a database based on the query authority and the thread information, where the target data is implemented when the processor executes a computer program, includes: judging whether the target data is in the query authority or not based on the thread information; if the target data is in the query authority, acquiring the target data from a database, and sending the target data to the front end of the device for requesting to initiate an object; and if the target data is not in the query authority, sending alarm information to the front end of the equipment, wherein the alarm information is used for representing that the request initiating object does not have the authority to query the target data.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring at least one data query request, wherein each data query request corresponds to one thread; based on the data query requests, acquiring identity information of a request initiation object corresponding to each data query request, and storing the identity information to a permission information manager; and acquiring target data corresponding to the corresponding data query requests from a database based on the thread information and the identity information corresponding to each data query request.
In one embodiment, before the computer program is executed by the processor to obtain the at least one data query request, it comprises: dividing all data stored in the database into attributive data and non-attributive data, wherein the attributive data has inquiry authority limit, and the non-attributive data has no inquiry authority limit; and establishing a mapping relation between the attributive data and an attributive ID, wherein the attributive ID is used for representing a user range with authority to inquire the corresponding attributive data.
In one embodiment, a data query request implemented when a computer program is executed by a processor is used to query for attributed data; the target data comprises all non-attribution data and attribution data which are queried by corresponding requests of the data query requests.
In one embodiment, the obtaining, by a processor, target data corresponding to each data query request from a database based on thread information corresponding to each data query request and the identity information, where the implementation of the computer program is executed by the processor includes: determining the query authority of a request initiating object corresponding to the identity information based on the identity information and the attribution ID of each attribution data in the database; and acquiring target data corresponding to the corresponding data query request from a database based on the query permission and the thread information.
In one embodiment, the determining, implemented when the computer program is executed by the processor, the query authority of the request initiating object corresponding to the identity information based on the identity information and the home ID of each piece of home data in the database includes: determining the data range of the attributive data of the request initiating object authorized inquiry based on the identity information and the user range corresponding to the attributive ID of each attributive data; and determining the query authority of the request initiating object based on the data range.
In one embodiment, the obtaining, based on the query authority and the thread information, target data corresponding to a corresponding data query request from a database, where the target data is implemented when the computer program is executed by a processor, includes: judging whether the target data is in the query authority or not based on the thread information; if the target data is in the query authority, acquiring the target data from a database, and sending the target data to the front end of the device for requesting to initiate an object; and if the target data is not in the query authority, sending alarm information to the front end of the equipment, wherein the alarm information is used for representing that the request initiating object does not have the authority to query the target data.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of: acquiring at least one data query request, wherein each data query request corresponds to one thread; based on the data query requests, acquiring identity information of a request initiation object corresponding to each data query request, and storing the identity information to a permission information manager; and acquiring target data corresponding to the corresponding data query requests from a database based on the thread information and the identity information corresponding to each data query request.
In one embodiment, before the computer program is executed by the processor to obtain the at least one data query request, it comprises: dividing all data stored in the database into attributive data and non-attributive data, wherein the attributive data has inquiry authority limit, and the non-attributive data has no inquiry authority limit; and establishing a mapping relation between the attributive data and an attributive ID, wherein the attributive ID is used for representing a user range with authority to inquire the corresponding attributive data.
In one embodiment, a data query request implemented when a computer program is executed by a processor is used to query for attributed data; the target data comprises all non-attribution data and attribution data which are queried by corresponding requests of the data query requests.
In one embodiment, the obtaining, by a processor, target data corresponding to each data query request from a database based on thread information corresponding to each data query request and the identity information, where the implementation of the computer program is executed by the processor includes: determining the query authority of a request initiating object corresponding to the identity information based on the identity information and the attribution ID of each attribution data in the database; and acquiring target data corresponding to the corresponding data query request from a database based on the query permission and the thread information.
In one embodiment, the determining, implemented when the computer program is executed by the processor, the query authority of the request initiating object corresponding to the identity information based on the identity information and the home ID of each piece of home data in the database includes: determining the data range of the attributive data of the request initiating object authorized inquiry based on the identity information and the user range corresponding to the attributive ID of each attributive data; and determining the query authority of the request initiating object based on the data range.
In one embodiment, the obtaining, based on the query authority and the thread information, target data corresponding to a corresponding data query request from a database, where the target data is implemented when the computer program is executed by a processor, includes: judging whether the target data is in the query authority or not based on the thread information; if the target data is in the query authority, acquiring the target data from a database, and sending the target data to the front end of the device for requesting to initiate an object; and if the target data is not in the query authority, sending alarm information to the front end of the equipment, wherein the alarm information is used for representing that the request initiating object does not have the authority to query the target data.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method of querying data, the method comprising:
acquiring at least one data query request, wherein each data query request corresponds to one thread;
based on the data query requests, acquiring identity information of a request initiation object corresponding to each data query request, and storing the identity information to a permission information manager;
and acquiring target data corresponding to the corresponding data query requests from a database based on the thread information and the identity information corresponding to each data query request.
2. The method of claim 1, wherein prior to obtaining the at least one data query request, comprising:
dividing all data stored in the database into attributive data and non-attributive data, wherein the attributive data has inquiry authority limit, and the non-attributive data has no inquiry authority limit;
and establishing a mapping relation between the attributive data and an attributive ID, wherein the attributive ID is used for representing a user range with authority to inquire the corresponding attributive data.
3. The method of claim 2, wherein the data query request is for querying for home data; the target data comprises all non-attribution data and attribution data which are queried by corresponding requests of the data query requests.
4. The method according to claim 2, wherein the obtaining, from the database, the target data corresponding to the respective data query request based on the thread information and the identity information corresponding to each data query request, includes:
determining the query authority of a request initiating object corresponding to the identity information based on the identity information and the attribution ID of each attribution data in the database;
and acquiring target data corresponding to the corresponding data query request from a database based on the query permission and the thread information.
5. The method of claim 4, wherein the determining the query authority of the request initiation object corresponding to the identity information based on the identity information and the home ID of each piece of home data in the database comprises:
determining the data range of the attributive data of the request initiating object authorized inquiry based on the identity information and the user range corresponding to the attributive ID of each attributive data;
and determining the query authority of the request initiating object based on the data range.
6. The method of claim 4, wherein the obtaining target data corresponding to the respective data query requests from a database based on the query rights and the thread information comprises:
judging whether the target data is in the query authority or not based on the thread information;
if the target data is in the query authority, acquiring the target data from a database, and sending the target data to the front end of the device for requesting to initiate an object;
and if the target data is not in the query authority, sending alarm information to the front end of the equipment, wherein the alarm information is used for representing that the request initiating object does not have the authority to query the target data.
7. A data querying device, the device comprising:
the first acquisition module is used for acquiring at least one data query request, and each data query request corresponds to one thread;
the second acquisition module is used for acquiring the identity information of the request initiating object corresponding to each data query request based on the data query requests and storing the identity information to the authority information manager;
and the third acquisition module is used for acquiring target data corresponding to the corresponding data query requests from the database based on the thread information and the identity information corresponding to each data query request.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310808181.XA 2023-07-03 2023-07-03 Data query method, device, equipment, medium and product Pending CN117076721A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310808181.XA CN117076721A (en) 2023-07-03 2023-07-03 Data query method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310808181.XA CN117076721A (en) 2023-07-03 2023-07-03 Data query method, device, equipment, medium and product

Publications (1)

Publication Number Publication Date
CN117076721A true CN117076721A (en) 2023-11-17

Family

ID=88703113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310808181.XA Pending CN117076721A (en) 2023-07-03 2023-07-03 Data query method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN117076721A (en)

Similar Documents

Publication Publication Date Title
US9563426B1 (en) Partitioned key-value store with atomic memory operations
CN111177302B (en) Service bill processing method, device, computer equipment and storage medium
US9684689B2 (en) Distributed parallel processing system having jobs processed by nodes based on authentication using unique identification of data
CN112015820A (en) Method, system, electronic device and storage medium for implementing distributed graph database
CN106776795B (en) Data writing method and device based on Hbase database
CN113094387A (en) Data query method and device, electronic equipment and machine-readable storage medium
CN117033424A (en) Query optimization method and device for slow SQL (structured query language) statement and computer equipment
CN109829678B (en) Rollback processing method and device and electronic equipment
US8548980B2 (en) Accelerating queries based on exact knowledge of specific rows satisfying local conditions
CN117076721A (en) Data query method, device, equipment, medium and product
US11308048B2 (en) Database migration method, apparatus, device, and computer-readable medium
CN113806504B (en) Multi-dimensional report data calculation method and device and computer equipment
CN115168409B (en) Data query method and device for database sub-tables and computer equipment
CN116880927A (en) Rule management method, device, computer equipment and storage medium
CN116610664B (en) Data monitoring method, device, computer equipment, storage medium and product
CN110764937B (en) Method, terminal and medium for controlling Hive database and table storage quota
CN116910069A (en) Database updating method, device, computer equipment and storage medium
CN117455501A (en) Request processing method, apparatus, computer device and storage medium
CN116483532A (en) Scheduling processing method, device, computer equipment and storage medium
CN116521546A (en) Interface performance adjusting method and device, computer equipment and storage medium
CN117743299A (en) Database migration method, device, equipment, medium and product
CN116611900A (en) Request processing method, apparatus, computer device, storage medium, and program product
CN117170844A (en) Offline propagation method and device of distributed lock, computer equipment and storage medium
CN117131072A (en) Financial business query method, device, computer equipment and storage medium
CN117076476A (en) Object information processing method, device, computer equipment and storage medium

Legal Events

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