Authority control method, system and equipment based on database synchronization and storage medium

By grouping and transferring permissions to control the control pages of IoT devices, conflicts and security risks caused by the simultaneous operation of multiple clients are solved, and permission management efficiency and security in the IoT environment are improved.

CN119397574APending Publication Date: 2025-02-07THE 711TH RES INST OF CHINA STATE SHIPBUILDING CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411521868.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing IoT permission management technology is difficult to effectively solve the conflicts, security risks and system function disorders caused by the simultaneous operation of multiple clients.

Method used

By grouping the control pages of IoT devices, they are divided into shared permission groups and exclusive permission groups. When receiving the permission transfer request of the exclusive permission group, they are determined whether they have received consent information. If they agree, they will release the control permissions. Otherwise, the control permissions will be restored.

Benefits of technology

It realizes the control of key control permissions in the IoT device control page, avoids command conflicts, security risks and system function disorders caused by the simultaneous operation of multiple pages, and improves the efficiency and security of permission management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397574A_ABST
    Figure CN119397574A_ABST
Patent Text Reader

Abstract

The invention discloses an authority control method, system and device based on database synchronization and a storage medium, and relates to the technical field of industrial Internet of Things. The method comprises the following steps: grouping control pages of the Internet of Things equipment, and dividing grouping types into two types: a shared permission group and an exclusive permission group; when permission transfer request information for the target exclusive permission group is received, judging whether permission transfer information for agreeing the target exclusive permission group is received or not; if yes, releasing the control permission of the target exclusive permission group; and if not, recovering the control authority of the target exclusive authority group. According to the method, the control pages of the Internet of Things equipment are grouped into the shared permission group and the exclusive permission group, the control permission of the pages in the exclusive permission group is owned by only one client, and the operation interface for distributing the pages for the groups is provided, so that a user can flexibly group the control pages of the Internet of Things equipment. And permission transfer control can be realized, and the problems of instruction conflict and the like caused by simultaneous operation of a plurality of pages are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of industrial Internet of Things, and in particular to a permission control method, system, device and storage medium based on database synchronization. Background Art

[0002] At present, the IoT permission management technologies mainly include role-based access control (RBAC), attribute-based access control (ABAC), multi-factor authentication (MFA), decentralized management using blockchain technology, device identification and registration systems, and encryption technology to ensure data security. These methods are targeted at different security needs and scenarios. For example, RBAC and ABAC focus on roles and attributes to determine access rights; MFA combines multiple factors to confirm user identity and enhance the security of user authentication; blockchain provides tamper-proof device identity authentication; device identification and registration ensure the uniqueness and controllability of each device; encryption technology protects information security during data transmission and storage. The comprehensive use of these technologies constitutes a comprehensive and flexible permission management system in the IoT environment.

[0003] In the above-mentioned permission management technologies, although identity authentication and permission control are core components, they often fail to fully solve the problem of exclusive access to key control permissions at the same time. Especially in terms of control permissions, if multiple clients are allowed to operate at the same time, it may cause conflicts, security risks and even system dysfunction. Summary of the invention

[0004] Purpose of the invention: An embodiment of the present application provides a permission control method based on database synchronization, aiming to overcome the technical problems in the prior art of multiple clients operating simultaneously, leading to conflicts, security risks, etc.; another purpose of an embodiment of the present application is to provide a permission control system based on database synchronization; the third purpose of the present application is to provide an electronic device; the fourth purpose of the present application is to provide a computer-readable storage medium.

[0005] Technical solution: A permission control method based on database synchronization described in an embodiment of the present application is applied to an Internet of Things device, and the method includes:

[0006] The control pages of the IoT device are grouped, and the grouping types are divided into two categories: a shared permission group and an exclusive permission group; wherein the control permission of the page in the exclusive permission group is owned by only one client; and the control permission of the page in the shared permission group is owned by one or more clients;

[0007] When receiving permission transfer request information for a target exclusive permission group, determine whether permission transfer information approving the target exclusive permission group is received; if yes, release the control permission of the target exclusive permission group; if no, restore the control permission of the target exclusive permission group.

[0008] In some embodiments, the permission control method based on database synchronization further includes:

[0009] When receiving permission transfer request information for a target exclusive permission group, the state of the current permission owner of the target exclusive permission group is changed from the control state to the pending confirmation state, and the state of the current permission transfer requester is changed from the observation state to the requesting state;

[0010] Upon receiving permission transfer information for the target exclusive permission group, the status of the current permission owner of the target exclusive permission group is changed from the pending confirmation status to the observation status, and the status of the current permission transfer requester is changed from the requesting status to the controlling status;

