Data processing method and device, equipment, medium and program product

Through the direct connection communication protocol, the browser directly parses the web page URL and conducts direct access to the blockchain network, which solves the problems of high cost and security risk for users to access on-chain data in the blockchain network, and achieves a convenient and safe Data access.

CN118779548APending Publication Date: 2024-10-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310398610.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-07
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

In the existing technology, users' access to on-chain data in the blockchain network has problems such as high cost, error-proneness and security risks. Especially when using the centralized service of the blockchain browser, the on-chain data is stored off-chain. Vulnerable to hacking or tampering.

Method used

By designing a new direct connection communication protocol, the browser can directly parse the web page URL entered by the user, obtain the data address of the data on the chain, and directly access the blockchain network based on this address to achieve decentralized communication. , to avoid security risks when data is stored off-chain.

Benefits of technology

It reduces user learning costs, improves access efficiency and security, avoids the risk of hacker attacks or tampering when on-chain data is stored off-chain, and enables users to directly access the blockchain network with convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779548A_ABST
    Figure CN118779548A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, equipment, a medium and a program product. The method comprises the steps that a webpage website in a browser is obtained; analyzing the website of the webpage according to the specification of a direct connection communication protocol to obtain the data address of the data on the link; accessing a block chain network based on the data address, and obtaining on-chain data from the block chain network; and rendering and displaying a webpage interface in the browser, the webpage interface including the on-chain data. By adopting the embodiment of the invention, the browser can be directly connected with the block chain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, in particular to the field of blockchain technology, and specifically to a data processing method, a data processing device, a computer equipment, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the advantages of blockchain such as permanent data storage and non-tamperability, people are increasingly inclined to store data on the blockchain.

[0003] Currently, users can access on-chain data in blockchain networks in the following ways. Among them: ① Users build nodes themselves or use services provided by node providers (such as cli command line interface or interface) to access on-chain data in blockchain networks; however, this requires users to learn professional knowledge of blockchain technology, resulting in high cost of use and high error rate. ② Access on-chain data in blockchain networks through blockchain browsers; however, blockchain browsers currently provide users with centralized services, such as synchronizing on-chain data to off-chain storage (such as storage in database mysql), and making off-chain stored data into http services for users to access, resulting in the risk of on-chain data being attacked or tampered with by hackers to provide malicious display content when stored off-chain. Therefore, how to help users conveniently access on-chain data in blockchain networks has become a research hotspot. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus, device, medium and program product, which can realize direct connection of a browser to a blockchain network.

[0005] On the one hand, an embodiment of the present application provides a data processing method, the method comprising:

[0006] Get the webpage URL in the browser. The webpage URL is used to request access to the on-chain data in the blockchain network. The webpage URL follows the specifications of the direct communication protocol, which is a protocol that enables the browser to access the blockchain network.

[0007] Parse the webpage URL according to the direct communication protocol specification to obtain the data address of the on-chain data; the data address is used to indicate the storage location of the on-chain data in the blockchain network;

[0008] Access the blockchain network based on the data address and obtain on-chain data from the blockchain network; and,

[0009] Render and display a web page interface in a browser, wherein the web page interface includes the on-chain data.

[0010] On the other hand, an embodiment of the present application provides a data processing device, the device comprising:

[0011] An acquisition unit, used to acquire a webpage URL in a browser, where the webpage URL is used to request access to on-chain data in a blockchain network; the webpage URL complies with the specification of a direct communication protocol, where the direct communication protocol is a protocol that enables a browser to access a blockchain network;

[0012] A processing unit, used to parse the webpage URL according to the specification of the direct communication protocol to obtain the data address of the on-chain data; the data address is used to indicate the storage location of the on-chain data in the blockchain network;

[0013] The processing unit is further used to access the blockchain network based on the data address and obtain the on-chain data from the blockchain network; and

[0014] The processing unit is also used to render and display a web page interface in a browser, where the web page interface contains the on-chain data.

[0015] In one implementation, the on-chain data is a block or a transaction in the blockchain network; when the on-chain data is a block, the data address is the block height of the block; when the on-chain data is a transaction, the data address is the hash address of the transaction; the processing unit is used to parse the webpage URL according to the specification of the direct communication protocol, and when obtaining the data address of the on-chain data, it is specifically used to:

[0016] According to the specifications of the direct communication protocol, the web page URL is resolved to obtain the data address of the on-chain data contained in the web page URL.

[0017] In one implementation, the direct communication protocol is customized with reference to the network protocol of the blockchain network; the blockchain network deploys a first transmission interface for the blockchain in the blockchain network according to the network protocol; the processing unit is used to access the blockchain network based on the data address and obtain on-chain data from the blockchain network, specifically for:

[0018] Generate a data request packet according to the data address;

[0019] Sending the data request packet to the blockchain network, so that the blockchain network returns the on-chain data on the blockchain through the first transmission interface in response to the data request packet;

[0020] The on-chain data returned by the blockchain network is received through the first transmission interface.

[0021] In one implementation, the on-chain data is a smart contract of a business; the data address is the contract address of the smart contract; the processing unit is used to parse the webpage URL according to the specification of the direct communication protocol, and when the data address of the on-chain data is obtained, it is specifically used to:

[0022] According to the specifications of the direct communication protocol, the webpage URL is resolved to obtain the domain name in the webpage URL; there is a mapping relationship between the domain name and the contract address of the smart contract;

[0023] According to the mapping relationship between the domain name and the contract address of the smart contract, the contract address of the smart contract is obtained.

[0024] In one implementation, the processing unit is used to obtain the contract address of the smart contract according to the mapping relationship between the domain name and the contract address of the smart contract, specifically to:

[0025] Sending the domain name to the blockchain network so that the blockchain network searches for the contract address corresponding to the domain name from the domain name service based on the domain name; wherein the domain name service stores the domain name and the contract address in association;

[0026] Receive the contract address corresponding to the domain name returned by the blockchain network.

[0027] In one implementation, the domain name and contract address of the smart contract of one or more services are cached in the cache space of the browser; the processing unit is used to obtain the contract address of the smart contract according to the corresponding relationship between the domain name and the contract address of the smart contract, specifically for:

[0028] According to the domain name corresponding to the contract address of the smart contract, search for the contract address cached in association with the domain name in the cache space;

[0029] If the cache space contains the contract address cached in association with the domain name, the contract address of the smart contract is obtained from the cache space.

[0030] In one implementation, a second transmission interface is deployed in the smart contract of the business according to the direct communication protocol; the processing unit is used to access the blockchain network based on the data address and obtain the on-chain data from the blockchain network, specifically for:

[0031] Generate data access request based on contract address;

[0032] Sending the data access request to the blockchain network, so that the blockchain network returns the smart contract of the business through the second transmission interface in response to the data access request;

[0033] The smart contract of the business returned by the blockchain network is received through the second transmission interface.

[0034] In one implementation, the processing unit is further configured to:

[0035] If there is a write operation for business data in the web page interface, the write web page URL is obtained, and the write web page URL is written by the uplink interface according to the direct connection communication protocol and business data;

[0036] Perform data analysis on the written webpage URL according to the direct communication protocol to obtain the data analysis result, and generate the transaction to be uploaded to the chain based on the data analysis result; the transaction to be uploaded to the chain includes business data;

[0037] Send the transaction to be put on the chain to the blockchain network, so that the blockchain network can put the transaction on the chain;

[0038] When the successful chaining prompt information returned by the blockchain network is received, the second transmission interface is called to receive business data from the blockchain network, and a new web page interface is rendered and displayed according to the business data.

[0039] In one implementation, the processing unit is used to generate a transaction to be put on the chain based on the data analysis result, specifically to:

[0040] Generate a transaction to be signed based on the data analysis results;

[0041] Send the transaction to be signed to the blockchain wallet, so that the blockchain wallet uses the object signature to sign the transaction to be signed and generates a transaction to be uploaded to the chain when the signature operation is detected;

[0042] Get the transactions to be uploaded from the blockchain wallet.

[0043] In one implementation, the processing unit is further configured to:

[0044] If there is a data query operation in the web page interface, the query web page URL is obtained. The query web page URL is written by the uplink interface according to the direct connection communication protocol and the business data to be queried;

[0045] Perform data analysis on the query webpage URL according to the direct communication protocol to obtain a data analysis result;

[0046] Calling the second transmission interface and receiving the business data to be queried from the blockchain network based on the data parsing result;

[0047] Render and display a new web page interface based on business data.

[0048] In one implementation, the processing unit, when used to obtain the URL of a web page in a browser, is specifically used to:

[0049] Display the browser's service interface;

[0050] According to the URL writing operation, the written webpage URL is displayed in the service interface;

[0051] Wherein, the service interface includes one or more candidate web page URLs, and the URL writing operation includes: a selection operation or an adjustment operation of any web page URL among the one or more candidate web page URLs;

[0052] The service interface includes an address input area, and the URL writing operation includes an input operation of inputting a web page URL in the address input area.

[0053] In one implementation, the browser is an open source application running on a terminal device; the browser does not need to build a backend server, and the browser accesses the on-chain data in the blockchain network through a direct connection.

[0054] On the other hand, an embodiment of the present application provides a computer device, the device comprising:

[0055] A processor for loading and executing computer programs;

[0056] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data processing method is implemented.

[0057] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for being loaded by a processor and executing the above-mentioned data processing method.

[0058] On the other hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and when the computer instructions are executed by the processor, the above-mentioned data processing method is implemented.

