Method, device and equipment for resource processing of open source community and storage medium

By connecting the open-source community to the blockchain network and using smart contract management technology to manage resource exchange, the problem of unfair technology exchange in the open-source community is solved, and a fair and transparent resource exchange process is achieved.

CN116795926BActive Publication Date: 2026-07-07CHINA CONSTRUCTION BANK +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2023-04-21
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In the open-source community, the problem of unfair technology exchange is mainly reflected in the lack of clear standards for contribution evaluation, unfair reward distribution, lack of incentive mechanisms for technology exchange, and insufficient transparency in community governance, which leads to unfair exchange processes.

Method used

By connecting open-source community platforms to blockchain networks, leveraging the decentralized and immutable characteristics of blockchain, smart contracts are created to manage the exchange of technical resources, ensuring a transparent and fair exchange process, and achieving fair exchange through voluntary user exchange.

Benefits of technology

It ensures fairness and transparency in technology exchange within the open-source community, avoids centralized control and data loss, and guarantees the fairness and efficiency of the exchange process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116795926B_ABST
    Figure CN116795926B_ABST
Patent Text Reader

Abstract

The application provides a method, device and equipment for resource processing of an open source community, and a storage medium, the method comprising: uploading resources and exchange requirements by a terminal device of a first user to an open source community platform, creating a smart contract for the first user by the open source community platform, and sending the smart contract to a blockchain network; storing the smart contract by the blockchain network, and broadcasting the smart contract to each node in the blockchain network; returning a contract address of the smart contract to the open source community platform, and storing the contract address locally on the open source community platform. The method provided by the application connects the open source community platform to the blockchain network, and can avoid monopoly and control of a single centralized organization and improve data security by virtue of the decentralized nature of the blockchain, and the user provides exchange requirements for the uploaded resources, and the fair technology exchange is ensured according to voluntary exchange between users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of resource management technology, and in particular to a method, apparatus, device and storage medium for resource processing in the open source community. Background Technology

[0002] The open source community is a collaborative and knowledge-sharing community where individuals and organizations are free to share their code, documentation, tools, and knowledge, and allow others to use, modify, and redistribute this content.

[0003] However, in open-source communities, individual user contributions are typically determined by organizations, reviewers, or rules, and users then exchange these contributions for the technical resources they need. Contribution evaluation in open-source communities is often subjective, and the decision-making process lacks transparency and fairness.

[0004] Therefore, how to achieve fair technology exchange in the open source community is an urgent problem to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for resource processing in open source communities, in order to solve the problem of unfair technology exchange in open source communities.

[0006] Firstly, this application provides a method for processing resources in an open-source community, applied to an open-source community platform, the method comprising:

[0007] The system receives technical resources and exchange requests uploaded by the terminal device of the first user, wherein the exchange requests include asset information required to exchange the technical resources.

[0008] A smart contract is created for the first user based on the technical resources and exchange requirements. The smart contract includes a logic program for exchanging the technical resources, exchange conditions, the first user's contract account, and the first user's digital signature.

[0009] The smart contract is sent to the blockchain network for storage, and the contract address is stored locally, which is the location where the contract is stored in the blockchain network.

[0010] In conjunction with the first aspect, in one implementation, the method further includes:

[0011] Receive a technology exchange request sent by the terminal device of the second user, wherein the technology exchange request includes the identity identifier of the second user and the identifier of the technology resource;

[0012] Based on the identity of the second user and the identifier of the technical resource, a transaction request is generated according to the technical exchange request. The transaction request includes the identity of the second user, the exchange type, asset information, and the digital signature of the second user.

[0013] The transaction request is sent to the contract address of the technical resource in the blockchain network;

[0014] Based on the transaction response message received from the blockchain network, a first technical exchange result is returned to the first user's terminal device, and a second technical exchange result is returned to the second user's terminal device.

[0015] In conjunction with the first aspect, in one implementation, generating a transaction request based on the technology exchange request, using the identity identifier of the second user and the identifier of the technology resource, includes:

[0016] Based on the identity of the second user, obtain the asset information and signature private key corresponding to the second user;

[0017] Based on the identifier of the technology resource to be traded and the asset information corresponding to the second user, a transaction request for the technology resource to be traded is generated, and the transaction request is digitally signed based on the signing private key.

[0018] In conjunction with the first aspect, in one implementation, before returning the first technical exchange result to the first user's terminal device and the second technical exchange result to the second user's terminal device, the method further includes:

[0019] If the transaction response message indicates that the technical exchange is complete, the asset information of the first user and the second user will be updated according to the transaction response message.

[0020] Secondly, this application also provides a method for resource processing in an open-source community, applying any node in a blockchain network, the method comprising:

[0021] Receive a smart contract sent by an open-source community platform, wherein the smart contract includes a logic program for exchanging technical resources, exchange conditions, and the digital signature of the first user;

[0022] The smart contract is stored and broadcast to each node in the blockchain network;

[0023] The smart contract's address is returned to the open-source community platform.

[0024] In conjunction with the second aspect, in one implementation, the method further includes:

[0025] Receive a transaction request sent by the open-source community platform, the transaction request including the identity of the second user, the exchange type, asset information and the digital signature of the second user;

