CN111309808B - Page access method, device and equipment for decentralizing application and storage medium - Google Patents

Page access method, device and equipment for decentralizing application and storage medium Download PDF

Info

Publication number
CN111309808B
CN111309808B CN202010100327.1A CN202010100327A CN111309808B CN 111309808 B CN111309808 B CN 111309808B CN 202010100327 A CN202010100327 A CN 202010100327A CN 111309808 B CN111309808 B CN 111309808B
Authority
CN
China
Prior art keywords
user node
application
page
target page
blockchain address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010100327.1A
Other languages
Chinese (zh)
Other versions
CN111309808A (en
Inventor
李茂材
周开班
王宗友
刘攀
张劲松
朱耿良
孔利
时一防
黄焕坤
刘区城
杨常青
蓝虎
崔嘉辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010100327.1A priority Critical patent/CN111309808B/en
Publication of CN111309808A publication Critical patent/CN111309808A/en
Application granted granted Critical
Publication of CN111309808B publication Critical patent/CN111309808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9554Retrieval from the web using information identifiers, e.g. uniform resource locators [URL] by using bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses a page access method, a device, equipment and a storage medium of a decentralizing application, wherein the method comprises the following steps: the method comprises the steps that a decentralizing application receives a target page sharing request sent by a first user node; the method comprises the steps that a decentralizing application sends a target page sharing request to a consensus node in a blockchain, so that the consensus node determines whether a first user node has sharing authority of a target page or not; when the first user node has the sharing right, the decentralizing application determines a blockchain address of page information of the target page according to the page identification, and sends the blockchain address to the first user node to obtain an encrypted blockchain address; the decentralization application obtains an encrypted blockchain address, generates a two-dimensional code according to the encrypted blockchain address, and broadcasts the two-dimensional code in the blockchain so that a second user node accesses a target page according to the two-dimensional code. By adopting the embodiment of the application, the target page of the decentralised application can be accessed quickly through the two-dimension code, and the applicability is high.

Description

Page access method, device and equipment for decentralizing application and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for page access of a decentralised application.
Background
With the development of blockchain technology, many applications on the blockchain network are now occurring Dapp (Decentralized Application, decentralised applications). Such as games Dapp, shopping Dapp, and so forth.
However, as the types of the decentralizing applications increase, the traditional opening mode of the decentralizing applications is complicated, and a user needs to trigger the starting of the decentralizing applications to access the decentralizing applications. On the other hand, when a certain user shares a certain page of the decentralized application with another user, the shared user can access the page shared by the sharing user through the steps of installing, starting, accessing the designated page and the like of the decentralized application because the decentralized application operates on the blockchain network. Therefore, how to quickly access a designated page of a decentralised application is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a page access method, device and equipment for a decentralizing application and a storage medium, which can quickly access a target page of the decentralizing application through a two-dimensional code and have high applicability.
In a first aspect, an embodiment of the present application provides a method for accessing a page of a decentralized application, where the method includes:
The method comprises the steps that a decentralizing application receives a target page sharing request sent by a first user node, wherein the target page sharing request carries a page identifier of a target page;
the decentralization application sends the target page sharing request to a consensus node in a blockchain so that the consensus node determines whether the first user node has the sharing authority of the target page or not;
When the first user node has the sharing right, the decentralizing application determines a blockchain address of the page information of the target page in the blockchain according to the page identifier, and sends the blockchain address to the first user node so that the first user node signs the blockchain address according to a private key of the first user node to obtain an encrypted blockchain address;
The decentralizing application obtains the encrypted blockchain address, generates a two-dimensional code according to the encrypted blockchain address, and broadcasts the two-dimensional code in the blockchain so that a second user node accesses the target page according to the two-dimensional code.
With reference to the first aspect, in a possible implementation manner, the method further includes:
When an access request triggered when the second user node recognizes the two-dimension code is received, the decentralizing application obtains the public key of the first user node, and decrypts the encrypted blockchain address according to the public key of the first user node to obtain the blockchain address;
the de-centering application transmits the blockchain address to the second user node, so that the second user node obtains the page information of the target page according to the blockchain address and accesses the target page according to the page information.
With reference to the first aspect, in one possible implementation manner, the page information includes page configuration data and a target smart contract; the method further comprises the following steps:
the decentralizing application obtains the page configuration data and the target intelligent contract according to the blockchain address;
The decentralizing application generates the target page according to the page configuration data, and executes the target intelligent contract to determine whether the target intelligent contract is matched with the target page;
And if the target intelligent contract is matched with the target page, the decentralization application sends an access permission notification to the second user node so that the second user node accesses the target page according to the page configuration data.
With reference to the first aspect, in a possible implementation manner, the method further includes:
The decentralizing application sends access event information to the first user node so that the first user node sends a data volume receiving address and node information of the first user node, wherein the access event information is used for explaining that the second user node accesses the target page according to the two-dimensional code;
the de-centering application determines a transfer data volume corresponding to the first user node according to the node information, and sends the transfer data volume to the data volume receiving address.
With reference to the first aspect, in one possible implementation manner, the generating the two-dimensional code according to the encrypted blockchain address includes:
The decentralization application determines an index value of each character of the encryption blockchain address, and determines a data code of the encryption blockchain address according to the index value of each character;
the application of the above-mentioned decentralization confirms the level of error correction that the application of the above-mentioned decentralization corresponds, confirm the error correction code of the above-mentioned data code according to the level of above-mentioned error correction;
The application of the decentralization generates a two-dimensional code according to the data code and the error correction code.
With reference to the first aspect, in one possible implementation manner, the determining the data encoding of the encrypted blockchain address according to the index value of each character includes:
the decentralization application determines the character code of the encryption block chain address according to the index value of each character;
The decentralization application determines an ending symbol and a complement symbol of the character code;
the de-centering application concatenates the character code, the ending symbol, and the padding symbol in sequence to obtain a data code for the encrypted blockchain address.
With reference to the first aspect, in one possible implementation manner, the broadcasting the two-dimensional code in the blockchain to enable the second user node to access the target page according to the two-dimensional code includes:
the centralized application transmits the two-dimensional code and the public key of the first user node to the consensus node so that the consensus node determines whether the two-dimensional code is matched with the blockchain address according to the public key;
And if the two-dimensional code is matched with the block chain address, broadcasting the two-dimensional code in the block chain by the decentralization application so that a second user node accesses the target page according to the two-dimensional code.
In a second aspect, an embodiment of the present application provides a page access apparatus for a decentralizing application, where the apparatus includes:
the receiving module is used for receiving a target page sharing request sent by the first user node, wherein the target page sharing request carries a page identifier of a target page;
the verification module is used for sending the target page sharing request to a consensus node in a blockchain so that the consensus node determines whether the first user node has the sharing authority of the target page or not;
The first determining module is configured to determine, when the first user node has the sharing right, a blockchain address of page information of the target page in the blockchain according to the page identifier, and send the blockchain address to the first user node so that the first user node signs the blockchain address according to a private key of the first user node to obtain an encrypted blockchain address;
The first generation module is used for acquiring the encrypted blockchain address, generating a two-dimensional code according to the encrypted blockchain address, and broadcasting the two-dimensional code in the blockchain so that the second user node accesses the target page according to the two-dimensional code.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes:
The first acquisition module is further used for acquiring a public key of the first user node when an access request triggered by the second user node when the two-dimensional code is identified is received, and decrypting the encrypted blockchain address according to the public key of the first user node to obtain the blockchain address;
The first sending module is further configured to send the blockchain address to the second user node, so that the second user node obtains page information of the target page according to the blockchain address and accesses the target page according to the page information.
With reference to the second aspect, in a possible implementation manner, the page information includes page configuration data and a target smart contract; the device further comprises:
the second acquisition module is also used for acquiring the page configuration data and the target intelligent contract according to the blockchain address;
The second generation module is further used for generating the target page according to the page configuration data and executing the target intelligent contract to determine whether the target intelligent contract is matched with the target page;
And the second sending module is further used for sending an access permission notification to the second user node to enable the second user node to access the target page according to the page configuration data if the target intelligent contract is matched with the target page.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes:
The third sending module is further configured to send access event information to the first user node, so that the first user node sends a data volume receiving address and node information of the first user node, where the access event information is used to indicate that the second user node accesses the target page according to the two-dimensional code;
And the second determining module is also used for determining the transfer data quantity corresponding to the first user node according to the node information and sending the transfer data quantity to the data quantity receiving address.
With reference to the second aspect, in one possible implementation manner, the first generating module includes:
a first determining unit, configured to determine an index value of each character of the encrypted blockchain address, and determine a data encoding of the encrypted blockchain address according to the index value of each character;
A second determining unit, configured to determine an error correction level corresponding to the de-centering application, and determine an error correction code of the data code according to the error correction level;
And the generating unit is used for generating the two-dimensional code according to the data code and the error correction code.
With reference to the second aspect, in one possible implementation manner, the first determining unit includes:
A first determining subunit, configured to determine, according to the index value of each character, a character code of the encrypted blockchain address;
a second determining subunit, configured to determine an ending symbol and a complement symbol of the character encoding;
and a third determining subunit, configured to sequentially concatenate the character code, the ending symbol, and the padding symbol to obtain a data code of the encrypted blockchain address.
With reference to the second aspect, in one possible implementation manner, the first generating module includes:
The sending unit is used for sending the two-dimensional code and the public key of the first user node to the consensus node so that the consensus node determines whether the two-dimensional code is matched with the blockchain address according to the public key;
And the broadcasting unit is used for broadcasting the two-dimensional code in the block chain to enable the second user node to access the target page according to the two-dimensional code if the two-dimensional code is matched with the block chain address.
In a third aspect, an embodiment of the present application provides an apparatus, including a processor and a memory, the processor and the memory being interconnected. The memory is configured to store a computer program supporting the terminal device to perform the method provided by the first aspect and/or any of the possible implementation manners of the first aspect, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method provided by the first aspect and/or any of the possible implementation manners of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program for execution by a processor to implement the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
In the embodiment of the application, the decentralizing application can generate the two-dimension code according to the target page sharing request of the first user node, so that other user nodes access the target page of the decentralizing application according to the two-dimension code, and the access efficiency of the decentralizing application is improved. On the other hand, the decentralizing application can send the target page sharing request of the first user node to the consensus node to verify the sharing authority of the first user node, so that the application safety of the decentralizing application is improved to a certain extent. In addition, the decentralization application encrypts the blockchain address of the page information of the target page in the blockchain through the private key of the first user node, so that the two-dimensional code is shared by the first user node, the safety of the blockchain address can be improved, and the applicability is higher.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a page access method for a decentralizing application according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for page access of a decentralised application according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a scenario for determining an encryption blockchain address provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a scenario for performing hash computation on a blockchain address according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of generating a two-dimensional code according to an embodiment of the present application;
FIG. 6 is a schematic view of a method for determining character encoding according to an embodiment of the present application;
FIG. 7 is another flow chart of a method for page access for a decentralised application provided by an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a page access device for a decentralizing application according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a page access method of a decentralizing application according to an embodiment of the present application. The decentralizing application (Decentralized Application, DAPP) refers to an application running on a distributed network (blockchain) that performs decentralizing operations by nodes in the blockchain. In FIG. 1, the de-centralized application 10 is running on top of the blockchain 20, wherein nodes 20a, 20b, 20c, and 20d are each part of nodes in the blockchain 20, and any of nodes 20a, 20b, 20c, and 20d may access or otherwise operate on the de-centralized application 10. The nodes 20a, 20b, 20c and 20d may be devices accessing the blockchain 20, including, but not limited to, mobile terminals, notebook computers, tablet computers, wearable portable devices, and the like. The nodes 20a, 20b, 20c and 20d may also be users accessing the blockchain 20 through the above devices, and may be specifically determined according to the actual application scenario, which is not limited herein. When the node 20a is a first user node logging into the decentralized application 10, and when the node 20 needs to share a target page, the decentralized application 10 may receive a target page sharing request sent by the node 20a, where the target page may be any page of the decentralized application 10, such as a first page, a setup page, etc. of the decentralized application 10, which may be specifically determined according to an actual application scenario, and is not limited herein. After receiving the target page sharing request, the decentralized application 10 may send the target page sharing request to the consensus node in the blockchain 20 so that the consensus node determines whether the node 20a has the sharing authority of the target page. The common nodes in the blockchain 20 may be the nodes 20b and 20c in fig. 1, or may be determined according to the actual application scenario, which is not limited herein.
When the consensus node of the blockchain 20 determines that the node 20a has the sharing right of the target page, the decentralized application 10 may determine the blockchain address of the page information of the target page in the blockchain 20 according to the page identifier of the target page carried by the target page sharing request sent by the node 20a, and send the blockchain address to the node 20a so that the node 20a signs the blockchain address according to the private key thereof to obtain the encrypted blockchain address. Further, the decentralized application 10 may obtain the encrypted blockchain address sent by the node 20a, and generate a two-dimensional code according to the encrypted blockchain address to broadcast the two-dimensional code in the blockchain 20, so that other user nodes in the blockchain 20, such as the node 20b, access the target page of the decentralized application 10 according to the two-dimensional code.
Referring to fig. 2, fig. 2 is a flow chart of a page access method of a decentralizing application according to an embodiment of the present application. The page access method of the decentralizing application shown in fig. 2 may include the following steps S201 to S204.
S201, the decentralizing application receives a target page sharing request sent by a first user node.
In some possible embodiments, the first user node may be any terminal device accessing to the blockchain, such as a notebook computer, a mobile terminal, a portable device, or the like, or may be a user accessing to the decentralized application according to the above device, which may be specifically determined according to an actual application scenario, and is not limited herein. The target page may be any page of the decentralized application, such as a commodity detail page of the shopping application, or a video playing page of the video application, which may be specifically determined according to an actual application scenario, and is not limited herein. When the first user node needs to share the target page of the decentralizing application so that other nodes access the target page, the first user node can send a target page sharing request to the decentralizing application, and at the moment, the decentralizing application can receive the target page sharing request sent by the first user node so that other nodes access the target page. The first user node needs to carry the page identifier of the target page or the application identifier of the decentralizing application when sending the target page sharing request to the blockchain, so that the decentralizing application running in the blockchain can identify the target page sharing request sent by the first user node.
S202, the decentralizing application sends a target page sharing request to a consensus node in the blockchain, so that the consensus node determines whether the first user node has the sharing authority of the target page.
In some possible embodiments, after receiving the target page sharing request sent by the first user node, the decentralizing application may further determine whether the first user node has the sharing authority of the target page, thereby improving the application security of the decentralizing application. Specifically, the decentralized application may send a target page sharing request to consensus nodes in the blockchain to enable each consensus node in the blockchain to respectively verify whether the first user node has the sharing authority of the target page. Each consensus node can acquire the node information of the first user node and the page identifier carried by the target page sharing request, determine the authority level of the target page according to the page identifier, determine the authority level of the first user node according to the node information of the first user node, and when the authority level of the first user node is not lower than the authority level corresponding to the target page, the consensus node can determine that the first user node has the sharing authority of the target page. Optionally, the consensus node may determine a permission node list corresponding to the target page according to the page identifier, further determine whether the first user node is in the permission node list corresponding to the target page according to the node information of the first user node, and when the first user node is in the permission node list corresponding to the target page, the consensus node may determine that the first user node has the sharing permission of the target page. Optionally, the consensus node may further verify whether the first user node is a preset node (such as an administrator node, an application maintenance node, etc.) according to the node information of the first user node, and determine that the first user node has the sharing authority of the target page when the first user node is the preset node. It should be specifically noted that, the specific implementation manner of determining whether the first user node has the sharing authority of the target page by using the formula node may be determined according to an actual application scenario, which is not limited herein.
In some possible embodiments, after sending the target page sharing request to the consensus nodes, the decentralized application further determines that the first user node has sharing authority, and when the number of the consensus nodes determined that the first user node has sharing authority exceeds a certain data amount (e.g., more than half) of the number of all user nodes in the blockchain, the decentralized application may determine that the first user node has sharing authority of the target page. Optionally, the decentralizing application may determine whether a preset consensus node in all the consensus nodes determines that the first user node has the sharing authority of the target page, and when the preset consensus node has the sharing authority of the target application, the decentralizing application may determine that the first user node has the sharing authority of the target application.
And S203, when the first user node has the sharing right, the decentralizing application determines the blockchain address of the page information of the target page in the blockchain according to the page identification, and sends the blockchain address to the first user node so that the first user node signs the blockchain address according to the private key of the first user node to obtain the encrypted blockchain address.
In some possible embodiments, when the first user node has the sharing right of the target page, the decentralizing application may determine, according to the page identifier carried by the target page sharing request, a blockchain address of the page information of the target page in the blockchain. Specifically, the de-centering application may determine a target block marked by the page identifier from the blockchain, or the de-centering application may determine a target block height corresponding to the page identifier and determine a block corresponding to the target block height as the target block, and further, the de-centering application may determine the target block height of the target block as the blockchain address of the page information. Optionally, the decentralizing application may call an intelligent contract corresponding to the page identifier, and further determine the blockchain address of the page information of the target page by executing the intelligent contract. It should be specifically noted that, the above blockchain address may include, in addition to the target block height, a specific storage location of the page information of the target page in the target block corresponding to the target block height, which may be specifically determined according to the actual application scenario, and is not limited herein.
In some possible embodiments, to further improve the security of the decentralizing application, after determining that the page information of the target page is the blockchain address in the blockchain, the decentralizing application may send the blockchain address to the first user node to enable the first user node to sign the blockchain address according to the private key of the first user node to obtain the encrypted blockchain address. Specifically, the decentralizing application sends the blockchain address to the first user node, so that the first user node further signs the blockchain address by using a private key of the first user node to obtain an encrypted blockchain address. Optionally, the decentralizing application may further directly obtain a private key of the first user node, and further sign the blockchain address according to the private key of the first user node after determining that the page information is in the blockchain address to obtain a final encrypted blockchain address.
Optionally, in order to further improve the security of the blockchain address, the decentralizing application may further perform hash computation on the blockchain address to obtain a digest of the blockchain address, and sign the digest with a private key of the first user node to obtain a digital signature of the blockchain address, so that the blockchain address and the digital signature of the blockchain address are regarded as corresponding encrypted blockchain addresses. Referring to fig. 3, fig. 3 is a schematic diagram of a scenario for determining an encrypted blockchain address according to an embodiment of the present application. In fig. 3, assume that the digest of the blockchain address obtained after the hash calculation of the blockchain address by the decentralizing application is 1000100, and the digest 1000100 is signed by the decentralizing application using the private key of the first user node to obtain 0010101. Assuming that the blockchain address is abcd at this time, the decentric application can consider abcd and 0010101 as the corresponding encrypted blockchain addresses.
The application of decentralization can be performed by adopting an information abstraction algorithm when hash calculation is performed on the block chain address. Among them, the above information Digest Algorithm includes, but is not limited to, cyclic redundancy check-8 (Cyclic Redundancy Check-8, CRC 8), cyclic redundancy check-16 (Cyclic Redundancy Check-16, CRC 16), cyclic redundancy check-32 (Cyclic Redundancy Check-32, CRC 32), information Digest Algorithm version 2 (Message-Digest Algorithm 2, MD2), information Digest Algorithm version 4 (Message-Digest Algorithm 4, MD4), information Digest Algorithm version 5 (Message-Digest Algorithm 5, MD5), secure hash Algorithm 1 (Secure Hash Algorithm, SHA 1), secure hash Algorithm 256 (Secure Hash Algorithm, SHA 256), secure hash Algorithm 384 (Secure Hash Algorithm, SHA 384), secure hash Algorithm 512 (Secure Hash Algorithm, SHA 512), RACE original integrity check Message Digest Algorithm (RACE INTEGRITY PRIMITIVES Evaluation MESSAGE DIGEST, RIPEMD), PANAMA, TIAdger and ler-3 algorithms, etc., and may be specifically determined based on the actual application scenario without limitation. Wherein, the length, the expression form and the like of the abstracts obtained by different information abstracting algorithms are different. For example, a hash value expressed in 8-bit hexadecimal numbers can be obtained based on CRC32, a hash value expressed in 32-bit hexadecimal numbers can be obtained based on MD5, and a hash value of 32 bytes (256 bits) in length can be obtained based on SHA 256.
For example, referring to fig. 4, fig. 4 is a schematic diagram of a scenario for performing hash computation on a blockchain address according to an embodiment of the present application. As shown in fig. 4, the blockchain address determined by the decentralizing application is A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, and at this time, if the decentralizing application performs hash computation on the blockchain address based on MD5, the corresponding digest obtained by the decentralizing application is d33d49bc2379e65ac7e7c9edd0a80a48.
S204, the decentralizing application acquires an encrypted blockchain address, a two-dimensional code is generated according to the encrypted blockchain address, and the two-dimensional code is broadcasted in the blockchain so that the second user node accesses the target page according to the two-dimensional code.
In the embodiment of the application, after the decentralizing application signs the blockchain address to obtain the encrypted blockchain address at the first user node, the decentralizing application obtains the encrypted blockchain address sent by the first user node and generates the two-dimensional code according to the encrypted blockchain address, and the decentralizing application can broadcast the two-dimensional code in the blockchain to enable the second user node to access the target page according to the two-dimensional code. The specific method for generating the two-dimensional code by the application of decentralization according to the encrypted blockchain address can be seen in fig. 5. Fig. 5 is a schematic flow chart of generating a two-dimensional code according to an embodiment of the present application. The method for generating the two-dimensional code provided in fig. 5 may include the following steps S2041 to S2043.
S2041, the decentralization application determines an index value of each character of the encryption blockchain address, and determines a data code of the encryption blockchain address according to the index value of each character.
In the embodiment of the present application, for the encryption blockchain address, each character in the encryption blockchain address corresponds to a fixed index value, wherein for the digits 0-9, the index value corresponding to each character is respectively 0-9, for the english letters a-Z, the index value corresponding to each character is respectively 10-35, the index value corresponding to the "+" is 37, the index value corresponding to the "%" is 38, the index value corresponding to the "x" is 39, the index value corresponding to the "+" is 40, and the index value corresponding to the "-" is 41. When the encryption block chain address is encoded, each character of the encryption block chain address is firstly converted into a corresponding index value, every two characters are divided into a group, and then the group is converted into a binary result of 11 bits. For one character of the drop list, the decentralization application may convert it to a 6bits binary result. Wherein, since the encoding of the encrypted blockchain address belongs to character encoding, the character encoding flag is 0010. It should be noted that, after obtaining the binary result corresponding to each group of characters, the number of the characters of the encrypted blockchain address needs to be converted into the corresponding binary according to the preset two-dimensional code version (the two-dimensional code version to be generated or generated by default), and then the character codes of the encrypted blockchain address are obtained according to the three-segment character strings. For character encoding, two-dimensional code versions 1-9 correspond to 10bits, two-dimensional code versions 10-26 correspond to 11bits, and two-dimensional code versions 27-40 correspond to 13bits.
Referring to fig. 6, fig. 6 is a schematic view of a scenario of a method for determining character encoding according to an embodiment of the present application. In fig. 6, assume that the preset two-dimensional code version is 1, the encrypted blockchain address is AE-86, and at this time, the index values corresponding to the encrypted blockchain address are (10,14,41,8,6). Further, the application of decentralization can group the obtained 5 characters two by two to obtain (10, 14), (41,8), (6), and further convert each group of characters into 11bits binary system. Wherein, (10, 14) can be converted into 45 binary system to obtain 464, and then the 464 is converted into 11bits binary system: 00111010000, converting (41,8) into 45 binary to obtain 1853, and converting 1853 into 11bits binary: 11100111101. for (6), its corresponding 45 bins are still 6, and then converted to 6bits of binary: 000110. at this point, the three binary results may be concatenated to yield 0011101000011100111101000110. Further, when the two-dimensional code version is 1, the number of characters 5 of the encrypted blockchain address needs to be converted into 9bits binary: 000000101, since the character encoding flag corresponding to the encrypted blockchain address is 0010, the character encoding of the encrypted blockchain address is obtained before the character encoding flag and the 9bits binary are added to 0011101000011100111101 000110: 00100000001010011101000011100111101000110.
Further, after the character encoding of the encrypted blockchain address is obtained, an end symbol (continuous 40 values) needs to be added to the end of the character encoding. Wherein if the number of character encoding bits is not a multiple of 8 in addition, it is also necessary to add a sufficient value of 0 after character encoding until a multiple of 8 is reached. On the other hand, for different two-dimensional codes with different error correction levels, each error correction level corresponds to different maximum bits restriction under different versions, so when the character coding plus the ending symbol still does not reach the maximum bits restriction corresponding to the corresponding error correction level, the padding symbol is needed to be added at the end of the coding. Wherein the patch content is repeated for two bytes: 11101100 and 00010001. Taking the example of character codes 00100000 01101010 00101101 00111011 00101001 01111001 01001000 10101101 11101000 00110110 000, there are 83bits in total, so the multiples of 8 are two more bits apart, so the last 5 0's (ending symbol) are added to obtain 00100000 01101010 00101101 00111011 00101001 01111001 01001000 10101101 11101000 00110110 00000000. For the H error correction level of the two-dimensional code version 1, 26 codewords are required, namely 104bits. Now, the ending symbol complemented with 0 is already 88bits, so that 16bits are also required to be complemented. The padded code is :00100000 01101010 00101101 0011101100101001 01111001 01001000 10101101 11101000 00110110 00000000 11101100 00010001., namely the padded code is the data code of the encrypted block chain address.
S2042, the decentralizing application determines an error correction level corresponding to the decentralizing application, and error correction codes of the data codes are determined according to the error correction level.
In the embodiment of the application, the two-dimensional code has four error correction levels in total, wherein the error correction level L can be corrected by 7% of the code words, the error correction level M can be corrected by 15% of the code words, the error correction level Q can be corrected by 25% of the code words, and the error correction level H can be corrected by 30% of the code words. Specifically, the number of error correction blocks and the number of error correction block code words of the data coding can be determined according to the two-dimensional code version and the error correction level corresponding to the decentralization application, wherein the number of error correction blocks represents the number of error correction blocks to be divided, and the number of error correction block code words represents the number of codewords in each block, namely, the number of bytes.
Taking two-dimensional code version 5 and error correction level as an example, four blocks (a group of two blocks for each of uplink and downlink), wherein the number of error correction blocks in the first group is 2, each block in the group has 33 codewords, 11 data codes, 11×2=22 error correction codes, the number of error correction blocks in the first group is 2, and each block in the group has 34 codewords, 12 data codes, 11×2=22 error correction codes. The use of binary makes the table too large, and therefore turns into decimal numbers ranging from 0 to 255. Wherein each block of group 1 has 11 data codes and 22 error correction codes; each block of group 2 has 12 data codes and 22 error correction codes. The error correction code of the data coding is mainly implemented by a reed-solomon error correction algorithm, which is not described herein. Based on the reed-solomon error correction algorithm, for the first set of first block data 67 85 70 134 87 38 85 194 119 50 6, the error correction code corresponding to that block is 199 11 45 115 247 241 223 229 248 154 117 236 38 6 50 17 7 236 213 87 148 235.
S2043, the two-dimensional code is generated by the decentralization application according to the data coding and the error correction coding.
In some possible embodiments, when the application of decentering is used to generate a two-dimensional code, it is necessary to first draw a positioning pattern on three corners of the two-dimensional code and further draw a pattern for the positioning pattern. The positioning pattern is 7*7 matrix, the pattern is 5*5 matrix, and the specific drawing method can be determined according to the actual application scene without limitation. Further, the application of decentering requires drawing a timing pattern of the two-dimensional code, wherein the timing pattern is two lines connecting three positioning patterns, and format information is added around the positioning patterns. Because the number of the positioning patterns is fixed to 3 and the size is fixed, the format information is also information for fixing 15bits, and the data in 5bits are arranged according to the sequence of the data bits in 5bits and the error correction bits in 10 bits; the data bits occupy 5bits: wherein 2bits are used to represent the error correction level used and 3bits are used to represent the Mask (Mask) class used; error correction bits account for 10bits: calculated mainly by BCH Code. To reduce the difficulty of image recognition after scanning, finally, an exclusive or XOR operation is required to be performed on 15bits and 101010000010010. Because there may be too many 0 values (e.g., error correction level of 00, mask of 000) in the original format information, making the format information all white would increase the difficulty of analyzing the image. Further, the region centering application can fill the obtained data codes and error correction codes into the rest part of the two-dimensional code, and the specific filling mode can be determined according to the actual application scene without limitation. For example, for a conventional module in a two-dimensional code, the order of arrangement of the conventional module (i.e., 8bits of data is all within two columns) should be from right to left, regardless of whether the filling direction of the data (data encoding and error correcting code) is up or down. Alternatively, the most significant bit (i.e., the 7 th bit) of each codeword should be placed in the first available bit. For the direction of upward fill, the most significant bit should occupy the lower right corner of the module; the most significant bit occupies the upper right of the module in the downward filling direction. If the previous module ends inside the column of the right module, the module becomes an irregular module and the highest position should be in the upper right corner when the original filling direction is upward, as compared to the conventional module, and becomes the lower left corner at this time. Alternatively, when two columns of a module encounter a horizontal boundary of an alignment pattern or timing pattern at the same time, it will continue above or below the pattern. Alternatively, when the module reaches the upper and lower boundaries of the region (including the upper and lower boundaries of the two-dimensional code, format information, version information, or separator), any remaining bits in the codeword will be filled in the next column to the left, and the filling direction is reversed. Alternatively, when the right column of the module encounters an alignment pattern, or encounters an area occupied by version information, the data bits continue to fill along a column beside the alignment pattern or version information and form an irregular module. If both next columns are available before the end of the current module fill, the most significant bit of the next codeword should be placed in the single column.
In some possible embodiments, after the two-dimensional code is generated according to the encrypted blockchain address, the decentralizing application may send the two-dimensional code and the public key of the first user node to the consensus nodes, so that each consensus node verifies whether the two-dimensional code matches the blockchain address obtained by the decentralizing application, and determines whether other nodes can access the target page through the two-dimensional code. Specifically, each consensus node may identify the two-dimensional code to obtain an encrypted blockchain address, decrypt the encrypted blockchain address by using the public key to obtain an unencrypted blockchain address and match the unencrypted blockchain address with the original blockchain address, if the two-dimensional code and the encrypted blockchain address are identical, it is indicated that the blockchain address obtained according to the two-dimensional code is the blockchain address corresponding to the page information of the target page, and at this time, the decentralizing application may broadcast the two-dimensional code in the blockchain, so that the second user node or other user nodes access the target page according to the two-dimensional code.
Referring to fig. 7, fig. 7 is another flow chart of a page access method of a decentralizing application according to an embodiment of the present application. The page access method of the decentralizing application shown in fig. 7 may include the following steps S701 to S706.
S701, the decentralizing application receives a target page sharing request sent by a first user node.
S702, the decentralizing application sends a target page sharing request to a consensus node in the blockchain, so that the consensus node determines whether the first user node has the sharing authority of the target page.
S703, when the first user node has the sharing right, the decentralizing application determines the blockchain address of the page information of the target page in the blockchain according to the page identification, and sends the blockchain address to the first user node so that the first user node signs the blockchain address according to the private key of the first user node to obtain the encrypted blockchain address.
S704, the decentralizing application acquires an encrypted blockchain address, generates a two-dimensional code according to the encrypted blockchain address, and broadcasts the two-dimensional code in the blockchain so that the second user node accesses the target page according to the two-dimensional code.
In some possible embodiments, the specific implementation manners of the steps S701 to S704 may be referred to the implementation manners shown in steps S201 to S202 in fig. 2, which are not described herein.
And S705, when an access request triggered when the second user node identifies the two-dimension code is received, the decentralizing application acquires the public key of the first user node, and decrypts the encrypted blockchain address according to the public key of the first user node to obtain the blockchain address.
In some possible implementations, the second user node may access the de-centralized application by identifying the two-dimensional code after acquiring the two-dimensional code broadcast in the blockchain. The second user node may directly obtain the two-dimensional code from the blockchain, or may directly identify the two-dimensional code from other nodes where the two-dimensional code has been obtained, for example, directly identify the two-dimensional code displayed by the B device through the a device, or directly identify the two-dimensional code stored in the B device through the a device, etc., where the specific implementation manner may be determined according to the actual application scenario, and the specific implementation manner is not limited herein. The two-dimensional code is obtained by the decentralization application according to the encrypted blockchain address, so that the second user node can only obtain the encrypted blockchain address when identifying the two-dimensional code, and can not obtain the unencrypted blockchain address through the encrypted blockchain address so as to access the target page through the unencrypted blockchain address. The second user node needs to send an access request to the decentralizing application when identifying the two-dimensional code to cause the decentralizing application to send the unencrypted blockchain address to the second user node. Specifically, when the decentralizing application receives an access request sent by the second user node, the decentralizing application may acquire the public key of the first user node to decrypt the encrypted blockchain address to obtain an unencrypted blockchain address.
S706, the decentralizing application sends the blockchain address to the second user node so that the second user node can acquire the page information of the target page according to the blockchain address and access the target page according to the page information.
In some possible implementations, after the un-encrypted blockchain address is obtained, the application may send the blockchain address to the second user node, so that the second user node may retrieve the page information of the target page of the un-centralized application from the blockchain address by invoking a smart contract. Further, the second user node can construct the target page according to the page information of the target page, so that access to the target page of the decentralizing application is realized. Optionally, the decentralizing application may also directly obtain the page information of the target page according to the blockchain address, and send the page information to the second user node, so that the second user node directly constructs the target page according to the page information, where the specific implementation manner may be determined according to the actual application scenario, and is not limited herein.
In some possible embodiments, the page information of the target page may include page configuration data of the target page and a target smart contract corresponding to the target page, where the target smart contract user implements various page functions of the target page (such as uploading information, sending a message, etc., which may be specifically determined according to an actual application scenario, and is not limited herein). After the decentralized application receives the access request triggered by the second user node and determines the blockchain address according to the public key of the first user node, the decentralized page can respectively acquire page configuration data and the target intelligent contract from the blockchain according to the blockchain address. At this time, the decentralizing application may configure the target page according to the page configuration data, and re-execute the target smart contract to determine whether the target smart contract matches the target page, i.e., verify whether the page function represented by the target smart contract is the page function corresponding to the target page. If the target intelligent contract is matched with the target page, namely the page function carried by the target intelligent contract is the page function corresponding to the target page, the decentralizing application sends an access permission notification to the second user node so that the second user builds the target page according to the page configuration data to realize the access to the target page.
In some possible embodiments, since the two-dimensional code is generated by the encrypted blockchain address and the encrypted blockchain address is encrypted by the private key of the first user node, after the second user node accesses the target page according to the two-dimensional code, the decentralized application may send access event information to the first user node to inform the second user that the target page is accessed by the two-dimensional code obtained by the page sharing request. On the other hand, after receiving the access event information sent by the decentralizing application, the first user node may send the corresponding data volume receiving address (such as an account, a wallet address, etc.) and the node information of the first user node to the decentralizing application, so that the decentralizing application may determine, according to the node information of the first user node, a preset data volume determining manner satisfied by the first user node to determine the transfer data volume that the first user node should receive, and send the transfer data volume to the data volume receiving address. In short, after the user b accesses a certain page of the decentralizing application through the two-dimensional code generated by the target page sharing request of the user a, the decentralizing application may award the user a certain amount of rewards to encourage the user a to share the decentralizing application or a certain page of the decentralizing application with other users for multiple times.
In the embodiment of the application, the decentralizing application can generate the two-dimension code according to the target page sharing request of the first user node, so that other user nodes access the target page of the decentralizing application according to the two-dimension code, and the access efficiency of the decentralizing application is improved. On the other hand, the decentralizing application can send the target page sharing request of the first user node to the consensus node to verify the sharing authority of the first user node, so that the application safety of the decentralizing application is improved to a certain extent. In addition, the decentralization application encrypts the blockchain address of the page information of the target page in the blockchain through the private key of the first user node, so that the two-dimensional code is shared by the first user node, the safety of the blockchain address can be improved, and the applicability is higher.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a page access device for a decentralizing application according to an embodiment of the present application. The device 1 provided by the embodiment of the application comprises:
The receiving module 10 is configured to receive a target page sharing request sent by a first user node, where the target page sharing request carries a page identifier of a target page;
The verification module 11 is configured to send the target page sharing request to a consensus node in a blockchain, so that the consensus node determines whether the first user node has the sharing authority of the target page;
A first determining module 12, configured to determine, when the first user node has the sharing right, a blockchain address of page information of the target page in the blockchain according to the page identifier, and send the blockchain address to the first user node, so that the first user node signs the blockchain address according to a private key of the first user node to obtain an encrypted blockchain address;
The first generating module 13 is configured to obtain the encrypted blockchain address, generate a two-dimensional code according to the encrypted blockchain address, and broadcast the two-dimensional code in the blockchain to enable the second user node to access the target page according to the two-dimensional code.
In some possible embodiments, the above-mentioned device 1 further comprises:
The first obtaining module 14 is further configured to obtain a public key of the first user node when receiving an access request triggered by the second user node when identifying the two-dimensional code, and decrypt the encrypted blockchain address according to the public key of the first user node to obtain the blockchain address;
The first sending module 15 is further configured to send the blockchain address to the second user node, so that the second user node obtains the page information of the target page according to the blockchain address and accesses the target page according to the page information.
In some possible embodiments, the page information includes page configuration data and a target smart contract; the above device 1 further comprises:
A second obtaining module 16, configured to obtain the page configuration data and the target smart contract according to the blockchain address;
A second generation module 17, configured to generate the target page according to the page configuration data, and execute the target smart contract to determine whether the target smart contract matches the target page;
The second sending module 18 is further configured to send an access permission notification to the second user node to enable the second user node to access the target page according to the page configuration data if the target smart contract matches the target page.
In some possible embodiments, the above-mentioned device 1 further comprises:
The third sending module 19 is further configured to send access event information to the first user node, so that the first user node sends a data amount receiving address and node information of the first user node, where the access event information is used to indicate that the second user node accesses the target page according to the two-dimensional code;
the second determining module 20 is further configured to determine a transfer data amount corresponding to the first user node according to the node information, and send the transfer data amount to the data amount receiving address.
In some possible embodiments, the first generating module 13 includes:
a first determining unit 131, configured to determine an index value of each character of the encrypted blockchain address, and determine a data encoding of the encrypted blockchain address according to the index value of each character;
A second determining unit 132 configured to determine an error correction level corresponding to the decentralizing application, and determine an error correction code of the data code according to the error correction level;
And a generating unit 133 for generating a two-dimensional code based on the data code and the error correction code.
In some possible embodiments, the first determining unit 131 includes:
A first determining subunit 1311, configured to determine, according to the index value of each of the characters, a character code of the encrypted blockchain address;
a second determining subunit 1312, configured to determine an ending symbol and a complement symbol of the character encoding;
A third determining subunit 1313, configured to sequentially concatenate the character code, the ending symbol, and the padding symbol to obtain a data code of the encrypted blockchain address.
In some possible embodiments, the first generating module 13 includes:
A transmitting unit 134, configured to transmit the two-dimensional code and the public key of the first user node to the consensus node, so that the consensus node determines whether the two-dimensional code matches the blockchain address according to the public key;
and a broadcasting unit 135, configured to broadcast the two-dimensional code in the blockchain if the two-dimensional code matches with the blockchain address, so that the second user node accesses the target page according to the two-dimensional code.
In a specific implementation, the device 1 may execute, through each functional module built in the device, an implementation manner provided by each step in fig. 2, fig. 5, and/or fig. 7, and specifically, the implementation manner provided by each step may be referred to, which is not described herein again.
In the embodiment of the application, the decentralizing application can generate the two-dimension code according to the target page sharing request of the first user node, so that other user nodes access the target page of the decentralizing application according to the two-dimension code, and the access efficiency of the decentralizing application is improved. On the other hand, the decentralizing application can send the target page sharing request of the first user node to the consensus node to verify the sharing authority of the first user node, so that the application safety of the decentralizing application is improved to a certain extent. In addition, the decentralization application encrypts the blockchain address of the page information of the target page in the blockchain through the private key of the first user node, so that the two-dimensional code is shared by the first user node, the safety of the blockchain address can be improved, and the applicability is higher.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an apparatus according to an embodiment of the present application. As shown in fig. 9, the apparatus 1000 in this embodiment may include: processor 1001, network interface 1004, and memory 1005, and in addition, the above device 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1004 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 9, an operating system, a network communication module, a user interface module, and a device control application may be included in a memory 1005, which is one type of computer-readable storage medium.
In the apparatus 1000 shown in fig. 9, the network interface 1004 may provide a network communication function; while user interface 1003 is primarily used as an interface for providing input to a user; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
receiving a target page sharing request sent by a first user node, wherein the target page sharing request carries a page identifier of a target page;
Sending the target page sharing request to a consensus node in a blockchain so that the consensus node determines whether the first user node has the sharing authority of the target page;
When the first user node has the sharing right, determining a blockchain address of page information of the target page in the blockchain according to the page identifier, and sending the blockchain address to the first user node so that the first user node signs the blockchain address according to a private key of the first user node to obtain an encrypted blockchain address;
And acquiring the encrypted block chain address, generating a two-dimensional code according to the encrypted block chain address, and broadcasting the two-dimensional code in the block chain so that a second user node accesses the target page according to the two-dimensional code.
In some possible embodiments, the processor 1001 is further configured to:
when an access request triggered when the second user node identifies the two-dimension code is received, acquiring a public key of the first user node, and decrypting the encrypted blockchain address according to the public key of the first user node to obtain the blockchain address;
And sending the block chain address to the second user node so that the second user node obtains the page information of the target page according to the block chain address and accesses the target page according to the page information.
In some possible embodiments, the page information includes page configuration data and a target smart contract; the processor 1001 is further configured to:
Acquiring the page configuration data and the target intelligent contract according to the block chain address;
Generating the target page according to the page configuration data, and executing the target intelligent contract to determine whether the target intelligent contract is matched with the target page;
And if the target intelligent contract is matched with the target page, sending an access permission notification to the second user node so that the second user node accesses the target page according to the page configuration data.
In some possible embodiments, the processor 1001 is further configured to:
transmitting access event information to the first user node so that the first user node transmits a data amount receiving address and node information of the first user node, wherein the access event information is used for explaining that the second user node accesses the target page according to the two-dimensional code;
And determining the transfer data quantity corresponding to the first user node according to the node information, and sending the transfer data quantity to the data quantity receiving address.
In some possible embodiments, the processor 1001 is configured to:
determining an index value of each character of the encryption block chain address, and determining a data code of the encryption block chain address according to the index value of each character;
Determining an error correction level corresponding to the de-centering application, and determining an error correction code of the data code according to the error correction level;
and generating a two-dimensional code according to the data code and the error correction code.
In some possible embodiments, the processor 1001 is configured to:
determining the character code of the encryption block chain address according to the index value of each character;
Determining the ending symbol and the filling symbol of the character coding;
and sequentially concatenating the character code, the ending symbol and the complement symbol to obtain the data code of the encrypted blockchain address.
In some possible embodiments, the processor 1001 is configured to:
Transmitting the two-dimensional code and the public key of the first user node to the consensus node so that the consensus node determines whether the two-dimensional code is matched with the blockchain address according to the public key;
And if the two-dimensional code is matched with the block chain address, broadcasting the two-dimensional code in the block chain so that a second user node accesses the target page according to the two-dimensional code.
It should be appreciated that in some possible embodiments, the processor 1001 may be a central processing unit (central processing unit, CPU), which may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application Specific Integrated Circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type.
In a specific implementation, the device 1000 may execute, through each functional module built in the device, an implementation provided by each step in fig. 2, fig. 5, and/or fig. 7, and specifically, the implementation provided by each step may be referred to, which is not described herein again.
In the embodiment of the application, the decentralizing application can generate the two-dimension code according to the target page sharing request of the first user node, so that other user nodes access the target page of the decentralizing application according to the two-dimension code, and the access efficiency of the decentralizing application is improved. On the other hand, the decentralizing application can send the target page sharing request of the first user node to the consensus node to verify the sharing authority of the first user node, so that the application safety of the decentralizing application is improved to a certain extent. In addition, the decentralization application encrypts the blockchain address of the page information of the target page in the blockchain through the private key of the first user node, so that the two-dimensional code is shared by the first user node, the safety of the blockchain address can be improved, and the applicability is higher.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored and executed by a processor to implement the method provided by each step in fig. 2, fig. 5, and/or fig. 7, and specifically refer to the implementation manner provided by each step, which is not described herein.
The computer readable storage medium may be an internal storage unit of the task processing device provided in any one of the foregoing embodiments, for example, a hard disk or a memory of an electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), or the like, which are provided on the electronic device. The computer readable storage medium may also include a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (randomaccess memory, RAM), or the like. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
The terms first, second and the like in the claims and in the description and drawings are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments. The term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (10)

