Method, device and electronic device for setting user operation permissions in blockchain

By obtaining user biometrics and behavioral information, determining credit values in combination with analysis models, and setting operational permissions of blockchain users, the misjudgment of user management and credit performance in the existing technology is solved, the security and reasonable management of user operations are achieved, and the healthy development of the blockchain ecosystem is promoted.

CN114090985BActive Publication Date: 2025-06-06BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010755028.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-30
Publication Date
2025-06-06
Estimated Expiration
2040-07-30

AI Technical Summary

Technical Problem

The existing blockchain user management methods have problems such as misjudgment, misjudgment and credit performance inconsistent with labels, which makes it difficult to effectively supervise user violations and affect the development of the blockchain ecosystem.

Method used

By obtaining user biometric information and behavioral information, using a pre-trained behavioral analysis model, combining the initial credit value and analysis results, the final credit value is determined, and operational permissions are set based on the credit value, including permissions and difficulty.

Benefits of technology

It improves the accuracy and rationality of credit values, reasonably restricts or encourages user operations, ensures the security of user activities on the blockchain, and promotes ecological development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090985B_ABST
    Figure CN114090985B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for setting user operation permissions in a blockchain. First, user attribute information and user behavior information of a target user are obtained from the blockchain; the initial credit value of the target user is determined based on the user attribute information; the user behavior information is analyzed by a pre-trained behavior analysis model to obtain an analysis result; the final credit value of the target user is determined based on the initial credit value and the analysis result, and the operation permissions are set for the target user based on the final credit value. This method combines user attribute information when determining the final credit value, thereby improving the accuracy and rationality of the credit value. At the same time, this method can set different operation permissions for users according to different credit values, so as to limit the on-chain operations of users with lower credit values ​​and encourage on-chain operations of users with higher credit values, thereby ensuring the security of user activities on the blockchain and being conducive to the development of the blockchain ecology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a method, device and electronic device for setting user operation permissions in a blockchain. Background Art

[0002] Blockchain has the characteristics of decentralization, openness, and information immutability, and can be widely used in various business scenarios. Therefore, more and more users are participating in blockchain activities, which has promoted the development of the blockchain ecosystem. However, due to improper supervision, users in the blockchain will also have certain violations, such as illegal transactions, illegal money laundering activities, and destruction of shared items. These violations will lead to serious consequences, so reasonable supervision of user behavior is needed.

[0003] In the relevant technology, there are two main ways to manage users on the blockchain. The first is to use a blacklist and whitelist system for manual management. Users on the whitelist conduct normal transactions on the blockchain, and users on the blacklist are restricted in their transaction behaviors. The second is to monitor the behavior of users on the blockchain, analyze the behavior information and set corresponding labels, and set different operation permissions for the user's behavior on the blockchain according to the labels. However, in the actual business process, the personal information provided by users who violate the rules is usually insufficient and difficult to trace. Therefore, the manual management method is prone to misjudgment and missed judgment, resulting in low judgment efficiency and accuracy. Labeling user behavior is likely to cause the user's actual credit performance to be inconsistent with the label, lacking a certain degree of rationality, and may also affect the enthusiasm of users on the blockchain to carry out activities, which is not conducive to the development of the blockchain ecosystem. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device and electronic device for setting user operation permissions in a blockchain, so as to reasonably manage the operation permissions of users on the blockchain and promote the development of the blockchain ecology.

[0005] In a first aspect, an embodiment of the present invention provides a method for setting user operation permissions in a blockchain, the method comprising: obtaining user attribute information and user behavior information of a target user from a blockchain; wherein the user attribute information comprises biometric information; determining an initial credit value of the target user based on the user attribute information; performing a behavior analysis on the target user based on the user behavior information through a pre-trained behavior analysis model to obtain an analysis result; determining a final credit value of the target user based on the initial credit value and the analysis result, and setting operation permissions for the target user based on the final credit value; wherein the operation permission is used to indicate: whether the target user has the permission to perform a specified operation of the blockchain, or the difficulty of the target user to complete the specified operation.

[0006] In an optional embodiment, the above-mentioned biometric information includes: one or more of the target user's facial image, fingerprint information, voiceprint information and iris information; the user attribute information also includes user registration information; the above-mentioned step of determining the initial credit value of the target user based on the user attribute information includes: multiplying a preset first weight by the degree of completeness of the user registration information to obtain a first credit value; multiplying a preset second weight by the number of types of biometric information to obtain a second credit value; wherein the first weight is less than the second weight; and determining the sum of the first credit value and the second credit value as the initial credit value.

[0007] In an optional embodiment, the above-mentioned behavior analysis model includes a dimension reduction module, a clustering module and an identification module; the above-mentioned behavior analysis model completed through pre-training performs behavior analysis on the target user based on the user behavior information, and the step of obtaining the analysis result includes: performing dimension reduction processing on the user behavior information through the dimension reduction module to obtain a state vector; determining the target sample cluster to which the user behavior information belongs based on the state vector through the clustering module; the target sample cluster is a sample cluster with the same state vector corresponding to the user behavior information among the preset multiple sample clusters; each sample cluster among the multiple sample clusters includes multiple samples, and the state vector corresponding to each sample is the same; determining the analysis result of the user behavior information through the identification module based on the preset probability value of the target sample cluster; wherein the preset probability value is the probability value that the sample in the target sample cluster is a malicious behavior; the analysis result includes the malicious behavior level corresponding to the user behavior information.

[0008] In an optional embodiment, the dimensionality reduction module includes a plurality of layers of neural networks connected in sequence; the plurality of layers of neural networks are trained in the following manner: the first layer of the network in the plurality of layers of neural networks is trained according to a preset sample set to obtain the trained first layer of the network; the sample set includes a plurality of samples, each of which includes a plurality of user features; for each layer of the plurality of layers of the neural network except the first layer of the network: the training samples in the sample set are input into the previous layer of the current network, and the output results are input into the current network to train the current network; each layer of the trained network is determined as the trained plurality of layers of neural networks.

[0009] In an optional embodiment, the above-mentioned multiple sample clusters are determined in the following manner: determining a target sample from a preset sample set; the sample set includes multiple samples, each sample includes multiple user features; inputting the target sample into a dimensionality reduction module to obtain a state vector of the target sample; continuing to execute the step of determining the target sample from the preset sample set until the state vector of each sample in the sample set is obtained; and dividing the samples with the same state vector in the sample set into the same sample cluster to obtain multiple sample clusters.

