User registration and login method and system

By storing and managing user registration information on the first node of the distributed decentralized system and providing registration information to the second node when needed, the problem of users being unable to log in due to untimely synchronization is solved, saving resources and improving system efficiency.

CN119603314APending Publication Date: 2025-03-11武汉达梦数据技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411882704.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing distributed decentralized system will cause users to be unable to log in when the registration information is not synchronized in time. At the same time, since each node needs to synchronize a large amount of registration information, resources will be wasted.

Method used

When a user registers, the first node acquires and stores the user's registration information and generates a user ID containing the identity of the first node. When the second node needs to log in, the registration information is requested from the first node based on the user ID, and when the first node cannot respond, the registration information is obtained from the backup node.

Benefits of technology

By reducing the need for each node to store registration information, saving resources, avoiding login failures caused by untimely synchronization, the system's resource utilization efficiency and processing speed are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603314A_ABST
    Figure CN119603314A_ABST
Patent Text Reader

Abstract

The invention relates to a user registration and login method and system, and belongs to the technical field of computer systems.The user registration method is suitable for a first node of a distributed decentralized system and comprises the steps that registration information input when a user registers is obtained and stored, a user ID is generated based on the registration information, and the user ID is used for registering the user; the user ID comprises an identity label of the first node; and when a registration information acquisition request sent by a second node of the distributed decentralized system is received, sending the registration information to the second node. According to the invention, the registration information of the user does not need to be stored in all nodes, resources are saved, the registration information does not need to be synchronized in the whole network, the situation that other nodes cannot log in due to untimely synchronization is prevented, and the resource utilization efficiency and the processing speed of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer systems, and in particular to a user registration and login method and system. Background Art

[0002] In today's hot distributed and decentralized technology, registration of decentralized distributed systems is an unavoidable requirement.

[0003] In the prior art, the registration of a distributed decentralized system is that each decentralized node stores all the registration information of the system. This method has many problems in actual use. For example, if the synchronization of nodes in the entire network is not timely, there will be a problem of being unable to log in to a different node after registration. In addition, the amount of registration information is large, and each node must synchronize a large amount of registration information, which wastes resources.

[0004] It can be seen that the existing distributed decentralized system has the problem of being unable to log in when changing nodes and wasting resources. Summary of the invention

[0005] In view of this, it is necessary to provide a user registration and login method and system to solve the problem of being unable to log in when changing nodes and wasting resources in the existing distributed decentralized system.

[0006] In order to solve the above problems, the present invention provides a user registration method, which is applicable to a first node of a distributed decentralized system, comprising: Acquire and store registration information entered by the user during registration, and generate a user ID based on the registration information, wherein the user ID includes the identity identifier of the first node; When receiving a registration information acquisition request sent by a second node of the distributed decentralized system, the registration information is sent to the second node.

[0007] In a possible implementation manner, storing the registration information input by the user during registration includes: The registration information is stored in a local storage area.

[0008] In a possible implementation manner, storing the registration information input by the user during registration includes: The registration information is backed up to a backup node, and the registration information is associated with the user ID.

[0009] In a possible implementation manner, the designated field in the user ID is used to represent the identity of the first node.

[0010] The present invention also provides a user login method, which is applicable to a second node of a distributed decentralized system, comprising: Obtaining a user ID input by a user when logging in, wherein the user ID includes an identity identifier of a first node of the distributed decentralized system; Sending a registration information acquisition request to the first node based on the identity identifier of the first node, and receiving registration information returned by the first node; Use the registration information to complete the login.

[0011] In a possible implementation manner, when the first node cannot return the registration information, the method further includes: Sending a registration information acquisition request to a backup node, wherein the registration information acquisition request includes the user ID, and the backup node stores registration information corresponding to the user ID; Receive the registration information corresponding to the user ID returned by the backup node.

[0012] In a possible implementation manner, when the backup node cannot return the registration information, the method further includes: Acquire registration information associated with the user ID stored in the local storage area of ​​the first node.