[0059] In the embodiment of the present application, the browser can obtain the webpage URL for accessing the on-chain data in the blockchain network, and the webpage URL follows the direct communication protocol, and the direct communication protocol is a protocol that enables the browser to access the blockchain network; then, the webpage URL can be parsed according to the specification of the direct communication protocol to obtain the data address of the on-chain data, so that the browser can access the blockchain network based on the data address, and obtain the on-chain data from the blockchain network, and render and display the webpage URL containing the on-chain data in the browser. It can be seen that the embodiment of the present application designs a new direct communication protocol, and the browser can parse the webpage URL for accessing the blockchain network through the direct communication protocol; that is, the browser can directly parse the way users access the on-chain data in the blockchain network through the direct communication protocol; so that the browser can directly connect to the blockchain network based on the data address of the on-chain data obtained by parsing, realize the decentralization of communication between the browser end and the blockchain network end, achieve the effect of users directly accessing the blockchain network, ensure communication security, and improve access efficiency to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0061] Figure 1a is a schematic diagram of a blockchain provided by an exemplary embodiment of the present application;

[0062] Figure 1b is a schematic diagram of a blockchain network provided by an exemplary embodiment of the present application;

[0063] Figure 2 is a schematic diagram of the architecture of a data processing system provided by an exemplary embodiment of the present application;

[0064] Figure 3 It is a flowchart of a data processing method provided by an exemplary embodiment of the present application;

[0065] Figure 4 This is a schematic diagram of a process for obtaining on-chain data provided by an exemplary embodiment of the present application;

[0066] Figure 5 This is another flowchart of obtaining on-chain data provided by an exemplary embodiment of the present application;

[0067] Figure 6 is a flowchart of another data processing method provided by an exemplary embodiment of the present application;

[0068] Figure 7 It is a schematic diagram of inputting a webpage URL in a service interface provided by an exemplary embodiment of the present application;

[0069] Figure 8 It is another schematic diagram of inputting a webpage URL in a service interface provided by an exemplary embodiment of the present application;

[0070] Fig. 9 It is another schematic diagram of inputting a webpage URL in a service interface provided by an exemplary embodiment of the present application;

[0071] Fig.10 It is a schematic diagram of triggering display of candidate web page URLs provided by an exemplary embodiment of the present application;

[0072] Fig.11a It is a flowchart of writing business data in a browser provided by an exemplary embodiment of the present application;

[0073] Fig.11b This is a schematic diagram of an interface for writing business data in a browser provided by an exemplary embodiment of the present application;

[0074] Fig.12 It is a flowchart of reading business data in a browser provided by an exemplary embodiment of the present application;

[0075] Fig.13 is a structural schematic diagram of a data processing device provided by an exemplary embodiment of the present application;

[0076] Fig.14 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0078] The embodiment of the present application provides a data processing solution, which mainly connects the blockchain network directly through the browser to achieve direct access to the on-chain data in the blockchain network. The following is a brief description of the technical terms and concepts involved in the embodiment of the present application, including:

[0079] 1. Blockchain technology.

[0080] Blockchain is the foundation of blockchain technology. Specifically, blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. A schematic diagram of the structure of a blockchain can be found in Figure 1a ,like Figure 1aAs shown, blockchain 101 is composed of multiple blocks. The first block of the blockchain is called a genesis block (which can be referred to as a genesis block for short). The genesis block includes a block header and a block body. The block header stores input information feature values, version numbers, timestamps, and difficulty values, and the block body stores input information. The next block of the genesis block uses the genesis block as a parent block. The next block also includes a block header and a block body. The block header stores input information feature values ​​of the current block, block header feature values, version numbers, timestamps, and difficulty values ​​of the parent block, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, thereby ensuring the security of the input information in the block.

[0081] The blockchain can be maintained by the blockchain nodes contained in the blockchain network. The blockchain network can be understood as a data sharing system, which refers to a system for sharing data between blockchain nodes. An exemplary structure of the data sharing system can be found in Figure 1b ;like Figure 1b As shown, the data sharing system may include multiple blockchain nodes 101, each of which may be a server connected to the blockchain network, or a terminal connected to the blockchain network (such as a client running in the terminal), and the specific form of the blockchain node 101 is not limited here. Each blockchain node 101 in the blockchain network has a node identifier corresponding to it, and each blockchain node 101 in the blockchain network can store the node identifiers of other blockchain nodes 101 in the blockchain network, so that the generated blocks can be broadcast to other blockchain nodes 101 in the data sharing system according to the node identifiers of other blockchain nodes 101, so as to realize the distributed storage of the data contained in the block in the blockchain network, and ensure the data is tamper-proof, non-replicable and permanently stored.

[0082] Based on the above brief introduction to blockchain and blockchain network, it is also necessary to explain that:

[0083] (1) When you want to implement a certain business on a blockchain network, you must comply with smart contracts. Smart contracts can refer to: a digital protocol that deploys the protocol specifications required to execute the business in the form of code on the blockchain network; specifically, the smart contract is deployed on the blockchain nodes in the blockchain network, so that the smart contract is run through the blockchain nodes to implement the business corresponding to the smart contract. In more detail, a smart contract is a piece of on-chain code. The publisher (such as the business party of the business corresponding to the smart contract) puts it on the chain, and each blockchain node will run the code by consensus to implement the smart contract on the chain, so as to implement the business corresponding to the smart contract on the chain; for example, writing to a smart contract is an on-chain transaction, and each blockchain node will receive this transaction through P2P broadcast and obtain the same status, so when querying the smart contract, the results of each node are consistent. For example, the business corresponding to the smart contract is a transaction. At this time, the smart contract contains the business logic about the transaction business, such as the smart contract includes: querying the logistics status of the goods purchased by the consumer, and transferring the consumer's electronic resources (such as resources used for commodity transactions on the Internet) to the merchant's address after the consumer signs for the goods; then, after the consumer has signed for the goods, the smart contract can be run (specifically, the code for running the smart contract) to transfer the consumer's electronic resources (such as resources used for commodity transactions on the Internet) to the merchant's address. Of course, the above is only an exemplary application of a smart contract given in the embodiment of this application.

[0084] (2) To ensure the security of assets in the blockchain network and implement transaction signatures or decryption, one also relies on the blockchain wallet in blockchain technology. A blockchain wallet is a digital wallet based on blockchain technology, which can specifically refer to a software program or hardware device used to store encrypted assets. In terms of form, a blockchain wallet is similar to an online bank account and can be used to store the user's private key in the blockchain network. The user's identity is identified on the blockchain by the private key, and the user's assets are managed by the private key. In addition, for operations such as the transfer, destruction, and transfer of digital assets, only by signing and confirming the operation with the user's private key, the correct transaction blockchain will be executed. The forged signature blockchain will be rejected and prompted to fail, thereby ensuring the safe storage, transfer, and use of digital assets on the blockchain.

[0085] 2. Blockchain browser.

[0086] The blockchain browser is the main window for visualizing the on-chain data in the blockchain network. The blockchain browser can record and count information such as blocks, transactions, addresses, and smart contracts of businesses in the blockchain network; users can obtain on-chain data in the blockchain network through the blockchain browser, and realize the detection (such as real-time observation), tracing and visualization of on-chain data. For example, investors can query the active addresses and / or asset changes of digital assets through the blockchain browser. For another example, if the user wants to trace the historical process of a transaction, he can query the past data through the blockchain browser and clearly browse the on-chain transaction path of a transaction through the blockchain browser.

[0087] Based on the above introduction to blockchain, blockchain network and blockchain browser, the embodiment of the present application proposes a data processing scheme. The scheme designs a new direct communication protocol and blockchain browser (which can be referred to as a browser in the embodiment of the present application). The direct communication protocol is a protocol that enables the browser to directly access the blockchain network. Specifically, the direct communication protocol can be used by the browser to identify the web page URL entered by the user in the browser to parse the user's access to the on-chain data in the blockchain network, so as to achieve the effect of the browser directly connecting to the blockchain network; specifically, the user directly accesses the on-chain data in the blockchain network through the browser, making the access process of the on-chain data completely transparent.

[0088] The general principle of this scheme may include: when a user has a need to access the on-chain data in the blockchain network, the webpage URL for requesting access to the on-chain data in the blockchain network can be entered in the browser, and the webpage URL follows the specifications of the direct communication protocol; the direct communication protocol is customized by the embodiment of the present application with reference to the network protocol in the blockchain network, so that the browser can access the protocol of the blockchain network. Then, the browser can parse the webpage URL according to the specifications of the direct communication protocol, thereby parsing the data address of the on-chain data, so that the browser can access the blockchain network based on the data address of the on-chain data, and obtain the on-chain data from the blockchain network. Finally, the browser can render and display a webpage interface, which contains the on-chain data that the user wants to access, so as to realize the visual display of the on-chain data in the blockchain network in the browser.

[0089] In order to better understand the data processing scheme proposed in the embodiment of the present application, Figure 2 An exemplary data processing system is given; Figure 2 As shown, the data processing system includes a terminal 201 and a server 202. The embodiment of the present application does not limit the number and type of the terminal 201 and the server 202, which is described here. The computer equipment involved in the data processing system is described below, wherein:

[0090] ①Terminal 201 may refer to: a device with a browser mentioned in the embodiment of the present application deployed. The terminal 201 may be a device independent of the blockchain network; the terminal 201 may include but is not limited to: smart phones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, mobile Internet devices (Mobile Internet Devices, referred to as MID), smart TVs, vehicle-mounted devices, head-mounted devices and other terminal devices. Among them, the browser may specifically be an open source application or client running in the terminal device; the browser does not need to build a backend server, and any user can download the installation package of the client, compile and install it in the terminal device, so that the browser installed in the terminal device can access the on-chain data in the blockchain network through a direct connection, so that all on-chain asset data on the blockchain are owned by the user, and the on-chain data is prevented from being attacked or tampered with by hackers to provide malicious display content, and the security of the on-chain data is improved. ②Server 202 may refer to: a blockchain node device (or simply a blockchain node) in the blockchain network; the blockchain node device maintains a blockchain related to the blockchain network, and the blockchain stores on-chain data.