[0010] In an optional embodiment, the preset probability value of each sample cluster in the above-mentioned multiple sample clusters is determined in the following manner: determining the centroid of the sample cluster based on the state vectors of the multiple sample clusters; for each sample cluster, calculating the cosine similarity between the state vector of the current sample cluster and the centroid of the sample cluster; and determining the preset probability value of the current sample cluster based on the cosine similarity.

[0011] In an optional embodiment, the step of determining the preset probability value of the current sample cluster based on cosine similarity includes: judging whether the cosine similarity is greater than a preset similarity threshold; if so, setting the preset probability value of the current sample cluster to a first probability value; if less than or equal to, setting the preset probability value of the current sample cluster to a second probability value.

[0012] In an optional implementation, the step of setting operation permissions for the target user according to the final credit value includes: if the final credit value is greater than or equal to a first preset credit threshold, marking the target user as a high-quality user; wherein the high-quality user has the permission to perform specified operations of the blockchain, and the difficulty of completing the specified operation is set to a first degree; if the final credit value is less than a second preset credit threshold, restricting the target user from performing the specified operation of the blockchain, or setting the difficulty of the target user to complete the specified operation to a second degree; wherein the first preset credit threshold is greater than the second preset credit threshold; and the difficulty of the first degree is less than the second degree.

[0013] In an optional embodiment, after the above steps of determining the final credit value of the target user and setting operation permissions for the target user according to the final credit value, the method further includes: uploading the final credit value and operation permissions to the blockchain.

[0014] In an optional implementation, the above-mentioned step of uploading the final credit value and operating authority to the blockchain includes: sending the final credit value and operating authority to a target node of the blockchain, so that the target node shares the final credit value and operating authority with other nodes on the blockchain except the target node, and the other nodes generate proposal results for the final credit value and operating authority, and endorse the proposal results. After the endorsement is completed, the blockchain performs a consensus sorting service to update the credit value and operating authority of the target user on the blockchain.

[0015] In an optional implementation, after the above step of determining the final credit value of the target user based on the initial credit value and the analysis results, the method further includes: determining whether a credit behavior deposit of the target user is stored in the blockchain; the credit behavior deposit includes: assets paid by the target user to the blockchain for credit guarantee; if so, increasing the final credit value to a preset credit value, and determining the preset credit value as the final credit value of the target user after the increase.

[0016] In a second aspect, an embodiment of the present invention provides a device for setting user operation permissions in a blockchain, the device comprising: an information acquisition module, used to obtain user attribute information and user behavior information of a target user from the blockchain; wherein the user attribute information includes biometric information; an initial credit value determination module, used to determine the initial credit value of the target user based on the user attribute information; a behavior analysis module, used to perform a behavior analysis on the target user based on the user behavior information through a pre-trained behavior analysis model to obtain an analysis result; a permission setting module, used to determine the final credit value of the target user based on the initial credit value and the analysis result, and set operation permissions for the target user based on the final credit value; wherein the operation permission is used to indicate: whether the target user has the permission to perform a specified operation of the blockchain, or the difficulty of the target user to complete the specified operation.

[0017] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for setting user operation permissions in the above-mentioned blockchain.

[0018] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method for setting user operation permissions in the above-mentioned blockchain.

[0019] The embodiments of the present invention bring the following beneficial effects:

[0020] The present invention provides a method, device and electronic device for setting user operation permissions in a blockchain. First, user attribute information and user behavior information of a target user are obtained from the blockchain; the user attribute information includes biometric information; then the initial credit value of the target user is determined based on the user attribute information; then, the user behavior information is analyzed by a pre-trained behavior analysis model to obtain an analysis result; then, the final credit value of the target user is determined based on the initial credit value and the analysis result, and the operation permissions are set for the target user based on the final credit value. This method combines user attribute information when determining the final credit value, thereby improving the accuracy and rationality of the credit value. At the same time, this method can set different operation permissions for users according to different credit values, so as to limit the on-chain operations of users with lower credit values ​​and encourage on-chain operations of users with higher credit values, thereby ensuring the security of user activities on the blockchain and being conducive to the development of the blockchain ecology.

[0021] Other features and advantages of the present invention will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present invention.

[0022] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 A flowchart of a method for setting user operation permissions in a blockchain provided by an embodiment of the present invention;

[0025] Figure 2 A flowchart of another method for setting user operation permissions in a blockchain provided by an embodiment of the present invention;

[0026] Figure 3 A flowchart of another method for setting user operation permissions in a blockchain provided by an embodiment of the present invention;

[0027] Figure 4 A schematic diagram of the structure of a device for setting user operation permissions in a blockchain provided by an embodiment of the present invention;

[0028] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0030] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] With the update of information technology, blockchain, as an emerging storage technology, has gradually become a hot topic of development. Blockchain is a data network system that uses cryptography to ensure the security of data transmission and access, and generates a tamper-proof and non-forgeable distributed ledger. It can safely store digital currency transactions or other data. The characteristics are that the information stored on the blockchain cannot be forged or tampered with. The blockchain consensus algorithm drives each node on the blockchain to participate in the transaction verification process to ensure that transactions on the blockchain are confirmed and reliable. Each node on the blockchain maintains a public ledger to store the balances and smart contract data of all users on the blockchain network. Any modification of the ledger maintained by any node on the blockchain will be recognized by other nodes, thereby ensuring that the public ledger cannot be forged or tampered with.

[0032] The above blockchains can be divided into public chains, alliance chains and private chains. Alliance chains refer to blockchains jointly managed by multiple organizations. Each member runs one or more nodes. Alliance chains only allow nodes in members to read and send transactions and jointly record transaction data. When activities are carried out on alliance chains and private chains based on blockchain, there is usually no supervision of user activities, which makes it easy for users to violate regulations. These violations will lead to serious consequences, so reasonable supervision of user behavior is required.

[0033] In the related technology, there are two main ways to manage users on the blockchain. The first is to use a blacklist and whitelist system for manual management. Users in the whitelist conduct normal transactions on the blockchain, and the transaction behavior of users in the blacklist is restricted; the second is to monitor the behavior of users on the blockchain, analyze the behavior information and set corresponding labels, and set different operation permissions for the user's behavior on the blockchain according to the labels, in which the accounts of users corresponding to the bad labels and violation labels are stored in the blacklist. However, in the actual business process, the personal information provided by users who violate the rules is usually insufficient and difficult to trace. That is, the current user management method of the blockchain does not take into account the impact of the user's personal information on the user's credit. Therefore, the manual management method is prone to misjudgment and missed judgment, resulting in low judgment efficiency and accuracy; while labeling user behavior, the processing process is either black or white, and the processing is too simple, which is easy to cause the user's actual credit performance to be inconsistent with the label, lacking a certain degree of rationality, and is not friendly to new users who do not understand the blockchain. It may also affect the enthusiasm of users on the blockchain to carry out activities, which is not conducive to the development of the blockchain ecosystem.