[0011] When receiving permission transfer information rejecting the target exclusive permission group, the state of the current permission owner of the target exclusive permission group is changed from the pending confirmation state to the control state, and the state of the current permission transfer requester is changed from the requesting state to the observing state.

[0012] In some embodiments, the permission control method based on database synchronization further includes:

[0013] Upon receiving permission transfer request information for a target exclusive permission group, determining whether the permission transfer request information for the target exclusive permission group is an override request information, and if so, releasing the control permission of the target exclusive permission group;

[0014] Otherwise, determine whether permission transfer information approving the target exclusive permission group is received; if yes, release the control permission of the target exclusive permission group; if no, restore the control permission of the target exclusive permission group.

[0015] In some embodiments, the permission control method based on database synchronization further includes:

[0016] When the permission transfer request information for the target exclusive permission group is an override request information, the state of the current permission transfer requester is modified from an observation state to a control state.

[0017] In some embodiments, the permission control method based on database synchronization further includes:

[0018] Different clients are configured with different databases and servers, and the business services, databases, data receiving services, and command issuing services corresponding to the same client are deployed on the same corresponding server.

[0019] In some embodiments, the permission control method based on database synchronization further includes: establishing a permission group data table and a relationship table between the client and the permission group in a database corresponding to each client.

[0020] In some embodiments, the permission group data table includes four fields, namely, id data primary key, transfer_type permission group permission transfer type, mimic_ids permission group page array, and position_ids permission to the client;

[0021] The client and permission group relationship table includes five fields, namely, id data primary key, group_id permission group id, position_id client id, status_type client status for permission group, and to_position_id target position id of permission during permission transfer.

[0022] In some embodiments, in the relationship table between the client and the permission group, for a shared permission group, the mimic_ids is data consisting of multiple client ids; for an exclusive permission group, the mimic_ids is a client id.

[0023] In some embodiments, the permission control method based on database synchronization further includes: setting a permission transfer request interface, a permission transfer request acceptance interface, and a permission transfer request rejection interface;

[0024] A permission group adding interface, a permission group list query interface, a permission group batch deletion interface, a permission group configuration update interface and a client permission status query interface are respectively set for the permission group data table and the client and permission group relationship table.

[0025] Accordingly, the permission control system based on database synchronization described in the embodiment of the present application is applied to an Internet of Things device, and the system includes:

[0026] A grouping module, used to group the control pages of the IoT device into a shared permission group and an exclusive permission group; wherein the control permission of the page in the exclusive permission group is owned by only one client; and the control permission of the page in the shared permission group is owned by one or more clients;

[0027] The permission transfer module is used to determine whether permission transfer information approving the target exclusive permission group is received when receiving permission transfer request information for the target exclusive permission group; if yes, release the control permission of the target exclusive permission group; if not, restore the control permission of the target exclusive permission group.

[0028] Correspondingly, an electronic device described in an embodiment of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above-mentioned permission control method based on database synchronization when executing the computer program.

[0029] Correspondingly, a computer-readable storage medium described in an embodiment of the present application stores a computer program thereon, and when the computer program is executed by a processor, the above-mentioned permission control method based on database synchronization is implemented.

[0030] Beneficial effect: Compared with the prior art, the permission control method, system, device and storage medium based on database synchronization of the embodiment of the present application, the permission control method based on database synchronization includes: grouping the control pages of the Internet of Things device, and dividing the grouping types into two categories: shared permission group and exclusive permission group; wherein, the control permission of the page in the exclusive permission group is owned by only one client; the control permission of the page in the shared permission group is owned by one or more clients; when receiving the permission transfer request information for the target exclusive permission group, it is determined whether the permission transfer information agreeing to the target exclusive permission group is received; if yes, the control permission of the target exclusive permission group is released; if not, the control permission of the target exclusive permission group is restored. It can be seen that by grouping the control pages of the Internet of Things device into shared permission groups and exclusive permission groups, and the control permission of the pages in the exclusive permission group is owned by only one client, and providing an operation interface for allocating pages to groups, users can flexibly group the control pages of the Internet of Things device and manage the control permissions of the Internet of Things devices in batches based on groups. In addition, this method can also realize the permission transfer control of exclusive permission groups, thereby realizing the control of key control permissions or specific control permissions in the control page of the Internet of Things device, avoiding command conflicts, security risks and even system dysfunction caused by simultaneous operation of multiple pages, improving the efficiency and security of permission management in the Internet of Things environment, and providing users with a more natural experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1 It is a flowchart of a permission control method based on database synchronization provided in an embodiment of the present application;

[0033] Figure 2 It is a system business architecture diagram provided in an embodiment of the present application;

[0034] Figure 3 It is a flowchart of the control authority transfer provided in the embodiment of the present application;