[0026] Based on the transaction request, verify whether the second user meets the exchange conditions in the smart contract;

[0027] If the second user meets the exchange conditions in the smart contract, the transaction operation in the smart contract is executed according to the second user's identity, exchange type, asset information, and digital signature, and the state of the smart contract is updated.

[0028] The transaction operations executed by the smart contract are broadcast to each node in the blockchain network;

[0029] The result of the transaction operation is obtained and returned to the open-source community platform as a transaction response message. The result of the transaction operation includes the transaction status and asset information.

[0030] Thirdly, this application also provides an apparatus for processing resources in the open-source community, the apparatus comprising:

[0031] A receiving module is used to receive technical resources and exchange requests uploaded by the terminal device of the first user, wherein the exchange requests include asset information required to exchange the technical resources;

[0032] The smart contract module is used to create a smart contract for the first user based on the technical resources and exchange requirements. The smart contract includes a logic program for exchanging the technical resources, exchange conditions, the first user's contract account, and the first user's digital signature.

[0033] The sending module is used to send the smart contract to the blockchain network for storage;

[0034] A storage module is used to store the contract address locally, where the contract address is the location where the contract is stored in the blockchain network.

[0035] In conjunction with the third aspect, in one implementation, the apparatus further includes:

[0036] The receiving module is also configured to receive a technology exchange request sent by the terminal device of the second user, wherein the technology exchange request includes the identity identifier of the second user and the identifier of the technology resource;

[0037] The transaction request generation module is used to generate a transaction request based on the identity identifier of the second user and the identifier of the technical resource, according to the technology exchange request. The transaction request includes the identity identifier of the second user, the exchange type, asset information, and the digital signature of the second user.

[0038] The sending module is further configured to:

[0039] The transaction request is sent to the contract address of the technical resource in the blockchain network;

[0040] Based on the transaction response message received from the blockchain network, a first technical exchange result is returned to the first user's terminal device, and a second technical exchange result is returned to the second user's terminal device.

[0041] In conjunction with the third aspect, in one implementation, the transaction request generation module is specifically used for:

[0042] Based on the identity of the second user, obtain the asset information and signature private key corresponding to the second user;

[0043] Based on the identifier of the technology resource to be traded and the asset information corresponding to the second user, a transaction request for the technology resource to be traded is generated, and the transaction request is digitally signed based on the signing private key.

[0044] In conjunction with the third aspect, in one implementation, the apparatus further includes:

[0045] The asset management module is used to update the asset information of the first user and the second user according to the transaction response message if the transaction response message indicates that the technical exchange is completed.

[0046] Fourthly, this application also provides an apparatus for processing resources in the open-source community, the apparatus comprising:

[0047] The receiving module is used to receive smart contracts sent by the open-source community platform. The smart contracts include logic programs for exchanging technical resources, exchange conditions, and the digital signature of the first user.

[0048] A storage module is used to store the smart contract and broadcast the smart contract to each node in the blockchain network;

[0049] The sending module is used to return the contract address stored in the smart contract to the open-source community platform.

[0050] In conjunction with the fourth aspect, in one implementation, the apparatus further includes:

[0051] The receiving module also receives transaction requests sent by the open-source community platform, the transaction requests including the identity identifier of the second user, the exchange type, asset information and the digital signature of the second user;

[0052] The verification module is used to verify whether the second user meets the exchange conditions in the smart contract based on the transaction request.

[0053] The execution module is configured to, if the second user meets the exchange conditions in the smart contract, execute the transaction operation in the smart contract based on the second user's identity, exchange type, asset information, and the second user's digital signature, and update the state of the smart contract.

[0054] The broadcast module is used to broadcast the transaction operations executed by the smart contract to each node in the blockchain network;

[0055] The sending module is also used to obtain the result of the transaction operation and return it to the open source community platform as a transaction response message. The result of the transaction operation includes the transaction status and asset information.

[0056] Fifthly, this application also provides an electronic device, the electronic device comprising:

[0057] A processor, a memory, and a communication interface for interacting with other devices, the processor being used to perform a method of resource processing from the open-source community as described in either the first or second aspect.

[0058] Sixthly, this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the resource processing method of the open-source community as described in either the first or second aspect.

[0059] In a seventh aspect, this application also provides a computer program product comprising a computer program that, when executed by a processor, is used to implement a method for processing resources in an open-source community as described in either the first or second aspect.

[0060] This application provides a method, apparatus, device, and storage medium for processing resources in the open-source community. The method involves a first user uploading technical resources and exchange requests to an open-source community platform via their terminal device. The platform then creates a smart contract for the first user based on these resources and requests, and sends the smart contract to the blockchain network. The blockchain network stores the smart contract and broadcasts it to all nodes in the network, generating a contract address. Finally, the contract address is returned to the open-source community platform and stored locally. This method introduces blockchain technology into the open-source community platform. The decentralized nature of blockchain avoids the monopoly and control of a single centralized organization, ensuring the platform's fairness and transparency, and preventing data loss or tampering. Furthermore, this solution allows users to price their technical resources and provide exchange requests, achieving fair technology exchange based on voluntary interaction between users. The open-source community platform creates smart contracts for users, facilitating operation and enabling rapid deployment. Attached Figure Description