[0034] Based on the above problems, the embodiments of the present invention provide a method, device and electronic device for setting user operation permissions in a blockchain. The technology can be applied to the user behavior management scenario in a blockchain, especially the user behavior management scenario of a private chain and a public chain. To facilitate understanding of this embodiment, a method for setting user operation permissions in a blockchain disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:

[0035] Step S102, obtaining user attribute information and user behavior information of the target user from the blockchain; wherein the user attribute information includes biometric information.

[0036] Users on the blockchain usually need to register an account with the blockchain network and submit user registration information and biometric information when registering an account or after registration. The user registration information includes information such as name, age, occupation or business license; the biometric information can be one or more of the user's facial image, fingerprint information, voiceprint information and iris information.

[0037] The user registration information such as the business license of the user on the blockchain is usually stored in the user's disk file, database, server, or a device similar to a U-shield. When the user needs to use or upload it to the blockchain, it can be read from the device. However, the user registration information can only verify the authenticity of the information itself, and cannot verify the authenticity of the user itself during the operation of the blockchain. The user's biometric information is the only feature that distinguishes the user from other users, and can be used to verify the authenticity of the user itself. In other words, it is difficult for other users to steal the user's unique biometric information through various means except the user himself, thereby improving the system's authentication of the user's authenticity. When necessary, the corresponding user can also be quickly traced back through the user's unique biometric information, making malicious operations on the blockchain extremely costly. It can be seen that the reliability and credibility of biometric information are higher than that of user registration information, and it has a higher utilization value.

[0038] The user behavior information may be behavior data generated when the user conducts activities on the blockchain. The activities may be transactions or other operations conducted on the blockchain, such as data upload operations, transaction deletion operations, etc. The activities include but are not limited to: commercial transactions, public welfare sharing of goods, cultural information exchanges, etc. In some embodiments, the user behavior information includes not only the user's behavior data, but also other users' reporting data on the user.

[0039] Step S104: determining the initial credit value of the target user based on the above user attribute information.

[0040] In specific implementation, the more complete the user attribute information provided by the user, the more trustworthy the user is, and the higher the user's initial credit value is. Among them, the biometric information provided by the user is of great significance, that is, these biometric information can determine and define a person's true biological identity, thereby reducing the trust cost in social activities, and can fundamentally change the economic and social interaction model to improve the efficiency of activities; and the user's biometric information is directly bound to the user, cannot be transferred, and cannot be stolen, so it can be traced back to the user through any record with the user's biometric information. For example, when the biometric information is fingerprint information with a witness, it can be traced back to the user who issued the fingerprint, as well as the fingerprint and identity of the witness; therefore, for users who provide multiple biometric information, the user's initial credit value will be higher.

[0041] In specific implementation, the credit value of a transaction is meaningful only when the authenticity of the user's identity is confirmed. When the user's identity is unclear and difficult to verify, the user may increase his credit value by means of brushing orders. Once the unidentified user carries out malicious transactions with serious consequences, it may cause great losses to other users on the blockchain, and the opaque identity makes it difficult to hold them accountable. Therefore, when determining the initial credit value of the target user based on user attribute information, the more information the user's biometric information contains, the higher the score corresponding to the user's initial score. The specific setting rules are not specifically limited here.

[0042] Step S106, using the pre-trained behavior analysis model, based on the above user behavior information, behavior analysis is performed on the target user to obtain analysis results.

[0043] The above analysis model can analyze user behavior information to determine whether the user's behavior is abnormal or malicious. In specific implementation, the above analysis model can pre-set analysis rules. For example, if the user behavior information includes multiple (such as more than three) withdrawals of transactions, the user's behavior is considered malicious; if the user behavior information contains malicious termination of transactions or the spread of false statements, the user's behavior is considered abnormal; when the user behavior information includes multiple abnormal behaviors, the user behavior information can be considered malicious.

[0044] The above analysis model can also be a neural network model or a deep learning model, which can be trained by a preset training set, which includes multiple samples collected in advance, and the samples include multiple user features, and each sample carries a probability value of the sample being a malicious behavior, including but not limited to the following features: behavior time features, behavior type features, behavior organization features, product features, amount features, on-chain consensus features, node verification features, and user evaluation features. In specific implementation, the trained behavior analysis model can extract features from the input user behavior information, and compare the extracted features with the user features in the sample, and then determine whether the user behavior is malicious or abnormal based on the probability value of the sample corresponding to the matching user features to obtain the analysis results.

[0045] Step S108, based on the above initial credit value and analysis results, determine the final credit value of the target user, and set operation permissions for the target user based on the final credit value; wherein the operation permissions are used to indicate whether the target user has the permission to perform the specified operation of the blockchain, or the difficulty of the target user to complete the specified operation.

[0046] In specific implementation, the user's credit is evaluated based on the initial credit value obtained from the user attribute information and the analysis results obtained from the user behavior information to obtain the final credit value. In some embodiments, the user's credit can also be scored in combination with more user information. For example, the more transactions a user has with users with higher credit ratings, the higher the final credit value, and the higher the final credit value will be when the user is guaranteed by a node with a higher credit rating.

[0047] In blockchain activities, the more reasonable behaviors a user performs and the more complete the user attribute information provided, the more beneficial it is for the user's credit score. Since the biometric information in the user attribute information has special significance, when determining the final credit value of the target user, the proportion of biometric information in the user credit value evaluation can be increased as much as possible, so as to ensure that the analysis results of the user behavior information are scored under the condition that the user's identity is true, and the final credit value is obtained, thereby improving the reliability of the final credit value. Usually, when the analysis results indicate that the user behavior is malicious, the final credit value is low.

[0048] In specific implementation, different operation permissions for activities on the blockchain can be set for different final credit values ​​to encourage and restrict users' operations on the blockchain, thereby achieving the purpose of improving the credit of users on the blockchain; the operation permission is used to indicate whether the user has the authority to perform a specified operation on the blockchain, or the difficulty of the target user to complete the specified operation. The specified operation can be a transaction operation, information upload operation, information viewing operation, etc.

[0049] Specifically, for users with higher final credit values, they can be automatically identified as high-quality users, and the difficulty for the user to complete specified operations in subsequent blockchains can be reduced. For users with lower final credit values ​​or malicious users, the system can increase the difficulty for the user to complete execution operations in subsequent blockchains, that is, to impose certain restrictions on specified operations on the blockchain: for example, when consensus is reached, 9 / 10 nodes on the blockchain need to endorse successfully to reach a consensus, while ordinary users only need 2 / 3 of the nodes to endorse successfully to reach a consensus and complete the transaction; for example, the user's account is blocked for a preset time length, and the user's account can be automatically unblocked after the preset time is reached; when the user's final credit value is lower than the preset threshold, the user's account can be permanently blocked, that is, the user cannot perform any operations on the blockchain.