[0035] Figure 4 It is a logic diagram of processing a permission transfer request of a permission owner provided in an embodiment of the present application;

[0036] Figure 5 It is a schematic diagram of a system platform architecture provided in an embodiment of the present application;

[0037] Figure 6 It is a principle structure diagram of a permission control system based on database synchronization provided in an embodiment of the present application;

[0038] Figure 7 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application.

[0039] Reference numerals:

[0040] 10-Grouping module; 20-Authorization transfer module; 100-Authorization control system based on database synchronization. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0042] It should be understood that although the terms first, second, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.

[0043] Those skilled in the art will appreciate that the drawings are only schematic diagrams of example embodiments and may not be to scale. The modules or processes in the drawings are not necessarily required to implement the present application and therefore cannot be used to limit the scope of protection of the present application.

[0044] Figure 1 This is a flowchart of a permission control method based on database synchronization provided in an embodiment of the present application. This method can be applied to the IoT device management platform to implement permission management and control of the control page of the IoT device, avoiding problems such as instruction conflicts caused by simultaneous operation of multiple pages. This method can be executed by a permission control system based on database synchronization, which can be implemented by software and / or hardware, and can be configured in the processor of the IoT device management platform. Please refer to Figure 1 , the method comprises the following steps:

[0045] Step 110: Group the control pages of the IoT devices, and divide the grouping types into two categories: a shared permission group and an exclusive permission group.

[0046] Among them, the control permission of the page in the exclusive permission group is owned by only one client; the control permission of the page in the shared permission group is owned by one or more clients. In other words, the exclusive permission group means that there is only one client among multiple clients that can control the page of the exclusive permission group. The client with the control permission of the exclusive permission group is called the owner of the group, and other clients without control permission are called observers of the group. For observers, they can view the status of the pages in the group, but cannot click the control buttons therein, that is, they have no control permission over the pages, thus avoiding the command conflict problem caused by simultaneous operation of multiple pages. Among them, the shared permission group means that multiple clients can operate the pages belonging to the shared permission group at the same time.

[0047] Among them, when the control pages of the Internet of Things devices are grouped, they may be grouped into one or more shared permission groups and / or one or more exclusive permission groups. The specific grouping situation is related to the actual Internet of Things devices and is not specifically limited here.

[0048] Among them, both the exclusive permission group and the shared permission group may include one or more pages, wherein each page may include one or more IoT devices.

[0049] Among them, one exclusive permission group corresponds to only one client, and different exclusive permission groups may correspond to different clients or the same client. The same client may belong to both a shared permission group and an exclusive permission group.

[0050] Figure 2 This is a system business architecture diagram provided in the embodiment of this application. Figure 2 For example, the grouping of the control pages of IoT devices includes a shared permission group A and three exclusive permission groups (exclusive permission group B, exclusive permission group C and exclusive permission group D). The relationship between the client, page group, page and device is as follows: Figure 2As shown in the system architecture diagram, there are three clients in the figure, namely client OS1, client OS2 and client OS3. Among them, shared permission group A contains pages a and b. Page a contains buttons for controlling switch 1 and switch 2, and page b contains buttons for controlling switch 3. Because the shared permission group allows multiple clients to control together, and both client OS1 and client OS3 point to shared permission group A, it means that these two clients have the permission to control pages a and b, that is, they are allowed to modify the status of switch 1, switch 2 and switch 3. Since client OS2 does not have the permission of shared permission group A, it cannot control switch 1, switch 2 and switch 3. Among them, the relationship between the shared permission group and the client is determined by the administrator configuration, and dynamic transfer is not allowed and it cannot be requested.

[0051] Continue reading Figure 2 , client OS2 is the owner of exclusive permission group B and exclusive permission group C, and has control over pages c, d, and e, so client OS2 can set the status of switch 4, switch 5, switch 6, and switch 7. Similarly, client OS3, in addition to the control permissions of switch 1, switch 2, and switch 3 inherited from shared permission group A, also obtains the control permission of switch 8 from exclusive permission group D.

[0052] In addition, the present application can also provide an operating interface for group allocation pages, which is used to present the various clients, permission group classifications, page groups, and the relationship between pages and devices of the IoT device to the user, making it easier for the user to view and operate, so that the user can flexibly group the control pages of the IoT device.

[0053] Step 120: upon receiving permission transfer request information for the target exclusive permission group, determine whether permission transfer information approving the target exclusive permission group is received; if yes, release the control permission of the target exclusive permission group; if no, restore the control permission of the target exclusive permission group.

