Method and apparatus for user information authorization

Obtaining user authorization information through smart contracts and blockchain technology solves disputes and data leakage problems caused by the lack of clear user authorization in the existing technology, and achieves high security of user information and transparency of authorization process.

CN113282887BActive Publication Date: 2025-06-17BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010102568.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-19
Publication Date
2025-06-17
Estimated Expiration
2040-02-19

AI Technical Summary

Technical Problem

The lack of clear user authorization in cloning user accounts leads to the risk of disputes and data breaches.

Method used

By combining smart contracts and blockchain technology, user authorization information is obtained, and the first authorization instruction and the second authorization instruction are used to clearly obtain various fields of user authorization to ensure the security of authorization information.

Benefits of technology

It effectively avoids various shortcomings caused by the lack of user authorization, improves the security of user information, and ensures the transparency and credibility of the authorization process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113282887B_ABST
    Figure CN113282887B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and apparatus for user information authorization, which relates to the field of computer technology. A specific embodiment of the method includes: receiving user authorization information by a first node in a blockchain network, encapsulating the authorization information and publishing it to a second node in the blockchain network; generating a smart contract by the second node based on the encapsulated authorization information, and writing a contract identifier of the smart contract into a third node; controlling the third node to obtain the authorization information in the smart contract according to the contract identifier. This embodiment combines smart contract and blockchain technologies to obtain user authorization information, which can avoid various deficiencies caused by the lack of user authorization. Through the first authorization instruction and the second authorization instruction, each field for obtaining user authorization can be clearly defined, further improving the security of user information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method and device for user information authorization. Background Art

[0002] As the number of users of internationalized services increases and the network environment becomes more complex, software anomalies often occur due to incomplete software testing or the inability to simulate full coverage at all. In the prior art, the method of cloning user accounts can be used to quickly locate and solve anomaly problems.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] In the prior art, when cloning user accounts, it is carried out without authorization or in the case of unclear authorized fields, which is extremely likely to cause disputes and data leakage. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method and device for user information authorization, which combine smart contract and blockchain technologies to obtain user authorization information, and can avoid various deficiencies caused by the lack of user authorization. Through the first authorization instruction and the second authorization instruction, each field of user authorization can be clearly obtained, further improving the security of user information.

[0006] To achieve the above object, according to one aspect of the embodiments of the present invention, a method for user information authorization is provided, including:

[0007] Receiving user authorization information by a first node in a blockchain network, encapsulating the authorization information and publishing it to a second node in the blockchain network;

[0008] Generating a smart contract by the second node based on the encapsulated authorization information, and writing a contract identifier of the smart contract into a third node;

[0009] Controlling the third node to obtain the authorization information in the smart contract according to the contract identifier.

[0010] Optionally, the authorization information includes: authorization items and authorization fields;

[0011] Receiving user authorization information includes: presenting candidate authorization items to the user, screening the authorization items from each candidate authorization item in response to a first authorization instruction of the user; presenting candidate authorization fields corresponding to the authorization items to the user, and screening the authorization fields from each candidate authorization field in response to a second authorization instruction of the user.

[0012] Optionally, publishing the authorized information encapsulated to a second node of the blockchain network includes: encrypting the authorized information using the public key of a third node, and publishing the encapsulated authorized information and a timestamp to the second node of the blockchain network;

[0013] Obtaining the authorized information in the smart contract according to the contract identifier includes: parsing the smart contract corresponding to the contract identifier using the private key to obtain the authorized information in the smart contract.

[0014] Optionally, after controlling the third node to obtain the authorized information by parsing the smart contract, it further includes: controlling the third node to clone the user's account according to the authorized information.

[0015] Optionally, controlling the third node to clone the user's account according to the authorized information includes: controlling the third node to convert the authorized information into target parameter structure information with a preset parameter structure, and cloning the user's account according to the target parameter structure information.

[0016] Optionally, before controlling the third node to clone the user's account according to the authorized information, it further includes: controlling the third node to send a cloning request to the first node, and confirming that the confirmation information for indicating consent to clone sent by the first node is received.

[0017] Optionally, generating a smart contract based on the encapsulated authorized information includes: solidifying the encapsulated authorized information based on the DPOS consensus mechanism to generate the smart contract.

[0018] According to a second aspect of the embodiments of the present invention, a device for user information authorization is provided, including:

[0019] A first node control module, which uses the first node in the blockchain network to receive user authorization information, encapsulates the authorization information, and publishes it to the second node of the blockchain network;

[0020] A second node control module, which uses the second node to generate a smart contract based on the encapsulated authorized information, and writes the contract identifier of the smart contract to the third node;

[0021] A third node control module, which controls the third node to obtain the authorized information in the smart contract according to the contract identifier.

[0022] Optionally, the authorized information includes: authorization items and authorization fields;

[0023] The first node control module receives user authorization information, including: presenting candidate authorization items to the user, and screening the authorization items from each candidate authorization item in response to the user's first authorization instruction; presenting candidate authorization fields corresponding to the authorization items to the user, and screening the authorization fields from each candidate authorization field in response to the user's second authorization instruction.

[0024] Optionally, the first node control module encapsulates the authorization information and publishes it to the second node of the blockchain network, including: encrypting the authorization information using the public key of the third node, and publishing the encapsulated authorization information and timestamp to the second node of the blockchain network;

[0025] The third node control module obtains the authorization information in the smart contract according to the contract identifier, including: parsing the smart contract corresponding to the contract identifier using the private key to obtain the authorization information in the smart contract.

[0026] Optionally, the first node control module is further configured to: after controlling the third node to obtain the authorization information by parsing the smart contract, control the third node to clone the user's account according to the authorization information.

[0027] Optionally, the first node control module controls the third node to clone the user's account according to the authorization information, including: controlling the third node to convert the authorization information into target parameter structure information with a preset parameter structure, and cloning the user's account according to the target parameter structure information.

[0028] Optionally, the first node control module is further configured to: before controlling the third node to clone the user's account according to the authorization information, control the third node to send a cloning request to the first node, and confirm that it has received the confirmation information sent by the first node indicating consent to clone.

[0029] Optionally, generating a smart contract based on the encapsulated authorization information, including: solidifying the encapsulated authorization information based on the DPOS consensus mechanism to generate the smart contract.

[0030] According to the third aspect of the embodiments of the present invention, an electronic device for user information authorization is provided, including:

[0031] One or more processors;

[0032] A storage device for storing one or more programs,

[0033] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiments of the present invention.

[0034] According to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method provided in the first aspect of the embodiments of the present invention is implemented.

[0035] One embodiment of the above invention has the following advantages or beneficial effects: By combining smart contract and blockchain technologies to obtain user authorization information, various deficiencies caused by the lack of user authorization can be avoided. Through the first authorization instruction and the second authorization instruction, each field for obtaining user authorization can be clearly defined, further improving the security of user information.

[0036] The further effects of the above non-conventional optional manner will be described in conjunction with the specific embodiments below. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention. Among them:

[0038] Figure 1 is a schematic diagram of the main process of the method for user information authorization according to the embodiments of the present invention;

[0039] Figure 2 is a schematic diagram of the process of the method for user information authorization in an alternative embodiment of the present invention;

[0040] Figure 3 is a schematic diagram of the main modules of the device for user information authorization according to the embodiments of the present invention;

[0041] Figure 4 is an exemplary system architecture diagram to which the embodiments of the present invention can be applied;

[0042] Figure 5 is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted below.

[0044] According to one aspect of the embodiments of the present invention, there is provided a method for user information authorization.

[0045] Figure 1 is a schematic diagram of the main process of the method for user information authorization according to the embodiments of the present invention, as Figure 1As shown, a method for user information authorization includes: step S101, step S102, and step S103.

[0046] Step S101: Use the first node in the blockchain network to receive user authorization information, encapsulate the authorization information, and publish it to the second node of the blockchain network.

[0047] Blockchain technology is a brand-new distributed infrastructure and computing method that uses a block-chain data structure to verify and store data, uses a distributed node consensus algorithm to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script codes to program and operate data. The first node and the second node are different nodes in the blockchain network.

[0048] When receiving the user's authorization information, it is possible to directly receive the authorization information input by the user to the first node or sent to the first node by other devices. It is also possible to display candidate information to the user so that the user can select authorization information from the candidate information.

[0049] Optionally, the authorization information includes: authorization items and authorization fields. Receiving user authorization information includes: displaying candidate authorization items to the user, and screening the authorization items from each candidate authorization item in response to the user's first authorization instruction; displaying candidate authorization fields corresponding to the authorization items to the user, and screening the authorization fields from each candidate authorization field in response to the user's second authorization instruction.