[0050] The method for setting user operation permissions in the above blockchain first obtains the user attribute information and user behavior information of the target user from the blockchain; then determines the initial credit value of the target user based on the user attribute information; then analyzes the user behavior information of the target user through the pre-trained behavior analysis model to obtain the analysis result; then determines the final credit value of the target user based on the initial credit value and the analysis result, and then sets the operation permissions for the target user based on the final credit value. This method combines user attribute information when determining the final credit value, thereby improving the accuracy and rationality of the credit value. At the same time, this method can set different operation permissions for users according to different credit values, so as to limit the on-chain operations of users with lower credit values ​​and encourage on-chain operations of users with higher credit values, thereby ensuring the security of user activities on the blockchain and facilitating the development of the blockchain ecosystem.

[0051] The embodiment of the present invention also provides another method for setting user operation permissions in a blockchain, which is implemented on the basis of the method described in the above embodiment; the method focuses on describing the specific process of determining the initial credit value of the target user based on the user attribute information (implemented by the following steps S204-S206), and when the behavior analysis model includes a dimensionality reduction module, a clustering module and an identification module, the specific process of performing behavior analysis on the target user based on the user behavior information through the behavior analysis model (implemented by the following steps S208-S212); Figure 2 As shown, the method comprises the following steps:

[0052] Step S202, obtaining user attribute information and user behavior information of the target user from the blockchain; the user attribute information includes biometric information and user registration information; the biometric information includes: one or more of the target user's facial image, fingerprint information, voiceprint information and iris information.

[0053] The above user registration information includes name, age, occupation or business license, etc.; the user registration information can be uploaded to the blockchain network by the user through the client in advance. In specific implementation, the user's facial image information can be collected through the camera, the fingerprint information and iris information can be entered through a dedicated input device, and the voiceprint information can be realized by entering the voiceprint characteristics and lip movement interval time data of the user reading the specified verification text; after the above biometric information is collected, the user can upload the biometric information to the blockchain network through the client, and the user can decide which type of biometric information to upload according to needs or wishes.

[0054] Step S204, multiplying the preset first weight by the degree of completeness of the user registration information to obtain a first credit value; multiplying the preset second weight by the number of types of biometric information to obtain a second credit value; wherein the first weight is smaller than the second weight.

[0055] According to the content of the user registration information uploaded by the user, the degree of completeness of the information can be determined. For example, there are 10 options for user registration information included in the blockchain, and the user has uploaded the content of 5 options, then the degree of completeness of the information is 50%; the number of types of the above-mentioned biometric information is also the number of facial images, fingerprint information, voiceprint information and iris information included in the biometric information. When the degree of completeness of the user registration information is the same, the more types there are, the higher the credit value. The above-mentioned first weight and second weight can be values ​​set according to business needs. In order to increase the impact of biometric information on credit value, the second weight is greater than the first weight. For example, the first weight is 0.1 and the second weight is 0.5.

[0056] Step S206: The sum of the first credit value and the second credit value is determined as the initial credit value.

[0057] Step S208: Perform dimensionality reduction processing on the user behavior information through a dimensionality reduction module to obtain a state vector.

[0058] In a specific implementation, the above-mentioned behavior analysis model includes a dimensionality reduction module, a clustering module and an identification module, that is, the behavior analysis result is obtained by sequentially performing behavior analysis on the user behavior information through the dimensionality reduction module, the clustering module and the identification module. In a specific implementation, the above-mentioned dimensionality reduction module includes a multi-layer neural network connected in sequence; the multi-layer random neural network can be trained through the following steps 10-12:

[0059] Step 10, training the first layer network in the multi-layer neural network according to a preset sample set to obtain a trained first layer network; the sample set includes a plurality of samples, and each sample includes a plurality of user features.

[0060] The number of layers of the multi-layer random neural network can be set according to the dimensionality reduction requirements, for example, it can be set to 3 layers or 5 layers, etc. The sample set includes a large number of pre-collected samples, each of which includes multiple user features, and each sample is not set with a label for characterizing the sample as malicious behavior or a label for legal behavior. The reason for not setting labels is that: there can be multiple business scenarios in the blockchain network, and there can also be multiple organizations and users of different industries, types, and identities participating in blockchain transactions or activities, and the types of activities are also diverse. Therefore, for samples that cannot be classified, or samples of a certain type, it may be that the abnormal behavior is indeed caused by the particularity of the industry, enterprise, and blockchain activities, but not malicious behavior. At this time, it is unreasonable to set such samples as malicious behavior labels.

[0061] This embodiment will collect a large number of illegal user behaviors to form a data set, and then extract features from the data set to obtain a training set containing multiple user features, where the multiple user features include but are not limited to: behavior time features, behavior type features, behavior organization features, product features, amount features, on-chain consensus features, node verification features, and user evaluation features. The training set includes multiple samples, for example: sample set = {sample 1, sample 2, sample 3, ...}.

[0062] Among them, sample 1 = (behavior time feature 1, behavior type feature 1, behavior organization feature 1, product feature 1, amount feature 1, on-chain consensus feature 1, node verification feature 1 and user evaluation feature 1), that is, each sample in the training set is high-dimensional data composed of various user features, and the sample does not have a label. In the specific implementation, in order to unify the feature values ​​of user features in different samples, the feature values ​​of each user feature in the sample can be standardized or normalized.

[0063] Each layer of the multi-layer neural network can be a random neural network. When training a multi-layer neural network, firstly, the network parameters of the first layer of the multi-layer neural network are randomly generated using normal distribution, and then the training samples are determined from the training set and input into the first layer of the network to obtain the output result; the loss value is calculated based on the output result, and then the network parameters of the first layer of the network are adjusted according to the loss value, and new training samples are continuously determined from the training set and input into the first network structure to obtain a new output result; the loss value is calculated based on the new output result until the loss value converges or reaches a preset number of training times, and the trained first layer of the network is obtained.

[0064] Step 11, for each network layer except the first network layer in the multi-layer neural network: input the training samples in the sample set into the previous network layer of the current network, and input the output results into the current network to train the current network.

[0065] After the first layer of network training is completed, the samples in the training set are input into the first layer of network again, and the subsequent layers of neural networks are trained one by one to determine the network parameters of each layer of the multi-layer neural network. When training networks other than the first layer of network, the training samples in the training set need to be input into the previous layer of network, and the output of the previous layer of network is used as the input of the next layer of network, and the network parameters of each layer are continuously adjusted to obtain the trained layers of network.