[0054] Among them, the relationship between the shared permission group and the client is determined by the administrator configuration, and dynamic transfer is not allowed and cannot be requested. The relationship between the exclusive permission group and the client allows dynamic transfer and can be requested, and the page control permissions of the exclusive permission group can drift. When it is necessary to operate key control permissions or feature control permissions, this method can ensure that at any given moment, only one client can exercise specific control permissions or key control permissions, thereby avoiding multiple clients operating at the same time, which may cause conflicts, security risks and even system dysfunction. The problem improves the efficiency and security of permission management in the Internet of Things environment and provides users with a more natural and seamless experience.

[0055] In the technical solution of this embodiment, the working principle of the permission control method based on database synchronization is as follows: Figure 1 First, the control pages of the IoT devices are grouped, and the grouping types are divided into two categories: shared permission groups and exclusive permission groups. Among them, the control permission of the pages in the exclusive permission group is owned by only one client, and an operation interface for allocating pages to the group is provided; the control permission of the pages in the shared permission group is owned by one or more clients. Then, when the permission transfer request information for the target exclusive permission group is received, it is determined whether the permission transfer information agreeing to the target exclusive permission group is received; if so, the control permission of the target exclusive permission group is released; if not, the control permission of the target exclusive permission group is restored. Therefore, by grouping the control pages of the IoT devices into shared permission groups and exclusive permission groups, and the control permission of the pages in the exclusive permission group is owned by only one client, and an operation interface for allocating pages to the group is provided, users can flexibly group the control pages of the IoT devices and manage the control permissions of the IoT devices in batches based on groups. In addition, this method can also realize the permission transfer control of exclusive permission groups, thereby realizing the control of key control permissions or specific control permissions in the control page of the Internet of Things device, avoiding command conflicts, security risks and even system dysfunction caused by simultaneous operation of multiple pages, improving the efficiency and security of permission management in the Internet of Things environment, and providing users with a more natural experience.

[0056] In some embodiments, the permission control method based on database synchronization also includes: when receiving permission transfer request information for the target exclusive permission group, the status of the current permission owner of the target exclusive permission group is changed from the control status to the pending confirmation status, and the status of the current permission transfer requester is changed from the observation status to the requesting status; when receiving permission transfer information approving the target exclusive permission group, the status of the current permission owner of the target exclusive permission group is changed from the pending confirmation status to the observation status, and the status of the current permission transfer requester is changed from the requesting status to the control status; when receiving permission transfer information rejecting the target exclusive permission group, the status of the current permission owner of the target exclusive permission group is changed from the pending confirmation status to the control status, and the status of the current permission transfer requester is changed from the requesting status to the observation status.

[0057] Figure 3 is a flow chart of the control authority transfer provided in the embodiment of the present application. For example, please refer to Figure 3 , taking the permission transfer of exclusive permission group B as an example to explain the permission transfer control. Permission transfer includes two situations: the owner agrees to the permission transfer and the owner refuses the permission transfer. Figure 3, where the left side is the sequential logic of the permission owner client of exclusive permission group B agreeing to the permission request of the permission transfer requester. When the permission transfer requester initiates the permission transfer request for exclusive permission group B, its status for exclusive permission group B changes from the observation status to the requesting status. At the same time, after the permission owner of exclusive permission group B receives the permission transfer request for exclusive permission group B initiated by the requester, its status changes from the control status to the pending confirmation status. After agreeing to the permission transfer of exclusive permission group B, the status of the original permission owner changes from the pending confirmation status to the observation status, and the status of the permission transfer requester changes from the requesting status to the control status, thus completing a permission transfer. Figure 3 , where the right side is the timing logic of the permission owner client of exclusive permission group B rejecting the permission request of the permission transfer requester. When the permission transfer requester initiates the permission transfer request for exclusive permission group B, its status for exclusive permission group B changes from the observation status to the requesting status. At the same time, after the permission owner of exclusive permission group B receives the permission transfer request for exclusive permission group B initiated by the requester, its status changes from the control status to the pending confirmation status. After rejecting the permission transfer of exclusive permission group B, the status of the original permission owner is restored from the pending confirmation status to the control status, and the status of the permission transfer requester is restored from the requesting status to the observation status.

[0058] In some embodiments, the permission control method based on database synchronization also includes: when receiving permission transfer request information for the target exclusive permission group, determining whether the permission transfer request information for the target exclusive permission group is an override request information, and if so, releasing the control permission of the target exclusive permission group; otherwise, determining whether permission transfer information agreeing to the target exclusive permission group is received; if so, releasing the control permission of the target exclusive permission group; if not, restoring the control permission of the target exclusive permission group.

[0059] In the process of transferring the rights of the exclusive rights group, an override management is also set. When encountering an emergency, the administrator can force the transfer of rights through an override operation. This can ensure the rights management in emergency situations, avoid causing safety accidents, and thus improve the security of the system.