[0061] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0062] Figure 1 A schematic diagram illustrating the application scenario of the open-source community's resource processing methods provided in this application;

[0063] Figure 2 A flowchart illustrating an embodiment of the open-source community resource processing method provided in this application;

[0064] Figure 3 A flowchart illustrating Embodiment 2 of the method for processing open-source community resources provided in this application;

[0065] Figure 4 A schematic diagram of the structure of an embodiment of the open-source community resource processing device provided in this application;

[0066] Figure 5 A schematic diagram of the second embodiment of the open-source community resource processing device provided in this application;

[0067] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application.

[0068] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0069] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0070] First, let me explain the terms used in this application:

[0071] Open source community: A collaborative and knowledge-sharing community composed of individuals or organizations with shared interests. It is a network platform that publishes software source code in accordance with the corresponding open source software license agreement. The open source community provides a convenient learning platform that allows people to learn new skills and knowledge by viewing and participating in open source projects.

[0072] Blockchain refers to a special distributed database with characteristics such as "unforgeable," "traceable," "transparent," and "collectively maintained." The distributed storage database used in blockchain ensures that each node stores complete data, and no single node can independently record ledger data, thus preventing the possibility of a single bookkeeper being controlled and falsifying records.

[0073] Smart contracts: A smart contract is a computer program that can autonomously execute all or part of the operations related to the contract and generate corresponding verifiable evidence to demonstrate the validity of the execution of the contract operations.

[0074] In the current open-source community, technical exchanges face the following challenges:

[0075] Lack of clear contribution evaluation criteria: In the open source community, the evaluation of contributions is often subjective and lacks clear standards.

[0076] Unfair reward distribution: In open-source communities, reward distribution is often unfair because it is frequently decided by a few core members. This can lead to reward allocation favoring certain individuals while ignoring the contributions of others.

[0077] Lack of incentives for technology exchange: Although members of the open source community can exchange technologies and share experiences, the lack of incentives for such exchanges may make some members less motivated to actively participate.

[0078] Lack of transparency in community governance: In some open source communities, community decisions and governance are often made by a small number of people, which may lead to a lack of transparency and fairness in the decision-making process, and easily cause dissatisfaction and controversy.

[0079] In summary, the lack of clear contribution evaluation standards, unfair reward distribution, lack of incentive mechanisms for technology exchange, and insufficient transparency in community governance within the open-source community affect technology exchange and lead to unfair practices in technology exchange.

[0080] In view of the above problems, the inventors discovered during their research in related fields that the decentralized and immutable characteristics of blockchain can solve the problem of unfair technology exchange in open-source communities. By connecting open-source community platforms to blockchain networks and realizing resource exchange within these networks, the monopoly and control of a single centralized institution can be avoided, ensuring the fairness and transparency of the platform. Furthermore, all data is encrypted and stored, and backed up on multiple nodes to prevent data loss or tampering. Based on this, this application proposes a method, apparatus, device, and storage medium for resource processing in open-source communities.

[0081] Figure 1 The application scenario diagram of the resource processing method provided in this application is as follows: Figure 1 As shown, this application scenario includes multiple terminal devices, an open-source community platform, and a blockchain network. In this scenario, users browse resources on the open-source community platform through their terminal devices and complete resource exchanges through the blockchain network. These terminal devices can be wireless or wired, such as smartphones, tablets, smartwatches, and computers.

[0082] It should be noted that, in the embodiments of this application, the blockchain network can be a private chain, a public chain, or a consortium chain, and no limitation is made here. The blockchain network connection method can be that nodes communicate by directly establishing peer-to-peer (P2P) connections; it can also be a centralized connection, where each network node connects to a central server, and the central server manages all nodes; or it can be a hybrid connection of peer-to-peer connections and centralized connections.

[0083] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0084] Resources in the open source community include, but are not limited to, code, images, and documents. All resources in the open source community can be exchanged. In this embodiment of the application, "technical resources" refers to resources in the open source community.

[0085] Figure 2 The flowchart of the first embodiment of the method for processing open-source community resources provided in this application is as follows: Figure 2As shown, the resource processing methods of this open-source community mainly include the following steps:

[0086] S101, The first user's terminal device uploads technical resources and exchange requirements to the open source community platform.

[0087] Among these, the exchange demand includes asset information required for exchanging technical resources.

[0088] Correspondingly, the open-source community platform receives technical resources and exchange requests uploaded by the first user's terminal device.

[0089] In this solution, the open-source community platform provides users with services for uploading and exchanging technical resources. To avoid the impact of centralized organizations and human review on resource exchange in the open-source community, the open-source community platform needs to be connected to the blockchain network. The open-source community platform can interact with the blockchain network through the application programming interface (API), remote procedure call (RPC), and system external interface (websocket) provided by the blockchain network.

[0090] When a user needs to exchange or share technical resources, they upload the required resources to the open-source community platform and provide their exchange request, specifying the asset information needed to exchange those resources. Essentially, the user sets a price for the uploaded resources, and when other users browse the resources and exchange requests on the open-source community platform, the exchange takes place based on their willingness.

[0091] In one implementation, the open-source community platform provides the first user with exchange options, allowing the first user to choose the assets needed to exchange for the technical resource, such as the number of points, the required technical resources, or contribution value.