[0066] Step 12, determining each trained network layer as a trained multi-layer neural network.

[0067] In the specific implementation, the trained layers of the network are stacked to obtain a trained multi-layer neural network, that is, a dimension reducer is generated. In practical applications, the trained multi-layer neural network can be deployed on the nodes of the blockchain. Every time the node is triggered to execute a smart contract for credit value adjustment, the node can use the multi-layer neural network to reduce the dimension of user behavior information and obtain a state vector.

[0068] The above state vector is usually a binary state vector, that is, each element in the vector is 0 or 1, 0 represents normal features and 1 represents abnormal features; or 0 represents abnormal features and 1 represents normal features. Specifically, the user behavior information is input into the dimension reduction module, and the dimension reduction module can extract the user features in the user behavior information to obtain an n-dimensional feature vector, and then reduce the n-dimensional feature vector to m-dimensional (m≤n), and generate 2 m For example, when m=2, the dimension of the binary state vector is 4, which can be expressed as: (1, 0, 0, 0).

[0069] Step S210, using a clustering module to determine the target sample cluster to which the user behavior information belongs based on the state vector; the target sample cluster is a sample cluster with the same state vector corresponding to the user behavior information among the preset multiple sample clusters. Each sample cluster among the multiple sample clusters includes multiple samples, and the state vector corresponding to each sample is the same.

[0070] The clustering module can determine the target sample cluster of the user behavior information in the preset multiple sample clusters according to the state vector corresponding to the user behavior information. In specific implementation, the sample cluster corresponding to the state vector identical to the state vector of the user behavior information can be found in the multiple sample clusters as the target sample cluster. In specific implementation, the multiple sample clusters can be obtained by clustering the preset sample set according to the state vector. Specifically, the multiple sample clusters can be obtained by the following steps 20-21:

[0071] Step 20, determining a target sample from a preset sample set; the sample set includes multiple samples, each sample includes multiple user features; the target sample is input into a dimensionality reduction module to obtain a state vector of the target sample; continue to execute the step of determining the target sample from the preset sample set until the state vector of each sample in the sample set is obtained.

[0072] Step 21: In the sample set, samples with the same state vector are divided into the same sample cluster to obtain multiple sample clusters.

[0073] In the specific implementation, the dimension reduction module is used to reduce the dimension of each sample in the training set to obtain the state vector corresponding to each sample, and then the samples with the same state vector are classified into the same sample cluster to divide the multiple samples in the training set into several sample clusters. After obtaining multiple sample clusters, in order to facilitate the subsequent prediction of whether the user behavior information is malicious behavior and its malicious degree, it is necessary to determine the preset probability value corresponding to each sample cluster. The preset probability value can be the probability value of the sample in the target sample cluster being malicious behavior. The preset probability value of each sample cluster can be determined by the following steps 30-31:

[0074] Step 30: Determine the centroid of the sample cluster according to the state vectors of the multiple sample clusters.

[0075] In a specific implementation, the centroid of the sample cluster can be a vector, and the mean of the numerical values ​​corresponding to each element in the state vector of each sample cluster in multiple sample clusters can be used as the numerical value of each element in the vector corresponding to the centroid of the sample cluster. For example, there are 3 sample clusters, namely sample cluster 1 (1, 0, 0, 0), sample cluster 2 (0, 1, 0, 1), and sample cluster 3 (1, 1, 0, 0), and the centroid of the sample cluster is (2 / 3, 2 / 3, 0, 1 / 3).

[0076] Step 31, for each sample cluster, calculate the cosine similarity between the state vector of the current sample cluster and the centroid of the sample cluster; based on the cosine similarity, determine the preset probability value of the current sample cluster.

[0077] The above cosine similarity is usually a method of measuring the similarity between two vectors by measuring the cosine value of the angle between them. The formula for calculating the pre-similarity cosine is:

[0078]

[0079] Where n is the total number of elements in the state vector, X i Represents the value corresponding to the i-th element in the state vector of the current sample cluster, Y iRepresents the value corresponding to the i-th element in the centroid of the sample cluster. After obtaining the cosine similarity corresponding to each sample cluster and the centroid of the sample cluster, the preset probability value of each sample cluster can be determined according to the cosine similarity. Specifically, the cosine similarity threshold corresponding to each sample cluster can be compared with the preset similarity threshold, and the sample cluster with a similarity threshold greater than the preset similarity threshold is regarded as a behavior with a high similarity to the malicious behavior, and the preset probability value is set to a larger value. In specific implementation, the preset similarity threshold can be set to multiple different thresholds, so as to obtain probability values ​​corresponding to multiple threshold ranges, and the preset probability is set for the sample cluster by the probability value.

[0080] In some embodiments, the above-mentioned training sample set can be a set composed of a large number of legal behaviors of users. At this time, the method of determining the sample cluster is the same as the method of the training set composed of illegal behaviors (equivalent to the above-mentioned abnormal behaviors or malicious behaviors), but the method of determining the preset probability value corresponding to the sample cluster is different, that is, the cosine similarity threshold corresponding to each sample cluster is compared with the preset similarity threshold, and the sample cluster whose similarity threshold is greater than the preset similarity threshold is regarded as a behavior with a higher similarity to the legal behavior, and the preset probability value is set to a smaller value.

[0081] In specific implementation, for each sample cluster, it can be determined whether the cosine similarity is greater than the preset similarity threshold. If it is greater, the preset probability value of the current sample cluster is set to the first probability value; if it is less than or equal to, the preset probability value of the current sample cluster is set to the second probability value; the first probability value and the second probability value are different values ​​and can be set according to business requirements. If the sample set is a set consisting of illegal behaviors, the first probability value is set to a smaller value and the second probability value is set to a larger value; if the sample set is a set consisting of legal behaviors, the first probability value is set to a larger value and the second probability value is set to a smaller value.

[0082] Step S212, determining the analysis result of the user behavior information through the identification module according to the preset probability value of the target sample cluster; wherein the preset probability value is the probability value that the sample in the target sample cluster is a malicious behavior; the analysis result includes the malicious behavior level corresponding to the user behavior information.

[0083] The recognition model can obtain the probability value of user behavior information being malicious behavior based on the preset probability value of the target sample cluster. The level of malicious behavior of the user behavior information can be determined based on the probability value. Generally, the larger the probability value, the higher the level of malicious behavior.

