Locally deployed tenant data management method and related equipment
By deploying shared and exclusive databases locally, using user information matching and conversion technology, the security and flexibility of tenant data management in multiple business formats is solved, and the secure isolation and flexible display of data is achieved.
Patent Information
- Application Number
- CN202411130587.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-03
AI Technical Summary
The existing locally deployed tenant data management methods cannot take into account security and flexibility, especially in the information system of multi-business enterprises, it is difficult to effectively manage data isolation and sharing between sectors in different business formats.
Using a locally deployed tenant data management method, by simultaneously deploying shared databases and exclusive databases locally, using the first user information, the second user information and the third user information to match and convert data, realizing the centralization of shared data Isolated storage and flexible display of managed and exclusive data.
It realizes the secure isolation and personalized management of data of different tenants, meets the security and flexibility needs of data management, and improves the availability and security of data through centralized conversion and display of exclusive data.
Smart Images

Figure CN119066706A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and specifically relates to a locally deployed tenant data management method and related equipment. Background Art
[0002] Currently, for multi-format enterprises, for security and regulatory considerations, information system construction will adopt local deployment. The different business sectors of the enterprise exist in the system in the form of tenants. When managing data for locally deployed tenants, the management methods are mainly divided into three categories: independent database for each tenant, shared data but independent data architecture for each tenant, and shared database and shared data architecture for each tenant. The existing management method still cannot take into account both security and flexibility. Summary of the invention
[0003] The purpose of the embodiments of the present application is to propose a locally deployed tenant data management method, system, computer device and storage medium to solve the technical problem that the existing locally deployed tenant data management cannot take into account both security and flexibility.
[0004] In order to solve the above technical problems, the present application embodiment provides a locally deployed tenant data management method, which adopts the following technical solution:
[0005] A locally deployed tenant data management method includes:
[0006] Acquire first user information from a first database, where the first database is a tenant shared database;
[0007] receiving a user login request from a user terminal, parsing the user login request to obtain second user information, matching a tenant system according to the first user information and the second user information, and logging in to the tenant system according to the second user information;
[0008] The third user information is obtained from a second database, where the second database is an exclusive database of the tenant system. Target data is matched from the second database according to the first user information, the second user information, and the third user information, and the target data is converted into display data for display on the user end.
[0009] Further, when multiple tenant systems are matched according to the first user information and the second user information, the step of logging into the tenant system according to the second user information includes:
[0010] receiving a user operation of the user terminal, determining a target tenant system from the multiple tenant systems according to the user operation, and logging in to the target tenant system according to the second user information;
[0011] The matching of target data from the second database according to the first user information, the second user information and the third user information comprises:
[0012] Determine whether the user currently requesting login is the target user based on the first user information and the second user information; if so, match the target data in the second database corresponding to the multiple tenant systems based on the first user information and the second user information; otherwise, match the target data in the second database corresponding to the target tenant system based on the second user information and the third user information.
[0013] Furthermore, if the user currently requesting to log in is the target user, the method further includes:
[0014] matching a management system according to the first user information and the second user information;
[0015] Receive user operations from the user terminal, log in to the management system according to the second user information, update the first user information in the first database through the management system, and enable the tenant system to update the third user information in the second database based on the updated first user information.
[0016] Furthermore, the first user information includes at least a user identifier, a user affiliation identifier, and a corresponding mapping relationship, wherein the user identifier has a mapping relationship with at least one of the user affiliation identifiers, and the user affiliation identifier has a mapping relationship with one of the multiple tenant systems;
[0017] The updating of the third user information in the second database based on the updated first user information includes:
[0018] When the user affiliation identifier is updated, synchronizing the updated user affiliation identifier and its mapping relationship to the second database of the corresponding tenant system to update the third user information;
[0019] When the user identifier is updated, determine whether there is a user identifier with a mapping relationship. If so, synchronize the updated user identifier and its mapping relationship to the second database of the corresponding tenant system to update the third user information. Otherwise, directly synchronize the updated user identifier to the second database of each tenant system, and periodically query whether the updated user identifier has a user identifier with a mapping relationship, and update the third user information after it is transmitted.
[0020] Further, judging whether the user currently requesting to log in is a target user according to the first user information and the second user information includes:
[0021] Based on the second user information, whether the first permission of the user currently requesting to log in is matched in the first user information meets the preset condition, and if so, determining that the user currently requesting to log in is the target customer;
[0022] The matching of target data in the second database corresponding to the multiple tenant systems based on the first user information and the second user information includes:
[0023] Reading initial data matching the first permission from the second database according to the first permission, performing desensitization processing on the initial data, and obtaining the target data;
[0024] The matching target data from the second database corresponding to the target tenant system based on the second user information and the third user information includes:
[0025] Based on the second user information matching the second permission of the currently logged-in user in the third user information, initial data matching the second permission is read from the second database according to the second permission, and the initial data is desensitized to obtain the target data.
[0026] Furthermore, when no tenant system is matched according to the first user information and the second user information, the method further includes feeding back an abnormal prompt to the client.
[0027] Furthermore, converting the target data into display data and displaying it on the user terminal includes:
[0028] A data display rule is obtained, the target data of each tenant system is screened according to the data display rule, and a chart is generated based on the screened data as display data.
[0029] In order to solve the above technical problems, the embodiment of the present application also provides a data management system, which adopts the following technical solution:
[0030] A data management system, the data management system is connected to a user terminal and a tenant system through a network, the data management system can implement the steps of the above-mentioned locally deployed tenant data management method, and the data management system includes:
[0031] A data acquisition unit, configured to acquire first user information from a first database, where the first database is a tenant shared database;
[0032] a routing unit, configured to receive a user login request from a user terminal, parse the user login request to obtain second user information, match a tenant system according to the first user information and the second user information, and log in to the tenant system according to the second user information;
[0033] A data processing unit is used to obtain third user information from a second database, where the second database is an exclusive database of the tenant system, match target data from the second database according to the first user information, the second user information and the third user information, and convert the target data into display data for display at the user end.
[0034] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0035] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the locally deployed tenant data management method as described in any one of the above items are implemented.
[0036] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0037] A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the locally deployed tenant data management method as described in any one of the above.
[0038] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0039] The present application uses a shared database and an exclusive database deployed locally at the same time, so that the shared data of different tenants can be uniformly managed in the first database, and some information of the tenants can be centrally managed, while the exclusive data exists in the second database of the tenant. Since the second databases of each tenant are independent of each other and have strong data isolation, they can meet the security and personalization requirements of data management. The exclusive data can be obtained from each second database through the first user information, the second user information and the third user information, and the exclusive data of each second database can be centrally converted and displayed, which is flexible. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 An exemplary system architecture diagram is shown in which the present application can be applied;
[0042] Figure 2 A flow chart showing an embodiment of a data management method according to the present application;
[0043] Figure 3 A schematic diagram showing the structure of an embodiment of a data management system according to the present application is shown;
[0044] Figure 4 A schematic structural diagram of an embodiment of a computer device according to the present application is shown. DETAILED DESCRIPTION
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0046] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0048] like Figure 1 As shown, the system architecture 100 of the present application may include terminal devices (101, 102, 103), a network 104, a server 105, and a front-end system 106. The network 104 is used to provide a communication link between the terminal devices (101, 102, 103) and the front-end system 106, and between the front-end system 106 and the server 105. The network 104 may include various connection types, such as a local area network formed by a wired or wireless communication link or an optical fiber cable and other connection types.
[0049] The user can use the terminal device (101, 102, 103) to interact with the front-end system 106 through the network 104, and the front-end system 106 further interacts with the server 105 through the network to receive, process or send data, etc. Various communication client applications can be installed on the terminal device (101, 102, 103), such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0050] The terminal devices (101, 102, 103) can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0051] The server 105 may be a local server that provides various services, such as a server that provides support for pages displayed on the terminal devices 101 , 102 , and 103 . It may be an independent server or a server cluster consisting of multiple servers.
[0052] It should be noted that the locally deployed tenant data management method provided in the embodiment of the present application is executed by a front-end system, and accordingly, the data management system is the front-end system.
[0053] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0054] Continue to refer Figure 2 , shows a flowchart of an embodiment of a locally deployed tenant data management method according to the present application, the locally deployed tenant data management method comprises the following steps S201 to S203:
[0055] S201, obtaining first user information from a first database, where the first database is a tenant shared database;
[0056] The present application is applicable to the local deployment of a multi-format enterprise. For example, a multi-format enterprise has two major tenants, namely a group and a subsidiary (such as securities). The user data of these two tenants are concentrated as the first user information in the first database, that is, the user data of the tenants are shared data and are centrally managed in a separate database. Of course, other data suitable for shared centralized management can also be stored in the first database.
[0057] In this embodiment, the first user information includes a user identifier, a user affiliation identifier and related mapping relationships, which are specifically reflected in the full user data and organizational structure data of each tenant, such as the user name, the unit to which the user belongs, the tenant to which the unit belongs, etc.
[0058] S202, receiving a user login request from a user terminal, parsing the user login request to obtain second user information, matching a tenant system according to the first user information and the second user information, and logging in to the tenant system according to the second user information;
[0059] In this embodiment, the user login request is received by the front-end system after security verification. The front-end system parses the user login request to obtain the second user information. The second user information mainly includes the user identification, such as the user name. After obtaining the user name, the user name is combined with the first user information to determine the unit to which the user currently requesting login belongs, and then determine the tenant to which the unit belongs, so as to match the tenant system associated with the currently logged-in user for login.
[0060] S203, obtaining third user information from a second database, where the second database is an exclusive database of the tenant system, matching target data from the second database according to the first user information, the second user information, and the third user information, and converting the target data into display data for display at the user end.
[0061] In this embodiment, after logging into the tenant system, the third user information can be obtained from the second database exclusively used by the tenant system. The third user information contains content that further includes user authority information in the tenant system based on the first user information. The current logged-in user matches the initial data based on the user authority information and feeds it back to the front-end system. The front-end system converts the initial data as the target data to obtain display data and sends it to the user terminal, where the data is displayed. The initial data can be encrypted before being fed back, and the encrypted data is fed back to the front-end system. The front-end system decrypts and then converts it, which can ensure the data transmission security when the data is transmitted from the tenant system to the front-end system.
[0062] In one embodiment, when multiple tenant systems are matched according to the first user information and the second user information, the step of logging into the tenant system according to the second user information includes: receiving a user operation of the user terminal, determining a target tenant system from the multiple tenant systems according to the user operation, and logging into the target tenant system according to the second user information. In this embodiment, when a user name matches multiple units, and these units belong to different tenants, multiple tenant systems will be matched. At this time, the user operation needs to be obtained from the client through the front-end system, and the tenant system to be logged in is determined according to the user operation.
[0063] Correspondingly, the matching of target data from the second database according to the first user information, the second user information and the third user information includes: judging whether the user currently requesting login is the target user according to the first user information and the second user information, and if so, matching the target data in the second database corresponding to the multiple tenant systems based on the first user information and the second user information, otherwise matching the target data in the second database corresponding to the target tenant system based on the second user information and the third user information. In this embodiment, users are divided into administrator users and ordinary users, and the target user refers to the administrator user, and the administrator user has the highest authority. Based on the authority, data matching the authority can be directly obtained from all tenant systems (not just the currently logged in tenant system) for display, thereby the data of multiple tenant systems can be centrally displayed in a global scope, without the need to log in to each tenant system to obtain relevant data, and the flexibility is high. For ordinary users, they do not have global authority, but only have the authority of the tenant system, which can be determined by the third user information. Based on the authority, data matching the authority can be obtained in the currently logged in tenant system for display, and the data isolation is good, meeting the security requirements. This solution has both security and flexibility in data management.
[0064] In one embodiment, judging whether the user currently requesting login is the target user according to the first user information and the second user information includes: matching the first permission of the user currently requesting login in the first user information based on the second user information to see whether it meets a preset condition, and if so, determining that the user currently requesting login is the target customer. In this embodiment, the first permission is a global permission, which can manage the shared data of all tenant systems, and obtain and display the exclusive data matching the first permission in all tenant systems.
[0065] Correspondingly, if the currently logged-in user has the first permission, then matching the target data in the second database corresponding to the multiple tenant systems based on the first user information and the second user information includes: reading the initial data matching the first permission from the second database according to the first permission, desensitizing the initial data, and obtaining the target data. In this embodiment, the initial data is statistical data, which is convenient for data analysis and display.
[0066] If the currently logged-in user does not have the first permission, the matching of the target data from the second database corresponding to the target tenant system based on the second user information and the third user information includes: matching the second permission of the currently logged-in user in the third user information based on the second user information, reading the initial data matching the second permission from the second database according to the second permission, desensitizing the initial data, and obtaining the target data. In this embodiment, the second permission is a local permission granted by the tenant system, so when a user who does not have the permission of the tenant system will not be able to obtain the data displayed by the user, data security can be guaranteed.
[0067] In one embodiment, the converting the target data into display data for display at the user end includes: obtaining data display rules, filtering the target data of each tenant system according to the data display rules, and generating a chart based on the filtered data as display data. In this embodiment, the data display rules include the type of data to be displayed, the data statistics method, and the type of display chart to be generated. The display rules can be configured by the user to meet the diverse display requirements, wherein the data statistics method can clean and standardize the data to ensure the consistency and accuracy of the data.
[0068] In one embodiment, if the user currently requesting login is the target user, the method further includes: matching the management system according to the first user information and the second user information; receiving the user operation of the user end, logging into the management system according to the second user information, updating the first user information in the first database through the management system, and enabling the tenant system to update the third user information in the second database based on the updated first user information. In this embodiment, for the administrator user, in addition to matching the tenant system, the management system must also be matched. When obtaining the user operation, the matched tenant system and management system will be provided as options for the user to choose on the user end. When the user chooses to log in to the management system, the management system can centrally manage the shared data of each tenant in the first database. For example, the user management system can add, delete, and modify the full user data and organizational structure data of each tenant. After initialization, if the first user information changes, the third user information in the second database of each tenant system is updated based on the updated first user information. This operation can be triggered when the first user information changes, or it can be executed as a scheduled task.
[0069] In this embodiment, if there is a change in the first user information, such change can be synchronized to all tenant systems, or it can be synchronized only to a specific tenant system. The tenant system that receives the synchronization information determines the information to be updated in the second database by comparing the first user information and the third user information, thereby realizing the update of the third user information.
[0070] In one embodiment, the first user information includes at least a user identifier, a user affiliation identifier and a corresponding mapping relationship, wherein the user identifier has a mapping relationship with at least one of the user affiliation identifiers, and the user affiliation identifier has a mapping relationship with one of the multiple tenant systems; accordingly, updating the third user information in the second database based on the updated first user information includes: when the user affiliation identifier is updated, synchronizing the updated user affiliation identifier and its mapping relationship to the second database of the corresponding tenant system to update the third user information; when the user identifier is updated, determining whether there is a user affiliation identifier with a mapping relationship, if so, synchronizing the updated user identifier and its mapping relationship to the second database of the corresponding tenant system to update the third user information, otherwise directly synchronizing the updated user identifier to the second database of each tenant system, and periodically querying whether the updated user identifier has a user affiliation identifier with a mapping relationship transmitted, and updating the third user information after the transmission. In this embodiment, the update of the first user information includes multiple types of updates, such as user identification update, user affiliation identification update, user identification and user affiliation identification mapping update, user affiliation identification and tenant system mapping update. In principle, the user affiliation identification and related mapping relationship are updated first, and then the user identification and related mapping relationship are updated. This can ensure that the user can be accurately mapped to the tenant system.
[0071] Furthermore, when the tenant system is not matched according to the first user information and the second user information, the method further includes feeding back an abnormal prompt to the client. In this embodiment, it is possible that the logged-in user has not established a mapping relationship with any unit, or the unit with which the logged-in user has a mapping relationship has not established a mapping relationship with any tenant system, which will result in a tenant system matching failure, and the user will be prompted with an abnormality.
[0072] In the above embodiment, the present application discloses a locally deployed tenant data management method. By simultaneously deploying a shared database and an exclusive database locally, the shared data of different tenants can be uniformly managed in the first database, and some information of the tenants can be centrally managed, while the exclusive data exists in the tenant's second database. Since the second databases of each tenant are independent of each other and have strong data isolation, they can meet the security and personalization requirements of data management. The exclusive data can be obtained from each second database through the first user information, the second user information and the third user information, and the exclusive data of each second database can be centrally converted and displayed, which is flexible.
[0073] In this embodiment, the locally deployed tenant data management method is run on the electronic device (eg Figure 1The server shown in the figure) can receive instructions or obtain data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (ultra wi deband) connection, and other wireless connection methods currently known or to be developed in the future.
[0074] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0075] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0076] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a data management system. Figure 2 Corresponding to the method embodiment shown, the system can be specifically applied to various devices, the data management system is connected to the user end and the tenant system respectively through the network, and the data management system can implement the steps of the local deployment tenant data management method as described above, specifically, Figure 3 As shown, the data management system includes a data acquisition unit 301, a routing unit 302 and a data processing unit 303, wherein:
[0077] The data acquisition unit 301 is used to acquire first user information from a first database, which is a tenant shared database; the routing unit 302 is used to receive a user login request from a user terminal, parse the user login request to obtain second user information, match the tenant system according to the first user information and the second user information, and log in to the tenant system according to the second user information; the data processing unit 303 is used to acquire third user information from a second database, which is an exclusive database of the tenant system, match target data from the second database according to the first user information, the second user information and the third user information, and convert the target data into display data for display at the user terminal.
[0078] In one embodiment, when the routing unit 302 matches multiple tenant systems according to the first user information and the second user information, the routing unit 302 logs in to the tenant system according to the second user information and is specifically used to: receive the user operation of the user terminal, determine the target tenant system from the multiple tenant systems according to the user operation, and log in to the target tenant system according to the second user information.
[0079] In one embodiment, when the routing unit 302 fails to match a tenant system according to the first user information and the second user information, the routing unit 302 is further configured to feed back an abnormal prompt to the client.
[0080] Correspondingly, when matching target data from the second database according to the first user information, the second user information and the third user information, the data processing unit 303 is specifically used to: determine whether the user currently requesting login is the target user according to the first user information and the second user information; if so, match the target data in the second database corresponding to the multiple tenant systems based on the first user information and the second user information; otherwise, match the target data in the second database corresponding to the target tenant system based on the second user information and the third user information.
[0081] In one embodiment, the data processing unit 303 determines whether the user currently requesting login is the target user based on the first user information and the second user information: based on the second user information, whether the first permission of the user currently requesting login in the first user information meets the preset conditions; if so, determining that the user currently requesting login is the target customer.
[0082] Correspondingly, when it is a target user, the data processing unit 303 is specifically used to match the target data in the second database corresponding to the multiple tenant systems based on the first user information and the second user information: read the initial data matching the first permission from the second database according to the first permission, desensitize the initial data, and obtain the target data.
[0083] When the user is not the target user, the data processing unit 303 is specifically used to match the target data from the second database corresponding to the target tenant system based on the second user information and the third user information: match the second permission of the currently logged-in user in the third user information based on the second user information, read the initial data matching the second permission from the second database according to the second permission, desensitize the initial data, and obtain the target data.
[0084] In one embodiment, if the user currently requesting login is the target user, the routing unit 302 is also used to match the management system according to the first user information and the second user information; receive user operations from the user end, log in to the management system according to the second user information, update the first user information in the first database through the management system, and enable the tenant system to update the third user information in the second database based on the updated first user information.
[0085] In one embodiment, the first user information includes at least a user identifier, a user affiliation identifier, and a corresponding mapping relationship, wherein the user identifier has a mapping relationship with at least one of the user affiliation identifiers, and the user affiliation identifier has a mapping relationship with one of the multiple tenant systems.
[0086] Correspondingly, when the data processing unit 303 updates the third user information in the second database based on the updated first user information, it is specifically used to: when the user affiliation identifier is updated, synchronize the updated user affiliation identifier and its mapping relationship to the second database of the corresponding tenant system to update the third user information; when the user identifier is updated, determine whether there is a user affiliation identifier with a mapping relationship, if so, synchronize the updated user identifier and its mapping relationship to the second database of the corresponding tenant system to update the third user information, otherwise directly synchronize the updated user identifier to the second database of each tenant system, and regularly query whether the updated user identifier has a user affiliation identifier with a mapping relationship, and update the third user information after it is transmitted.
[0087] In one embodiment, the data processing unit 303 converts the target data into display data for display on the user end, and is specifically used to: obtain data display rules, filter the target data of each tenant system according to the data display rules, and generate a chart based on the filtered data as display data.
[0088] In the above embodiment, the present application discloses a data management system. Through the shared database and the exclusive database deployed locally at the same time, the shared data of different tenants can be uniformly managed in the first database, and some information of the tenants can be centrally managed, while the exclusive data exists in the second database of the tenant. Since the second databases of each tenant are independent of each other and have strong data isolation, they can meet the security and personalization requirements of data management. The exclusive data can be obtained from each second database through the first user information, the second user information and the third user information, and the exclusive data of each second database can be centrally converted and displayed, which is flexible.
[0089] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0090] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmab l eGate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0091] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0092] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of a locally deployed tenant data management method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0093] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the locally deployed tenant data management method.
[0094] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0095] In the above embodiment, the present application discloses a computer device, which can manage the shared data of different tenants in a unified manner in a first database through the shared database and the exclusive database deployed locally at the same time, and centrally manage some information of the tenants, while the exclusive data exists in the second database of the tenant. Since the second databases of each tenant are independent of each other and have strong data isolation, they can meet the security and personalization requirements of data management. The exclusive data can be obtained from each second database through the first user information, the second user information and the third user information, and the exclusive data of each second database can be centrally converted and displayed, which is flexible.
[0096] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the locally deployed tenant data management method as described above.
[0097] In the above embodiment, the present application discloses a computer-readable storage medium. By simultaneously deploying a shared database and an exclusive database locally, the shared data of different tenants can be uniformly managed in a first database, and some information of the tenants can be centrally managed, while the exclusive data exists in the second database of the tenant. Since the second databases of each tenant are independent of each other and have strong data isolation, they can meet the security and personalization requirements of data management. The exclusive data can be obtained from each second database through the first user information, the second user information and the third user information, and the exclusive data of each second database can be centrally converted and displayed, which is flexible.
[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0099] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0100] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A locally deployed tenant data management method, characterized in that: include: Acquire first user information from a first database, where the first database is a tenant shared database; receiving a user login request from a user terminal, parsing the user login request to obtain second user information, matching a tenant system according to the first user information and the second user information, and logging in to the tenant system according to the second user information; The third user information is obtained from a second database, where the second database is an exclusive database of the tenant system. Target data is matched from the second database according to the first user information, the second user information, and the third user information, and the target data is converted into display data for display on the user end.
2. The locally deployed tenant data management method according to claim 1, characterized in that: When multiple tenant systems are matched according to the first user information and the second user information, the step of logging into the tenant system according to the second user information includes: receiving a user operation of the user terminal, determining a target tenant system from the multiple tenant systems according to the user operation, and logging in to the target tenant system according to the second user information; The matching of target data from the second database according to the first user information, the second user information and the third user information comprises: Determine whether the user currently requesting login is the target user based on the first user information and the second user information; if so, match the target data in the second database corresponding to the multiple tenant systems based on the first user information and the second user information; otherwise, match the target data in the second database corresponding to the target tenant system based on the second user information and the third user information.
3. The locally deployed tenant data management method according to claim 2, characterized in that: If the user currently requesting login is the target user, the method further includes: matching a management system according to the first user information and the second user information; Receive user operations from the user terminal, log in to the management system according to the second user information, update the first user information in the first database through the management system, and enable the tenant system to update the third user information in the second database based on the updated first user information.
4. The locally deployed tenant data management method according to claim 3, characterized in that: The first user information includes at least a user identifier, a user affiliation identifier, and a corresponding mapping relationship, wherein the user identifier has a mapping relationship with at least one of the user affiliation identifiers, and the user affiliation identifier has a mapping relationship with one of the multiple tenant systems; The updating of the third user information in the second database based on the updated first user information includes: When the user affiliation identifier is updated, synchronizing the updated user affiliation identifier and its mapping relationship to the second database of the corresponding tenant system to update the third user information; When the user identifier is updated, determine whether there is a user identifier with a mapping relationship. If so, synchronize the updated user identifier and its mapping relationship to the second database of the corresponding tenant system to update the third user information. Otherwise, directly synchronize the updated user identifier to the second database of each tenant system, and periodically query whether the updated user identifier has a user identifier with a mapping relationship, and update the third user information after it is transmitted.
5. The locally deployed tenant data management method according to claim 2, characterized in that: The determining whether the user currently requesting login is a target user according to the first user information and the second user information includes: Based on the second user information, whether the first permission of the user currently requesting to log in is matched in the first user information meets the preset condition, and if so, determining that the user currently requesting to log in is the target customer; The matching of target data in the second database corresponding to the multiple tenant systems based on the first user information and the second user information includes: Reading initial data matching the first permission from the second database according to the first permission, performing desensitization processing on the initial data, and obtaining the target data; The matching target data from the second database corresponding to the target tenant system based on the second user information and the third user information includes: Based on the second user information matching the second permission of the currently logged-in user in the third user information, initial data matching the second permission is read from the second database according to the second permission, and the initial data is desensitized to obtain the target data.
6. The locally deployed tenant data management method according to any one of claims 1 to 5, characterized in that: When no tenant system is matched according to the first user information and the second user information, the method further includes feeding back an abnormal prompt to the client.
7. The locally deployed tenant data management method according to any one of claims 1 to 5, characterized in that: The converting the target data into display data and displaying it on the user end includes: A data display rule is obtained, the target data of each tenant system is screened according to the data display rule, and a chart is generated based on the screened data as display data.
8. A data management system, characterized in that: The data management system is connected to the user end and the tenant system respectively through a network. The data management system can implement the steps of the locally deployed tenant data management method according to any one of claims 1 to 7. The data management system includes: A data acquisition unit, configured to acquire first user information from a first database, where the first database is a tenant shared database; a routing unit, configured to receive a user login request from a user terminal, parse the user login request to obtain second user information, match a tenant system according to the first user information and the second user information, and log in to the tenant system according to the second user information; A data processing unit is used to obtain third user information from a second database, where the second database is an exclusive database of the tenant system, match target data from the second database according to the first user information, the second user information and the third user information, and convert the target data into display data for display at the user end.
9. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the locally deployed tenant data management method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the locally deployed tenant data management method according to any one of claims 1 to 7 is implemented.