[0092] It is understandable that a user's points and contribution value are a type of technical resource, which is exchanged for the resources needed by the user in their exchange needs.

[0093] S102, the open-source community platform creates smart contracts for the first user based on technical resources and exchange needs.

[0094] Smart contracts include the logic program for exchanging technical resources, the exchange conditions, the first user's contract account, and the first user's digital signature.

[0095] In this solution, implementing reliable and automatically executed transactions in the blockchain requires the use of smart contracts. However, writing smart contracts is difficult for users. Therefore, the open-source community platform creates smart contracts for the first user based on their technical resources and exchange needs. The open-source community platform registers a contract account for each user's account within the platform and stores it, linking it to the platform account. The platform includes pre-set smart contract templates for different exchange types, such as exchanging technical resources for points, exchanging technical resources for technical resources, and exchanging technical resources for other technical resources. These smart contract templates are programmed using languages ​​such as Solidity, Vyper, and Java. Upon receiving the user's technical resources and exchange needs, the platform writes these into the smart contract's exchange program and adds the first user's contract account identifier to the smart contract. This identifier is used to update the account's assets when the smart contract executes transaction operations.

[0096] The binary code (bytecode) compiled from the smart contract source code, the function names used, the function parameters, and the contract deployment parameters (such as contract name, description information, the first user's contract account address, etc.) are digitally signed using a private key, and a hash value is calculated using a hash function (such as SHA-256). This hash value is a fixed-length string used to verify the integrity and security of the smart contract, and then the hash value is digitally signed again using the private key.

[0097] It should be noted that the private key used for digital signature can be the platform's private key, or the resource exchange platform can pre-associate the user's private key with the user's platform account, and when a signature is required, the platform uses the private key associated with the user's platform account to perform the digital signature, without any restrictions.

[0098] Optionally, open-source community platforms provide users with tools for writing custom smart contracts, as well as for debugging and testing. Custom smart contracts can meet specific user needs.

[0099] S103. Send the smart contract to the blockchain network.

[0100] Correspondingly, the blockchain network receives smart contracts sent by the open-source community platform.

[0101] In this step, the smart contract is sent to a wallet account pre-opened on the blockchain on the open-source community platform. The contract is then deployed in the wallet account, and the blockchain's wallet application automatically generates an unused address for the contract.

[0102] S104. Store the smart contract and broadcast it to each node in the blockchain network.

[0103] In this step, the smart contract's bytecode is stored in the account corresponding to the blockchain wallet account. The wallet application then packages the smart contract's bytecode, unused address, and deployment information into a transaction and broadcasts it to the blockchain network. Verifying nodes include this transaction in a block and synchronize the smart contract's deployment information across all nodes in the blockchain. When the transaction is packaged into a block for deployment, the smart contract's contract address is automatically calculated, recorded on the blockchain, and returned to the wallet application. The contract can then be accessed and invoked based on this contract address.

[0104] S105. Return the smart contract's address to the open-source community platform.

[0105] In one implementation, the wallet application sends the received contract address to an open-source community platform.

[0106] S106, Local storage contract address on the open source community platform.

[0107] The contract address is the location where the contract is stored in the blockchain network.

[0108] In this step, after receiving the smart contract address, the open-source community platform stores the contract address and associates it with the technical resources uploaded by the user. The associated technical resources and contract address are then published on the open-source community platform. After publication, each user can view the technical resources, exchange requests, and corresponding contract addresses through the open-source community platform.

[0109] Optionally, users can be incentivized after the technical resources are released, including with points, contribution values, etc.

[0110] This embodiment provides a resource processing method for open-source communities. A first user's terminal device uploads technical resources and exchange requests to the open-source community platform. The platform creates a smart contract for the first user based on these resources and requests. The smart contract is then sent to a blockchain network, which stores and broadcasts it to all nodes, generating a contract address. The contract address is returned to the open-source community platform and stored locally. This method introduces blockchain technology into the open-source community platform. The decentralized nature of blockchain avoids monopolies and control by a single centralized organization, ensuring fairness and transparency, and preventing data loss or tampering. Furthermore, this solution allows users to price their technical resources and provide exchange requests, achieving fair technology exchange based on voluntary interaction between users. The open-source community platform creates smart contracts for users, facilitating operation and rapid deployment.

[0111] The above resource processing method enables the uploading and publishing of technical resources by the first user. However, the exchange of technical resources requires the participation of the second user. The method will be explained in detail below.

[0112] Figure 3 The flowchart of the second embodiment of the method for processing open-source community resources provided in this application is as follows: Figure 3 As shown above, in the above Figure 2 Based on the illustrated embodiment, the open-source community resource processing method provided in this embodiment specifically includes the following steps:

[0113] Steps S201-S206 and Figure 2 Steps S101-S106 in the illustrated embodiment are the same, and the specific content and implementation can be found in the foregoing embodiment.

[0114] S207, The second user's terminal equipment sends a technology exchange request.

[0115] The technology exchange request includes the identity identifier of the second user and the identifier of the technology resources.

[0116] Correspondingly, the open-source community platform receives technical exchange requests sent by the second user's terminal device.

[0117] In this solution, each user on the open-source community platform can browse resources uploaded by other users and their exchange requests, and the platform provides search and filtering services based on resource descriptions. When a second user browses a resource on their terminal device and agrees to the exchange terms, they click a preset exchange button to send a technology exchange request to the open-source community platform. The technology exchange request includes the identifier of the technology resource to be exchanged and the identity identifier of the second user, whereby the second user's identity identifier includes the second user's account information and identity information.

[0118] S208. Based on the identity of the second user and the identification of the technical resources, generate a transaction request according to the technology exchange request.

[0119] The transaction request includes the second user's identity, exchange type, asset information, and the second user's digital signature.

[0120] In this step, the community resource platform verifies whether the second user has exchange permissions based on the identity information in the second user's identity identifier. Then, based on the second user's account information or identity information, it confirms the second user's blockchain account address from the pre-associated blockchain account and determines the second user's asset information, such as the quantity of technical assets and points. The community resource platform then verifies whether the second user meets the conditions required in the exchange request based on the second user's asset information.

[0121] Based on the second user's identity and blockchain account address, the second user's asset information, the exchange type selected by the second user (there are multiple exchange methods for exchanging this resource, which the user needs to choose), the contract address of the technical resource to be exchanged, the function name and parameters used by the contract, and the blockchain account address of the first user to which the technical resource belongs, a transaction data field is constructed to generate a transaction request. After generating the transaction request, the transaction data field is signed using a private key.

[0122] In one implementation, the signature private key corresponding to the second user is obtained based on the second user's identity, a transaction request for the technical resources to be traded is generated, and the transaction request is digitally signed based on the signature private key.

[0123] Specifically, the second user trusts the open-source community platform and associates the user's private key with the platform account. After the open-source community platform generates a transaction request, it needs to digitally sign the transaction request. The open-source community platform uses the private key associated with the user account to sign the transaction request.

[0124] By using an open-source community platform for digital signatures, users do not need to perform any operations when generating transaction requests, shortening the exchange process and avoiding transaction failures caused by network problems during the user's signing process.

[0125] S209. Send the transaction request to the contract address of the technical resource in the blockchain network.

[0126] Correspondingly, the smart contract receives transaction requests sent by the open-source community platform.

[0127] In this step, the open-source community platform connects to the blockchain network via an API interface, sends transaction requests to the contract address, and the smart contract verifies the digital signature upon receiving the transaction request.

[0128] S210. Based on the transaction request, verify whether the second user meets the exchange conditions in the smart contract.

[0129] In this step, the smart contract obtains the second user's asset information based on the second user's contract account address in the transaction request, verifies whether the second user has sufficient assets to execute the transaction and whether the exchange conditions of the smart contract can be met, and the smart contract checks whether the transaction complies with its own logical rules.

[0130] Understandably, although asset information verification is completed on the open-source community platform, it must be performed again before the smart contract is executed. This prevents transaction failures caused by outdated account asset information displayed on the open-source community platform. Furthermore, asset information verification via the open-source community platform is quick and efficient, eliminating the need for users who do not meet the requirements to go through the cumbersome blockchain verification process.

[0131] S211. If the second user meets the exchange conditions in the smart contract, then execute the transaction operation in the smart contract and update the state of the smart contract.

[0132] In this step, if the second user meets the exchange conditions of the smart contract, the smart contract parses the transaction data, determines the smart contract code to be executed, and executes the smart contract code. The executed contract code updates the state of the smart contract, including the current transaction state and account balance, and transfers the assets of the first and second users according to the transaction.

[0133] Optionally, if the exchange conditions of the smart contract are not met, a message indicating that the exchange conditions are not met will be returned to the open-source community platform, and the platform will notify the second user that the asset information does not meet the exchange conditions.

[0134] S212. Broadcast the transaction operations executed by the smart contract to each node in the blockchain network.

[0135] In this process, after the smart contract is executed, the transaction is broadcast to the blockchain network. The verification nodes that receive the broadcast package the transaction into a block and use the proof-of-work algorithm to find a matching block hash value. When any verification node finds a matching hash value, it broadcasts the block to all nodes in the blockchain network. After verification, other nodes add the block to the entire blockchain network. At this point, the state of the smart contract is confirmed and updated, and the asset information of the first and second users' transactions is also confirmed.

[0136] Optionally, if verification fails on other nodes, a "rollback" operation is required to protect the user's funds. This involves identifying the transaction to be cancelled, including its hash value and block height, executing a new transaction of equal value at the same block height to transfer the assets back to the original account, finding the block header based on the transaction history, locating the original data using the root hash value and index number in the block header, and then restoring the contract state and account balance based on the original data.

[0137] S213. Obtain the result of the transaction operation and return it as a transaction response message to the open-source community platform.

[0138] The results of a transaction include the transaction status and asset information.

[0139] Correspondingly, the open-source community platform receives transaction response messages returned by the blockchain network.

[0140] In this step, when a node on the blockchain closest to the open-source community detects that a smart contract transaction has been written to the blockchain, it obtains the execution result of the smart contract, including the transaction status and asset information of both parties. The execution result is packaged into a transaction response message and sent to the open-source community platform via the Internet Protocol (IP) address and port number pre-set on that node's open-source community platform.

[0141] Optionally, when a smart contract executes and completes state update confirmation, a corresponding event is generated. The open-source community platform can listen to the events on the blockchain to obtain the execution result of the smart contract.

[0142] Optionally, the open-source community platform updates the asset information of the first and second user accounts within the platform based on the asset information in the transaction response message. This asset information is then displayed within the user's account information for easy viewing.

[0143] Optionally, the open-source community platform may reward users who complete the technology exchange. There are no restrictions on the reward method, which may include increasing points or contribution value.

[0144] S214. Return the first technical exchange result to the terminal device of the first user.

[0145] In this step, the open-source community platform generates the first technical exchange result based on the transaction response message returned by the blockchain network and the transaction status in the transaction response message. This result includes the technical resources of the transaction, whether the transaction was successful, and the user's asset information after the transaction.

[0146] S215. Return the second technical exchange result to the second user's terminal device.

[0147] This step is similar to S214 and will not be described again.

[0148] The resource processing method provided in this application involves a second user browsing desired technical resources on an open-source community platform and sending a technical exchange request via a terminal device. The open-source community platform generates a transaction request based on the second user's identity and the technical resource's identifier. The transaction request is sent to the contract address of the technical resource in the blockchain network. If the second user meets the exchange conditions in the smart contract, the transaction operation in the smart contract is executed, and the smart contract's state is updated. The executed transaction operation is broadcast to each node in the blockchain network. The blockchain nodes obtain the result of the transaction operation and return it as a transaction response message to the open-source community platform. The open-source community platform then provides feedback on the technical exchange result to the user. This resource processing method ensures that the exchange is automatically executed according to the smart contract, guaranteeing that both parties adhere to the rules and conditions. This effectively avoids fraud and unfair practices in centralized exchanges, improving the efficiency and credibility of the exchange.

[0149] Building upon Embodiment 2 above, the open-source community platform can also facilitate exchanges between multiple users. For example, the first user provides a landscape image as their technical resource and requests an animal image in exchange; the second user provides an animal image and requests a portrait of a person in exchange; the third user provides a portrait of a person as their technical resource and requests a landscape image in exchange. The open-source community platform can then facilitate the exchange of technical resources among these three users.

[0150] In one implementation, the second and third users join a multi-party transaction interface provided by an open-source community platform. Each user initiates a technology exchange request. A transaction request is generated based on the identities of the second and third users and the identifiers of the technology resources, and sent to the contract address of the first user's technology resources. The transaction request includes the contract address and blockchain account address of the first user's technology resources, the blockchain account address and exchange type of the second user, and the blockchain account address and exchange type of the third user. After receiving the transaction request and verifying the signature, the smart contract automatically executes the transaction. During the execution of the smart contract, assets need to be transferred to the smart contract, which then exchanges and distributes them according to its rules.

[0151] By exchanging resources among multiple users, the exchange methods on open-source community platforms can be expanded, increasing the success rate of exchanges.

[0152] Figure 4 A schematic diagram of the structure of the apparatus for processing open-source community resources provided in this application is shown in Embodiment 1. Figure 4 As shown, the resource processing device 200 of the open-source community includes:

[0153] The receiving module 211 is used to receive technical resources and exchange requests uploaded by the terminal device of the first user, wherein the exchange requests include asset information required to exchange the technical resources;

[0154] Smart contract module 212 is used to create a smart contract for a first user based on the technical resources and exchange requirements. The smart contract includes a logic program for exchanging the technical resources, exchange conditions, the first user's contract account, and the first user's digital signature.

[0155] Sending module 213 is used to send the smart contract to the blockchain network for storage;

[0156] Storage module 214 is used to store the contract address locally, the contract address being the location where the contract is stored in the blockchain network.

[0157] Optionally, the device further includes:

[0158] The receiving module 211 is further configured to receive a technology exchange request sent by the terminal device of the second user, wherein the technology exchange request includes the identity identifier of the second user and the identifier of the technology resource;

[0159] The transaction request generation module 215 is used to generate a transaction request based on the identity identifier of the second user and the identifier of the technical resource, according to the technology exchange request. The transaction request includes the identity identifier of the second user, the exchange type, asset information and the digital signature of the second user.

[0160] The sending module 213 is further configured to:

[0161] The transaction request is sent to the contract address of the technical resource in the blockchain network;

[0162] Based on the transaction response message received from the blockchain network, a first technical exchange result is returned to the first user's terminal device, and a second technical exchange result is returned to the second user's terminal device.

[0163] Optionally, the transaction request generation module 215 is specifically used for:

[0164] Based on the identity of the second user, obtain the asset information and signature private key corresponding to the second user;

[0165] Based on the identifier of the technology resource to be traded and the asset information corresponding to the second user, a transaction request for the technology resource to be traded is generated, and the transaction request is digitally signed based on the signing private key.

[0166] Optionally, the device further includes:

[0167] The asset management module 216 is used to update the asset information of the first user and the second user according to the transaction response message if the transaction response message indicates that the technical exchange is completed.

[0168] Optionally, the device further includes:

[0169] General module 217 is used to manage user accounts, user permissions, and user roles;

[0170] Basic module 218 is used to manage user-uploaded technical resources, exchange requests, created smart contracts, and user contribution values;

[0171] Operations module 219 is used to monitor the blockchain and transactions on the blockchain, evaluate the contributions of users in technology exchange, and incentivize users.

[0172] The open-source community resource processing apparatus provided in this embodiment is used to execute the open-source community resource processing method described on the open-source community platform side of any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0173] Figure 5 A schematic diagram of the structure of the apparatus for processing open-source community resources provided in this application, as shown in Embodiment 2. Figure 5 As shown, the resource processing device 300 of the open-source community includes:

[0174] The receiving module 311 is used to receive a smart contract sent by the open source community platform. The smart contract includes a logic program for exchanging technical resources, exchange conditions, and the digital signature of the first user.

[0175] Storage module 312 is used to store the smart contract and broadcast the smart contract to each node in the blockchain network;

[0176] The sending module 313 is used to return the contract address stored in the smart contract to the open source community platform.

[0177] Optionally, the device further includes:

[0178] The receiving module also receives transaction requests sent by the open-source community platform, the transaction requests including the identity identifier of the second user, the exchange type, asset information and the digital signature of the second user;

[0179] The verification module 314 is used to verify whether the second user meets the exchange conditions in the smart contract based on the transaction request.

[0180] The execution module 315 is configured to, if the second user meets the exchange conditions in the smart contract, execute the transaction operation in the smart contract based on the second user's identity identifier, exchange type, asset information, and the second user's digital signature, and update the state of the smart contract.

[0181] The broadcast module 316 is used to broadcast the transaction operations executed by the smart contract to each node in the blockchain network;

[0182] The sending module 313 is also used to obtain the result of the transaction operation and return it to the open source community platform as a transaction response message. The result of the transaction operation includes the transaction status and asset information.

[0183] The open-source community resource processing apparatus provided in this embodiment is used to execute the open-source community resource processing method described on any node side of the blockchain network in any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0184] Figure 6 A schematic diagram of the structure of an electronic device provided in this application, such as... Figure 6 As shown, the electronic device 400 includes:

