Multi-level cross-chain collaboration method, device, computer equipment and storage medium
By obtaining and processing collaboration information, and using the target collaboration method in the preset collaboration method set to perform cross-chain collaboration processing, the problem of low collaboration security in multi-level cross-chain collaboration is solved, and open, transparent and efficient cross-chain collaboration is achieved. .
Patent Information
- Application Number
- CN202111603040.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-12-24
AI Technical Summary
In the multi-level cross-chain collaboration process of the blockchain, the existing technology has the problem of low collaboration security, especially the problems of data being easily tampered and low transmission efficiency caused by off-chain negotiation and off-chain scheduling.
By obtaining collaboration information, including collaboration data, blockchain level number and collaboration type, the corresponding blockchain to be collaborated is obtained, and the target collaboration method is obtained from the preset collaboration method set, and collaborative processing is performed based on the target collaboration method to ensure The openness, transparency and traceability of collaborative processing improve the efficiency and security of cross-chain collaboration.
It achieves openness, transparency and traceability of multi-level cross-chain collaboration, improves the security and efficiency of cross-chain collaboration, and ensures the authenticity and validity of data.
Smart Images

Figure CN114499963B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain, and in particular to a multi-level cross-chain collaboration method, device, computer equipment and storage medium. Background Art
[0002] In the multi-level cross-chain collaboration process of blockchain, there are at least two scenarios: first, the management agencies on different collaborative chains at the same level simultaneously coordinate the management of the lower-level collaborative chains; second, during the execution of collaborative instructions, the collaborative instructions may not be executed normally due to the lack of certain collaborative rules.
[0003] In scenario one, the existing method is to solve the problem by means of off-chain negotiation, that is, different management agencies reach an agreement on whether to issue collaborative instructions or collaborative rules off-chain through meetings, etc., and then the management agency that initiates the request directly issues them. This results in a process that is not open and transparent enough, and is inefficient, data is easily tampered with, and when problems arise, it is impossible to trace the management agency at the same level. In scenario two, the existing method is to request the missing part of the collaborative rules from other management agencies on the same chain or from other collaborative chains at the same level, so that the collaborative instructions can be successfully executed. However, since the collaborative data is stored off-chain, the management agencies have their own off-chain collaborative rule databases. The existing method makes the data easy to be tampered with, and the data transmission security and efficiency are low.
[0004] Therefore, in the existing blockchain management, there is a problem of low collaboration security due to the need for off-chain negotiation and off-chain scheduling for multi-level cross-chain collaboration. Summary of the invention
[0005] Embodiments of the present invention provide a multi-level cross-chain collaboration method, apparatus, computer equipment, and storage medium to improve the security of multi-level cross-chain collaboration.
[0006] A multi-level cross-chain collaboration method, comprising:
[0007] Acquire collaboration information, wherein the collaboration information includes collaboration data, the level number of the blockchain where the collaboration data is located, and the collaboration type;
[0008] Obtain at least one blockchain corresponding to the level number of the blockchain where the collaborative data is located as the blockchain to be coordinated;
[0009] Acquire a collaboration mode corresponding to the collaboration type from a preset collaboration mode set as a target collaboration mode;
[0010] Based on the target collaboration mode, the collaborative data is collaboratively processed using the blockchain to be collaborated to obtain a collaborative result.
[0011] A multi-level cross-chain collaboration device, comprising:
[0012] A collaborative information acquisition module, used to acquire collaborative information, wherein the collaborative information includes collaborative data, the level number of the blockchain where the collaborative data is located, and the collaborative type;
[0013] A module for obtaining a blockchain to be coordinated, used to obtain at least one blockchain corresponding to the level number of the blockchain where the coordinated data is located as the blockchain to be coordinated;
[0014] A target collaboration mode acquisition module, used to acquire a collaboration mode corresponding to the collaboration type from a preset collaboration mode set as a target collaboration mode;
[0015] The collaborative result acquisition module is used to collaboratively process the collaborative data using the to-be-collaborated blockchain based on the target collaborative mode to obtain a collaborative result.
[0016] A computer device comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned multi-level cross-chain collaboration method when executing the computer program.
[0017] A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned multi-level cross-chain collaboration method.
[0018] The multi-level cross-chain collaboration method, device, computer equipment and storage medium provided by the embodiment of the present invention obtains collaboration information, wherein the collaboration information includes collaboration data, the level number of the blockchain where the collaboration data is located, and the collaboration type; obtains at least one blockchain corresponding to the level number of the blockchain where the collaboration data is located as the blockchain to be collaborated; obtains the collaboration method corresponding to the collaboration type from the preset collaboration method set as the target collaboration method; based on the target collaboration method, the blockchain to be collaborated is used to perform collaborative processing on the collaborative data to obtain a collaborative result. Through the target collaboration method, the blockchain to be collaborated is used to perform a collaborative processing process corresponding to the target collaboration method on the collaborative data, so that the collaborative processing is open, transparent and traceable, and data on different blockchains are shared, so that the efficiency of multi-level cross-chain collaboration is improved while improving the security of multi-level cross-chain collaboration. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0020] Figure 1 This is a schematic diagram of an application environment of a multi-level cross-chain collaboration method in one embodiment of the present invention;
[0021] Figure 2 is a flow chart of a multi-level cross-chain collaboration method in one embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of the structure of a multi-level cross-chain collaboration device in one embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The multi-level cross-chain collaboration method provided in this application can be applied in Figure 1 In an application environment, a computer device communicates with a server via a network. The computer device may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0026] In one embodiment, if Figure 2 As shown, a multi-level cross-chain collaboration method is provided, which is applied in Figure 1 The server in the example is used as an example to illustrate, including the following steps S10 to S40:
[0027] S10. Acquire collaborative information, where the collaborative information includes collaborative data, the level number of the blockchain where the collaborative data is located, and the collaborative type.
[0028] In step S10, the above-mentioned collaborative information is information related to collaborative data. The collaborative information includes but is not limited to collaborative data, the level number of the blockchain where the collaborative data is located, the collaborative type, and the number of the blockchain where the collaborative data is located.
[0029] Among them, collaborative data includes but is not limited to collaborative instructions and collaborative rules. The level number of the blockchain where the collaborative data is located refers to the level number of the blockchain where the management agency that initiated the collaborative data is located. It should be understood that a blockchain includes multiple levels, each level corresponds to a level number, and each level contains at least one management agency. That is, one management agency corresponds to one level number of a blockchain. Collaboration types include but are not limited to on-chain request collaboration and data collaboration.
[0030] It should be noted here that the level number of the blockchain where the collaborative data is located and the number of the blockchain where the collaborative data is located included in a collaborative information can be multiple, and the specific number is not limited.
[0031] By obtaining collaborative information, the collaborative information may include multiple blockchain level numbers and blockchain numbers of the collaborative data, so as to facilitate the processing of multi-level cross-chain collaborative information and thus improve the security of multi-level cross-chain collaboration.
[0032] S20. Obtain at least one blockchain corresponding to the level number of the blockchain where the collaborative data is located as the blockchain to be coordinated.
[0033] In step S20, the blockchain to be coordinated refers to a blockchain that needs to process collaborative data.
[0034] It should be understood that the at least one blockchain corresponding to the level number of the blockchain where the collaborative data is located refers to the management agency of the blockchain where the level number is the same as or corresponding to the level number of the blockchain where the management agency initiated by the collaborative data is located. For example, when multiple management agencies belonging to one or more collaborative chains collaboratively manage a certain blockchain, when the blockchain initiates a collaborative request, it carries the collaborative data, and one or more collaborative chains are blockchains to be coordinated. The level numbers of the multiple management agencies correspond to the level numbers of the collaborative data in the blockchain.
[0035] It should be noted here that the collaborative chain is a type of blockchain that is used to coordinate the collaborative instructions and collaborative rules of the management agency on the collaborative blockchain.
[0036] By obtaining the blockchain to be coordinated, the collaborative data can be processed in real time across chains using the blockchain to be coordinated, reducing off-chain negotiation and off-chain scheduling, thereby improving the security of multi-level cross-chain collaboration.
[0037] S30. Obtain a collaboration mode corresponding to the collaboration type from a preset collaboration mode set as a target collaboration mode.
[0038] In step S30, the preset collaboration mode set refers to a set of stored collaboration modes, including but not limited to on-chain request collaboration and data collaboration.
[0039] The above-mentioned target collaboration mode refers to the target mode of processing collaborative data.
[0040] In step S30, specifically:
[0041] When the collaboration type is on-chain request collaboration, the on-chain request collaboration mode is obtained, and the on-chain request collaboration mode is used as the target collaboration mode.
[0042] When the collaboration type is data collaboration, the data collaboration mode is obtained and used as the target collaboration mode.
[0043] The scope of use of the on-chain request coordination method includes but is not limited to the same-chain on-chain request coordination and / or cross-chain on-chain request coordination. The same-chain on-chain request coordination refers to the method in which the management agencies of the same level in the same blockchain perform on-chain request coordination processing on the coordination data. The cross-chain on-chain request coordination refers to the method in which the management agencies of the same level in different blockchains perform on-chain request coordination processing on the coordination data.
[0044] The scope of use of data collaboration includes but is not limited to same-chain data collaboration and / or cross-chain data collaboration. Same-chain data collaboration refers to the way in which management agencies at the same level in the same blockchain perform collaborative data processing on collaborative data. Cross-chain data collaboration refers to the way in which management agencies at the same level in different blockchains perform collaborative data processing on collaborative data.
[0045] By obtaining the collaboration mode corresponding to the collaboration type from the preset collaboration mode set and using it as the target collaboration mode, the collaborative blockchain is collaboratively processed using the target collaboration mode, reducing off-chain negotiation and off-chain scheduling, thereby improving the security of multi-level cross-chain collaboration.
[0046] S40. Based on the target collaboration method, the collaborative data is collaboratively processed using the blockchain to be collaborated to obtain a collaborative result.
[0047] In step S40, the above-mentioned collaborative processing refers to the processing process related to the target collaborative mode.
[0048] The above-mentioned collaboration results include but are not limited to agreeing to send collaboration instructions, agreeing to send collaboration rules, disagreeing to send collaboration instructions, and disagreeing to send collaboration rules. It is easy to understand that the collaboration results here change with the change of the target collaboration mode.
[0049] In step S40, when the target collaboration mode is the on-chain request collaboration mode, it specifically includes the following steps S401 to S403:
[0050] S401. Based on the on-chain request collaboration method, generate a collaborative on-chain request proposal and send a collaborative request to the collaborative blockchain, wherein the collaborative request includes collaborative data.
[0051] S402: Based on a preset collaborative processing method, the collaborative request is collaboratively processed using the blockchain to be collaboratively processed to obtain a processing result.
[0052] S403. Based on the processing result, determine the collaborative result corresponding to the request proposal on the collaborative chain.
[0053] For step S401, the collaborative on-chain request proposal refers to the task of performing on-chain request collaboration on collaborative data. The method of generating the collaborative on-chain request proposal includes but is not limited to calling a generation function. For example, calling the issue function in the same-chain on-chain request collaboration generates a collaborative on-chain request proposal.
[0054] It is easy to understand that the method of generating the above-mentioned collaborative chain request proposal is only an example and is not specifically limited here.
[0055] For step S402, it is specifically:
[0056] Adopt the blockchain to be coordinated, confirm the request type of the coordination request, and generate a request proposal on the coordination chain to be coordinated according to the request type;
[0057] The to-be-coordinated blockchain is used to broadcast the request proposal on the to-be-coordinated chain, so that the institution receiving the request proposal on the to-be-coordinated chain can vote on the request proposal on the to-be-coordinated chain to obtain the voting result;
[0058] Based on the preset processing method, all voting results are summarized and processed to obtain the processing result.
[0059] Among them, when the request type of the collaborative request is a collaborative request on the same chain, a certain management agency initiates a request, such as issuing a collaborative instruction or collaborative rule, to initiate a collaborative request on the same chain to other management agencies at the same level, and generates a proposal for a collaborative request on the chain to be coordinated on this chain, waiting for other management agencies to vote on the proposal for a collaborative request on the chain to be coordinated. After receiving the collaborative request on the same chain, other management agencies at the same level generate a proposal for a collaborative request on the chain to be coordinated of "collaborative instructions / rules issued" on this chain according to the request type. The proposal for a collaborative request on the chain to be coordinated is stored on this chain, and after it is generated, the relevant agency personnel are notified to vote through a broadcast event. The relevant agency personnel vote on this proposal for a collaborative request on the chain to be coordinated on this chain, and pass or reject the proposal for a collaborative request on the chain to be coordinated according to the corresponding voting strategy. When the number of votes of the management agency reaches the preset number, for example, when the preset number is 10, the number of votes of the management agency reaches 10, which is passed. All voting results are obtained, and the voting results are counted, and the proposal for a collaborative request on the chain to be coordinated is passed or rejected according to the corresponding voting strategy. The corresponding voting strategy includes but is not limited to the principle of minority obeys majority and priority.
[0060] When the request type of the coordination request is a cross-chain on-chain coordination request, a certain management agency initiates a request, such as issuing coordination instructions or coordination rules, and cross-chain initiates cross-chain on-chain coordination requests to other management agencies at the same level, and generates a pending coordination on-chain request proposal on the cross-chain corresponding chain, waiting for other management agencies to vote on the pending coordination on-chain request proposal. After receiving the cross-chain on-chain coordination request, other management agencies at the same level of the cross-chain generate a pending coordination on-chain request proposal of "coordination instructions / rules issued" on the cross-chain corresponding chain according to the request type. The pending coordination on-chain request proposal is stored on the chain, and after generation, the relevant agency personnel are notified to vote through broadcast events. The relevant agency personnel vote on the pending coordination on-chain request proposal on this chain, and pass or reject the pending coordination on-chain request proposal according to the corresponding voting strategy. When the number of votes of the management agency reaches the preset number, for example, when the preset number is 10, the number of votes of the management agency reaches 10, it is passed. By obtaining all voting results of different blockchains and counting the voting results, the pending coordination on-chain request proposal is passed or rejected according to the corresponding voting strategy. The corresponding voting strategies include but are not limited to the principle of majority and priority.
[0061] For step S403, specifically: if the processing result is that the request proposal on the collaborative chain is passed, the collaborative result is to issue the corresponding collaborative instructions or rules to the subordinate collaborative chain, and notify the relevant management agency of the processing result. It should be noted here that the collaborative result includes cross-chain issuance and same-chain issuance, and the specific collaborative result is adapted to the collaborative type.
[0062] Through the above steps, the on-chain request coordination of the same chain or cross-chain is realized, so that the coordination request can be carried out on the chain, and the generated on-chain request proposal to be coordinated can be stored on the chain. Due to the characteristics of blockchain such as "immutability" and "traceability", when there is a problem in coordination, the management agency that issues coordination instructions or coordination rules can be located through the proposal to be coordinated, thereby improving the security of multi-level cross-chain on-chain request coordination.
[0063] In step S40, when the target collaboration mode is a data collaboration mode, it specifically includes the following steps S404 to S407:
[0064] S404. Based on the data collaboration method, send a data collaboration request to the collaborative blockchain, wherein the data collaboration request includes a request type.
[0065] S405: Obtain a request method corresponding to the request type from a preset request method set as a target request method.
[0066] S406. Based on the target request method, the data collaborative request is collaboratively processed using the blockchain to be collaboratively processed to obtain a processing result.
[0067] S407. Based on the processing result, determine the collaboration result corresponding to the data collaboration request.
[0068] For step S406, it is specifically:
[0069] The data collaboration request is broadcasted using the to-be-coordinated blockchain, so that the institution receiving the data collaboration request can vote on the data collaboration request and obtain the voting result;
[0070] Based on the preset processing method, all voting results are summarized and processed to obtain the processing result.
[0071] Among them, when the target request method is a same-chain data collaboration request, if the management agency that initiates the request has the permission to read the collaborative rule library of the corresponding management agency, the corresponding collaborative rules are directly read and stored in its own collaborative rule library. If the management agency that initiates the request does not obtain the corresponding permission of the collaborative rule library of the corresponding management agency, it initiates a request to the corresponding management agency by broadcasting events within the chain. It should be understood that there is an institutional-level collaborative rule library in the same collaborative chain, which is stored on this chain. When creating its own collaborative rule library, the management agency can specify which management agencies to share its collaborative rule library with through permission control. Later, it can also cancel or increase sharing through permission control. After receiving the request, the management agency chooses to agree or reject the request. If the request is agreed, the management agency is given the permission to read its own collaborative rule library through permission control. If the request is rejected, the management agency is also notified by broadcasting events within the chain. If the request of the management agency that initiates the request is agreed, it goes to the corresponding collaborative rule library to read the required collaborative rules and stores them in its own collaborative rule library. After the reading is completed, the corresponding management agency is notified by broadcasting events within the chain. After receiving the notification of completion of reading, the management agency can decide whether to cancel the management agency's reading permission for its own collaborative rule base through permission control, and notify the corresponding management agency of the decision through in-chain broadcast.
[0072] When the target request method is a cross-chain data collaboration request, the management agency can request collaboration rules for a certain industry or that meet certain conditions from management agencies on other collaborative chains at the same level, and broadcast events on other collaborative chains to notify the corresponding management agencies through cross-chain. The management agency that receives the request can decide whether to share the collaboration rules. If the request is approved, the requested collaboration rules are read from its own collaboration rule library, and the collaboration rules are sent to the requester through cross-chain. If the request is rejected, the reason for the rejection must also be notified to the requester through cross-chain. The requester that receives the collaboration rules stores the collaboration rules in its own collaboration rule library.
[0073] Through the above data collaboration, management agencies in the same-level collaborative chain can share data, so that collaboration can be performed more efficiently. In addition, collaborative data and data requests are stored on the chain, which not only ensures the authenticity and validity of collaborative data, but also monitors the flow of collaborative data, thereby improving the security of multi-level cross-chain data collaboration.
[0074] The multi-level cross-chain collaboration method provided by the embodiment of the present invention obtains collaboration information, wherein the collaboration information includes collaboration data, the level number of the blockchain where the collaboration data is located, and the collaboration type; obtains at least one blockchain corresponding to the level number of the blockchain where the collaboration data is located as the blockchain to be collaborated; obtains the collaboration method corresponding to the collaboration type from the preset collaboration method set as the target collaboration method; based on the target collaboration method, the collaboration data is collaboratively processed by the blockchain to be collaborated to obtain a collaboration result. Through the target collaboration method, the collaboration data is collaboratively processed by the blockchain to be collaborated corresponding to the target collaboration method, so that the collaborative processing is open, transparent, and traceable, and the data on different blockchains are shared, so that the efficiency of multi-level cross-chain collaboration is improved while improving the security of multi-level cross-chain collaboration.
[0075] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0076] In one embodiment, a multi-level cross-chain collaboration device is provided, which corresponds one-to-one to the multi-level cross-chain collaboration method in the above embodiment. Figure 3 As shown, the multi-level cross-chain collaboration device includes a collaboration information acquisition module 11, a to-be-coordinated blockchain acquisition module 12, a target collaboration mode acquisition module 13, and a collaboration result acquisition module 14. Each functional module is described in detail as follows:
[0077] The collaborative information acquisition module 11 is used to acquire collaborative information, wherein the collaborative information includes collaborative data, the level number of the blockchain where the collaborative data is located, and the collaborative type.
[0078] The module 12 for obtaining the blockchain to be coordinated is used to obtain at least one blockchain corresponding to the level number of the blockchain where the coordinated data is located as the blockchain to be coordinated.
[0079] The target collaboration mode acquisition module 13 is used to acquire a collaboration mode corresponding to the collaboration type from a preset collaboration mode set as a target collaboration mode.
[0080] The collaborative result acquisition module 14 is used to collaboratively process the collaborative data based on the target collaborative mode and adopt the blockchain to be coordinated to obtain the collaborative result.
[0081] In one embodiment, the target coordination mode acquisition module 13 further includes:
[0082] The on-chain request collaboration unit is used to obtain the on-chain request collaboration mode when the collaboration type is on-chain request collaboration, and use the on-chain request collaboration mode as the target collaboration mode.
[0083] The data collaboration unit is used to obtain the data collaboration mode when the collaboration type is data collaboration, and use the data collaboration mode as the target collaboration mode.
[0084] In one embodiment, based on the on-chain request collaboration unit, the collaboration result acquisition module 14 further includes:
[0085] The on-chain request collaborative request acquisition unit is used to generate a collaborative on-chain request proposal based on the on-chain request collaborative method and send a collaborative request to the collaborative blockchain, wherein the collaborative request includes collaborative data.
[0086] The on-chain request collaborative processing unit is used to collaboratively process the collaborative request based on a preset collaborative processing method and adopt the blockchain to be coordinated to obtain a processing result.
[0087] The on-chain request collaborative result acquisition unit is used to determine the collaborative result corresponding to the collaborative on-chain request proposal based on the processing result.
[0088] In one embodiment, the on-chain request collaborative processing unit further includes:
[0089] The request proposal acquisition unit on the to-be-coordinated chain is used to adopt the to-be-coordinated blockchain, confirm the request type of the collaborative request, and generate the request proposal on the to-be-coordinated chain according to the request type.
[0090] The voting result acquisition unit is used to use the to-be-coordinated blockchain to broadcast the request proposal on the to-be-coordinated chain, so that the institution that receives the request proposal on the to-be-coordinated chain can vote on the request proposal on the to-be-coordinated chain to obtain the voting result.
[0091] The processing result acquisition unit is used to summarize all voting results based on a preset processing method to obtain a processing result.
[0092] In one embodiment, based on the data collaboration unit, the collaboration result acquisition module 14 further includes:
[0093] The data collaboration request acquisition unit is used to send a data collaboration request to the collaborative blockchain based on the data collaboration method, wherein the data collaboration request includes a request type.
[0094] The target request mode acquisition unit is used to acquire a request mode corresponding to a request type from a preset request mode set as a target request mode.
[0095] The data collaborative processing unit is used to collaboratively process the data collaborative request based on the target request method and adopt the blockchain to be coordinated to obtain the processing result.
[0096] The collaborative result acquisition unit is used to determine the collaborative result corresponding to the data collaborative request based on the processing result.
[0097] In one embodiment, the data collaborative processing unit further includes:
[0098] The data collaborative voting result acquisition unit is used to use the blockchain to be coordinated to broadcast the data collaborative request so that the organization that receives the data collaborative request can vote on the data collaborative request to obtain the voting result.
[0099] The data processing result acquisition unit is used to summarize all voting results based on a preset processing method to obtain a processing result.
[0100] The meaning of "first" and "second" in the above modules / units is only to distinguish different modules / units, and is not used to define which module / unit has a higher priority or other limiting meanings. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of modules in this application is only a logical division, and there may be other division methods when implemented in actual applications.
[0101] For the specific definition of the multi-level cross-chain collaboration device, please refer to the definition of the multi-level cross-chain collaboration method above, which will not be repeated here. Each module in the above-mentioned multi-level cross-chain collaboration device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0102] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the multi-level cross-chain collaboration method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a multi-level cross-chain collaboration method is implemented.
[0103] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the multi-level cross-chain collaboration method in the above embodiment are implemented, such as Figure 2 Steps S10 to S40 shown in the figure and other extensions of the method and extensions of related steps. Alternatively, when the processor executes the computer program, the functions of each module / unit of the multi-level cross-chain collaboration device in the above embodiment are realized, for example Figure 3 The functions of modules 11 to 14 are shown in Figure 1. To avoid repetition, they will not be described here.
[0104] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
[0105] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.), etc.
[0106] The memory may be integrated into the processor or may be arranged separately from the processor.
[0107] In one embodiment, a computer-readable storage medium is provided on which a computer program is stored. When the computer program is executed by a processor, the steps of the multi-level cross-chain collaboration method in the above embodiment are implemented, such as Figure 2 Steps S10 to S40 shown in the figure and other extensions of the method and extensions of related steps. Alternatively, when the computer program is executed by the processor, the functions of each module / unit of the multi-level cross-chain collaboration device in the above embodiment are realized, for example Figure 3 The functions of modules 11 to 14 are shown in Figure 1. To avoid repetition, they will not be described here.
[0108] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0109] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0110] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A multi-level cross-chain collaboration method, characterized in that: include: Acquire collaboration information, wherein the collaboration information includes collaboration data, the level number of the blockchain where the collaboration data is located, and the collaboration type; Obtain at least one blockchain corresponding to the level number of the blockchain where the collaborative data is located as the blockchain to be coordinated; Acquire a collaboration mode corresponding to the collaboration type from a preset collaboration mode set as a target collaboration mode; Based on the target collaboration mode, the collaborative data is collaboratively processed using the to-be-collaborated blockchain to obtain a collaborative result; The step of acquiring a collaboration mode corresponding to the collaboration type from a preset collaboration mode set as a target collaboration mode includes: When the collaboration type is on-chain request collaboration, the on-chain request collaboration mode is obtained, and the on-chain request collaboration mode is used as the target collaboration mode; When the collaboration type is data collaboration, a data collaboration mode is acquired, and the data collaboration mode is used as a target collaboration mode; Among them, when the target collaboration mode is an on-chain request collaboration mode, the step of collaboratively processing the collaborative data using the to-be-collaborated blockchain based on the target collaboration mode to obtain a collaborative result includes: Based on the on-chain request collaboration mode, generate a collaborative on-chain request proposal and send a collaborative request to the blockchain to be collaborated, wherein the collaborative request includes the collaborative data; Based on a preset collaborative processing method, the collaborative request is collaboratively processed using the blockchain to be collaboratively processed to obtain a processing result; Based on the processing result, determining the collaborative result corresponding to the request proposal on the collaborative chain; Wherein, when the target collaboration mode is a data collaboration mode, the step of collaboratively processing the collaborative data using the to-be-collaborated blockchain based on the target collaboration mode to obtain a collaborative result includes: Based on the data collaboration mode, a data collaboration request is sent to the blockchain to be collaborated, wherein the data collaboration request includes a request type; Obtaining a request method corresponding to the request type from a preset request method set as a target request method; Based on the target request mode, the data collaborative request is collaboratively processed using the to-be-collaborated blockchain to obtain a processing result; Based on the processing result, a collaboration result corresponding to the data collaboration request is determined.
2. The method according to claim 1, characterized in that The step of collaboratively processing the collaborative request based on the preset collaborative processing method using the blockchain to be collaboratively processed to obtain the processing result includes: Adopting the blockchain to be coordinated, confirming the request type of the coordination request, and generating a request proposal on the chain to be coordinated according to the request type; The blockchain to be coordinated is used to broadcast the request proposal on the chain to be coordinated, so that the institution receiving the request proposal on the chain to be coordinated votes on the request proposal on the chain to be coordinated to obtain a voting result; Based on a preset processing method, all the voting results are aggregated to obtain a processing result.
3. The method according to claim 1, characterized in that The step of collaboratively processing the data collaborative request based on the target request mode using the to-be-collaborated blockchain to obtain a processing result comprises: The data collaboration request is broadcasted using the to-be-coordinated blockchain, so that the institution receiving the data collaboration request votes on the data collaboration request to obtain a voting result; Based on a preset processing method, all the voting results are aggregated to obtain a processing result.
4. A multi-level cross-chain collaboration device, characterized in that: include: A collaborative information acquisition module, used to acquire collaborative information, wherein the collaborative information includes collaborative data, the level number of the blockchain where the collaborative data is located, and the collaborative type; A module for obtaining a blockchain to be coordinated, used to obtain at least one blockchain corresponding to the level number of the blockchain where the coordinated data is located as the blockchain to be coordinated; A target collaboration mode acquisition module, used to acquire a collaboration mode corresponding to the collaboration type from a preset collaboration mode set as a target collaboration mode; A collaborative result acquisition module, used to collaboratively process the collaborative data using the to-be-collaborated blockchain based on the target collaborative mode to obtain a collaborative result; Wherein, the target coordination mode acquisition module includes: An on-chain request collaboration unit, used for obtaining an on-chain request collaboration mode when the collaboration type is on-chain request collaboration, and using the on-chain request collaboration mode as a target collaboration mode; A data collaboration unit, configured to obtain a data collaboration mode when the collaboration type is data collaboration, and use the data collaboration mode as a target collaboration mode; Wherein, when the target collaboration mode is an on-chain request collaboration mode, the collaboration result acquisition module includes: Based on the on-chain request collaboration mode, generate a collaborative on-chain request proposal and send a collaborative request to the blockchain to be collaborated, wherein the collaborative request includes the collaborative data; Based on a preset collaborative processing method, the collaborative request is collaboratively processed using the blockchain to be collaboratively processed to obtain a processing result; Based on the processing result, determining the collaborative result corresponding to the request proposal on the collaborative chain; Wherein, when the target collaboration mode is a data collaboration mode, the collaboration result acquisition module includes: Based on the data collaboration mode, a data collaboration request is sent to the blockchain to be collaborated, wherein the data collaboration request includes a request type; Obtaining a request method corresponding to the request type from a preset request method set as a target request method; Based on the target request mode, the data collaborative request is collaboratively processed using the to-be-collaborated blockchain to obtain a processing result; Based on the processing result, a collaboration result corresponding to the data collaboration request is determined.
5. A computer device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the multi-level cross-chain collaboration method as described in any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the multi-level cross-chain collaboration method as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Crossing block chain platform business processing method and equipment and computer readable storage medium
CN108616578A