[0050] Exemplarily, an authorization item refers to the category to which the user authorization information belongs. An authorization field refers to the information items that can be authorized in each category.

[0051] Taking the e-commerce field as an example, the authorization items can be client information, account information, order information, shopping cart information, product details information, settlement information, etc. The client information can include network operator, terminal device brand, screen size, longitude and latitude, etc. The account information can be account name, account level, delivery address, etc. The order information can be the products ordered, order time, order quantity, etc. The shopping cart information can be the products in the shopping cart, price, time of adding to the shopping cart, etc. The settlement information can be payment method, whether to pay without password, etc. The product details information can be product pictures, text introductions, packing lists, etc.

[0052] Taking a video website as an example, the authorization items can be client information, account information, historical viewing information, etc. For the historical viewing information, the corresponding authorization fields can be the videos viewed historically, viewing time, viewing duration, etc.

[0053] To improve information security, for privacy information, it may not be set as candidate authorization items. Through the first authorization instruction and the second authorization instruction, the present invention can clearly obtain each field authorized by the user, further improving the security of user information.

[0054] Step S102: Use the second node to generate a smart contract based on the encapsulated authorization information, and write the contract identifier of the smart contract into the third node.

[0055] Generally, the second node is a node with the permission to solidify authorization information. Taking the e-commerce field as an example, the second node can be one or more nodes on the server side with solidification permissions.

[0056] The encapsulation method of the authorization information can be selectively set according to the actual situation, such as encapsulating it into a message in a specific format. Optionally, after encapsulating the authorization information, publishing it to the second node of the blockchain network includes: encrypting the authorization information with the public key of the third node, and publishing the encapsulated authorization information and the timestamp to the second node of the blockchain network. By encrypting the authorization information, the information security can be improved. Carrying the timestamp when publishing is convenient for determining the authorization time of the authorization information, so as to facilitate block solidification according to the time sequence.

[0057] Step S103: Control the third node to obtain the authorization information in the smart contract according to the contract identifier.

[0058] The third node is a node different from the first node in the blockchain network. The third node can be one or several of the second nodes, or a node different from the second node. Taking the e-commerce field as an example, one or more nodes on the server side with solidification permissions can be used as the second node and the third node in the embodiments of the present invention, or only one or more nodes on the server side with solidification permissions can be used as the second node in the embodiments of the present invention, and other nodes can be used as the third node.

[0059] Optionally, after encapsulating the authorization information, publishing it to the second node of the blockchain network includes: encrypting the authorization information with the public key of the third node, and publishing the encapsulated authorization information and the timestamp to the second node of the blockchain network. Obtaining the authorization information in the smart contract according to the contract identifier includes: parsing the smart contract corresponding to the contract identifier with the private key to obtain the authorization information in the smart contract. Using an asymmetric encryption algorithm to encrypt the authorization information can further improve the security of the authorization information.

[0060] The present invention can avoid various deficiencies caused by the lack of user authorization by combining smart contracts and blockchain technology to obtain user authorization information.

[0061] Optionally, after controlling the third node to obtain the authorization information by parsing the smart contract, it may further include: controlling the third node to clone the user's account according to the authorization information. By cloning the user's account, it is convenient to quickly locate and fix abnormal problems in the user's account and improve the user experience.

[0062] Optionally, controlling the third node to clone the user's account according to the authorization information includes: controlling the third node to convert the authorization information into target parameter structure information with a preset parameter structure, and cloning the user's account according to the target parameter structure information. The preset parameter structure refers to the information structure required when cloning the user's account. Converting the authorization information using the preset parameter structure can decouple the cloning method from the information structure of the authorization information and improve the applicability of the cloning method.

[0063] Optionally, before controlling the third node to clone the user's account according to the authorization information, it further includes: controlling the third node to send a cloning request to the first node and confirming that it has received the confirmation information sent by the first node indicating consent to the cloning. By combining smart contract and blockchain technologies to obtain the user's authorization information, explicit authorization from the user can be obtained; by sending a cloning request to the first node before cloning, it can be further determined whether the parsed authorization information has been authorized by the user, improving the security of the user's authorization information.