[0185] The processor 411, the memory 412 communicatively connected to the processor, and the communication interface 413 for interacting with other devices;

[0186] The memory 412 stores computer-executed instructions;

[0187] The processor 411 executes computer execution instructions stored in the memory to implement the open-source community resource processing method described in any of the above method embodiments.

[0188] Optionally, the various devices of the terminal device 400 can be connected to each other via a system bus.

[0189] The memory 412 can be a separate memory unit or a memory unit integrated into the processor 411. The number of processors 411 can be one or more.

[0190] Optionally, the electronic device also includes a display for showing the processor's processing results and for human-computer interaction. In some embodiments, the display can be the front panel of the terminal device; in other embodiments, the display can be a flexible display screen, or even a non-rectangular, irregularly shaped display screen, i.e., a non-rectangular screen. The display can be made of materials such as liquid crystal display (LCD) or organic light-emitting diode (OLED).

[0191] It should be understood that the processor 411 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0192] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0193] All or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.

[0194] The electronic device provided in this application embodiment is used to implement the resource processing method of the open source community as described in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0195] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the resource processing method of the open-source community as described in any of the foregoing method embodiments.

[0196] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0197] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the resource processing method of the open-source community as described in any of the foregoing method embodiments.

[0198] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0199] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for resource processing in an open-source community, characterized in that, Applied to open-source community platforms, the method includes: The system receives technical resources uploaded by the terminal device of the first user and exchange requests customized by the first user. The exchange requests include asset information required to exchange the technical resources, which is disclosed to other users in the community as a condition for exchange. Based on the technical resources and exchange requirements, a smart contract is created for the first user by calling a preset smart contract template. The smart contract includes a logic program for exchanging the technical resources, exchange conditions, the first user's contract account, and the first user's digital signature. The open-source community platform has preset smart contract templates corresponding to different exchange types. The creation process includes: writing the exchange requirements into the exchange program of the selected smart contract template, and writing the contract account identifier associated with the first user's platform account into the smart contract. The smart contract is sent to the blockchain network for storage, and the contract address is stored locally, where the contract address is the location where the contract is stored on the blockchain network; The contract address is associated with the technical resource and published locally on the open-source community platform for browsing by a second user; The method further includes: receiving a technology exchange request sent by a second user's terminal device, wherein the technology exchange request includes the identity identifier of the second user and the identifier of the technology resource; Based on the identity of the second user and the identifier of the technical resource, a transaction request is generated according to the technical exchange request. The transaction request includes the identity of the second user, the exchange type, asset information, and the digital signature of the second user. The transaction request is sent to the contract address of the technical resource in the blockchain network; Based on the transaction response message received from the blockchain network, a first technical exchange result is returned to the first user's terminal device, and a second technical exchange result is returned to the second user's terminal device.