[0091] The data processing solution provided in the embodiment of the present application can be Figure 2 The data processing system shown in the figure is executed by at least one of the terminal 201 and the server 202, specifically, by at least one of the browser running in the terminal 201 and the blockchain node (i.e., the server 202) in the blockchain network. Figure 2 Taking the data processing scheme jointly executed by the terminal 201 and the server 202 as an example, the general implementation process of a user inputting a webpage URL in a browser and obtaining on-chain data from the blockchain network based on the webpage URL is introduced. Figure 2 As shown, when a user has a need to access on-chain data in a blockchain network, he can open the installed browser in terminal 201, and the service interface provided by the browser is displayed on the display screen in terminal 201. Then, the user can enter the webpage URL for requesting access to on-chain data in the service interface, such as Figure 2The webpage URL entered in the service interface is blockchain: / / blog.eth, indicating that the user wants to request access to the blog-related data stored in the blockchain network. Then, the browser will parse the webpage URL entered in the service interface in a direct communication protocol similar to parsing a hypertext link (such as an http link) to parse the relevant meaning of the webpage URL. For example, the meaning of the above webpage URL blockchain: / / blog.eth can be roughly expressed as: querying the blog-related data stored in the blockchain network. Subsequently, the browser can communicate data with the blockchain network (specifically, the blockchain node device in the blockchain network) based on the parsing result of the webpage URL, so as to return the on-chain data requested by the webpage URL from the blockchain network through the interface, and render and display the on-chain data to output the webpage interface.

[0092] It should be noted that Figure 2 The architecture of the data processing system shown is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. It is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems. In addition, when the embodiment of the present application is applied to a specific product or technology, such as before the user uploads the data to the blockchain through the browser, it is inevitable to obtain the user's data (such as a blockchain wallet), so it is necessary to obtain the user's permission or consent, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0093] In summary, the embodiment of the present application provides a new direct communication protocol and a new browser, which can parse the request for accessing the web address of the blockchain network according to the new direct communication protocol, thereby realizing the decentralization of communication between the browser and the blockchain network. On the one hand, compared with the development of blockchain nodes by users to access the on-chain data in the blockchain network, users can directly enter the web address of the request to access the on-chain data, without the need for users to learn professional knowledge, and can generate the web address according to the set domain name or link, effectively reducing the cost of user learning and use. On the other hand, compared with the on-chain data downloaded from the blockchain network through the database cache, the communication method of the browser and the blockchain network directly connected in this scheme makes the access process of the on-chain data more transparent, effectively avoiding the on-chain data from being hacked or tampered with during the caching process, and ensuring the security of communication.

[0094] Based on the data processing scheme described above, the embodiment of the present application proposes a more detailed data processing method. The data processing method proposed in the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings.

[0095] Figure 3 A flow chart of a data processing method provided by an exemplary embodiment of the present application is shown; the data processing method can be executed by a computer device, such as a computer device for Figure 2 In the terminal of the system shown, the data processing method may include but is not limited to steps S301-S304:

[0096] S301: Obtain the URL of a web page in a browser.

[0097] The webpage URL in the browser is the Uniform Resource Locator (URL) of the on-chain data to be accessed in the blockchain network, where the Uniform Resource Locator can be directed to a certain data on the Internet (specifically, the on-chain data in the blockchain network in the embodiment of the present application). In the specific implementation, when the user wants to access a certain on-chain data in the blockchain network, the webpage URL pointing to the certain on-chain data can be entered in the browser, and the webpage URL is used to request access to the on-chain data in the blockchain network; that is, the webpage URL in the browser is determined by the user and is used to request access to the link of the on-chain data in the blockchain network. In addition, in order for the browser to be able to identify and parse the webpage URL, the writing of the webpage URL must also follow the specifications of the direct communication protocol provided in the embodiment of the present application.

[0098] The URL protocol format of the webpage address that complies with the direct communication protocol provided in the embodiment of the present application can be defined as: blockchain: / / function point (xx.eth / block / tx) / (read / write) / params. Among them:

[0099] ①Blockchain is a direct communication protocol defined in the embodiment of the present application with reference to the network protocol in the blockchain network (such as the P2P (peer-to-peer) protocol). By defining the direct communication protocol with reference to the network protocol in the blockchain network, the communication data format between the customized direct communication protocol and the blockchain network can be kept consistent, so that the direct communication protocol can access the blockchain network.

[0100] ② Function point can refer to the identifier of the on-chain data that the user wants to access in the blockchain network. In the embodiment of the present application, the on-chain data may include but is not limited to: smart contracts, blocks and transactions of the business. It is worth noting that in order for the browser to be able to visually display the on-chain data, for the browser, the information received from the blockchain network is actually the front-end script file corresponding to the on-chain data, that is, the on-chain data involved in the embodiment of the present application is essentially the front-end script file corresponding to the smart contract of the business, the front-end script file corresponding to the block, and the front-end script file corresponding to the transaction. Among them, the front-end script file or the front-end script code is a code written in hypertext mark-up language (html), which is a standard language for making Internet interfaces; only after the browser obtains the front-end script file, can it parse the front-end script file and display the data in a visual form.

[0101] Among them, the smart contract of the business can refer to a piece of code containing the business logic of the business. By executing the smart contract, the relevant logic of the business can be realized, such as displaying the business data of the business. The function points of the above-mentioned on-chain data are introduced below, where: the function point xx.eth is the domain name of the business xx; since the data address of the on-chain data in the blockchain network is often a long string of characters (such as numbers and characters), it is not convenient to remember and it is not easy for users to understand the storage location and nature of the on-chain data, so the domain name is supported to represent the data address, and the domain name and the data address are mapped to each other through the domain name service, so that users can access the on-chain data in the blockchain network by memorizing or querying the domain name, instead of remembering the data address that can be directly read by the computer device, which greatly facilitates the way users access the on-chain data. The function point block represents the block; if the webpage URL in the browser contains the function point block, it means that the user wants to access the block in the blockchain network. The function point tx represents the transaction; if the webpage URL in the browser contains the function point tx, it means that the user wants to access a transaction in the blockchain network.

[0102] ③The read / write in the protocol format indicates the access method for on-chain data. If the webpage URL in the browser contains "read", it means that the user wants to read the on-chain data; further, if the webpage URL also contains the function point xx.eth, that is, the webpage URL can be expressed as: blockchain: / / xx.eth / read, the meaning of this webpage URL is: read the business logic of the on-chain data "business xx's smart contract", specifically through the domain name "xx.eth" of business xx to realize the reading of the business logic of business xx. Similarly, if the webpage URL in the browser contains "write", it means that the user wants to write data in the on-chain data; further, if the webpage URL also contains the function point xx.eth, that is, the webpage URL can be expressed as: blockchain: / / xx.eth / write, the meaning of this webpage URL is: call the on-chain data "business xx's smart contract" to perform a write operation to realize writing data in the smart contract of business xx.

[0103] ④ Params in the protocol format indicates the method and parameters that the user wants to call. Since the method and parameters are often long serialized data, params can be used instead in the web page address.

[0104] It should be understood that the above is only an exemplary definition of the web page URL protocol format; in actual applications, the protocol format can be adaptively changed; for example, when accessing a blog's smart contract, you only want to query the blog's main interface (such as the public interface) and do not want to write or read data. At this time, the web page URL can be expressed as: blockchain: / / blog.eth, and it can be seen that the web page URL does not contain (read / write) and params at this time; the embodiment of the present application does not limit the specific format of the web page URL.

[0105] S302: Parse the webpage URL according to the specification of the direct communication protocol to obtain the data address of the on-chain data.

[0106] S303: Access the blockchain network based on the data address and obtain the on-chain data from the blockchain network.

[0107] In steps S302-S303, the user writes the webpage URL for requesting on-chain data based on the definition of the webpage URL protocol format shown in the aforementioned step S301, and then inputs the webpage URL into the browser. In this way, the browser can parse the webpage URL according to the direct communication protocol, access the blockchain network according to the data address of the on-chain data obtained by the parsing, and obtain the on-chain data from the blockchain network, specifically, obtain the front-end script file of the on-chain data; after obtaining the front-end script file, the browser can parse the front-end script file and present the data in the form of a visual interface.

[0108] It is worth noting that the process of parsing the web address of the on-chain data and subsequently obtaining the on-chain data is different according to the specifications of the direct communication protocol, depending on the on-chain data to be accessed. The following takes the on-chain data as an example of a smart contract, block and transaction of a business to introduce the specific implementation process of the above steps S302-S303, where:

[0109] (1) On-chain data refers to blocks or transactions in the blockchain network. When a user wants to access a block on a blockchain in a blockchain network, the webpage URL can be written as: blockchain: / / block / read / 12, indicating that the user wants to read on-chain data, and the on-chain data is a block, and the data address of the block is the block height of the block (such as the block height recorded in the above webpage URL is 12). Similarly, when a user wants to access a transaction in a blockchain network, the webpage URL can be written as: blockchain: / / tx / read / hash1, indicating that the user wants to read on-chain data, and the on-chain data is a transaction, and the data address of the transaction is the hash address of the transaction (such as the hash address of the transaction recorded in the above webpage URL is hash1). The following is combined with Figure 4 The following is an example of the general process of parsing a webpage URL and obtaining on-chain data when the on-chain data is a block or a transaction. Figure 4 As shown:

[0110] First, after obtaining the webpage URL in the browser, considering that the webpage URL directly contains the data address of the on-chain data (such as the on-chain data is a block or transaction), the webpage URL is resolved according to the specification of the direct communication protocol, and the data address of the on-chain data contained in the webpage URL can be directly read from the relevant position in the webpage URL. For example, when the webpage URL is blockchain: / / block / read / 12, the block height of the block directly read from the webpage URL is 12.