[0013] The present invention also provides a distributed decentralized system, comprising a first node and a second node, wherein: The first node is used to obtain and store registration information input by the user during registration, and generate a user ID based on the registration information, wherein the user ID includes an identity identifier of the first node; The second node is used to obtain a user ID input by a user when logging in, and send a registration information acquisition request to the first node based on the identity identifier of the first node in the user ID; The first node is further configured to send the registration information to the second node based on the registration information acquisition request.

[0014] In a possible implementation, the distributed decentralized system further includes a backup node, and the backup node is used to store registration information corresponding to the user ID, wherein: The second node is further configured to send a registration information acquisition request to the backup node when the first node cannot return the registration information, wherein the registration information acquisition request includes the user ID; The backup node is further configured to send registration information corresponding to the user ID to the second node based on the registration information acquisition request.

[0015] In a possible implementation, the nodes in the distributed decentralized system communicate with each other through a routing mechanism.

[0016] The beneficial effects of the present invention are as follows: the user registration method provided by the present invention, for the registration problem of a distributed decentralized system, obtains and stores the registration information input by the user at the first node where the user registers, and when receiving a registration information acquisition request sent by the second node, sends the registration information to the second node for login. There is no need to store the user's registration information in all nodes, thus saving resources, and there is no need to synchronize the registration information across the entire network, thus preventing the situation where other nodes cannot log in due to untimely synchronization, thereby improving the resource utilization efficiency and processing speed of the system. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] FIG1 is a flow chart of a user registration method provided by an embodiment of the present invention; Figure 2 A flowchart of a user login method provided by an embodiment of the present invention; Figure 3 A flowchart of a method for logging in using a backup node provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a distributed decentralized system provided by an embodiment of the present invention; Figure 5 A schematic diagram of the structure of a backup node provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of the present invention and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise specified, "multiple" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone.

[0021] The descriptions of "first", "second", etc. involved in the embodiments of the present invention are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the technical features defined as "first" and "second" may explicitly or implicitly include at least one of the features.

[0022] Reference to an "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0023] A specific embodiment of the present invention, as Figure 1 As shown, a user registration method is disclosed, which is applicable to a first node of a distributed decentralized system, including: S101, obtaining and storing registration information input by a user during registration, and generating a user ID based on the registration information, where the user ID includes an identity identifier of the first node; S102: When receiving a registration information acquisition request sent by a second node of the distributed decentralized system, the registration information is sent to the second node.

[0024] In the embodiment of the present invention, a distributed decentralized system refers to a system composed of multiple nodes without a master-slave relationship. The nodes can be servers, computers, and other devices that have data processing and storage functions. In the embodiment of the present invention, the distributed decentralized system includes at least a first node and a second node, wherein the user registers at the first node, and the user registration method provided in the embodiment of the present invention is applicable to the first node.

[0025] In an embodiment of the present invention, when a user registers at the first node, the user needs to enter registration information, which includes but is not limited to user name, password and other information. After the first node completes the registration based on the registration information, it will return a user ID (Identity document, identity identification number), where the user ID includes the identity of the first node, and the identity of the first node is used to uniquely represent the first node.

[0026] In an embodiment of the present invention, when a user needs to use the user ID to log in to a second node in a distributed decentralized system, the second node will send a registration information acquisition request to the first node based on the node identity identifier in the user ID. After receiving the registration information acquisition request, the first node will send the registration information corresponding to the user ID to the second node for login.

[0027] The user registration method provided by the present invention solves the registration problem of a distributed decentralized system by acquiring and storing the registration information input by the user at the first node where the user registers, and upon receiving a registration information acquisition request sent by the second node, sending the registration information to the second node for login. There is no need to store the user's registration information in all nodes, thus saving resources, and there is no need to synchronize the registration information across the entire network, thus preventing the situation where other nodes cannot log in due to untimely synchronization, thereby improving the resource utilization efficiency and processing speed of the system.

[0028] As a possible implementation mode of the present invention, in this implementation mode, storing the registration information input by the user during registration includes: Store the registration information in the local storage area.

