Movatterモバイル変換


[0]ホーム

URL:


CN117234672A - Transaction processing method, apparatus, product, device, and medium - Google Patents

Transaction processing method, apparatus, product, device, and medium
Download PDF

Info

Publication number
CN117234672A
CN117234672ACN202311211954.2ACN202311211954ACN117234672ACN 117234672 ACN117234672 ACN 117234672ACN 202311211954 ACN202311211954 ACN 202311211954ACN 117234672 ACN117234672 ACN 117234672A
Authority
CN
China
Prior art keywords
transaction data
resource
synchronized
attribute information
digital
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
CN202311211954.2A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co LtdfiledCriticalTencent Technology Shenzhen Co Ltd
Priority to CN202311211954.2ApriorityCriticalpatent/CN117234672A/en
Publication of CN117234672ApublicationCriticalpatent/CN117234672A/en
Pendinglegal-statusCriticalCurrent

Links

Landscapes

Abstract

The application discloses a transaction processing method, a device, a product, equipment and a medium, wherein the method comprises the following steps: invoking a first synchronization program to synchronize transaction data of the digital resource; the synchronized transaction data includes on-chain transaction data synchronized from the blockchain network and off-chain transaction data synchronized from the centralized network; a first detection program is embedded in the first synchronization program; invoking a first detection program to detect abnormality of the synchronized transaction data, and outputting first abnormality indication information when abnormality of the synchronized transaction data is detected; the first abnormality indication information indicates abnormal transaction data in the synchronized transaction data; correcting abnormal transaction data in the synchronized transaction data to obtain corrected transaction data of the synchronized transaction data; and comprehensively processing the corrected transaction data to generate resource attribute information of the digital resource. By adopting the method and the device, the accuracy of the resource attribute information generated by the digital resource can be improved.

Description

Transaction processing method, apparatus, product, device, and medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a transaction processing method, apparatus, product, device, and medium.
Background
Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block.
In the prior application, the transaction data of the digital resource can be synchronized in the blockchain network, and the market information of the digital resource is acquired based on the synchronized transaction data, but the situation of abnormal data synchronization is likely to occur when the transaction data of the digital resource are synchronized on the chain, so that the acquired market information of the digital resource is inaccurate.
Disclosure of Invention
The application provides a transaction processing method, a transaction processing device, a transaction processing product, transaction processing equipment and a transaction processing medium, which can improve the accuracy of resource attribute information generated by digital resources.
In one aspect, the present application provides a transaction processing method, including:
invoking a first synchronization program to synchronize transaction data of the digital resource; the synchronized transaction data includes on-chain transaction data synchronized to the digital resource from the blockchain network by invoking a first synchronization program, and off-chain transaction data synchronized to the digital resource from the centralized network by invoking the first synchronization program; a first detection program is embedded in the first synchronization program;
Invoking a first detection program to detect abnormality of the synchronized transaction data, and outputting first abnormality indication information when abnormality of the synchronized transaction data is detected; the first abnormality indication information is used for indicating abnormal transaction data in the synchronized transaction data;
correcting abnormal transaction data indicated by first abnormal indication information in the synchronized transaction data to obtain corrected transaction data of the synchronized transaction data;
and comprehensively processing the corrected transaction data to generate resource attribute information of the digital resource.
In one aspect, the application provides a transaction processing apparatus, comprising:
the synchronization module is used for calling the first synchronization program to synchronize the transaction data of the digital resource; the synchronized transaction data includes on-chain transaction data synchronized to the digital resource from the blockchain network by invoking a first synchronization program, and off-chain transaction data synchronized to the digital resource from the centralized network by invoking the first synchronization program; a first detection program is embedded in the first synchronization program;
the detection module is used for calling a first detection program to perform abnormality detection on the synchronous transaction data, and outputting first abnormality indication information when detecting that the synchronous transaction data is abnormal; the first abnormality indication information is used for indicating abnormal transaction data in the synchronized transaction data;
The correction module is used for correcting the abnormal transaction data indicated by the first abnormal indication information in the synchronized transaction data to obtain the transaction data after correcting the synchronized transaction data;
and the generating module is used for comprehensively processing the corrected transaction data and generating resource attribute information of the digital resource.
Optionally, the step of the synchronization module invoking the first synchronization program to synchronize the flow of transaction data on a chain in the blockchain network includes:
invoking a configuration contract in the blockchain network based on the first synchronization procedure; a plurality of transaction execution contracts which are used for executing transaction data of the digital resource are configured in the configuration contracts;
transaction data executed based on a plurality of transaction execution contracts is synchronized from a blockchain network as on-chain transaction data synchronized to a digital resource.
Optionally, the method for the detection module to call the first detection program to perform anomaly detection on the synchronized transaction data includes:
invoking a first detection program to detect abnormality of the transaction data on the chain and the transaction data under the chain respectively;
the abnormal transaction data indicated by the first abnormal indication information refers to any one of the following: on-chain transaction data, off-chain transaction data, or both on-chain transaction data and off-chain transaction data.
Optionally, correcting the abnormal transaction data indicated by the first abnormal indication information in the synchronized transaction data to obtain the transaction data after correcting the synchronized transaction data, including:
if the first abnormal indication information indicates that the abnormal transaction data has repeated transaction data, performing de-duplication processing on the abnormal transaction data in the synchronized transaction data to obtain de-duplicated transaction data;
the de-duplication processing belongs to correction processing, and the de-duplicated transaction data is corrected transaction data.
Optionally, the correction module corrects the abnormal transaction data indicated by the first abnormal indication information in the synchronized transaction data to obtain a manner of correcting the synchronized transaction data, and the method includes:
if the first abnormal indication information indicates that the abnormal transaction data has missing transaction data, supplementing the missing transaction data of the abnormal transaction data in the synchronized transaction data to obtain the supplemented transaction data;
the supplementing processing belongs to the correcting processing, and the transaction data after supplementing is corrected transaction data.
Optionally, the synchronized transaction data is acquired at a target time, and the transaction data of the digital resource is transaction data for transferring the digital resource based on a universal resource, where the universal resource and the digital resource belong to different types of resources;
The resource attribute information of the digital resource includes at least one of:
a target unit conversion amount of the digital resource between the target time and the universal resource; at a target time, a target variation amplitude of a unit conversion amount between the digital resource and the universal resource; the total amount of resource transfer of the digital resource at the target moment; transaction data total amount of the digital resource at the target moment;
the target change amplitude is the change amplitude of the target unit conversion quantity on the historical unit conversion quantity, and the historical unit conversion quantity is the comprehensive unit conversion quantity of the digital resource and the universal resource in the natural day before the natural day of the target moment.
Optionally, the generating module performs integrated processing on the corrected transaction data, and the mode of generating the resource attribute information of the digital resource includes:
aggregating the transaction data belonging to the blockchain network and the transaction data belonging to the centralized network in the corrected transaction data to obtain a first transaction data set;
calculating the resource conversion quantity of the digital resource and the universal resource in each transaction data of the first transaction data set respectively; one transaction data in the first transaction data set is used for calculating a resource conversion amount between the digital resource and the universal resource;
The resource conversion amounts calculated based on the respective transaction data in the first transaction data set are averaged to generate a target unit conversion amount.
Optionally, any transaction data in the first transaction data set is target transaction data; the method for calculating the resource conversion quantity of the digital resource and the universal resource in each transaction data of the first transaction data set by the generating module comprises the following steps:
extracting the resource transfer quantity of the digital resource and the resource consumption quantity of the universal resource for transferring the digital resource from the target transaction data;
and calculating the ratio between the resource consumption of the universal resource and the resource transfer of the digital resource in the target transaction data as the resource transfer of the digital resource and the universal resource in the target transaction data.
Optionally, the device is further configured to:
when the abnormality of the synchronous transaction data is not detected, the on-chain transaction data and the off-chain transaction data are aggregated to obtain a second transaction data set of the digital resource;
and carrying out comprehensive processing on the transaction data in the second transaction data set to generate resource attribute information of the digital resource.
Optionally, the device is further configured to:
invoking a first detection program to perform anomaly detection on the generated resource attribute information;
When no abnormality is detected in the generated resource attribute information, the generated resource attribute information is stored into an attribute information base of the digital resource;
outputting second abnormality indication information when abnormality of the generated resource attribute information is detected;
and under the instruction of the second abnormal instruction information, carrying out correction processing on the generated resource attribute information to obtain corrected resource attribute information, and storing the corrected resource attribute information into an attribute information base.
Optionally, the device is further configured to:
invoking a second synchronization program to synchronize resource attribute information of the digital resource from the attribute information base; a second detection program is embedded in the second synchronization program;
invoking a second detection program to perform anomaly detection on the synchronized resource attribute information;
when abnormality of the synchronous resource attribute information is not detected, rendering and displaying the synchronous resource attribute information to a resource client;
outputting third abnormality indication information when abnormality of the synchronous resource attribute information is detected;
and under the instruction of the third abnormal instruction information, correcting the synchronous resource attribute information to obtain corrected resource attribute information, and rendering and displaying the corrected resource attribute information to the resource client.
In one aspect the application provides a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the method of one aspect of the application.
An aspect of the application provides a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the method of the above aspect.
According to one aspect of the present application, there is provided a computer program product comprising a computer program stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program to cause the computer device to execute the method provided in various optional manners of the above aspect and the like.
The application can call the transaction data of the first synchronous program synchronous digital resource; the synchronized transaction data includes on-chain transaction data synchronized to the digital resource from the blockchain network by invoking a first synchronization program, and off-chain transaction data synchronized to the digital resource from the centralized network by invoking the first synchronization program; a first detection program is embedded in the first synchronization program; invoking a first detection program to detect abnormality of the synchronized transaction data, and outputting first abnormality indication information when abnormality of the synchronized transaction data is detected; the first abnormality indication information is used for indicating abnormal transaction data in the synchronized transaction data; correcting abnormal transaction data indicated by first abnormal indication information in the synchronized transaction data to obtain corrected transaction data of the synchronized transaction data; and comprehensively processing the corrected transaction data to generate resource attribute information of the digital resource. Therefore, the method provided by the application can synchronize the transaction data of the digital resource from the blockchain network, and can synchronize the transaction data of the digital resource from the centralized network, so that the transaction data can be synchronized to more perfect transaction data of the digital resource from different channels (such as the blockchain network and the centralized network), and in the process of synchronizing the transaction data of the digital resource from different channels, the embedded detection program in the synchronization program can be called to perform abnormal detection on the synchronized transaction data, so that the accuracy of the synchronized transaction data is ensured, and therefore, the accuracy of the resource attribute information of the digital resource generated by the synchronized transaction data (such as the corrected transaction data of the synchronized transaction data) can be doubly improved.
Drawings
In order to more clearly illustrate the application or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from them without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a scenario for generating resource attribute information according to an embodiment of the present application;
FIG. 3 is a flow chart of a transaction processing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a scenario for acquiring transaction data on a chain according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a system architecture according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an interface for rendering display resource attribute information according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another interface for rendering display resource attribute information according to an embodiment of the present application;
FIG. 8 is a flowchart of rendering display resource attribute information according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a transaction processing device according to the present application;
fig. 10 is a schematic structural diagram of a computer device according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the application are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The present application relates to blockchain technology. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain underlying platform may include processing modules for user management, basic services, smart contracts, operations, and the like. The user management module is responsible for identity information management of all blockchain participants, including maintenance of public and private key generation (account management), key management, maintenance of corresponding relation between the real identity of the user and the blockchain address (authority management) and the like, and under the condition of authorization, supervision and audit of transaction conditions of certain real identities, and provision of rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node devices, is used for verifying the validity of a service request, recording the service request on a storage after the effective request is identified, for a new service request, the basic service firstly analyzes interface adaptation and authenticates the interface adaptation, encrypts service information (identification management) through an identification algorithm, and transmits the encrypted service information to a shared account book (network communication) in a complete and consistent manner, and records and stores the service information; the intelligent contract module is responsible for registering and issuing contracts, triggering contracts and executing contracts, a developer can define contract logic through a certain programming language, issue the contract logic to a blockchain (contract registering), invoke keys or other event triggering execution according to the logic of contract clauses to complete the contract logic, and simultaneously provide a function of registering contract upgrading; the operation module is mainly responsible for deployment in the product release process, modification of configuration, contract setting, cloud adaptation and visual output of real-time states in product operation, for example: alarming, monitoring network conditions, monitoring node equipment health status, etc.
The platform product service layer provides basic capabilities and implementation frameworks of typical applications, and developers can complete the blockchain implementation of business logic based on the basic capabilities and the characteristics of the superposition business. The application service layer provides the application service based on the block chain scheme to the business participants for use.
In the application, the transaction data of the digital resource can be synchronized from the blockchain network, so that the corresponding resource attribute information of the digital resource can be generated through the synchronized transaction data, and then the resource attribute information can be output and displayed.
Firstly, it should be noted that all data collected by the present application (such as all data related to on-link transaction data and off-link transaction data) are collected under the condition that the object (such as a user, an organization or an enterprise) to which the data belongs agrees and authorizes, and the collection, the use and the processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Here, a description will be given of a related art concept to which the present application relates:
intelligent contract: a digitally defined protocol is required to operate in a trusted environment, such as a blockchain platform. The intelligent contract (Smart contract) is a contract running in network space by means of a computer, is propagated, verified or executed in an informationized mode, is read and executed by the computer, and has the characteristic of self-service. Decentralizing the blockchain and tamper-proofing the data determine that the smart contract is more suitable for implementation on the blockchain. Therefore, the development of the blockchain technology enables the intelligent contract to have wider development prospect. An intelligent contract is in fact a piece of program made up of computer code, the association of which is: firstly, two or more parties participating in contract agree on a common consensus to form an intelligent contract; secondly, broadcasting and storing the intelligent contract to fulcrums of all global block chains through a block chain network; and thirdly, automatically executing contract contents after the intelligent contract with success is constructed and waiting conditions are met.
Centralizing the exchange: operated by a central authority, is responsible for maintaining the processing of all transactions of the digital resource and providing customer support.
Decentralizing exchanges: operated by a decentralizing organization, is a platform for trading digital resources on blockchains through intelligent contracts.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application. As shown in fig. 1, the network architecture may include a blockchain network (belonging to a decentralized network), a centralized network, and transaction devices. The transaction processing device can be used for pulling transaction data of the digital resource from the blockchain network and the centralized network and calculating corresponding resource attribute information of the digital resource according to the pulled transaction data.
Alternatively, a plurality of blockchain nodes may be included in the blockchain network, the centralized network may be a distributed network, and the centralized network may include a plurality of distributed devices, where any blockchain node, distributed device, or transaction device may be formed by one or more computer devices, which may be servers or end devices, without limitation.
The servers described above may be independent physical servers, or may be server clusters or distributed systems formed by a plurality of physical servers, or may be cloud servers that provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (distribution networks), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal device described above may be: intelligent terminals such as intelligent mobile phones, tablet computers, notebook computers, desktop computers, intelligent televisions, vehicle-mounted terminals and the like.
Referring to fig. 2, fig. 2 is a schematic diagram of a scenario for generating resource attribute information according to an embodiment of the present application. As shown in fig. 2, the transaction device may invoke a first synchronization procedure to synchronize transaction data of digital resources from the blockchain network, which may be referred to as on-chain transaction data. The transaction device may also invoke a first synchronization program to synchronize transaction data of the digital resource from the centralized network, which may be referred to as under-chain transaction data.
The transaction processing device may call the first detection program to detect abnormality of the synchronized on-link transaction data and the off-link transaction data, and when abnormality is detected on the synchronized on-link transaction data and/or the off-link transaction data, may output first abnormality indication information, and may correct the synchronized transaction data (including the synchronized off-link transaction data and the off-link transaction data) according to the indication of the first abnormality indication information, so as to obtain corrected transaction data, and further, may generate accurate resource attribute information of the digital resource through the corrected transaction data. The above procedure may also be specifically described with reference to the following description of the corresponding embodiment of fig. 3.
Therefore, by adopting the method provided by the application, more perfect transaction data of the digital resource can be obtained through a plurality of channels of the blockchain network and the centralized network, in addition, in the process of synchronizing the transaction data of the digital resource through the blockchain network and the centralized network, the abnormal detection can be carried out on the transaction data of the synchronous digital resource, so that when the abnormal occurrence of the transaction data of the synchronous digital resource occurs, the alarm prompt can be timely carried out, and the transaction data of the synchronous digital resource can be corrected according to the abnormal condition of the transaction data of the synchronous digital resource, so that the accurate transaction data (namely corrected transaction data) of the digital resource can be obtained, and further, more accurate resource attribute information of the digital resource can be generated through the accurate transaction data.
Referring to fig. 3, fig. 3 is a flow chart of a transaction processing method according to an embodiment of the application. The execution body in the embodiment of the present application may be the above-mentioned transaction processing device, and as shown in fig. 3, the method may include:
step S101, calling transaction data of a first synchronous program synchronous digital resource; the synchronized transaction data includes on-chain transaction data synchronized to the digital resource from the blockchain network by invoking a first synchronization program, and off-chain transaction data synchronized to the digital resource from the centralized network by invoking the first synchronization program; the first synchronization program is embedded with a first detection program.
Alternatively, the transaction device is any device that may be used to obtain resource attribute information for a digital resource, and may not be a node device for a blockchain node in a blockchain network.
The first synchronization procedure may be used to provide a transaction synchronization service, e.g., the first synchronization procedure may be used to synchronize transaction data of a digital resource from a de-centralized network (e.g., a blockchain network) or/and a centralized network (e.g., other networks than a blockchain network).
The blockchain network may include a plurality of blockchain nodes, each of which may be formed by one or more computer devices, i.e., the node devices of the blockchain nodes may be one or more computer devices, and each of the blockchain nodes forms a decentralized blockchain network, so that the blockchain network may be referred to as a decentralized network.
And a centralized network may refer to a network that is centrally managed and operated, such as a network that is centrally managed by a government agency.
In the present application, the digital resource may be any kind of virtual resource (may also be referred to as an electronic resource), for example, the digital resource may be a digital stock, or an electronic security, or the like. Alternatively, there may be one or more digital resources in the present application, and the processing means for each digital resource is the same and independent, so the following description will take one digital resource as an example.
The transaction data of the digital resource may be data for transacting the digital resource, and the transaction data of the digital resource may be transaction data for transferring the digital resource through the universal resource, i.e. the transaction data of the digital resource may be understood as a transaction for the digital resource, such as a transaction for transferring the digital resource.
Wherein the universal resource and the digital resource may be different types of resources. As the name implies, the universal resource may refer to a resource that is commonly available on the market (i.e., a widely circulated resource), such as a common monetary resource.
It will be appreciated that the transactional data of the digital resource in the blockchain network may be performed by invoking a transactional execution contract in the blockchain network, i.e., an intelligent contract for executing the transactional data of the digital resource that would be uplink in the blockchain network.
While transaction data for a digital resource in a centralized network may include transaction data that is executed on the digital resource at several under-chain institutions, such as banks. Transaction data for the digital resource in the centralized network is not uplinked.
Thus, the transaction device may invoke the first synchronization program to synchronize the transaction data of the digital resource, which may include invoking the first synchronization program to synchronize the transaction data to the digital resource from the blockchain network (e.g., all of the currently generated transaction data synchronized from the blockchain network), and invoking the first synchronization program to synchronize the transaction data to the digital resource from the centralized network (e.g., all of the currently generated transaction data synchronized from the centralized network).
Where transaction data synchronized to a digital resource from a blockchain network may be referred to as on-chain transaction data, and transaction data synchronized to a digital resource from a centralized network may be referred to as off-chain transaction data.
In other words, the transaction device may invoke the first synchronization program to synchronize on-chain transaction data of the digital resource from the blockchain network, e.g., may invoke the first synchronization program to request the on-chain transaction data of the digital resource to be synchronized (e.g., pulled) from any blockchain node in the blockchain network; the transaction device may also invoke the first synchronization program to synchronize the under-chain transaction data of the digital resource from the centralized network, e.g., may invoke the first synchronization program to request the under-chain transaction data of the digital resource from a network device (which may be a background device, such as a server) to which the centralized network belongs, where the under-chain transaction data may include all transaction data currently existing by the digital resource in the centralized network.
Illustratively, the process of the transaction processing device invoking the first synchronization program to synchronize transaction data on a chain in a blockchain network may include:
the transaction processing device may invoke a configuration contract in the blockchain network based on the first synchronization program, e.g., the first blockchain program may request transaction data for the synchronous digital resource from any blockchain node in the blockchain network, which may invoke the configuration contract that was pre-configured to synchronize the transaction data for the digital resource through the configuration contract. Wherein the configuration contract is configured with a plurality of transaction execution contracts to be subjected to transaction synchronization, and the plurality of transaction execution contracts are intelligent contracts for executing transaction data of digital resources in the blockchain network.
Thus, the arbitrary block link point may acquire transaction data executed by the plurality of transaction execution contracts in the configuration contract through the invoked configuration contract, and may return the acquired transaction data executed by the plurality of transaction execution contracts to the transaction processing device (may include all transaction data that has been currently executed by the plurality of transaction execution contracts to the digital resource), so that the transaction processing device synchronizes from the blockchain network to the transaction data executed based on the plurality of transaction execution contracts, and the synchronized transaction data executed based on the plurality of transaction execution contracts may be used as the on-chain transaction data synchronized by the transaction processing device to the digital resource.
Wherein the configuration contracts may be pre-configured in a blockchain network, it is to be understood that there may be many smart contracts for executing transaction data of a digital resource, such as thousands of smart contracts for executing transaction data of a digital resource, and the plurality of transaction execution contracts configured in the configuration contracts may be portions of smart contracts selected from the thousands of smart contracts for executing transaction data of a digital resource.
Among the several intelligent contracts for executing the transaction data of the digital resource, the policy (may be referred to as a selection policy) of selecting the plurality of transaction execution contracts to be configured in the configuration contract may be determined according to the actual application scenario, which is not limited. For example, the first M intelligent contracts (e.g., top M) with the highest execution amount of transaction data of the digital resource can be selected, M is a positive integer, and M is equal to 100; or, the first N intelligent contracts (top N) with the highest transfer quantity of the history to the digital resource can be selected, wherein N is a positive integer, and if N can also be 100; alternatively still, K smart contracts (e.g., top K) having a greater importance degree may be selected according to the importance degree of each smart contract for executing the transaction data of the digital resource (the importance degree of the transaction data that may be executed may be used to represent the importance degree of the transaction data that is executed, the more important smart contract may be used to execute the more important transaction data of the digital resource), where K is a positive integer, e.g., K is 50, and the importance degree of each smart contract may be configured in advance for each smart contract.
The specific number of the transaction execution contracts configured in the configuration contract can be determined according to the actual application scene, and the specific number is not limited. A transaction execution contract is understood to be an off-centered exchange, which is used to execute transaction data of digital resources based on an off-centered manner.
Referring to fig. 4, fig. 4 is a schematic diagram of a scenario for acquiring transaction data on a chain according to an embodiment of the present application. As shown in fig. 4, the configuration contracts can be configured with a transaction execution contract 1, a transaction execution contract 2, a transaction execution contract 3, a transaction execution contract 4 and a transaction execution contract 5, so that all the transaction data which is currently called and executed by the transaction execution contract 1, all the transaction data which is currently called and executed by the transaction execution contract 2, all the transaction data which is currently called and executed by the transaction execution contract 3, all the transaction data which is currently called and executed by the transaction execution contract 4 and all the transaction data which is currently called and executed by the transaction execution contract 5 can be acquired through the configuration contracts, and the acquired transaction data form synchronous on-chain transaction data.
Illustratively, the process of the transaction processing device invoking the first synchronization program to synchronize transaction data on a chain in a blockchain network may include:
the above-described centralized network for synchronizing the downlink transaction data of the digital resources may also be preconfigured. In other words, the transaction device may invoke a first synchronization program to synchronize the under-chain transaction data of the digital resource to the pre-configured centralized network. The centralized network can be understood as a centralized exchange, and the number of the centralized networks can be determined according to the actual application scenario.
The first synchronization program is embedded with a detection program, and the detection program embedded in the first synchronization program may be referred to as a first detection program, where the first detection program may be embedded in the first synchronization program by means of instrumentation, and the first detection program may be a program configured in the first synchronization program and used for detecting a service (such as a transaction synchronization service) provided by the first synchronization program, that is, the first detection program may detect whether the service provided by the first synchronization program is abnormal during the process that the first synchronization program provides the service, which may be described in detail below.
Step S102, a first detection program is called to detect abnormality of the synchronous transaction data, and when abnormality of the synchronous transaction data is detected, first abnormality indication information is output; the first abnormality indication information is used for indicating abnormal transaction data in the synchronized transaction data.
Alternatively, the transaction processing device may call the first detection program to perform anomaly detection on the synchronized transaction data, that is, detect whether the first synchronization program has an anomaly in the transaction data synchronized by the digital resource. The transaction processing device may output first abnormality indication information when detecting that the synchronized transaction data has an abnormality, so as to timely alert and prompt that the synchronized transaction data has an abnormality through the first abnormality indication information, where the first abnormality indication information may be used to indicate abnormal transaction data in the synchronized transaction data, and the abnormal transaction data that has an abnormality and is indicated by the first abnormality indication information may be referred to as abnormal transaction data.
Wherein the transaction processing device invoking the first detection program to perform anomaly detection on the synchronized transaction data may include: the transaction processing device may call the first detection program to perform anomaly detection on the on-chain transaction data and the off-chain transaction data, i.e. the transaction processing device may call the first detection program to perform anomaly detection on the synchronized on-chain transaction data, and may call the first detection program to perform anomaly detection on the synchronized off-chain transaction data.
Thus, alternatively, the above-described abnormal transaction data may be any of the following: the above-mentioned chain transaction data, or the above-mentioned chain transaction data and the below-chain transaction data. In other words, the abnormal transaction data may be on-chain transaction data, indicating that the first abnormality indication information is used to indicate that the on-chain transaction data has an abnormality; alternatively, the abnormal transaction data may be the under-chain transaction data, which indicates that the first abnormal indication information is used to indicate that the under-chain transaction data has an abnormality; still alternatively, the abnormal transaction data may be on-chain transaction data and off-chain transaction data, which indicate that the first abnormal indication information is used to indicate that the on-chain transaction data and the off-chain transaction data have an abnormality.
The first exception indication information may also be used to indicate a specific exception condition detected for the abnormal transaction data, for example, the exception condition may be that the transaction data is duplicated or that the transaction data is missing, etc.
Step S103, correcting the abnormal transaction data indicated by the first abnormal indication information in the synchronized transaction data to obtain the transaction data after correcting the synchronized transaction data.
Optionally, the transaction processing device may perform corresponding correction processing on the abnormal transaction data based on the abnormal situation specifically indicated by the first abnormal indication information on the abnormal transaction data, so as to obtain transaction data after correction on the synchronized transaction data.
In one possible implementation, if the abnormal transaction data includes the on-link transaction data and the off-link transaction data synchronously, the correction processing on the abnormal transaction data may refer to performing respective correction processing on the on-link transaction data and the off-link transaction data.
For example, if the first exception indication information is used to indicate that the above-mentioned exception transaction data has repeated transaction data (i.e. the pulled exception transaction processing has repeated transaction data), the transaction processing device may perform deduplication processing on the exception transaction data in the synchronized transaction data, so as to obtain the transaction data after deduplication. The deduplication process may be a correction process, and the deduplicated transaction data may be corrected transaction data.
If the abnormal transaction data synchronization includes the above-mentioned on-chain transaction data and off-chain transaction data, the transaction processing device may perform deduplication processing on the on-chain transaction data and the off-chain transaction data, respectively, where the deduplicated transaction data includes the deduplicated on-chain transaction data and the deduplicated off-chain transaction data.
For another example, if the first exception indication information is used to indicate that the abnormal transaction data has missing transaction data (such as a pull failure or a pull incompleteness of a certain transaction), the transaction processing device may perform a complementary process on the transaction data missing from the abnormal transaction data in the synchronized transaction data, so as to obtain the transaction data after the complementary process. The supplementing process may belong to a correction process, and the post-supplementing transaction data may be corrected transaction data.
Similarly, if the abnormal transaction data synchronization includes the above-mentioned on-chain transaction data and off-chain transaction data, the transaction processing device may perform complementary processing on the on-chain transaction data and the off-chain transaction data, respectively, where the complementary transaction data includes complementary on-chain transaction data and complementary off-chain transaction data.
If the transaction data on the chain has missing transaction data, the transaction data on the chain is pulled to a blockchain node in the blockchain network by the transaction processing device, which indicates that the blockchain node may have abnormal operation, so that the transaction processing device can re-pull the transaction data missing from the transaction data on the chain to another blockchain node in the blockchain network to obtain the transaction data on the chain after supplementation.
Alternatively, the centralized network may be a distributed network (including a plurality of distributed devices), where the transaction data of the digital resource in the centralized network may be stored in the plurality of distributed devices, so if the under-link transaction data has missing transaction data, the under-link transaction data is pulled by the transaction processing device to any one of the distributed devices, which indicates that the distributed device may have abnormal operation, and therefore, the transaction processing device may re-pull the transaction data missing by the under-link transaction data to another distributed device in the centralized network, so as to obtain the supplementary under-link transaction data.
If the abnormal transaction data only includes the on-chain transaction data, but does not include the off-chain transaction data, the corrected transaction data may include the originally normal off-chain transaction data and the corrected on-chain transaction data. Similarly, if the abnormal transaction data only includes the under-chain transaction data, but does not include the on-chain transaction data, the corrected transaction data may include the originally normal on-chain transaction data and the corrected under-chain transaction data.
Step S104, the corrected transaction data is comprehensively processed to generate the resource attribute information of the digital resource.
Optionally, the transaction processing device may aggregate (may be a summary process) the transaction data belonging to the blockchain network and the transaction data belonging to the centralized network in the corrected transaction data to obtain a first transaction data set, where the first transaction data set may include the transaction data belonging to the blockchain network and the transaction data belonging to the centralized network in the corrected transaction data.
If the abnormal transaction data only includes the on-chain transaction data, but not the off-chain transaction data, the transaction data belonging to the blockchain network in the corrected transaction data can be corrected on-chain transaction data, and the transaction data belonging to the centralized network in the corrected transaction data can be originally normal off-chain transaction data.
If the abnormal transaction data only comprises the under-chain transaction data and does not comprise the on-chain transaction data, the transaction data belonging to the blockchain network in the corrected transaction data can be the originally normal on-chain transaction data, and the transaction data belonging to the centralized network in the corrected transaction data can be the corrected under-chain transaction data.
If the abnormal transaction data comprises the under-chain transaction data and the on-chain transaction data at the same time, the transaction data belonging to the blockchain network in the corrected transaction data can be corrected on-chain transaction data, and the transaction data belonging to the centralized network in the corrected transaction data can be corrected under-chain transaction data.
Further, the transaction processing device may perform comprehensive analysis processing on the transaction data in the first transaction data set to generate resource attribute information of the digital resource, where the resource attribute information may include market information related to the digital resource.
Alternatively, the synchronized transaction data may be obtained at the target time, and the transaction data of the digital resource may be transaction data for transferring the digital resource through a universal resource (such as a universal currency of a country) (e.g., a user may transfer a corresponding amount of the digital resource to another user after obtaining a corresponding amount of the universal resource provided by another user), so the resource attribute information of the digital resource may include at least one of the following: a target unit conversion amount of the digital resource between the target time and the universal resource; at the target time, a target variation range of a unit conversion amount between the digital resource and the universal resource (for reflecting an increase or decrease range of the digital resource at the target time); the total amount of resource transfer (such as transaction amount) of the digital resource at the target moment; the total amount of transaction data (e.g., transaction amount) of the digital resource at the target time.
Further, the resource attribute information of the digital resource may also include a time-sharing diagram, a K-ray diagram, etc. of the digital resource. The time-sharing graph may represent the price (such as the unit conversion amount between the digital resource and the universal resource) of the digital resource at each moment (such as at one moment every one minute) in a graph manner, and the K-graph may represent the highest price, the lowest price, the driving price and the receiving price of the digital resource every day in a graph manner.
It can be understood that no matter which attribute information is included in the resource attribute information of the digital resource, the attribute information can be generated correspondingly after being comprehensively processed based on the transaction data of the digital resource according to the actual application scene. In the following processes, the processes of performing corresponding processing on a plurality of transaction data of the digital resource together to generate resource attribute information corresponding to the digital resource can be understood as the process of comprehensively processing the transaction data of the digital resource.
The target unit conversion amount can be understood as the unit price of the digital resource at the target time, for example, the target unit conversion amount can be used to represent how much universal resource is needed to be used for transferring the digital resource.
The target change width may be a change width of a target unit conversion amount based on a history unit conversion amount, the history unit conversion amount may be a comprehensive unit conversion amount of a digital resource and a universal resource on a natural day before the natural day on which the target time is located, the comprehensive unit conversion amount may be a unit conversion amount commonly accepted between the digital resource and the universal resource on the previous day, for example, the comprehensive unit conversion amount may be a closing price of the digital resource on the previous day, in other words, the target change width of the unit conversion amount between the digital resource and the universal resource at the target time may be a unit conversion amount of a closing of the digital resource on the previous natural day on which the digital resource belongs than the natural day on which the digital resource belongs at the target time.
For example, the process of calculating the target unit conversion amount by the first transaction data set may include: the transaction device may calculate a resource conversion amount of the digital resource and the universal resource in respective transaction data of a first transaction data set, one transaction data of the first transaction data set being used for calculating a resource conversion amount between the digital resource and the universal resource.
The conversion amount of the digital resource and the universal resource in one transaction data can be used for reflecting the unit price of the digital resource in the transaction data.
For example, any one of the transaction data in the first transaction data set may be target transaction data, and the process of calculating the resource conversion amounts of the digital resource and the universal resource in the target transaction data may include: the transaction device may extract a resource transfer amount of the digital resource from the target transaction data and a resource consumption amount of the universal resource for transferring the digital resource.
Thus, the transaction device may calculate a ratio between the resource consumption amount of the universal resource and the resource transfer amount of the digital resource in the target transaction data, and use the ratio as the resource conversion amount of the digital resource and the universal resource in the target transaction data, in other words, the resource conversion amount may be equal to a value obtained by dividing the resource consumption amount of the universal resource by the resource transfer amount of the digital resource.
Further, the transaction processing device may perform an average calculation (i.e., calculate an average value) of the resource conversion amounts calculated by the respective transaction data in the first transaction data set (i.e., the resource conversion amounts of the digital resource and the general resource in the respective transaction data in the first transaction data set), so as to generate the target unit conversion amount, in other words, the target unit conversion amount may be an average value of the resource conversion amounts of the digital resource and the general resource in the respective transaction data at the target time and before the target time.
The process of generating the transaction data total amount of the digital resource at the target moment through the first transaction data set may include: the transaction device may count the total number of transaction data in the first transaction data set, and the counted total number may be the total amount of transaction data.
Further, the process of generating a total amount of resource transfer of the digital resource at the target time by the first transaction data set may include: the transaction processing device may extract the resource transfer amounts of the digital resources from each transaction data of the first transaction data set, and further, the transaction processing device may add (i.e. sum) the resource transfer amounts of the digital resources extracted from each transaction data set, so as to obtain the total resource transfer amount of the digital resources at the target time.
Further, when the transaction processing device invokes the first detection program and does not detect that the synchronized transaction data has an exception, it indicates that the on-chain transaction data and the off-chain transaction data are both normal (i.e., accurate), so that the transaction processing device may directly aggregate (e.g., summarize) the on-chain transaction data and the off-chain transaction data to obtain a second transaction data set of the digital resource, where the second transaction data set may be formed by the on-chain transaction data and the off-chain transaction data.
Further, the transaction device may perform integrated analysis of the transaction data in the second transaction data set to generate resource attribute information for the digital resource. Here, the process of analyzing the transaction data in the second transaction data set to generate the resource attribute information of the digital resource is the same as the process of analyzing the transaction data in the first transaction data set to generate the resource attribute information of the digital resource.
More, after the transaction processing device generates the resource attribute information of the digital resource through the first transaction data set or the second transaction data set, the transaction processing device may further call the first detection program to perform anomaly detection on the generated resource attribute information, that is, detect whether the generated resource attribute information is anomalous, for example, detect whether comprehensive analysis processing of the first transaction data set or the second transaction data set is incorrect, or detect whether the generated resource attribute information is complete, and so on. Specifically, which abnormal conditions need to be detected, the first detection program can be configured correspondingly according to the actual application scene, and the method is not limited.
When the transaction device does not detect that the generated resource attribute information has an abnormality, it indicates that the generated resource attribute information is normal (i.e., accurate), and therefore, the transaction device may store the generated resource attribute information to the attribute information base of the digital resource.
When the transaction processing device detects that the generated resource attribute information is abnormal (such as that the comprehensive processing process is wrong or the generated resource attribute information is incomplete), the transaction processing device can output second abnormality indication information (such as that the second abnormality indication information can be sent to a terminal device of an associated technician for output), wherein the second abnormality indication information is information for indicating that the generated resource attribute information is abnormal, and the generated resource attribute information can be timely prompted and alarmed through the output second abnormality indication information.
The transaction processing device may further perform correction processing on the generated resource attribute information under the instruction of the second abnormality instruction information, so as to obtain corrected resource attribute information, and may store the corrected resource attribute information in the attribute information library.
As the name suggests, the attribute information base may be a database for storing resource attribute information of digital resources.
The correction processing for the generated resource attribute information may refer to performing corresponding correction for the generated resource attribute information according to the specific abnormal situation indicated by the second abnormal indication information for the generated resource attribute information.
For example, if the second abnormality indication information is used to indicate that the generated resource attribute information is incomplete, the non-generated resource attribute information that is missing in the generated resource attribute information may be generated (e.g., regenerated) in a complementary manner, so as to obtain corrected resource attribute information.
For another example, if the second abnormality indication information is used to indicate that the generated resource attribute information is incomplete, which indicates that the integrated processing of the first transaction data set or the second transaction data set is inaccurate, the corresponding integrated processing (i.e. retry) may be performed again on the first transaction data set or the second transaction data set until the accurate resource attribute information is generated for the digital resource. If the number of retries reaches the specified number threshold, and accurate resource attribute information is not generated for the digital resource, an error can be reported to prompt a corresponding technician to perform corresponding investigation on the first synchronization program.
Further, after storing the resource attribute information of the digital resource in the attribute information base, the second synchronization program may further render and display the resource attribute information of the digital resource in the attribute information base, and the process may include:
The transaction processing device may call a second synchronization program for synchronizing resource attribute information of the digital resource from the attribute information base, the second synchronization program may be a program for synchronizing resource attribute information of the digital resource from the attribute information base and for rendering and displaying the synchronized resource attribute information, and the second synchronization program may be used for providing a synchronization service (may be simply referred to as an attribute synchronization service) for the resource attribute information of the digital resource.
The second synchronization program may be embedded with a second detection program, and the second detection program may be embedded in the second synchronization program by means of instrumentation.
After the second synchronization program is called to synchronize the resource attribute information of the digital resource from the attribute information base, the transaction processing device may also call the second detection program to perform anomaly detection on the synchronized resource attribute information, for example, to detect whether the synchronized resource attribute information is complete and accurate, or to detect whether the operation of the synchronized resource attribute information is successfully performed, and so on.
When no abnormality is detected in the synchronized resource attribute information, the transaction processing device may render and display the synchronized resource attribute information to a resource client (which may be a client for performing front-end display and processing on related information of the digital resource), for example, the transaction processing device may send the synchronized resource attribute information to the resource client, so that the resource client may render and display the received resource attribute information to a client interface.
When the abnormality of the synchronized resource attribute information is detected, the transaction processing device may output third abnormality indication information (for example, may be sent to a terminal device of an associated technician for output), where the third abnormality indication information may be information for indicating that the abnormality of the synchronized resource attribute information exists, and the abnormality of the synchronized resource attribute information may be timely indicated and alerted by the output third abnormality indication information.
And the transaction processing device can correct the synchronous resource attribute information under the instruction of the third abnormal instruction information to obtain corrected resource attribute information, and further, the corrected resource attribute information can be rendered and displayed on the resource client, for example, the transaction processing device can send the corrected resource attribute information to the resource client, so that the resource client can render the received resource attribute information to a client interface for displaying.
For example, the transaction processing device may perform corresponding correction processing on the synchronized resource attribute information according to the specific abnormal situation indicated by the third abnormal indication information on the synchronized resource attribute information, so as to obtain corrected resource attribute information.
For example, if the third abnormality indication information indicates that the synchronized resource attribute information is abnormal due to too large access amount of the attribute information base or an access error to the attribute information base, the transaction processing device may call the second synchronization program to retry the synchronization of the resource attribute information of the digital resource from the attribute information base, so as to obtain corrected resource attribute information.
More, the application can set the update frequency of the resource attribute information of the digital resource, such as one update per minute (which can be understood as an update period), and then the latest resource attribute information of the digital resource can be generated per minute according to the above flow and stored in the attribute information base. Therefore, the application can also perform abnormality detection on the updated resource attribute information in the attribute information base (or call the first detection program to detect), if the period of updating the resource attribute information in the attribute information base is detected to be not the set updating period, the application indicates that the updating of the resource attribute information in the attribute information base is abnormal, and can also output corresponding abnormality indication information, wherein the abnormality indication information is used for indicating that the updated resource attribute information in the attribute information base is abnormal.
For example, if the resource attribute information is updated (e.g., stored) multiple times in a minute, it indicates that the resource attribute information in the attribute information library is updated too frequently, and an abnormality occurs, and the corresponding abnormality indication information may be output. For another example, if more than one minute (such as 2 minutes or 3 minutes, etc.), the resource attribute information in the attribute information base is not updated continuously (for example, no latest resource attribute information is stored in the attribute information base continuously), it indicates that the update of the resource attribute information in the attribute information base fails, an abnormality occurs, and corresponding abnormality indication information can be output.
The application can call the transaction data of the first synchronous program synchronous digital resource; the synchronized transaction data includes on-chain transaction data synchronized to the digital resource from the blockchain network by invoking a first synchronization program, and off-chain transaction data synchronized to the digital resource from the centralized network by invoking the first synchronization program; a first detection program is embedded in the first synchronization program; invoking a first detection program to detect abnormality of the synchronized transaction data, and outputting first abnormality indication information when abnormality of the synchronized transaction data is detected; the first abnormality indication information is used for indicating abnormal transaction data in the synchronized transaction data; correcting abnormal transaction data indicated by first abnormal indication information in the synchronized transaction data to obtain corrected transaction data of the synchronized transaction data; and comprehensively processing the corrected transaction data to generate resource attribute information of the digital resource. Therefore, the method provided by the application can synchronize the transaction data of the digital resource from the blockchain network, and can synchronize the transaction data of the digital resource from the centralized network, so that the transaction data can be synchronized to more perfect transaction data of the digital resource from different channels (such as the blockchain network and the centralized network), and in the process of synchronizing the transaction data of the digital resource from different channels, the embedded detection program in the synchronization program can be called to perform abnormal detection on the synchronized transaction data, so that the accuracy of the synchronized transaction data is ensured, and therefore, the accuracy of the resource attribute information of the digital resource generated by the synchronized transaction data (such as the corrected transaction data of the synchronized transaction data) can be doubly improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a system architecture according to an embodiment of the present application. As shown in FIG. 5, an attribute synchronization service may be provided by the first synchronization program described above, which may be used to synchronize the in-chain transaction data of digital resources from a centralized exchange (e.g., a centralized network), and may be used to synchronize the in-chain transaction data of digital resources from an off-centralized exchange according to a blockchain configuration contract (e.g., a configuration contract described above).
The information synchronization service may be used to synchronize information about the digital resource from an external platform (e.g., other information platforms for the digital resource) and may also place the information into an attribute information repository (DB) of the digital resource, where the update frequency of the information may be consistent with the frequency of updating the resource attribute information of the digital resource by the transaction data, such as may be updated once per minute.
The abnormality detection task may be used to perform abnormality detection on the update frequency of the resource attribute information of the digital resource in the attribute information library, and if it is detected that the update frequency of the resource attribute information of the digital resource is abnormal (if the update frequency is inconsistent with the preset update frequency), abnormality reporting (i.e. abnormality alarm) may be performed, for example, corresponding abnormality indication information may be reported to a risk alarm platform, where the risk alarm platform may operate in a terminal device of a related technician, so that the related technician may timely view an abnormality condition for the attribute information library.
In addition, the first abnormality indication information obtained by the attribute synchronization service performing abnormality detection on the synchronized transaction data may be output in the risk alarm platform. In practice, the various abnormality indication information described above (including the first abnormality indication information to the third abnormality indication information) may be output in the risk alert platform.
Subsequently, the resource client may request to access a corresponding service, such as accessing an attribute calling service (which may access an associated access interface configured by the attribute calling service) or accessing an information calling service (which may access an associated access interface configured by the information calling service), before the resource client requests to access the corresponding service, the user needs to log in an account in the resource client, and after the login state of the user and the authority verification of the access of the corresponding service are successful, the user may successfully access the corresponding service in the resource client. Wherein the attribute invocation service may be provided by the second synchronization service described above.
The resource attribute information of the digital resource can be synchronized in the attribute information base through the accessed attribute calling service, and further, the resource attribute information synchronized with the digital resource can be rendered and displayed in the resource client. The information calling service accessed can synchronize the information of the digital resource in the attribute information base, and further, the information synchronized with the digital resource can be rendered and displayed in the resource client.
Referring to fig. 6 and fig. 7, fig. 6 is a schematic diagram of an interface for rendering and displaying resource attribute information according to an embodiment of the present application, and fig. 7 is a schematic diagram of an interface for rendering and displaying resource attribute information according to another embodiment of the present application. As shown in fig. 6, the resource attribute information may be a time-sharing graph of the digital resource, and in a client interface of the resource client, the time-sharing graph of the digital resource may be rendered and displayed. As further shown in fig. 7, the resource attribute information may be a K-ray diagram of the digital resource, and in a client interface of the resource client, the K-ray diagram of the digital resource may be rendered and displayed.
Referring to fig. 8, fig. 8 is a flowchart illustrating a process of rendering display resource attribute information according to an embodiment of the present application. As shown in fig. 8, the process may include:
1. the business party can configure a digital resource list in the configuration contract, wherein the digital resource list can contain one or more digital resources needing to generate and display resource attribute information according to the flow, and the transaction execution contract list contains the configured various transaction execution contracts needing to perform transaction data synchronization. The business party may be a party to the resource client, where the business party may request from the blockchain network, through its own background device, that the digital resource list and the transaction execution contract list be configured in a configuration contract. 2. The attribute synchronization service may invoke a configuration contract to request a decentralised trade contract (i.e., a transaction execution contract configured in the configuration contract) to synchronize transaction data executed by the decentralised trade contract. 3. The decentralized transaction contract may return the executed transaction data to the attribute synchronization service.
4. In addition, the attribute synchronization service may further perform anomaly detection on transaction data (such as on-chain transaction data) synchronized from the centralized exchange and transaction data (such as off-chain transaction data) synchronized from the centralized exchange, respectively, and if an anomaly is detected, perform an alarm, such as outputting the first anomaly indication information. 5. The attribute synchronization service may give the first abnormality indication information to the risk alert platform, so that the risk alert platform may output the first abnormality indication information. 6. The attribute synchronization service may further perform correction processing on the synchronized transaction data based on the indication of the first abnormality indication information, so as to obtain corrected transaction data, and may generate resource attribute information of the digital resource through the corrected transaction data (which belongs to the synchronized correct transaction data), and may add the resource attribute information to the attribute information base.
7. Subsequently, the front end (e.g., resource client) may obtain the resource attribute information of the digital resource through the access gateway service request. 8. The access gateway service may initiate verification of the user's login state (e.g., whether it is in a normal login state) before acquiring the resource attribute information of the digital resource according to the request of the front end. 9. The access gateway service may request the service party to verify the current login status of the user. 10. After verifying the current login state of the user, the service party can return a verification result of the login state of the user to the access gateway service.
11. The access gateway service may query the attribute call service for resource attribute information of the digital resource when detecting that the authentication result is a result of passing the authentication. 12. The attribute calling service can query the attribute information of the digital resource for the latest resource attribute information of the digital resource in the attribute information base of the digital resource. 13. The attribute invocation service may return the resource attribute information of the queried digital resource to the access gateway service. 14. The access gateway service may return the resource attribute information of the latest digital resource queried to the resource client. 15. The resource client can render and display the resource attribute information of the received digital resource in the client interface.
Alternatively, the transaction data executed by invoking the transaction execution contract in the blockchain network may be initiated by a resource client (which may be a resource client of any user, and is not limited to the resource client that requests to acquire and display the resource attribute information) to the blockchain network.
By the method, corresponding anomaly detection can be carried out at each stage (such as a transaction data synchronization stage, a resource attribute information generation stage, a resource attribute information synchronization stage and the like) before the resource attribute information of the digital resource is rendered and displayed, so that the accuracy of the resource attribute information of the finally rendered and displayed digital resource is ensured.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a transaction processing device according to the present application. As shown in fig. 9, the transaction processing device 1 may include: a synchronization module 11, a detection module 12, a correction module 13 and a generation module 14.
A synchronization module 11, configured to invoke a first synchronization program to synchronize transaction data of the digital resource; the synchronized transaction data includes on-chain transaction data synchronized to the digital resource from the blockchain network by invoking a first synchronization program, and off-chain transaction data synchronized to the digital resource from the centralized network by invoking the first synchronization program; a first detection program is embedded in the first synchronization program;
the detection module 12 is configured to invoke a first detection program to perform anomaly detection on the synchronized transaction data, and output first anomaly indication information when an anomaly is detected to exist in the synchronized transaction data; the first abnormality indication information is used for indicating abnormal transaction data in the synchronized transaction data;
the correction module 13 is configured to perform correction processing on abnormal transaction data indicated by the first abnormal indication information in the synchronized transaction data, so as to obtain transaction data after correction on the synchronized transaction data;
and the generating module 14 is used for comprehensively processing the corrected transaction data and generating resource attribute information of the digital resource.
Optionally, the process of the transaction data on the synchronization chain in the blockchain network by the synchronization module 11 invoking the first synchronization program includes:
invoking a configuration contract in the blockchain network based on the first synchronization procedure; a plurality of transaction execution contracts which are used for executing transaction data of the digital resource are configured in the configuration contracts;
transaction data executed based on a plurality of transaction execution contracts is synchronized from a blockchain network as on-chain transaction data synchronized to a digital resource.
Optionally, the detecting module 12 invokes a first detecting program to perform an anomaly detection on the synchronized transaction data, including:
invoking a first detection program to detect abnormality of the transaction data on the chain and the transaction data under the chain respectively;
the abnormal transaction data indicated by the first abnormal indication information refers to any one of the following: on-chain transaction data, off-chain transaction data, or both on-chain transaction data and off-chain transaction data.
Optionally, the correction module 13 corrects the abnormal transaction data indicated by the first abnormal indication information in the synchronized transaction data to obtain the transaction data after correcting the synchronized transaction data, including:
If the first abnormal indication information indicates that the abnormal transaction data has repeated transaction data, performing de-duplication processing on the abnormal transaction data in the synchronized transaction data to obtain de-duplicated transaction data;
the de-duplication processing belongs to correction processing, and the de-duplicated transaction data is corrected transaction data.
Optionally, the correcting module 13 corrects the abnormal transaction data indicated by the first abnormal indication information in the synchronized transaction data to obtain a manner of correcting the synchronized transaction data, which includes:
if the first abnormal indication information indicates that the abnormal transaction data has missing transaction data, supplementing the missing transaction data of the abnormal transaction data in the synchronized transaction data to obtain the supplemented transaction data;
the supplementing processing belongs to the correcting processing, and the transaction data after supplementing is corrected transaction data.
Optionally, the synchronized transaction data is acquired at a target time, and the transaction data of the digital resource is transaction data for transferring the digital resource based on a universal resource, where the universal resource and the digital resource belong to different types of resources;
the resource attribute information of the digital resource includes at least one of:
A target unit conversion amount of the digital resource between the target time and the universal resource; at a target time, a target variation amplitude of a unit conversion amount between the digital resource and the universal resource; the total amount of resource transfer of the digital resource at the target moment; transaction data total amount of the digital resource at the target moment;
the target change amplitude is the change amplitude of the target unit conversion quantity on the historical unit conversion quantity, and the historical unit conversion quantity is the comprehensive unit conversion quantity of the digital resource and the universal resource in the natural day before the natural day of the target moment.
Optionally, the generating module 14 performs comprehensive processing on the corrected transaction data, and generates resource attribute information of the digital resource by a mode including:
aggregating the transaction data belonging to the blockchain network and the transaction data belonging to the centralized network in the corrected transaction data to obtain a first transaction data set;
calculating the resource conversion quantity of the digital resource and the universal resource in each transaction data of the first transaction data set respectively; one transaction data in the first transaction data set is used for calculating a resource conversion amount between the digital resource and the universal resource;
the resource conversion amounts calculated based on the respective transaction data in the first transaction data set are averaged to generate a target unit conversion amount.
Optionally, any transaction data in the first transaction data set is target transaction data; the generating module 14 calculates the resource conversion amounts of the digital resource and the universal resource in each transaction data of the first transaction data set, including:
extracting the resource transfer quantity of the digital resource and the resource consumption quantity of the universal resource for transferring the digital resource from the target transaction data;
and calculating the ratio between the resource consumption of the universal resource and the resource transfer of the digital resource in the target transaction data as the resource transfer of the digital resource and the universal resource in the target transaction data.
Optionally, the above device 1 is further configured to:
when the abnormality of the synchronous transaction data is not detected, the on-chain transaction data and the off-chain transaction data are aggregated to obtain a second transaction data set of the digital resource;
and carrying out comprehensive processing on the transaction data in the second transaction data set to generate resource attribute information of the digital resource.
Optionally, the above device 1 is further configured to:
invoking a first detection program to perform anomaly detection on the generated resource attribute information;
when no abnormality is detected in the generated resource attribute information, the generated resource attribute information is stored into an attribute information base of the digital resource;
Outputting second abnormality indication information when abnormality of the generated resource attribute information is detected;
and under the instruction of the second abnormal instruction information, carrying out correction processing on the generated resource attribute information to obtain corrected resource attribute information, and storing the corrected resource attribute information into an attribute information base.
Optionally, the above device 1 is further configured to:
invoking a second synchronization program to synchronize resource attribute information of the digital resource from the attribute information base; a second detection program is embedded in the second synchronization program;
invoking a second detection program to perform anomaly detection on the synchronized resource attribute information;
when abnormality of the synchronous resource attribute information is not detected, rendering and displaying the synchronous resource attribute information to a resource client;
outputting third abnormality indication information when abnormality of the synchronous resource attribute information is detected;
and under the instruction of the third abnormal instruction information, correcting the synchronous resource attribute information to obtain corrected resource attribute information, and rendering and displaying the corrected resource attribute information to the resource client.
According to one embodiment of the application, the steps involved in the transaction method shown in fig. 3 may be performed by the respective modules in the transaction device 1 shown in fig. 9. For example, step S101 shown in fig. 3 may be performed by the synchronization module 11 in fig. 9, and step S102 shown in fig. 3 may be performed by the detection module 12 in fig. 9; step S103 shown in fig. 3 may be performed by the correction module 13 in fig. 9, and step S104 shown in fig. 3 may be performed by the generation module 14 in fig. 9.
The application can call the transaction data of the first synchronous program synchronous digital resource; the synchronized transaction data includes on-chain transaction data synchronized to the digital resource from the blockchain network by invoking a first synchronization program, and off-chain transaction data synchronized to the digital resource from the centralized network by invoking the first synchronization program; a first detection program is embedded in the first synchronization program; invoking a first detection program to detect abnormality of the synchronized transaction data, and outputting first abnormality indication information when abnormality of the synchronized transaction data is detected; the first abnormality indication information is used for indicating abnormal transaction data in the synchronized transaction data; correcting abnormal transaction data indicated by first abnormal indication information in the synchronized transaction data to obtain corrected transaction data of the synchronized transaction data; and comprehensively processing the corrected transaction data to generate resource attribute information of the digital resource. Therefore, the device provided by the application can synchronize the transaction data of the digital resource from the blockchain network, can synchronize the transaction data of the digital resource from the centralized network, so that the transaction data can be synchronized to more perfect transaction data of the digital resource from different channels (such as the blockchain network and the centralized network), and can also call a detection program embedded in a synchronization program to perform abnormal detection on the synchronized transaction data in the process of synchronizing the transaction data of the digital resource from different channels, so as to ensure the accuracy of the synchronized transaction data, thus the accuracy of the resource attribute information of the digital resource generated by the synchronized transaction data (such as the corrected transaction data of the synchronized transaction data) can be doubly improved.
According to an embodiment of the present application, each module in the transaction processing device 1 shown in fig. 9 may be separately or completely combined into one or several units to form a structure, or some (some) of the units may be further split into a plurality of sub-units with smaller functions, so that the same operation may be implemented without affecting the implementation of the technical effects of the embodiment of the present application. The above modules are divided based on logic functions, and in practical applications, the functions of one module may be implemented by a plurality of units, or the functions of a plurality of modules may be implemented by one unit. In other embodiments of the application, the transaction device 1 may also comprise other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by cooperation of a plurality of units.
According to one embodiment of the present application, a computer program capable of executing the steps involved in the respective methods shown in the embodiments of the present application can be run on a general-purpose computer device, which may contain a processing element and a storage element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), etc., to construct the transaction processing apparatus 1 as shown in fig. 9. The above-described computer program may be recorded on, for example, a computer-readable recording medium, and may be loaded into and executed in the above-described computer apparatus through the computer-readable recording medium.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a computer device according to the present application. As shown in fig. 10, the computer device 1000 may include: processor 1001, network interface 1004, and memory 1005, and, in some embodiments, computer device 1000 may further comprise: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 10, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 1005, which is one type of computer storage medium.
In the computer device 1000 shown in FIG. 10, the network interface 1004 may provide network communication functions; while user interface 1003 is primarily used as an interface for providing input to a user; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
invoking a first synchronization program to synchronize transaction data of the digital resource; the synchronized transaction data includes on-chain transaction data synchronized to the digital resource from the blockchain network by invoking a first synchronization program, and off-chain transaction data synchronized to the digital resource from the centralized network by invoking the first synchronization program; a first detection program is embedded in the first synchronization program;
invoking a first detection program to detect abnormality of the synchronized transaction data, and outputting first abnormality indication information when abnormality of the synchronized transaction data is detected; the first abnormality indication information is used for indicating abnormal transaction data in the synchronized transaction data;
correcting abnormal transaction data indicated by first abnormal indication information in the synchronized transaction data to obtain corrected transaction data of the synchronized transaction data;
and comprehensively processing the corrected transaction data to generate resource attribute information of the digital resource.
It should be understood that the computer device 1000 described in the embodiments of the present application may perform the description of the transaction processing method described above in the embodiments of the present application, and may also perform the description of the transaction processing apparatus 1 described above in the embodiment corresponding to fig. 9, which is not repeated here. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the present application also provides a computer readable storage medium, and a computer program is stored in the computer readable storage medium, and when the processor executes the computer program, the description of the transaction processing method in each embodiment of the present application can be executed, so that a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer storage medium according to the present application, please refer to the description of the method embodiments of the present application.
As an example, the above-described computer program may be deployed to be executed on one computer device or on a plurality of computer devices that are located at one site, or alternatively, may be executed on a plurality of computer devices that are distributed across a plurality of sites and interconnected by a communication network, and the plurality of computer devices that are distributed across the plurality of sites and interconnected by the communication network may constitute a blockchain network.
The computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (flash card) or the like, which are provided on the computer device. Further, the computer-readable storage medium may also include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
The present application provides a computer program product comprising a computer program stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the description of the transaction processing method in the embodiments of the present application, and thus, a detailed description thereof will not be provided herein. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
The terms first, second and the like in the description and in the claims and drawings of embodiments of the application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or device that comprises a list of steps or elements is not limited to the list of steps or modules but may, in the alternative, include other steps or modules not listed or inherent to such process, method, apparatus, article, or device.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (15)

