CN107124426B - Authentication method and device for user rights and interests - Google Patents

Authentication method and device for user rights and interests Download PDF

Info

Publication number
CN107124426B
CN107124426B CN201710387586.5A CN201710387586A CN107124426B CN 107124426 B CN107124426 B CN 107124426B CN 201710387586 A CN201710387586 A CN 201710387586A CN 107124426 B CN107124426 B CN 107124426B
Authority
CN
China
Prior art keywords
user
node
leaf
leaf node
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710387586.5A
Other languages
Chinese (zh)
Other versions
CN107124426A (en
Inventor
宋侃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Weiying Shidai Technology Co ltd
Original Assignee
Beijing Weiying Shidai Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Weiying Shidai Technology Co ltd filed Critical Beijing Weiying Shidai Technology Co ltd
Priority to CN201710387586.5A priority Critical patent/CN107124426B/en
Publication of CN107124426A publication Critical patent/CN107124426A/en
Application granted granted Critical
Publication of CN107124426B publication Critical patent/CN107124426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Signal Processing (AREA)
  • Finance (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Strategic Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Storage Device Security (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses an authentication method and device for user rights and interests, and relates to the technical field of computer application. The method comprises the following steps: acquiring various types of user account information; when multiple types of user account information belong to the same user, establishing a user account relation data structure of the user, wherein the user account relation data structure comprises a root node and a plurality of leaf nodes connected with the root node; when a user interest attribute is set for a first leaf node in a user account relation data structure, judging whether the user interest attribute needs to be set for a root node and a second leaf node except the first leaf node according to the current service type; and if the setting is needed, setting the same user right attribute as the first leaf node for the root node and the second leaf node. The invention realizes the information sharing among the accounts, and improves the accuracy and the effectiveness of the rights and interests enjoyment and the preferential activity of the multi-dimensional accounts on the user-oriented popularization.

Description

Authentication method and device for user rights and interests
Technical Field
The invention relates to the technical field of computer application, in particular to an authentication method and device for user rights and interests.
Background
In the current login system, the user selectable login modes are various. For example, the user may log in to the application through a mobile phone number of the terminal, a social account (e.g., microblog, WeChat), and the like. Particularly, based on the Oauth protocol, the authentication and login of various third-party accounts of the user can be realized.
Since the user can authenticate and log in through the multidimensional account at present, the rights and interests of the user need to be identified from various angles. For example, whether a user who has enjoyed a certain activity privilege at the wechat terminal can continue to enjoy the same activity privilege at the QQ terminal, and whether the user can enjoy several privilege benefits, at this time, it is necessary to identify the dimensions of the two third party accounts of the user at the wechat terminal and the QQ terminal, and configure the authentication for enjoying the privilege activity.
However, in the existing user account system, because the information of each type of account is independent, the server cannot uniformly manage the information of each type of account, and cannot determine whether each type of account has enjoyed an activity benefit or a right benefit, so that the accuracy and effectiveness of the right enjoyment of the multi-dimensional account and the promotion of the benefit activity for the user are reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide an authentication method and apparatus for user rights and interests, which solve the problem that in the existing user account system, because information of accounts of different types belonging to the same user is independent, a server cannot perform unified management on information of accounts of different types belonging to the same user, and accuracy and effectiveness of rights and interests and preferential activities of multidimensional accounts on user-oriented popularization are reduced.
In a first aspect, an embodiment of the present invention provides an authentication method for user rights, where the method includes:
acquiring various types of user account information;
when the multiple types of user account information belong to the same user, establishing a user account relation data structure of the user, wherein the user account relation data structure comprises a root node and a plurality of leaf nodes connected with the root node;
when a user interest attribute is set for a first leaf node in the user account relation data structure, judging whether the user interest attribute needs to be set for the root node and a second leaf node except the first leaf node according to the current service type;
and if the user right attribute needs to be set for the root node and the second leaf node, setting the user right attribute which is the same as that of the first leaf node for the root node and the second leaf node.
With reference to the first aspect, in a first implementation manner of the first aspect, the method further includes:
setting the user right attribute only to the first leaf node if the user right attribute does not need to be set to the root node and the second leaf node.
With reference to the first aspect, in a second implementation manner of the first aspect, if it is necessary to set a user interest attribute to the root node and the second leaf node, setting the same user interest attribute as that of the first leaf node to the root node and the second leaf node specifically includes:
if the user rights and interests attribute needs to be set for the root node and the second leaf node, determining a father node to which the first leaf node belongs according to the first leaf node;
determining a root node to which the father node belongs according to the father node, and setting a user right attribute which is the same as that of the first leaf node for the root node;
and determining all second leaf nodes in the user account relation data structure according to the root node, and setting the same user rights and interests attribute as the first leaf node for all second leaf nodes in the user account relation data structure.
With reference to the first aspect, in a third implementation of the first aspect, the method further includes:
acquiring an identifier of any node in the user account relation data structure;
acquiring the user right attribute of any node according to the identifier of any node; or updating the user right attribute of any node according to the identifier of any node.
With reference to the first, second, and third implementation manners of the first aspect, in a fourth implementation manner of the first aspect, the user account relationship data structure is a tree structure; the tree structure is stored in a linked list form, and the linked list includes an identifier of any node in the tree structure and a user right attribute of the any node corresponding to the identifier.
In a second aspect, an embodiment of the present invention provides an apparatus for authenticating a user right, where the apparatus includes:
the first acquisition unit is used for acquiring various types of user account information;
the establishing unit is used for establishing a user account relation data structure of the user when the multiple types of user account information belong to the same user, wherein the user account relation data structure comprises a root node and a plurality of leaf nodes connected with the root node;
a determining unit, configured to determine, when a user interest attribute is set for a first leaf node in the user account relationship data structure, whether the user interest attribute needs to be set for the root node and a second leaf node other than the first leaf node according to a current service type;
a first setting unit, configured to set the user right attribute, which is the same as that of the first leaf node, to the root node and the second leaf node if the user right attribute needs to be set to the root node and the second leaf node.
With reference to the second aspect, in a first implementation manner of the second aspect, the apparatus further includes:
a second setting unit, configured to set the user right attribute only for the first leaf node if the user right attribute does not need to be set for the root node and the second leaf node.
With reference to the second aspect, in a second implementation manner of the second aspect, the first setting unit is specifically configured to, if a user interest attribute needs to be set for the root node and the second leaf node, determine, according to the first leaf node, a parent node to which the first leaf node belongs;
determining a root node to which the father node belongs according to the father node, and setting a user right attribute which is the same as that of the first leaf node for the root node;
and determining all second leaf nodes in the user account relation data structure according to the root node, and setting the same user rights and interests attribute as the first leaf node for all second leaf nodes in the user account relation data structure.
With reference to the second aspect, in a third embodiment of the second aspect, the apparatus further comprises:
the second acquisition unit is used for acquiring the identifier of any node in the user account relation data structure;
a third obtaining unit, configured to obtain the user right attribute of the any node according to the identifier of the any node; or,
the device further comprises: and the updating unit is used for updating the user right attribute of any node according to the identifier of any node.
With reference to the first, second, and third embodiments of the second aspect, in a fourth embodiment of the second aspect, the user account relationship data structure established by the establishing unit is a tree structure; the tree structure is stored in a linked list form, and the linked list includes an identifier of any node in the tree structure and a user right attribute of the any node corresponding to the identifier.
According to the authentication method and device for the user rights and interests, provided by the embodiment of the invention, a server acquires various types of user account information, and when the user account information belongs to the same user, the server establishes a user account relationship data structure comprising a root node and a plurality of leaf nodes connected with the root node. When the server sets the user right attribute for a first leaf node in the user account relation data structure, the server judges whether the user right attribute needs to be set for a root node and a second leaf node except the first leaf node according to the current service type. And if the setting is needed, the server sets the same user right attribute as the first leaf node for the root node and the second leaf node. The problem that information of accounts of various types belonging to the same user cannot be uniformly managed by a server due to mutual independence of the information of the accounts of various types belonging to the same user in the existing user account system is solved, the server uniformly manages the information of the accounts of various types belonging to the same user, and the accuracy and the effectiveness of rights and interests and preferential activities of the multi-dimensional accounts on user-oriented popularization are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an authentication method for user rights according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a user account relationship tree structure according to an embodiment of the present invention;
fig. 3-a is a schematic structural diagram of a user account relationship tree with first-level leaf nodes according to an embodiment of the present invention;
fig. 3-B is a schematic structural diagram of a user account relationship tree with multi-level leaf nodes according to an embodiment of the present invention;
fig. 3-C is a schematic diagram of another user account relationship tree structure with multi-level leaf nodes according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an authentication apparatus for user rights according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of an authentication apparatus for user rights according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of an authentication method for user rights provided by the embodiment of the present invention, where an implementation subject is a server in the embodiment of the present invention. As shown in fig. 1, the method of this embodiment specifically includes the following steps:
and step 110, acquiring various types of user account information.
In this embodiment, a user may log in to the server through different types of accounts. The server acquires various types of user account information.
For example, a user may log into a server through a WeChat account, a user may log into a server through a QQ account, a user may log into a server through a microblog account, and so on. The user account information acquired by the server is account information of a WeChat account, a QQ account, a microblog account and the like.
In this embodiment, the server may specifically refer to a service background of a certain ticket purchasing platform, for example. The ticket buying platform can be loaded in the terminal in an Application (APP) mode, and a user logs in the ticket buying platform by clicking a corresponding application identifier.
The user can register and log in on the ticket buying platform through different types of accounts. For example, the user registers and logs in on a ticket buying platform through a WeChat account number, a QQ account number and a microblog account number. The WeChat account, QQ account, and microblog account may be mailboxes, nicknames, and the like.
And step 120, when the multiple types of user account information belong to the same user, establishing a user account relationship data structure of the user, wherein the user account relationship data structure comprises a root node and a plurality of leaf nodes connected with the root node.
In this embodiment, the server collects different types of user account information used by the user, and identifies whether the collected multiple different types of user account information belong to the same user. And if the user account information of the different types belongs to the same user, the server integrates the user account information of the different types to form a user account relation data structure of the user. The user account relationship data structure of the user comprises a root node and a plurality of leaf nodes connected with the root node. The leaf nodes may be in a single-level structure or a multi-level structure.
By way of example and not limitation, the user account relationship data structure is a tree structure, as shown in fig. 2. Fig. 2 is a schematic diagram of a user account relationship tree structure according to an embodiment of the present invention. In fig. 2, a root node and 7 leaf nodes are included, wherein the 7 leaf nodes are divided into two levels, a first level leaf node (4) and a second level leaf node (3). The root node may be a unique mobile phone number, and the first-level leaf nodes are account numbers of different types used by the user, for example, the first account number is an account number of a Wireless Application Protocol (WAP) website, the second account number is a wechat account number, the third account number is a QQ account number, and the fourth account number is an account number of a microblog.
In this embodiment, account information of different types used by a user is bound to a mobile phone number of a terminal, and a server identifies the mobile phone number bound to the account information of different types, so as to determine whether the account information of each type belongs to the same user, specifically, a plurality of account numbers of different types bound to the same mobile phone number belong to the same user.
It can be understood that, in this embodiment, the mobile phone number of the terminal is used as the identifier of the same user, but in practical applications, the mobile phone number is not limited to the mobile phone number, and the identification number, the fingerprint, the voice, the face image, and the like of the user can be used as the identifier of the same user.
The second-level leaf node is a sub-account of an application account, for example, in this embodiment, the second-level leaf node is three open ids existing under the same unity id in the second account (the wechat account), and the three open ids respectively correspond to wechat login, login authenticated by using wechat OAuth in the application, and applet login.
The tree structure may be stored in a linked list format, and a key value (key) and an attribute (value) corresponding to the key value are stored in the linked list. Key values appear paired with attributes. In this embodiment, the key value is a node identifier, and the attribute is a set user right attribute. The user interest attribute may be a user interest or a user interest with a number of times. For example, the user can rob the red envelope under different types of accounts, the number of times that the user robs the red envelope, and the like.
Step 130, when setting the user right attribute for the first leaf node in the user account relationship data structure, judging whether the user right attribute needs to be set for the root node and the second leaf node except the first leaf node according to the current service type.
In this embodiment, when the server sets the user right attribute of any first leaf node in the user account relationship data structure, the server may determine whether the user right attribute needs to be set for the root node and the second leaf node at the same time according to the current service type. If it is required to set the user interest attribute for the root node and the second leaf node at the same time, step 140 is performed.
For example, but not by way of limitation, in an implementation case, the current service type is specifically that a user can log in a server for red packet preemption by different types of accounts, and at this time, the server determines whether a user interest attribute needs to be set for each node in a user account relationship data structure at the same time under the service type. Since the current service type is specifically that the user can log in the server through different types of accounts to rob the bonus package, the server determines that the user interest attribute needs to be set for each node in the user account relationship data structure at the same time, and step 140 is executed.
It will be appreciated that if it is not necessary to set the user interest attribute for both the root node and the second leaf node, the server sets the user interest attribute for only the first leaf node. According to the foregoing example, in another implementation, the current service type is specifically that the user cannot log in the server through different types of accounts to rob the bonus package, and the user can only rob the bonus package under the account represented by the current node, and then the server sets the user right attribute only for the current node.
Step 140, if the user right attribute needs to be set for the root node and the second leaf node, setting the user right attribute which is the same as that of the first leaf node for the root node and the second leaf node.
In this embodiment, according to the judgment in step 130, if the user interest attribute needs to be set for the root node and the second leaf node, the server determines, according to the first leaf node, a parent node to which the first leaf node belongs. And according to the father node, the server determines a root node to which the father node belongs and sets the user right attribute which is the same as that of the first leaf node for the root node.
And according to the root node, the server determines all second leaf nodes in the user account relation data structure, and sets the same user right attribute as the first leaf node for all the second leaf nodes in the user account relation data structure. .
It is to be appreciated that the second leaf node in the user account relationship data structure may be comprised of at least one hierarchy, as shown in fig. 3-a, 3-B, 3-C. The second leaf node in fig. 3-a is composed of one level, i.e., the first level leaf node. The second leaf node in fig. 3-B is composed of two levels, i.e., a first level leaf node and a second level leaf node. The root node is directly connected with a first-level leaf node, and the first-level leaf node is connected with a second-level leaf node. The second leaf node in fig. 3-C is composed of three levels, i.e., a first level leaf node, a second level leaf node, and a third level leaf node. However, the server sets all second leaf nodes in the user account relationship data structure to the same user interest attribute regardless of the number of levels of the second leaf nodes.
In one example, the server sets the user right attribute of the first leaf node as the number of times that the user robs the red packet for 4 times, and the server sets the user right attribute of the second leaf node as the number of times that the user robs the red packet for 4 times. When the account number represented by the first leaf node by the user uses one red packet robbing time, the same red packet robbing time of the second leaf node is also reduced by 1 time. That is, the user entitlement attribute is unique to each user who may log into the server using a different type of account to consume the number of entitlements.
In this embodiment, the server acquires multiple types of user account information, and when the user account information belongs to the same user, the server establishes a user account relationship data structure including a root node and multiple leaf nodes connected to the root node. When the server sets the user right attribute for a first leaf node in the user account relation data structure, the server judges whether the user right attribute needs to be set for a root node and a second leaf node except the first leaf node according to the current service type. And if the setting is needed, the server sets the same user right attribute as the first leaf node for the root node and the second leaf node. The problem that information of accounts of various types belonging to the same user cannot be uniformly managed by a server due to mutual independence of the information of the accounts of various types belonging to the same user in the existing user account system is solved, the server uniformly manages the information of the accounts of various types belonging to the same user, and the accuracy and the effectiveness of rights and interests and preferential activities of the multi-dimensional accounts on user-oriented popularization are improved.
Optionally, in an embodiment, the method further includes the step of querying and updating the user right attribute of any node. Through the steps, the server can quickly and conveniently determine the user right attribute of any node,
specifically, the server obtains an identifier of any node in the user account relationship data structure. According to the identification of any node, the server acquires the user right attribute of any node; or, according to the identification of any node, the server updates the user right attribute of any node.
The scheme provided by the embodiment of the invention is explained in detail in the following with reference to the attached figure 3-B.
As shown in fig. 3-B, the server obtains multiple types of user account information, and when multiple pieces of user account information belong to the same user, the server establishes a user account relationship tree structure of the user. And the server sets the user rights attribute for the node in the user account relation tree structure of the user. Specifically, the user account relationship tree structure of the user comprises a root node and 8 leaf nodes; the 8 leaf nodes are divided into two levels, namely a first level leaf node (3) and a second level leaf node (5). The root node may be a unique identification number, and the first level leaf nodes are accounts of various types used by the user, such as accounts of a WAP site, a wechat, a QQ, a microblog, and the like.
In this embodiment, the user right attribute is specifically a red packet robbing frequency right of a user logging in a server through different types of accounts, for example, when the red packet robbing frequency right is 5 times, every time the user logs in the server through a certain account in the user account relationship tree structure and finishes 1 red packet robbing, the red packet robbing frequency of the user is increased by 1 until the number of the red packet robbing times is up to 5 times.
It is understood that the user interest attributes may also include the number right of the user to rob the bonus package through different types of accounts logging in the server, the amount right of the bonus package, the discount strength right of the user to purchase tickets through different types of accounts logging in the server, and the like.
In this embodiment, the server performs user right attribute setting on a second-level leaf node (8) below a first-level leaf node (3), where the attribute setting specifically refers to the number right of red envelope robbing being 5 times. After the server sets the user right attribute of the second-level leaf node (8), the server judges whether the user right attribute needs to be set for all nodes (including the root node and all leaf nodes except the second-level leaf node (8)) except the second-level leaf node (8) in the user account relation tree structure.
And the server determines that the user right attribute needs to be set for all nodes except the second-level leaf nodes (8) according to the current service type, and then determines the parent node to which the second-level leaf nodes (8) belong, namely the first-level leaf nodes (3).
And the server determines that the user interest attribute does not need to be set for all the nodes except the second-level leaf node (8) according to the current service type, and only sets the user interest attribute for the second-level leaf node (8).
The server determines the root node to which the first-level leaf node (3) belongs, namely the identity number of the user. And the server sets the user right attribute of the root node as the red packet robbing times right of the user.
After the server sets the user right attribute of the root node, the server determines all first-level leaf nodes connected with the root node, namely leaf nodes (2), leaf nodes (3) and leaf nodes (4). The user right attribute of the server to all the leaf nodes of the first hierarchy is set as the same red packet grabbing time right as the leaf nodes (8).
After the server sets the user right attributes of all first-level leaf nodes connected with the root node, the server determines all second-level leaf nodes connected with the first-level leaf nodes, namely leaf nodes (5), leaf nodes (6), leaf nodes (7), leaf nodes (8) and leaf nodes (9). Since the server has set the user rights attribute of the second hierarchy leaf node (8). At the moment, the server sets the user right attributes of other second-level leaf nodes except the leaf nodes (8) as the same red packet grabbing frequency right as the leaf nodes (8).
Therefore, the server sets the user rights and interests attributes of all nodes in the user account relation tree structure, unification of the user rights and interests in the user account relation tree structure is achieved, and accuracy and effectiveness of preferential services in popularization are improved.
It can be understood that, after the server sets the user interest attributes of all nodes in the tree structure of the user account relationship, the server stores the identifier of each node of all nodes in the tree structure and the user interest attribute corresponding to the identifier, for example, in the linked list in the foregoing.
The scheme provided by the embodiment of the invention is explained in detail in the following with reference to the attached figure 3-C.
As shown in fig. 3-C, the server obtains multiple types of user account information, and when multiple user account information belong to the same user, the server establishes a user account relationship tree structure of the user. And the server sets the user rights attribute for the node in the user account relation tree structure of the user. Specifically, the user account relationship tree structure of the user comprises a root node and 10 leaf nodes; the 10 leaf nodes are divided into three levels, namely a first level leaf node (3), a second level leaf node (5) and a third level leaf node (3). The root node may be a unique fingerprint information, and the first-level leaf nodes are accounts of various types used by the user, such as accounts of a WAP website, a WeChat, a QQ, a microblog, and the like.
In this embodiment, the user right attribute is specifically the amount right of the user to rob the red envelope when the user logs in the server through different types of accounts, for example, the upper limit of the amount of the red envelope is 500 yuan, and when the user logs in the server through a certain account in the user account relationship tree structure to complete one-time red envelope robbing, the server obtains the amount of the red envelope robbed by the user this time and accumulates the amount of the red envelope robbed by the user until the total amount of the red envelope robbed by the user is 500 yuan.
In this embodiment, the server performs user right attribute setting on the third-level leaf node (11), where the user right attribute setting specifically is that the money right of the red packet is 500 yuan. After the server sets the user right attribute of the third-level leaf node (11), the server judges whether the user right attribute needs to be set for all nodes (including the root node and all leaf nodes except the third-level leaf node (11)) in the user account relation tree structure except the third-level leaf node (11).
And the server determines that the user right attribute needs to be set for all nodes except the third-level leaf node (11) according to the current service type, and then determines the parent node to which the third-level leaf node (11) belongs, namely the second-level leaf node (8).
And the server determines that the user right attribute does not need to be set for all the nodes except the third-level leaf node (11) according to the current service type, and only sets the user right attribute for the third-level leaf node (11).
The server determines the parent node to which the second level leaf node (8) belongs as the first level leaf node (3). The server determines the root node to which the first level leaf node (3) belongs, i.e. the fingerprint information of the user. The server sets the user right attribute of the root node as the money right of the user to rob the red envelope.
After the server sets the user right attribute of the root node, the server determines all first-level leaf nodes connected with the root node, namely leaf nodes (2), leaf nodes (3) and leaf nodes (4). The server sets the user right attribute of all the leaf nodes of the first hierarchy as the same amount right of the user for the red envelope as the leaf nodes (11).
After the server sets the user right attributes of all the first-level leaf nodes connected with the root node, the server determines all the second-level leaf nodes connected with all the first-level leaf nodes, namely leaf nodes (5), leaf nodes (6), leaf nodes (7), leaf nodes (8) and leaf nodes (9). At the moment, the server sets the user right attribute of the leaf node of the second level to be the same money right of the red packet robbing as the leaf node (11).
After the server sets the user rights and interests attributes of all the second-level leaf nodes, the server determines all third-level leaf nodes connected with all the second-level leaf nodes, namely leaf nodes (10) and leaf nodes (11). Since the server has set the user rights attribute of the third hierarchical leaf node (11). At the moment, the server only sets the user right attribute of the leaf node (10) and sets the user right attribute as the same money right of the red packet robbing as the leaf node (11).
Therefore, the server sets the user rights and interests attributes of all nodes in the user account relation tree structure, unification of the user rights and interests in the user account relation tree structure is achieved, and accuracy and effectiveness of preferential services in popularization are improved.
It can be understood that, after the server sets the user interest attributes of all nodes in the tree structure of the user account relationship, the server stores the identifier of each node of all nodes in the tree structure and the user interest attribute corresponding to the identifier, for example, in the linked list in the foregoing.
The foregoing authentication methods for user rights have been described by way of example, respectively. In practical applications, the user account relationship tree structure and the unique identifier represented by the root node are not limited to the foregoing examples. The user right attribute set by each node is not limited to the foregoing example either.
Fig. 4 is a schematic structural diagram of an authentication device for user rights according to an embodiment of the present invention, as shown in fig. 4, the authentication device for user rights according to the embodiment may include: a first acquiring unit 410, a establishing unit 420, a judging unit 430 and a first setting unit 440.
The first obtaining unit 410 is configured to obtain multiple types of user account information;
an establishing unit 420, configured to establish a user account relationship data structure of the user when the multiple types of user account information belong to the same user, where the user account relationship data structure includes a root node and multiple leaf nodes connected to the root node;
a determining unit 430, configured to determine, when a user interest attribute is set for a first leaf node in the user account relationship data structure, whether the user interest attribute needs to be set for the root node and a second leaf node except the first leaf node according to a current service type;
a first setting unit 440, configured to set the same user right attribute as that of the first leaf node for the root node and the second leaf node if the user right attribute needs to be set for the root node and the second leaf node.
Further, the apparatus further comprises: a second setting unit 450, configured to set the user right attribute only to the first leaf node if the user right attribute does not need to be set to the root node and the second leaf node.
Further, the first setting unit 440 is specifically configured to, if a user interest attribute needs to be set for the root node and the second leaf node, determine, according to the first leaf node, a parent node to which the first leaf node belongs;
determining a root node to which the father node belongs according to the father node, and setting a user right attribute which is the same as that of the first leaf node for the root node;
and determining all second leaf nodes in the user account relation data structure according to the root node, and setting the same user rights and interests attribute as the first leaf node for all second leaf nodes in the user account relation data structure.
Further, the apparatus further comprises: a second obtaining unit 460, configured to obtain an identifier of any node in the user account relationship data structure;
a third obtaining unit 470, configured to obtain the user right attribute of the any node according to the identifier of the any node; or,
the device further comprises: an updating unit 480, configured to update the user right attribute of the any node according to the identifier of the any node.
Further, the user account relationship data structure established by the establishing unit 420 is a tree structure; the tree structure is stored in a linked list form, and the linked list includes an identifier of any node in the tree structure and a user right attribute of the any node corresponding to the identifier.
The apparatus of this embodiment may be configured to execute the technical solutions of the method embodiments shown in fig. 1, fig. 2, fig. 3A, fig. 3B, and fig. 3C, and the implementation principles and technical effects are similar, and are not described herein again.
Accordingly, the authentication device for user rights provided by the embodiment of the present invention can also be implemented by another structure. Fig. 5 is a schematic diagram of a hardware structure of an authentication apparatus for user rights according to an embodiment of the present invention, which can implement the processes of the embodiments shown in fig. 1 to 3 of the present invention, and as shown in fig. 5, the authentication apparatus for user rights may include: the device comprises a shell 51, a processor 52, a memory 53, a circuit board 54 and a power circuit 55, wherein the circuit board 54 is arranged inside a space enclosed by the shell 51, and the processor 52 and the memory 53 are arranged on the circuit board 54; a power supply circuit 55 for supplying power to each circuit or device of the server; the memory 53 is used to store executable program code; the processor 52 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 53 for executing the method described in the foregoing embodiment.
The specific execution process of the above steps by the processor 52 and the steps further executed by the processor 52 by running the executable program code may refer to the description of the embodiment shown in fig. 1 to 3 of the present invention, and are not described herein again.
The authentication device of the user rights can be applied to the server. The server exists in a variety of forms, including but not limited to: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
It should be noted that, in this document, terms such as "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term "comprising", without further limitation, means that the element so defined is not excluded from the group consisting of additional identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof.
In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.

Claims (8)

1. A method of authenticating a user's rights, the method comprising:
acquiring various types of user account information;
when the multiple types of user account information belong to the same user, establishing a user account relation data structure of the user, wherein the user account relation data structure comprises a root node and a plurality of leaf nodes connected with the root node;
when a user interest attribute is set for a first leaf node in the user account relation data structure, judging whether the user interest attribute needs to be set for the root node and a second leaf node except the first leaf node according to the current service type;
if the user right attribute needs to be set for the root node and the second leaf node, setting the user right attribute which is the same as that of the first leaf node for the root node and the second leaf node;
wherein the method further comprises:
setting the user right attribute only to the first leaf node if the user right attribute does not need to be set to the root node and the second leaf node.
2. The method according to claim 1, wherein if it is required to set a user interest attribute to the root node and the second leaf node, setting the same user interest attribute to the root node and the second leaf node as the first leaf node specifically comprises:
if the user rights and interests attribute needs to be set for the root node and the second leaf node, determining a father node to which the first leaf node belongs according to the first leaf node;
determining a root node to which the father node belongs according to the father node, and setting a user right attribute which is the same as that of the first leaf node for the root node;
and determining all second leaf nodes in the user account relation data structure according to the root node, and setting the same user rights and interests attribute as the first leaf node for all second leaf nodes in the user account relation data structure.
3. The method of claim 1, further comprising:
acquiring an identifier of any node in the user account relation data structure;
acquiring the user right attribute of any node according to the identifier of any node; or updating the user right attribute of any node according to the identifier of any node.
4. The method according to any one of claims 1-3, wherein the user account relationship data structure is a tree structure; the tree structure is stored in a linked list form, and the linked list includes an identifier of any node in the tree structure and a user right attribute of the any node corresponding to the identifier.
5. An apparatus for authenticating a user's rights, the apparatus comprising:
the first acquisition unit is used for acquiring various types of user account information;
the establishing unit is used for establishing a user account relation data structure of the user when the multiple types of user account information belong to the same user, wherein the user account relation data structure comprises a root node and a plurality of leaf nodes connected with the root node;
a determining unit, configured to determine, when a user interest attribute is set for a first leaf node in the user account relationship data structure, whether the user interest attribute needs to be set for the root node and a second leaf node other than the first leaf node according to a current service type;
a first setting unit, configured to set the user right attribute which is the same as that of the first leaf node for the root node and the second leaf node if the user right attribute needs to be set for the root node and the second leaf node;
wherein the apparatus further comprises:
a second setting unit, configured to set the user right attribute only for the first leaf node if the user right attribute does not need to be set for the root node and the second leaf node.
6. The apparatus according to claim 5, wherein the first setting unit is specifically configured to, if a user interest attribute needs to be set for the root node and the second leaf node, determine, according to the first leaf node, a parent node to which the first leaf node belongs;
determining a root node to which the father node belongs according to the father node, and setting a user right attribute which is the same as that of the first leaf node for the root node;
and determining all second leaf nodes in the user account relation data structure according to the root node, and setting the same user rights and interests attribute as the first leaf node for all second leaf nodes in the user account relation data structure.
7. The apparatus of claim 5, further comprising:
the second acquisition unit is used for acquiring the identifier of any node in the user account relation data structure;
a third obtaining unit, configured to obtain the user right attribute of the any node according to the identifier of the any node; or,
the device further comprises: and the updating unit is used for updating the user right attribute of any node according to the identifier of any node.
8. The apparatus according to any one of claims 5 to 7, wherein the user account relationship data structure established by the establishing unit is a tree structure; the tree structure is stored in a linked list form, and the linked list includes an identifier of any node in the tree structure and a user right attribute of the any node corresponding to the identifier.
CN201710387586.5A 2017-05-26 2017-05-26 Authentication method and device for user rights and interests Active CN107124426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710387586.5A CN107124426B (en) 2017-05-26 2017-05-26 Authentication method and device for user rights and interests

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710387586.5A CN107124426B (en) 2017-05-26 2017-05-26 Authentication method and device for user rights and interests

Publications (2)

Publication Number Publication Date
CN107124426A CN107124426A (en) 2017-09-01
CN107124426B true CN107124426B (en) 2020-04-03

Family

ID=59729482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710387586.5A Active CN107124426B (en) 2017-05-26 2017-05-26 Authentication method and device for user rights and interests

Country Status (1)

Country Link
CN (1) CN107124426B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944919B (en) * 2017-11-24 2020-01-07 平安科技(深圳)有限公司 Account query method, device, equipment and computer readable storage medium
CN110597893B (en) * 2019-08-05 2022-12-09 宁波房联云图数据技术有限公司 Management method, device and system of house rights and interests data
CN111291136B (en) * 2020-01-21 2024-06-07 上海秒针网络科技有限公司 Identification association relation processing method, device, computer equipment and storage medium
CN112463065B (en) * 2020-12-10 2024-07-12 恩亿科(北京)数据科技有限公司 Account opening calculation method and system
CN113780721B (en) * 2021-07-29 2024-04-09 深圳市思为软件技术有限公司 Data integration method and system
CN116862513B (en) * 2023-08-30 2023-11-07 环球数科集团有限公司 High-safety public payment system based on PoS consensus

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7925561B2 (en) * 2006-03-01 2011-04-12 Realtick Llc Methods and systems for risk management
CN104077694B (en) * 2013-03-27 2018-04-06 阿里巴巴集团控股有限公司 User's right information processing method and system
CN105894159A (en) * 2014-12-03 2016-08-24 北京航天长峰科技工业集团有限公司 Implementation method of cross-domain and cross-platform user unified management system
CN105656984A (en) * 2015-10-22 2016-06-08 乐视致新电子科技(天津)有限公司 Member rights synchronizing method, device, server and system among multiple devices

Also Published As

Publication number Publication date
CN107124426A (en) 2017-09-01

Similar Documents

Publication Publication Date Title
CN107124426B (en) Authentication method and device for user rights and interests
CN105007282B (en) The Malware network behavior detection method and system of network-oriented service provider
US9055443B2 (en) Mobile device-type locking
US10609082B2 (en) Identity experience framework
US20240028711A1 (en) Highly scalable permissioned block chains
CN108494799A (en) data sharing method and system
US20240267366A1 (en) Identity experience framework
CN103607385A (en) Method and apparatus for security detection based on browser
CN105426761B (en) A kind of recognition methods of illegal application and mobile terminal
CN110224851B (en) Account information merging method and device, computer equipment and computer storage medium
TWI655557B (en) Method and device for extracting feature information
CN105187392A (en) Mobile terminal malicious software detection method based on network access point and system thereof
CN105763565B (en) Account logon method, device and game system
CN109639657A (en) A kind of method and device for screening authentication mode
CN114139135B (en) Equipment login management method, device and storage medium
CN109002733A (en) A kind of pair of equipment carries out the method and device of reliability evaluation
CN109547427A (en) Black list user's recognition methods, device, computer equipment and storage medium
CN111343197A (en) Account processing method and device
CN109088949B (en) Matching method of Internet of things services and MME
CN105988998B (en) Relational network construction method and device
CN110121174B (en) Implicit identity authentication method of mobile intelligent terminal
WO2015131680A1 (en) Multi-card multi-standy communication terminal, method and device for network locking thereof, and computer storage medium
CN113709311B (en) User legalization operation service platform of virtual operator value-added service
CN112182540B (en) Identity verification method and device
KR102332004B1 (en) Method, system and non-transitory computer-readable recording medium for managing an account on blockchain network

Legal Events

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