技术领域technical field
本发明涉及云计算领域,具体涉及一种账号共享控制方法和系统。The invention relates to the field of cloud computing, in particular to an account sharing control method and system.
背景技术Background technique
目前,云计算成为信息技术IT领域最热门的技术之一。随着信息科技的发展,云计算逐步成为业界的发展热点,国内外各大厂商的云计算服务平台也开始纷纷投入到科学、教育、文化、卫生、政府、高性能计算、电子商务、物联网等多个领域进行使用。At present, cloud computing has become one of the hottest technologies in the field of information technology IT. With the development of information technology, cloud computing has gradually become a hot spot in the industry, and cloud computing service platforms of major manufacturers at home and abroad have also begun to invest in science, education, culture, health, government, high-performance computing, e-commerce, and the Internet of Things. used in many fields.
随着云规模的不断扩大,云平台多采用多模块独立开发部署的方式,以满足云平台性能。同时,由于不同客户有不同的需求,云平台的各个模块系统都有自己的账号,问题也就伴随而来,如何通过一种方法,实现不同平台统一账号共享,避免用户在不同平台下使用不同账号。With the continuous expansion of the cloud scale, the cloud platform adopts the method of multi-module independent development and deployment to meet the performance of the cloud platform. At the same time, because different customers have different needs, each module system of the cloud platform has its own account, and the problem also arises. How to realize the unified account sharing of different platforms through a method, so as to prevent users from using different accounts on different platforms. account.
发明内容Contents of the invention
为了解决上述问题,本发明提出了一种账号共享控制方法和系统,能够实现不同平台统一账号共享,避免用户在不同平台下使用不同账号。。In order to solve the above problems, the present invention proposes an account sharing control method and system, which can realize unified account sharing on different platforms and prevent users from using different accounts on different platforms. .
为了达到上述目的,本发明提出了一种账号共享控制方法,该方法包括:In order to achieve the above object, the present invention proposes an account sharing control method, the method comprising:
检测用户账号的登录信息。Check the login information of the user account.
当检测到该登录信息时,通过预设的角色类型控制器判断该用户账号是否包含多种类型的角色,如果用户账号包含多种类型的角色,则根据预设策略从多种类型的角色中选定一种角色类型,并将选定的角色类型传入预设的角色合并控制器中;如果用户账号仅包含一种类型的角色,则直接将该角色类型传入角色合并控制器中。When the login information is detected, the preset role type controller is used to judge whether the user account contains multiple types of roles. Select a role type, and pass the selected role type into the preset role merging controller; if the user account contains only one type of role, directly pass the role type into the role merging controller.
通过角色合并控制器判断用户账号是否包含传入的角色类型下的多个角色,如果用户账号包含传入的角色类型下的多个角色,则将角色类型下的全部多个角色的权限放入预设的权限集合中,并将该权限集合传入预设的角色菜单控制器中,如果用户账号仅包含传入的角色类型下的一个角色,则直接获取该角色所具有的权限,并将该权限传入角色菜单控制器中。Use the role merging controller to determine whether the user account contains multiple roles under the incoming role type. If the user account contains multiple roles under the incoming role type, then put the permissions of all multiple roles under the role type into In the preset permission set, and pass the permission set to the preset role menu controller, if the user account only contains one role under the imported role type, the permission of the role will be obtained directly, and the This permission is passed into the role menu controller.
通过角色菜单控制器获得传入的权限集合或权限所对应的菜单码,并通过菜单码控制显示界面菜单的显示或控制多个菜单按钮的可用性。Obtain the incoming permission set or the menu code corresponding to the permission through the role menu controller, and control the display of the display interface menu or control the availability of multiple menu buttons through the menu code.
优选地,该方法还包括:Preferably, the method also includes:
预先设置用户账号与角色类型的第一对应关系,并将第一对应关系存储到角色类型控制器中,通过角色类型控制器对角色类型和第一对应关系进行更新和维护。The first corresponding relationship between the user account and the role type is preset, and the first corresponding relationship is stored in the role type controller, and the role type and the first corresponding relationship are updated and maintained by the role type controller.
预先设置角色类型与角色的第二对应关系,并将第二对应关系存储到角色合并控制器中,通过角色合并控制器对角色和第二对应关系进行更新和维护。The second corresponding relationship between role types and roles is preset, and the second corresponding relationship is stored in the role merging controller, and the roles and the second corresponding relationship are updated and maintained by the role merging controller.
预先设置角色与权限的第三对应关系,并将第三对应关系存储到角色合并控制器中,通过角色类型合并控制器对权限和第三对应关系进行更新和维护。The third corresponding relationship between roles and permissions is set in advance, and the third corresponding relationship is stored in the role merging controller, and the authority and the third corresponding relationship are updated and maintained through the role type merging controller.
预先设置权限与菜单码的第四对应关系,并将第四对应关系存储到角色菜单控制器中,通过角色菜单控制器对菜单码和第四对应关系进行更新和维护。The fourth corresponding relationship between the authority and the menu code is set in advance, and the fourth corresponding relationship is stored in the role menu controller, and the menu code and the fourth corresponding relationship are updated and maintained by the role menu controller.
优选地,Preferably,
通过预设的角色类型控制器判断用户账号是否包含多种类型的角色是指:通过登录信息中包含的用户账号以及角色类型控制器中存储的第一对应关系判断用户账号是否包含多种类型的角色。Judging whether the user account contains multiple types of roles through the preset role type controller means: judging whether the user account contains multiple types of roles based on the first correspondence between the user account contained in the login information and the role type controller. Role.
通过角色合并控制器判断用户账号是否包含传入的角色类型下的多个角色是指:通过传入角色合并控制器中的角色类型和角色合并控制器中存储的第二对应关系判断用户账号是否包含传入的角色类型下的多个角色。Judging whether the user account contains multiple roles under the incoming role type through the role merging controller refers to: judging whether the user account is based on the role type in the incoming role merging controller and the second corresponding relationship stored in the role merging controller. Contains multiple roles under the passed in role type.
该方法还包括:通过角色合并控制器获得的角色类型对应的角色,以及角色合并控制器中存储的第三对应关系获得角色对应的权限。The method also includes: obtaining the role corresponding to the role type obtained by the role merging controller, and obtaining the permission corresponding to the role from the third correspondence stored in the role merging controller.
通过角色菜单控制器获得传入的权限集合或权限所对应的菜单码是指:通过角色菜单控制器中存储的第四对应关系获得传入的权限集合或权限所对应的菜单码。Obtaining the incoming permission set or the menu code corresponding to the permission through the role menu controller means: obtaining the incoming permission set or the menu code corresponding to the permission through the fourth correspondence stored in the role menu controller.
为了达到上述目的,本发明还提出了一种账号共享控制系统,该系统包括:检测模块、第一判断模块、第二判断模块和控制模块。In order to achieve the above purpose, the present invention also proposes an account sharing control system, which includes: a detection module, a first judgment module, a second judgment module and a control module.
检测模块,用于检测用户账号的登录信息。The detection module is configured to detect the login information of the user account.
第一判断模块,用于当检测到登录信息时,判断用户账号是否包含多种类型的角色,如果用户账号包含多种类型的角色,则根据预设策略从多种类型的角色中选定一种角色类型,并将选定的角色类型传入预设的角色合并控制器中;如果用户账号仅包含一种类型的角色,则直接将该角色类型传入角色合并控制器中。The first judging module is used to judge whether the user account contains multiple types of roles when the login information is detected, and if the user account contains multiple types of roles, select one of the multiple types of roles according to a preset strategy type, and pass the selected role type into the preset role merging controller; if the user account contains only one type of role, directly pass the role type into the role merging controller.
第二判断模块,用于判断用户账号是否包含传入的角色类型下的多个角色,如果用户账号包含传入的角色类型下的多个角色,则将角色类型下的全部多个角色的权限放入预设的权限集合中,并将权限集合传入预设的角色菜单控制器中,如果用户账号仅包含传入的角色类型下的一个角色,则直接获取该角色所具有的权限,并将该权限传入角色菜单控制器中。The second judging module is used to judge whether the user account contains multiple roles under the imported role type, and if the user account contains multiple roles under the incoming role type, then the authority of all multiple roles under the role type Put it into the preset permission set, and pass the permission set into the preset role menu controller. If the user account only contains one role under the imported role type, directly obtain the permissions of the role, and Pass this permission into the role menu controller.
控制模块,用于获得传入的权限集合或权限所对应的菜单码,并通过菜单码控制显示界面菜单的显示或控制多个菜单按钮的可用性。The control module is used to obtain the incoming authority set or the menu code corresponding to the authority, and control the display of the display interface menu or control the usability of multiple menu buttons through the menu code.
优选地,该系统还包括预设置模块;预设置模块分别位于角色类型控制器、角色合并控制器和角色菜单控制器中,预设置模块用于:Preferably, the system also includes a preset module; the preset module is respectively located in the role type controller, the role merge controller and the role menu controller, and the preset module is used for:
预先设置用户账号与角色类型的第一对应关系,并将第一对应关系存储到角色类型控制器中,通过角色类型控制器对角色类型和第一对应关系进行更新和维护。The first corresponding relationship between the user account and the role type is preset, and the first corresponding relationship is stored in the role type controller, and the role type and the first corresponding relationship are updated and maintained by the role type controller.
预先设置角色类型与角色的第二对应关系,并将第二对应关系存储到角色合并控制器中,通过角色合并控制器对角色和第二对应关系进行更新和维护。The second corresponding relationship between role types and roles is preset, and the second corresponding relationship is stored in the role merging controller, and the roles and the second corresponding relationship are updated and maintained by the role merging controller.
预先设置角色与权限的第三对应关系,并将第三对应关系存储到角色合并控制器中,通过角色类型合并控制器对权限和第三对应关系进行更新和维护。The third corresponding relationship between roles and permissions is set in advance, and the third corresponding relationship is stored in the role merging controller, and the authority and the third corresponding relationship are updated and maintained through the role type merging controller.
预先设置权限与菜单码的第四对应关系,并将第四对应关系存储到角色菜单控制器中,通过角色菜单控制器对菜单码和第四对应关系进行更新和维护。The fourth corresponding relationship between the authority and the menu code is set in advance, and the fourth corresponding relationship is stored in the role menu controller, and the menu code and the fourth corresponding relationship are updated and maintained by the role menu controller.
优选地,Preferably,
第一判断模块通过预设的角色类型控制器判断用户账号是否包含多种类型的角色是指:通过登录信息中包含的用户账号以及角色类型控制器中存储的第一对应关系判断用户账号是否包含多种类型的角色,The first judging module judges whether the user account contains multiple types of roles through the preset role type controller refers to: judging whether the user account includes the first corresponding relationship stored in the user account contained in the login information and the role type controller. many types of roles,
第二判断模块通过角色合并控制器判断用户账号是否包含传入的角色类型下的多个角色是指:通过传入角色合并控制器中的角色类型和角色合并控制器中存储的第二对应关系判断用户账号是否包含传入的角色类型下的多个角色。The second judging module judges whether the user account contains multiple roles under the imported role type through the role merging controller means: passing the role type in the role merging controller and the second corresponding relationship stored in the role merging controller Determine whether the user account contains multiple roles under the passed in role type.
第二判断模块还用于:通过角色合并控制器获得的角色类型对应的角色,以及角色合并控制器中存储的第三对应关系获得角色对应的权限。The second judging module is also used to obtain the role corresponding to the role type obtained by the role merging controller, and the third correspondence stored in the role merging controller to obtain the authority corresponding to the role.
控制模块通过角色菜单控制器获得传入的权限集合或权限所对应的菜单码是指:通过角色菜单控制器中存储的第四对应关系获得传入的权限集合或权限所对应的菜单码。Obtaining the incoming permission set or the menu code corresponding to the permission by the control module through the role menu controller means: obtaining the incoming permission set or the menu code corresponding to the permission through the fourth correspondence stored in the role menu controller.
与现有技术相比,本发明包括:检测用户账号的登录信息。当检测到登录信息时,通过预设的角色类型控制器判断该用户账号是否包含多种类型的角色,如果用户账号包含多种类型的角色,则根据预设策略从多种类型的角色中选定一种角色类型,并将选定的角色类型传入预设的角色合并控制器中;如果用户账号仅包含一种类型的角色,则直接将该角色类型传入角色合并控制器中。通过角色合并控制器判断用户账号是否包含传入的角色类型下的多个角色,如果用户账号包含传入的角色类型下的多个角色,则将角色类型下的全部多个角色的权限放入预设的权限集合中,并将该权限集合传入预设的角色菜单控制器中,如果用户账号仅包含传入的角色类型下的一个角色,则直接获取该角色所具有的权限,并将该权限传入角色菜单控制器中。通过角色菜单控制器获得传入的权限集合或权限所对应的菜单码,并通过菜单码控制显示界面菜单的显示或控制多个菜单按钮的可用性。通过本发明的方案,能够实现不同平台统一账号共享,避免用户在不同平台下使用不同账号。Compared with the prior art, the present invention includes: detecting the login information of the user account. When the login information is detected, the preset role type controller is used to judge whether the user account contains multiple types of roles. Specify a role type, and pass the selected role type into the preset role merging controller; if the user account only contains one type of role, directly pass the role type into the role merging controller. Use the role merging controller to determine whether the user account contains multiple roles under the incoming role type. If the user account contains multiple roles under the incoming role type, then put the permissions of all multiple roles under the role type into In the preset permission set, and pass the permission set to the preset role menu controller, if the user account only contains one role under the imported role type, the permission of the role will be obtained directly, and the This permission is passed into the role menu controller. Obtain the incoming permission set or the menu code corresponding to the permission through the role menu controller, and control the display of the display interface menu or control the availability of multiple menu buttons through the menu code. Through the solution of the present invention, unified account sharing on different platforms can be realized, preventing users from using different accounts on different platforms.
附图说明Description of drawings
下面对本发明实施例中的附图进行说明,实施例中的附图是用于对本发明的进一步理解,与说明书一起用于解释本发明,并不构成对本发明保护范围的限制。The accompanying drawings in the embodiments of the present invention are described below. The accompanying drawings in the embodiments are used for further understanding of the present invention and are used together with the description to explain the present invention, and do not constitute a limitation to the protection scope of the present invention.
图1为本发明的账号共享控制方法流程图;FIG. 1 is a flow chart of the account sharing control method of the present invention;
图2为本发明的账号共享控制方法示意图;2 is a schematic diagram of the account sharing control method of the present invention;
图3为本发明的账号共享控制系统组成框图。FIG. 3 is a block diagram of the account sharing control system of the present invention.
具体实施方式detailed description
为了便于本领域技术人员的理解,下面结合附图对本发明作进一步的描述,并不能用来限制本发明的保护范围。In order to facilitate the understanding of those skilled in the art, the present invention will be further described below in conjunction with the accompanying drawings, which cannot be used to limit the protection scope of the present invention.
本发明的结构设计主要包括三个部件,分别是角色类型控制器、角色合并控制器以及角色菜单控制器。一个用户账号分别通过这三种控制器(角色类型控制器、角色合并控制器以及角色菜单控制器),根据用户账号、角色类型、角色、权限和菜单码之间的关联关系,达到控制账号共享的目的。The structural design of the present invention mainly includes three components, which are respectively a role type controller, a role merging controller and a role menu controller. A user account can control account sharing through these three controllers (role type controller, role merge controller and role menu controller), according to the association between user account, role type, role, authority and menu code. the goal of.
具体地,为了达到上述目的,本发明提出了一种账号共享控制方法,如图1、图2所示,该方法包括:Specifically, in order to achieve the above purpose, the present invention proposes an account sharing control method, as shown in Figure 1 and Figure 2, the method includes:
S101、检测用户账号的登录信息。S101. Detect login information of a user account.
S102、当检测到该登录信息时,通过预设的角色类型控制器判断该用户账号是否包含多种类型的角色,如果用户账号包含多种类型的角色,则根据预设策略从多种类型的角色中选定一种角色类型,并将选定的角色类型传入预设的角色合并控制器中;如果用户账号仅包含一种类型的角色,则直接将该角色类型传入角色合并控制器中。S102. When the login information is detected, judge whether the user account contains multiple types of roles through the preset role type controller, and if the user account contains multiple types of roles, select from multiple types of Select a role type in the role, and pass the selected role type into the preset role merging controller; if the user account only contains one type of role, directly pass the role type into the role merging controller middle.
在本发明实施例中,角色类型控制器,负责通过不同的角色类型ID,对不同系统或模块的角色进行归类,一个用户账号若对应不同类型的角色,即对应多个角色类型,则该用户账号拥有访问不同系统或模块的权限。In the embodiment of the present invention, the role type controller is responsible for classifying the roles of different systems or modules through different role type IDs. If a user account corresponds to different types of roles, that is, to multiple role types, the User accounts have permissions to access different systems or modules.
因此,在本发明实施例中,预先设置用户账号与角色类型的第一对应关系,并将第一对应关系存储到角色类型控制器中,通过角色类型控制器对角色类型和第一对应关系进行更新和维护。Therefore, in the embodiment of the present invention, the first corresponding relationship between the user account and the role type is preset, and the first corresponding relationship is stored in the role type controller, and the role type and the first corresponding relationship are performed by the role type controller. Updates and maintenance.
基于上述设置,在本发明实施例中,通过预设的角色类型控制器判断用户账号是否包含多种类型的角色是指:通过登录信息中包含的用户账号以及角色类型控制器中存储的第一对应关系判断用户账号是否包含多种类型的角色。Based on the above settings, in the embodiment of the present invention, judging whether the user account contains multiple types of roles through the preset role type controller refers to: through the user account contained in the login information and the first character stored in the role type controller. The correspondence determines whether the user account contains multiple types of roles.
S103、通过角色合并控制器判断用户账号是否包含传入的角色类型下的多个角色,如果用户账号包含传入的角色类型下的多个角色,则将角色类型下的全部多个角色的权限放入预设的权限集合中,并将该权限集合传入预设的角色菜单控制器中,如果用户账号仅包含传入的角色类型下的一个角色,则直接获取该角色所具有的权限,并将该权限传入角色菜单控制器中。S103. Use the role merging controller to determine whether the user account contains multiple roles under the incoming role type, and if the user account contains multiple roles under the incoming role type, then merge the permissions of all multiple roles under the role type Put it into the preset permission set, and pass the permission set into the preset role menu controller. If the user account only contains one role under the imported role type, the permissions of the role will be obtained directly. And pass this permission into the role menu controller.
在本发明实施例中,角色合并控制器,负责合并相同角色类型下的所有角色。即一个用户账号如果对应一个相同角色类型下的多个角色,则该角色合并控制器通过取并集的方式合并相同角色类型下的所有角色,及其这些所对应的权限,通过该方案,能够使用户账号拥有通过加减角色的方式,实现不同权限的控制。In the embodiment of the present invention, the role merging controller is responsible for merging all roles under the same role type. That is, if a user account corresponds to multiple roles of the same role type, the role merging controller merges all roles of the same role type and their corresponding permissions by taking a union. Through this scheme, it is possible to Make the user account have the control of different permissions by adding and subtracting roles.
因此,在本发明实施例中,预先设置角色类型与角色的第二对应关系,并将第二对应关系存储到角色合并控制器中,通过角色合并控制器对角色和第二对应关系进行更新和维护。Therefore, in the embodiment of the present invention, the second corresponding relationship between the role type and the role is preset, and the second corresponding relationship is stored in the role merging controller, and the role and the second corresponding relationship are updated and summed through the role merging controller. maintain.
并且预先设置角色与权限的第三对应关系,并将第三对应关系存储到角色合并控制器中,通过角色类型合并控制器对权限和第三对应关系进行更新和维护。And the third corresponding relationship between roles and permissions is set in advance, and the third corresponding relationship is stored in the role merging controller, and the authority and the third corresponding relationship are updated and maintained by the role type merging controller.
基于上述设置,在本发明实施例中,通过角色合并控制器判断用户账号是否包含传入的角色类型下的多个角色是指:通过传入角色合并控制器中的角色类型和角色合并控制器中存储的第二对应关系判断用户账号是否包含传入的角色类型下的多个角色。Based on the above settings, in the embodiment of the present invention, judging whether the user account contains multiple roles under the imported role type through the role merging controller refers to: passing in the role type in the role merging controller and the role merging controller The second corresponding relationship stored in determines whether the user account contains multiple roles under the incoming role type.
该方法还包括:通过角色合并控制器获得的角色类型对应的角色,以及角色合并控制器中存储的第三对应关系获得角色对应的权限。The method also includes: obtaining the role corresponding to the role type obtained by the role merging controller, and obtaining the permission corresponding to the role from the third correspondence stored in the role merging controller.
S104、通过角色菜单控制器获得传入的权限集合或权限所对应的菜单码,并通过菜单码控制显示界面菜单的显示或控制多个菜单按钮的可用性。S104. Obtain the incoming authority set or the menu code corresponding to the authority through the role menu controller, and control the display of the display interface menu or control the usability of multiple menu buttons through the menu code.
在本发明实施例中,角色菜单控制器,负责系统或模块的界面菜单的显示以及各个菜单按钮的可用性,角色菜单控制器会根据不同的角色权限显示不同的界面菜单,或者控制不同的菜单按钮可以使用,达到不同角色拥有不同权限的功能。In the embodiment of the present invention, the role menu controller is responsible for the display of the interface menu of the system or module and the availability of each menu button. The role menu controller will display different interface menus according to different role permissions, or control different menu buttons. It can be used to achieve the function that different roles have different permissions.
因此,在本发明实施例中,预先设置权限与菜单码的第四对应关系,并将第四对应关系存储到角色菜单控制器中,通过角色菜单控制器对菜单码和第四对应关系进行更新和维护。Therefore, in the embodiment of the present invention, the fourth corresponding relationship between the authority and the menu code is preset, and the fourth corresponding relationship is stored in the role menu controller, and the menu code and the fourth corresponding relationship are updated through the role menu controller. And maintenance.
基于上述设置,在本发明实施例中,通过角色菜单控制器获得传入的权限集合或权限所对应的菜单码是指:通过角色菜单控制器中存储的第四对应关系获得传入的权限集合或权限所对应的菜单码。Based on the above settings, in the embodiment of the present invention, obtaining the incoming permission set or the menu code corresponding to the permission through the role menu controller refers to: obtaining the incoming permission set through the fourth corresponding relationship stored in the role menu controller Or the menu code corresponding to the permission.
为了达到上述目的,本发明还提出了一种账号共享控制系统01,如图3所示,该系统包括:检测模块02、第一判断模块03、第二判断模块04和控制模块05。In order to achieve the above purpose, the present invention also proposes an account sharing control system 01, as shown in FIG. 3, the system includes: a detection module 02, a first judgment module 03, a second judgment module 04 and a control module 05.
检测模块02,用于检测用户账号的登录信息。The detection module 02 is configured to detect the login information of the user account.
第一判断模块03,用于当检测到登录信息时,判断用户账号是否包含多种类型的角色,如果用户账号包含多种类型的角色,则根据预设策略从多种类型的角色中选定一种角色类型,并将选定的角色类型传入预设的角色合并控制器中;如果用户账号仅包含一种类型的角色,则直接将该角色类型传入角色合并控制器中。The first judging module 03 is used to judge whether the user account contains multiple types of roles when the login information is detected, and if the user account contains multiple types of roles, select from multiple types of roles according to a preset strategy A role type, and the selected role type is passed to the preset role merging controller; if the user account only contains one type of role, the role type is directly passed to the role merging controller.
第二判断模块04,用于判断用户账号是否包含传入的角色类型下的多个角色,如果用户账号包含传入的角色类型下的多个角色,则将角色类型下的全部多个角色的权限放入预设的权限集合中,并将权限集合传入预设的角色菜单控制器中,如果用户账号仅包含传入的角色类型下的一个角色,则直接获取该角色所具有的权限,并将该权限传入角色菜单控制器中。The second judging module 04 is used to judge whether the user account contains multiple roles under the incoming role type, and if the user account contains multiple roles under the incoming role type, then all the multiple roles under the role type The permissions are put into the preset permission set, and the permission set is passed to the preset role menu controller. If the user account only contains one role under the imported role type, the permissions of the role are obtained directly. And pass this permission into the role menu controller.
控制模块05,用于获得传入的权限集合或权限所对应的菜单码,并通过菜单码控制显示界面菜单的显示或控制多个菜单按钮的可用性。The control module 05 is configured to obtain the incoming authority set or the menu code corresponding to the authority, and control the display of the menu on the display interface or control the usability of multiple menu buttons through the menu code.
优选地,该系统还包括预设置模块06;预设置模块06分别位于角色类型控制器、角色合并控制器和角色菜单控制器中,预设置模块06用于:Preferably, the system also includes a preset module 06; the preset module 06 is respectively located in the role type controller, the role merge controller and the role menu controller, and the preset module 06 is used for:
预先设置用户账号与角色类型的第一对应关系,并将第一对应关系存储到角色类型控制器中,通过角色类型控制器对角色类型和第一对应关系进行更新和维护。The first corresponding relationship between the user account and the role type is preset, and the first corresponding relationship is stored in the role type controller, and the role type and the first corresponding relationship are updated and maintained by the role type controller.
预先设置角色类型与角色的第二对应关系,并将第二对应关系存储到角色合并控制器中,通过角色合并控制器对角色和第二对应关系进行更新和维护。The second corresponding relationship between role types and roles is preset, and the second corresponding relationship is stored in the role merging controller, and the roles and the second corresponding relationship are updated and maintained by the role merging controller.
预先设置角色与权限的第三对应关系,并将第三对应关系存储到角色合并控制器中,通过角色类型合并控制器对权限和第三对应关系进行更新和维护。The third corresponding relationship between roles and permissions is set in advance, and the third corresponding relationship is stored in the role merging controller, and the authority and the third corresponding relationship are updated and maintained through the role type merging controller.
预先设置权限与菜单码的第四对应关系,并将第四对应关系存储到角色菜单控制器中,通过角色菜单控制器对菜单码和第四对应关系进行更新和维护。The fourth corresponding relationship between the authority and the menu code is set in advance, and the fourth corresponding relationship is stored in the role menu controller, and the menu code and the fourth corresponding relationship are updated and maintained by the role menu controller.
优选地,Preferably,
第一判断模块03通过预设的角色类型控制器判断用户账号是否包含多种类型的角色是指:通过登录信息中包含的用户账号以及角色类型控制器中存储的第一对应关系判断用户账号是否包含多种类型的角色,The first judging module 03 judges whether the user account contains multiple types of roles through the preset role type controller. Contains various types of roles,
第二判断模块04角色合并控制器判断用户账号是否包含传入的角色类型下的多个角色是指:通过传入角色合并控制器中的角色类型和角色合并控制器中存储的第二对应关系判断用户账号是否包含传入的角色类型下的多个角色。The second judging module 04 is that the role merging controller judges whether the user account contains multiple roles under the imported role type refers to: passing in the role type in the role merging controller and the second corresponding relationship stored in the role merging controller Determine whether the user account contains multiple roles under the passed in role type.
第二判断模块04还用于:通过角色合并控制器获得的角色类型对应的角色,以及角色合并控制器中存储的第三对应关系获得角色对应的权限。The second judging module 04 is also used for: obtaining the role corresponding to the role type obtained by the role merging controller and the third correspondence stored in the role merging controller to obtain the authority corresponding to the role.
控制模块05通过角色菜单控制器获得传入的权限集合或权限所对应的菜单码是指:通过角色菜单控制器中存储的第四对应关系获得传入的权限集合或权限所对应的菜单码。Obtaining the incoming permission set or the menu code corresponding to the permission by the control module 05 through the role menu controller means: obtaining the incoming permission set or the menu code corresponding to the permission through the fourth correspondence stored in the role menu controller.
与现有技术相比,本发明包括:检测用户账号的登录信息。当检测到登录信息时,通过预设的角色类型控制器判断该用户账号是否包含多种类型的角色,如果用户账号包含多种类型的角色,则根据预设策略从多种类型的角色中选定一种角色类型,并将选定的角色类型传入预设的角色合并控制器中;如果用户账号仅包含一种类型的角色,则直接将该角色类型传入角色合并控制器中。通过角色合并控制器判断用户账号是否包含传入的角色类型下的多个角色,如果用户账号包含传入的角色类型下的多个角色,则将角色类型下的全部多个角色的权限放入预设的权限集合中,并将该权限集合传入预设的角色菜单控制器中,如果用户账号仅包含传入的角色类型下的一个角色,则直接获取该角色所具有的权限,并将该权限传入角色菜单控制器中。通过角色菜单控制器获得传入的权限集合或权限所对应的菜单码,并通过菜单码控制显示界面菜单的显示或控制多个菜单按钮的可用性。通过本发明的方案,能够实现不同平台统一账号共享,避免用户在不同平台下使用不同账号。Compared with the prior art, the present invention includes: detecting the login information of the user account. When the login information is detected, the preset role type controller is used to judge whether the user account contains multiple types of roles. Specify a role type, and pass the selected role type into the preset role merging controller; if the user account only contains one type of role, directly pass the role type into the role merging controller. Use the role merging controller to determine whether the user account contains multiple roles under the incoming role type. If the user account contains multiple roles under the incoming role type, then put the permissions of all multiple roles under the role type into In the preset permission set, and pass the permission set to the preset role menu controller, if the user account only contains one role under the imported role type, the permission of the role will be obtained directly, and the This permission is passed into the role menu controller. Obtain the incoming permission set or the menu code corresponding to the permission through the role menu controller, and control the display of the display interface menu or control the availability of multiple menu buttons through the menu code. Through the solution of the present invention, unified account sharing on different platforms can be realized, preventing users from using different accounts on different platforms.
需要说明的是,以上所述的实施例仅是为了便于本领域的技术人员理解而已,并不用于限制本发明的保护范围,在不脱离本发明的发明构思的前提下,本领域技术人员对本发明所做出的任何显而易见的替换和改进等均在本发明的保护范围之内。It should be noted that the above-described embodiments are only for the convenience of those skilled in the art to understand, and are not intended to limit the protection scope of the present invention. Any obvious replacements and improvements made by the invention are within the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN201510568278.3ACN105262725B (en) | 2015-09-08 | 2015-09-08 | A kind of account Compliance control method and system | 
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN201510568278.3ACN105262725B (en) | 2015-09-08 | 2015-09-08 | A kind of account Compliance control method and system | 
| Publication Number | Publication Date | 
|---|---|
| CN105262725Atrue CN105262725A (en) | 2016-01-20 | 
| CN105262725B CN105262725B (en) | 2018-06-22 | 
| Application Number | Title | Priority Date | Filing Date | 
|---|---|---|---|
| CN201510568278.3AActiveCN105262725B (en) | 2015-09-08 | 2015-09-08 | A kind of account Compliance control method and system | 
| Country | Link | 
|---|---|
| CN (1) | CN105262725B (en) | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN108416195A (en)* | 2018-02-27 | 2018-08-17 | 平安科技(深圳)有限公司 | Cross-platform method for managing user right, device, computer equipment and storage medium | 
| CN109784033A (en)* | 2018-12-13 | 2019-05-21 | 平安科技(深圳)有限公司 | Operating right Dynamic Configuration and relevant device based on page menus | 
| CN113487406A (en)* | 2021-07-01 | 2021-10-08 | 深圳海付移通科技有限公司 | Data processing method, data processing device, computer equipment and storage medium | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| US20100017286A1 (en)* | 2008-07-10 | 2010-01-21 | Factor TG, Inc. | Marketing Performance Model and Management Platform | 
| US20110246308A1 (en)* | 2010-04-02 | 2011-10-06 | Segall Timothy R | Method and system for managing interactive communications campaigns with preference management | 
| CN103023875A (en)* | 2012-11-21 | 2013-04-03 | 北京荣之联科技股份有限公司 | Account management system and method | 
| CN103268233A (en)* | 2013-06-05 | 2013-08-28 | 四目信息科技(上海)有限公司 | Method for combining account number of platform system and account number of third party system in computer system | 
| CN103873351A (en)* | 2014-03-20 | 2014-06-18 | 上海话宝网络科技有限公司 | Integral communication system and building method thereof | 
| CN104573094A (en)* | 2015-01-30 | 2015-04-29 | 深圳市华傲数据技术有限公司 | Online account recognizing and matching method | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| US20100017286A1 (en)* | 2008-07-10 | 2010-01-21 | Factor TG, Inc. | Marketing Performance Model and Management Platform | 
| US20110246308A1 (en)* | 2010-04-02 | 2011-10-06 | Segall Timothy R | Method and system for managing interactive communications campaigns with preference management | 
| CN103023875A (en)* | 2012-11-21 | 2013-04-03 | 北京荣之联科技股份有限公司 | Account management system and method | 
| CN103268233A (en)* | 2013-06-05 | 2013-08-28 | 四目信息科技(上海)有限公司 | Method for combining account number of platform system and account number of third party system in computer system | 
| CN103873351A (en)* | 2014-03-20 | 2014-06-18 | 上海话宝网络科技有限公司 | Integral communication system and building method thereof | 
| CN104573094A (en)* | 2015-01-30 | 2015-04-29 | 深圳市华傲数据技术有限公司 | Online account recognizing and matching method | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN108416195A (en)* | 2018-02-27 | 2018-08-17 | 平安科技(深圳)有限公司 | Cross-platform method for managing user right, device, computer equipment and storage medium | 
| CN108416195B (en)* | 2018-02-27 | 2020-09-25 | 平安科技(深圳)有限公司 | Cross-platform user authority management method and device, computer equipment and storage medium | 
| CN109784033A (en)* | 2018-12-13 | 2019-05-21 | 平安科技(深圳)有限公司 | Operating right Dynamic Configuration and relevant device based on page menus | 
| CN113487406A (en)* | 2021-07-01 | 2021-10-08 | 深圳海付移通科技有限公司 | Data processing method, data processing device, computer equipment and storage medium | 
| Publication number | Publication date | 
|---|---|
| CN105262725B (en) | 2018-06-22 | 
| Publication | Publication Date | Title | 
|---|---|---|
| CN104516783B (en) | Authority control method and device | |
| JP6967342B2 (en) | Cloud services for portable computer testing tools Systems and methods for asset management | |
| CN102880409A (en) | Method and system for dynamically adjusting operation interface according to holding mode and mobile terminal | |
| JP6128363B2 (en) | Data reporting method and apparatus, and terminal device | |
| CN106464694B (en) | Security Moderation in Mobile Devices | |
| EP2738478A3 (en) | Intelligent comfort management using natural language processing to interface with a comfort system controller | |
| WO2013101522A3 (en) | Co-located groups as authorization mechanisms | |
| WO2012083284A3 (en) | Operating system supporting cost aware applications | |
| MX361926B (en) | Electrical power transmission. | |
| WO2012155069A3 (en) | Methods, apparatuses and computer readable storage media for detecting gesture -based commands for a group communication session on a wireless communications device | |
| MX2016005880A (en) | Application icon management method and device. | |
| RU2016114159A (en) | GRANTING PERMISSIONS TO THE OBJECT WHEN ADDING PEOPLE TO A TALK | |
| CN105262725A (en) | Account sharing control method and system | |
| WO2012126422A3 (en) | Method, device and system for controlling account management operation | |
| CN105807965A (en) | False trigger prevention method and apparatus | |
| CN106469270A (en) | A kind of management method of application permission, equipment and system | |
| CN104202343A (en) | Data transmission method, data transmission device and data transmission system | |
| CN104731473A (en) | Operation response method and device based on icons | |
| CN103179021A (en) | Method and system for aggregating heterogenous micro-blogs | |
| CN103150497B (en) | The visual authority configuration of Web application and development, method of calibration and system | |
| CN106487829B (en) | A virtual machine control system, method and user terminal | |
| US20170180455A1 (en) | Delegation of detailed content and app reviews between nearby devices | |
| CN104423791B (en) | A kind of method and a kind of electronic equipment of information processing | |
| CN202472671U (en) | A smart device lock screen control system | |
| CN105740704A (en) | User scanning frequency-based detection method and system for dynamically adjusting detection degree | 
| Date | Code | Title | Description | 
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |