CN116012017A - Resource information processing method, device, computer equipment and storage medium - Google Patents

Resource information processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116012017A
CN116012017A CN202310067680.8A CN202310067680A CN116012017A CN 116012017 A CN116012017 A CN 116012017A CN 202310067680 A CN202310067680 A CN 202310067680A CN 116012017 A CN116012017 A CN 116012017A
Authority
CN
China
Prior art keywords
resource
event
receiving end
resource transfer
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310067680.8A
Other languages
Chinese (zh)
Inventor
汪志艺
王倩
郭锡超
贺澍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310067680.8A priority Critical patent/CN116012017A/en
Publication of CN116012017A publication Critical patent/CN116012017A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application relates to a resource information processing method, a resource information processing device and computer equipment, and relates to the technical field of blockchain. The method comprises the following steps: when a resource transfer event aiming at a target resource receiving end is detected, acquiring resource deduction amount information corresponding to the resource transfer event; the resource deduction amount information is determined according to an event processing result corresponding to a resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request by a pre-established blockchain network in response to the resource transfer request corresponding to the resource transfer event; storing the deduction amount information of a plurality of resources meeting the preset caching condition into a distributed cache to obtain distributed cache data corresponding to a target resource receiving end; and when the synchronous uplink triggering event is detected, synchronizing the distributed cache data to the blockchain network to obtain the resource deduction statistical information corresponding to the target resource receiving end. The method can meet the high concurrency requirement of the service and improves the usability of the system.

Description

Resource information processing method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a resource information processing method, apparatus, computer device, storage medium, and computer program product.
Background
At present, aiming at the processing process of transferring the concurrent resources with high tens of millions of levels under a financial scene, in the related technology, a data processing framework which is usually adopted has certain potential safety hazard when bearing a service scene with higher concurrency number, and cannot meet the read-write service requirements of high concurrency and low delay of the service, and the resource information processing efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a resource information processing method, apparatus, computer device, storage medium, and computer program product that can solve the above-described problems.
In a first aspect, the present application provides a resource information processing method, where the method includes:
when a resource transfer event aiming at a target resource receiving end is detected, acquiring resource deduction amount information corresponding to the resource transfer event; the resource deduction amount information is determined according to an event processing result corresponding to the resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request to determine in response to the resource transfer request corresponding to the resource transfer event by a pre-established blockchain network;
Storing the plurality of resource deduction amount information meeting the preset caching conditions into a distributed cache to obtain distributed cache data corresponding to the target resource receiving end;
and synchronizing the distributed cache data to the blockchain network when the synchronous uplink triggering event is detected, and obtaining the resource deduction statistical information corresponding to the target resource receiving end.
In one embodiment, after the step of obtaining the resource deduction statistics corresponding to the target resource receiving end, the method further includes:
when the resource transfer statistical amount information of the target resource receiving end in the accumulated time period is smaller than or equal to a preset accumulated threshold value, adjusting the resource deduction statistical information corresponding to the target resource receiving end; the preset accumulation threshold value is determined based on the resource storage information of the target resource receiving end;
or when the resource transfer statistical amount information of the target resource receiving end in the accumulated time period is larger than the preset accumulated threshold value, updating the resource deduction statistical information corresponding to the target resource receiving end according to the resource exceeding information.
In one embodiment, the obtaining the resource deduction amount information corresponding to the resource transfer event includes:
Responding to a resource transfer request corresponding to the resource transfer event through the blockchain network, and calling an intelligent contract corresponding to each sub-event in the resource transfer event to obtain an event processing result corresponding to the resource transfer event;
and determining a common committee node in the blockchain network, executing a common flow based on the common committee node, and storing the event processing result into each blockchain node of the blockchain network.
In one embodiment, the determining a common committee node in the blockchain network includes:
determining a candidate node set from the blockchain network according to node access statistical information of the blockchain network; the node access statistical information is used for representing the access activity degree corresponding to each node in the blockchain network, and the access activity degree corresponding to each candidate node in the candidate node set meets a preset condition;
and determining a target node from the candidate node set as the common committee node.
In one embodiment, after the step of determining a common committee node in the blockchain network, the method further comprises:
And when the common committee node is detected to meet the preset rotation selection condition, replacing the common committee node according to the new common committee node obtained by rescreening.
In one embodiment, the sub-event includes a resource receiving end type judging sub-event, and the step of calling, through the blockchain network, an intelligent contract corresponding to each sub-event in the resource transfer event in response to a resource transfer request corresponding to the resource transfer event to obtain an event processing result corresponding to the resource transfer event includes:
responding to a resource transfer request corresponding to the resource transfer event through the blockchain network, and calling an intelligent contract corresponding to the resource receiving end type judgment sub-event;
under the condition that the target resource receiving end is judged to be a resource receiving end of a specified type, adding a resource deduction and deduction mark to the resource transfer event; the resource deduction mark is used for calling an intelligent contract corresponding to the next sub-event of the resource receiving end type judgment sub-event;
and obtaining an event processing result corresponding to the resource transfer event by calling the intelligent contract corresponding to each follow-up sub-event of the resource receiving end type judgment sub-event.
In one embodiment, the obtaining the event processing result corresponding to the resource transfer event by calling the intelligent contract corresponding to each subsequent sub-event of the resource receiving end type judgment sub-event includes:
the intelligent contract corresponding to each follow-up sub-event of the sub-event is judged by calling the type of the resource receiving end, and a plurality of sub-event processing information is obtained; the sub-event processing information comprises at least one of processing result information and processing result identification;
and obtaining an event processing result corresponding to the resource transfer event according to the plurality of sub-event processing information.
In a second aspect, the present application further provides a resource information processing apparatus, including:
the resource deduction amount information acquisition module is used for acquiring resource deduction amount information corresponding to a resource transfer event when the resource transfer event aiming at a target resource receiving end is detected; the resource deduction amount information is determined according to an event processing result corresponding to the resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request to determine in response to the resource transfer request corresponding to the resource transfer event by a pre-established blockchain network;
The distributed cache module is used for storing the plurality of resource deduction amount information meeting preset cache conditions into a distributed cache to obtain distributed cache data corresponding to the target resource receiving end;
and the synchronous uplink module is used for synchronizing the distributed cache data to the blockchain network when a synchronous uplink triggering event is detected, so as to obtain the resource deduction statistical information corresponding to the target resource receiving end.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the resource information processing method as described above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the resource information processing method as described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when being executed by a processor, implements the steps of the resource information processing method as described above.
According to the resource information processing method, the device, the computer equipment, the storage medium and the computer program product, when the resource transfer event aiming at the target resource receiving end is detected, the resource deduction amount information corresponding to the resource transfer event is acquired, the resource deduction amount information is determined according to the event processing result corresponding to the resource transfer event, the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request through a pre-established blockchain network in response to the resource transfer request corresponding to the resource transfer event, then the plurality of resource deduction amount information meeting the preset cache condition is stored in a distributed cache to obtain distributed cache data corresponding to the target resource receiving end, further when the synchronous uplink triggering event is detected, the distributed cache data is synchronized to a blockchain network to obtain resource deduction statistical information corresponding to the target resource receiving end, the related business function can be realized by calling the intelligent contract corresponding to the resource transfer request based on the pre-established blockchain network, so that the data security is improved, and the read-write service high concurrency and low-delay requirements and the resource information processing system can be met by introducing an NOS cache mechanism.
Drawings
FIG. 1 is a flow chart of a method for processing resource information in one embodiment;
FIG. 2 is a schematic diagram of a resource transfer scenario structure in one embodiment;
FIG. 3 is a schematic diagram of a resource transfer event processing flow in one embodiment;
FIG. 4 is a flow chart of another method for processing resource information in one embodiment;
FIG. 5 is a block diagram showing a configuration of a resource information processing apparatus in one embodiment;
FIG. 6 is an internal block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for presentation, analyzed data, etc.) related in the present application are both information and data authorized by the user or sufficiently authorized by each party; correspondingly, the application also provides a corresponding user authorization entry for the user to select authorization or select rejection.
In one embodiment, as shown in fig. 1, a resource information processing method is provided, where this embodiment is applied to a terminal to illustrate the method, it is understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step 101, when a resource transfer event aiming at a target resource receiving end is detected, acquiring resource deduction amount information corresponding to the resource transfer event;
as an example, the target resource receiving end may be a specified type of resource receiving end, such as a terminal corresponding to a small business.
The resource deduction amount information may be determined according to an event processing result corresponding to the resource transfer event, for example, the user side may trigger the resource transfer event for the target resource receiving end, and since the financial institution may provide related services for resource transfer and resource storage for the user and the merchant, the financial institution side may obtain a corresponding resource feedback amount for the resource transfer event, where the resource feedback amount has a corresponding relationship with the resource deduction amount corresponding to the target resource receiving end.
The event processing result may be determined by calling an intelligent contract corresponding to a resource transfer request in response to the resource transfer request corresponding to the resource transfer event by the pre-established blockchain network, where the resource transfer request may be used to request transfer of resources in the user account to the target resource receiving account, for example, the user may send the resource transfer request to perform resource transfer processing between the user account and the target resource receiving account.
In practical application, when a resource transfer event aiming at a target resource receiving end is detected, an intelligent contract corresponding to each sub-event in the resource transfer event is called through a blockchain network in response to a resource transfer request corresponding to the resource transfer event, an event processing result corresponding to the resource transfer event can be obtained, and further resource deduction amount information corresponding to the resource transfer event can be obtained according to the event processing result.
In an example, as shown in fig. 2 and fig. 3, a hyperledger fabric architecture may be used to obtain a pre-established blockchain network, where the blockchain network may be a coalition chain type, and flows of small micro-business admission judgment, resource feedback collection mode, small micro-exemption admission judgment, resource feedback amount calculation, NOS accumulation and subtraction may be implemented by invoking an intelligent contract corresponding to a resource transfer service of a small micro-business, and related user query rights and resource transfer related rights may be controlled for different resource transfer events based on the pre-established blockchain network, so as to implement decentralization processing of resource information.
For example, based on a pre-established blockchain network, data can be recorded in the form of a public general ledger, and both sides of resource transfer can check the resource feedback amount reduction state, the small micro-business resource storage condition, the small micro-business resource transfer statistics details and the like, so that the safety of resource information processing is improved without the aid of the service of a third-party mechanism.
102, storing a plurality of the resource deduction amount information meeting a preset caching condition into a distributed cache to obtain distributed cache data corresponding to the target resource receiving end;
the distributed cache data may include associated data of a resource transfer event for the target resource receiving end, for example, resource deduction amount information, resource transfer amount information and the like may be obtained according to an event processing result, and other related data may also be included, which is not particularly limited in this embodiment.
As an example, the preset buffering condition may be to buffer the resource deduction amount information within a preset time range, for example, a plurality of resource deduction amount information of the target resource receiving end within 1 hour may be accumulated to buffer based on the NOS mechanism.
In a specific implementation, because the resource transfer condition corresponding to the target resource receiving end needs to be counted, after the resource deduction amount information corresponding to each resource transfer event is obtained, a plurality of resource deduction amount information meeting the preset caching condition is stored in the distributed cache, and further distributed cache data corresponding to the target resource receiving end can be obtained, so that the data corresponding to the resource transfer event of the target resource receiving end in a certain time is accumulated by introducing an NOS mechanism, and huge pressure on a Hyperledger Fabric framework in a high concurrency scene can be effectively solved.
In one example, if a small micro-merchant experiences tens of thousands of resource transfer events within 1 hour, repeatedly invoking NOS to accumulate smart contracts may result in the smart contracts failing to account for the inaccuracy of the statistics. For each resource transfer event, after deducting the amount information from the resources, the closed loop processing is not completed, in order to calculate the resource transfer statistics amount of the small micro-merchants, a NOS mechanism can be introduced to accumulate the resource transfer amount of the small micro-merchants within 1 hour, and the data corresponding to the resource transfer event within 1 hour of the target resource receiving end is stored in NOS and synchronized to the blockchain in an hour unit, so that the system pressure can be effectively relieved, and the system performance and the data security can be improved based on combining the distributed cache with the blockchain.
And step 103, synchronizing the distributed cache data to the blockchain network when the synchronous uplink triggering event is detected, and obtaining the resource deduction statistical information corresponding to the target resource receiving end.
In practical application, when the synchronous uplink trigger event is detected, if the synchronous uplink trigger event can be set to be synchronous to the blockchain in an hour unit, the distributed cache data can be synchronized to the blockchain network, and further the resource deduction statistical information corresponding to the target resource receiving end can be obtained, the resource deduction statistical information can be used for representing a micro merchant aiming at the target resource receiving end, and the financial institution end obtains the corresponding resource feedback amount based on the resource transfer event.
Compared with the conventional method, the technical solution of this embodiment constructs a blockchain network based on a Hyperledger Fabric framework, so that a user, a merchant and a financial institution can form a corresponding combination of resource transfer events, and different resource transfer events can be located in different channels, and the channels can provide a communication mechanism, and the designated orderer node and the peer node are connected together to form a virtual communication link with security, so as to perform data isolation (the block data can only be stored in member nodes that have been added into the channels). Each node to be added into the channel needs to have an identity tag obtained through a Member Service Provider (MSP), a user can transfer resources through a financial processing channel, and the input information of the user side can comprise the amount of resource transfer, the number of merchants, the date of resource transfer, the number of internal agreements and the like. Under the condition that the identity of the target resource receiving end micro merchant is successfully verified through the private key, the target resource receiving end micro merchant realizes resource receiving processing through a relevant channel, confirms whether the target resource receiving end micro merchant has resource deduction and exemption permission or not, and can record relevant resource transfer information into a blockchain. The financial institution can have the identity mark of the joining channel, can maintain the corresponding resource deduction and exemption permission of each merchant in the blockchain (if yes, whether to enjoy the relevant identifier of exemption), and can realize the functions of small-scale merchant admittance judgment, resource feedback collection mode, small-scale exemption admittance judgment, resource feedback amount calculation, NOS accumulation and accumulation reduction and the like by calling the chain code. The NOS accumulation and accumulation triggering can be realized by a distributed caching mechanism, the data after the NOS expiration can be updated to the peer node, and a user, a merchant and a financial institution corresponding to any resource transfer event are located in the same channel, so that the security can be ensured only by inquiring relevant service detail data through the user, the merchant and the financial institution of which the member service provider obtains the identity mark.
In the resource information processing method, when the resource transfer event aiming at the target resource receiving end is detected, the resource deduction amount information corresponding to the resource transfer event is acquired, then a plurality of resource deduction amount information meeting the preset caching condition is stored in the distributed cache to obtain the distributed cache data corresponding to the target resource receiving end, when the synchronous uplink triggering event is detected, the distributed cache data is synchronized to the blockchain network to obtain the resource deduction statistical information corresponding to the target resource receiving end, the related business function can be realized by calling the intelligent contract corresponding to the resource transfer request based on the pre-established blockchain network so as to process the resource transfer event, the data safety is improved, the read-write service requirement of high concurrency and low delay of business can be met by introducing the NOS caching mechanism, and the system availability and the resource information processing efficiency are improved.
In one embodiment, after the step of obtaining the resource deduction statistics corresponding to the target resource receiving end, the method may further include the following steps:
when the resource transfer statistical amount information of the target resource receiving end in the accumulated time period is smaller than or equal to a preset accumulated threshold value, adjusting the resource deduction statistical information corresponding to the target resource receiving end; the preset accumulation threshold value is determined based on the resource storage information of the target resource receiving end; or when the resource transfer statistical amount information of the target resource receiving end in the accumulated time period is larger than the preset accumulated threshold value, updating the resource deduction statistical information corresponding to the target resource receiving end according to the resource exceeding information.
In an example, the resource deduction statistics corresponding to the target resource receiving end may be adjusted when the resource transfer statistics amount information of the target resource receiving end in the accumulation period is less than or equal to a preset accumulation threshold, for example, for a portion of the month accumulation where the resource transfer statistics amount is less than or equal to a preset multiple (e.g., ten times) of the resource storage amount (i.e., the resource storage information) of the small-scale merchant in the financial institution, the relevant resource feedback amount is not to be charged.
In still another example, when the resource deduction statistics information of the target resource receiving end in the accumulation period is greater than a preset accumulation threshold, the resource deduction statistics information corresponding to the target resource receiving end may be updated according to the resource exceeding information, for example, for a part of the resource storage amount of the micro-merchant in the financial institution, which exceeds the resource storage amount of the micro-merchant under month accumulation, the corresponding resource feedback amount may be collected according to the corresponding resource feedback collection mode for the exceeding part of the resource transfer statistics amount.
In this embodiment, when the resource transfer statistics amount information of the target resource receiving end in the accumulation period is smaller than or equal to the preset accumulation threshold, the resource deduction statistics information corresponding to the target resource receiving end is adjusted, or when the resource transfer statistics amount information of the target resource receiving end in the accumulation period is larger than the preset accumulation threshold, the resource deduction statistics information corresponding to the target resource receiving end is updated according to the resource exceeding information, so that the resource deduction statistics amount corresponding to the target resource receiving end can be flexibly adjusted based on actual conditions.
In one embodiment, the obtaining the resource deduction amount information corresponding to the resource transfer event may include the following steps:
responding to a resource transfer request corresponding to the resource transfer event through the blockchain network, and calling an intelligent contract corresponding to each sub-event in the resource transfer event to obtain an event processing result corresponding to the resource transfer event; and determining a common committee node in the blockchain network, executing a common flow based on the common committee node, and storing the event processing result into each blockchain node of the blockchain network.
In practical application, by using Hyperledger Fabric platform as network environment bottom layer, the call to intelligent contract can be realized by using Fabric-SDK-Go related API in service layer, and Web application instance program can be realized by using GOWeb. In order to improve the scalability and maintainability of applications, hierarchical designs may also be implemented using MVC-based architecture schemas.
In building a blockchain network, hyperledger Fabric requires a large number of related certificates to secure the data of the entire resource transfer flow (e.g., TSL, authentication, signature block) when processing resource information. The initial block and channel configuration transaction can be generated by using a configtxgen tool in Hyperledger Fabric and stored in a relevant directory, virtual computers with different roles can be constructed and processed by using a Docker in order to construct a blockchain network, relevant Docker containers are needed in an operating system, and a listening address, a port number, an initial block, MSP information and mapping information of a host and the Docker of an Orderer node can be set. Meanwhile, the monitoring address, port number, MSP information, related certificate names and related mapping information of the paths where the N Peer nodes are located and the host and the Docker can be set, and the CA server names, catalogues, certificate names and related information of the paths, key names and paths can be set.
The Orderer node can sort resource transfer requests submitted by the user end, and can generate block broadcasting to Peer nodes in the channel. The Peer Node may be a Node within an organization, and the Peer Node may receive ordered state updates from the service ordering Node in the form of blocks to maintain state and ledger information. The Peer nodes can be divided into the following different roles according to different division of labor:
1. endorsement node: different intelligent contracts are called according to the specified strategy, and the intelligent contracts corresponding to the resource transfer requests can be called, wherein the intelligent contracts are set on the basis of a small business resource transfer service scene, and can endorse the result and feed back the result.
2. Submitting node: the intelligent contracts related to resource feedback amount calculation, NOS accumulation and accumulation reduction can be called to complete corresponding functional processing, and the node has the function of verifying the information related to the resource feedback amount based on the micro-merchant and storing the information into account book information.
3. Anchor node: each organization (Org) in a channel has an anchor node that allows Peer nodes of different organizations in the same channel to discover all Peer nodes within the channel. For example, the user, the merchant and the financial institution related to the resource transfer event are all in the same channel, but the user and the merchant under different resource transfer scenes are in different organizations, wherein the anchor node can allow the Peer nodes of different organizations in the same channel to discover all nodes of the channel side, thereby being beneficial to the financial institution to acquire detailed resource transfer information of all nodes in the channel and providing data support for timely discovering abnormal resource transfer information.
4. Leader node: as a representative of all nodes within an organization, a connection may be made to a service ordering node and the bulk blocks received by the service ordering node may be broadcast to other nodes within the organization. Because the characteristic of the blockchain is that all nodes store all resource transfer information, the accuracy of the information can be ensured based on the characteristic that the blockchain is not tamperable.
In one example, after a pre-established blockchain network is obtained, the GoLang language may be used to design an application, which may include chain code (e.g., a smart contract portion), such as may design a smart contract corresponding to a resource transfer request. The chain code can be divided into a system chain code and a user chain code, and the system chain code can be responsible for processing logic of the Fabric node, including system configuration, endorsement, checking and the like. Hyperledger Fabric system chain codes only support GoLang language, and registration and deployment can be automatically completed when the Peer node is started. The system chain code may include the following different types:
1. configuring a system chain code: and the channel configuration of the Peer end is processed.
2. Lifecycle system chain code: is responsible for managing the life cycle of the user side.
3. Querying a system chain code: an account book query API is provided, such as obtaining information about blocks and transactions.
4. Endorsement management system chain code: the method is responsible for an endorsement (signature) process, supports the management of an endorsement policy, can sign the simulation running result of the submitted resource transfer proposal, and can create response information to return to the user side.
5. Verifying a system chain code: verification of the processing transaction, including checking endorsement policies and multi-version concurrency control. In yet another example, the intelligent contracts corresponding to the resource transfer requests belong to the user chain code type, the user chain code can be used by application developers to formulate relevant rules according to requirements and members of different scenes, and business processing logic codes based on the blockchain distributed ledger state can be written by using GoLang language to run in a chain code container to interact with the ledger state through an interface provided by Hyperledger Fabric. User chain code is important in the whole application program, and can operate on account book data downwards and can provide a calling interface for enterprise-level application programs upwards. The user chain code related to the embodiment relates to a small-scale merchant admittance judgment, a resource feedback collection mode, a small-scale exemption admittance judgment, a resource feedback amount calculation, NOS accumulation and accumulation reduction
In an alternative embodiment, after obtaining the intelligent contract corresponding to the resource transfer request, the MVC architecture may be used to implement the user service layer. Advantages of the MVC mode include high cohesiveness, low coupling, high reusability, so that scalability and maintainability can be improved, project management is facilitated, and packet development is simplified. The service layer can realize the access judgment of small micro merchants and the collection mode of resource feedback by calling user chain codes by utilizing Fabric-SDK-Go, the access judgment of small micro-scale exemption, the calculation of the amount of resource feedback and the accumulation and subtraction of NOS, and the related functions of the application program used by the user can be supported by adopting the Web browser application. In order to facilitate the operation and use of the user and consider the expandability and maintainability of the later stage of the application program, the application program can be managed in a layered manner, and a control layer and a view layer are added. The view layer can provide a visual interface and interaction for users, the control layer can receive user requests, and the control layer accesses the service layer, so that each user chain code can be called to realize small-scale user admittance judgment and resource feedback collection modes, small-scale exemption admittance judgment, resource feedback amount calculation, NOS accumulation and accumulation reduction.
In this embodiment, an intelligent contract corresponding to each sub-event in a resource transfer event is invoked through a blockchain network in response to a resource transfer request corresponding to the resource transfer event, so as to obtain an event processing result corresponding to the resource transfer event, further determine a consensus committee node in the blockchain network, execute a consensus process based on the consensus committee node, and store the event processing result into each blockchain node of the blockchain network.
In one embodiment, the determining the common committee node in the blockchain network may include the steps of:
determining a candidate node set from the blockchain network according to node access statistical information of the blockchain network; the node access statistical information is used for representing the access activity degree corresponding to each node in the blockchain network, and the access activity degree corresponding to each candidate node in the candidate node set meets a preset condition; and determining a target node from the candidate node set as the common committee node.
In a specific implementation, to meet the high call volume scenario, a modified rbft consensus algorithm may be employed to implement a consensus mechanism of the blockchain network. The rPBFT consensus algorithm aims at decoupling the network complexity of the consensus algorithm from the scale of the consensus nodes under the premise of ensuring the performance and the safety of the blockchain system, and improving the expandability of the blockchain, and a mode of selecting part of nodes as 'consensus committee nodes' to participate in each round of PBFT consensus under the large node scale can be adopted. Because the number of the common-knowledge committee nodes is fixed and is irrelevant to the node scale, the rPBFT common-knowledge algorithm has stronger expandability. In order to ensure the system safety and prevent joint disfigurement of the common committee nodes, the rPBFT algorithm can periodically rotate the common committee nodes based on a random number cryptography algorithm.
In an example, based on the monthly resource transfer event activity condition of the micro-merchant, the rotation common committee node can be randomly screened out from the nodes (i.e. candidate node sets) ranked one third of the front of the access resource transfer event activity (i.e. node access statistical information), and the rotation common committee node is rescreened in a month dimension, so that the rotation of the nodes of the micro-merchant can be kept all the time, and the problem of disuse of the common committee node is effectively prevented (because the number of the micro-merchant is numerous, and one third of the nodes are difficult to realize at the same time).
In yet another example, by using the improved rpbf consensus mechanism, it is ensured that data is recorded into the blockchain in a time ordered manner while it is recorded into the blockchain, while ensuring that all non-failed nodes on the blockchain record have consistent relevant information.
In this embodiment, the candidate node set is determined from the blockchain network according to the node access statistical information of the blockchain network, and then the target node is determined from the candidate node set, so that the target node is used as the consensus committee node, which can effectively prevent the problem of disfigurement of the consensus committee node, and maintain the consistency of data.
In one embodiment, after the step of determining the common committee node in the blockchain network, the step of:
and when the common committee node is detected to meet the preset rotation selection condition, replacing the common committee node according to the new common committee node obtained by rescreening.
In practical applications, the rpbf consensus algorithm may divide the consensus nodes into different types, such as consensus committee nodes, validation nodes. Wherein the consensus committee node may be used to perform a PBFT consensus process, which may be selected as a Leader (Leader node) generation block; the verification node may not perform the PBFT consensus flow, but only perform block verification.
For example, the rbft consensus algorithm can include the following system parameters:
epoch_sealer_num: number of consensus committee nodes.
Epoch_sealer_rotation_num: number of common committee nodes rotated in the common committee node rotation process.
Epoch_block_num; the common committee node rotates the period. In this embodiment, the common committee node may be rotated by using the month as the dimension according to the rotation principle (i.e. preset rotation selection condition) of generating the corresponding block number per month.
The above parameters can be dynamically adjusted to support more flexible blockchain application requirements. In order to ensure proper operation of the improved rbft algorithm, at least 2/3 of the common committee is required to operate properly, and in order to ensure consistency of the system when nodes are replaced, the above system parameters need to satisfy the following relationship:
Epoch_sealer_num=3*f+1
2*f+1-Epoch_sealer_rotating_num>f+Epoch_sealer_rotating_num
namely, epoch_sealer_rotation_num < (f+1)/2
According to the formula, if f consensus committee nodes are abnormal in the rotation of the consensus committee nodes, the normal consensus committee nodes of the epoch_sealer_rotation_num are replaced, and the replaced normal consensus committee nodes of the epoch_sealer_rotation_num are abnormal, so that the number of the normal consensus committee nodes is required to be ensured to be larger than that of the abnormal consensus committee nodes.
In an example, since the improved rbft consensus algorithm is adopted, only num consensus committee nodes are selected to participate in the consensus in each round of consensus, the network complexity is fixed to 0 (epoch_sealer_rotation_num), and the scalability is achieved regardless of the node size.
In yet another example, since the amount of resource transfer events per day reaches tens of millions of small micro-merchants, it is most appropriate to employ a consensus algorithm that does not affect performance due to expansion of node size. In the aspect of safety performance, during initialization, fisher_sealer_num common committee nodes can be adopted by the rPBFT algorithm, so that the randomness of the selection of the initial common committee nodes is ensured; when the nodes are rotated, the common committee node can be determined based on the non-tamper VRF random numbers generated by the Leader node, so that the randomness and the unpredictability of the rotation of the common committee node can be ensured, and the system performance is further improved.
In this embodiment, when the fact that the common committee node meets the preset rotation selection condition is detected, the common committee node is replaced according to the new common committee node obtained through rescreening, so that the rotation node can be kept, and the validity of the common committee node is improved.
In one embodiment, the sub-event may include a resource receiving end type judging sub-event, and the step of calling, through the blockchain network, an intelligent contract corresponding to each sub-event in the resource transfer event in response to a resource transfer request corresponding to the resource transfer event to obtain an event processing result corresponding to the resource transfer event may include the following steps:
responding to a resource transfer request corresponding to the resource transfer event through the blockchain network, and calling an intelligent contract corresponding to the resource receiving end type judgment sub-event; under the condition that the target resource receiving end is judged to be a resource receiving end of a specified type, adding a resource deduction and deduction mark to the resource transfer event; the resource deduction mark is used for calling an intelligent contract corresponding to the next sub-event of the resource receiving end type judgment sub-event; and obtaining an event processing result corresponding to the resource transfer event by calling the intelligent contract corresponding to each follow-up sub-event of the resource receiving end type judgment sub-event.
In a specific implementation, the type judgment sub-event may be a small micro merchant admission judgment event, and after receiving a resource transfer request sent by a user side, the system may judge whether the merchant involved belongs to the small micro merchant type. The small micro merchant admittance judging flow has an important shunting function on whether the subsequent branch processing of resource deduction and deduction is carried out, the small micro merchant file information stored on the blockchain can be called according to the input merchant number, if the small micro merchant type is judged, the subsequent branch processing of resource deduction and deduction can be carried out, and otherwise, the subsequent branch processing of normal resource deduction calculation is carried out.
For example, based on the small micro-merchant admission judgment processing intelligent contract (i.e. the intelligent contract corresponding to the type judgment sub-event), the resource transfer information transmitted from the user side can be realized, the resource transfer request submitted by the user side is sequenced through the Orderer node, a block is generated and broadcast to the Peer node, then the endorsement node can be triggered to call the small micro-merchant admission judgment processing intelligent contract, the resource deduction and deduction mark corresponding to the newly added resource of each resource transfer event after the processing of the resource transfer request corresponding data is returned to the Peer node, and further the subsequent endorsement node can be triggered to call the intelligent contract of the next flow.
In this embodiment, the intelligent contract corresponding to the sub-event is determined by calling the type of the resource receiving end through the blockchain network in response to the resource transfer request corresponding to the resource transfer event, then adding the resource deduction and exemption mark to the resource transfer event under the condition that the target resource receiving end is determined to be the resource receiving end of the specified type, and further obtaining the event processing result corresponding to the resource transfer event by calling the intelligent contract corresponding to each subsequent sub-event of the resource receiving end type determination sub-event, so as to play a role in shunting whether the subsequent resource deduction and exemption processing is performed.
In one embodiment, the obtaining the event processing result corresponding to the resource transfer event by calling the intelligent contract corresponding to each subsequent sub-event of the resource receiving end type judgment sub-event may include the following steps:
the intelligent contract corresponding to each follow-up sub-event of the sub-event is judged by calling the type of the resource receiving end, and a plurality of sub-event processing information is obtained; the sub-event processing information comprises at least one of processing result information and processing result identification; and obtaining an event processing result corresponding to the resource transfer event according to the plurality of sub-event processing information.
In an example, the subsequent acquisition of the resource feedback collection mode intelligent contract may be triggered only for the return resource deduction-free identified resource transfer event, i.e., for the resource transfer event of the small micro-merchant involved in such a situation. The resource feedback receiving mode comprises a mode of proportional receiving, event quantity receiving, combined receiving and interval receiving.
For example, for the case of proportional charging, the amount of resource feedback charged by the financial institution may be determined according to the resource feedback amount calculation parameters set by the business personnel for the merchant file, and the NOS may be invoked to determine whether the current month of the resource transfer event exceeds the resource transfer credit for the reduced resource feedback amount agreed by the financial institution and the merchant. In the event of an excess, the amount of resource feedback charged by the financial institution may be determined in accordance with the resource feedback amount calculation parameter.
For another example, based on the intelligent contract of the resource feedback collection mode, the resource feedback collection mode corresponding to each resource transfer event can be confirmed, and for the condition that the calculation parameter of the resource feedback amount is reduced or the resource feedback amount is reduced caused by the accumulation and subtraction operation of NOS, a specific identifier can be returned.
In yet another example, after obtaining the intelligent contract of the resource feedback collection mode and transmitting the processed data back to the Peer node, the intelligent contract can be called again for the resource transfer event of two identification fields of the newly added resource feedback collection mode and the resource feedback rewards in the processed data. For small micro merchants related to the resource transfer event, the resource transfer statistics amount under the monthly accumulation of the small micro merchants can be not up to the part of the resource transfer event of the small micro merchants in the preset multiple resource storage amount of the financial institution, the newly increased small micro merchants can be marked as yes, the newly increased small micro merchants can be marked as no aiming at the part of the resource transfer event which reaches the preset multiple resource storage amount, and further the Hyperledger Fabric framework can return the related data submitted by the judgment intelligent contract which is subjected to the small micro-reduction to the Peer node so as to trigger the endorsement node to call the intelligent contract of the next flow.
In an alternative embodiment, for a resource transfer event completing a small mitigation admission judgment intelligent contract, the resource feedback amount calculation intelligent contract may be invoked to complete the resource feedback amount calculation after data is transmitted back to the Peer node. The method needs to use the intelligent contract of the resource feedback receiving mode, the small-scale deduction permission judgment intelligent contract, the returned resource feedback receiving mode identifier, the resource feedback rewarding identifier and the small-scale merchant deduction identifier (namely the processing result identifier). For resource transfer events with small micro-merchant mitigation identifications, a charge resource feedback amount of 0 (i.e., processing result information) may be stored on the blockchain back to the Peer node. For non-exempted resource transfer events, the resource feedback amount can be calculated according to the resource feedback receiving mode identification and the resource feedback rewarding identification and the rules, and the calculated resource feedback amount (i.e. the processing result information) can be stored on the blockchain and returned to the Peer node.
In this embodiment, multiple sub-event processing information is obtained by calling an intelligent contract corresponding to each sub-event subsequent to the sub-event determined by the type of the resource receiving end, and then an event processing result corresponding to the resource transfer event is obtained according to the multiple sub-event processing information, and a related service function can be realized by calling the intelligent contract corresponding to each sub-event, so as to process the resource transfer event.
In one embodiment, as shown in fig. 4, a flow diagram of another resource information processing method is provided. In this embodiment, the method includes the steps of:
in step 401, when a resource transfer event for a target resource receiving end is detected, an intelligent contract corresponding to a sub-event is called by the blockchain network in response to a resource transfer request corresponding to the resource transfer event. In step 402, in the case that the target resource receiving end is determined to be a resource receiving end of a specified type, adding a resource deduction mark to the resource transfer event; the resource deduction mark is used for calling the intelligent contract corresponding to the next sub-event of the resource receiving end type judgment sub-event. In step 403, the event processing result corresponding to the resource transfer event is obtained by calling the intelligent contract corresponding to each subsequent sub-event of the resource receiving end type judgment sub-event. In step 404, a set of candidate nodes is determined from the blockchain network based on the node access statistics of the blockchain network; the node access statistical information is used for representing the access activity degree corresponding to each node in the blockchain network. In step 405, a target node is determined from the candidate node set as a common committee node, a common flow is performed based on the common committee node, and event processing results are stored in each blockchain node of the blockchain network. In step 406, the amount information of deduction of the plurality of resources satisfying the preset buffering condition is stored in the distributed buffer, so as to obtain distributed buffer data corresponding to the target resource receiving end. In step 407, when the synchronization uplink trigger event is detected, the distributed cache data is synchronized to the blockchain network, so as to obtain the resource deduction statistical information corresponding to the target resource receiving end. It should be noted that, the specific limitation of the above steps may be referred to the specific limitation of a resource information processing method, which is not described herein.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a resource information processing device for realizing the above-mentioned related resource information processing method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more resource information processing apparatus provided below may refer to the limitation of the resource information processing method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 5, there is provided a resource information processing apparatus including:
a resource deduction amount information obtaining module 501, configured to obtain resource deduction amount information corresponding to a resource transfer event when the resource transfer event for a target resource receiving end is detected; the resource deduction amount information is determined according to an event processing result corresponding to the resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request to determine in response to the resource transfer request corresponding to the resource transfer event by a pre-established blockchain network;
the distributed cache module 502 is configured to store the plurality of resource deduction amount information that satisfy a preset cache condition into a distributed cache, so as to obtain distributed cache data corresponding to the target resource receiving end;
and the synchronous uplink module 503 is configured to synchronize the distributed cache data to the blockchain network when a synchronous uplink trigger event is detected, so as to obtain resource deduction statistical information corresponding to the target resource receiving end.
In one embodiment, the apparatus further comprises:
the resource deduction statistical information change module is used for adjusting the resource deduction statistical information corresponding to the target resource receiving end when the resource transfer statistical amount information of the target resource receiving end in the accumulated time period is smaller than or equal to a preset accumulated threshold value; the preset accumulation threshold value is determined based on the resource storage information of the target resource receiving end; or when the resource transfer statistical amount information of the target resource receiving end in the accumulated time period is larger than the preset accumulated threshold value, updating the resource deduction statistical information corresponding to the target resource receiving end according to the resource exceeding information.
In one embodiment, the resource deduction amount information obtaining module 501 includes:
the intelligent contract processing sub-module is used for responding to the resource transfer request corresponding to the resource transfer event through the blockchain network, calling the intelligent contract corresponding to each sub-event in the resource transfer event and obtaining an event processing result corresponding to the resource transfer event;
and the block chain storage sub-module is used for determining a common committee node in the block chain network, executing a common flow based on the common committee node and storing the event processing result into each block chain node of the block chain network.
In one embodiment, the blockchain storage submodule includes:
a candidate node set determining unit, configured to determine a candidate node set from the blockchain network according to node access statistical information of the blockchain network; the node access statistical information is used for representing the access activity degree corresponding to each node in the blockchain network, and the access activity degree corresponding to each candidate node in the candidate node set meets a preset condition;
and the common committee node obtaining unit is used for determining a target node from the candidate node set as the common committee node.
In one embodiment, the apparatus further comprises:
and the node rescreening module is used for replacing the common committee node according to the new common committee node obtained by rescreening when the common committee node is detected to meet the preset rotation selection condition.
In one embodiment, the sub-event includes a resource receiving end type judgment sub-event, and the smart contract processing sub-module includes:
the type judging sub-module is used for responding to the resource transfer request corresponding to the resource transfer event through the blockchain network and calling the intelligent contract corresponding to the resource receiving end type judging sub-event;
a deduction mark adding sub-module, configured to add a resource deduction mark to the resource transfer event when it is determined that the target resource receiving end is a resource receiving end of a specified type; the resource deduction mark is used for calling an intelligent contract corresponding to the next sub-event of the resource receiving end type judgment sub-event;
and the subsequent sub-event processing sub-module is used for obtaining an event processing result corresponding to the resource transfer event by calling the intelligent contract corresponding to each subsequent sub-event of the resource receiving end type judgment sub-event.
In one embodiment, the subsequent sub-event processing sub-module includes:
the sub-event processing information obtaining unit is used for obtaining a plurality of sub-event processing information by calling the intelligent contracts corresponding to the follow-up sub-events of the sub-event judged by the type of the resource receiving end; the sub-event processing information comprises at least one of processing result information and processing result identification;
and the event processing result determining unit is used for obtaining event processing results corresponding to the resource transfer event according to the plurality of sub-event processing information.
Each of the modules in the above-described resource information processing apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured 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 and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a resource information processing method.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
when a resource transfer event aiming at a target resource receiving end is detected, acquiring resource deduction amount information corresponding to the resource transfer event; the resource deduction amount information is determined according to an event processing result corresponding to the resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request to determine in response to the resource transfer request corresponding to the resource transfer event by a pre-established blockchain network;
storing the plurality of resource deduction amount information meeting the preset caching conditions into a distributed cache to obtain distributed cache data corresponding to the target resource receiving end;
And synchronizing the distributed cache data to the blockchain network when the synchronous uplink triggering event is detected, and obtaining the resource deduction statistical information corresponding to the target resource receiving end.
In one embodiment, the processor, when executing the computer program, also implements the steps of the resource information processing method in the other embodiments described above.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
when a resource transfer event aiming at a target resource receiving end is detected, acquiring resource deduction amount information corresponding to the resource transfer event; the resource deduction amount information is determined according to an event processing result corresponding to the resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request to determine in response to the resource transfer request corresponding to the resource transfer event by a pre-established blockchain network;
storing the plurality of resource deduction amount information meeting the preset caching conditions into a distributed cache to obtain distributed cache data corresponding to the target resource receiving end;
And synchronizing the distributed cache data to the blockchain network when the synchronous uplink triggering event is detected, and obtaining the resource deduction statistical information corresponding to the target resource receiving end.
In an embodiment, the computer program, when executed by a processor, further implements the steps of the resource information processing method in the other embodiments described above.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
when a resource transfer event aiming at a target resource receiving end is detected, acquiring resource deduction amount information corresponding to the resource transfer event; the resource deduction amount information is determined according to an event processing result corresponding to the resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request to determine in response to the resource transfer request corresponding to the resource transfer event by a pre-established blockchain network;
storing the plurality of resource deduction amount information meeting the preset caching conditions into a distributed cache to obtain distributed cache data corresponding to the target resource receiving end;
And synchronizing the distributed cache data to the blockchain network when the synchronous uplink triggering event is detected, and obtaining the resource deduction statistical information corresponding to the target resource receiving end.
In an embodiment, the computer program, when executed by a processor, further implements the steps of the resource information processing method in the other embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. A resource information processing method, the method comprising:
when a resource transfer event aiming at a target resource receiving end is detected, acquiring resource deduction amount information corresponding to the resource transfer event; the resource deduction amount information is determined according to an event processing result corresponding to the resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request to determine in response to the resource transfer request corresponding to the resource transfer event by a pre-established blockchain network;
Storing the plurality of resource deduction amount information meeting the preset caching conditions into a distributed cache to obtain distributed cache data corresponding to the target resource receiving end;
and synchronizing the distributed cache data to the blockchain network when the synchronous uplink triggering event is detected, and obtaining the resource deduction statistical information corresponding to the target resource receiving end.
2. The method according to claim 1, wherein after the step of obtaining the resource deduction statistics corresponding to the target resource receiving end, the method further comprises:
when the resource transfer statistical amount information of the target resource receiving end in the accumulated time period is smaller than or equal to a preset accumulated threshold value, adjusting the resource deduction statistical information corresponding to the target resource receiving end; the preset accumulation threshold value is determined based on the resource storage information of the target resource receiving end;
or when the resource transfer statistical amount information of the target resource receiving end in the accumulated time period is larger than the preset accumulated threshold value, updating the resource deduction statistical information corresponding to the target resource receiving end according to the resource exceeding information.
3. The method of claim 1, wherein the obtaining the resource deduction amount information corresponding to the resource transfer event comprises:
responding to a resource transfer request corresponding to the resource transfer event through the blockchain network, and calling an intelligent contract corresponding to each sub-event in the resource transfer event to obtain an event processing result corresponding to the resource transfer event;
and determining a common committee node in the blockchain network, executing a common flow based on the common committee node, and storing the event processing result into each blockchain node of the blockchain network.
4. The method of claim 3, wherein the determining a common committee node in the blockchain network comprises:
determining a candidate node set from the blockchain network according to node access statistical information of the blockchain network; the node access statistical information is used for representing the access activity degree corresponding to each node in the blockchain network, and the access activity degree corresponding to each candidate node in the candidate node set meets a preset condition;
and determining a target node from the candidate node set as the common committee node.
5. The method of claim 3, wherein after the step of determining a common committee node in the blockchain network, the method further comprises:
and when the common committee node is detected to meet the preset rotation selection condition, replacing the common committee node according to the new common committee node obtained by rescreening.
6. The method of claim 3, wherein the sub-event includes a resource receiving end type judgment sub-event, and the calling, through the blockchain network, an intelligent contract corresponding to each sub-event in the resource transfer event in response to a resource transfer request corresponding to the resource transfer event, to obtain an event processing result corresponding to the resource transfer event includes:
responding to a resource transfer request corresponding to the resource transfer event through the blockchain network, and calling an intelligent contract corresponding to the resource receiving end type judgment sub-event;
under the condition that the target resource receiving end is judged to be a resource receiving end of a specified type, adding a resource deduction and deduction mark to the resource transfer event; the resource deduction mark is used for calling an intelligent contract corresponding to the next sub-event of the resource receiving end type judgment sub-event;
And obtaining an event processing result corresponding to the resource transfer event by calling the intelligent contract corresponding to each follow-up sub-event of the resource receiving end type judgment sub-event.
7. The method of claim 6, wherein the obtaining the event processing result corresponding to the resource transfer event by calling the intelligent contract corresponding to each subsequent sub-event of the resource receiving end type judgment sub-event comprises:
the intelligent contract corresponding to each follow-up sub-event of the sub-event is judged by calling the type of the resource receiving end, and a plurality of sub-event processing information is obtained; the sub-event processing information comprises at least one of processing result information and processing result identification;
and obtaining an event processing result corresponding to the resource transfer event according to the plurality of sub-event processing information.
8. A resource information processing apparatus, characterized in that the apparatus comprises:
the resource deduction amount information acquisition module is used for acquiring resource deduction amount information corresponding to a resource transfer event when the resource transfer event aiming at a target resource receiving end is detected; the resource deduction amount information is determined according to an event processing result corresponding to the resource transfer event, wherein the event processing result is obtained by calling an intelligent contract corresponding to the resource transfer request to determine in response to the resource transfer request corresponding to the resource transfer event by a pre-established blockchain network;
The distributed cache module is used for storing the plurality of resource deduction amount information meeting preset cache conditions into a distributed cache to obtain distributed cache data corresponding to the target resource receiving end;
and the synchronous uplink module is used for synchronizing the distributed cache data to the blockchain network when a synchronous uplink triggering event is detected, so as to obtain the resource deduction statistical information corresponding to the target resource receiving end.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202310067680.8A 2023-01-13 2023-01-13 Resource information processing method, device, computer equipment and storage medium Pending CN116012017A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310067680.8A CN116012017A (en) 2023-01-13 2023-01-13 Resource information processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310067680.8A CN116012017A (en) 2023-01-13 2023-01-13 Resource information processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116012017A true CN116012017A (en) 2023-04-25