[0060] Figure 4 This is a logic diagram of the permission owner permission transfer request processing provided in the embodiment of this application. For example, please refer to Figure 4 When receiving permission transfer request information for the target exclusive permission group, the permission owner client of the target exclusive permission group first determines whether the permission transfer request information is an override request information. If so, the permission of the target exclusive permission group is directly released. Otherwise, the permission owner of the target exclusive permission group needs to further confirm whether he agrees to the permission transfer before the permission drifting behavior can be completed.

[0061] In some embodiments, the permission control method based on database synchronization further includes: when the permission transfer request information for the target exclusive permission group is an override request information, modifying the state of the current permission transfer requester from an observation state to a control state.

[0062] Specifically, when encountering an emergency, the administrator can force the transfer of permissions through an override operation. Override means that a client in the observation state can directly obtain the control permission of the target exclusive permission group without the consent of the permission owner after entering the override password (that is, the status of the current permission requester is changed from observation state to control state), and the original permission owner is deprived of the permission to the specified group.

[0063] In some embodiments, the permission control method based on database synchronization also includes: configuring different clients with different databases and servers, and deploying the business services, databases, data receiving services and command issuing services corresponding to the same client on the corresponding same server.

[0064] Usually, the IoT platform has a database system for receiving data reported by the data acquisition terminal and user configuration information. The client also obtains data from the database and presents the information in the database to the user through data visualization technology. The user's control operations on the client are also written into the database, that is, all data is stored in a central database, and the business service, database, data receiving service, and command issuing service are all on the same server (assuming that the server corresponds to device 1, device 2, and device 3). Assuming that there are client 1 and client 2, they obtain data from the same database. In other words, when the client sends a control instruction to the business service program, the business service program saves the instruction to the database, and the command issuing service program takes the instruction from the database and sends the instruction to the lower-level device. Since client 1 and client 2 share the same database, client 2 will also perceive the instruction sent by client 1. In the case of this shared database, it is not difficult to achieve permission drift because there is data sharing. However, this architecture has a disadvantage, that is, it must ensure that the network of device 1, device 2, device 3 and data acquisition service is always unobstructed, otherwise the data collected by the device will be lost because it cannot be reported to the server. And the network between the client and the business service should also be kept unobstructed, otherwise the client will not be able to load the client page because it cannot obtain data from the server, reducing the availability of the system. To this end, the embodiment of the present application configures different databases and servers for different clients, and deploys the business services, databases, data receiving services and command issuing services corresponding to the same client on the corresponding same server. This architecture setting can load the client page normally even if a client is disconnected from the network with all other clients, greatly improving the availability of the system. Because the service end and the client are deployed on the same server, the data service can be accessed by opening the client. In addition, because the service end is deployed in a distributed manner, the server can be deployed as close to the collection end as possible, greatly reducing the risk that the collected data cannot be reported. And because each server has its own database, even if the network between the servers is disconnected, the data will not be lost, but stored in each server. After the network communication is restored, the data synchronization service can be automatically performed through the data synchronization program to ensure the consistency of the data between the servers.

[0065] Figure 5 Schematic diagram of a system platform architecture provided in the embodiment of the present application. For example, the sharing of the permission status of the permission transfer is realized through database synchronization. The specific process is as follows: Figure 5, taking client 1 and client 2 as examples, the business service, database 1, data receiving service, and command issuing service corresponding to client 1 are all deployed on the same server 1. Similarly, the business service, database 2, data receiving service, and command issuing service corresponding to client 2 are all deployed on the same server 2. Assuming that the current control authority of exclusive permission group B belongs to client 2, when client 1 requests the control authority of exclusive permission group B, it changes its own status of exclusive permission group B in database 1 to the requesting state, and changes the status of client 2 for exclusive permission group B to the pending confirmation state. Because there is database synchronization, that is, the data of database 1 in server 1 will be synchronized to database 2 in server 2. Client 2 finds that its status of exclusive permission group B has been modified through polling, and will notify the user to confirm whether to transfer the authority. If the user confirms the authority transfer, client 2 changes its own status of exclusive permission group B in database 2 to the observation state, and client 1 changes its status of exclusive permission group B to the control state, and notifies client 1 of the authority drift event through database synchronization. After client 1 finds that it has the control authority of exclusive permission group B through polling, the user's control operation is allowed. If the user of client 2 refuses the permission transfer, the status of the exclusive permission group B in database 2 will be modified to the control status, and the status of client 1 for exclusive permission group B will be changed to the observation status, which will also be notified to client 1 through the database synchronization mechanism, thereby realizing the recovery of control permissions.

[0066] In some embodiments, the permission control method based on database synchronization further includes establishing a permission group data table and a relationship table between the client and the permission group in a database corresponding to each client.

