Data processing method and device, electronic equipment and computer readable storage medium
By detecting and installing code plug-ins in the resource management client, the problem of timeliness and security of the client's support for the new blockchain is solved, function expansion and security guarantee are achieved, and monopoly risk is reduced.
Patent Information
- Application Number
- CN202310595323.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2024-11-26
AI Technical Summary
The code closure of the resource management client leads to monopoly, and the interface method of the new blockchain cannot be supported in time, affecting the friendship of the new chain's entrepreneurial development scenarios, and the code closure makes it difficult to guarantee security.
By detecting whether the data interaction of the new blockchain is supported in the resource management client, if not, the corresponding code plug-in will be obtained and installed from the public plug-in library to achieve functional expansion, and ensure security through confirmation of decentralized applications.
It realizes the expansion function of the resource management client without modifying the code, reduces the risk of monopoly, improves the timeliness of support for the new blockchain, and ensures security through the confirmation of the target object.
Smart Images

Figure CN119026128A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and specifically to a data processing method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] The resource management client is a client based on blockchain technology that implements resource management business functions. By accessing the supported blockchain network, it allows the target object to manage digital assets between different blockchains and transfer digital assets freely. It also provides a secure identity authentication function, allowing the target object to perform identity authentication and authorization operations on decentralized applications (DApp).
[0003] In order to ensure the code security of the resource management client, the code of the resource management client is usually not open source. The open source code of the resource management client is also the code version after the important code content is deleted. Therefore, the blockchain interface and functions supported by the resource management client are developed and maintained by the official, and the update is slow. As a result, the resource management client has a strong monopoly power and only supports the blockchain types and methods it recognizes. It will not support the interface methods of new blockchains in a timely manner, which is very unfriendly to the entrepreneurial development scenarios of new chains.
[0004] Therefore, how to reduce the monopoly power of resource management clients while ensuring code security is a technical problem that needs to be solved urgently. Summary of the invention
[0005] To solve the above technical problems, the embodiments of the present application respectively provide a data processing method, a data processing device, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] In a first aspect, an embodiment of the present application provides a data processing method, which is applied to a resource management client, the method comprising: in response to a call initiated by a decentralized application when connecting to the resource management client, detecting whether the resource management client supports data interaction with a target blockchain; receiving installation information sent by the decentralized application, the installation information is generated after the decentralized application determines that the resource management client does not support data interaction with the target blockchain, and is sent after the decentralized application detects an instruction to confirm the installation information, the installation information includes at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in; obtaining the code plug-in from a public plug-in library, and installing the code plug-in.
[0007] In a second aspect, an embodiment of the present application provides a data processing device, which is configured on a resource management client device, and the device includes: an interaction detection module, configured to detect whether the resource management client supports data interaction with a target blockchain in response to a call initiated by a decentralized application when connecting to the resource management client; an installation information receiving module, configured to receive installation information sent by the decentralized application, the installation information is generated after the decentralized application determines that the resource management client does not support data interaction with the target blockchain, and is sent after the decentralized application detects an instruction to confirm the installation information, and the installation information includes at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in; a plug-in installation module, configured to obtain the code plug-in from a public plug-in library and install the code plug-in.
[0008] In a third aspect, an embodiment of the present application provides another data processing method for decentralized applications, the method comprising: if a connection instruction for a resource management client is detected, determining whether the resource management client supports data interaction with a target blockchain by calling a blockchain detection interface of the resource management client; if it is determined that the resource management client does not support data interaction with the target blockchain, displaying installation information to be confirmed, the installation information including at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in; if an instruction indicating confirmation of the installation information is detected, sending the installation information to the resource management client so that the resource management client installs the code plug-in.
[0009] In a fourth aspect, an embodiment of the present application provides a data processing device, which is configured on a decentralized application device, and the device includes: a detection and calling module, configured to determine whether the resource management client supports data interaction with a target blockchain by calling a blockchain detection interface of the resource management client if a connection instruction for the resource management client is detected; an installation information confirmation module, configured to display installation information to be confirmed if it is determined that the resource management client does not support data interaction with the target blockchain, and the installation information includes at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in; an installation information sending module, configured to send the installation information to the resource management client if an instruction indicating confirmation of the installation information is detected, so that the resource management client installs the code plug-in.
[0010] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the steps in the data processing method as described above.
[0011] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor of a computer, the computer executes the steps in the data processing method as described above.
[0012] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the steps in the data processing method as described above when executed by a processor.
[0013] In the technical solution provided by the embodiment of the present application, in the scenario where the resource management client needs to support a new blockchain, since the target blockchain is a new blockchain for the resource management client, the decentralized application will initiate a call to detect whether it supports data interaction with the new blockchain when connected to the resource management client. The resource management client will detect that it does not support data interaction with the target blockchain, so it will continue to receive the installation information sent by the decentralized application and confirmed by the target object, and then obtain and install the corresponding code plug-in from the public plug-in library based on the installation information, thereby realizing that the resource management client can safely expand the function of the resource management client without changing the code. Since the code of the resource management client does not need to be modified, the code of the resource management client can be open source to avoid the monopoly problem of the resource management client. In the entrepreneurial development scenario of the new blockchain, it is only necessary to develop a code plug-in and publish it to the public plug-in library. When the decentralized application is connected to the resource management client, the resource management client can automatically install the corresponding code plug-in to support the interface method of the new blockchain, which is very timely and therefore very friendly to entrepreneurs of the new blockchain. In addition, since the installation of the code plug-in is also confirmed by the target object through the decentralized application, the security of the resource management client can also be guaranteed.
[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of the implementation environment involved in this application;
[0016] Figure 2 is a flow chart of a data processing method shown in an exemplary embodiment of the present application;
[0017] Figure 3 A schematic diagram illustrating the pop-up window content displayed in the application interface of a decentralized application;
[0018] Figure 4 is a schematic diagram of an exemplary interactive process of installing a code plug-in;
[0019] Figure 5 is Figure 2 A flow chart of another data processing method proposed based on the illustrated embodiment;
[0020] Figure 6 is a schematic diagram of an exemplary decentralized application displaying signature information to be confirmed;
[0021] Figure 7 This is an exemplary flow chart of transaction on-chain based on the target blockchain;
[0022] Figure 8 is a flow chart of a data processing method shown in another exemplary embodiment of the present application;
[0023] Fig. 9 is Figure 8 A flow chart of another data processing method proposed based on the illustrated embodiment;
[0024] Fig.10 is a flow chart of a data processing device shown in an exemplary embodiment of the present application, and the data processing device is configured on a resource management client device;
[0025] Fig.11 is a flow chart of a data processing device shown in an exemplary embodiment of the present application, and the data processing device is configured on a decentralized application device;
[0026] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0028] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0029] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0030] The term "multiple" as used in this application refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0031] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. The terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0032] First see Figure 1 , Figure 1 is a schematic diagram of an implementation environment involved in the present application, which includes a blockchain network 100, a resource management client device 200, and a decentralized application device 300. The resource management client device 200 and the decentralized application device 300 are connected in communication with each other, and are connected in communication with the blockchain network 100 respectively.
[0033] The blockchain network 100 may include node devices 10a, 10b, 10c, and 10d. Among them, node devices 10a, 10b, 10c, and 10d are Figure 1The blockchain nodes (referred to as nodes) in the blockchain network 100 shown may be any form of computing devices connected to the blockchain network 100, such as servers, terminals, etc. The node devices 10a, 10b, 10c, and 10d may also be connected to form the blockchain network 100 through network communication.
[0034] Figure 1 The types of blockchains involved in the architecture of the blockchain network 100 shown may specifically include: public blockchain, private blockchain and consortium blockchain. The types of blockchains used in different blockchain application scenarios may be different and are not limited here. Among them, a public chain refers to a blockchain that can be made public and can be joined and accessed by any party; blocks on the public chain can be viewed by any party, and any party can also initiate transactions on the public chain, and can also join the consensus process of the public chain at any time. A private chain refers to a blockchain that can be used within a private organization, and the read and write permissions and accounting permissions on the blockchain can be formulated according to the rules of the private organization; it is usually used for data management, auditing, etc. within the enterprise. A consortium chain refers to a consortium member joining the consortium chain. The read and write permissions and accounting rights on the blockchain can be formulated according to the consortium rules; it is generally used in scenarios such as transactions, settlements or liquidations between institutions.
[0035] Each node in the blockchain network 100 stores an identical blockchain (see Figure 1 The blockchain is composed of multiple blocks. Each block of the blockchain includes the hash value of the transaction record stored in the block (the hash value of the block) and the hash value of the previous block. Each block is connected by the hash value to form a blockchain to ensure the security of the information input in the block. In addition, the block can also include the timestamp, version number, difficulty value and other information when the block is generated, which are not listed here.
[0036] The resource management client device 200 refers to a device running a resource management client program. It is understandable that the resource management client is a client based on blockchain technology to implement resource management business functions. It allows the target object to manage digital assets between different blockchains and freely transfer digital assets by accessing the supported blockchain network. It also provides a secure identity authentication function, allowing the target object to perform identity authentication and authorization operations on decentralized applications. The resource management client mainly keeps the target object's account private key on the blockchain. The target object's identity is identified by the account private key on the blockchain, and the target object's assets are also managed by the account private key. The transfer, destruction, and transfer of the target object's assets can only be confirmed by signing the transaction through the target object's account private key. The transaction signature is sent directly to the blockchain node by the resource management client or decentralized application. Only the correctly signed transaction blockchain will be executed, and the forged signature blockchain will be rejected and prompted to fail.
[0037] The decentralized application device 300 refers to a device running a decentralized application program. The decentralized application is composed of a front-end interface and a back-end code running on a decentralized peer-to-peer network. The front-end interface includes a web interface or a client interface. Therefore, the decentralized application is usually run on the blockchain, and the target object can directly interact with the blockchain through the decentralized application. For example, the decentralized peer-to-peer network corresponding to the public chain is generally a smart contract. The public chain defines a decentralized application as a transaction protocol, a smart contract or a group of smart contracts executed according to the conditions set on the blockchain. The target object applies for a resource management client signature transaction through the application interface operation, and the back-end forwards and calls the smart contract to the chain transaction.
[0038] For example, in the scenario where a decentralized application is implemented as an application for selling digital collections, a smart contract will be deployed on the blockchain, and this smart contract will manage the digital collection data. The target object can call the private key in the resource management client through the application interface to sign a transaction to purchase a digital collection. It can be understood that a digital collection is a digital content. For example, any artwork or commodity, after being encrypted by digital means, has a unique "digital certificate", and this "digital certificate" can be called a digital collection. Storing digital collections on the blockchain based on blockchain technology can make the digital collections non-tamperable and non-copyable. Each digital collection has a unique blockchain number as the unique identifier of the digital collection on the chain.
[0039] As described in the background technology, in order to ensure the code security of the resource management client, the code of the resource management client is usually not open source. For example, the official version codes of common resource management clients such as metamask and pocket token are not open source, and the code of the open source resource management client is also the code version after the important code content is deleted. Therefore, the blockchain interface and functions supported by the resource management client are developed and maintained by the official, and the update is slow, resulting in a strong monopoly of the resource management client. It only supports the blockchain types and methods recognized by it, and will not support the interface methods of the new blockchain in time, or even ignore it. Even if the resource management client supports the interface method of the new blockchain, the service provider of the resource management client also needs to schedule the development, and the target object also needs to re-download the update package of the resource management client and reinstall it, which has a high time cost. In addition, many new types of blockchains are born every year. Based on the above reasons, the monopoly of the resource management client is very unfriendly to the entrepreneurial developers of the new chain.
[0040] In order to reduce the monopoly power of the resource management client, to realize the open source of the resource management client code, and at the same time reduce the resource management client's code security guarantee, the embodiments of the present application respectively propose a data processing method, a data processing device, an electronic device, a computer-readable storage medium and a computer program product, which will be described in detail through specific embodiments below.
[0041] Figure 2 is a flowchart of a data processing method shown in an exemplary embodiment of the present application. The data processing method is applied to a resource management client, that is, the data processing method is specifically executed by a resource management client device. The resource management client device for executing the data processing method may be Figure 1 A resource management client device 200 is shown in an implementation environment.
[0042] First of all, it should be noted that the resource management client mentioned in this embodiment is used to implement the resource management business function, and based on the resource management business function, realize the communication connection with the decentralized application.
[0043] The resource management client is a tool for managing and storing digital resources. For example, digital resources can be transferred to other accounts based on the resource management client, and digital resources transferred from other accounts can be received based on the resource management client. The resource management client can be a hardware device or a software program. In this application, the resource management client of the target object can establish a communication connection with the decentralized application client to implement related operations such as authorized login of the target object.
[0044] It is understandable that as various decentralized applications are widely deployed on the blockchain, the activities of target objects on the blockchain increase. Generally, when using decentralized applications, target objects can use the blockchain key management tool resource client (also referred to as a decentralized resource client, referred to as the resource management client mentioned in this application) to log in. The address in the resource management client corresponds to an account on the blockchain. The decentralized application can obtain the account address from the resource management client through some interfaces, thereby solving the problem that the decentralized application background cannot trust the account address used when logging in to the decentralized application.
[0045] like Figure 2 As shown, the data processing method includes S210-S230, which are described in detail as follows:
[0046] S210, in response to a call initiated by the decentralized application when connected to the resource management client, detecting whether the resource management client supports data interaction with the target blockchain.
[0047] First of all, it should be noted that the resource management client expands the client functions by installing code plug-ins, which is initiated by the decentralized application in response to the operation of connecting to the resource management client triggered by the target object. Specifically, after the decentralized application detects the connection instruction for the resource management client triggered by the target object, it calls the blockchain detection interface of the resource management client, so that the resource management client responds to the call and detects whether the resource management client itself supports data interaction with the target blockchain.
[0048] It is understandable that the parameters of the target blockchain are carried in the call request initiated by the decentralized application to request the resource management client to detect whether it supports data interaction with the target blockchain. If it does not support, it means that the target blockchain is a new blockchain for the resource management client. If it needs to support interaction with the target blockchain, it is necessary to install the corresponding code plug-in to expand the corresponding client function. If it supports, it means that the installation code of the resource management client has integrated the relevant code for data interaction with the target blockchain, so that the resource management client already has this client function, and the target object can directly use the client function corresponding to the target blockchain through the decentralized application.
[0049] The resource management client detects whether it supports data interaction with the target blockchain, for example, by detecting whether it supports the method of the target blockchain. The decentralized application carries the method name of the target blockchain in the call request, and passes the method name of the target blockchain to the blockchain detection interface of the resource management client, so that it can automatically determine whether it supports the method of the target blockchain.
[0050] In some embodiments, the operation of connecting to the resource management client triggered by the target object is triggered after the target object logs in to the decentralized application. For example, after logging in to the decentralized application, the target object can use the client functions displayed on the application interface of the decentralized application. When the target object wants to use the client functions related to the target blockchain, it can trigger the use of this client function by clicking, etc. After the decentralized application detects the trigger of the target object, it connects to the resource management client and initiates a call to the blockchain detection interface of the resource management client when connecting to the resource management client.
[0051] S220, receiving installation information sent by the decentralized application, where the installation information is generated after the decentralized application determines that the resource management client does not support data interaction with the target blockchain, and is sent after the decentralized application detects an instruction to confirm the installation information, and includes at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in.
[0052] When the resource management client detects that it does not support data interaction with the target blockchain, the decentralized application will apply to the target object to install the code plug-in on the resource management client and obtain the permissions required for the code plug-in. Specifically, it will display installation information to be confirmed, which includes at least one of the information of the code plug-in corresponding to the target blockchain and the permission information applied for by the code plug-in, so that the target object can confirm the installation of the corresponding code plug-in after viewing the installation information.
[0053] Figure 3 A schematic diagram showing the pop-up window displayed in the application interface of a decentralized application can be obtained by Figure 3 The interface pops up a box to display the installation information to be confirmed. The installation information to be confirmed is specifically displayed in the text box. The information of the code plug-in corresponding to the target blockchain contained therein is a link to the code plug-in in the public plug-in library. Based on this link, the resource management client can obtain the corresponding code plug-in from the public plug-in library.
[0054] When the target object confirms the installation information, for example, when the target object clicks Figure 3 When the "Agree" button is clicked, the decentralized application detects the instruction to confirm the installation information, and then sends the installation information confirmed by the target object to the resource management client, so that the resource management client obtains and installs the code plug-in according to the installation information sent by the decentralized application. It can be seen that the installation of the code plug-in by the resource management client is confirmed by the target object, which has greater security.
[0055] In some exemplary embodiments, the installation information includes any one of the information of the code plug-in corresponding to the target blockchain or the permission information applied for by the code plug-in. That is to say, the resource management client can be triggered to obtain and install the code plug-in only after the target object confirms any one of the installation information. During the process of obtaining and installing the code plug-in, if additional installation information is needed, it can be displayed again through the decentralized application for confirmation by the target object. For ease of understanding, for example, if the installation information to be confirmed only includes the link of the code plug-in in the public plug-in library, the resource management client searches whether there is an application permission applied by the code plug-in. If not, it requests the decentralized application to obtain it, and after obtaining the permission information sent by the decentralized application and confirmed by the target object, it can obtain the code plug-in from the public plug-in library and install the code plug-in; or, after receiving the link of the code plug-in in the public plug-in library, the resource management client first obtains the code plug-in from the public plug-in library, and when installing the code plug-in, it detects that the code plug-in applies for application permission, then requests the decentralized application to obtain application permission, and completes the installation of the code plug-in after obtaining the permission information sent by the decentralized application and confirmed by the target object. For another example, if the installation information to be confirmed only includes the permission information applied by the code plug-in, after the resource management client receives the installation information, it confirms that the target object agrees to install the code plug-in, so it requests the decentralized application to obtain the link of the code plug-in confirmed by the target object, and after receiving the link, it obtains the code plug-in from the public plug-in library based on this link, and installs the code plug-in.
[0056] The decentralized application is pre-integrated with a triggering process for using the client function corresponding to the target blockchain. The information of the code plug-in corresponding to the target blockchain and the permission information that the code plug-in needs to apply for are also pre-set in the decentralized application. Therefore, the decentralized application can directly display this information for confirmation by the target object.
[0057] For example, the target blockchain is a new blockchain. Since the signature method is different from that of the existing blockchain, for the entrepreneurial developers of the target blockchain, in order to enable decentralized applications to access their own blockchain, it is necessary to encapsulate the code plug-in of the target blockchain based on the interface protocol provided by the resource management client. The encapsulated code plug-in contains the resource management client's call to the target blockchain interface, such as the signature interface, account limit query interface, etc., and publish the code plug-in to the public plug-in library, which is understood as a public code platform. At the same time, it is also necessary to write the usage document of the code plug-in for decentralized application access. After the decentralized application accesses the target blockchain, it can obtain the information of the code plug-in corresponding to the target blockchain and the permission information that the code plug-in needs to apply for.
[0058] For example, the code plug-in corresponding to the target blockchain mentioned in this embodiment is developed using the javascript scripting language, which is interpreted and executed without compilation, and the code is publicly visible and can be publicly verified, and can be easily injected into the code of the resource management client. Of course, this embodiment does not limit the development language of the code plug-in, and it can be selected as needed in actual application scenarios.
[0059] S230, obtaining a code plug-in from a public plug-in library, and installing the code plug-in.
[0060] After the resource management client receives the installation information sent by the decentralized application and confirmed by the target object, based on the record in S220, it can obtain the code plug-in from the public plug-in library based on the information of the code plug-in corresponding to the target blockchain, and install the code plug-in based on the permission information applied for by the code plug-in, so that the resource management client can support interaction with the target blockchain.
[0061] In some exemplary embodiments, the installation information sent by the decentralized application to the resource management client also includes a content fingerprint hash of the code plug-in. The content fingerprint hash is written by the developer in the usage document for connecting the decentralized application to the target blockchain, and is obtained by performing a hash operation on the characteristic information of the code plug-in. Therefore, the content fingerprint hash represents the real code content information of the code plug-in.
[0062] When the resource management client obtains the code plug-in from the public plug-in library, it also obtains the content fingerprint hash of the code plug-in. This content fingerprint hash can be obtained by the public plug-in library performing the same hash operation based on the feature information of the code plug-in, or it can be obtained by the resource management client performing the same hash operation based on the feature information of the code plug-in after obtaining the code plug-in from the public plug-in library. It should be noted that the feature information of the code plug-in can be all or part of the code content of the code plug-in, which is not limited here.
[0063] Therefore, if the resource management client determines that the content fingerprint hash obtained from the public plug-in library is the same as the content fingerprint hash sent by the decentralized application, it means that the code plug-in in the public code library has not been tampered with, or the intermediate network link through which the resource management client obtains the code plug-in from the public plug-in library has not been attacked, thereby ensuring that the installation process of the code plug-in is safe.
[0064] Figure 4This is an exemplary interactive flow diagram of code plug-in installation. The flow shows that when the target object has logged into the decentralized application and connected to the resource management client, it will specify which code plug-in the resource management client will install to expand the client function, and which authorizations the installed code plug-in will apply for. Next, the resource management client pulls the code plug-in from the public plug-in library and injects the pulled code plug-in into its own module to complete the installation of the code plug-in. After the code plug-in is successfully installed, the resource management client will remain connected to the decentralized application.
[0065] It should be noted that the life cycle of the code plug-in ends after the connection is disconnected. When the resource management client detects that the connection between itself and the decentralized application is disconnected, it will invalidate the code plug-in, thereby ending the life cycle of the code plug-in.
[0066] For example, the invalidation process of the plug-in code can be to uninstall the code plug-in from the resource management client. When data interaction with the target blockchain is required next time, the code plug-in installation process recorded above can be repeated. In this way, when data interaction with the target blockchain is required next time, the target blockchain is still a new blockchain for the resource management client. Alternatively, the invalidation process of the plug-in code can also be to terminate the operation of the plug-in code. When data interaction with the target blockchain is required next time, the resource management client restarts the plug-in code to implement the corresponding client function through the plug-in code.
[0067] That is to say, as long as neither the decentralized application nor the resource management client disconnects the current connection, the resource management client will continue to run and retain the code plug-in. For example, the connection interruption between the resource management client and the decentralized application is, for example, the account logged in to the decentralized application logs out, or there is a network connection failure between the resource management client and the decentralized application, etc. This embodiment will not be listed one by one here.
[0068] As can be seen from the above, in the method provided in this embodiment, in the scenario where the resource management client needs to support a new blockchain, since the target blockchain is a new blockchain for the resource management client, the decentralized application will initiate a call to detect whether it supports data interaction with the new blockchain when connecting to the resource management client. The blockchain will detect that it does not support data interaction with the target blockchain, so it will continue to receive the installation information sent by the decentralized application and confirmed by the target object, and then obtain and install the corresponding code plug-in from the public plug-in library based on the installation information, thereby enabling the resource management client to safely expand the client function without changing the code.
[0069] Therefore, the method provided in this embodiment has at least the following beneficial effects:
[0070] First, since the code of the resource management client does not need to be modified, the code of the resource management client can be open source to provide new blockchain entrepreneurs with code plug-ins for new blockchains, which can avoid the monopoly problem of the resource management client;
[0071] Secondly, entrepreneurs of new blockchains only need to develop code plug-ins and publish them to the public plug-in library. When decentralized applications want to connect to the resource management client to operate the target blockchain, the resource management client can automatically install the corresponding code plug-in to support the interface method of the new blockchain. This is very timely and therefore very friendly to entrepreneurs of new blockchains.
[0072] Thirdly, since the installation of the code plug-in is also confirmed by the target object through the decentralized application, the security of the resource management client can also be guaranteed;
[0073] Fourthly, the resource management client can install corresponding code plug-ins as needed to expand the client functions. After the target object installs the resource management client, it basically does not need to be updated, and only the code plug-ins need to be updated. Therefore, it can well support the resource management client's ability to dynamically expand new blockchains.
[0074] Figure 5 is Figure 2 A flow chart of another data processing method proposed based on the illustrated embodiment.
[0075] like Figure 5 As shown, the data processing method also includes S510-S520, which are described in detail as follows:
[0076] S510, receiving transaction parameters sent by the decentralized application.
[0077] After the decentralized application constructs a transaction based on the relevant operations of the target object in the application interface, since the transaction needs to be uploaded to the target blockchain, the account private key saved by the resource management client is required to sign the transaction, so the transaction parameters are sent to the resource management client.
[0078] In an exemplary embodiment, the transaction parameters are carried in the signature application sent by the decentralized application to the resource management client, that is, the decentralized application applies to the resource management client for transaction signature. After receiving the signature application, the resource management client queries whether the code plug-in supports signature processing of the transaction parameters in response to the signature application, for example, by querying whether there is a matching signature method in the code plug-in. If yes, the decentralized application is requested to display the signature information to be confirmed, and S520 is executed when an instruction indicating confirmation of the signature information is detected.
[0079] Figure 6This is a schematic diagram of an exemplary decentralized application displaying signature information to be confirmed, such as Figure 6 As shown, the signature information to be confirmed includes the application information for the signature application and the signature content. In some embodiments, it may only contain either the application information for the signature application or the signature content, which is not limited here. The application information for the signature application is, for example, the application name or the application website. By displaying the application information for the signature application, the target object can know the source of the signature application to avoid attacks and dangers. If the target object clicks the "Agree" button, the decentralized application will detect the instruction to confirm the signature information accordingly.
[0080] For example, the resource management client may request the decentralized application to display the signature information to be confirmed by the following code:
[0081]
[0082] Specifically, the resource management client provides the interface method of plugin_dialog as shown above. As long as the code plug-in is run, a pop-up window with a fixed style will pop up, providing two parameter inputs, title title and text box content. Based on the above code, the code plug-in will place the application information and signature content for the signature application. Request is the object passed by the decentralized application, which contains the application information of the decentralized application and the transaction parameters to be signed. The switch and case syntaxes are interface methods that match the resource management client, but the method to be called is new_chain_sign, which is the user interface UI ((User Interface, target object interface) of the decentralized application. The method for signing the new blockchain is customized. Await represents waiting for the target object operation. Result is true, which means that the target object agrees. The logical operation of obtaining the private key from the resource management client for signature processing is executed. GetPriKey is the private key method provided by the resource management client. The code plug-in calls to obtain the private key and passes in its own encapsulated signature method. After signing, the result is returned to the decentralized application.
[0083] That is, through the above code, the resource management client can implement the signature function corresponding to the target blockchain based on the code plug-in extension.
[0084] S520, the transaction parameters and the private key corresponding to the login account in the decentralized application are passed into the code plug-in, so that the code plug-in signs the transaction parameters based on the private key to obtain the corresponding transaction signature.
[0085] After receiving the transaction parameters sent by the decentralized application, the resource management client passes the transaction parameters and the private key corresponding to the login account in the decentralized application to the code plug-in, so that the code plug-in uses the private key to sign the transaction parameters and obtain the corresponding transaction signature.
[0086] In some exemplary embodiments, after the resource management client obtains the transaction signature, it returns the transaction signature to the decentralized application, so that the decentralized application performs the chain processing of the corresponding transaction parameters. The process of the decentralized application performing the chain processing of the transaction parameters is, for example, that the decentralized application broadcasts the transaction signature to the blockchain network, so that the blockchain network performs the chain processing of the corresponding transaction parameters after verifying the transaction signature.
[0087] In other exemplary embodiments, the resource management client directly broadcasts the transaction signature to the blockchain network, so that the blockchain network performs on-chain processing of the corresponding transaction parameters after verifying the transaction signature.
[0088] Since the data on the blockchain is public and cannot be tampered with, transactions can be initiated on the chain by either the resource management client or the decentralized application. The choice can be made based on actual application needs and there is no restriction here.
[0089] Figure 7 This is an exemplary flow chart of a transaction on-chain based on the target blockchain, such as Figure 7 As shown, after the decentralized application constructs the transaction, it applies for a signature from the resource management client. The resource management client queries whether the code plug-in matches the matching signature method. If so, it means that the code plug-in can execute the transaction signature. Therefore, it requests the decentralized application to display the signature information that requires the target object to confirm the signature in a pop-up box. After the target object agrees, the resource management client passes the transaction parameters and private key to the code plug-in, so that the code plug-in executes the signature method and uses the private key to sign the transaction parameters to obtain the transaction signature. The resource management client returns the transaction signature to the decentralized application, so that the decentralized application broadcasts the transaction signature to the blockchain network where the target blockchain is located, so that the transaction is chained to the target blockchain.
[0090] As can be seen from the above, the method provided in this embodiment is to enable the resource management client to expand the signature function for the target blockchain by installing a code plug-in in the resource management client, and during the use of the signature function, the target object is also required to confirm the signature information, thereby further ensuring the security of the use of the resource management client.
[0091] If you need to expand more client functions based on the target blockchain, such as querying balances, you can add case matching logic to the above code. In other words, the code plug-in can support multiple functional methods. By installing the code plug-in in the resource management client, the resource management client can expand at least one client function.
[0092] The following code illustrates the addition of case matching logic. “case'new_chain_address_balance':” means matching the resource management client’s interface method new_chain_address_balance, which is a method customized by the decentralized application’s UI to query the balance of the new blockchain.
[0093]
[0094] It can also be seen from the above that in the conventional plug-in operation, the plug-in is isolated from the native application interface. For example, after installing a plug-in for a certain application, the plug-in will not call the application front-end interface during operation. In the operation of the code plug-in in this embodiment, the decentralized application will provide some interface methods for the code plug-in to call, such as UI components, including pop-up boxes, text boxes, etc., and cooperate to display the relevant operation information required by the code plug-in when the decentralized application needs to call the code plug-in. Therefore, the installation and operation process of the code plug-in involved in this application is obviously different from the installation and operation process of the conventional plug-in.
[0095] Figure 8 is a flowchart of a data processing method shown in another exemplary embodiment of the present application. The data processing method is applied to a decentralized application, that is, the data processing method is specifically executed by a decentralized application device. The decentralized application device for executing the data processing method may be Figure 1 A decentralized application device 300 in the illustrated implementation environment.
[0096] like Figure 8 As shown, the data processing method includes S810-S830, which are described in detail as follows:
[0097] S810: If a connection instruction for the resource management client is detected, determine whether the resource management client supports data interaction with the target blockchain by calling the blockchain detection interface of the resource management client.
[0098] As described in the above-mentioned embodiment, after the decentralized application detects the connection instruction for the resource management client triggered by the target object, it calls the blockchain detection interface of the resource management client, so that the resource management client responds to the call and detects whether the resource management client itself supports data interaction with the target blockchain.
[0099] The parameters of the target blockchain are carried in the call request initiated by the decentralized application to request the resource management client to detect whether it supports data interaction with the target blockchain. If the resource management client does not support data interaction with the target blockchain, it means that the target blockchain is a new blockchain for the resource management client. If you need to support interaction with the target blockchain, you need to install the corresponding code plug-in to expand the corresponding client functions.
[0100] In some exemplary embodiments, the operation of connecting to the resource management client triggered by the target object is triggered after the target object logs in to the decentralized application. For example, after logging in to the decentralized application, the target object can use the client functions displayed on the application interface of the decentralized application. When the target object wants to use the client functions related to the target blockchain, it can trigger the use of this client function by clicking, etc. After the decentralized application detects the trigger of the target object, it connects to the resource management client and initiates a call to the blockchain detection interface of the resource management client when connecting to the resource management client.
[0101] In some exemplary embodiments, the decentralized application displays an application interface, and if it is detected that an entry in the application interface for connecting to a resource management client is triggered, a connection instruction for the resource management client is generated.
[0102] S820: If it is determined that the resource management client does not support data interaction with the target blockchain, installation information to be confirmed is displayed, where the installation information includes at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in.
[0103] When the resource management client detects that it does not support data interaction with the target blockchain, the decentralized application will apply to the target object to install the code plug-in on the resource management client and obtain the permissions required by the code plug-in. Specifically, it will display the installation information to be confirmed, which includes at least one of the information of the code plug-in corresponding to the target blockchain and the permission information applied by the code plug-in, so that the target object can confirm the installation of the corresponding code plug-in after viewing the installation information. For example Figure 3 As shown, a pop-up box can be displayed in a decentralized application to show the target object the installation information to be confirmed. If the target object clicks the "Agree" button, it means that the target object has confirmed the installation information.
[0104] In some exemplary embodiments, the installation information includes any one of the information of the code plug-in corresponding to the target blockchain or the permission information applied for by the code plug-in. That is to say, the resource management client can be triggered to obtain and install the code plug-in only after the target object confirms any one of the installation information. During the process of obtaining and installing the code plug-in, if additional installation information is required, it can be displayed again through the decentralized application for confirmation by the target object. The detailed process can be found in the records of the aforementioned embodiments, and will not be repeated here.
[0105] In some exemplary embodiments, the information of the code plug-in included in the installation information includes an installation link of the code plug-in, such as Figure 3 The information of the code plug-in displayed in is the installation link. If the installation link is detected to be triggered, the public plug-in library page corresponding to the installation link will be jumped to obtain the introduction information of the code plug-in. The target object can verify whether there is a problem with the code plug-in based on the introduction information of the code plug-in. If there is a problem, for example, the code plug-in is a replaced code plug-in, it can be reported to the maintainer of the public plug-in library for removal, thereby maintaining the security of the public plug-in library to a certain extent.
[0106] The decentralized application is pre-integrated with a triggering process for using the client function corresponding to the target blockchain. The information of the code plug-in corresponding to the target blockchain and the permission information that the code plug-in needs to apply for are also pre-set in the decentralized application. Therefore, the decentralized application can directly display this information for confirmation by the target object.
[0107] For example, the target blockchain is a new blockchain. Since the signature method is different from that of the existing blockchain, for the entrepreneurial developers of the target blockchain, in order to enable decentralized applications to access their own blockchain, it is necessary to encapsulate the code plug-in of the target blockchain based on the interface protocol provided by the resource management client. The encapsulated code plug-in contains the resource management client's call to the target blockchain interface, such as the signature interface, account limit query interface, etc., and publish the code plug-in to the public plug-in library, which is understood as a public code platform. At the same time, it is also necessary to write the usage document of the code plug-in for decentralized application access. After the decentralized application accesses the target blockchain, it can obtain the information of the code plug-in corresponding to the target blockchain and the permission information that the code plug-in needs to apply for.
[0108] S830: If an instruction to confirm the installation information is detected, the installation information is sent to the resource management client so that the resource management client can install the code plug-in.
[0109] If the decentralized application detects an instruction to confirm the installation information, it indicates that the signature information is displayed and confirmed by the target object, so the installation information confirmed by the target object is sent to the resource management client, so that the resource management client can safely install the code plug-in.
[0110] In some exemplary embodiments, the installation information sent by the decentralized application to the resource management client also includes a content fingerprint hash of the code plug-in. The content fingerprint hash is written by the developer in the usage document for connecting the decentralized application to the target blockchain, and is obtained by performing a hash operation on the characteristic information of the code plug-in. Therefore, the content fingerprint hash represents the real code content information of the code plug-in.
[0111] When the resource management client obtains the code plug-in from the public plug-in library, it also obtains the content fingerprint hash of the code plug-in. This content fingerprint hash can be obtained by the public plug-in library performing the same hash operation based on the feature information of the code plug-in, or it can be obtained by the resource management client performing the same hash operation based on the feature information of the code plug-in after obtaining the code plug-in from the public plug-in library. It should be noted that the feature information of the code plug-in can be all or part of the code content of the code plug-in, which is not limited here.
[0112] Therefore, if the resource management client determines that the content fingerprint hash obtained from the public plug-in library is the same as the content fingerprint hash sent by the decentralized application, it means that the code plug-in in the public code library has not been tampered with, or the intermediate network link through which the resource management client obtains the code plug-in from the public plug-in library has not been attacked, thereby ensuring that the installation process of the code plug-in is safe.
[0113] As can be seen from the above, in the method provided in this embodiment, in the scenario where the resource management client needs to support a new blockchain, since the target blockchain is a new blockchain for the resource management client, the decentralized application will initiate a call to detect whether it supports data interaction with the new blockchain when connecting to the resource management client. The blockchain will detect that it does not support data interaction with the target blockchain, so it will continue to receive the installation information sent by the decentralized application and confirmed by the target object, and then obtain and install the corresponding code plug-in from the public plug-in library based on the installation information, thereby enabling the resource management client to safely expand the client function without changing the code.
[0114] It should be understood that the data processing method proposed in this embodiment is for Figure 2The data processing method proposed in the embodiment shown is accordingly proposed, so the beneficial effects achieved by this embodiment are consistent with the beneficial effects achieved by the previous embodiment, and will not be repeated here. At the same time, many technical implementation details of the data processing method proposed in this embodiment are not elaborated in detail in this embodiment. If you need to refer to Figure 2 The description in the illustrated embodiment.
[0115] Fig. 9 is Figure 8 FIG. 1 is a flow chart of another data processing method proposed based on the embodiment shown in FIG. Fig. 9 As shown, the data processing method applied to decentralized applications further includes S910-S930, which are described in detail as follows:
[0116] S910, sending a signature request including transaction parameters to the resource management client.
[0117] After the decentralized application constructs a transaction based on the relevant operations of the target object in the application interface, since the transaction needs to be uploaded to the target blockchain, the account private key saved by the resource management client is required to sign the transaction. Therefore, a signature request containing transaction parameters is sent to the resource management client.
[0118] After receiving the signature application, the resource management client responds to the signature application by querying whether the code plug-in supports signature processing of transaction parameters, for example, by querying whether the code plug-in has a matching signature method. If so, a display request is returned to the decentralized application to request the decentralized application to display the signature information to be confirmed.
[0119] S920, in response to the display request returned by the resource management client, display the signature information to be confirmed, where the signature information includes at least one of application information for applying for signature and signature content, where the signature content includes transaction parameters.
[0120] The decentralized application responds to the display request returned by the resource management client and displays the signature information to be confirmed, for example Figure 6 As shown, the signature information to be confirmed includes the application information for the signature application and the signature content. In some embodiments, it may only contain either the application information for the signature application or the signature content, which is not limited here. The application information for the signature application is, for example, the application name or the application website. By displaying the application information for the signature application, the target object can know the source of the signature application to avoid attacks and dangers. If the target object confirms the signature information displayed by the decentralized application, for example, the target object clicks Figure 6 The “Agree” button is clicked as shown in the figure, and the decentralized application detects the instruction to confirm the signature information accordingly.
[0121] S930, sending an instruction for confirming the signature information to the resource management client, so that the resource management client performs signature processing on the transaction parameters through the code plug-in to obtain a transaction signature.
[0122] After the signature information is confirmed by the target object, the decentralized application sends the instruction to confirm the signature to the resource management client, so that the resource management client can sign the transaction parameters through the code plug-in to obtain the transaction signature. As mentioned above, the resource management client passes the transaction parameters and the private key corresponding to the login account in the decentralized application to the code plug-in, so that the code plug-in uses the private key to sign the transaction parameters and obtain the corresponding transaction signature.
[0123] In some exemplary embodiments, after obtaining the transaction signature, the resource management client returns the transaction signature to the decentralized application, so that the decentralized application performs on-chain processing of the corresponding transaction parameters. Specifically, the process of the decentralized application performing on-chain processing of the transaction parameters is, for example, broadcasting the transaction signature to the blockchain network, so that the blockchain network performs on-chain processing of the corresponding transaction parameters after verifying the transaction signature.
[0124] As can be seen from the above, the method provided in this embodiment is to enable the resource management client to expand the signature function for the target blockchain by installing a code plug-in in the resource management client, and during the use of the signature function, the target object is also required to confirm the signature information, further ensuring the security of the resource management client. The code plug-in can support multiple functional methods. By installing the code plug-in in the resource management client, the resource management client can be extended with at least one client function.
[0125] Fig.10 is a flowchart of a data processing device according to an exemplary embodiment of the present application. The data processing device 1000 is configured on a resource management client device, for example, Figure 1 The resource management client device 200 in the illustrated implementation environment includes an interaction detection module 1010 , an installation information receiving module 1020 and a plug-in installation module 1030 .
[0126] The interaction detection module 1010 is configured to detect whether the resource management client supports data interaction with the target blockchain in response to a call initiated by the decentralized application when connected to the resource management client. The installation information receiving module 1020 is configured to receive the installation information sent by the decentralized application, which is generated after the decentralized application determines that the resource management client does not support data interaction with the target blockchain, and is sent after the decentralized application detects an instruction to confirm the installation information, and the installation information includes at least one of the information of the code plug-in corresponding to the target blockchain and the permission information applied for by the code plug-in. The plug-in installation module 1030 is configured to obtain the code plug-in from the public plug-in library and install the code plug-in.
[0127] In another exemplary embodiment, the data processing device 1000 further includes a transaction parameter receiving module and a data input module.
[0128] The transaction parameter receiving module is configured to receive the transaction parameters sent by the decentralized application. The data input module is configured to input the transaction parameters and the private key corresponding to the login account in the decentralized application into the code plug-in, so that the code plug-in signs the transaction parameters based on the private key to obtain the corresponding transaction signature.
[0129] In another exemplary embodiment, the data processing device 1000 also includes a signature application response module, which is configured to query whether the code plug-in supports signature processing of transaction parameters in response to the signature application; if so, request the decentralized application to display the signature information to be confirmed, and the signature information includes at least one of the application information for the signature application and the signature content; when an instruction indicating confirmation of the signature information is detected, jump to the data input module.
[0130] In another exemplary embodiment, the data processing device 1000 also includes a transaction signature processing module, which is configured to return the transaction signature to the decentralized application so that the decentralized application can perform on-chain processing of the corresponding transaction parameters; or directly broadcast the transaction signature to the blockchain network so that the blockchain network can perform on-chain processing of the corresponding transaction parameters after verifying the transaction signature.
[0131] In another exemplary embodiment, the installation information also contains the content fingerprint hash of the code plug-in; the plug-in installation module 1030 is configured to obtain the content fingerprint hash of the code plug-in from the public plug-in library; if it is determined that the content fingerprint hash obtained from the public plug-in library is the same as the content fingerprint hash sent by the decentralized application, the code plug-in is installed.
[0132] In another exemplary embodiment, the data processing device 1000 further includes a connection disconnection processing module configured to perform invalidation processing on the code plug-in when a connection disconnection between the resource management client and the decentralized application is detected.
[0133] Fig.11 is a flowchart of a data processing device shown in an exemplary embodiment of the present application. The data processing device 1100 is configured on a decentralized application device, for example, Figure 1 The decentralized application device 300 in the illustrated implementation environment includes a detection and calling module 1110 , an installation information confirmation module 1120 , and an installation information sending module 1130 .
[0134] The detection calling module 1110 is configured to determine whether the resource management client supports data interaction with the target blockchain by calling the blockchain detection interface of the resource management client if a connection instruction for the resource management client is detected. The installation information confirmation module 1120 is configured to display the installation information to be confirmed if it is determined that the resource management client does not support data interaction with the target blockchain, and the installation information includes at least one of the information of the code plug-in corresponding to the target blockchain and the permission information applied for by the code plug-in. The installation information sending module 1130 is configured to send the installation information to the resource management client if an instruction indicating confirmation of the installation information is detected, so that the resource management client can install the code plug-in.
[0135] In another exemplary embodiment, the data processing device 1100 further includes a signature application sending module, a signature information display module and an instruction sending module.
[0136] The signature application sending module is configured to send a signature application including transaction parameters to the resource management client. The signature information display module is configured to display the signature information to be confirmed in response to the display request returned by the resource management client, and the signature information includes at least one of the application information and signature content of the signature application, and the signature content includes the transaction parameters. The instruction sending module is configured to send an instruction to confirm the signature information to the resource management client, so that the resource management client can sign the transaction parameters through the code plug-in to obtain the transaction signature.
[0137] In another exemplary embodiment, the data processing device 1100 also includes a transaction signature broadcast module, which is configured to receive the transaction signature returned by the resource management client and broadcast the transaction signature to the blockchain network, so that the blockchain network performs on-chain processing of the corresponding transaction parameters after verifying the transaction signature.
[0138] In another exemplary embodiment, the data processing device 1100 also includes an application interface trigger module, which is configured to display the application interface of the decentralized application. If it is detected that the entrance for connecting to the resource management client in the application interface is triggered, a connection instruction for the resource management client is generated.
[0139] In another exemplary embodiment, the information of the code plug-in included in the installation information includes an installation link of the code plug-in; the data processing device 1100 also includes a link jump module, which is configured to jump and display a public plug-in library page corresponding to the installation link if it is detected that the installation link is triggered, so as to obtain the introduction information of the code plug-in.
[0140] It should be noted that the data processing device provided in the above embodiment and the data processing method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In practical applications, the data processing device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0141] In the scenario where the resource management client needs to support a new blockchain, the above data processing device, since the target blockchain is a new blockchain for the resource management client, the decentralized application will initiate a call to detect whether it supports data interaction with the new blockchain when connected to the resource management client. The blockchain will detect that it does not support data interaction with the target blockchain, so it will continue to receive the installation information sent by the decentralized application and confirmed by the target object, and then obtain and install the corresponding code plug-in from the public plug-in library based on the installation information, thereby realizing that the resource management client can safely expand the client function without changing the code. Since the code of the resource management client does not need to be modified, the code of the resource management client can be open source to avoid the monopoly problem of the resource management client. Entrepreneurs of the new blockchain only need to develop code plug-ins and publish them to the public plug-in library. When the decentralized application is connected to the resource management client, the resource management client can automatically install the corresponding code plug-in to support the interface method of the new blockchain, which is very timely and therefore very friendly to entrepreneurs of the new blockchain. And since the installation of the code plug-in is also confirmed by the target object through the decentralized application, the security of the resource management client can also be guaranteed.
[0142] An embodiment of the present application also provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the data processing method provided in the above-mentioned embodiments.
[0143] Fig.12 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0144] like Fig.12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM) 1203, such as executing the method described in the above embodiment. In the RAM 1203, various programs and data required for system operation are also stored. The CPU 1201, the ROM 1202 and the RAM 1203 are connected to each other through the bus 1204. The input / output (I / O) interface 1205 is also connected to the bus 1204.
[0145] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed so that a computer program read therefrom is installed into the storage section 1208 as needed.
[0146] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1209, and / or installed from a removable medium 1211. When the computer program is executed by a central processing unit (CPU) 1201, various functions defined in the system of the present application are executed.
[0147] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer program contained in the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0148] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0149] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0150] Another aspect of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the data processing method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0151] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the data processing method provided in each of the above embodiments.
[0152] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
[0153] It should also be noted that in the specific implementation of this application, it involves relevant data and operations in the resource management client, as well as relevant data and operations in decentralized applications. When the above embodiments of this application are applied to specific products or technologies, user permission or confirmation is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
Claims
1. A data processing method, characterized in that: Applied to a resource management client, the method comprises: In response to a call initiated by the decentralized application when connected to the resource management client, detecting whether the resource management client supports data interaction with the target blockchain; receiving installation information sent by the decentralized application, wherein the installation information is generated after the decentralized application determines that the resource management client does not support data interaction with the target blockchain, and is sent after the decentralized application detects an instruction to confirm the installation information, and the installation information includes at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in; The code plug-in is obtained from a public plug-in library, and the code plug-in is installed.
2. The method according to claim 1, characterized in that The method further comprises: Receiving transaction parameters sent by the decentralized application; The transaction parameters and the private key corresponding to the login account in the decentralized application are passed into the code plug-in, so that the code plug-in signs the transaction parameters based on the private key to obtain the corresponding transaction signature.
3. The method according to claim 2, characterized in that The transaction parameters are carried in the signature application sent by the decentralized application; the method further includes: In response to the signature application, query whether the code plug-in supports signature processing of the transaction parameters; If yes, request the decentralized application to display signature information to be confirmed, where the signature information includes at least one of application information for which the signature is requested and signature content; When an instruction indicating confirmation of the signature information is detected, the step of transferring the transaction parameters and the private key corresponding to the login account in the decentralized application into the code plug-in is executed.
4. The method according to claim 2, characterized in that: The method further comprises: Returning the transaction signature to the decentralized application so that the decentralized application can process the corresponding transaction parameters on-chain; Alternatively, the transaction signature is directly broadcast to the blockchain network, so that the blockchain network performs on-chain processing of the corresponding transaction parameters after verifying the transaction signature.
5. The method according to claim 1, characterized in that The installation information also contains the content fingerprint hash of the code plug-in; The step of obtaining the code plug-in from a public plug-in library and installing the code plug-in includes: Obtain a content fingerprint hash of the code plug-in from a public plug-in library; If it is determined that the content fingerprint hash obtained from the public plug-in library is the same as the content fingerprint hash sent by the decentralized application, the code plug-in is installed.
6. The method according to claim 1, characterized in that The method further comprises: When it is detected that the connection between the resource management client and the decentralized application is disconnected, the code plug-in is invalidated.
7. A data processing method, characterized in that: Applied to decentralized applications, the method includes: If a connection instruction for the resource management client is detected, determine whether the resource management client supports data interaction with the target blockchain by calling the blockchain detection interface of the resource management client; If it is determined that the resource management client does not support data interaction with the target blockchain, displaying installation information to be confirmed, the installation information including at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in; If an instruction indicating confirmation of the installation information is detected, the installation information is sent to the resource management client so that the resource management client installs the code plug-in.
8. The method according to claim 7, characterized in that The method further comprises: Sending a signature request including transaction parameters to the resource management client; In response to the display request returned by the resource management client, display the signature information to be confirmed, the signature information including at least one of application information for signature application and signature content, the signature content including the transaction parameter; An instruction for confirming the signature information is sent to the resource management client, so that the resource management client performs signature processing on the transaction parameters through the code plug-in to obtain a transaction signature.
9. The method according to claim 8, characterized in that The method further comprises: Receiving the transaction signature returned by the resource management client; The transaction signature is broadcasted to the blockchain network, so that the blockchain network performs on-chain processing of the corresponding transaction parameters after verifying the transaction signature.
10. The method according to claim 7, characterized in that The method further comprises: Displaying the application interface of the decentralized application; If it is detected that the entry in the application interface for connecting to the resource management client is triggered, the connection instruction for the resource management client is generated.
11. The method according to claim 7, characterized in that The information of the code plug-in included in the installation information includes an installation link of the code plug-in; and the method further includes: If it is detected that the installation link is triggered, the public plug-in library page corresponding to the installation link is jumped and displayed to obtain the introduction information of the code plug-in.
12. A data processing device, characterized in that: Configured on a resource management client device, the device includes: an interaction detection module, configured to detect, in response to a call initiated by the decentralized application when connected to the resource management client, whether the resource management client supports data interaction with the target blockchain; An installation information receiving module, configured to receive installation information sent by the decentralized application, wherein the installation information is generated after the decentralized application determines that the resource management client does not support data interaction with the target blockchain, and is sent after the decentralized application detects an instruction to confirm the installation information, and the installation information includes at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in; The plug-in installation module is configured to obtain the code plug-in from the public plug-in library and install the code plug-in.
13. A data processing device, characterized in that: Configured on a decentralized application device, the device includes: A detection calling module is configured to determine whether the resource management client supports data interaction with the target blockchain by calling the blockchain detection interface of the resource management client if a connection instruction for the resource management client is detected; An installation information confirmation module, configured to display installation information to be confirmed if it is determined that the resource management client does not support data interaction with the target blockchain, the installation information including at least one of information of a code plug-in corresponding to the target blockchain and permission information applied for by the code plug-in; The installation information sending module is configured to send the installation information to the resource management client if an instruction indicating confirmation of the installation information is detected, so that the resource management client installs the code plug-in.
14. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the data processing method as described in any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the data processing method according to any one of claims 1 to 11.
