Data access method, system and device and storage medium
By configuring and verifying the data access parameters of heterogeneous systems, including login and permission information, the traditional unified query service has solved the shortcomings in data permission isolation and security, and achieved secure isolation and efficient query of data access, avoiding resources Occupy and increase in development, operation and maintenance workload.
Patent Information
- Application Number
- CN202411082498.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-19
AI Technical Summary
The traditional unified query service has poor flexibility in data permission isolation and low data security. When new heterogeneous systems are connected, a large amount of development and operation and maintenance work will be generated. During the peak period of system business, query services are frequent. Being called by heterogeneous system will occupy a large amount of hardware resources and affect system performance.
By obtaining the encoded configuration data access parameters of heterogeneous systems, including login username, login session, data category permissions, query time permissions and query scope permissions, simulated login and permission verification, to ensure the security and legality of data access. Avoid illegal acquisition and resource occupation.
Effectively isolate the data permissions of different users, ensure the security and privacy of data, meet the user's data query needs, and at the same time, it does not increase the development and operation and maintenance workload, solving the problem of data security that cannot be guaranteed.
Smart Images

Figure CN118981791A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a data access method, system, device and storage medium. Background Art
[0002] With the deepening of enterprise informatization construction, system business continues to expand and become more complex, requiring data interaction and synchronization with more and more heterogeneous systems to meet the needs of different business scenarios. At this time, query interfaces are often released to the outside world to allow various heterogeneous systems to call interfaces to incrementally synchronize data.
[0003] Traditional unified query services do not consider data permission isolation or use hard-coded methods to implement data permission isolation, which results in poor flexibility and low data security. In addition, when new heterogeneous systems are connected, a lot of development and operation and maintenance workload will be generated. In addition, during the peak period of system business, query services are frequently called by heterogeneous systems, which will occupy a large amount of hardware resources and affect the overall performance of the system. Summary of the invention
[0004] In view of this, in order to overcome at least one aspect of the above problems, an embodiment of the present invention proposes a data access method, comprising the following steps: In response to receiving a heterogeneous system access request, obtaining a heterogeneous system code of the heterogeneous system; Data access parameters corresponding to the heterogeneous system encoding configuration; In response to receiving a data query request of the heterogeneous system, acquiring corresponding data access parameters based on a heterogeneous system code of the heterogeneous system; Access data based on the acquired data access parameters.
[0005] In some embodiments, configuring data access parameters corresponding to the heterogeneous system encoding further includes: Based on the heterogeneous system coding configuration, any one or more of the login user name, login session, data category authority, query time authority and query range authority are specified.
[0006] In some embodiments, before the step of acquiring corresponding data access parameters based on the heterogeneous system encoding of the heterogeneous system, the method further includes: The heterogeneous system performs simulated login using the specified user name; Determine whether the simulated login is successful; In response to a successful simulated login, a login session is obtained and based on the login session, it is determined whether the heterogeneous system is allowed to perform data query.
[0007] In some embodiments, in response to a successful simulated login, obtaining a login session and determining whether to allow the heterogeneous system to perform data query based on the login session further includes: Determine whether the login session obtained by the heterogeneous system is consistent with the pre-configured login session; In response to the agreement, allowing the heterogeneous system to perform data query and obtaining corresponding data access parameters based on the heterogeneous system encoding of the heterogeneous system; In response to the inconsistency, the heterogeneous system is not allowed to perform data query and specific error information is given.
[0008] In some embodiments, performing data access based on the acquired data access parameter further includes: Obtaining data category authority based on heterogeneous system codes of the heterogeneous systems; Determining whether the category of the data to be accessed by the heterogeneous system is within the data category authority; In response to being within the data category permissions, the heterogeneous system is allowed to access the data.
[0009] In some embodiments, performing data access based on the acquired data access parameter further includes: Obtaining query time authority based on the heterogeneous system code of the heterogeneous system; Determine whether the current time is within the query time authority; In response to being within the query time authority, the heterogeneous system is allowed to access the data.
[0010] In some embodiments, performing data access based on the acquired data access parameter further includes: Obtaining query scope authority based on the heterogeneous system code of the heterogeneous system; Determining whether the data to be accessed by the heterogeneous system is within the query scope authority; In response to being within the query scope authority, the heterogeneous system is allowed to access the data.
[0011] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a data access system, comprising: A first acquisition module is configured to acquire a heterogeneous system code of the heterogeneous system in response to receiving a heterogeneous system access request; A configuration module configured to configure corresponding data access parameters based on the heterogeneous system encoding; A second acquisition module is configured to, in response to receiving a data query request of the heterogeneous system, acquire a corresponding data access parameter based on a heterogeneous system code of the heterogeneous system; The access module is configured to perform data access based on the acquired data access parameters.
[0012] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, including: at least one processor; and A memory storing a computer program executable on the processor, wherein the processor executes the steps of any one of the data access methods described above when executing the program.
[0013] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the data access methods described above are performed.
[0014] The present invention has one of the following beneficial technical effects: the solution proposed by the present invention can effectively isolate the data permissions of different users, ensure the security and privacy of data, and meet the data query needs of users. In this way, without increasing the workload of development and operation and maintenance, the problem of data security not being guaranteed due to the fact that data can be obtained at will is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A flow chart of a data access method provided by an embodiment of the present invention; Figure 2 A flowchart of a data access method provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a data access system provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention; Figure 5 A schematic diagram of the structure of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0018] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.
[0019] According to one aspect of the present invention, an embodiment of the present invention provides a data access method, such as Figure 1 As shown, it may include the steps of: S1, in response to receiving a heterogeneous system access request, obtaining a heterogeneous system code of the heterogeneous system; S2, configuring corresponding data access parameters based on the heterogeneous system encoding; S3, in response to receiving the data query request of the heterogeneous system, acquiring corresponding data access parameters based on the heterogeneous system code of the heterogeneous system; S4, accessing data based on the acquired data access parameters.
[0020] The solution proposed by the present invention can effectively isolate the data permissions of different users, ensure the security and privacy of data, and meet the data query needs of users. In this way, the problem of data security cannot be guaranteed due to the arbitrary acquisition of data is solved without increasing the workload of development and operation and maintenance.
[0021] In some embodiments, configuring data access parameters corresponding to the heterogeneous system encoding further includes: Based on the heterogeneous system coding configuration, any one or more of the login user name, login session, data category authority, query time authority and query range authority are specified.
[0022] Specifically, the configuration method is adopted to preset heterogeneous system codes, data classification codes and parameters related to heterogeneous system data permissions in the system. When the heterogeneous system calls the interface to query data, data permissions are isolated from four dimensions from shallow to deep, namely, authenticity of interface call, visibility of query data classification, feasibility of query data time, and visibility of query specific data range.
[0023] In some embodiments, before the step of acquiring corresponding data access parameters based on the heterogeneous system encoding of the heterogeneous system, the method further includes: The heterogeneous system performs simulated login using the specified user name; Determine whether the simulated login is successful; In response to a successful simulated login, a login session is obtained and based on the login session, it is determined whether the heterogeneous system is allowed to perform data query.
[0024] In some embodiments, in response to a successful simulated login, obtaining a login session and determining whether to allow the heterogeneous system to perform data query based on the login session further includes: Determine whether the login session obtained by the heterogeneous system is consistent with the pre-configured login session; In response to the agreement, allowing the heterogeneous system to perform data query and obtaining corresponding data access parameters based on the heterogeneous system encoding of the heterogeneous system; In response to the inconsistency, the heterogeneous system is not allowed to perform data query and specific error information is given.
[0025] Specifically, Figure 2 As shown, the information of various heterogeneous systems is maintained in the system, and dedicated users for query services are designated for heterogeneous systems. Heterogeneous systems need to use designated users to complete simulated login and obtain user sessions before they can access query services. The service internally verifies whether the current user session is consistent with the preset one. If they are inconsistent, the query is not allowed and a specific error message is given to prevent data leakage caused by illegal acquisition of query parameters.
[0026] In this way, when a heterogeneous system calls an interface to query data, it is necessary to use the specified interface user to complete the simulated login to obtain the user session, otherwise the query will not be allowed to continue and a clear error message will be given. If the query parameters are illegally obtained, simulated login verification and user session verification can be used to prevent data leakage caused by illegal acquisition of query parameters, thereby improving the overall security of the system.
[0027] In some embodiments, performing data access based on the acquired data access parameter further includes: Obtaining data category authority based on heterogeneous system codes of the heterogeneous systems; Determining whether the category of the data to be accessed by the heterogeneous system is within the data category authority; In response to being within the data category permissions, the heterogeneous system is allowed to access the data.
[0028] Specifically, Figure 2As shown in the figure, preliminary data permission isolation is performed based on data category as the dimension, and data categories are maintained in a configured manner. Different data categories can maintain heterogeneous system information that is allowed to be accessed. A permission isolation switch is set. If it is turned on, the heterogeneous system that can be configured to allow access to the data category can be configured. After session authentication, the heterogeneous system will check whether there is permission to query the data category. If there is no permission, the query is not allowed and a specific error message is given.
[0029] In some embodiments, performing data access based on the acquired data access parameter further includes: Obtaining query time authority based on the heterogeneous system code of the heterogeneous system; Determine whether the current time is within the query time authority; In response to being within the query time authority, the heterogeneous system is allowed to access the data.
[0030] Specifically, Figure 2 As shown, the interface open time period can be limited according to the heterogeneous system category. The query interface is allowed to access the time period in the heterogeneous system dimension. If the interface is not called within the specified time period, the query is not allowed and a clear error message is given.
[0031] In this way, by taking data classification and heterogeneous system combination as dimensions, we can limit query time, avoid business peak periods, and prevent overall system performance problems caused by frequent calls of heterogeneous systems occupying too many hardware resources, thereby improving system stability and availability.
[0032] In some embodiments, performing data access based on the acquired data access parameter further includes: Obtaining query scope authority based on the heterogeneous system code of the heterogeneous system; Determining whether the data to be accessed by the heterogeneous system is within the query scope authority; In response to being within the query scope authority, the heterogeneous system is allowed to access the data.
[0033] Specifically, Figure 2 As shown in the figure, for the same data category, according to the data permissions configured in the heterogeneous system, the heterogeneous system can only query the data within the permissions. After passing the above permission verification, the verification granularity is further refined. Before querying the data, a pre-query is performed according to the configuration information. If the query is empty, it indicates that the heterogeneous system has no access to the data range to be queried, and a specific error prompt is given.
[0034] The solution proposed by the present invention can effectively isolate the data permissions of different users, ensure the security and privacy of data, and meet the data query needs of users. In this way, the problem of data security cannot be guaranteed due to the arbitrary acquisition of data is solved without increasing the workload of development and operation and maintenance.
[0035] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a data access system 400, such as Figure 3 As shown, including: A first acquisition module 401 is configured to acquire a heterogeneous system code of the heterogeneous system in response to receiving a heterogeneous system access request; A configuration module 402, configured to configure corresponding data access parameters based on the heterogeneous system encoding; A second acquisition module 403 is configured to, in response to receiving a data query request of the heterogeneous system, acquire a corresponding data access parameter based on a heterogeneous system code of the heterogeneous system; The access module 404 is configured to perform data access based on the acquired data access parameters.
[0036] In some embodiments, the configuration module 402 is further configured to: Based on the heterogeneous system coding configuration, any one or more of the login user name, login session, data category authority, query time authority and query range authority are specified.
[0037] In some embodiments, the second acquisition module 403 is further configured to: The heterogeneous system performs simulated login using the specified user name; Determine whether the simulated login is successful; In response to a successful simulated login, a login session is obtained and based on the login session, it is determined whether the heterogeneous system is allowed to perform data query.
[0038] In some embodiments, the second acquisition module 403 is further configured to: Determine whether the login session obtained by the heterogeneous system is consistent with the pre-configured login session; In response to the agreement, allowing the heterogeneous system to perform data query and obtaining corresponding data access parameters based on the heterogeneous system encoding of the heterogeneous system; In response to the inconsistency, the heterogeneous system is not allowed to perform data query and specific error information is given.
[0039] In some embodiments, the access module 404 is further configured to: Obtaining data category authority based on heterogeneous system codes of the heterogeneous systems; Determining whether the category of the data to be accessed by the heterogeneous system is within the data category authority; In response to being within the data category permissions, the heterogeneous system is allowed to access the data.
[0040] In some embodiments, the access module 404 is further configured to: Obtaining query time authority based on the heterogeneous system code of the heterogeneous system; Determine whether the current time is within the query time authority; In response to being within the query time authority, the heterogeneous system is allowed to access the data.
[0041] In some embodiments, the access module 404 is further configured to: Obtaining query scope authority based on the heterogeneous system code of the heterogeneous system; Determining whether the data to be accessed by the heterogeneous system is within the query scope authority; In response to being within the query scope authority, the heterogeneous system is allowed to access the data.
[0042] Based on the same inventive concept, according to another aspect of the present invention, Figure 4 As shown, an embodiment of the present invention further provides a computer device 501, including: at least one processor 520; and The memory 510 stores a computer program 511 that can be run on the processor. When the processor 520 executes the program, the processor 520 performs the steps of any of the above data access methods.
[0043] Based on the same inventive concept, according to another aspect of the present invention, Figure 5 As shown, an embodiment of the present invention further provides a computer-readable storage medium 601, which stores a computer program 610. When the computer program 610 is executed by a processor, the steps of any of the above data access methods are performed.
[0044] Finally, it should be noted that a person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0045] Furthermore, it should be appreciated that the computer-readable storage medium (eg, memory) herein may be either volatile memory or nonvolatile memory, or may include both volatile memory and nonvolatile memory.
[0046] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0047] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0048] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.
[0049] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0050] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0051] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A data access method, characterized in that: The following steps are involved: In response to receiving a heterogeneous system access request, obtaining a heterogeneous system code of the heterogeneous system; Data access parameters corresponding to the heterogeneous system encoding configuration; In response to receiving the data query request of the heterogeneous system, acquiring the corresponding data access parameter based on the heterogeneous system code of the heterogeneous system; Data access is performed based on the acquired data access parameters.
2. The method according to claim 1, characterized in that The method further comprises: configuring data access parameters corresponding to the heterogeneous system encoding configuration; Based on the heterogeneous system coding configuration, any one or more of the login user name, login session, data category authority, query time authority and query range authority are specified.
3. The method according to claim 2, characterized in that Before the step of acquiring the corresponding data access parameter based on the heterogeneous system code of the heterogeneous system, the method further includes: The heterogeneous system performs simulated login using the specified user name; Determine whether the simulated login is successful; In response to a successful simulated login, a login session is obtained and based on the login session, it is determined whether the heterogeneous system is allowed to perform data query.
4. The method according to claim 3, characterized in that In response to a successful simulated login, obtaining a login session and determining whether to allow the heterogeneous system to perform data query based on the login session further includes: Determine whether the login session obtained by the heterogeneous system is consistent with the pre-configured login session; In response to the agreement, allowing the heterogeneous system to perform data query and obtaining corresponding data access parameters based on the heterogeneous system encoding of the heterogeneous system; In response to the inconsistency, the heterogeneous system is not allowed to perform data query and specific error information is given.
5. The method according to claim 2, characterized in that Performing data access based on the acquired data access parameter further includes: Obtaining data category authority based on heterogeneous system codes of the heterogeneous systems; Determining whether the category of the data to be accessed by the heterogeneous system is within the data category authority; In response to being within the data category permissions, the heterogeneous system is allowed to access the data.
6. The method according to claim 2, characterized in that Performing data access based on the acquired data access parameter further includes: Obtaining query time authority based on the heterogeneous system code of the heterogeneous system; Determine whether the current time is within the query time authority; In response to being within the query time authority, the heterogeneous system is allowed to access the data.
7. The method according to claim 2, characterized in that Performing data access based on the acquired data access parameter further includes: Obtaining query scope authority based on the heterogeneous system code of the heterogeneous system; Determining whether the data to be accessed by the heterogeneous system is within the query scope authority; In response to being within the query scope authority, the heterogeneous system is allowed to access the data.
8. A data access system, characterized in that: include: A first acquisition module is configured to acquire a heterogeneous system code of the heterogeneous system in response to receiving a heterogeneous system access request; A configuration module configured to configure corresponding data access parameters based on the heterogeneous system encoding; A second acquisition module is configured to, in response to receiving a data query request of the heterogeneous system, acquire the corresponding data access parameter based on the heterogeneous system code of the heterogeneous system; The access module is configured to perform data access based on the acquired data access parameters.
9. A computer device comprising: at least one processor; as well as A memory storing a computer program executable on the processor, wherein the processor executes the steps of the method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.