Family

ID=86026767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310067680.8A Pending CN116012017A (en) 2023-01-13 2023-01-13 Resource information processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116012017A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116862679A (en) * 2023-09-04 2023-10-10 腾讯科技(深圳)有限公司 Block chain-based data processing method, device, equipment and readable storage medium
CN117971470A (en) * 2024-01-22 2024-05-03 山东华科信息技术有限公司 Novel distribution network operation condition cloud simulation system and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116862679A (en) * 2023-09-04 2023-10-10 腾讯科技(深圳)有限公司 Block chain-based data processing method, device, equipment and readable storage medium
CN116862679B (en) * 2023-09-04 2023-11-21 腾讯科技(深圳)有限公司 Block chain-based data processing method, device, equipment and readable storage medium
CN117971470A (en) * 2024-01-22 2024-05-03 山东华科信息技术有限公司 Novel distribution network operation condition cloud simulation system and method

Similar Documents

Publication Publication Date Title
Paik et al. Analysis of data management in blockchain-based systems: From architecture to governance
CN111213340B (en) Selecting attestation delegation for cryptographic functions and making it secure
US20190349254A1 (en) Service Provision To IoT Devices
CN116012017A (en) Resource information processing method, device, computer equipment and storage medium
CN114445010B (en) Block chain-based multi-mode intermodal system and method
Lohachab et al. Performance evaluation of Hyperledger Fabric-enabled framework for pervasive peer-to-peer energy trading in smart Cyber–Physical Systems
CN110599181A (en) Data processing method, device and equipment based on block chain and storage medium
WO2020062972A1 (en) Blockchain-based data processing method and apparatus, and electronic device
CN112200568B (en) Block chain based account creation method and device and electronic equipment
Li et al. From bitcoin to solana–innovating blockchain towards enterprise applications
US11838406B2 (en) Systems and methods for control-data plane partitioning in virtual distributed ledger networks
CN112200567A (en) Resource management method and device based on block chain and electronic equipment
CA3231084A1 (en) Methods and systems for fast consensus within distributed ledgers
Lee et al. SPChain: A smart and private blockchain-enabled framework for combining GDPR-compliant digital assets management with AI models
Mendhurwar et al. ‘Un’-blocking the industry 4.0 value chain with cyber-physical social thinking
Chen et al. Trusted audit with untrusted auditors: A decentralized data integrity Crowdauditing approach based on blockchain
CN111553594A (en) Resource allocation method, device, computer equipment and computer readable storage medium
CN113177772B (en) Service data processing method, device and system
CN114022285A (en) Cross-enterprise cloud computing resource metering method and system based on alliance block chain
CN116896564B (en) Block generation method and device based on block chain network and computer equipment
CN110458541B (en) Object replacement method and device based on block chain
CN112200570A (en) Resource distribution method and device based on block chain and electronic equipment
Lin et al. Game-theoretic strategy analysis for data reliability management in cloud storage systems
CN113643032B (en) Information processing method, device and data management system based on block chain
CN114331729A (en) Data processing method and device of double-block chain architecture in data bank scene

Legal Events

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