[0084] Step S214, based on the above initial credit value and analysis results, determine the final credit value of the target user, and set operation permissions for the target user based on the final credit value; wherein the operation permissions are used to indicate whether the target user has the permission to perform the specified operation of the blockchain, or the difficulty of the target user to complete the specified operation.

[0085] The method for setting user operation permissions in the above-mentioned blockchain obtains user registration information and biometric information, as well as user behavior information in the blockchain, scores the user's credit, obtains the user's final score value, and sets corresponding operation permissions for the user based on the final score value, thereby encouraging users with high credit to perform on-chain operations and restricting users with low scores from performing on-chain operations, thereby ensuring the security of user transactions on the blockchain and promoting the healthy and benign development of the blockchain ecosystem.

[0086] The embodiment of the present invention also provides another method for setting user operation permissions in a blockchain, which is implemented on the basis of the method described in the above embodiment; the method focuses on describing the specific process of setting operation permissions for a target user according to the final credit value (implemented by the following steps S310-S314); Figure 3 As shown, the method comprises the following steps:

[0087] Step S302, obtaining user attribute information and user behavior information of the target user from the blockchain; wherein the user attribute information includes biometric information.

[0088] Step S304: Determine the initial credit value of the target user based on the above user attribute information.

[0089] Step S306: Performing behavior analysis on the target user based on the user behavior information by using the pre-trained behavior analysis model to obtain analysis results.

[0090] Step S308: Determine the final credit value of the target user based on the initial credit value and the analysis result.

[0091] In specific implementation, the evaluation of user credit can be periodic or real-time. Users can be prompted to supplement corresponding biometric information or user registration information, or improve standardized behavior in transactions to improve the final credit value. In addition, the system can provide a temporary credit score improvement channel. By paying a credit behavior deposit, the user's credit score can be temporarily increased to a certain level, such as to a preset credit value. This can provide certain conveniences for users who urgently need to conduct transactions or other on-chain operations, and improve the user experience.

[0092] Specifically, after determining the final credit value of the target user based on the initial credit value and the analysis results, it can be determined whether the target user's credit behavior deposit is stored in the blockchain; if so, the final credit value is increased to the preset credit value, and the preset credit value is determined as the final credit value of the target user after the increase. The above-mentioned credit behavior deposit includes: assets paid by the target user to the blockchain to guarantee credit; when the user defaults, the blockchain will confiscate the credit deposit and compensate the relevant users whose interests are damaged on the blockchain. When the user's transaction or operation behavior is completed and a consensus is formed on the blockchain, the blockchain will return the credit behavior deposit to the user and re-evaluate the user's credit value.

[0093] Step S310, determining whether the final credit value is greater than or equal to a first preset threshold, if yes, executing step S312; otherwise, executing step S314.

[0094] Step S312, marking the target user as a high-quality user; the high-quality user has the authority to perform the specified operation of the blockchain, and the difficulty of completing the specified operation is set to the first level; executing step S318.

[0095] The above-mentioned first preset threshold can be set to a higher value to screen out high-quality users on the blockchain. The target user's operating authority is set to the operating authority of a high-quality user, who has the authority to perform the specified operation on the blockchain, and the difficulty of completing the specified operation is set to the first degree (that is, a smaller value), and the difficulty of completing the specified operation is relatively low. For example, when reaching a consensus, a high-quality user needs 1 / 2 of the nodes on the blockchain to endorse successfully before a consensus can be reached, and a general user needs 2 / 3 of the nodes to endorse successfully before a consensus can be reached to complete the transaction.

[0096] Step S314, determining whether the final credit value is less than a second preset credit threshold, if yes, executing step S316; otherwise, ending.

[0097] Step S316, restricting the target user from executing the designated operation of the blockchain, or setting the difficulty level for the target user to complete the designated operation to the second level; executing step S318. The first preset credit threshold is greater than the second preset credit threshold; the first level of difficulty is less than the second level.

[0098] The second preset threshold can be set to a lower value to screen out malicious users on the blockchain. In specific implementation, it is necessary to limit the activities of malicious users on the blockchain to ensure the safety of other users on the chain. The difficulty of the malicious user to complete the specified operation is the second degree (that is, a larger value), thereby increasing the difficulty of the user to perform operations in the blockchain. For example, when consensus is reached, 9 / 10 nodes on the blockchain need to endorse successfully to reach a consensus; the user can also be restricted from performing specified operations on the blockchain, such as banning the user's account for a preset time length, and the user's account can be automatically unbanned after the preset time.

[0099] Step S318: upload the target user's final credit value and operation authority to the blockchain.

[0100] In order to ensure that other users on the blockchain can view each user's true credit value and operation authority, the target user's final credit value and operation authority can be uploaded to the blockchain, that is, the target user's final credit value and operation authority are sent to the target node on the blockchain, so that the target node shares the final credit value and operation authority with other nodes on the blockchain except the target node. Other nodes generate proposal results for the final credit value and operation authority and endorse the proposal results. After the endorsement is completed, the blockchain performs a consensus sorting service to update the target user's credit value and operation authority on the blockchain.

[0101] When the target node on the blockchain receives the final credit value and operation authority of the target user, it will share it with other nodes on the blockchain, so that all nodes on the blockchain independently simulate the behavior of the node after the credit value is adjusted, generate an execution result (the execution result is not written to the local ledger), observe the business impact of the execution result on its own node, independently judge and generate a proposal result, endorse the proposal result, that is, add a digital signature to the result (sign the result with its own private key); then these nodes send their endorsement results to the credit management operation consensus module. After the credit management operation consensus module collects the endorsement results that meet the threshold number (or meets the requirements of the consensus algorithm), it initiates the user credit adjustment event to the sorting node in the blockchain. The sorting node performs sorting services on the event to ensure the consistency of the event sequence, submits the record and generates a new block. Each node on the blockchain verifies the legitimacy of the block and writes the block into the ledger. At this point, the final credit value and operation authority of the target user are updated.

[0102] By reaching consensus on the user's credit value and operation adjustment process on the chain, the fairness and openness of the user's credit adjustment can be guaranteed, and the user nodes on the chain can also receive the credit changes of the node in a timely manner, so as to adjust the transaction or action strategy in time.

[0103] The method for setting user operation permissions in the above blockchain can accurately verify the user's identity by obtaining and evaluating the user's biometric information, and then analyze the user's behavior through a behavioral analysis model, and score the user's credit based on the biometric information and behavioral analysis results, thereby achieving encouragement and restriction on user behavior, and the user's final credit value adjustment and set operation permissions are put on the chain for consensus, ensuring fairness and openness of user credit. At the same time, this method can reduce the trust cost of interaction between users and ensure the security of user transactions and operations on the blockchain.