1. A method for page access for a de-centralized application, the method comprising:
the method comprises the steps that an decentralized application receives a target page sharing request sent by a first user node, wherein the target page sharing request carries a page identifier of a target page;
The decentralizing application sends the target page sharing request to a consensus node in a blockchain so that the consensus node determines whether the first user node has the sharing authority of the target page or not;
When the first user node has the sharing right, the decentralizing application determines a blockchain address of page information of the target page in the blockchain according to the page identifier, and sends the blockchain address to the first user node so that the first user node signs the blockchain address according to a private key of the first user node to obtain an encrypted blockchain address;
The decentralizing application acquires the encrypted blockchain address, generates a two-dimensional code according to the encrypted blockchain address, and broadcasts the two-dimensional code in the blockchain so that a second user node accesses the target page according to the two-dimensional code.
2. The method according to claim 1, wherein the method further comprises:
When an access request triggered when the second user node identifies the two-dimension code is received, the decentralizing application obtains a public key of the first user node, and decrypts the encrypted blockchain address according to the public key of the first user node to obtain the blockchain address;
And the decentralizing application sends the blockchain address to the second user node so that the second user node obtains the page information of the target page according to the blockchain address and accesses the target page according to the page information.
3. The method of claim 2, wherein the page information includes page configuration data and a target smart contract; the method further comprises the steps of:
the decentralizing application acquires the page configuration data and the target intelligent contract according to the blockchain address;
the decentralizing application generates the target page according to the page configuration data, and executes the target intelligent contract to determine whether the target intelligent contract is matched with the target page;
And if the target intelligent contract is matched with the target page, the decentralization application sends an access permission notification to the second user node so that the second user node accesses the target page according to the page configuration data.
4. The method according to claim 2, wherein the method further comprises:
The decentralizing application sends access event information to the first user node so that the first user node sends a data volume receiving address and node information of the first user node, wherein the access event information is used for explaining that the second user node accesses the target page according to the two-dimensional code;
And the decentralizing application determines the transfer data volume corresponding to the first user node according to the node information, and sends the transfer data volume to the data volume receiving address.
5. The method of claim 1, wherein the generating a two-dimensional code from the encrypted blockchain address comprises:
the decentralization application determines an index value of each character of the encryption blockchain address, and determines a data code of the encryption blockchain address according to the index value of each character;
The decentralizing application determines an error correction level corresponding to the decentralizing application, and determines an error correction code of the data code according to the error correction level;
And the decentralizing application generates a two-dimensional code according to the data code and the error correction code.
6. The method of claim 5, wherein said determining the data encoding of the encrypted blockchain address based on the index value for each character comprises:
The decentralization application determines the character code of the encryption blockchain address according to the index value of each character;
the decentralizing application determines an ending symbol and a complement symbol of the character code;
And the decentralizing application sequentially connects the character code, the ending symbol and the complement symbol in series to obtain the data code of the encrypted blockchain address.
7. The method of claim 1, wherein broadcasting the two-dimensional code in the blockchain to cause a second user node to access the target page according to the two-dimensional code comprises:
The centralized application sends the two-dimensional code and the public key of the first user node to the consensus node so that the consensus node determines whether the two-dimensional code is matched with the blockchain address according to the public key;
And if the two-dimensional code is matched with the block chain address, broadcasting the two-dimensional code in the block chain by the decentralization application so that a second user node accesses the target page according to the two-dimensional code.
8. A page access apparatus for a de-centralized application, the apparatus comprising:
The receiving module is used for receiving a target page sharing request sent by the first user node, wherein the target page sharing request carries a page identifier of a target page;
the verification module is used for sending the target page sharing request to a consensus node in a blockchain so that the consensus node can determine whether the first user node has the sharing authority of the target page or not;
The first determining module is used for determining a blockchain address of the page information of the target page in the blockchain according to the page identifier when the first user node has the sharing right, and sending the blockchain address to the first user node so that the first user node signs the blockchain address according to the private key of the first user node to obtain an encrypted blockchain address;
The first generation module is used for acquiring the encrypted blockchain address, generating a two-dimensional code according to the encrypted blockchain address, and broadcasting the two-dimensional code in the blockchain so that the second user node accesses the target page according to the two-dimensional code.
9. An apparatus comprising a processor and a memory, the processor and the memory being interconnected;
The memory is for storing a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which is executed by a processor to implement the method of any one of claims 1 to 7.
CN202010100327.1A 2020-02-18 2020-02-18 Page access method, device and equipment for decentralizing application and storage medium Active CN111309808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010100327.1A CN111309808B (en) 2020-02-18 2020-02-18 Page access method, device and equipment for decentralizing application and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010100327.1A CN111309808B (en) 2020-02-18 2020-02-18 Page access method, device and equipment for decentralizing application and storage medium