[0111] Then, after the browser resolves the webpage URL according to the direct communication protocol to obtain the data address of the on-chain data, it can generate (or assemble) a data request packet according to the data address of the on-chain data, and the data request packet is used to request the blockchain network (specifically a blockchain node device in the blockchain network) to send the on-chain data. Considering that the direct communication protocol is customized with reference to the network protocol of the blockchain network; and the blockchain network deploys a first transmission interface for the blockchain in the blockchain network according to the original network protocol (such as the P2P protocol), and the first transmission interface is used to realize the transmission of data in the blockchain (such as downloading); then when the browser generates a data request packet according to the data address of the on-chain data, it can specifically assemble the data request packet in combination with the network protocol and the data address, such as defining the use of the blockchain's native first transmission interface in the data request packet to realize the sending of on-chain data, etc.

[0112] Finally, the browser sends the data request packet to the blockchain network, so that the blockchain responds to the data request packet and returns the on-chain data (such as blocks or transactions) on the blockchain through the native first transmission interface, specifically the front-end script file corresponding to the on-chain data. Correspondingly, the browser receives the on-chain data returned by the blockchain network through the native first transmission interface, specifically the front-end script file corresponding to the on-chain data returned by the blockchain network, so that the browser can parse the front-end script file and render a web page interface on the display screen, which contains on-chain data, such as relevant information about blocks or transactions.

[0113] (2) The on-chain data is the smart contract of the business. In this case, the data address of the on-chain data is the contract address of the smart contract. Taking the business as a blog as an example, the webpage URL used to request access to the blog in the blockchain network can be expressed as: blockchain: / / blog.eth, where blog.eth is the contract domain name (or simply the domain name) corresponding to the contract address of the blog smart contract. Figure 5 Here is an example of the general process of parsing the webpage URL and obtaining the on-chain data when the on-chain data is a blog smart contract. Figure 5 As shown:

[0114] First, after obtaining the web address in the browser, the web address can be resolved according to the specifications of the direct communication protocol to obtain the domain name contained in the web address; there is a corresponding relationship between the domain name and the contract address of the business smart contract. For example, if the web address is represented by blockchain: / / blog.eth, the resolved domain name is blog.eth.

[0115] Then, according to the mapping relationship between the domain name and the contract address of the smart contract, the contract address of the smart contract is obtained. For example, there is a mapping relationship between domain name 1 and contract address 1 of smart contract 1, and there is a mapping relationship between domain name 2 and contract address 2 of smart contract 2. Then, when the contract address to be found is contract address 2, contract address 2 can be found according to the mapping relationship between domain name 2 and contract address 2. Among them, the embodiment of the present application does not limit the specific implementation process of obtaining the contract address of the smart contract according to the mapping relationship between the domain name and the contract address of the smart contract; the following are two exemplary implementation processes for obtaining the contract address based on the mapping relationship, where:

[0116] In one implementation, the contract address of the smart contract corresponding to the domain name is searched based on the domain name service ENS (Ethereum Name Service) stored in the blockchain network. This method of searching for the contract address based on the contract address domain name mapping of the domain name service ENS allows users to not remember the contract address of the smart contract, but only need to remember or query a simple and memorable domain name, and the browser can automatically resolve the contract address of the smart contract based on the domain name, reducing the user's usage threshold.

[0117] In the specific implementation, a domain name service ENS is stored in the blockchain network. The domain name service ENS can be simply understood as a domain name search system, in which the mapping relationship between the domain name and the contract address is recorded. In other words, the domain name and the contract address are stored in association in the domain name service. Then, after the browser resolves the webpage URL to obtain the domain name, it can send the domain name to the blockchain network, so that the blockchain network can find the contract address corresponding to the domain name from the domain name service based on the domain name; then, the blockchain network returns the contract address corresponding to the found domain name to the browser, and the browser receives the contract address corresponding to the domain name returned by the blockchain network.

[0118] In other implementations, the mapping relationship between the domain name and the contract address cached in the local cache space of the browser is used to find the contract address of the smart contract corresponding to the domain name. It is worth noting that after the browser obtains the contract address of the smart contract corresponding to the domain name from the blockchain network, it can also store the mapping relationship between the domain name and the contract address in the local cache space, so that if you want to find the contract address corresponding to the domain name in the subsequent period of time (such as a period of time after the start time of the cache, such as 20 minutes), you can directly find it from the local cache space of the browser, which effectively improves the address search speed and efficiency, thereby improving the efficiency of data acquisition on the chain. In the specific implementation, the domain name and contract address of the smart contract of one or more businesses are associated and cached in the cache space of the browser; according to the domain name corresponding to the contract address of the smart contract, the contract address associated with the domain name is searched in the cache space; if the cache space contains the contract address associated with the domain name, the contract address of the smart contract is obtained from the cache space.

[0119] It should be noted that the mapping relationship between the domain name and the contract address stored in the cache space is time-limited; if the mapping relationship between the domain name and the contract address is modified, the contract address found based on the domain name in the cache space may not be accurate. For example, the domain name corresponding to contract address 1 is domain name 1. If the user wants to replace contract address 1 with domain name 2, then at this time, contract address 1 has a mapping relationship with domain name 2, and contract address 1 does not have a mapping relationship with domain name 1; therefore, when the interval between the search time and the storage time (such as the time when the domain name and contract address are associated and stored in the cache space) of searching for the contract address in the cache space is long (such as more than 10 minutes), the mapping relationship between the domain name and the contract address in the cache space may have changed. For the accuracy of the search, the embodiment of the present application still searches for the contract address corresponding to the domain name through the domain name service ENS stored in the blockchain network. The specific search method can be found in the above-mentioned related description, which will not be repeated here.

[0120] Finally, if you want the browser to be able to parse and display, the business smart contract must deploy a second transmission interface (or called a contract interface, such as a display interface, which supports returning business data of the business in chronological order. For example, if the business is a blog, the display interface can send the business data to the browser in the order of blog publishing time (or chain time) for sequential rendering and display) in accordance with the direct communication protocol before going on the chain. That is, the smart contract follows the standard second transmission interface of the direct communication protocol to facilitate the return of the front-end script file of the on-chain data (such as the html structure code mentioned above) through the second transmission interface, that is, the contract interface must return the html code corresponding to the on-chain data in it; that is, the embodiment of the present application supports obtaining on-chain data from the on-chain contract interface (display interface) of the blockchain network, specifically obtaining the front-end script file of the on-chain data. In the specific implementation, after the browser finds the contract address based on the domain name, it can generate a data access request based on the contract address; then, the browser sends the data access request to the blockchain network, so that the blockchain network responds to the data access request and returns the smart contract of the business through the second transmission interface; finally, the browser receives the smart contract of the business returned by the blockchain network through the second transmission interface, specifically the front-end script code html of the business smart contract returned by the blockchain network.

[0121] It should be noted that the above is an introduction to the form of web page URLs using on-chain data including business smart contracts, blocks and transactions as an example; in actual applications, web page URLs can also be extended based on the direct communication protocol, and the extension based on the direct communication protocol (i.e. the blokchain protocol mentioned above) does not affect the original normal hypertext access.

[0122] S304: Rendering and displaying the web page interface in the browser.

[0123] After obtaining the on-chain data based on the above steps, specifically the front-end script file used to visualize the on-chain data, the browser will further verify the legitimacy of the front-end script file, such as verifying whether the front-end script file complies with the hypertext standard; only after successful verification will the front-end script file be parsed to achieve visual output of the on-chain data in the web interface.

[0124] In summary, the embodiment of the present application designs a new direct communication protocol, through which the browser can parse the web page URL used to access the blockchain network; that is, the browser can directly parse the way users access the on-chain data in the blockchain network through the direct communication protocol; thus, the browser can directly connect to the blockchain network based on the data address of the on-chain data obtained by the parsing, thereby realizing the decentralization of communication between the browser end and the blockchain network end, avoiding hacker attacks or tampering of the on-chain data, and ensuring communication security. In addition, the embodiment of the present application uses the blockchain ENS domain name service instead of the traditional DNS service, so that users do not need to remember the cumbersome IP address to write the web page URL, which can lower the user's usage threshold and improve user experience and stickiness.

[0125] Figure 6 A flow chart of another data processing method provided by an exemplary embodiment of the present application is shown; the data processing method may be executed by a computer device, such as a terminal in the aforementioned data processing system, and the data processing method may include but is not limited to steps S601-S606:

[0126] S601: Obtain the URL of a web page in a browser.

[0127] As described above, the webpage URL for requesting access to the on-chain data is customized by the user according to the access requirements. In the embodiment of the present application, an exemplary process of user-defined webpage URL is mainly given; for the relevant content of the webpage URL (such as the form and composition of the webpage URL, etc.), please refer to the above Figure 3 The relevant description of the specific implementation process shown in step S301 in the illustrated embodiment is not repeated here.

[0128] In a specific implementation, when a user needs to access on-chain data in a blockchain network, he or she can open a browser and display the browser's service interface, which can be any interface provided by the browser that supports inputting a web page URL; then, the user can perform a URL writing operation on the service interface, and the browser can display the written web page URL in the service interface according to the URL writing operation in the service interface. At this time, it is determined that the browser has obtained the web page URL for requesting access to on-chain data.

[0129] It is worth noting that the embodiments of the present application do not limit the specific implementation process of the user customizing the webpage URL in the service interface; for ease of understanding, two exemplary methods of the user customizing the webpage URL in the service interface are given below, where:

[0130] In one implementation, the webpage URL is written by the user himself following the direct communication protocol and input into the browser. Specifically, the service interface provided by the browser includes an address input area. In this implementation, the URL writing operation includes an input operation of inputting the webpage URL in the address input area; wherein the address input area in the service interface provided by the browser is an area for the user to input the webpage URL, so that the user can perform the URL writing operation in the address input area, and the browser directly obtains the webpage URL from the address input area when detecting that the URL writing operation is completed.