2. The method according to claim 1, characterized in that, The step of generating a transaction request based on the identity of the second user and the identifier of the technical resource, according to the technology exchange request, includes: Based on the identity of the second user, obtain the asset information and signature private key corresponding to the second user; Based on the identifier of the technology resource to be traded and the asset information corresponding to the second user, a transaction request for the technology resource to be traded is generated, and the transaction request is digitally signed based on the signing private key.

3. The method according to claim 1 or 2, characterized in that, Before returning the first technical exchange result to the first user's terminal device and the second technical exchange result to the second user's terminal device, the method further includes: If the transaction response message indicates that the technical exchange is complete, the asset information of the first user and the second user will be updated according to the transaction response message.

4. A method for resource processing in an open-source community, characterized in that, The method, which applies to any node in a blockchain network, includes: The system receives a smart contract sent by an open-source community platform. The smart contract includes a logic program for exchanging technical resources, exchange conditions, and a digital signature of a first user. The smart contract is created by the open-source community platform for the first user based on the technical resources and the exchange requirements defined by the first user, by calling a preset smart contract template. The open-source community platform has preset smart contract templates corresponding to different exchange types. The creation process includes: writing the exchange requirements into the exchange program of the selected smart contract template, and writing the contract account identifier associated with the first user's platform account into the smart contract. The smart contract is stored and broadcast to each node in the blockchain network; The smart contract's contract address is returned to the open-source community platform, so that the open-source community platform can associate the contract address with the technical resource and publish it locally on the open-source community platform for a second user to browse. The method further includes: receiving a transaction request sent by the open-source community platform, wherein the transaction request includes the identity identifier of the second user, the exchange type, asset information and the digital signature of the second user; Based on the transaction request, verify whether the second user meets the exchange conditions in the smart contract; If the second user meets the exchange conditions in the smart contract, the transaction operation in the smart contract is executed according to the second user's identity, exchange type, asset information, and digital signature, and the state of the smart contract is updated. The transaction operations executed by the smart contract are broadcast to each node in the blockchain network; The result of the transaction operation is obtained and returned to the open-source community platform as a transaction response message. The result of the transaction operation includes the transaction status and asset information.