[0067] Each client has a corresponding database, and the information between the databases is synchronized. In the database corresponding to each client, a permission group data table and a relationship table between the client and the permission group are established.

[0068] The permission group data table group_data, in addition to recording the permission group information, also records the relationship between the permission group and the page component.

[0069] In some embodiments, the permission group data table includes four fields, namely, id data primary key, transfer_type permission group permission transfer type, mimic_ids permission group page array and position_ids permission to which the client belongs; wherein, the client and permission group relationship table includes five fields, namely, id data primary key, group_id permission group id, position_id client id, status_type client status for the permission group, and to_position_id permission transfer process target position id.

[0070] The permission group data table group_data mainly contains four core fields: id is the data primary key, transfer_type is the permission transfer type of the permission group, mimic_ids is an array of page ids belonging to the permission group, and position_ids is the client to which the permission belongs. Among them, transfer_type is divided into two types: shared and exclusive. Figure 2 The type of permission group is determined by this field.

[0071] Among them, the client and permission group relationship table group_client_relation mainly contains 5 fields: id is the data primary key, group_id represents the permission group id, position_id represents the client id, status_type represents the client's status for the permission group, and to_position_id represents the target position id of the permission during the permission drift process. Among them, there are 5 types of status_type client status for the permission group, namely: shared sharing status, In command control status, Not in command observation status, Requesting permission request status, Confirming permission confirmation status. Among them, to_position_id is the client in the observation state. After clicking the permission transfer application, the client will register its own id in the database, which is similar to the broadcast mechanism to notify other clients which client is applying for permission. The permission owner also knows to whom to transfer the permission through this field. In addition to the above 5 key fields, the table also includes non-core fields such as record creation time create_time, record creator create_by, record update time update_time, and record updater update_by.

[0072] In some embodiments, in the relationship table between clients and permission groups, for a shared permission group, mimic_ids is data consisting of multiple client ids; for an exclusive permission group, mimic_ids is a client id.

[0073] Among them, mimic_ids is an array of page IDs belonging to the permission group. For shared permission groups, this field is an array of multiple client IDs. For exclusive permission groups, this field is required and only one client ID can be filled in. During the permission transfer process, this field will change dynamically.

[0074] In some embodiments, the permission control method based on database synchronization also includes: setting a permission transfer request interface, a permission transfer request acceptance interface and a permission transfer request rejection interface; and setting a permission group addition interface, a permission group list query interface, a permission group batch deletion interface, a permission group configuration update interface and a client permission status query interface for the permission group data table and the relationship table between the client and the permission group respectively.

[0075] The server implements the add, delete, modify and query interfaces for the above two tables to implement front-end configuration Figure 2 In relation to Figure 2 The interfaces for relationship settings in the main include permission group adding interface, permission group list query interface, permission group batch deletion interface, permission group configuration update interface, and client permission status query interface.

[0076] Among them, the interfaces for the server to implement permission transfer mainly include permission transfer request interface, permission transfer request acceptance interface and permission transfer request rejection interface.

[0077] Among them, the request parameters for the implementation of the permission transfer request interface are:

[0078] {

[0079] "groupId":1712713360578

[0080] }

[0081] Among them, groupId is the permission group id. The server can obtain its own client id, query the group_client_relation client and permission group relationship table according to groupId, obtain the owner of the permission group, and modify the corresponding status field. The return response contains whether the request is sent successfully. The SQL statement to modify the database is: update group_dataset status_type=?, to_position_id where group_id=?. Among them, status_type is the 5 states mentioned above, to_position_id is the obtained client's own id, and group_id is the permission group id.

[0082] Among them, the request parameter of the permission transfer request rejection interface only needs to pass a groupId. The SQL statement to modify the database is: update group_data set status_type=1,to_position_id=NULLwhere group_id=? In the database, status_type is represented by a number. For example, here 1 means it is in a controlled state. Because it is a permission application request rejection, the permission owner remains unchanged, and the position_id in group_data is not modified. After the rejection, to_position_id is reset to NULL, indicating that the request is withdrawn.

[0083] Among them, the request parameter of the permission transfer request acceptance interface also only needs to pass a groupId, and the SQL statement for modifying the database is: update group_data set status_type=2, position_id=to_position_id, to_position_id=NULL where group_id=? The main difference from the permission transfer request rejection interface is that the value of to_position_id is assigned to position_id to realize the real transfer of control rights, and to_position_id is modified to NULL, indicating that the transfer has been completed, and it is no longer necessary to record the transfer target client id.