[0131] A schematic diagram of an exemplary service interface including an address input area can be found in Figure 7 ;like Figure 7 As shown, when a user has a need to access data on the chain, he can trigger the browser service interface 701 to open and display. The service interface 701 includes an address input area 702, and the display position and style of the address input area 702 in the service interface are not limited. Figure 7 The address input area 702 is shown in the top toolbar of the service interface 701. The address input area 702 can also be displayed in the middle area of ​​the service interface 701, etc., without limitation. Then, the user can follow the direct communication protocol to enter the webpage URL in the address input area 702. For example, if the user wants to access the blog smart contract on the chain, the user can follow the direct communication protocol to enter the webpage URL blockchain: / / blog.eth in the address input area 702. At this time, the browser can read the webpage URL from the address input area 702.

[0132] In other implementations, the web page URL can be encapsulated by the browser and selected by the user. Specifically, the browser provided in the embodiment of the present application can also encapsulate commonly used operations, so that the user can select the web page URL corresponding to the chain data to be accessed from the encapsulated web page URL according to the access requirements, so as to realize the rapid input of the web page URL, improve the input efficiency of the web page URL to a certain extent, and thus improve the access efficiency of the chain data. The embodiment of the present application does not limit the encapsulated common operations; for example, the access to a block of a certain block height in the blockchain is a common operation, such as a block with a block height of 12, then the access operation to the block with a block height of 12 can be encapsulated as a web page URL blockchain: / / block / read / 12; for another example, if the access to a transaction in the blockchain is a common operation, such as a transaction with a hash address of hash1, then the access operation to the transaction with the hash address hash1 can be encapsulated as a web page URL blockchain: / / tx / read / hash1; and so on.

[0133] In a specific implementation, the service interface provided by the browser includes one or more candidate web page URLs, which are pre-packaged. In this implementation, the URL writing operation may include: a selection operation or an adjustment operation on any web page URL in the one or more candidate web page URLs. In other words, when the candidate web page URLs are displayed in the browser, the user can perform a selection operation to select the web page URL corresponding to the chain data to be accessed from the one or more candidate web page URLs, or perform an adjustment operation to adjust one of the one or more candidate web page URLs to obtain the web page URL corresponding to the chain data to be accessed.

[0134] An exemplary schematic diagram of directly selecting a web page URL from one or more candidate web page URLs included in the service interface can be found in Figure 8 ;like Figure 8 As shown, the service interface 801 includes candidate web page URLs 8011, 8012, and 8013. If the web page URL corresponding to the on-chain data that the user wants to access is the candidate web page URL 8012, the user can perform a selection operation on the candidate web page URL 8012, and the browser determines that the web page URL corresponding to the on-chain data to be accessed is obtained, and the web page URL is the candidate web page URL 8012.

[0135] An exemplary schematic diagram of performing adjustment operations on candidate web page URLs in the service interface to obtain web page URLs corresponding to the on-chain data to be accessed can be found in Fig. 9 ;like Fig. 9As shown, the service interface 901 includes candidate web page URLs 9011, candidate web page URLs 9012, and candidate web page URLs 9013. If the candidate web page URL 9012 indicates accessing a block with a block height of 12 in the blockchain, and the on-chain data that the user wants to access is a block with a block height of 8 in the blockchain, then it can be determined that the web page URL of the on-chain data that the user wants to access is similar to the candidate web page URL 9012. At this time, a selection operation can be performed on the candidate web page URL 9012, and the candidate web page URL is in a selected state; then an adjustment operation is performed on the candidate web page URL 9012 in the selected state, such as modifying the parameter params "12" to "8" to quickly obtain the adjusted web page URL. Among them, the selection operation performed on the candidate web page URL 9012 may include but is not limited to: a right-click operation on the candidate web page URL 9012 through an external input device (such as a mouse), a double-click operation or a triple-click operation on the candidate web page URL 9012, a long-press operation on the candidate web page URL, and the like. In addition, when the candidate web page URL 9012 is in a selected state, the display style of the candidate web page URL 9012 is different from the display style when it is not in a selected state, so that the user can intuitively perceive whether the candidate web page URL is selected; for example, when the candidate web page URL 9012 is in a selected state, the color depth of the area where the candidate web page URL 9012 is located is greater than the color depth of the areas where other candidate web page URLs that are not in a selected state are located; the embodiment of the present application does not limit the display style of the candidate web page URL when it is in a selected state.

[0136] It should be noted that, in addition to being directly displayed on the service interface, the one or more candidate web page URLs mentioned above can also be triggered to appear when a user input operation is detected in the service interface. Fig.10 As shown, the service interface includes an address input area 1001. If it is detected that the user performs an input operation in the address input area 1001 (such as detecting that there are characters in the address input area, determining that there is an input operation), then it supports outputting one or more candidate web page URLs in the form of a drop-down window 1002, or outputting one or more candidate web page URLs in the form of a floating window. The embodiment of the present application does not limit the display method of the candidate web page URLs.

[0137] It should also be noted that the specific encapsulation process of the encapsulated candidate web page URLs is not limited in the embodiments of the present application. Optionally, the commonly used rules for encapsulation can be implemented and encapsulated by the browser developer; optionally, the browser can generate them according to the user's URL input habits (for example, if the user frequently enters a web page URL in the service interface within a continuous time period, the web page URL can be used as a commonly used candidate web page URL); optionally, the user can customize it in the browser in advance, such as if the user has a frequent access demand for certain on-chain data, the user can customize the web page URLs corresponding to these on-chain data in the browser as needed; and so on.

[0138] S602: Parse the webpage URL according to the specification of the direct communication protocol to obtain the data address of the on-chain data.

[0139] S603: Access the blockchain network based on the data address and obtain the on-chain data from the blockchain network.

[0140] S604: Rendering and displaying the web page interface in the browser.

[0141] It should be noted that the specific implementation process shown in steps S602-S604 can be found in the aforementioned Figure 3 The relevant description of the specific implementation process shown in steps S302-S304 in the illustrated embodiment is not repeated here.

[0142] S605: Performing editing operations on business data in the web page interface.

[0143] S606: Acquire the business data from the blockchain network, and render and display a new web page interface according to the business data.

[0144] In steps S605-S606, the browser provided in the embodiment of the present application also supports the user to perform editing operations in the web page interface to implement writing or reading of business data in the web page interface. In other words, in addition to being able to implement URL parsing of web pages in accordance with the direct communication protocol to directly access the on-chain data in the blockchain network, the browser provided in the embodiment of the present application also supports writing new business data or reading business data directly in the blockchain network through the browser, enriching the functions that users can use in the browser and improving the user experience. The specific implementation process of writing business data and reading business data through the browser is introduced below, where:

[0145] (1) Users write business data directly into the blockchain network through the browser.

[0146] In a specific implementation, after the web page interface is displayed on the display screen based on the specific implementation process of the aforementioned steps S601-S604, the user may also have the need to write business data in the web page interface; if the web page interface is a blog interface of a blog, the user may have the need to comment on a blog or write a new blog in the blog interface. In this case, if the browser detects that there is a write operation for business data in the web page interface, the browser obtains the write web page URL for the business data. Among them, the write web page URL obtained by the browser is written by the uplink interface according to the direct communication protocol and business data; the specific process may include: the web page interface includes a data input box, and the data input box includes the uplink interface; when the write operation is detected in the data input box, the uplink interface can generate a write web page URL based on the write operation for the business data; further, after the user clicks submit (such as the user confirms to submit the written business data, or the uplink interface will output the write web page URL for the user to confirm after generating the write web page URL), the browser can obtain the write web page URL from the uplink interface.

[0147] Then, after the browser obtains the URL of the write webpage, the browser can perform data analysis on the write webpage according to the direct communication protocol to obtain the data analysis result, so as to generate a transaction to be put on the chain according to the data analysis result, and the transaction to be put on the chain includes the business data written by the user in the webpage interface and to be put on the chain. For example, the write webpage URL obtained by the browser is blockchain: / / blog.eth / write / params, and the data analysis result obtained by performing data analysis on the write webpage URL can indicate writing business data in the blog, where params represents the contract writing method and parameters called.

[0148] Furthermore, the browser can send the transaction to be on-chain to the blockchain network so that the blockchain network can chain the transaction to be on-chain. In addition, the browser will also detect in real time whether the transaction to be on-chain is successfully blocked (which can be simply understood as successful chaining). If the transaction to be on-chain is successfully chained, the blockchain network will send a successful chaining prompt message to the browser, and the successful chaining prompt message is used to prompt that the transaction to be on-chain has been successfully chained. Correspondingly, when the browser receives the successful chaining prompt message returned by the blockchain network, the second transmission interface (such as the display interface implemented in the smart contract of the business) can be re-called to refresh the web page interface; specifically, the second transmission interface is called to receive business data from the blockchain network, and a new web page interface is rendered and displayed according to the business data, specifically, the front-end script file corresponding to the business data is received, so that the browser can parse the front-end script file to render and display a new web page interface after verifying that the front-end script file meets the hypertext standard, and the new web page interface contains the business data written by the user.

[0149] It should be understood that the transactions to be put on the chain mentioned in the above implementation process are generated only after being signed by the user, which can ensure that the transactions on the chain are safe and reliable, and maintain the security of the data on the blockchain. In the specific implementation, after the browser performs data parsing on the written web page URL and obtains the data parsing result, it can assemble (or generate) the transaction to be signed based on the data parsing result, and send the transaction to be signed to the user's blockchain wallet, so that the blockchain wallet uses the object signature to sign the transaction to be signed when the signature operation is detected, and generates the transaction to be put on the chain; then, the browser obtains the transaction to be put on the chain from the blockchain wallet. Among them, the blockchain wallet can be used in the form of a browser plug-in or a client; that is, the blockchain wallet supports deployment in the browser in the form of a plug-in; the blockchain wallet also supports deployment in the form of a client in a terminal running with the browser, or running in a server.