Publications (2)

Publication Number Publication Date
CN111309808A CN111309808A (en) 2020-06-19
CN111309808B true CN111309808B (en) 2024-07-09

Family

ID=71154709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010100327.1A Active CN111309808B (en) 2020-02-18 2020-02-18 Page access method, device and equipment for decentralizing application and storage medium

Country Status (1)

Country Link
CN (1) CN111309808B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984735A (en) * 2020-09-03 2020-11-24 深圳壹账通智能科技有限公司 Data archiving method and device, electronic equipment and storage medium
CN112650954B (en) * 2020-12-30 2023-09-22 杭州趣链科技有限公司 Block chain data sharing method, device, equipment and storage medium
CN112765630A (en) * 2021-01-26 2021-05-07 卓望数码技术(深圳)有限公司 Application sharing method, application activation method, electronic device and storage medium
CN114401100A (en) * 2021-10-02 2022-04-26 杭州荔藤网络科技有限公司 Cross-application platform login method and system for block chain account
CN114422132B (en) * 2022-03-29 2022-08-26 天聚地合(苏州)科技股份有限公司 Account login method and system based on block chain
CN116132166A (en) * 2023-02-03 2023-05-16 网易(杭州)网络有限公司 Communication method, device, equipment and storage medium based on block chain

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460515A (en) * 2018-09-26 2019-03-12 百度在线网络技术(北京)有限公司 Search data processing method and device based on block chain
CN110266817A (en) * 2019-07-15 2019-09-20 武汉天喻信息产业股份有限公司 Across channel data sharing model, sharing method and device based on block chain

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833353A (en) * 2012-09-19 2012-12-19 腾讯科技(深圳)有限公司 Resource sharing method and user equipment
CN110365491B (en) * 2017-03-30 2021-03-26 腾讯科技(深圳)有限公司 Service processing method, device, equipment, storage medium and data sharing system
US10594488B2 (en) * 2017-08-05 2020-03-17 Proclus Technologies Limited Method and system for implementing automatic transaction rebroadcasting for transient blockchains
CN107862215B (en) * 2017-09-29 2020-10-16 创新先进技术有限公司 Data storage method, data query method and device
CN110336832B (en) * 2019-07-24 2023-11-03 深圳传音控股股份有限公司 Information encryption and decryption methods, devices and terminals

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460515A (en) * 2018-09-26 2019-03-12 百度在线网络技术(北京)有限公司 Search data processing method and device based on block chain
CN110266817A (en) * 2019-07-15 2019-09-20 武汉天喻信息产业股份有限公司 Across channel data sharing model, sharing method and device based on block chain