[0084] Figure 6 It is a principle structural block diagram of a permission control system based on database synchronization provided in an embodiment of the present application. Correspondingly, an permission control system based on database synchronization is also provided in an embodiment of the present application, and the system 100 includes: a grouping module 10, which is used to group the control pages of the IoT device, and divide the grouping types into two categories: a shared permission group and an exclusive permission group; wherein the control permission of the page in the exclusive permission group is owned by only one client; the control permission of the page in the shared permission group is owned by one or more clients; a permission transfer module 20, which is used to determine whether permission transfer information of the target exclusive permission group is received when receiving permission transfer request information for the target exclusive permission group; if yes, release the control permission of the target exclusive permission group; if not, restore the control permission of the target exclusive permission group.

[0085] The technical solution of this embodiment provides a permission control system based on database synchronization, which includes: a grouping module, which is used to group the control pages of the Internet of Things devices, and divide the grouping types into two categories: shared permission groups and exclusive permission groups; wherein the control permission of the pages in the exclusive permission group is owned by only one client; the control permission of the pages in the shared permission group is owned by one or more clients; a permission transfer module, which is used to determine whether the permission transfer information of the target exclusive permission group is received when receiving the permission transfer request information for the target exclusive permission group; if yes, release the control permission of the target exclusive permission group; if not, restore the control permission of the target exclusive permission group. It can be seen that by grouping the control pages of the Internet of Things devices into shared permission groups and exclusive permission groups, and the control permission of the pages in the exclusive permission group is owned by only one client, and providing an operation interface for assigning pages to groups, users can flexibly group the control pages of the Internet of Things devices and manage the control permissions of the Internet of Things devices in batches based on groups. In addition, this method can also realize the permission transfer control of exclusive permission groups, thereby realizing the control of key control permissions or specific control permissions in the control page of the Internet of Things device, avoiding command conflicts, security risks and even system dysfunction caused by simultaneous operation of multiple pages, improving the efficiency and security of permission management in the Internet of Things environment, and providing users with a more natural experience.

[0086] In some embodiments, the permission transfer module is also used to: when receiving permission transfer request information for the target exclusive permission group, change the status of the current permission owner of the target exclusive permission group from the control status to the pending confirmation status, and change the status of the current permission transfer requester from the observation status to the requesting status; when receiving permission transfer information approving the target exclusive permission group, change the status of the current permission owner of the target exclusive permission group from the pending confirmation status to the observation status, and change the status of the current permission transfer requester from the requesting status to the control status; when receiving permission transfer information rejecting the target exclusive permission group, change the status of the current permission owner of the target exclusive permission group from the pending confirmation status to the control status, and change the status of the current permission transfer requester from the requesting status to the observation status.

[0087] In some embodiments, the permission transfer module is also used to: when receiving permission transfer request information for the target exclusive permission group, determine whether the permission transfer request information for the target exclusive permission group is an override request information, and if so, release the control permission of the target exclusive permission group; otherwise, determine whether permission transfer information agreeing to the target exclusive permission group is received; if so, release the control permission of the target exclusive permission group; if not, restore the control permission of the target exclusive permission group.

[0088] In some embodiments, the permission transfer module is further used to: when the permission transfer request information for the target exclusive permission group is an override request information, modify the state of the current permission transfer requester from the observation state to the control state.

[0089] In some embodiments, the permission control system based on database synchronization also includes a configuration module for configuring different clients with different databases and servers, and deploying the business services, databases, data receiving services and command issuing services corresponding to the same client on the corresponding same server.

[0090] In some embodiments, the configuration module is further used to: establish a permission group data table and a client-permission group relationship table in a database corresponding to each client.

[0091] In some embodiments, the permission group data table includes four fields, namely, id data primary key, transfer_type permission group permission transfer type, mimic_ids permission group page array and position_ids permission to which the client belongs; wherein, the client and permission group relationship table includes five fields, namely, id data primary key, group_id permission group id, position_id client id, status_type client status for the permission group, and to_position_id target position id of the permission during the permission transfer process.

[0092] In some embodiments, in the relationship table between clients and permission groups, for a shared permission group, mimic_ids is data consisting of multiple client ids; for an exclusive permission group, mimic_ids is a client id.

[0093] In some embodiments, the permission control system based on database synchronization also includes an interface setting module, which is used to set a permission transfer request interface, a permission transfer request acceptance interface and a permission transfer request rejection interface; and respectively sets a permission group addition interface, a permission group list query interface, a permission group batch deletion interface, a permission group configuration update interface and a client permission status query interface for the permission group data table and the relationship table between the client and the permission group.

[0094] Accordingly, the present application also provides an electronic device, see Figure 7 , Figure 7 The structure diagram of the electronic device of the embodiment of the present application is illustrated. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned permission control method based on database synchronization are implemented. Since the permission control method based on database synchronization is described in detail above, it will not be repeated here.

[0095] Accordingly, the embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned permission control method based on database synchronization are implemented. Since the permission control method based on database synchronization is described in detail above, it will not be repeated here.