[0150] To better understand the process of writing business data mentioned above, Fig.11a and Fig.11b This chapter introduces the specific process of users writing business data in the browser; Fig.11a and Fig.11b As shown, taking the smart contract whose on-chain data is the business "blog" as an example, it is assumed that the service interface of the blog is displayed in the browser, and the service interface of the blog contains an article list (such as a list containing one or more articles) and details (such as the article identifier of each article), and also contains an article editing button 1101 (or a button, control, component, etc.). When the article editing button 1101 is triggered, it means that the user wants to write a new article. At this time, the user can perform a write operation on the business data (such as a new article) in the service interface, and the browser can obtain the write webpage URL generated by the on-chain interface according to the write operation; further, the browser performs data parsing on the write webpage URL and generates a transaction to be signed based on the data parsing result.

[0151] Then, the browser can call the blockchain wallet to pull up a pop-up window 1102, which is displayed in the browser and contains the business data to be chained; the pop-up window 1102 prompts the user whether the business data to be written to the blockchain network needs to be signed, and facilitates the user to intuitively know that the ownership of the business data belongs to the user himself. If the user clicks to agree to sign (or directly writes a handwritten signature, etc.) in the pop-up window 1102, it means that the user agrees to chain the written business data to the blockchain network. At this time, the browser can get the signed transaction to be chained from the blockchain network. Furthermore, the browser sends the transaction to be chained to the blockchain network, so that after the blockchain network successfully chains the transaction to be chained, the browser can call the second transmission interface again to download the business data after chaining from the blockchain network, specifically the front-end script file corresponding to the business data, so that the browser loads the front-end script file to render and display a new web page interface, which contains business data.

[0152] (2) Users read business data directly from the blockchain network through the browser.

[0153] In a specific implementation, after the web page interface is displayed on the display screen based on the specific implementation process of the aforementioned steps S601-S604, the user may also have the need to read the business data in the web page interface; for example, the web page interface is a blog interface of a blog, and the blog interface contains an article list, and the article list contains multiple articles; the user may have the need to view the details of a certain article. In this case, if the browser detects that there is a data query operation for business data in the web page interface, the browser obtains the query web page URL for the business data. Among them, the query web page URL obtained by the browser is written by the uplink interface according to the direct communication protocol and business data; the specific process may include: when a trigger operation for the business data to be viewed is detected in the web page interface, the query web page URL for the business data is generated by the viewing interface; wherein the viewing interface can be deployed in the web page URL, and the embodiment of the present application does not limit the deployment location of the query interface.

[0154] Then, after obtaining the query webpage URL, the browser can perform data parsing on the query webpage URL according to the direct communication protocol to obtain the data parsing result; at this time, the data parsing result contains the contract address of the smart contract of the business data to be queried. In this way, the browser calls the second transmission interface again and receives the business data to be queried from the blockchain network based on the data parsing result, specifically the front-end script file of the business data; and the browser renders and displays a new webpage interface based on the received business data, specifically the front-end script file of the business data, which contains the business data.

[0155] An exemplary schematic diagram of a user reading business data in a browser can be seen in Fig.12 ;like Fig.12 As shown, since the data in the blockchain network is publicly visible, it can be queried without user signature; therefore, after a data query operation for business data is detected in the browser (such as a user performing an operation to view more articles in the browser (such as clicking a view button)), a query webpage URL can be generated, such as reading the webpage URL as blockchain: / / blog.eth / read / params. Then, the query webpage URL is subjected to data parsing processing to obtain a data parsing result, such as the read in the data webpage URL represents reading business data, and the contract reading method and parameters represented by params are used to read business data. Finally, the business data can be downloaded from the blockchain network and rendered and displayed by re-calling the second transmission interface.

[0156] It should be understood that the above-mentioned writing of articles in the browser is only an exemplary way of performing write operations in the browser; for example, it also supports writing comments, modifying articles or leaving messages in the browser, and the embodiments of the present application do not limit the specific implementation methods of the write operations in the browser. Similarly, the above-mentioned reading of articles in the browser is only an exemplary way of performing read operations in the browser; for example, it also supports reading the reader information or comments of the blog in the browser, and the embodiments of the present application do not limit the specific implementation methods of the read operations in the browser.

[0157] In the embodiment of the present application, the browser can obtain the webpage URL for accessing the chain data in the blockchain network, which follows the direct communication protocol, and the direct communication protocol is a protocol that enables the browser to access the blockchain network; then, the webpage URL can be parsed according to the specification of the direct communication protocol to obtain the data address of the chain data, so that the browser can access the blockchain network based on the data address, and obtain the chain data from the blockchain network, and render and display the webpage URL containing the chain data in the browser. It can be seen that the embodiment of the present application designs a new direct communication protocol, and the browser can parse the webpage URL for accessing the blockchain network through the direct communication protocol; that is, the browser can directly parse the way for users to access the chain data in the blockchain network through the direct communication protocol; so that the browser can directly connect to the blockchain network based on the data address of the chain data obtained by parsing, realize the decentralization of communication between the browser end and the blockchain network end, avoid the chain data from being attacked or tampered by hackers, ensure the communication security, and improve the access efficiency to a certain extent. In addition, the embodiment of the present application also supports the execution of write and read operations in the browser, enriches the functions supported by the browser, meets the rich operation needs of users, and improves the user experience.

[0158] The method of the embodiment of the present application is described in detail above. In order to facilitate better implementation of the above scheme of the embodiment of the present application, the device of the embodiment of the present application is provided below accordingly.

[0159] See also Fig.13 , Fig.13 is a structural diagram of a data processing device provided in an embodiment of the present application. The data processing device may be provided in a computer device provided in an embodiment of the present application. In some embodiments, the data processing device may be a computer program (including program code) running in a computer device. The data processing device may be used to execute Figure 3 or Figure 6 The corresponding steps in the method embodiment shown in FIG. Fig.13 , the data processing device may include the following units:

[0160] The acquisition unit 1301 is used to acquire a webpage URL in a browser, where the webpage URL is used to request access to on-chain data in a blockchain network; the webpage URL complies with the specification of a direct communication protocol, where the direct communication protocol is a protocol that enables a browser to access a blockchain network;

[0161] Processing unit 1302 is used to parse the webpage URL according to the specification of the direct communication protocol to obtain the data address of the on-chain data; the data address is used to indicate the storage location of the on-chain data in the blockchain network;

[0162] The processing unit 1302 is further configured to access the blockchain network based on the data address and obtain the on-chain data from the blockchain network; and

[0163] The processing unit 1302 is further configured to render and display a web page interface in a browser, wherein the web page interface includes the on-chain data.

[0164] In one implementation, the on-chain data is a block or a transaction in the blockchain network; when the on-chain data is a block, the data address is the block height of the block; when the on-chain data is a transaction, the data address is the hash address of the transaction; the processing unit 1302 is used to parse the webpage URL according to the specification of the direct communication protocol, and when obtaining the data address of the on-chain data, it is specifically used to:

[0165] According to the specifications of the direct communication protocol, the web page URL is resolved to obtain the data address of the on-chain data contained in the web page URL.

[0166] In one implementation, the direct communication protocol is customized with reference to the network protocol of the blockchain network; the blockchain network deploys a first transmission interface for the blockchain in the blockchain network according to the network protocol; the processing unit 1302 is used to access the blockchain network based on the data address and obtain on-chain data from the blockchain network, specifically for:

[0167] Generate a data request packet according to the data address;

[0168] Sending the data request packet to the blockchain network, so that the blockchain network returns the on-chain data on the blockchain through the first transmission interface in response to the data request packet;

[0169] The on-chain data returned by the blockchain network is received through the first transmission interface.

[0170] In one implementation, the on-chain data is a smart contract of a business; the data address is the contract address of the smart contract; the processing unit 1302 is used to parse the webpage URL according to the specification of the direct communication protocol, and when the data address of the on-chain data is obtained, it is specifically used to:

[0171] According to the specifications of the direct communication protocol, the webpage URL is resolved to obtain the domain name in the webpage URL; there is a mapping relationship between the domain name and the contract address of the smart contract;

[0172] According to the mapping relationship between the domain name and the contract address of the smart contract, the contract address of the smart contract is obtained.

[0173] In one implementation, the processing unit 1302 is used to obtain the contract address of the smart contract according to the mapping relationship between the domain name and the contract address of the smart contract, specifically to:

[0174] Sending the domain name to the blockchain network so that the blockchain network searches for the contract address corresponding to the domain name from the domain name service based on the domain name; wherein the domain name service stores the domain name and the contract address in association;

[0175] Receive the contract address corresponding to the domain name returned by the blockchain network.

[0176] In one implementation, the domain name and contract address of the smart contract of one or more services are associated and cached in the cache space of the browser; the processing unit 1302 is used to obtain the contract address of the smart contract according to the correspondence between the domain name and the contract address of the smart contract, specifically for:

[0177] According to the domain name corresponding to the contract address of the smart contract, search for the contract address cached in association with the domain name in the cache space;

[0178] If the cache space contains the contract address cached in association with the domain name, the contract address of the smart contract is obtained from the cache space.

[0179] In one implementation, a second transmission interface is deployed in the smart contract of the business according to the direct communication protocol; the processing unit 1302 is used to access the blockchain network based on the data address and obtain the on-chain data from the blockchain network, specifically for:

[0180] Generate data access request based on contract address;