[0104] Corresponding to the above method embodiment, the embodiment of the present invention also provides a device for setting user operation permissions in a blockchain; Figure 4 As shown, the device comprises:

[0105] The information acquisition module 40 is used to obtain user attribute information and user behavior information of the target user from the blockchain; wherein the user attribute information includes biometric information.

[0106] The initial credit value determination module 41 is used to determine the initial credit value of the target user based on the user attribute information.

[0107] The behavior analysis module 42 is used to perform behavior analysis on the target user based on the user behavior information through a pre-trained behavior analysis model to obtain analysis results.

[0108] The permission setting module 43 is used to determine the final credit value of the target user based on the initial credit value and the analysis result, and set the operation permission for the target user based on the final credit value; wherein the operation permission is used to indicate whether the target user has the permission to perform the specified operation of the blockchain, or the difficulty of the target user to complete the specified operation.

[0109] The device for setting user operation permissions in the above-mentioned blockchain first obtains the user attribute information and user behavior information of the target user from the blockchain; the user attribute information includes biometric information; then the initial credit value of the target user is determined based on the user attribute information; then the user behavior information is analyzed through the pre-trained behavior analysis model to obtain the analysis result; then the final credit value of the target user is determined based on the initial credit value and the analysis result, and the operation permission is set for the target user based on the final credit value. This method combines the user attribute information when determining the final credit value, thereby improving the accuracy and rationality of the credit value. At the same time, this method can set different operation permissions for users according to different credit values, so as to limit the on-chain operations of users with lower credit values ​​and encourage on-chain operations of users with higher credit values, thereby ensuring the security of user activities on the blockchain and being conducive to the development of the blockchain ecology.

[0110] Specifically, the above-mentioned biometric information includes: one or more of the target user's facial image, fingerprint information, voiceprint information and iris information; the user attribute information also includes user registration information; the above-mentioned initial credit value determination module 41 is used to multiply the preset first weight by the degree of completeness of the user registration information to obtain a first credit value; multiply the preset second weight by the number of types of biometric information to obtain a second credit value; wherein the first weight is less than the second weight; and the sum of the first credit value and the second credit value is determined as the initial credit value.

[0111] Furthermore, the above-mentioned behavior analysis model includes a dimensionality reduction module, a clustering module and an identification module; the above-mentioned behavior analysis module 42 is used to: perform dimensionality reduction processing on the user behavior information through the dimensionality reduction module to obtain a state vector; determine the target sample cluster to which the user behavior information belongs according to the state vector through the clustering module; the target sample cluster is a sample cluster with the same state vector corresponding to the user behavior information among the preset multiple sample clusters; each of the multiple sample clusters includes multiple samples, and the state vector corresponding to each sample is the same; determine the analysis result of the user behavior information according to the preset probability value of the target sample cluster through the identification module; wherein the preset probability value is the probability value that the sample in the target sample cluster is a malicious behavior; the analysis result includes the malicious behavior level corresponding to the user behavior information.

[0112] Specifically, the dimensionality reduction module includes a plurality of layers of neural networks connected in sequence; the device also includes a network training model, which is used to: train the first layer of the network in the multi-layer neural network according to a preset sample set to obtain the trained first layer of the network; the sample set includes a plurality of samples, and each sample includes a plurality of user features; for each layer of the multi-layer neural network except the first layer of the network: input the training samples in the sample set into the previous layer of the current network, and input the output results into the current network to train the current network; determine each trained network layer as the trained multi-layer neural network.

[0113] Furthermore, the above-mentioned device also includes a sample cluster determination module, which is used to: determine the target sample from a preset sample set; the sample set includes multiple samples, each sample includes multiple user features; input the target sample into the dimensionality reduction module to obtain the state vector of the target sample; continue to execute the step of determining the target sample from the preset sample set until the state vector of each sample in the sample set is obtained; divide the samples with the same state vector in the sample set into the same sample cluster to obtain multiple sample clusters.

[0114] Specifically, the above-mentioned device also includes a preset probability value determination module, which is used to: determine the centroid of the sample cluster based on the state vectors of multiple sample clusters; for each sample cluster, calculate the cosine similarity between the state vector of the current sample cluster and the centroid of the sample cluster; based on the cosine similarity, determine the preset probability value of the current sample cluster.

[0115] In a specific implementation, the preset probability value determination module is further used to: determine whether the cosine similarity is greater than a preset similarity threshold; if so, set the preset probability value of the current sample cluster to the first probability value; if less than or equal to, set the preset probability value of the current sample cluster to the second probability value.

[0116] Furthermore, the authority setting module 43 is used to: if the final credit value is greater than or equal to a first preset credit threshold, mark the target user as a high-quality user; wherein the high-quality user has the authority to perform the specified operation of the blockchain, and the difficulty of completing the specified operation is set to a first degree; if the final credit value is less than a second preset credit threshold, restrict the target user from performing the specified operation of the blockchain, or set the difficulty of the target user to complete the specified operation to a second degree; wherein the first preset credit threshold is greater than the second preset credit threshold; and the difficulty of the first degree is less than the second degree.

[0117] Furthermore, the above-mentioned device also includes a credit chain module, which is used to upload the final credit value and operation authority to the blockchain.

[0118] Specifically, the above-mentioned credit chain module is also used to: send the final credit value and operation authority to the target node of the blockchain, so that the target node shares the final credit value and operation authority with other nodes on the blockchain except the target node, and other nodes generate proposal results for the final credit value and operation authority, and endorse the proposal results. After the endorsement is completed, the blockchain performs a consensus sorting service to update the credit value and operation authority of the target user on the blockchain.

[0119] Furthermore, the above-mentioned device also includes a temporary score increase module, which is used to: determine whether the credit behavior deposit of the target user is saved in the blockchain; the credit behavior deposit includes: the assets paid by the target user to the blockchain to guarantee the credit; if so, the final credit value is increased to the preset credit value, and the preset credit value is determined as the final credit value of the target user after the increase.

[0120] The device for setting user operation permissions in a blockchain provided in an embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0121] The embodiment of the present invention further provides an electronic device, see Figure 5As shown, the electronic device includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for setting user operation permissions in the above-mentioned blockchain.

[0122] Further, Figure 5 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .

[0123] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0124] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.