[0029] In an embodiment of the present invention, when the first node stores the registration information, in order to prevent the registration information from being lost, the registration information may be stored in the local storage area of ​​the first node, such as the mechanical hard disk or digital hard disk of the first node. When the first node is offline or unavailable, the registration information corresponding to the user ID can be found in the local storage area of ​​the first node for logging in to other nodes, thereby improving the robustness and reliability of the system. In an embodiment of the present invention, the local storage area may be an internal storage unit of an electronic device, such as a hard disk or memory of an electronic device. It may also be an external storage device of an electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the local storage area may also include both the internal storage unit of the electronic device and the external storage device, and the local storage area is used to store application software and various types of data installed in the electronic device.

[0030] The embodiments of the present invention do not specifically limit the types of electronic devices mentioned, and the electronic devices may be portable electronic devices such as mobile phones, tablet computers, personal digital assistants (PDAs), wearable devices, and laptop computers. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as laptop computers with touch-sensitive surfaces (e.g., touch panels). It should also be understood that in some other embodiments of the present invention, the electronic device may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0031] As a possible implementation mode of the present invention, in this implementation mode, storing the registration information input by the user during registration includes: The registration information is backed up to the backup node and associated with the user ID.

[0032] In an embodiment of the present invention, in order to further ensure the stability of the system, when the first node stores the registration information, it can also store the registration information in a preset backup node. The backup node refers to a node set up in the distributed decentralized system specifically for storing user registration information. The backup node is generally set up in a relatively secure network environment. Multiple backup nodes can be set up. When the first node stores the registration information in the backup node, it can store the registration information in the multiple backup nodes respectively at the same time, and associate the registration information with the user ID, so as to facilitate the subsequent search for the corresponding registration information according to the user ID.

[0033] The embodiment of the present invention further ensures that other nodes can find the registration information when logging in by setting a backup node to store the registration information, thereby improving the stability of the system.

[0034] As a possible implementation manner of the present invention, in this implementation manner, the designated field in the user ID is used to represent the identity of the first node.

[0035] In the embodiment of the present invention, when the user ID is used to record the identity of the first node, the specified field in the user ID can be used to record the identity of the first node. Specifically, if the user ID is a pure digital ID: 04571625879, the first four digits of the pure digital ID can be set as the identity of the node, that is, 0457 is the identity of the first node. Optionally, the user ID can be set according to actual conditions to ensure that the corresponding first node can be uniquely found according to the user ID.

[0036] In order to adapt the above user registration method, such as Figure 2 As shown, an embodiment of the present invention further provides a user login method, which is applicable to a second node of a distributed decentralized system, comprising: S201, obtaining a user ID input by a user when logging in, where the user ID includes an identity identifier of a first node of a distributed decentralized system; S202, sending a registration information acquisition request to the first node based on the identity identifier of the first node, and receiving registration information returned by the first node; S203, completing the login using the registration information.

[0037] In the embodiment of the present invention, the second node refers to other nodes in the distributed decentralized system that are different from the first node. When the user completes registration at the first node and needs to change the node to log in, the user can log in at the second node through the user ID returned by the first node. Specifically, when the second node receives the user ID entered by the user when logging in, and the user ID contains the identity of the first node, a registration information acquisition request is sent to the first node based on the identity of the first node contained in the user ID. The registration information acquisition request should contain the user ID. After receiving the registration information acquisition request, the first node sends the corresponding registration information to the second node based on the user ID in the registration information acquisition request. The second node uses the registration information to log in and completes the node change login.

[0038] In the embodiment of the present invention, when logging in to a different node, registration information can be directly obtained from the first node according to the identity identifier of the first node in the user ID. The second node does not need to store the registration information, thus saving system resources.

[0039] As a possible implementation mode of the present invention, in this implementation mode, Figure 3 As shown, when the first node cannot return the registration information, the method further includes: S301, sending a registration information acquisition request to a backup node, the registration information acquisition request includes a user ID, and the backup node stores registration information corresponding to the user ID; S302, receiving registration information corresponding to the user ID returned by the backup node.