[0181] Sending the data access request to the blockchain network, so that the blockchain network returns the smart contract of the business through the second transmission interface in response to the data access request;

[0182] The smart contract of the business returned by the blockchain network is received through the second transmission interface.

[0183] In one implementation, the processing unit 1302 is further configured to:

[0184] If there is a write operation for business data in the web page interface, the write web page URL is obtained, and the write web page URL is written by the uplink interface according to the direct connection communication protocol and business data;

[0185] Perform data analysis on the written webpage URL according to the direct communication protocol to obtain the data analysis result, and generate the transaction to be uploaded to the chain based on the data analysis result; the transaction to be uploaded to the chain includes business data;

[0186] Send the transaction to be put on the chain to the blockchain network, so that the blockchain network can put the transaction on the chain;

[0187] When the successful chaining prompt information returned by the blockchain network is received, the second transmission interface is called to receive business data from the blockchain network, and a new web page interface is rendered and displayed according to the business data.

[0188] In one implementation, the processing unit 1302 is used to generate a transaction to be uploaded to the blockchain based on the data analysis result, specifically to:

[0189] Generate a transaction to be signed based on the data analysis results;

[0190] Send the transaction to be signed to the blockchain wallet, so that the blockchain wallet uses the object signature to sign the transaction to be signed and generates a transaction to be uploaded to the chain when the signature operation is detected;

[0191] Get the transactions to be uploaded from the blockchain wallet.

[0192] In one implementation, the processing unit 1302 is further configured to:

[0193] If there is a data query operation in the web page interface, the query web page URL is obtained. The query web page URL is written by the uplink interface according to the direct connection communication protocol and the business data to be queried;

[0194] Perform data analysis on the query webpage URL according to the direct communication protocol to obtain a data analysis result;

[0195] Calling the second transmission interface and receiving the business data to be queried from the blockchain network based on the data parsing result;

[0196] Render and display a new web page interface based on business data.

[0197] In one implementation, the processing unit 1302 is used to obtain the URL of the web page in the browser, specifically to:

[0198] Display the browser's service interface;

[0199] According to the URL writing operation, the written webpage URL is displayed in the service interface;

[0200] Wherein, the service interface includes one or more candidate web page URLs, and the URL writing operation includes: a selection operation or an adjustment operation of any web page URL among the one or more candidate web page URLs;

[0201] The service interface includes an address input area, and the URL writing operation includes an input operation of inputting a web page URL in the address input area.

[0202] In one implementation, the browser is an open source application running on a terminal device; the browser does not need to build a backend server, and the browser accesses the on-chain data in the blockchain network through a direct connection.

[0203] According to one embodiment of the present application, Fig.13 The various units in the data processing device shown can be individually or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units and can be implemented by the collaboration of multiple units. According to another embodiment of the present application, it can be executed by running on a general computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read-only storage medium (ROM). Figure 3and Figure 6 A computer program (including program code) for each step involved in the corresponding method shown in FIG. Fig.13 The data processing device shown in the embodiment of the present application is implemented by the data processing device. The computer program can be recorded on a computer-readable recording medium, for example, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.

[0204] In the embodiment of the present application, the browser can obtain the webpage URL for accessing the chain data in the blockchain network, which follows the direct communication protocol, and the direct communication protocol is a protocol that enables the browser to access the blockchain network; then, the webpage URL can be parsed according to the specification of the direct communication protocol to obtain the data address of the chain data, so that the browser can access the blockchain network based on the data address, and obtain the chain data from the blockchain network, and render and display the webpage URL containing the chain data in the browser. It can be seen that the embodiment of the present application designs a new direct communication protocol, and the browser can parse the webpage URL for accessing the blockchain network through the direct communication protocol; that is, the browser can directly parse the way for users to access the chain data in the blockchain network through the direct communication protocol; so that the browser can directly connect to the blockchain network based on the data address of the chain data obtained by parsing, realize the decentralization of communication between the browser end and the blockchain network end, avoid the chain data from being attacked or tampered by hackers, ensure the communication security, and improve the access efficiency to a certain extent. In addition, the embodiment of the present application also supports the execution of write and read operations in the browser, enriches the functions supported by the browser, meets the rich operation needs of users, and improves the user experience.

[0205] Fig.14 FIG. 1 shows a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. Fig.14 , the computer device includes a processor 1401, a communication interface 1402 and a computer-readable storage medium 1403. The processor 1401, the communication interface 1402 and the computer-readable storage medium 1403 can be connected via a bus or other means. The communication interface 1402 is used to receive and send data. The computer-readable storage medium 1403 can be stored in the memory of the computer device, the computer-readable storage medium 1403 is used to store a computer program, the computer program includes program instructions, and the processor 1401 is used to execute the program instructions stored in the computer-readable storage medium 1403. The processor 1401 (or CPU (Central Processing Unit)) is the computing core and control core of the computer device, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function.

[0206] The embodiment of the present application also provides a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space that stores the processing system of the computer device. In addition, one or more instructions suitable for being loaded and executed by the processor 1401 are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory, such as at least one disk storage; optionally, it can also be at least one computer-readable storage medium located away from the aforementioned processor.

[0207] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor 1401 loads and executes the one or more instructions stored in the computer-readable storage medium to implement the corresponding steps in the above data processing method embodiment; in a specific implementation, the one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and the following steps are executed:

[0208] Get the webpage URL in the browser. The webpage URL is used to request access to the on-chain data in the blockchain network. The webpage URL follows the specifications of the direct communication protocol, which is a protocol that enables the browser to access the blockchain network.

[0209] Parse the webpage URL according to the direct communication protocol specification to obtain the data address of the on-chain data; the data address is used to indicate the storage location of the on-chain data in the blockchain network;

[0210] Access the blockchain network based on the data address and obtain on-chain data from the blockchain network; and,

[0211] Render and display a web page interface in a browser, wherein the web page interface includes the on-chain data.

[0212] In one implementation, the on-chain data is a block or a transaction in the blockchain network; when the on-chain data is a block, the data address is the block height of the block; when the on-chain data is a transaction, the data address is the hash address of the transaction; one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and are executed to parse the webpage URL according to the specification of the direct communication protocol to obtain the data address of the on-chain data, and the following steps are specifically performed:

[0213] According to the specifications of the direct communication protocol, the web page URL is resolved to obtain the data address of the on-chain data contained in the web page URL.

[0214] In one implementation, the direct communication protocol is customized with reference to the network protocol of the blockchain network; the blockchain network deploys a first transmission interface for the blockchain in the blockchain network according to the network protocol; one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and when executing accessing the blockchain network based on the data address and obtaining on-chain data from the blockchain network, the following steps are specifically performed:

[0215] Generate a data request packet according to the data address;

[0216] Sending the data request packet to the blockchain network, so that the blockchain network returns the on-chain data on the blockchain through the first transmission interface in response to the data request packet;

[0217] The on-chain data returned by the blockchain network is received through the first transmission interface.

[0218] In one implementation, the on-chain data is a smart contract of a business; the data address is the contract address of the smart contract; one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and are executed to parse the webpage URL according to the specification of the direct communication protocol to obtain the data address of the on-chain data, and the following steps are specifically performed:

[0219] According to the specifications of the direct communication protocol, the webpage URL is resolved to obtain the domain name in the webpage URL; there is a mapping relationship between the domain name and the contract address of the smart contract;

[0220] According to the mapping relationship between the domain name and the contract address of the smart contract, the contract address of the smart contract is obtained.

[0221] In one implementation, one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and when executing the mapping relationship between the domain name and the contract address of the smart contract, the contract address of the smart contract is obtained, and the following steps are specifically performed:

[0222] Sending the domain name to the blockchain network so that the blockchain network searches for the contract address corresponding to the domain name from the domain name service based on the domain name; wherein the domain name service stores the domain name and the contract address in association;

[0223] Receive the contract address corresponding to the domain name returned by the blockchain network.

[0224] In one implementation, the domain name and contract address of the smart contract of one or more services are associated and cached in the cache space of the browser; one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and when executing the corresponding relationship between the domain name and the contract address of the smart contract, the contract address of the smart contract is obtained, and the following steps are specifically performed:

[0225] According to the domain name corresponding to the contract address of the smart contract, search for the contract address cached in association with the domain name in the cache space;

[0226] If the cache space contains the contract address cached in association with the domain name, the contract address of the smart contract is obtained from the cache space.

[0227] In one implementation, a second transmission interface is deployed in the smart contract of the business according to the direct communication protocol; one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and when executing access to the blockchain network based on the data address and obtaining on-chain data from the blockchain network, the following steps are specifically performed:

[0228] Generate data access request based on contract address;

[0229] Sending the data access request to the blockchain network, so that the blockchain network returns the smart contract of the business through the second transmission interface in response to the data access request;

[0230] The smart contract of the business returned by the blockchain network is received through the second transmission interface.

[0231] In one implementation, one or more instructions in the computer readable storage medium are loaded by the processor 1401 and further perform the following steps:

[0232] If there is a write operation for business data in the web page interface, the write web page URL is obtained, and the write web page URL is written by the uplink interface according to the direct connection communication protocol and business data;

[0233] Perform data analysis on the written webpage URL according to the direct communication protocol to obtain the data analysis result, and generate the transaction to be uploaded to the chain based on the data analysis result; the transaction to be uploaded to the chain includes business data;

[0234] Send the transaction to be put on the chain to the blockchain network, so that the blockchain network can put the transaction on the chain;

[0235] When the successful chaining prompt information returned by the blockchain network is received, the second transmission interface is called to receive business data from the blockchain network, and a new web page interface is rendered and displayed according to the business data.

[0236] In one implementation, one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and when executing to generate a transaction to be uploaded to the chain based on the data parsing result, the following steps are specifically performed:

[0237] Generate a transaction to be signed based on the data analysis results;