CN202311211954.2A2023-09-192023-09-19Transaction processing method, apparatus, product, device, and mediumPendingCN117234672A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202311211954.2ACN117234672A (en)2023-09-192023-09-19Transaction processing method, apparatus, product, device, and medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202311211954.2ACN117234672A (en)2023-09-192023-09-19Transaction processing method, apparatus, product, device, and medium

Publications (1)

Publication NumberPublication Date
CN117234672Atrue CN117234672A (en)2023-12-15

Family

ID=89085641

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202311211954.2APendingCN117234672A (en)2023-09-192023-09-19Transaction processing method, apparatus, product, device, and medium

Country Status (1)

CountryLink
CN (1)CN117234672A (en)

Similar Documents

PublicationPublication DateTitle
CN111899016B (en)Quality data processing method and device based on block chain
US20180183600A1 (en)Method and system for providing validated, auditable, and immutable inputs to a smart contract
CN111031036A (en) Blockchain-based vaccine information monitoring method, device and computer equipment
CN110690974B (en)Block chain based data verification method, device, equipment and readable storage medium
EP3848862A1 (en)Method and apparatus for managing information about measurement device
CN112039701B (en)Interface call monitoring method, device, equipment and storage medium
US12013972B2 (en)System and method for certifying integrity of data assets
CN112612856B (en)Block chain-based data processing method and device
CN112269829B (en)Block chain data management method based on resource recovery system platform
CN112926981A (en)Transaction information processing method, device and medium for block chain and electronic equipment
CN112291321A (en)Service processing method, device and system
CN112231755B (en)Data authorization method, device and system based on blockchain
CN109859001A (en)A kind of method and device carrying out source of houses update based on block chain
CN114564358A (en)Method, apparatus, device, medium and product for checking compliance of change operations
CN118964483A (en) Transaction query method and system based on blockchain network, and electronic device
CN118193508A (en)Data checking method, device, computer equipment and storage medium
CN117234672A (en)Transaction processing method, apparatus, product, device, and medium
CN113689601B (en)Block chain-based pass verification method and device, electronic equipment and storage medium
CN112822279B (en)Monitoring method and device based on intelligent sensing and trusted storage
CN112600874B (en)Node joining method and device, electronic equipment and readable storage medium
CN115168489A (en)Data evidence storage method and device based on block chain
CN113221151A (en)Data processing method and device based on block chain and storage medium
CN113360172A (en)Application deployment method and device, computer equipment and storage medium
CN111292184A (en) Alarm prompting method, device and storage medium for file feedback
CN118200014B (en) A cross-chain verification system and method based on a second-layer network

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication

[8]ページ先頭

©2009-2025 Movatter.jp