Also Published As

Publication number Publication date
CN111309808A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN111309808B (en) Page access method, device and equipment for decentralizing application and storage medium
CN106610995B (en) Method, device and system for creating ciphertext index
CN101218588B (en) Attachment device and arrangement with authenticable firmware and method for authenticating the firmware
CN105447546A (en) Two-dimensional code capable of being embedded with large-ratio graph as well as coding and decoding method and device therefor
CN114036565A (en) Private information retrieval system and private information retrieval method
US11303617B2 (en) Methods and apparatuses for oblivious transfer using trusted environment
CN112235104B (en) Data encryption transmission method, system, terminal and storage medium
KR20050083819A (en) Message authentication code based on error correcting code
CN112035827A (en) Cipher data processing method, device, equipment and readable storage medium
CN113449338B (en) Information encryption storage method and system based on block chain
KR102421567B1 (en) Internet access management service server capable of providing internet access management service based on terminal grouping and operating method thereof
WO2021158953A1 (en) Generating emoji sequence identifications to identify wallet addresses for blockchain wallets
CN108400979A (en) Communication means and electronic equipment applied to client and server
CN110210211A (en) A kind of method of data protection and calculate equipment
CN115603907A (en) Method, device, equipment and storage medium for encrypting storage data
CN115580477A (en) File encryption method and decryption method based on AES encryption and related equipment
CN108629391B (en) Color code encoding and decoding method, system and equipment
WO2024113874A1 (en) Encoding method and decoding method for annular 2-dimensional bar code
CN105718978B (en) QR code generation method and device, and decoding method and device
US20240086670A1 (en) Methods for constructing, generating, and reading dot-matrix code, dot-matrix code generating and reading terminals, and dot-matrix code system
CN109413077B (en) JSON message data receiving and sending method and device and electronic equipment
CN109214488B (en) Method and system for information transmission based on graphic coded data
GB2446420A (en) Error correction of passwords using Galois Field elements
CN113824727B (en) Webpage login verification method and device, server and storage medium
CN105553676B (en) With the Beidou serial port communication method of equipment authentication function and transmission, reception device

Legal Events

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