[0238] Send the transaction to be signed to the blockchain wallet, so that the blockchain wallet uses the object signature to sign the transaction to be signed and generates a transaction to be uploaded to the chain when the signature operation is detected;

[0239] Get the transactions to be uploaded from the blockchain wallet.

[0240] In one implementation, one or more instructions in the computer readable storage medium are loaded by the processor 1401 and further perform the following steps:

[0241] If there is a data query operation in the web page interface, the query web page URL is obtained. The query web page URL is written by the uplink interface according to the direct connection communication protocol and the business data to be queried;

[0242] Perform data analysis on the query webpage URL according to the direct communication protocol to obtain a data analysis result;

[0243] Calling the second transmission interface and receiving the business data to be queried from the blockchain network based on the data parsing result;

[0244] Render and display a new web page interface based on business data.

[0245] In one implementation, one or more instructions in the computer-readable storage medium are loaded by the processor 1401 and when executing to obtain the URL of a web page in the browser, specifically the following steps are performed:

[0246] Display the browser's service interface;

[0247] According to the URL writing operation, the written webpage URL is displayed in the service interface;

[0248] Wherein, the service interface includes one or more candidate web page URLs, and the URL writing operation includes: a selection operation or an adjustment operation of any web page URL among the one or more candidate web page URLs;

[0249] The service interface includes an address input area, and the URL writing operation includes an input operation of inputting a web page URL in the address input area.

[0250] In one implementation, the browser is an open source application running on a terminal device; the browser does not need to build a backend server, and the browser accesses the on-chain data in the blockchain network through a direct connection.

[0251] In the embodiment of the present application, the browser can obtain the webpage URL for accessing the chain data in the blockchain network, which follows the direct communication protocol, and the direct communication protocol is a protocol that enables the browser to access the blockchain network; then, the webpage URL can be parsed according to the specification of the direct communication protocol to obtain the data address of the chain data, so that the browser can access the blockchain network based on the data address, and obtain the chain data from the blockchain network, and render and display the webpage URL containing the chain data in the browser. It can be seen that the embodiment of the present application designs a new direct communication protocol, and the browser can parse the webpage URL for accessing the blockchain network through the direct communication protocol; that is, the browser can directly parse the way for users to access the chain data in the blockchain network through the direct communication protocol; so that the browser can directly connect to the blockchain network based on the data address of the chain data obtained by parsing, realize the decentralization of communication between the browser end and the blockchain network end, avoid the chain data from being attacked or tampered by hackers, ensure the communication security, and improve the access efficiency to a certain extent. In addition, the embodiment of the present application also supports the execution of write and read operations in the browser, enriches the functions supported by the browser, meets the rich operation needs of users, and improves the user experience.

[0252] The embodiment of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the above-mentioned data processing method.

[0253] A person skilled in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0254] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium or transmitted by a computer-readable storage medium. The computer instruction can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (for example, coaxial cable, optical fiber, digital line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server, a data center, etc. that contains one or more available media integration. Available media can be magnetic media (for example, floppy disk, hard disk, tape), optical media (for example, DVD), or semiconductor media (for example, solid-state drive (Solid State Disk, SSD)) and the like.

[0255] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technical object familiar with the technical field within the technical scope disclosed in the present application can be easily thought of for changes or replacements, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A data processing method, characterized in that: include: Obtaining a webpage URL in a browser, where the webpage URL is used to request access to on-chain data in a blockchain network; The webpage URL complies with the specifications of the direct communication protocol, which is a protocol that enables the browser to access the blockchain network; Parsing the webpage URL according to the specification of the direct communication protocol to obtain the data address of the on-chain data; the data address is used to indicate the storage location of the on-chain data in the blockchain network; Access the blockchain network based on the data address, and obtain the on-chain data from the blockchain network; as well as, Render and display a web page interface in the browser, wherein the web page interface includes the on-chain data.

2. The method according to claim 1, characterized in that The on-chain data is a block or a transaction in the blockchain network; when the on-chain data is a block, the data address is the block height of the block; when the on-chain data is a transaction, the data address is the hash address of the transaction; The parsing of the webpage URL according to the specification of the direct communication protocol to obtain the data address of the on-chain data includes: According to the specification of the direct communication protocol, the webpage URL is subjected to address resolution processing to obtain the data address of the on-chain data contained in the webpage URL.

3. The method according to claim 2, characterized in that The direct communication protocol is customized with reference to the network protocol of the blockchain network; the blockchain network is deployed with a first transmission interface for the blockchain in the blockchain network according to the network protocol; The accessing the blockchain network based on the data address and obtaining the on-chain data from the blockchain network includes: Generate a data request packet according to the data address; Sending the data request packet to the blockchain network, so that the blockchain network returns the on-chain data on the blockchain through the first transmission interface in response to the data request packet; The on-chain data returned by the blockchain network is received through the first transmission interface.

4. The method according to claim 1, characterized in that The on-chain data is a smart contract of the business; the data address is the contract address of the smart contract; the webpage URL is parsed according to the specification of the direct communication protocol to obtain the data address of the on-chain data, including: According to the specification of the direct communication protocol, the webpage URL is subjected to domain name resolution to obtain the domain name in the webpage URL; there is a mapping relationship between the domain name and the contract address of the smart contract; The contract address of the smart contract is obtained according to the mapping relationship between the domain name and the contract address of the smart contract.

5. The method according to claim 4, characterized in that The acquiring the contract address of the smart contract according to the mapping relationship between the domain name and the contract address of the smart contract includes: Sending the domain name to the blockchain network, so that the blockchain network searches for the contract address corresponding to the domain name from a domain name service based on the domain name; wherein the domain name service stores the domain name and the contract address in association; Receive the contract address corresponding to the domain name returned by the blockchain network.

6. The method according to claim 4, characterized in that The browser cache space is associated with a domain name and a contract address of a smart contract of one or more services; and obtaining the contract address of the smart contract according to the corresponding relationship between the domain name and the contract address of the smart contract includes: According to the domain name corresponding to the contract address of the smart contract, searching the cache space for the contract address associated with the domain name; If the cache space contains a contract address cached in association with the domain name, the contract address of the smart contract is obtained from the cache space.

7. The method according to claim 4, characterized in that A second transmission interface is deployed in the smart contract of the business according to the direct communication protocol; accessing the blockchain network based on the data address and obtaining the on-chain data from the blockchain network includes: Generate a data access request based on the contract address; Sending the data access request to the blockchain network, so that the blockchain network returns the smart contract of the business through the second transmission interface in response to the data access request; The smart contract of the business returned by the blockchain network is received through the second transmission interface.

8. The method according to claim 4, characterized in that The method further comprises: If there is a write operation for business data in the web page interface, obtaining a write web page URL, wherein the write web page URL is written by the uplink interface according to the direct connection communication protocol and the business data; Performing data parsing processing on the written webpage URL according to the direct communication protocol to obtain a data parsing result, and generating a transaction to be uploaded to the chain based on the data parsing result; the transaction to be uploaded to the chain includes the business data; Sending the transaction to be put on the chain to the blockchain network, so that the blockchain network can put the transaction to be put on the chain; When the successful chaining prompt information returned by the blockchain network is received, the second transmission interface is called to receive the business data from the blockchain network, and a new web page interface is rendered and displayed according to the business data.

9. The method according to claim 8, characterized in that The generating of a transaction to be put on the chain based on the data analysis result includes: Generate a transaction to be signed based on the data analysis result; Sending the transaction to be signed to a blockchain wallet, so that the blockchain wallet uses the object signature to sign the transaction to be signed and generates a transaction to be uploaded to the blockchain when a signature operation is detected; Obtain the transaction to be uploaded to the blockchain from the blockchain wallet.

10. The method according to claim 4, characterized in that The method further comprises: If there is a data query operation in the web page interface, obtaining a query web page URL, wherein the query web page URL is written by the uplink interface according to the direct connection communication protocol and the business data to be queried; Performing data analysis on the query webpage URL according to the direct communication protocol to obtain a data analysis result; Calling the second transmission interface and receiving the business data to be queried from the blockchain network based on the data parsing result; A new web page interface is rendered and displayed according to the business data.

11. The method according to claim 1, characterized in that The step of obtaining the URL of a web page in the browser includes: Display the service interface of the browser; According to the URL writing operation, the written webpage URL is displayed in the service interface; Wherein, the service interface includes one or more candidate web page URLs, and the URL writing operation includes: a selection operation or an adjustment operation on any web page URL among the one or more candidate web page URLs; The service interface includes an address input area, and the URL writing operation includes an input operation of inputting a webpage URL in the address input area.

12. The method according to claim 1, characterized in that The browser is an open source application running in a terminal device; the browser does not need to build a backend server, and the browser accesses the on-chain data in the blockchain network through a direct connection.

13. A data processing device, characterized in that: include: An acquisition unit, used to acquire a webpage URL in a browser, where the webpage URL is used to request access to on-chain data in a blockchain network; The webpage URL complies with the specifications of the direct communication protocol, which is a protocol that enables the browser to access the blockchain network; A processing unit, configured to parse the webpage URL according to the specification of the direct communication protocol to obtain a data address of the on-chain data; the data address is used to indicate a storage location of the on-chain data in the blockchain network; The processing unit is further configured to access the blockchain network based on the data address and obtain the on-chain data from the blockchain network; and The processing unit is also used to render and display a web page interface in the browser, where the web page interface contains the on-chain data.

14. A computer device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the data processing method according to any one of claims 1 to 12 is implemented.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer application, and when the computer application is executed, the data processing method according to any one of claims 1 to 12 is implemented.

16. A computer program product, characterized in that The computer program product comprises computer instructions, and when the computer instructions are executed by a processor, the data processing method according to any one of claims 1 to 12 is implemented.