[0125] An embodiment of the present invention further provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method for setting user operation permissions in the above-mentioned blockchain. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and / or electronic device can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0127] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for setting user operation permissions in a blockchain. It is characterized in that The method comprises: Obtain user attribute information and user behavior information of the target user from the blockchain; wherein the user attribute information includes biometric information; the biometric information includes: one or more of the target user's facial image, fingerprint information, voiceprint information, and iris information; the user attribute information also includes user registration information; Determining the initial credit value of the target user based on the user attribute information specifically includes: multiplying a preset first weight by the degree of perfection of the user registration information to obtain a first credit value; multiplying a preset second weight by the number of types of the biometric information to obtain a second credit value; wherein the first weight is less than the second weight; and summing the first credit value and the second credit value to determine the initial credit value; Performing behavior analysis on the target user based on the user behavior information using a pre-trained behavior analysis model to obtain an analysis result; The final credit value of the target user is determined according to the initial credit value and the analysis result, and the operation permission is set for the target user according to the final credit value; wherein the operation permission is used to indicate whether the target user has the permission to perform a specified operation of the blockchain, or the difficulty of the target user to complete the specified operation.

2. The method according to claim 1, It is characterized in that The behavior analysis model includes a dimension reduction module, a clustering module and a recognition module; The step of performing behavior analysis on the target user based on the user behavior information by using the pre-trained behavior analysis model to obtain the analysis result comprises: Performing dimensionality reduction processing on the user behavior information by the dimensionality reduction module to obtain a state vector; Determine, by the clustering module, a target sample cluster to which the user behavior information belongs according to the state vector; the target sample cluster is a sample cluster having the same state vector as that corresponding to the user behavior information among a plurality of preset sample clusters; each sample cluster among the plurality of sample clusters includes a plurality of samples, and the state vector corresponding to each of the samples is the same; The identification module determines the analysis result of the user behavior information according to the preset probability value of the target sample cluster; wherein the preset probability value is the probability value that the sample in the target sample cluster is a malicious behavior; and the analysis result includes the malicious behavior level corresponding to the user behavior information.

3. The method according to claim 2, It is characterized in that The dimension reduction module includes a multi-layer neural network connected in sequence; the multi-layer neural network is trained in the following manner: Training a first layer network in the multi-layer neural network according to a preset sample set to obtain a trained first layer network; the sample set includes a plurality of samples, each sample includes a plurality of user features; For each network layer of the multi-layer neural network except the first network layer: input the training samples in the sample set into the previous network layer of the current network, and input the output results into the current network to train the current network; Each trained network layer is determined as a trained multi-layer neural network.

4. The method according to claim 2, It is characterized in that The multiple sample clusters are determined in the following manner: Determine a target sample from a preset sample set; the sample set includes a plurality of samples, each sample includes a plurality of user features; input the target sample into the dimension reduction module to obtain a state vector of the target sample; continue to perform the step of determining the target sample from the preset sample set until the state vector of each sample in the sample set is obtained; The samples with the same state vector in the sample set are divided into the same sample cluster to obtain multiple sample clusters.

5. The method according to claim 2, It is characterized in that The preset probability value of each sample cluster in the multiple sample clusters is determined in the following manner: Determining the centroid of the sample cluster according to the state vectors of the multiple sample clusters; For each of the sample clusters, the cosine similarity between the state vector of the current sample cluster and the centroid of the sample cluster is calculated; and based on the cosine similarity, a preset probability value of the current sample cluster is determined.

6. The method according to claim 5, It is characterized in that The step of determining the preset probability value of the current sample cluster based on the cosine similarity includes: Determine whether the cosine similarity is greater than a preset similarity threshold, and if so, set the preset probability value of the current sample cluster to a first probability value; If it is less than or equal to, the preset probability value of the current sample cluster is set to the second probability value.

7. The method according to claim 1, It is characterized in that The step of setting operation permissions for the target user according to the final credit value includes: If the final credit value is greater than or equal to a first preset credit threshold, the target user is marked as a high-quality user; wherein the high-quality user has the authority to perform a specified operation of the blockchain, and the difficulty of completing the specified operation is set to a first degree; If the final credit value is less than a second preset credit threshold, restricting the target user from executing the designated operation of the blockchain, or setting the difficulty level for the target user to complete the designated operation to a second level; The first preset credit threshold is greater than the second preset credit threshold; and the first degree of difficulty is less than the second degree.

8. The method according to claim 1, It is characterized in that After determining the final credit value of the target user and setting operation permissions for the target user according to the final credit value, the method further includes: uploading the final credit value and the operation permissions to the blockchain.

9. The method according to claim 8, It is characterized in that The step of uploading the final credit value and the operation authority to the blockchain comprises: The final credit value and the operation authority are sent to the target node of the blockchain, so that the target node shares the final credit value and the operation authority with other nodes on the blockchain except the target node, and the other nodes generate a proposal result for the final credit value and the operation authority, and endorse the proposal result. After the endorsement is completed, the blockchain performs a consensus sorting service to update the credit value and operation authority of the target user on the blockchain.

10. The method according to claim 1, It is characterized in that After the step of determining the final credit value of the target user according to the initial credit value and the analysis result, the method further comprises: Determine whether the target user's credit behavior deposit is stored in the blockchain; the credit behavior deposit includes: assets paid by the target user to the blockchain for credit guarantee; If yes, the final credit value is increased to a preset credit value, and the preset credit value is determined as the final credit value of the target user after the increase.

11. A device for setting user operation permissions in a blockchain, It is characterized in that The device comprises: An information acquisition module, used to acquire user attribute information and user behavior information of a target user from a blockchain; wherein the user attribute information includes biometric information; the biometric information includes: one or more of the target user's facial image, fingerprint information, voiceprint information, and iris information; the user attribute information also includes user registration information; An initial credit value determination module is used to determine the initial credit value of the target user based on the user attribute information, specifically comprising: multiplying a preset first weight by the degree of perfection of the user registration information to obtain a first credit value; multiplying a preset second weight by the number of types of the biometric information to obtain a second credit value; wherein the first weight is less than the second weight; and summing the first credit value and the second credit value to determine the initial credit value; A behavior analysis module, used to perform behavior analysis on the target user based on the user behavior information through a pre-trained behavior analysis model to obtain an analysis result; A permission setting module is used to determine the final credit value of the target user according to the initial credit value and the analysis result, and set operation permissions for the target user according to the final credit value; wherein the operation permissions are used to indicate whether the target user has the permission to perform a specified operation of the blockchain, or the difficulty of the target user to complete the specified operation.

12. An electronic device, It is characterized in that It includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for setting user operation permissions in the blockchain according to any one of claims 1 to 10.

13. A machine-readable storage medium, It is characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the method for setting user operation permissions in the blockchain according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method and system for block-chain user credit rating, device, and storage medium

    CN108846742A

  • A credit barter platform based on a block chain

    CN109034795A

  • Network behavior detection method and device, equipment and storage medium

    CN110753065A