[0040] Continuing with the aforementioned embodiment, a backup node specifically used to store user registration information is provided in the distributed decentralized system. When a user logs in at the second node, if the first node is offline or unavailable, the first node will not be able to send registration information to the second node. At this time, the second node can send a registration information acquisition request to the backup node, and receive the registration information corresponding to the user ID sent by the backup node based on the registration information acquisition request.

[0041] Furthermore, when the backup node cannot return the registration information, the method further includes: The registration information associated with the user ID stored in the local storage area of ​​the first node is obtained.

[0042] As in the aforementioned embodiment, the local storage area of ​​the first node also stores registration information associated with the user ID. When both the first node and the backup node are unavailable, the registration information associated with the user ID can be directly obtained from the local storage area of ​​the first node to switch nodes for login.

[0043] In the embodiment of the present invention, since only the registration node is responsible for storing the user's registration information, other nodes only need to perform routing queries based on the ID without storing the registration information of the entire network, which significantly reduces the complexity of synchronization and the consumption of network bandwidth. The registration information is only stored on the node responsible for processing the registration request, avoiding the waste of resources storing all user information on each node, and improving the resource utilization efficiency and processing speed of the system. Even if some nodes are offline or unavailable, other nodes can still access the registration information through the rerouting mechanism, which improves the robustness and reliability of the system. By directly routing to the node storing the registration information, the login process can be completed quickly, reducing the problem of login failure due to information synchronization delay.

[0044] In order to better implement the user registration and login method in the embodiment of the present invention, Figure 4 As shown, the present invention also provides a distributed decentralized system, including a first node 401 and a second node 402, wherein: The first node 401 is used to obtain and store the registration information input by the user during registration, and generate a user ID based on the registration information. The user ID includes the identity of the first node; The second node 402 is used to obtain the user ID input by the user when logging in, and send a registration information acquisition request to the first node based on the identity identifier of the first node in the user ID; The first node 401 is further configured to send registration information to the second node based on the registration information acquisition request.

[0045] In an embodiment of the present invention, a distributed decentralized system includes multiple nodes, and a user can register and / or log in at each node. When the same user registers and logs in at different nodes, the node where the user registers is the first node, and the node where the user logs in at a different node is the second node. In an embodiment of the invention, a node may be a single server, a server group, or a cloud platform. In some embodiments, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multiple cloud, or any combination thereof. When a user registers at a first node, the first node acquires and stores the registration information entered by the user, completes the user registration based on the registration information, and returns a user ID to the user, wherein the user ID includes the identity of the first node. Specifically, a specific field in the user ID may be used to represent the identity of the first node. For example, if the user ID is a pure digital ID: 04571625879, the first four digits of the pure digital ID may be set as the identity of the node, i.e., 0457 is the identity of the first node. Optionally, the user ID may be set according to actual conditions to ensure that the corresponding first node can be uniquely found according to the user ID.

[0046] Based on this, when the user switches nodes to log in, he / she inputs the user ID through the second node to log in. After the second node obtains the identity identifier of the first node contained in the user ID, the second node sends a registration information acquisition request to the first node based on the identity identifier. After receiving the registration information acquisition request, the first node sends the registration information corresponding to the user ID to the second node based on the user ID in the registration information acquisition request.

[0047] In the distributed decentralized system provided by the embodiment of the present invention, the first node used for user registration will save the registration information when performing user registration, and return a user ID containing the identity identifier of the first node. When the user logs in to the second node using the user ID, the second node will obtain the registration information from the first node based on the identity identifier in the user ID to log in. It is not necessary for all nodes in the system to save the registration information, which saves resources and improves the resource utilization efficiency and processing speed of the system.