[0064] Optionally, generating a smart contract based on the encapsulated authorization information includes: solidifying the encapsulated authorization information based on the DPOS (Delegated Proof of Stake) consensus mechanism to generate the smart contract. Solidifying the encapsulated authorization information based on the DPOS (Delegated Proof of Stake) consensus mechanism not only achieves a decentralized election consensus but also improves the operating efficiency of the entire system and reduces energy waste.

[0065] Figure 2 It is a flowchart of the method for user information authorization in an optional embodiment of the present invention. As Figure 2 shown, the method for user information authorization includes:

[0066] S201. Receive user authorization information;

[0067] S202. Encrypt the authorization information using the public key of the third node;

[0068] S203. Generate a smart contract based on the encapsulated information;

[0069] S204. Write the contract identifier of the smart contract into the third node;

[0070] S205. Download the corresponding smart contract using the contract identifier;

[0071] S206. Query the smart contract corresponding to the contract identifier;

[0072] S207. Parse the smart contract using the private key to obtain the authorization information in the smart contract;

[0073] S208. Send a cloning request to the first node;

[0074] S209. Receive a confirmation message indicating consent to clone;

[0075] S210. Convert the authorization information into target parameter structure information with a preset parameter structure;

[0076] S211. Clone the user's account according to the target parameter structure information.

[0077] The first node may include a user authorization module and a smart contract publishing module. The second node may be a module of the server. The third node may include a smart contract query module, a smart contract parsing module, an authorization information parsing module, and an authorization information cloning module.

[0078] When the user feedbacks a problem, the user authorization module is used to select authorization items and authorization fields in the authorization items. For example, the candidate authorization fields of client information include network operator, mobile phone brand, screen size, longitude and latitude, etc. The candidate authorization fields of order information include the ordered goods, order time, order quantity. Specific authorization fields can also be specified for shopping cart information, settlement information, and product details information.

[0079] The smart contract publishing module encapsulates the authorization items and authorization fields of user authorization. For example, the authorization items are identified by enumeration (1 represents client information, 2 represents product details information, 3 represents shopping cart information, 4 represents settlement information, 5 represents order information, etc.). The specific authorization fields in the authorization items are also corresponding identifiers that facilitate authorization query and cloning. A function named sendTransaction is encapsulated in the smart contract publishing module. The function parameters are json data composed of the authorized authorization items and specific authorization fields. Then, the sendTransaction function is implemented by calling the interface. The interface signs the authorization information with the public key of the authorized person and stores it in the transaction content, and then publishes it to the blockchain network. The solidification of the block adopts the DPOS consensus mechanism. The solidification operation is executed by one or more nodes of the server. After solidification, the contract has a unique identifier of the contract. The nodes in the blockchain network update and store all contract information locally.

[0080] The intelligent contract query module can query specific contract information in the blockchain network according to the contract unique identifier. Only the private key corresponding to the public key encryption in the intelligent contract publishing module can decrypt the encrypted information in the transaction.

[0081] The authorization information parsing module parses the authorization information according to the private key of the authorized person, and constructs the parameter structure of the authorization items and authorization fields required by the authorization information cloning module.

[0082] The authorization information cloning module creates a cloned user module according to the authorization item information and authorization fields obtained by the authorization information parsing module, clones the authorized information according to the authorization fields, and then calls the corresponding creation method according to each authorized item of the authorization.

[0083] Suppose there is a problem with the user settlement module of a certain e-commerce App when user A uses a certain brand of mobile phone under the 3G network. The process of solving this problem through authorization information is as follows:

[0084] (1) User A enters the feedback module of the App, that is, the user authorization module. The user authorization module prompts the user to select the authorized items and the corresponding authorization fields. Suppose the user selects the mobile phone brand and network mode in the client information, and the unique identifier of the commodity in the shopping cart information. Then the user submits the authorization information.

[0085] (2) The user App itself is a node of the blockchain network. After the user submits the authorization information, the authorization information will be submitted to the intelligent contract publishing module of the node, encrypted with the public key of the authorized administrator account, and then published to the blockchain network.

[0086] (3) There are N (N represents a positive integer) nodes on the e-commerce App server that have the permission to solidify blocks. The blockchain node of the user App can only publish and download data, and the block solidification adopts the DPOS consensus mechanism.

[0087] (4) After successful solidification, a unique identifier of an intelligent contract is returned to the intelligent contract publishing module, and the intelligent contract publishing module stores this unique identifier in the feedback system.