5. A device for processing resources in an open-source community, characterized in that, The apparatus for processing resources in the open-source community is used to implement the method for processing resources in the open-source community as described in any one of claims 1-3, the apparatus comprising: A receiving module is used to receive technical resources and exchange requests uploaded by the terminal device of the first user, wherein the exchange requests include asset information required to exchange the technical resources; The smart contract module is used to create a smart contract for the first user based on the technical resources and exchange requirements. The smart contract includes a logic program for exchanging the technical resources, exchange conditions, the first user's contract account, and the first user's digital signature. The sending module is used to send the smart contract to the blockchain network for storage; A storage module is used to store the contract address locally, where the contract address is the location where the contract is stored in the blockchain network.

6. The apparatus according to claim 5, characterized in that, The device further includes: The receiving module is also configured to receive a technology exchange request sent by the terminal device of the second user, wherein the technology exchange request includes the identity identifier of the second user and the identifier of the technology resource; The transaction request generation module is used to generate a transaction request based on the identity identifier of the second user and the identifier of the technical resource, according to the technology exchange request. The transaction request includes the identity identifier of the second user, the exchange type, asset information, and the digital signature of the second user. The sending module is further configured to: The transaction request is sent to the contract address of the technical resource in the blockchain network; Based on the transaction response message received from the blockchain network, a first technical exchange result is returned to the first user's terminal device, and a second technical exchange result is returned to the second user's terminal device.

7. The apparatus according to claim 6, characterized in that, The transaction request generation module is specifically used for: Based on the identity of the second user, obtain the asset information and signature private key corresponding to the second user; Based on the identifier of the technology resource to be traded and the asset information corresponding to the second user, a transaction request for the technology resource to be traded is generated, and the transaction request is digitally signed based on the signing private key.

8. The apparatus according to claim 6 or 7, characterized in that, The device further includes: The asset management module is used to update the asset information of the first user and the second user according to the transaction response message if the transaction response message indicates that the technical exchange is completed.

9. A device for processing resources in an open-source community, characterized in that, The apparatus for processing resources in the open-source community is used to implement the method for processing resources in the open-source community as described in claim 4, the apparatus comprising: The receiving module is used to receive smart contracts sent by the open-source community platform. The smart contracts include logic programs for exchanging technical resources, exchange conditions, and the digital signature of the first user. A storage module is used to store the smart contract and broadcast the smart contract to each node in the blockchain network; The sending module is used to return the contract address stored in the smart contract to the open-source community platform.

10. The apparatus according to claim 9, characterized in that, The device further includes: The receiving module also receives transaction requests sent by the open-source community platform, the transaction requests including the identity identifier of the second user, the exchange type, asset information and the digital signature of the second user; The verification module is used to verify whether the second user meets the exchange conditions in the smart contract based on the transaction request. The execution module is configured to, if the second user meets the exchange conditions in the smart contract, execute the transaction operation in the smart contract based on the second user's identity, exchange type, asset information, and the second user's digital signature, and update the state of the smart contract. The broadcast module is used to broadcast the transaction operations executed by the smart contract to each node in the blockchain network; The sending module is also used to obtain the result of the transaction operation and return it to the open source community platform as a transaction response message. The result of the transaction operation includes the transaction status and asset information.

11. An electronic device, characterized in that, The electronic device includes: A processor, memory, and communication interfaces for interacting with other devices, the processor being used to perform the open-source community resource processing method as described in any one of claims 1 to 4.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the resource processing method of the open-source community as described in any one of claims 1 to 4.