[0048] As a possible implementation mode of the present invention, in this implementation mode, Figure 5 The distributed decentralized system further includes a backup node 403, which is used to store registration information corresponding to the user ID, wherein: The second node is further configured to send a registration information acquisition request to the backup node when the first node cannot return the registration information, the registration information acquisition request including the user ID; The backup node is further configured to send registration information corresponding to the user ID to the second node based on the registration information acquisition request.

[0049] In an embodiment of the present invention, a backup node is also provided in the distributed decentralized system. The backup node is specifically used to store the registration information entered by the user when registering at each node, and associate the registration information with the user ID. Specifically, when the user registers at the first node, the first node sends the registration information entered by the user to the backup node after obtaining the registration information. There can be multiple backup nodes, and each backup node saves the registration information. When the user logs in at the second node, if the first node is offline or unavailable at this time and cannot return the registration information to the second node, the second node will send a registration information acquisition request to the backup node. The backup node sends the corresponding registration information to the second node based on the user ID in the registration information acquisition request, and the second node receives the registration information sent by the backup node to log in.

[0050] The embodiment of the present invention sets a backup node in a distributed decentralized system to store registration information. Even if some nodes are offline or unavailable, other nodes can still access the registration information through a rerouting mechanism, thereby improving the robustness and reliability of the system.

[0051] Optionally, the nodes in the distributed decentralized system provided by the embodiment of the present invention communicate with each other through a routing mechanism. Furthermore, when the first node is offline or unavailable, the second node can adopt a rerouting mechanism to directly route to the backup node. The login process can be completed quickly, reducing the problem of login failure due to information synchronization delays.

[0052] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0053] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A user registration method, applicable to the first node of a distributed decentralized system, characterized in that: include: Acquire and store registration information entered by the user during registration, and generate a user ID based on the registration information, wherein the user ID includes the identity identifier of the first node; When receiving a registration information acquisition request sent by a second node of the distributed decentralized system, the registration information is sent to the second node.

2. The user registration method according to claim 1, characterized in that: The storage of registration information entered by the user during registration includes: The registration information is stored in a local storage area.

3. The user registration method according to claim 1, characterized in that: The storage of registration information entered by the user during registration includes: The registration information is backed up to a backup node, and the registration information is associated with the user ID.

4. The user registration method according to claim 1, characterized in that: The designated field in the user ID is used to indicate the identity of the first node.

5. A user login method, applicable to a second node of a distributed decentralized system, characterized in that: include: Obtaining a user ID input by a user when logging in, wherein the user ID includes an identity identifier of a first node of the distributed decentralized system; Sending a registration information acquisition request to the first node based on the identity identifier of the first node, and receiving registration information returned by the first node; Use the registration information to complete the login.

6. The user login method according to claim 5, characterized in that: When the first node cannot return the registration information, the method further includes: Sending a registration information acquisition request to a backup node, wherein the registration information acquisition request includes the user ID, and the backup node stores registration information corresponding to the user ID; Receive the registration information corresponding to the user ID returned by the backup node.

7. The user login method according to claim 6, characterized in that: When the backup node cannot return the registration information, the method further includes: Acquire registration information associated with the user ID stored in the local storage area of ​​the first node.

8. A distributed decentralized system, characterized in that: comprising a first node and a second node, wherein, The first node is used to obtain and store registration information input by the user during registration, and generate a user ID based on the registration information, wherein the user ID includes an identity identifier of the first node; The second node is used to obtain a user ID input by a user when logging in, and send a registration information acquisition request to the first node based on the identity identifier of the first node in the user ID; The first node is further configured to send the registration information to the second node based on the registration information acquisition request.

9. The distributed decentralized system according to claim 8, characterized in that: The distributed decentralized system further includes a backup node, which is used to store registration information corresponding to the user ID, wherein: The second node is further configured to send a registration information acquisition request to the backup node when the first node cannot return the registration information, wherein the registration information acquisition request includes the user ID; The backup node is further configured to send registration information corresponding to the user ID to the second node based on the registration information acquisition request.

10. The distributed decentralized system according to claim 9, characterized in that: The nodes in the distributed decentralized system communicate with each other through a routing mechanism.