[0096] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0097] The above is a detailed introduction to the permission control method, system, device and storage medium based on database synchronization provided in the embodiments of the present application, and the principles and implementation methods of the present application are explained by using specific examples. The description of the above embodiments is only used to help understand the technical solution and core idea of ​​the present application; ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents; and these modifications or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present application.

Claims

1. A permission control method based on database synchronization, characterized in that: Applied to an IoT device, the method comprises: The control pages of the IoT device are grouped, and the grouping types are divided into two categories: a shared permission group and an exclusive permission group; wherein the control permission of the page in the exclusive permission group is owned by only one client; and the control permission of the page in the shared permission group is owned by one or more clients; When receiving permission transfer request information for a target exclusive permission group, determine whether permission transfer information approving the target exclusive permission group is received; if yes, release the control permission of the target exclusive permission group; if not, restore the control permission of the target exclusive permission group.

2. The permission control method based on database synchronization according to claim 1 is characterized in that: Also includes: When receiving permission transfer request information for a target exclusive permission group, the state of the current permission owner of the target exclusive permission group is changed from the control state to the pending confirmation state, and the state of the current permission transfer requester is changed from the observation state to the requesting state; Upon receiving permission transfer information for the target exclusive permission group, the status of the current permission owner of the target exclusive permission group is changed from the pending confirmation status to the observation status, and the status of the current permission transfer requester is changed from the requesting status to the controlling status; When receiving permission transfer information rejecting the target exclusive permission group, the state of the current permission owner of the target exclusive permission group is changed from the pending confirmation state to the control state, and the state of the current permission transfer requester is changed from the requesting state to the observing state.

3. The permission control method based on database synchronization according to claim 1 is characterized in that: Also includes: Upon receiving permission transfer request information for a target exclusive permission group, determining whether the permission transfer request information for the target exclusive permission group is an override request information, and if so, releasing the control permission of the target exclusive permission group; Otherwise, determine whether permission transfer information for agreeing to the target exclusive permission group is received; If yes, release the control permission of the target exclusive permission group; If not, the control authority of the target exclusive authority group is restored.

4. The permission control method based on database synchronization according to claim 3 is characterized in that: Also includes: When the permission transfer request information for the target exclusive permission group is an override request information, the state of the current permission transfer requester is modified from an observation state to a control state.

5. The permission control method based on database synchronization according to claim 1 is characterized in that: Also includes: Different clients are configured with different databases and servers, and the business services, databases, data receiving services, and command issuing services corresponding to the same client are deployed on the same corresponding server.

6. The permission control method based on database synchronization according to claim 5 is characterized in that: Also includes: In the database corresponding to each client, a permission group data table and a relationship table between the client and the permission group are established.

7. The permission control method based on database synchronization according to claim 6 is characterized in that: The permission group data table includes four fields, namely, id data primary key, transfer_type permission group permission transfer type, mimic_ids permission group page array and position_ids permission to the client; The client and permission group relationship table includes five fields, namely, id data primary key, group_id permission group id, position_id client id, status_type client status for permission group, and to_position_id target position id of permission during permission transfer.

8. The permission control method based on database synchronization according to claim 7 is characterized in that: In the client-permission group relationship table, for a shared permission group, the mimic_ids is data consisting of multiple client ids; for an exclusive permission group, the mimic_ids is a client id.

9. The permission control method based on database synchronization according to claim 6 is characterized in that: Also includes: Set up permission transfer request interface, permission transfer request acceptance interface and permission transfer request rejection interface; A permission group adding interface, a permission group list query interface, a permission group batch deletion interface, a permission group configuration update interface and a client permission status query interface are respectively set for the permission group data table and the client and permission group relationship table.

10. A permission control system based on database synchronization, characterized in that: Applied to IoT devices, the system includes: A grouping module, used to group the control pages of the IoT device into a shared permission group and an exclusive permission group; wherein the control permission of the page in the exclusive permission group is owned by only one client; and the control permission of the page in the shared permission group is owned by one or more clients; The permission transfer module is used to determine whether permission transfer information approving the target exclusive permission group is received when receiving permission transfer request information for the target exclusive permission group; if yes, release the control permission of the target exclusive permission group; if not, restore the control permission of the target exclusive permission group.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the permission control method based on database synchronization as described in any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the permission control method based on database synchronization as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method for managing virtual unit through multiple strategies

    CN105306594A

  • Page access control method and device and electronic equipment

    CN111177672A

  • Resource allocation method and device, electronic equipment and storage medium

    CN113626193A

  • Page permission control method and device

    CN114595484A

  • Management authority switching method and device, electronic equipment and storage medium

    CN115758304A