A data processing method, apparatus, computer device, and readable storage medium
By providing object login and token issuance services through business nodes in the blockchain network, the problems of low login efficiency and poor stability in centralized identity management systems are solved, and efficient and stable login process and resource data operation permission control are achieved.
Patent Information
- Application Number
- CN202210536186.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-05-17
AI Technical Summary
In existing identity management systems, centralized authorization servers are inefficient when faced with a large number of login requests and have poor login stability when malfunctioning, resulting in insufficient login efficiency and stability for application clients.
The system utilizes business nodes within a blockchain network to provide object login and token issuance services. These services handle authorization and token acquisition requests, leveraging the decentralized and self-verifying characteristics of blockchain to enable multiple business nodes to respond to login requests simultaneously, ensuring efficient and stable login processes.
It improves the efficiency and stability of the target object's login application client, ensures the access control and security of resource data operations, and avoids the impact of single point of failure on the login operation.
Smart Images

Figure CN117118640B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a data processing method, apparatus, computer equipment, and readable storage medium. Background Technology
[0002] Existing identity management systems store the identity management information used for login in a centralized server (i.e., an authorization server). This authorization server associates the identity management information with all objects; that is, it stores the identity management information required for login by all objects. Therefore, when any object needs to log in through an application client, it must send a login request to this authorization server to complete the login operation.
[0003] Therefore, if a large number of application clients send login requests simultaneously, the authorization server cannot process them all in a timely manner, resulting in queuing and preventing clients from completing the login process promptly, thus reducing login efficiency. Furthermore, if the authorization server malfunctions, it may fail to respond to client login requests, causing clients to fail to log in and reducing login stability. Summary of the Invention
[0004] This application provides a data processing method, apparatus, computer device, and readable storage medium, which can improve the efficiency and stability of target objects logging into application clients.
[0005] This application provides a data processing method, executed by business nodes in a blockchain network, which provide object login and token issuance services, including:
[0006] The business node receives the authorization request sent by the target object through the application client, calls the object login service based on the authorization request, and obtains the login information to be verified entered by the target object in the object login service;
[0007] The login service matches the login information to be verified with the object credential information. If the login information to be verified matches the object credential information, the object authorization code for the target object is obtained and returned to the application client. The object credential information is obtained by the business node from the consensus node of the blockchain network.
[0008] The system receives a token acquisition request sent by the application client based on an object authorization code, calls the token issuance service based on the token acquisition request, obtains the object token for the target object through the token issuance service, and returns the object token to the application client. The object token provides the application client with operation permissions for resource data within the authorized scope. Operation permissions refer to the application client's permission to operate resource data through business nodes.
[0009] One embodiment of this application provides a data processing apparatus, which is applied to a business node in a blockchain network. The business node is used to provide object login services and token issuance services, including:
[0010] The first receiving module is used to receive the authorization request sent by the target object through the application client, call the object login service based on the authorization request, and obtain the login information to be verified entered by the target object in the object login service;
[0011] The authorization code return module is used to match the login information to be verified with the object credential information through the object login service. If the login information to be verified matches the object credential information, the object authorization code for the target object is obtained and returned to the application client. The object credential information is obtained by the business node from the consensus node of the blockchain network.
[0012] The second receiving module is used to receive token acquisition requests sent by application clients based on object authorization codes, call the token issuance service based on the token acquisition request, obtain the object token for the target object through the token issuance service, and return the object token to the application client; the object token provides the application client with operation permissions for resource data within the authorized scope; operation permissions refer to the application client's permission to operate resource data through business nodes.
[0013] The object login service includes an object login front-end and an object login back-end;
[0014] The first receiving module is specifically used to receive the authorization request sent by the target object through the application client, call the object login front end based on the authorization request, and obtain the login information to be verified entered by the target object in the object login front end;
[0015] The authorization code return module is specifically used to call the login judgment contract through the object login backend. The login judgment contract matches the login information to be verified with the object credential information. The login judgment contract is obtained by the business node from the consensus node.
[0016] The login information to be verified includes the identifier of the object to be verified and the password of the object to be verified.
[0017] The authorization code return module is specifically used to retrieve object credential information from the object information database by verifying the login contract; the object credential information is obtained by the business node from the on-chain data of the consensus node; the object credential information includes object identification credential information;
[0018] The authorization code return module is specifically used to search for the object identifier to be verified in the object identifier credential information. If the object identifier to be verified does not exist in the object identifier credential information, it is determined that the login information to be verified does not match the object credential information.
[0019] The authorization code return module is specifically used to determine the matching result between the login information to be verified and the object credential information based on the password of the object to be verified if the object identification credential information contains an object identifier to be verified.
[0020] The object credential information includes object password credential information and string credential information; one object identifier credential information corresponds to one object password credential information and one string credential information.
[0021] The authorization code return module is specifically used to concatenate the password of the object to be verified and the string credential information corresponding to the identifier of the object in the object credential information to obtain the concatenated login information to be verified.
[0022] The authorization code return module is specifically used to perform hash calculations on the concatenated login information to be verified, and obtain the login information to be verified by hash.
[0023] The authorization code return module is specifically used to compare the hash login information to be verified with the object password credential information corresponding to the object identifier in the object credential information. If the hash login information to be verified is the same as the object password credential information corresponding to the object identifier in the object credential information, a matching result is generated to indicate that the login information to be verified matches the object credential information.
[0024] The authorization code return module is specifically used to generate a matching result indicating that the login information to be verified does not match the object password credential information corresponding to the object identifier in the object credential information if the login information to be verified is different from the object password credential information.
[0025] The second receiving module includes:
[0026] The authorization code verification unit is used to call the authorization code verification contract through the token issuance service, and verify the object's authorization code through the authorization code verification contract; the authorization code verification contract is obtained by the business node from the consensus node;
[0027] The token return unit is used to obtain key authorization information associated with the target object if the object authorization code verification is successful, generate an object token for the target object based on the key authorization information, and return the object token to the application client.
[0028] The authorization code return module is specifically used to obtain the key authorization information selected by the target object in the object login service, and generate an object authorization code for the target object based on the key authorization information. The key authorization information includes at least one of the following: expiration information, operation permissions, and authorization scope. The expiration information is used to characterize the lifecycle of the object token.
[0029] The token return unit is specifically used to parse the object authorization code to obtain the key authorization information associated with the target object.
[0030] Specifically, the second receiving module is further used to obtain the key authorization information selected by the target object in the object login service; the key authorization information includes at least one of time-limited information, operation permissions, and authorization scope; the time-limited information is used to characterize the lifecycle of the object token;
[0031] The token return unit is specifically used to obtain key authorization information associated with the target object from the object login service through the token issuance service.
[0032] Among them, business nodes are also used to provide object information operation services;
[0033] The device also includes:
[0034] The third receiving module is used to receive resource operation requests sent by application clients based on object tokens, and to call object information operation services based on resource operation requests;
[0035] The first response module is used to call the token verification contract through the object information operation service, and verify the resource operation request and the object token through the token verification contract. If the resource operation request and the object token are verified, the resource operation request is responded to through the object information operation service.
[0036] The second response module is used to reject the resource operation request through the object information operation service if the resource operation request and object token verification fail.
[0037] The first response module is specifically used to obtain key authorization information associated with the object token through the token verification contract and determine whether the resource operation request meets the key authorization information.
[0038] The first response module is specifically used to determine that the resource operation request and object token verification are successful if the resource operation request meets the key authorization information.
[0039] The first response module is specifically used to determine that the resource operation request and object token verification fail if the resource operation request does not meet the key authorization information.
[0040] Specifically, the first response module is used to retrieve the target read data requested by the resource read operation request from the object information database through the object information operation service if the resource operation request is a resource read operation request; the target read data belongs to resource data.
[0041] The first response module is specifically used to return the target read data to the application client.
[0042] Specifically, the first response module is used to obtain the target read data from the object information database through the object information operation service if the target read data requested by the resource read operation request exists in the object information database.
[0043] The first response module is specifically used to send a data synchronization request for the target read data to the consensus node through the object information operation service if the target read data does not exist in the object information database. Based on the data synchronization request for the target read data, it retrieves the synchronization data from the on-chain data of the consensus node, stores the synchronization data in the object information database, and retrieves the target read data from the object information database through the object information operation service. The synchronization data includes the target read data.
[0044] Specifically, the first response module is used to obtain the target write data requested by the resource write operation request through the object information operation service if the resource operation request is a resource write operation request; the target write data belongs to resource data.
[0045] The first response module is specifically used to write the target data to the object information database if the target data does not exist in the object information database.
[0046] The first response module is specifically used to forward the target write data to the consensus node if the target write data does not exist in the object information database, so that the consensus node can package the target write data, generate the target block, and perform on-chain processing on the target block.
[0047] The first response module is specifically used to send a data synchronization request for the target write data to the consensus node, receive the target write data returned by the consensus node based on the data synchronization request for the target write data, and write the target write data to the object information database.
[0048] One embodiment of this application provides a computer device, including: a processor and a memory;
[0049] The processor is connected to a memory, which stores a computer program. When the computer program is executed by the processor, it causes the computer device to perform the method provided in the embodiments of this application.
[0050] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided in this application.
[0051] One embodiment of this application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in this application embodiment.
[0052] In this embodiment, a business node in the blockchain network can, after obtaining object credential information from the consensus nodes of the blockchain network, receive an authorization request sent by the target object through an application client. It then obtains the login information to be verified input by the target object through an object login service, and matches the login information to be verified with the object credential information. If the login information to be verified matches the object credential information, it obtains an object authorization code for the target object and returns the object authorization code to the application client. Furthermore, the business node can receive a token acquisition request sent by the application client based on the object authorization code, obtain an object token for the target object through a token issuance service, and return the object token to the application client. Therefore, the business node in the blockchain network can act as an authorization server in an identity management system. The authorization server can obtain distributed storage object credential information from the consensus nodes of the blockchain network and respond to authorization requests and token acquisition requests sent by the application client based on the object credential information (authorization requests and token acquisition requests can be collectively referred to as login requests). Due to the decentralized and self-verifying nature of blockchain networks, multiple business nodes can be deployed. Multiple application clients can send login requests to different business nodes. Therefore, when multiple application clients send login requests simultaneously, multiple business nodes can respond to multiple login requests concurrently, thereby improving the efficiency of target object login to application clients. Furthermore, since there is more than one business node, if one business node fails, other business nodes can still perform login management without affecting the business logic of the login operation, thus improving the stability of target object login to application clients. Simultaneously, business nodes can grant application clients operation permissions for resource data within an authorized scope based on object tokens. These operation permissions allow application clients to manipulate resource data through business nodes. Therefore, business nodes can use object tokens to ensure that while application clients obtain operation permissions, they can also control the object tokens at any time, ensuring that the application client's operations on resource data do not compromise the security of resource data in the identity management system. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a schematic diagram of a layered structure of a blockchain network provided in an embodiment of this application;
[0055] Figure 2This is a schematic diagram of a data interaction scenario provided in an embodiment of this application;
[0056] Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0057] Figure 4 This is a schematic diagram of a resource application process provided in an embodiment of this application;
[0058] Figure 5 This is a schematic diagram illustrating a scenario of applying for resources provided in an embodiment of this application;
[0059] Figure 6 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0060] Figure 7 This is a system architecture diagram for a blockchain electronic invoice scenario provided in an embodiment of this application;
[0061] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0062] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0063] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0064] For details, please see Figure 1 , Figure 1 This is a schematic diagram of a layered blockchain network structure provided in an embodiment of this application. For example... Figure 1 The illustrated blockchain network layered structure can be applied to a blockchain system that may include proxy nodes (e.g., proxy node 100b), a first blockchain system, and a second blockchain system to form a blockchain network. Figure 1 The blockchain network shown is 2000. Both the first and second blockchain systems can include one or more nodes; there is no limit to the number of nodes in either system. Figure 1As shown, the first blockchain system may specifically include nodes 110a, 110b, 110c, ..., and 110n; the second blockchain system may specifically include nodes 120a, 120b, 120c, ..., and 120n.
[0065] In this system, the blockchain network corresponding to the first blockchain system can be called the business network (i.e., witness network) 100a. Nodes within the business network 100a can be called business nodes. These business nodes are primarily used to execute transaction transactions to obtain transaction data associated with those transactions. It is understood that these business nodes do not need to participate in the accounting consensus, but they can obtain block header data and partially authorized visible block data from the core consensus network through identity authentication. To ensure information exchange within the first blockchain system, each node in the first blockchain system can have information connections, allowing for information transmission between nodes.
[0066] The second blockchain system's corresponding blockchain network can be referred to as the core consensus network (i.e., consensus network) 100c. Nodes within the core consensus network 100c can be called consensus nodes (i.e., ledger nodes), and these consensus nodes can run blockchain consensus protocols. To ensure information exchange within the second blockchain system, each node in the second blockchain system can have information connections, allowing for information transmission between nodes.
[0067] It is understood that the information connection within the first and second blockchain systems is not limited by connection method. It can be directly or indirectly connected through wired communication, wireless communication, or other connection methods. This application does not impose any restrictions on these methods.
[0068] in, Figure 1 The proxy node 100b shown can be used to isolate the business network 100a and the core consensus network 100c. The proxy node 100b can layer the peer-to-peer (P2P) network to form a layered structure of "business network - core consensus network" (i.e., a two-layer chain structure), thereby improving the confidentiality and security of data on the blockchain.
[0069] It is understood that, in this embodiment of the application, the proxy node 100b, the business nodes in the business network 100a, and the consensus nodes in the core consensus network 100c can be collectively referred to as blockchain nodes in the blockchain network 2000. It is also understood that these blockchain nodes can be servers accessing the blockchain network 2000 or terminal devices accessing the blockchain network 2000; the specific form of the blockchain node is not limited here.
[0070] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal device can be a mobile phone, tablet, laptop, PDA, smart speaker, mobile internet device (MID), POS (Point of Sales) machine, wearable device (e.g., smartwatch, smart bracelet), etc.
[0071] Understandable, Figure 1 Some nodes in the blockchain network 2000 shown store the complete blockchain database; such nodes, containing all transaction data, can be called full nodes (e.g., ...). Figure 1 The consensus nodes shown are one example; other nodes store a portion of the blockchain database, typically only storing block headers and transaction data associated with their own node, rather than complete transaction data. They perform transaction verification through "Simplified Payment Verification (SPV)." Such nodes can be called lightweight nodes or SPV nodes (e.g., Figure 1 (The business nodes shown).
[0072] Understandable, Figure 1 The business network 100a and the core consensus network 100c shown can be in different network environments. Generally speaking, the business network 100a can be in a public network, and the core consensus network 100c can be in a private network. Therefore, business nodes are deployed in the business network 100a, which is in the public network, and consensus nodes are deployed in the core consensus network 100c, which is in the private network. The two can interact through the routing boundary.
[0073] For ease of understanding, the embodiments of this application may be described in detail below. Figure 1 In the service network 110a shown, one service node is selected as the target service node from among multiple service nodes. This target service node has the function of sending a data synchronization request to the proxy node 100b. For example, in the embodiments of this application, it can... Figure 1 Node 110a shown is the target service node. For ease of understanding, embodiments of this application may... Figure 1 In the core consensus network 100c shown, one consensus node is selected as the target consensus node from among multiple consensus nodes. This target consensus node has the function of returning the synchronization data corresponding to the data synchronization request to the proxy node 100b. For example, in the embodiments of this application, it can be... Figure 1 Node 120a shown serves as the target consensus node. Proxy node 100b can forward data synchronization requests sent by the target service node to the target consensus node, and proxy node 100b can forward synchronization data returned by the target consensus node to the target service node.
[0074] Since the core consensus network resides in a relatively secure private cloud, its mutual access is inherently secure thanks to a consensus mechanism, eliminating the need for additional identity management and network control. However, the target business node is located in a public network and may be accessed by other unidentified network terminals. Therefore, the access of the target business node and other potential nodes to the core consensus network needs to be strictly controlled. Consequently, the proxy node and the target consensus node must verify the target business node sending data synchronization requests.
[0075] Understandably, when a proxy node receives a data synchronization request from a target business node, it can perform permission verification on that target business node to obtain the verification result. This permission verification may include verifying whether the target business node's node identifier belongs to the list of illegal nodes. The list of illegal nodes may refer to a blacklist stored by the proxy node. Illegal nodes corresponding to the illegal node identifiers in this list include detected malicious nodes, nodes reported by others, and nodes that send transactions at abnormal frequencies within a certain time period.
[0076] In this context, it's understandable that the proxy node can search the list of illegal nodes for an illegal node identifier that matches the target service node's identifier to obtain the authorization verification result. If the authorization verification result indicates that an illegal node identifier matching the target node's identifier is found in the list of illegal nodes, the proxy node can determine that the authorization verification result is illegal. In this case, the proxy node can determine that the target service node is an illegal node, and therefore does not need to forward the data synchronization request to the target consensus node in the core consensus network. Optionally, if the authorization verification result indicates that no illegal node identifier matching the target service node's identifier is found in the list of illegal nodes, the proxy node can determine that the authorization verification result is legitimate. In this case, the proxy node can determine that the target service node is a legitimate node, and then forward the data synchronization request to the target consensus node in the core consensus network.
[0077] The target business node can be used to provide object login services, token issuance services, and object information operation services. These services can be server programs deployed on a server specifically to provide remote network services to application clients (i.e., third-party applications). For ease of understanding, this embodiment refers to users who log in through third-party applications as target objects. Specifically, application clients can include browsers, in-vehicle clients, smart home clients, entertainment clients, multimedia clients (e.g., video clients), social clients, and news clients—clients with data processing capabilities. In-vehicle clients can be application clients on in-vehicle terminals.
[0078] It should be understood that the above-mentioned layered structure applies to application authorization scenarios, where synchronized data can include object management information and user management contracts (i.e., object management contracts). The object management information is distributed and stored in the blockchain maintained by the core consensus network. Target business nodes can provide services to application clients after synchronizing and verifying the object management information.
[0079] Object management information can represent attribute information associated with a user (i.e., an object). Specifically, object management information can include object credential information and object resource information. Object credential information represents basic information used for login (e.g., username and password), and object resource information represents basic information associated with the user indicated by the object credential information. Object management contracts can be used to process this object management information. These contracts are blockchain smart contracts, which manage user information, user registration, account freezing, and permission design. Object management contracts can be executed through blockchain transactions.
[0080] Specifically, the target business node can authorize third-party applications to log in based on object management contracts and object credentials, allowing authorized third-party applications to manipulate object resource information. Furthermore, the target business node can provide any other functions available to SPV nodes, such as verifying transactions, forwarding them to the blockchain, querying status, and querying blocks.
[0081] For ease of understanding, please refer to Table 1, which is a node identifier list provided in an embodiment of this application. This node identifier list can store the node identifiers and node names of nodes visible to certain transaction data. As shown in Table 1:
[0082] Table 1
[0083] Node Name Node identifier Node 1 AAAAAA Node 2 BBBBBB … … Node J CCCCCC
[0084] The node identifier can be an IP (Internet Protocol) address or any other information that can be used to identify the node. For example, node 1 (e.g., node 1 can be...) Figure 1 Node 110a) shown can be directed to node 2 (e.g., node 2 can be a node identifier BBBBBB) via node identifier BBBBBB. Figure 1 Node 120a) sends information (e.g., a data synchronization request), and Node 2 can identify that the information was sent by Node 1 through the node identifier AAAAAA; Node 2 can return information (e.g., synchronized data) to Node 1 through the node identifier AAAAAA, and Node 1 can identify that the information was returned by Node 2 through the node identifier BBBBBB. Proxy node 100b can forward the data synchronization request sent by Node 1 to Node 2, and proxy node 100b can forward the synchronized data returned by Node 2 to Node 1. Here, Node 1 can be the target business node, and Node 2 can be the target consensus node.
[0085] In this system, the target consensus node in the core consensus network can obtain encrypted data information sent by proxy node 100b. The encrypted data information can be obtained by proxy node 100b encrypting the data synchronization request and signature information using the system public key of the core consensus network. The signature information can be obtained by the target business node in the business network signing the data synchronization request using its private key. Further, the target consensus node can obtain the system private key of the core consensus network (i.e., the system private key corresponding to the system public key of the core consensus network) and decrypt the encrypted data information using the system private key to obtain the data synchronization request and signature information. Further, the target consensus node can obtain the node public key of the target business node (i.e., the node public key corresponding to the node private key of the target business node) and verify the signature information based on the node public key to obtain the verification result. Further, the target consensus node can accept the data synchronization request when the verification result indicates successful verification. Optionally, the target consensus node can refuse to accept the data synchronization request when the verification result indicates failed verification.
[0086] In this process, the target business node can use a hash algorithm to perform a hash calculation on the data synchronization request, thereby obtaining a digest information h of the data synchronization request. Based on its private key, the target business node then digitally signs this digest information h to obtain the signature information corresponding to the data synchronization request. The target consensus node can verify the digital signature in the signature information based on the public key of the target business node, obtaining the digest information h of the data synchronization request. It then performs a hash calculation on the received data synchronization request using the hash algorithm used by the target business node, thereby obtaining a digest information H of the data synchronization request. Finally, it compares the digest information h obtained from the verification with the digest information H obtained from the hash calculation to obtain the verification result. If the digest information h and the digest information H are the same, the verification result indicates that the target consensus node has successfully verified the signature; if the digest information h and the digest information H are different, the verification result indicates that the target consensus node has failed to verify the signature.
[0087] Optionally, and understandably, when forwarding encrypted data, proxy node 100b can also encrypt the encrypted data using its private key to obtain encrypted data, which the target consensus node can then decrypt using its public key. Optionally, before sending the data synchronization request and signature information to proxy node 100b, the target business node can encrypt the data synchronization request and signature information using its public key to obtain encrypted request information, which it then sends to proxy node 100b. Upon receiving the encrypted request information, proxy node 100b can decrypt it using its private key to obtain the data synchronization request and signature information.
[0088] Similarly, the specific process of the target business node receiving the synchronization data forwarded by the proxy node 100b can be found in the description of the target consensus node receiving the data synchronization request forwarded by the proxy node 100b above, and will not be repeated here.
[0089] For better understanding, please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram illustrating a data interaction scenario provided in an embodiment of this application. For example... Figure 2 The business node 20a shown can be the above Figure 1 Any node in the service network 100a of the corresponding embodiment, such as Figure 2 The proxy node 20b shown can be the one described above. Figure 1 The proxy node 100b in the corresponding embodiment, such as Figure 2 The consensus node 20c shown can be the one described above. Figure 1 Any node in the core consensus network 100c of the corresponding embodiment. For ease of understanding, the embodiments of this application are based on the above. Figure 1 The node 110a shown serves as the service node 20a, as described above. Figure 1 The node 120a shown is used as an example of consensus node 20c to illustrate... Figure 2 The specific process of data interaction between the business node 20a, the proxy node 20b, and the consensus node 20c is shown.
[0090] like Figure 2 As shown, business node 20a can send a data synchronization request to proxy node 20b. Proxy node 20b can forward the data synchronization request to consensus node 20c. After obtaining the synchronization data corresponding to the data synchronization request, consensus node 20c can return the synchronization data to proxy node 20b, and proxy node 20b can forward the synchronization data to business node 20a.
[0091] like Figure 2 The object 21b shown can be the target object, and the corresponding terminal device can be terminal device 21a, which can have an application client installed. Therefore, when object 21b needs to log in to the application client on terminal device 21a, object 21b can send an authorization request to business node 20a through the application client on terminal device 21a. In this way, business node 20a can receive the authorization request sent by object 21b through the application client, call the object login service based on the authorization request, and return the object authorization code to terminal device 21a through the object login service.
[0092] Specifically, business node 20a can obtain the login information to be verified entered by object 21b in the object login service, obtain object credential information from the synchronized data, and match the login information to be verified with the object credential information through the object login service. If the login information to be verified matches the object credential information, it obtains the object authorization code for object 20a and then returns the object authorization code to terminal device 21a. Optionally, if the login information to be verified does not match the object credential information, business node 20a does not need to return the object authorization code to terminal device 21a.
[0093] like Figure 2 As shown, object 21b can send a token acquisition request to business node 20a through the application client in terminal device 21a. The token acquisition request can carry an object authorization code. In this way, business node 20a can receive the token acquisition request sent by object 21b through the application client, call the token issuance service based on the token acquisition request, and return the object token to terminal device 21a through the token issuance service.
[0094] Specifically, business node 20a can verify the object authorization code through the token sending service. If the object authorization code verification is successful, it obtains the object token for object 21b and then returns the object token to terminal device 21a. Optionally, if the object authorization code verification fails, business node 20a does not need to return the object token to terminal device 21a.
[0095] It should be understood that object 21b can send a resource operation request to business node 20a based on an object token. This request requests access to authorized resource data via business node 20a. The authorized resource data can be object resource information within the synchronized data, specifically object resource information belonging to object 21b within the object resource information. In this way, business node 20a can grant application clients operation permissions for authorized resource data based on the object token. Therefore, the authorized resource data can be object resource information belonging to object 21b within the object resource information and for which the application has operation permissions.
[0096] Optionally, business node 20a can also be used to provide object registration services. Object 21b can send an object registration request to business node 20a through an application client. Business node 20a can then receive this request, invoke the object registration service based on the request, obtain the object registration information entered by object 21b, and then package the object registration information through consensus node 20c. After consensus node 20c successfully uploads the object registration information to the blockchain, business node 20a can obtain the latest object credential information from the blockchain maintained by consensus node 20c. This latest object credential information may include object 21b's object registration information, which may include an object registration identifier and an object registration password.
[0097] Therefore, this embodiment of the application can use business nodes in the blockchain network as authorization servers. These authorization servers can respond to authorization requests sent by application clients through an object login service and to token acquisition requests sent by application clients through a token sending service, thereby enabling application client login operations. It is understood that there can be multiple business nodes, each capable of responding to authorization requests and token acquisition requests sent by application clients, thus improving the efficiency and stability of target object login to application clients.
[0098] Further, please see Figure 3 , Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The method can be executed by a business node in a blockchain network. This business node can be a server connected to the business network or a terminal device connected to the business network; the specific form of the business node is not limited here. This business node is used to provide object login services and token issuance services, and the business node can be one of the aforementioned... Figure 1 Any node in the business network 100a shown, for example, node 110a. The data processing method may include the following steps:
[0099] Step S101: Receive the authorization request sent by the target object through the application client, call the object login service based on the authorization request, and obtain the login information to be verified entered by the target object in the object login service;
[0100] Specifically, a business node can receive an authorization request sent by the target object through the application client, and based on the authorization request, invoke the object login frontend to obtain the login information to be verified entered by the target object in the object login frontend. The business node can then display the object login frontend in the application client, allowing the target object to enter the login information to be verified there. The object login service includes an object login frontend (i.e., a user login frontend) and an object login backend. The object login frontend represents the frontend page of the object login service, and the object login backend represents the backend logic of the object login service.
[0101] It should be understood that the login information to be verified can be the login information of the target object in an application client other than the third-party application (e.g., the target application client). Thus, the object login frontend can represent the frontend page of the target application client, and the object login backend can be the backend logic of the target application client. Therefore, business nodes can redirect the third-party application to the object login frontend, allowing the target object to interact with the object login frontend, thereby realizing the login operation of the third-party application through the login information in the target application client. Specifically, the target object can directly input the login information to be verified in the object login frontend, or it can authorize the retrieval of the login information to be verified in the object login frontend. The authorized login information to be verified can be the login information to be verified entered by the target object in the previous moment.
[0102] It should be understood that business nodes can obtain object management information from the consensus nodes of the blockchain network. This object management information may include object credential information and object resource information. Business nodes can also obtain object management contracts from the consensus nodes. These contracts may include, but are not limited to, login verification contracts, authorization code verification contracts, and token verification contracts. Specifically, the object credential information and login verification contracts can be used to execute step S102; the authorization code verification contract can be used to execute step S103; the token verification contract can be used to execute step S205; and the object resource information can be used to execute step S206.
[0103] It is understood that the business node can build an object information database (i.e., user login credentials DB) and store object management information in the object information database. In this way, the object information database can be used to query object credential information in step S102 and to query object resource information in step S206.
[0104] In this context, it can be understood that the object management contract can be a blockchain smart contract stored on the business nodes. This blockchain smart contract can be published in the consensus network and synchronized to the business nodes for execution. The object management contract encapsulates functions such as verifying user status and accepting user login verification. The object management contract can rely on object management information in the object information database to function; that is, it can perform login verification based on object credential information and perform CRUD operations (Create, Update, Retrieve, and Delete) on user information based on object resource information.
[0105] Step S102: Match the login information to be verified with the object credential information through the object login service. If the login information to be verified matches the object credential information, obtain the object authorization code for the target object and return the object authorization code to the application client.
[0106] Specifically, business nodes can invoke the login verification contract through the object login backend to match the login information to be verified with the object credential information. The login verification contract is obtained by the business node from the consensus node. Further, if the login information to be verified matches the object credential information, the business node can obtain the object authorization code for the target object and return the object authorization code to the application client. Optionally, if the login information to be verified does not match the object credential information, the business node can reject the authorization request without returning the object authorization code to the application client.
[0107] The login information to be verified includes the object identifier and the object password. It should be understood that the specific process by which the business node matches the login information to be verified with the object credential information through the login judgment contract can be described as follows: The business node can obtain the object credential information from the object information database through the login judgment contract. The object credential information is synchronized by the business node from the on-chain data of the consensus node, and may include object identifier credential information. Further, the business node can search for the object identifier to be verified in the object identifier credential information. If the object identifier to be verified is not found in the object identifier credential information, it is determined that the login information to be verified does not match the object credential information. Optionally, if the object identifier to be verified exists in the object identifier credential information, the business node can determine the matching result between the login information to be verified and the object credential information based on the object password.
[0108] The object information database does not store plaintext passwords, but rather salts and the hash result of the key after salting. Thus, the object credential information also includes object password credential information (i.e., the hash result of the key after salting) and string credential information (i.e., the salt). One object identifier credential corresponds to one object password credential and one string credential. It should be understood that the specific process by which the business node determines the matching result between the login information to be verified and the object credential information based on the password of the object to be verified can be described as follows: The business node can concatenate the password of the object to be verified and the string credential information corresponding to the object identifier in the object credential information to obtain the concatenated login information to be verified (i.e., the first concatenated login information to be verified). Further, the business node can perform a hash calculation on the concatenated login information to be verified to obtain the hashed login information to be verified (i.e., the first hashed login information to be verified). Further, the business node can compare the hashed login information to be verified with the object password credential information corresponding to the object identifier in the object credential information. If the hashed login information to be verified is the same as the object password credential information corresponding to the object identifier in the object credential information, a matching result is generated to indicate that the login information to be verified matches the object credential information. Optionally, if the hash login information to be verified is different from the object password credential information corresponding to the object identifier in the object credential information, the business node can generate a matching result to indicate that the login information to be verified does not match the object credential information.
[0109] Here, the salt is a randomly generated string, generated by a secure random function, and different object identification credentials correspond to different salts. It should be understood that this application does not limit the hash algorithm used for hash calculation; for example, the hash algorithm can be the MD5 Message-Digest Algorithm.
[0110] Optionally, the business node can perform a hash calculation on the password of the object to be verified to obtain the hash object password to be verified. Further, the business node can concatenate the hash object password to be verified with the string credential information corresponding to the object identifier in the object credential information to obtain the concatenated login information to be verified (i.e., the second concatenated login information to be verified). Further, the business node can perform a hash calculation on the concatenated login information to be verified to obtain the hash login information to be verified (i.e., the second hash login information to be verified). Optionally, the business node can perform a hash calculation on the password of the object to be verified to obtain the hash login information to be verified (i.e., the third hash login information to be verified).
[0111] Optionally, the object information database can also store plaintext passwords. In this case, the object credential information also includes object password credential information (i.e., plaintext passwords), with one object identifier credential information corresponding to one object password credential information. It should be understood that the specific process by which the business node determines the matching result between the login information to be verified and the object credential information based on the password of the object to be verified can be described as follows: The business node can compare the password of the object to be verified with the object password credential information corresponding to the object identifier in the object credential information. If the password of the object to be verified is the same as the object password credential information corresponding to the object identifier in the object credential information, a matching result is generated to indicate that the login information to be verified matches the object credential information. Optionally, if the password of the object to be verified is different from the object password credential information corresponding to the object identifier in the object credential information, a matching result is generated to indicate that the login information to be verified does not match the object credential information.
[0112] It should be understood that the object management information in the object information database can include object status, which can represent either a frozen or unfrozen state. When a business node receives an authorization request from an application client, it can query the target object's object status in the object information database through the object login service. If the target object's object status is frozen, the authorization request is rejected. Optionally, if the target object's object status is unfrozen, the business node can return the object authorization code to the application client after obtaining the object authorization code for the target object.
[0113] Step S103: Receive a token acquisition request sent by the application client based on the object authorization code, call the token issuance service based on the token acquisition request, obtain the object token for the target object through the token issuance service, and return the object token to the application client.
[0114] Specifically, a business node can receive a token acquisition request sent by an application client based on an object authorization code, and then invoke the token issuance service based on the request. Further, the business node can invoke the authorization code verification contract through the token issuance service to verify the object authorization code. This authorization code verification contract is obtained by the business node from the consensus node. Further, if the object authorization code verification passes, the business node can obtain key authorization information associated with the target object, generate an object token for the target object based on this information, and return the object token to the application client. Optionally, if the object authorization code verification fails, the business node can reject the token acquisition request without returning an object token to the application client.
[0115] Understandably, an object authorization code can be used to represent key authorization information associated with a target object. That is, a business node can obtain the key authorization information selected by the target object in the object login service and generate an object authorization code for the target object based on this information. This key authorization information includes at least one of time-limited information, operation permissions, and authorization scope; the time-limited information represents the lifecycle of the object token. Therefore, a business node can parse the object authorization code to obtain the key authorization information associated with the target object.
[0116] Optionally, the object authorization code may not need to represent the key authorization information associated with the target object. Instead, the key authorization information associated with the target object can be obtained through the object authorization code. That is, the business node can obtain the key authorization information selected by the target object in the object login service. The key authorization information includes at least one of time-limited information, operation permissions, and authorization scope; the time-limited information is used to represent the lifecycle of the object token. Therefore, the business node can obtain the key authorization information associated with the target object from the object login service through the token issuance service.
[0117] It is understandable that object tokens can provide application clients with operation permissions for resource data within an authorized scope. That is, object tokens can have operation permissions and authorized scope. In addition, object tokens can also contain time-limited information. The resource data can also be referred to as object resource information.
[0118] The timeliness information, operation permissions, and authorization scope can be selected by the target object in the object login front end of the object login service; alternatively, the timeliness information, operation permissions, and authorization scope can also be set by default in the business node. The target object can select any one or more of the timeliness information, operation permissions, and authorization scope in the object login front end, or it can choose not to select timeliness information, operation permissions, and authorization scope.
[0119] Among them, operation permission refers to the permission of the application client to operate resource data through business nodes. The operation permission of the target object on the resource data can be read permission, write permission, read-write permission, delete permission, modify permission, read-delete permission, etc. For example, read permission means that the target object can perform read operation on the resource data; the scope of authorization can represent the resource data that the target object has operation permission for. This application embodiment does not limit the data types included in the scope of authorization; the timeliness information is used to characterize the life cycle of the object token. For example, the life cycle of the object token can be 1 day.
[0120] It is understood that, in this application, data related to the data types included in the scope of authorization are required to obtain user permission or consent when the above embodiments of this application are applied to specific products or technologies, and the collection, use and processing of related data must comply with the relevant laws and regulations and national standards of the country in which they are located.
[0121] It is understandable that when a third-party application receives an object token returned by a business node, it indicates that the application has invoked the business node to complete on-chain object login and obtain the object identity indicated by the object credential information. After obtaining the object identity indicated by the object credential information, the third-party application can perform its own business operations in subsequent steps. These business operations represent the inherent functions of the third-party application, such as implementing instant messaging functionality based on the object identity indicated by the object credential information. Furthermore, the object token signifies that the resource owner authorizes the third-party application to access its resource data stored on the authorization server, without requiring the application to provide its username and password.
[0122] For easier understanding, please refer to Figure 4 , Figure 4 This is a schematic diagram illustrating a resource application process provided in an embodiment of this application. For example... Figure 4 The flowchart shown is a linear process. Steps S41-S46 can be executed linearly. Step S41 corresponds to step S101, step S42 corresponds to step S102, and steps S43-S44 correspond to step S103.
[0123] like Figure 4 As shown, the third-party application (i.e., the client) can execute step S41, requesting the resource owner (i.e., the resource holder, ResourceOwner) to obtain the resource (i.e., the target object sends an authorization request, AuthorizationRequest, through the application client (i.e., the third-party application)). Here, the resource owner can represent the object indicated by the object credential information; in this case, the resource owner can represent the target object indicated by the login information to be verified. Further, the resource owner can match the login information to be verified with the object credential information. If the login information to be verified matches the object credential information, then step S42 is executed, authorizing the third-party application with a license (i.e., an authorization code, AuthorizationGrant). This authorization code can also be called an object authorization code, which is used to identify the target object.
[0124] like Figure 4As shown, the third-party application can execute step S43, which grants the permission (i.e., object authorization code) to the authorization server (i.e., the authentication server, AuthorizationServer) for authentication (i.e., the target object sends a token acquisition request through the application client). Here, the authorization server can be a business node in this embodiment. Further, if authentication is successful, the authorization server can execute step S44, which returns a token (i.e., Access Token) to the third-party application. This token can also be called an object token.
[0125] For easier understanding, please refer to Figure 5 , Figure 5 This is a schematic diagram illustrating a scenario of a resource application provided in an embodiment of this application. For example... Figure 5 The application authorization code shown corresponds to the above. Figure 4 Step S41 in the corresponding embodiment, as follows Figure 5 The returned authorization code shown corresponds to the above. Figure 4 Step S42 in the corresponding embodiment, as follows Figure 5 The application token shown corresponds to the above. Figure 4 Step S43 in the corresponding embodiment, as follows Figure 5 The return token shown corresponds to the above. Figure 4 Step S44 in the corresponding embodiment.
[0126] like Figure 5 As shown, consensus nodes in a blockchain network can store permission verification contracts, which can be smart contracts deployed on the consensus nodes. Business nodes in the blockchain network can obtain local permission verification contracts (i.e., object management contracts) and object management information from the consensus nodes through the core network entry point (i.e., proxy nodes), and then store the object management information in the object login credential database (i.e., object information database). The local permission verification contract can include, but is not limited to, the aforementioned login judgment contract, authorization code verification contract, and token verification contract. The object management information can include object credential information and object resource information.
[0127] like Figure 5 As shown, a third-party application can request an authorization code from a business node (i.e., send an authorization request). The business node can then respond to the authorization request through the object login service, call the login judgment contract through the object login service, and return an authorization code (i.e., return the object authorization code) to the third-party application based on the login judgment contract and the object management information in the object login credential database.
[0128] like Figure 5As shown, a third-party application can request a token from a business node (i.e., send a token acquisition request). The business node can then respond to the token acquisition request through the token issuance service, call the authorization code to verify the contract through the token issuance service, verify the contract and object management information in the object login credential database through the authorization code, and return a token to the third-party application (i.e., return an object token).
[0129] The blockchain network may include multiple consensus nodes, and this embodiment does not limit the number of consensus nodes. Similarly, the blockchain network may include multiple business nodes, and this embodiment does not limit the number of business nodes. Since multiple business nodes and consensus nodes are deployed, the same business node can send data synchronization requests to different consensus nodes, and different application clients can send login requests (i.e., authorization requests and token acquisition requests) to different business nodes.
[0130] For example, when there are two third-party applications, specifically third-party application X1 and third-party application X2, and multiple business nodes, specifically business node J1 and business node J2, can be configured to send login requests to business node J1 and to business node J2, respectively. Alternatively, third-party application X1 can send login requests to business node J2, and third-party application X2 can send login requests to business node J1.
[0131] Understandably, when a business node receives an authorization request and a token acquisition request from an application client, it can generate local information unrelated to the blockchain and then store this local information in the object information database. This local information can represent information generated by the business node when acting as an authorization server; for example, it could be the application client's login time (i.e., the time when the business node obtains the login information to be verified entered by the target object in the object login service).
[0132] Therefore, business nodes in a blockchain network can act as authorization servers in an identity management system. These servers can obtain distributed object credential information from the consensus nodes of the blockchain network and respond to authorization requests and token acquisition requests (collectively referred to as login requests) sent by application clients based on this information. Due to the decentralized and self-verifying nature of blockchain networks, multiple business nodes can be deployed. Multiple application clients can send login requests to different business nodes. Therefore, when multiple application clients send login requests simultaneously, multiple business nodes can respond to multiple login requests concurrently, thereby improving the efficiency of target object login to application clients. Furthermore, since there is more than one business node, if one business node fails, other business nodes can still perform login management without affecting the business logic of the login operation, thus improving the stability of target object login to application clients. At the same time, business nodes can provide application clients with operation permissions for resource data within the authorized scope based on object tokens. These operation permissions allow application clients to operate on resource data through business nodes. Therefore, business nodes can use object tokens to ensure that while application clients obtain operation permissions, they can also control the object tokens at any time to ensure that the application clients' operations on resource data do not compromise the security of resource data in the identity management system.
[0133] Further, please see Figure 6 , Figure 6 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The method can be executed by a business node in a blockchain network. This business node can be a server connected to the business network or a terminal device connected to the business network; the specific form of the business node is not limited here. The business node is used to provide object login services, token issuance services, and object information operation services. The business node can be one of the aforementioned... Figure 1 Any node in the business network 100a shown, for example, node 110a. The data processing method may include the following steps:
[0134] Step S201: Receive the authorization request sent by the target object through the application client, call the object login service based on the authorization request, and obtain the login information to be verified entered by the target object in the object login service;
[0135] The specific process by which the business node obtains the login information to be verified entered by the target object in the object login service can be found in the above. Figure 3 The description of step S101 in the corresponding embodiments will not be repeated here.
[0136] The application client can encrypt the authorization request using the public key of the business node to obtain an encrypted authorization request, which it then sends to the business node. The business node can then receive the encrypted authorization request from the application client, decrypt it using its private key, and obtain the authorization request.
[0137] Step S202: Match the login information to be verified with the object credential information through the object login service. If the login information to be verified matches the object credential information, obtain the object authorization code for the target object and return the object authorization code to the application client.
[0138] The specific process by which a business node obtains the object authorization code for the target object can be found in the above. Figure 3 The description of step S102 in the corresponding embodiments will not be repeated here.
[0139] Specifically, a business node can encrypt the object authorization code using its private key to obtain an encrypted object authorization code, which it then returns to the application client. The application client can then receive the encrypted object authorization code from the business node, decrypt it using the business node's public key, and obtain the object authorization code.
[0140] Step S203: Receive a token acquisition request sent by the application client based on the object authorization code, call the token issuance service based on the token acquisition request, obtain the object token for the target object through the token issuance service, and return the object token to the application client;
[0141] The specific process by which a business node obtains an object token for a target object can be found above. Figure 3 The description of step S103 in the corresponding embodiments will not be repeated here.
[0142] The specific process of a business node receiving a token acquisition request can be found in the description of receiving an authorization request above, and will not be repeated here; the specific process of a business node returning an object token can be found in the description of returning an object authorization code above, and will not be repeated here.
[0143] It should be understood that different application clients can send authorization requests and token acquisition requests to different service nodes. Specifically, the application client can determine the target service node for sending authorization and token acquisition requests from multiple service nodes based on its distance from the service nodes. For example, the application client can choose the service node closest to the application client as the target service node. Optionally, the application client can also determine the target service node for sending authorization and token acquisition requests from multiple service nodes based on a node scheduling algorithm. For example, when the application client needs to send authorization and token acquisition requests, it can send a node scheduling request to a scheduling server used for node scheduling. This allows the scheduling service to schedule the application client to the target service node based on factors such as the real-time network quality of multiple service nodes, thereby improving the accuracy of service node scheduling.
[0144] Therefore, a business node can store object management information associated with all objects; alternatively, a business node may not need to store object management information associated with all objects. Similarly, a business node can store both object credential information and object resource information associated with the target object; alternatively, a business node may also store either object credential information or object resource information associated with the target object. Likewise, a business node can store all object resource information associated with the target object; alternatively, a business node may also store some object resource information associated with the target object.
[0145] Step S204: Receive a resource operation request sent by the application client based on the object token, and call the object information operation service based on the resource operation request;
[0146] It is understood that the method of sending resource operation requests based on object tokens used in this application employs the OAuth 2.0 authorization mechanism. This mechanism can be used to authorize third-party applications (i.e., application clients) to operate on resource data. The resource owner (i.e., the target object) informs the business node that it agrees to authorize the third-party application to enter the system and obtain the resource data corresponding to the target object. The business node then generates an object token that allows the third-party application to enter the business node, and uses this object token instead of a password for the third-party application to use.
[0147] Among them, object tokens and passwords serve the same purpose: both can be used to enter the system. However, there are three differences: (1) Object tokens are short-term. After the lifecycle of an object token expires, it will automatically become invalid, and the target object cannot modify the expiration information of the object token. Passwords are generally valid for a long time. If the target object does not modify the password, then the password will not change. (2) Object tokens can be revoked by the resource owner at any time. If an object token is revoked by the resource owner, it will become invalid immediately. Passwords are generally not allowed to be revoked by others. (3) Object tokens have operation permissions. For network services, read-only tokens (i.e., object tokens with read permissions) are more secure than read-write tokens (i.e., object tokens with read and write permissions). For example, read permissions allow third-party applications to read resource data but not write resource data. Passwords are generally full permissions (i.e., passwords). (4) Object tokens have an authorization scope. Object tokens have operation permissions for the data types included in the authorization scope. Passwords have operation permissions for all data types.
[0148] It should be understood that third-party applications can log in to the business system indicated by the business node using object tokens (i.e., resource operation requests sent to the business node based on the object token). The business system generally does not re-verify the identity of the third-party application, so the third-party application must keep the object token confidential; leaking the object token has the same consequences as leaking a password. Therefore, to ensure the security of resource data in the business system, the business node can set the expiration time of the object token to a short period, such as one hour.
[0149] It is understandable that resource operation requests also carry the object identifier of the target object. The object identifier of the target object enables the target object to operate on its own corresponding resource data, but not on the resource data of other objects.
[0150] Step S205: Call the token verification contract through the object information operation service to verify the resource operation request and the object token through the token verification contract;
[0151] Specifically, business nodes can obtain key authorization information associated with the object token through the token verification contract to determine whether the resource operation request meets the key authorization information. Further, if the resource operation request meets the key authorization information, the business node can determine that the resource operation request and object token verification are successful. Optionally, if the resource operation request does not meet the key authorization information, the business node can determine that the resource operation request and object token verification are unsuccessful.
[0152] Understandably, the token verification contract can determine whether a resource operation request meets the timeliness information, operation permissions, and authorization scope. If the resource operation request meets all these requirements, the business node can determine that the resource operation request meets the key authorization information. Optionally, if a resource operation request does not meet the timeliness information, operation permissions, or authorization scope, the business node can determine that the resource operation request does not meet the key authorization information. For example, if the resource operation request is a resource read operation request and the operation permission is write permission, the business node can determine that the resource operation request does not meet the operation permission requirement; or, if the request time corresponding to the resource operation request exceeds the lifecycle of the object token, the business node can determine that the resource operation request does not meet the timeliness information requirement; or, if the data type of the operation requested by the resource operation request is different from the data type included in the authorization scope, the business node can determine that the resource operation request does not meet the authorization scope requirement.
[0153] It should be understood that when a business node receives a resource operation request sent by an application client, it can query the object status of the target object in the object information database through the object information operation service. If the object status of the target object is frozen, the resource operation request will be rejected. Optionally, if the object status of the target object is not frozen, the business node can execute step S206 or step S207 based on the verification result of the resource operation request and the object token.
[0154] Specifically, when the resource operation request and object token verification pass or fail, the business node can execute different steps. If the resource operation request and object token verification pass, the business node can execute step S206; optionally, if the resource operation request and object token verification fail, the business node can execute step S207.
[0155] Step S206: If the resource operation request and object token verification pass, the resource operation request is responded to through the object information operation service.
[0156] It should be understood that if the resource operation request is a resource read operation request, the business node can retrieve the target read data requested in the resource read operation request from the object information database through the object information operation service. This target read data is resource data. Furthermore, the business node can return the target read data to the application client.
[0157] In this context, it can be understood that if the target data requested by the resource read operation exists in the object information database, the business node can retrieve the target data from the object information database through the object information operation service. Optionally, if the target data does not exist in the object information database, a data synchronization request for the target data is sent to the consensus node through the object information operation service. Based on the data synchronization request for the target data, synchronization data is retrieved from the consensus node's on-chain data, stored in the object information database, and the target data is retrieved from the object information database through the object information operation service. The synchronized data includes the target data.
[0158] Optionally, it should be understood that if the resource operation request is a resource write operation request, the business node can obtain the target write data requested by the resource write operation request through the object information operation service. The target write data is resource data. Further, if the target write data does not exist in the object information database, the business node can write the target write data to the object information database. Optionally, if the target write data exists in the object database, the business node does not need to respond to the resource access operation request.
[0159] In this context, it's understandable that if the target write data doesn't exist in the object information database, the business node can forward the target write data to the consensus node. The consensus node then packages the target write data, generates the target block (i.e., the first target block), and adds it to the blockchain. Furthermore, the business node can send a data synchronization request for the target write data to the consensus node, receive the target write data returned by the consensus node based on the data synchronization request, and write the target write data to the object information database. The target write data is obtained by the consensus node from the target block.
[0160] Optionally, it should be understood that if the resource operation request is a resource update operation request, the business node can obtain the initial update data requested by the resource update operation request through the object information operation service. Further, if the initial update data exists in the object information database, the business node can update the initial update data using the target update data in the resource update operation request. Optionally, if the initial update data does not exist in the object information database, the business node can write the target update data in the resource update operation request to the object information database. Optionally, if the initial update data does not exist in the object information database, the business node does not need to respond to the resource update operation request. Both the initial update data and the target update data are resource data.
[0161] In this context, it's understandable that if initial update data exists in the object information database, the business node can forward the target update data from the resource update operation request to the consensus node. This allows the consensus node to package the target update data, generate a target block (i.e., the second target block), and then upload the target block to the blockchain. Furthermore, the business node can send a data synchronization request for the target update data to the consensus node, receive the target update data returned by the consensus node based on the data synchronization request, and update the initial update data in the object information database using the target update data. The target update data is obtained by the consensus node from the target block.
[0162] The specific process by which the business node writes the target update data in the resource update operation request to the object information database can be found in the description of writing the target write data in the resource write operation request to the object information database above, and will not be repeated here.
[0163] Optionally, it should be understood that if the resource operation request is a resource deletion operation request, the business node can obtain the target data to be deleted in the resource deletion operation request through the object information operation service. The target data to be deleted is resource data. Furthermore, if the target data to be deleted exists in the object information database, the business node can delete the target data from the object information database. Optionally, if the target data to be deleted does not exist in the object information database, the business node does not need to respond to the resource deletion operation request.
[0164] It can be understood that if the target data to be deleted exists in the object information database, the business node can delete the target data to be deleted through the deletion function in the contract. If the deletion function in the contract is executed successfully (that is, it means that the consensus node recognizes the contract task of deleting the target data to be deleted), the business node will receive the deletion instruction returned by the consensus node and delete the target data to be deleted from the object information database based on the deletion instruction.
[0165] The specific process of a business node receiving a resource operation request can be found in the description of receiving an authorization request above, and will not be repeated here. The resource operation request may include writing data to the target, deleting data from the target, or updating data to the target. The specific process of a business node returning data to the target can be found in the description of returning the object authorization code above, and will not be repeated here.
[0166] It should be understood that the target read data obtained from the on-chain data of the consensus node, the target write data obtained from the first target block, and the target update data obtained from the second target block can all be referred to as the synchronization data obtained by the business node from the consensus node.
[0167] It can be understood that the target read data can be obtained by the business node from the third target block stored by the consensus node. The number of first, second, and third target blocks can be one or more. That is, the business node can obtain target write data from one or more first target blocks, target update data from one or more second target blocks, and target read data from one or more third target blocks. In other words, target write data, target update data, and target read data can all be packaged into one or more target blocks respectively.
[0168] For ease of understanding, this embodiment of the application illustrates the example where the target write data, target update data, and target read data are all packaged into a single target block. Here, we will use the example of the target write data being packaged into target block Q. The block information of target block Q may include a block header (i.e., block header information) and a block body (i.e., block body information). The block header may include information such as the parent block hash (i.e., parent block hash), block height, version number, timestamp, difficulty value, random number, and Merkle root (i.e., block hash, block hash value) of target block Q. The block body may include the transaction data packaged into target block Q and the Merkle path formed by the transaction hash values of the transaction data.
[0169] For ease of understanding, we will use an example where four transaction data items are packaged into the target block Q. These four transaction data items can be transaction data 1, transaction data 2, transaction data 3, and transaction data 4. Each of these four transaction data items can be hashed to obtain its corresponding transaction hash value. For example, the transaction hash value of transaction data 1 can be transaction hash value 1 (e.g., Hash1), the transaction hash value of transaction data 2 can be transaction hash value 2 (e.g., Hash2), the transaction hash value of transaction data 3 can be transaction hash value 3 (e.g., Hash3), and the transaction hash value of transaction data 4 can be transaction hash value 4 (e.g., Hash4). For example, the target data to be written can be transaction data 3 and transaction data 4 from the target block Q.
[0170] Understandably, consensus nodes can obtain the Merkel proof information corresponding to the target data being written. This Merkel proof information can be composed of transaction hash values in the Merkel path. For example, Hash12 (a hash value generated based on Hash1 and Hash2, representing the hash value obtained after hashing the concatenation of Hash1 and Hash2) and Hash1234 (a hash value generated based on Hash12 and Hash34, where Hash34 is a hash value generated based on Hash3 and Hash4) can be used as path hash values to construct the Merkel proof information. Furthermore, consensus nodes can use the aforementioned target data being written, the Merkel proof information, and the block header of the target block Q as synchronization data returned to the business nodes.
[0171] It should be understood that after receiving the synchronization data, the business node can verify the synchronization data based on the target write data, Merkel proof information, and the block header of the target block Q. Specifically, the business node can determine the comparison tree root corresponding to the target block Q based on the transaction hash value corresponding to the target write data and the path hash value in the Merkel proof information. Further, the business node can obtain the verification result of the target block Q based on the comparison tree root and the Merkel tree root in the block header of the target block Q. If the comparison tree root is the same as the Merkel tree root, the verification result indicates successful verification. Further, if the verification result indicates successful verification, the business node can synchronize the block header of the target block Q to the block header chain of the business node and write the target write data to the object information database.
[0172] In step S207, if the resource operation request and object token verification fail, the resource operation request is rejected through the object information operation service.
[0173] Please see again. Figure 4 ,like Figure 4 As shown, the third-party application can execute step S45, using a token (i.e., an object token) to obtain the resource data (i.e., protected resource) corresponding to the token from the resource server (i.e., the target object sending a resource operation request through the application client). Here, the resource server can be a business node in this embodiment. Further, the resource server can execute step S46, returning the protected resource (e.g., target read information) to the third-party application. Here, the resource data is the resource owner's own resource; the resource owner cannot obtain resource data from other objects.
[0174] It should be understood that, in the embodiments of this application, a business node can act as both an authorization server and a resource server. When receiving authorization requests and token acquisition requests, the business node can act as an authorization server; when receiving resource operation requests, the business node can act as a resource server. It should also be understood that the authorization server and resource server corresponding to a third-party application can be the same, meaning the third-party application can send authorization requests, token acquisition requests, and resource operation requests to the same business node. Optionally, the authorization server and resource server corresponding to a third-party application can be the same, meaning the third-party application can send authorization requests, token acquisition requests, and resource operation requests to different business nodes.
[0175] Please see again. Figure 5 ,like Figure 5 The application resources shown correspond to the above. Figure 4 Step S45 in the corresponding embodiment, as follows Figure 5 The returned resources shown correspond to the above. Figure 4 The corresponding step S46 in the embodiment. For example... Figure 5 As shown, a third-party application can request resources from a business node (i.e., send a resource operation request). The business node can then respond to the resource operation request through the user information reading service (i.e., the object information operation service), call the token verification contract through the user information reading service, and return the resource (e.g., return the target reading information) to the third-party application through the token verification contract and the object management information in the object login credential database.
[0176] Specifically, when the resource operation request is a resource read operation request, the business node needs to return the resource to the third-party application. When the resource operation request is a resource write operation request, a resource update operation request, or a resource delete operation request, the business node does not need to return the resource to the third-party application.
[0177] For easier understanding, please refer to Figure 7 , Figure 7 This is a system architecture diagram for a blockchain electronic invoice scenario provided in an embodiment of this application. For example... Figure 7 As shown, the business layer, routing proxy layer, and core consensus network layer in this embodiment constitute the entire complete blockchain business system. The routing proxy layer serves to isolate the business layer from the core consensus network layer. For ease of understanding, the transaction business in this embodiment can be exemplified by electronic bill transfer, and is not limited thereto.
[0178] It is understandable that when blockchain is used in tax systems or other scenarios, in order to improve data confidentiality and security, and when personal privacy or team security-related data is involved in the blockchain system, the layered blockchain structure of "business network - core consensus network" in this application embodiment can be adopted. The blockchain network can record transaction information generated throughout the entire circulation process of electronic invoices. The circulation process of electronic invoices can include the application for electronic invoices, the issuance of electronic invoices, the reimbursement of electronic invoices, and the tax filing of electronic invoices.
[0179] The business layer resides within the witness network and can submit business operation interactions to the core consensus network layer. Business nodes within this layer (e.g., the first business node) can include terminal devices corresponding to the e-tax bureau, terminal devices corresponding to enterprises, and terminal devices corresponding to consumer users (i.e., consumers). The e-tax bureau can refer to the local tax bureau within the tax bureau's dedicated network; enterprises can be invoicing service providers, reimbursement service providers, or retail enterprises (e.g., KA enterprises, i.e., large retail clients and key retail clients) in the public cloud; and consumer users can be payment service providers, circulation service providers, or retail enterprises in the private cloud.
[0180] For example, the invoice transfer service performed by the first business node (e.g., terminal device A corresponding to the consumer) could be: transferring the electronic invoice (e.g., electronic invoice X) obtained by the consumer when purchasing equipment to terminal device B corresponding to the company where the consumer works. Of course, this business layer can also include a second business node. For example, two invoicing clerks from two companies (e.g., employee 1 and employee 2) generate transaction data by issuing invoices on their respective terminal devices. For example, employee 1 can use terminal device A1 to perform the transaction service to generate the corresponding transaction data, and employee 2 can use terminal device A2 to perform the transaction service to generate the corresponding transaction data.
[0181] In the routing proxy layer, proxy nodes can be used to isolate the business layer and the core consensus network layer. Proxy nodes can provide peer-to-peer (P2P) services, routing services, certificate caching, and authentication services. Peer-to-peer services refer to services in a P2P network based on a specific network protocol. In a P2P network, network nodes do not require a central node to maintain the network state; instead, each node maintains the overall network state or the connection state of its neighbors through broadcast interactions. Routing services are a basic function of nodes and can be used for communication between nodes. Certificates in the certificate cache can refer to Public Key Infrastructure (PKI). In a PKI, a certificate is proof of identity for the owner of a public key, issued by an authoritative authority (Certificate Authority, CA). PKI enables asymmetric encryption and digital signatures. The PKI can include public-private key cryptography, x.509 certificates, CA certificate issuing centers, etc. Authentication services can be used to verify the transaction format of received information, the legitimacy of nodes, etc.
[0182] It is understood that, in this embodiment, the proxy node can forward data synchronization requests sent by business nodes (i.e., target business nodes) in the business layer to consensus nodes (i.e., target consensus nodes) in the core consensus network layer, and can also forward synchronization data returned by consensus nodes in the core consensus network layer to business nodes in the business layer. During the forwarding process, the proxy node can encrypt the forwarded data.
[0183] It is understood that the core consensus network layer may include multiple core chains, and each core chain may include one or more consensus nodes. For ease of understanding, the embodiments of this application use the core consensus network layer as an example. Figure 7 The following example illustrates a core chain. The consensus nodes (i.e., ledger nodes) in the core consensus network layer can be trusted nodes (i.e., TrustSQL nodes) in the tax intranet. These consensus nodes can include permission contracts, caches, and data blocks. The permission contracts store the entire lifecycle logic of electronic invoices, such as the invoice status, flow process, data access permissions, application conditions, and issuance conditions. The cache and data blocks support the on-chain recording and querying of transaction information.
[0184] Understandably, each consensus node has the ability to package and produce blocks, meaning it can verify the transaction data forwarded by the proxy nodes and add it to the consensus node's transaction pool upon successful verification (i.e., ...). Figure 7(as shown in the cache). Furthermore, the consensus node can package transaction data from its own transaction pool into blocks to successfully write it into the blockchain of the core consensus network layer. Additionally, when a consensus node receives a data synchronization request forwarded by a proxy node, it can determine on the blockchain the synchronization data to be returned to the business nodes.
[0185] Therefore, this application proposes a blockchain-based distributed identity management system. This system extends the functionality of business nodes in the blockchain network. Based on object credential information and object resource information obtained from the blockchain, business nodes act as authorization servers and resource servers for distributed object management, representing the blockchain. This enables distributed object login services, token issuance services, and object information operation services, eliminating the untrust issues associated with centralized identity management and improving the efficiency and stability of target object login to application clients, as well as the efficiency and stability of target objects operating resource data through application clients. When a business node acts as an authorization server, it can receive authorization requests and token acquisition requests from application clients and return object authorization codes and object tokens for the target object to the application client. When a business node acts as a resource server, it can receive resource operation requests from application clients and respond to those requests. It is understood that this application can achieve on-chain management of object credential information and object resource information. By synchronizing and verifying on-chain data through business nodes, the real-time performance, accuracy, and immutability of the synchronized object credential information and object resource information are ensured, thereby guaranteeing the security of object management information.
[0186] Further, please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application. The data processing apparatus 1 can be a computer program (including program code) running on a computer device; for example, the data processing apparatus 1 is an application software. The data processing apparatus 1 can be used to execute corresponding steps in the method provided in the embodiments of this application. Figure 8 As shown, the data processing device 1 can be applied to a business node in a blockchain network. This business node is used to provide object login services and token issuance services. This business node can provide the aforementioned... Figure 2 The corresponding business node 20a in the embodiment. The data processing device 1 may include: a first receiving module 11, an authorization code return module 12, and a second receiving module 13; further, the data processing device 1 may also include: a third receiving module 14, a first response module 15, and a second response module 16;
[0187] The first receiving module 11 is used to receive the authorization request sent by the target object through the application client, call the object login service based on the authorization request, and obtain the login information to be verified entered by the target object in the object login service;
[0188] The authorization code return module 12 is used to match the login information to be verified with the object credential information through the object login service. If the login information to be verified matches the object credential information, the object authorization code for the target object is obtained and returned to the application client. The object credential information is obtained by the business node from the consensus node of the blockchain network.
[0189] The object login service includes an object login front-end and an object login back-end;
[0190] The first receiving module 11 is specifically used to receive the authorization request sent by the target object through the application client, call the object login front end based on the authorization request, and obtain the login information to be verified entered by the target object in the object login front end;
[0191] The authorization code return module 12 is specifically used to call the login judgment contract through the object login backend, and to match the login information to be verified with the object credential information through the login judgment contract; the login judgment contract is obtained by the business node from the consensus node.
[0192] The login information to be verified includes the identifier of the object to be verified and the password of the object to be verified.
[0193] The authorization code return module 12 is specifically used to obtain object credential information from the object information database by logging in to determine the contract; the object credential information is obtained by the business node from the on-chain data of the consensus node; the object credential information includes object identification credential information;
[0194] The authorization code return module 12 is specifically used to search for the object identifier to be verified in the object identifier credential information. If the object identifier to be verified does not exist in the object identifier credential information, it is determined that the login information to be verified does not match the object credential information.
[0195] The authorization code return module 12 is specifically used to determine the matching result between the login information to be verified and the object credential information based on the password of the object to be verified if the object identification credential information contains an object identifier to be verified.
[0196] The object credential information includes object password credential information and string credential information; one object identifier credential information corresponds to one object password credential information and one string credential information.
[0197] The authorization code return module 12 is specifically used to concatenate the password of the object to be verified and the string credential information corresponding to the identifier of the object to be verified in the object credential information to obtain the concatenated login information to be verified.
[0198] The authorization code return module 12 is specifically used to perform hash calculation on the login information to be verified to obtain the login information to be verified by hash.
[0199] The authorization code return module 12 is specifically used to compare the hash login information to be verified with the object password credential information corresponding to the object identifier in the object credential information. If the hash login information to be verified is the same as the object password credential information corresponding to the object identifier in the object credential information, a matching result is generated to indicate that the login information to be verified matches the object credential information.
[0200] The authorization code return module 12 is specifically used to generate a matching result to indicate that the login information to be verified does not match the object password credential information corresponding to the object identifier in the object credential information if the hash login information to be verified is different from the object password credential information corresponding to the object identifier in the object credential information.
[0201] The second receiving module 13 is used to receive a token acquisition request sent by the application client based on the object authorization code, call the token issuance service based on the token acquisition request, obtain the object token for the target object through the token issuance service, and return the object token to the application client; the object token provides the application client with operation permissions for resource data within the authorized scope; operation permissions refer to the application client's permission to operate resource data through business nodes.
[0202] The second receiving module 13 includes: an authorization code verification unit 131 and a token return unit 132;
[0203] The authorization code verification unit 131 is used to call the authorization code verification contract through the token issuance service, and to verify the object's authorization code through the authorization code verification contract; the authorization code verification contract is obtained by the business node from the consensus node;
[0204] The token return unit 132 is used to obtain key authorization information associated with the target object if the object authorization code verification is successful, generate an object token for the target object based on the key authorization information, and return the object token to the application client.
[0205] The authorization code return module 12 is specifically used to obtain the key authorization information selected by the target object in the object login service, and generate an object authorization code for the target object based on the key authorization information; the key authorization information includes at least one of time-limited information, operation permissions, and authorization scope; the time-limited information is used to characterize the lifecycle of the object token;
[0206] The token return unit 132 is specifically used to parse the object authorization code to obtain the key authorization information associated with the target object.
[0207] Specifically, the second receiving module 13 is further used to obtain the key authorization information selected by the target object in the object login service; the key authorization information includes at least one of time-limited information, operation permissions, and authorization scope; the time-limited information is used to characterize the lifecycle of the object token;
[0208] The token return unit 132 is specifically used to obtain key authorization information associated with the target object from the object login service through the token issuance service.
[0209] The specific implementation methods of the authorization code verification unit 131 and the token return unit 132 can be found in the above description. Figure 3 The description of step S103 in the corresponding embodiments will not be repeated here.
[0210] Optionally, business nodes can also be used to provide object information operation services;
[0211] The third receiving module 14 is used to receive resource operation requests sent by the application client based on the object token, and to call the object information operation service based on the resource operation requests;
[0212] The first response module 15 is used to call the token verification contract through the object information operation service, and verify the resource operation request and the object token through the token verification contract. If the resource operation request and the object token are verified, the resource operation request is responded to through the object information operation service.
[0213] The first response module 15 is specifically used to obtain key authorization information associated with the object token through the token verification contract and determine whether the resource operation request meets the key authorization information.
[0214] The first response module 15 is specifically used to determine that the resource operation request and object token verification are successful if the resource operation request meets the key authorization information.
[0215] The first response module 15 is specifically used to determine that the resource operation request and object token verification fail if the resource operation request does not meet the key authorization information.
[0216] Specifically, the first response module 15 is used to obtain the target read data requested by the resource read operation request from the object information database through the object information operation service if the resource operation request is a resource read operation request; the target read data belongs to resource data.
[0217] The first response module 15 is specifically used to return the target read data to the application client.
[0218] Specifically, the first response module 15 is used to obtain the target read data from the object information database through the object information operation service if the target read data requested by the resource read operation request exists in the object information database.
[0219] The first response module 15 is specifically used to send a data synchronization request for the target read data to the consensus node through the object information operation service if the target read data does not exist in the object information database. Based on the data synchronization request for the target read data, it retrieves the synchronization data from the on-chain data of the consensus node, stores the synchronization data in the object information database, and retrieves the target read data from the object information database through the object information operation service. The synchronization data includes the target read data.
[0220] Specifically, the first response module 15 is used to obtain the target write data requested by the resource write operation request through the object information operation service if the resource operation request is a resource write operation request; the target write data belongs to resource data.
[0221] The first response module 15 is specifically used to write the target write data to the object information database if the target write data does not exist in the object information database.
[0222] The first response module 15 is specifically used to forward the target write data to the consensus node if the target write data does not exist in the object information database, so that the consensus node can package the target write data, generate the target block, and perform on-chain processing on the target block.
[0223] The first response module 15 is specifically used to send a data synchronization request for target write data to the consensus node, receive the target write data returned by the consensus node based on the data synchronization request for target write data, and write the target write data to the object information database.
[0224] The second response module 16 is used to reject the resource operation request through the object information operation service if the resource operation request and object token verification fail.
[0225] The specific implementation methods of the first receiving module 11, the authorization code return module 12, and the second receiving module 13 can be found in the above description. Figure 3 The descriptions of steps S101-S103 in the corresponding embodiments will not be repeated here. The specific implementations of the third receiving module 14, the first response module 15, and the second response module 16 can be found above. Figure 6 The descriptions of steps S204-S207 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.
[0226] Further, please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 9 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. In some embodiments, the user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. Optionally, the network interface 1004 may include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the processor 1001. Figure 9 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.
[0227] In such Figure 9 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0228] Receive the authorization request sent by the target object through the application client, call the object login service based on the authorization request, and obtain the login information to be verified entered by the target object in the object login service;
[0229] The login service matches the login information to be verified with the object credential information. If the login information to be verified matches the object credential information, the object authorization code for the target object is obtained and returned to the application client. The object credential information is obtained by the business node from the consensus node of the blockchain network.
[0230] The system receives a token acquisition request sent by the application client based on an object authorization code, calls the token issuance service based on the token acquisition request, obtains the object token for the target object through the token issuance service, and returns the object token to the application client. The object token provides the application client with operation permissions for resource data within the authorized scope. Operation permissions refer to the application client's permission to operate resource data through business nodes.
[0231] It should be understood that the computer device 1000 described in the embodiments of this application can perform the foregoing... Figure 3 and Figure 6 The description of the data processing method in the corresponding embodiments can also be performed as described above. Figure 8 The description of the data processing device 1 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0232] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores a computer program executed by the aforementioned data processing device 1. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figure 3 and Figure 6 The description of the data processing method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application.
[0233] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, causing the computer device to perform the aforementioned actions. Figure 3 and Figure 6 The description of the data processing method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program products or computer program embodiments related to this application, please refer to the description of the method embodiments of this application.
[0234] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0235] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method, characterized by, The method is executed by business nodes in a blockchain network, which includes multiple business nodes. When multiple application clients simultaneously send authorization requests, the multiple business nodes simultaneously respond to the authorization requests sent by the multiple application clients. The business nodes are used to provide object login services and token issuance services, including: The business node receives an authorization request sent by the target object through the application client, and calls the object login service based on the authorization request to obtain the login information to be verified entered by the target object in the object login service; The object login service includes an object login backend that calls a login judgment contract. The login judgment contract retrieves object credential information from the object information database. The login judgment contract is obtained by the business node from the consensus node. The object credential information is obtained by the business node from the on-chain data of the consensus node. The login judgment contract matches the login information to be verified with the object credential information. If the login information to be verified matches the object credential information, the object authorization code for the target object is obtained and the object authorization code is returned to the application client. The system receives a token acquisition request sent by the application client based on the object authorization code, calls the token issuance service based on the token acquisition request, obtains an object token for the target object through the token issuance service, and returns the object token to the application client. The object token provides the application client with operation permissions for resource data within the authorized scope. The operation permissions refer to the application client's permission to operate the resource data through the business node.
2. The method of claim 1, wherein, The object login service also includes an object login front-end; The business node receives an authorization request sent by the target object through the application client, and based on the authorization request, calls the object login service to obtain the login information to be verified entered by the target object in the object login service, including: The business node receives an authorization request sent by the target object through the application client, and calls the object login front-end based on the authorization request to obtain the login information to be verified entered by the target object in the object login front-end.
3. The method of claim 2, wherein, The login information to be verified includes the identifier of the object to be verified and the password of the object to be verified; the object credential information includes object identifier credential information. The step of matching the login information to be verified with the object credential information through the login judgment contract includes: The object identifier to be verified is searched in the object identifier credential information. If the object identifier to be verified is not found in the object identifier credential information, it is determined that the login information to be verified does not match the object credential information. If the object identifier to be verified exists in the object identifier credential information, then the matching result between the login information to be verified and the object credential information is determined based on the password of the object to be verified.
4. The method of claim 3, wherein, The object credential information also includes object password credential information and string credential information; one object identifier credential information corresponds to one object password credential information and one string credential information. The step of determining the matching result between the login information to be verified and the object credential information based on the password of the object to be verified includes: The password of the object to be verified and the string credential information corresponding to the identifier of the object to be verified in the object credential information are concatenated to obtain the concatenated login information to be verified. The concatenated login information to be verified is hashed to obtain the login information to be verified hash. The hash login information to be verified is compared with the object password credential information corresponding to the object identifier in the object credential information. If the hash login information to be verified is the same as the object password credential information corresponding to the object identifier in the object credential information, a matching result is generated to indicate that the login information to be verified matches the object credential information. If the hash login information to be verified is different from the object password credential information corresponding to the object identifier in the object credential information, a matching result is generated to indicate that the login information to be verified does not match the object credential information.
5. The method of claim 1, wherein, The step of obtaining an object token for the target object through the token issuance service and returning the object token to the application client includes: The authorization code verification contract is invoked through the token issuance service, and the authorization code of the object is verified through the authorization code verification contract; the authorization code verification contract is obtained by the business node from the consensus node. If the object authorization code is verified, key authorization information associated with the target object is obtained, an object token for the target object is generated based on the key authorization information, and the object token is returned to the application client.
6. The method of claim 5, wherein, The step of obtaining the object authorization code for the target object includes: Obtain the key authorization information selected by the target object in the object login service, and generate an object authorization code for the target object based on the key authorization information; the key authorization information includes at least one of time-limited information, the operation permissions, and the authorization scope; the time-limited information is used to characterize the lifecycle of the object token; The acquisition of key authorization information associated with the target object includes: The object's authorization code is parsed to obtain key authorization information associated with the target object.
7. The method of claim 5, wherein, The method further includes: Obtain the key authorization information selected by the target object in the object login service; the key authorization information includes at least one of time-limited information, the operation permissions, and the authorization scope; the time-limited information is used to characterize the lifecycle of the object token; The acquisition of key authorization information associated with the target object includes: The key authorization information associated with the target object is obtained from the object login service through the token issuance service.
8. The method according to claim 1, characterized in that, The business node is also used to provide object information operation services; The method further includes: Receive the resource operation request sent by the application client based on the object token, and invoke the object information operation service based on the resource operation request; The token verification contract is invoked through the object information operation service. The resource operation request and the object token are verified through the token verification contract. If the resource operation request and the object token are verified, the resource operation request is responded to through the object information operation service. If the resource operation request and the object token verification fail, the resource operation request is rejected through the object information operation service.
9. The method according to claim 8, characterized in that, The verification of the resource operation request and the object token through the token verification contract includes: The key authorization information associated with the object token is obtained through the token verification contract, and it is determined whether the resource operation request satisfies the key authorization information. If the resource operation request meets the key authorization information, then the resource operation request and the object token verification are deemed successful. If the resource operation request does not meet the key authorization information, then it is determined that the resource operation request and the object token verification fail.
10. The method according to claim 8, characterized in that, The step of responding to the resource operation request through the object information operation service includes: If the resource operation request is a resource read operation request, then the target read data requested by the resource read operation request is obtained from the object information database through the object information operation service; the target read data belongs to the resource data. The target read data is returned to the application client.
11. The method according to claim 10, characterized in that, The step of obtaining the target read data requested by the resource read operation request from the object information database through the object information operation service includes: If the target read data requested by the resource read operation request exists in the object information database, then the target read data is obtained from the object information database through the object information operation service; If the target read data does not exist in the object information database, a data synchronization request for the target read data is sent to the consensus node through the object information operation service. Based on the data synchronization request for the target read data, synchronization data is obtained from the on-chain data of the consensus node, and the synchronization data is stored in the object information database. The target read data is then obtained from the object information database through the object information operation service. The synchronization data includes the target read data.
12. The method according to claim 8, characterized in that, The step of responding to the resource operation request through the object information operation service includes: If the resource operation request is a resource write operation request, then the target write data requested by the resource write operation request is obtained through the object information operation service; the target write data belongs to the resource data. If the target write data does not exist in the object information database, then the target write data will be written to the object information database.
13. The method according to claim 12, characterized in that, If the target write data does not exist in the object information database, then writing the target write data to the object information database includes: If the target write data does not exist in the object information database, the target write data is forwarded to the consensus node so that the consensus node can package the target write data, generate a target block, and perform on-chain processing on the target block; Send a data synchronization request for the target write data to the consensus node, receive the target write data returned by the consensus node based on the data synchronization request for the target write data, and write the target write data to the object information database.
14. A data processing apparatus, characterized in that, The device is applied to business nodes in a blockchain network, which includes multiple business nodes. When multiple application clients simultaneously send authorization requests, the multiple business nodes simultaneously respond to the authorization requests sent by the multiple application clients. The business nodes are used to provide object login services and token issuance services, including: The first receiving module is used to receive the authorization request sent by the target object through the application client, call the object login service based on the authorization request, and obtain the login information to be verified entered by the target object in the object login service; The authorization code return module is used to call the login judgment contract through the object login backend included in the object login service, and obtain object credential information from the object information database through the login judgment contract. The login judgment contract is obtained by the business node from the consensus node, and the object credential information is synchronized by the business node from the on-chain data of the consensus node. The login judgment contract matches the login information to be verified with the object credential information. If the login information to be verified matches the object credential information, the module obtains the object authorization code for the target object and returns the object authorization code to the application client. The second receiving module is used to receive a token acquisition request sent by the application client based on the object authorization code, call the token issuance service based on the token acquisition request, obtain an object token for the target object through the token issuance service, and return the object token to the application client; the object token provides the application client with operation permissions for resource data within the authorized scope; the operation permissions refer to the application client's permission to operate the resource data through the business node.
15. A computer device, characterized in that, include: Processor and memory; The processor is connected to the memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to cause the computer device to perform the method according to any one of claims 1-13.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-13.
17. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-13.
Citation Information
Patent Citations
Method and system for enhanced login credential security via blockchain
CN110445612A
Resource information acquisition method and device, computer equipment and storage medium
CN113553572A