[0088] (5) The App of the administrator account integrates a blockchain node. According to the unique identifier in the feedback system, the intelligent contract is queried, and then the encrypted authorization items and authorization field information in the intelligent contract are parsed using its own private key. If the administrator decides to initiate a cloning request, first create a cloned account, and then add the unique identifier of the commodity in the shopping cart information in the authorization information to the shopping cart of the cloned account.

[0089] After cloning an account according to the authorized items and authorized fields, user account problems can be simulated based on the cloned account, protecting the user's account security without the need for the user's password. The present invention can quickly locate abnormal problems while ensuring the security of user information and under the condition that the user's authorization is legal, improving the user experience and account security.

[0090] According to a second aspect of an embodiment of the present invention, there is provided an apparatus for implementing the above method.

[0091] Figure 3 It is a schematic diagram of the main modules of the apparatus for user information authorization according to an embodiment of the present invention, as Figure 3 shown, the apparatus 300 for user information authorization includes:

[0092] A first node control module 301, which uses a first node in the blockchain network to receive user authorization information, encapsulates the authorization information and publishes it to a second node in the blockchain network;

[0093] A second node control module 302, which uses a second node to generate a smart contract based on the encapsulated authorization information and writes the contract identifier of the smart contract into a third node;

[0094] A third node control module 303, which controls the third node to obtain the authorization information in the smart contract according to the contract identifier.

[0095] Optionally, the authorization information includes: authorized items and authorized fields;

[0096] The first node control module receiving user authorization information includes: presenting candidate authorized items to the user, screening the authorized items from each candidate authorized item in response to a first user authorization instruction; presenting candidate authorized fields corresponding to the authorized items to the user, and screening the authorized fields from each candidate authorized field in response to a second user authorization instruction.

[0097] Optionally, the first node control module publishing the encapsulated authorization information to the second node in the blockchain network includes: encrypting the authorization information with the public key of the third node and publishing the encapsulated authorization information and timestamp to the second node in the blockchain network;

[0098] The third node control module obtaining the authorization information in the smart contract according to the contract identifier includes: parsing the smart contract corresponding to the contract identifier with the private key to obtain the authorization information in the smart contract.

[0099] Optionally, the first node control module is further configured to: after controlling the third node to obtain the authorization information by parsing the smart contract, control the third node to clone the user's account according to the authorization information.

[0100] Optionally, the first node control module controls the third node to clone the user's account according to the authorization information, including: controlling the third node to convert the authorization information into target parameter structure information with a preset parameter structure, and cloning the user's account according to the target parameter structure information.

[0101] Optionally, the first node control module is further configured to: before controlling the third node to clone the user's account according to the authorization information, control the third node to send a cloning request to the first node, and confirm that it has received the confirmation information sent by the first node indicating consent to clone.

[0102] Optionally, generating a smart contract based on the encapsulated authorization information includes: solidifying the encapsulated authorization information based on the DPOS consensus mechanism to generate the smart contract.

[0103] According to a third aspect of the embodiments of the present invention, there is provided an electronic device for user information authorization, including:

[0104] One or more processors;

[0105] A storage device for storing one or more programs,

[0106] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiments of the present invention.

[0107] According to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the method provided in the first aspect of the embodiments of the present invention is implemented.

[0108] Figure 4 An exemplary system architecture 400 to which the method for user information authorization or the device for user information authorization according to the embodiments of the present invention can be applied is shown.

[0109] As Figure 4 shown, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used to provide a medium for communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0110] Users can use terminal devices 401, 402, and 403 to interact with server 405 via network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, and 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).

[0111] Terminal devices 401, 402, and 403 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop computers, desktop computers, and so on.

[0112] Server 405 can be a server providing various services, such as a background management server that supports shopping websites browsed by users using terminal devices 401, 402, and 403 (for example only). The background management server can analyze and process data such as product information query requests received, and feedback the processing results (such as target push information, product information - for example only) to the terminal device.

[0113] It should be noted that the method for authorizing user information provided by the embodiments of the present invention is generally executed by server 405. Correspondingly, the device for authorizing user information is generally set in server 405.

[0114] It should be understood that Figure 4 the numbers of terminal devices, networks, and servers in

[0115] are merely illustrative. According to actual needs, there can be any number of terminal devices, networks, and servers. Figure 5 Reference is now made to Figure 5 which shows a schematic structural diagram of a computer system 500 of a terminal device suitable for implementing the embodiments of the present invention.

[0116] As Figure 5 shown, computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. In RAM 503, various programs and data required for the operation of system 500 are also stored. CPU 501, ROM 502, and RAM 503 are connected to each other via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0117] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.

[0118] Specifically, according to an embodiment disclosed by the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment disclosed by the present invention includes a computer program product which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from the removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, the above functions defined in the system of the present invention are performed.

[0119] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0121] The modules involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules can also be provided in a processor. For example, it can be described as: a processor includes a first node control module that receives user authorization information using a first node in a blockchain network, encapsulates the authorization information, and publishes it to a second node in the blockchain network; a second node control module that uses the second node to generate a smart contract based on the encapsulated authorization information and writes the contract identifier of the smart contract to a third node; and a third node control module that controls the third node to obtain the authorization information in the smart contract according to the contract identifier. Among them, the names of these modules do not constitute a limitation to the module itself in some cases. For example, the first node control module can also be described as "the module that writes the contract identifier of the smart contract to the third node".

[0122] As another aspect, the present invention also provides a computer-readable medium, which can be included in the device described in the above embodiments; or it can exist alone without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the device includes: receiving user authorization information using a first node in a blockchain network, encapsulating the authorization information, and publishing it to a second node in the blockchain network; using the second node to generate a smart contract based on the encapsulated authorization information and writing the contract identifier of the smart contract to a third node; and controlling the third node to obtain the authorization information in the smart contract according to the contract identifier.

[0123] According to the technical solution of the embodiments of the present invention, by combining smart contract and blockchain technologies to obtain user authorization information, various deficiencies caused by the lack of user authorization can be avoided. Through the first authorization instruction and the second authorization instruction, each field for obtaining user authorization can be clearly defined, further improving the security of user information.

[0124] The above specific implementation manners do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for user information authorization, characterized in that, Including: Receiving user authorization information by a first node in a blockchain network, encrypting the authorization information using the public key of a third node, and publishing the encapsulated authorization information and a timestamp to a second node in the blockchain network; Generating a smart contract by the second node based on the encapsulated authorization information, and writing a contract identifier of the smart contract to the third node; Controlling the third node to parse the smart contract corresponding to the contract identifier using a private key, and obtaining the authorization information in the smart contract.

2. The method according to claim 1, characterized in that, The authorization information includes: authorization items and authorization fields; Receiving user authorization information includes: presenting candidate authorization items to the user, and screening the authorization items from the respective candidate authorization items in response to a first authorization instruction of the user; presenting candidate authorization fields corresponding to the authorization items to the user, and screening the authorization fields from the respective candidate authorization fields in response to a second authorization instruction of the user.

3. The method according to claim 1, characterized in that, After controlling the third node to obtain the authorization information, it further includes: controlling the third node to clone the user's account according to the authorization information.

4. The method according to claim 3, characterized in that, Controlling the third node to clone the user's account according to the authorization information includes: controlling the third node to convert the authorization information into target parameter structure information with a preset parameter structure, and cloning the user's account according to the target parameter structure information.

5. The method according to claim 3, characterized in that, Before controlling the third node to clone the user's account according to the authorization information, it further includes: controlling the third node to send a cloning request to the first node, and confirming receipt of confirmation information sent by the first node indicating consent to clone.

6. The method according to claim 1, characterized in that, Generating a smart contract based on the encapsulated authorization information includes: solidifying the encapsulated authorization information based on a DPOS consensus mechanism to generate the smart contract.

7. An apparatus for user information authorization, characterized in that, Including: A first node control module that receives user authorization information by a first node in a blockchain network, encrypts the authorization information using the public key of a third node, and publishes the encapsulated authorization information and a timestamp to a second node in the blockchain network; A second node control module that generates a smart contract by the second node based on the encapsulated authorization information, and writes a contract identifier of the smart contract to the third node; A third node control module that controls the third node to parse the smart contract corresponding to the contract identifier using a private key, and obtains the authorization information in the smart contract.

8. An electronic device for user information authorization, characterized in that, Including: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the method according to any one of claims 1-6.

9. A computer-readable medium having a computer program stored thereon, characterized in that, The program, when executed by the processor, implements the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Trading system for smart contract of blockchain and method thereof

    TW201917658A