Blockchain-based data processing method and apparatus
Patent Information
- Application Number
- CN202211516099.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-11-29
AI Technical Summary
然而,由于由一家企业所提供的中心化服务器执行商品的上架、评价、下单等操作,使得中心化电子商务平台难以对商品数据进行合规检测,存在合规问题
[0017]本发明实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时实现上述基于区块链的数据处理方法。
Smart Images

Figure CN115796586B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain access control technology, and in particular to a data processing method and apparatus based on blockchain. Background Technology
[0002] An e-commerce platform is essentially a platform that provides online transaction negotiation for businesses or individuals. Current internet e-commerce platforms are centralized, with a single company providing centralized servers to handle operations such as product listing, reviews, and order placement. However, because these operations are performed by a single company's centralized servers, centralized e-commerce platforms struggle to conduct compliance checks on product data, leading to compliance issues. Furthermore, this centralized system also means that some private data, such as transaction data, payment data, and browsing habits, is controlled by that single company, raising trust concerns. Summary of the Invention
[0003] This invention provides a blockchain-based data processing method, which includes:
[0004] Receive a product processing request, the product processing request including first product data;
[0005] Determine whether a product processing request is a risky request;
[0006] If it is a risk request, a detection request is sent to the first blockchain network so that the first blockchain network can perform risk detection on the first commodity data, and the detection result of the risk detection is stored in the first blockchain network;
[0007] If the detection result is passed, a first business request is sent to the second blockchain network so that the second blockchain network can perform a first processing on the first commodity data, and the processing result of the first processing is stored in the second blockchain network.
[0008] The first feedback message indicates that the processing was successful.
[0009] This invention also provides a blockchain-based data processing device, which includes:
[0010] A receiving unit is configured to receive a product processing request, wherein the product processing request includes first product data;
[0011] The judgment unit is used to determine whether a product processing request is a risky request.
[0012] The first sending unit is configured to send a detection request to the first blockchain network if it is a risk request, so that the first blockchain network can perform risk detection on the first commodity data, and the detection result of the risk detection is stored in the first blockchain network.
[0013] The second sending unit is configured to send a first business request to the second blockchain network if the detection result is passed, so that the second blockchain network performs a first processing on the first commodity data, and the processing result of the first processing is stored in the second blockchain network.
[0014] The first feedback unit is used to provide first information, which indicates that the processing was successful.
[0015] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described blockchain-based data processing method.
[0016] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned blockchain-based data processing method.
[0017] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the aforementioned blockchain-based data processing method.
[0018] The technical solution of this invention can receive a product processing request, which includes first product data; determine whether the product processing request is a risk request; if it is a risk request, a detection request can be sent to a first blockchain network to enable the first blockchain network to perform risk detection on the first product data, and the detection result is stored in the first blockchain network; if the detection result is successful, a first business request can be sent to a second blockchain network to enable the second blockchain network to perform first processing on the first product data, and the processing result of the first processing is stored in the second blockchain network; first information can be fed back to indicate successful processing. By performing risk detection on the first product data, compliance issues can be avoided. Through the decentralized function and consensus mechanism of the blockchain network, trust issues can be avoided. In addition, the combination of the first blockchain network and the second blockchain network forms a dual-chain structure, realizing a controllable, reliable, and decentralized product data processing method. Risk detection and business processing are executed by different blockchain networks, which also helps to reduce the size of a single blockchain network. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0020] Figure 1 This is a functional structure diagram of the data processing system in an embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram of the functional architecture of the data processing system in an embodiment of the present invention;
[0022] Figure 3 This is a flowchart of a blockchain-based data processing method in an embodiment of the present invention;
[0023] Figure 4 This is a flowchart of a blockchain-based data processing method in an embodiment of the present invention;
[0024] Figure 5 This is a functional structure diagram of a blockchain-based data processing device in an embodiment of the present invention;
[0025] Figure 6 This is a functional structure diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention. Furthermore, the acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.
[0027] With the development of the information age, more and more digital content is being published online by creators, sharing knowledge creation through free or paid means. Digital content, such as images, articles, audio, and video, is easily copied, making it difficult to effectively protect creators' copyrights and leading to problems like information misuse. Traditional centralized e-commerce platforms struggle to conduct compliant inspections of product data, making them prone to product piracy and infringement, and difficult to trace. Furthermore, traditional centralized e-commerce platforms are often provided by a single company. Some private data, such as transaction data, payment data, and browsing habits, are also held by this single company, raising trust issues. Additionally, traditional centralized e-commerce platforms often record user habits and browsing history for recommendation purposes. While these functions meet users' personalized needs, they also pose a risk of personal information leakage.
[0028] Proposed by Ethereum co-founder Gavin Wood in 2014, Web 3.0 represents the next generation of decentralized internet and imbues it with individual value. Web 3.0 focuses on the "who creates, who owns" relationship value formed through decentralized technologies such as blockchain. Based on blockchain, Web 3.0 inherently possesses decentralized characteristics. Simultaneously, users have complete control over the data value they create. Every action and every trace people leave on the internet is recorded, quantified, and added to the data value chain.
[0029] This specification describes an embodiment of a decentralized e-commerce platform implemented using blockchain technology based on Web3.0 technology. This aims to address compliance and trust issues faced by traditional centralized e-commerce platforms.
[0030] A blockchain is a distributed ledger that organizes multiple data blocks in a chain-like structure according to chronological order, and uses cryptographic algorithms to ensure security, traceability, and immutability. Blockchains can include public blockchains, consortium blockchains (also known as federated blockchains), private blockchains, etc. The distributed ledger is jointly maintained by multiple node devices in the blockchain network. The blockchain network is formed by multiple node devices through a consensus mechanism. The blockchain network can include, for example, a peer-to-peer network (P2P network). The consensus mechanism can be based on algorithms such as Proof of Work (POW), Proof of Stake (POS), Delegated Proof of Stake (DPoS), or Practical Byzantine Fault Tolerance (PBFT). By deploying smart contracts in the blockchain, the blockchain can have smart contract functionality. A smart contract is a computer program that can run on the node devices of the blockchain network. Deployment of smart contracts can be achieved through transactions. For example, business personnel can use high-level computer languages to write smart contracts. By compiling the written smart contracts, bytecode can be obtained. Blockchain node devices can construct transactions for deploying smart contracts based on the bytecode. By submitting these transactions to the blockchain network, smart contracts can be deployed on the blockchain.
[0031] Please see Figure 1 and Figure 2 This specification provides an example of a blockchain-based data processing system.
[0032] The data processing system may include multiple components such as terminal devices, platform devices, a first blockchain network, and a second blockchain network. The terminal devices may be user-facing devices, and users may include merchants and consumers. These terminal devices include, but are not limited to, smartphones, tablets, and personal computers. The platform device can be understood as a product shelf, serving as a platform for transactions between users based on this product shelf. The platform device may include servers, etc. The platform device may be established by a platform provider, which may include enterprises or individuals providing online transaction negotiation services. The first blockchain network can be used for risk detection, such as compliance checks. The first blockchain network can store the detection results of risk checks. The first blockchain network may include multiple first node devices. The first node devices may be established by regulatory agencies. The second blockchain network can be used for business processing, such as product listing, product reviews, product queries, product ordering, and product payment. The second blockchain network can store the processing results of business processing. The second blockchain network may include multiple second node devices. The second node devices may be established by users. This two-layer blockchain network architecture enables a controllable, reliable, decentralized, and distributed e-commerce system. Furthermore, regulatory agencies can establish blockchain networks, and users can also establish their own. Through platform devices, blockchain networks established by regulatory agencies can be connected to user-established blockchain networks, eliminating the need for both agencies and users to jointly establish new networks, thus saving costs.
[0033] A terminal device can send a product processing request to a platform device, the product processing request including first product data. The platform device can receive the product processing request; it can determine whether the product processing request is a risk request; if it is a risk request, it can send a detection request to a first blockchain network. The first blockchain network can perform risk detection on the first product data. If the detection result is successful, the platform device can send a first business request to a second blockchain network, the first business request including the first product data. The second blockchain network can perform first processing on the first product data. The platform device can obtain the processing result of the first processing; it can send first information to the terminal device. The first information indicates successful processing. If the detection result is unsuccessful, the platform device can send second information to the terminal device. The second information indicates processing failure. If it is not a risk request, the platform device can send a second business request to the second blockchain network, the second business request including the first product data. The second blockchain network can perform second processing on the first product data. The platform device can obtain the processing result of the second processing; it can send third information to the terminal device. The third information can include the processing result of the second processing.
[0034] Please see Figure 3 and Figure 4 This specification provides a blockchain-based data processing method. The data processing method uses a platform device as the executing entity and may specifically include the following steps.
[0035] Step S11: Receive a product processing request, the product processing request including first product data.
[0036] In some embodiments, the terminal device may send a product processing request to the platform device. The product processing request may include first product data. The first product data may include image data, text data, etc. The first product data may include data on products to be listed, product review data, product order data, and query conditions for querying products, etc. In practical applications, the terminal device may provide an interactive interface; it may obtain the first product data based on the interactive interface; and after detecting a sending instruction, it may send a product processing request to the platform device. The product may include physical goods. Physical goods may include electronic products, clothing, etc. Of course, the product may also include virtual goods. Virtual goods may include coupons, points, red envelopes, etc.
[0037] Step S12: Determine whether the product processing request is a risky request.
[0038] In some embodiments, whether the product processing request is a risky request in practical applications may include the following situations: Situation 1. Whether the first product data itself is risky data. For example, the first product data may be abnormal product data. The abnormal product data may include product data with risks such as illegal information trading and dissemination, pornography, or terrorism. Such abnormal product data is detrimental to the healthy and orderly development of the Internet. Situation 2. Whether the first product data was generated under abnormal circumstances. For example, the first product data may include product order data. The order data may be generated under a fraudulent order scenario, or it may be generated under a stolen account scenario. First product data generated under abnormal circumstances will interfere with the normal operation of the e-commerce platform.
[0039] In some embodiments, the type of a product processing request can be identified; based on the type, it can be determined whether the product processing request is a risk request. Specifically, the product processing request may include the values of one or more fields. For example, the fields may include a first field, a second field, etc. The first field is used to indicate the type of the product processing request, and the second field is used to indicate the data carried by the product processing request. Thus, the product processing request can be parsed to obtain the field values; based on the field values, the type of the product processing request can be identified. A type set can be pre-defined. The type set may include one or more request types involving risk. The type of the product processing request can be matched against the type set. If a match is successful, the product processing request can be determined to be a risk request. If a match fails, the product processing request can be determined to be a non-risk request.
[0040] Step S13: Send a detection request to the first blockchain network to perform risk detection on the first commodity data.
[0041] In some embodiments, if a product processing request is a risky request, a detection request can be sent to a first blockchain network to enable the first blockchain network to perform risk detection on the first product data. The detection result can be stored on the first blockchain network. The detection result can include pass or fail, etc. In this way, on the one hand, compliance issues can be avoided by performing risk detection on the first product data. On the other hand, performing risk detection on the first product data when a product processing request is determined to be a risky request avoids performing risk detection on all product processing requests, reducing the number of risk detections, saving time, and improving request processing efficiency.
[0042] In some embodiments, smart contracts may be deployed in the first blockchain network. The platform device may send a detection request to a first node device in the first blockchain network. The detection request may include first product data. Specifically, the platform device may send the detection request to any one of the first node devices. The first node device may receive the detection request; may construct a detection transaction based on the first product data; and may invoke the smart contract deployed in the first blockchain network based on the detection transaction to perform risk detection on the first product data and obtain the detection result of the first product data. The detection result of the first product data may be written into the blockchain of the first blockchain network.
[0043] It's worth noting that in the field of blockchain technology, transactions can be categorized into narrow and broad types. Narrowly defined transactions include those that facilitate value transfer, such as money transfers. Broadly defined transactions can include services that fulfill user intentions, such as renting a property, storing evidence, vehicle dispatching, and insurance claims.
[0044] Step S14: If the detection result is passed, send the first business request to the second blockchain network to perform the first processing on the first commodity data.
[0045] In some embodiments, the first blockchain network can send the detection results of the first commodity data to the platform device. In practical applications, the first node device can send the detection results of the first commodity data to the platform device. The platform device can receive the detection results of the first commodity data. Specifically, the first node device can proactively send the detection results of the first commodity data to the platform device. Alternatively, the platform device can also send a detection result query request to the first node device. The first node device can receive the detection result query request; can query the detection results of the first commodity data from the blockchain; and can send the detection results of the first commodity data to the platform device.
[0046] In some embodiments, if the detection result of the first commodity data is passed, the platform device can send a first service request to the second blockchain network to enable the second blockchain network to perform a first processing on the first commodity data. The processing result of the first processing can be stored in the second blockchain network. In practical applications, the platform device can send the first service request to a second node device in the second blockchain network. The first service request may include the first commodity data. The platform device can send the first service request to any second node device. The second node device can receive the first service request; can construct a first processing transaction based on the first commodity data; and can execute the first processing transaction to perform a first processing on the first commodity data to obtain a processing result. The second node device can directly execute the first processing transaction. Alternatively, a smart contract can be deployed in the second blockchain network. The second node device can call the smart contract deployed in the second blockchain network to perform a first processing on the first commodity data.
[0047] Step S15: Feedback the first information, which indicates that the processing was successful.
[0048] In some embodiments, the second blockchain network can send the processing result of the first processing to the platform device. In practical applications, the second node device can send the processing result of the first processing to the platform device. The platform device can receive the processing result of the first processing. Specifically, the second node device can proactively send the processing result of the first processing to the platform device. Alternatively, the platform device can also send a processing result query request to the second node device. The second node device can receive the processing result query request; can query the processing result of the first processing from the blockchain; and can send the processing result of the first processing to the platform device.
[0049] After obtaining the processing result of the first process, the platform device can send first information to the terminal device. The first information indicates successful processing. The terminal device can receive and display the first information. Furthermore, the first information may also include the processing result of the first process.
[0050] In some embodiments, if the detection result is a failure, the platform device may send a second message to the terminal device. The second message indicates that the processing has failed. The terminal device may receive and display the second message.
[0051] In some embodiments, if it is not a risk request, the platform device can directly send a second business request to the second blockchain network to enable the second blockchain network to perform a second processing on the first commodity data. In practical applications, the platform device can send a second business request to a second node device in the second blockchain network. The second business request may include the first commodity data. Specifically, the platform device can send the second business request to any second node device. The second node device can receive the second business request; construct a second processing transaction based on the first commodity data; and execute the second processing transaction to perform a second processing on the first commodity data to obtain the processing result of the second processing. The second node device can directly execute the second processing transaction. Alternatively, a smart contract can be deployed in the second blockchain network. The second node device can call the smart contract deployed in the second blockchain network to perform a second processing on the first commodity data. The second blockchain network can send the processing result of the second processing to the platform device. In practical applications, the second node device can send the processing result of the second processing to the platform device. The platform device can receive the processing result of the second processing; and can provide feedback third information to the terminal device. The third information may include the processing result of the second processing. The terminal device can receive and display the third information.
[0052] The following describes several application scenarios of the embodiments in this specification.
[0053] Application Scenario 1.
[0054] The terminal device can be a merchant-facing device. It can provide a product listing interface. Merchants can input data about the products to be listed in this interface. The terminal device can receive this data as first product data; it can also send a product listing request to the platform device, which may include the first product data. The platform device can receive this product listing request. The first product data may include product images, text descriptions, identifiers, and prices.
[0055] The platform device can determine that the product listing request is a risky request; it can send a compliance detection request to the first blockchain network. The first node device in the first blockchain network can receive the compliance detection request; it can construct a compliance detection transaction based on the first product data; and it can invoke the compliance detection smart contract deployed in the first blockchain network based on the compliance detection transaction to perform compliance detection on the first product data and obtain the detection result. The compliance detection smart contract is used to perform compliance detection on the first product data, such as detecting whether the first product data is abnormal product data. Specific detection rules are pre-written into the compliance detection smart contract by business personnel. For example, the first product may include text data. The compliance detection smart contract can detect whether the text data contains preset abnormal keywords. As another example, the first product data may include image data. The compliance detection smart contract can process the image data to detect whether the image data contains preset abnormal content. The first node device can send the detection result of the first product data to the platform device. The platform device can receive the detection result of the first product data.
[0056] If the detection result is successful, the platform device can send a product listing request to the second blockchain network. The product listing request may include first product data. A second node device in the second blockchain network can receive the product listing request; construct a product listing transaction based on the first product data; execute the product listing transaction, writing the first product data into the blockchain of the second blockchain network for easy querying and order placement. The second node device can send the listing result of the first product data to the platform device. The platform device can receive the listing result of the first product data; it can send first information to the terminal device. The first information indicates successful listing. The terminal device can receive the first information. Of course, if the detection result is unsuccessful, the platform device can also send second information to the terminal device. The second information indicates listing failure. The terminal device can receive the second information.
[0057] Application Scenario 2.
[0058] The terminal device can be a consumer-facing device. It can provide a product review interface. Consumers can input product review data in this interface. The terminal device can receive product review data as first product data; it can also send product review requests to the platform device, whereby the product review request may include the first product data. This first product data may include product images, reviews, consumer identifiers (e.g., account information), etc.
[0059] The platform device can determine that the product evaluation request is a risky request; it can send a compliance detection request to the first blockchain network. The first node device in the first blockchain network can receive the compliance detection request; it can construct a compliance detection transaction based on the first product data; and it can invoke the compliance detection smart contract deployed in the first blockchain network based on the compliance detection transaction to perform compliance detection on the first product data and obtain the detection result. The compliance detection smart contract is used to perform compliance detection on the first product data, such as detecting whether the first product data is abnormal product data. Specific detection rules are pre-written into the compliance detection smart contract by business personnel. For example, the first product may include text data. The compliance detection smart contract can detect whether the text data contains preset abnormal keywords. As another example, the first product data may include image data. The compliance detection smart contract can process the image data to detect whether the image data contains preset abnormal content. The first node device can send the detection result of the first product data to the platform device. The platform device can receive the detection result of the first product data.
[0060] If the test result is satisfactory, the platform device can send a product evaluation request to the second blockchain network. The product evaluation request may include first product data. A second node device in the second blockchain network can receive the product evaluation request; can construct a product evaluation transaction based on the first product data; and can execute the product evaluation transaction, thereby writing the first product data into the blockchain of the second blockchain network. The second node device can send the evaluation result of the first product data to the platform device. The platform device can receive the evaluation result of the first product data and can send first information to the terminal device. The first information indicates a successful evaluation. The terminal device can receive the first information. Conversely, if the test result is unsatisfactory, the platform device can send second information to the terminal device. The second information indicates an evaluation failure. The terminal device can receive the second information.
[0061] Application Scenario 3.
[0062] The terminal device can be a consumer-facing device. It can provide a product ordering interface. Consumers can select products and place orders on this interface. The terminal device can obtain order data as first product data; it can also send product order requests to the platform device, and these requests may include the first product data. The first product data may include product identifier, order quantity, shipping address, consumer identifier, etc.
[0063] The platform device can determine that the product order request is a risky request and can send a risk detection request to the first blockchain network. The first node device in the first blockchain network can receive the risk detection request; can construct a risk detection transaction based on the first product data; and can, based on the risk detection transaction, invoke the risk detection smart contract deployed in the first blockchain network to perform risk detection on the first product data and obtain the detection result. The risk detection smart contract is used to perform risk detection on the first product data, such as detecting whether the consumer places orders frequently, whether the quantity purchased by the consumer is too large, and whether the consumer's delivery address is the consumer's frequently used delivery address. The first node device can send the detection result of the first product data to the platform device. The platform device can receive the detection result of the first product data.
[0064] In this system, a first node device in the first blockchain network can directly invoke a risk detection smart contract deployed in the first blockchain network to perform risk detection on the first product data, obtaining the detection result. Alternatively, the first node device can also send a business data retrieval request to a platform device based on the first product data. The platform device can receive business data retrieval requests and can send such requests to a second node device in the second blockchain network. The second node device can receive business data retrieval requests, query business data in the blockchain, and send business data to the platform device. The platform device can receive and send business data to the first node device. The first node device can invoke the risk detection smart contract deployed in the first blockchain network based on the business data and the first product data to perform risk detection on the first product data, obtaining the detection result. For example, the business request may include a consumer identifier. The second node device can query business data in the blockchain based on the consumer identifier. The business data may include the consumer's recent order count, the consumer's frequently used shipping address, the consumer's historical purchase quantity, and other historical consumer data.
[0065] If the detection result is successful, the platform device can send a product order request to the second blockchain network. The product order request may include first product data. A second node device in the second blockchain network can receive the product order request; construct a product order transaction based on the first product data; call the order smart contract deployed in the second blockchain network to generate order information based on the first product data; and write the order information into the blockchain of the second blockchain network. The order information includes order number, order amount, and shipping address. The second node device can send the order information to the platform device. The platform device can receive the order information and can send first information to the terminal device. The first information indicates successful order placement. The terminal device can receive the first information. Conversely, if the detection result is unsuccessful, the platform device can send second information to the terminal device. The second information indicates order failure. The terminal device can receive the second information.
[0066] Furthermore, the first information may also include order information. The terminal device can provide the order information to the consumer. The consumer can perform a payment operation on the order information on the terminal device. After detecting a payment operation, the terminal device can send a payment request to the platform device, the payment request including the order information. The platform device can receive the payment request; it can send the payment request to the second blockchain network to perform a payment operation on the order information. Specifically, the platform device can send the payment request to any second node device. The second node device can receive the payment request; it can invoke the payment smart contract deployed in the second blockchain network to perform a payment operation on the order information. The second node device can send the payment result to the platform device. The platform device can receive the payment result; it can send a notification message to the terminal device indicating successful payment.
[0067] Application Scenario 4.
[0068] The terminal device can send a product query request to the platform device. The product query request may include query conditions. The platform device can receive the product query request; determine if the product query request is not a risky request; send the product query request to the second blockchain network to obtain second product data that meets the query conditions; and provide the second product data back to the terminal device. The terminal device can receive the second product data and display the second product data.
[0069] The terminal device can be a consumer-facing device. The terminal device can provide a product search interface. Consumers can enter search criteria in the product search interface. The terminal device can receive search criteria; it can send product search requests to second node devices in the second blockchain network. The second node device can receive product search requests; it can query product data that meets the search criteria in the blockchain of the second blockchain network as second product data; it can send the second product data to the platform device. The platform device can receive the second product data. The search criteria may include product images. The second node device can query the blockchain for second product data that matches the product image. Alternatively, the search criteria may include product identifiers. The second node device can query the blockchain for second product data corresponding to the product identifiers. Alternatively, the search criteria may include keywords. The second node device can query the blockchain for second product data that matches the keywords.
[0070] Application Scenario 5.
[0071] The terminal device can send a page data retrieval request to the platform device. The page data retrieval request may include a page identifier. The page identifier may include a page address, such as a URL. The platform device can receive the page data retrieval request; obtain the page template corresponding to the page identifier and the product identifier corresponding to the page identifier; determine that the page data retrieval request is not a risky request; send a product query request to the second blockchain network to obtain second product data corresponding to the product identifier; generate page data based on the page template and the second product data; and provide the page data back to the terminal device. The terminal device can receive and display the page data so that consumers can browse products.
[0072] The terminal device can be a consumer-facing device. The terminal device can send a page data retrieval request to the platform device, and the page data retrieval request may include a page identifier. The platform device can receive the page data retrieval request; can retrieve one or more product identifiers corresponding to the page identifier; and can send a product query request to a second node device in the second blockchain network, the product query request may include the one or more product identifiers. The second node device can receive the product query request; can query the second product data corresponding to the one or more product identifiers in the blockchain; and can send the second product data to the platform device. The platform device can receive the second product data; can generate page data based on the page template corresponding to the page identifier and the second product data; and can send the page data to the terminal device. The terminal device can receive and display the page data.
[0073] The platform device can provide a set of product identifiers. This set may include one or more product identifiers. Each product identifier may correspond to a page identifier. Product identifiers may include the product's number or name, etc. The platform device can retrieve one or more corresponding product identifiers from the set of product identifiers based on a page data retrieval request. Additionally, the platform device can also provide a set of page templates. This set may include one or more page templates. Each page template may correspond to a page identifier. The platform device can retrieve the corresponding page template from the set of page templates based on a page data identifier retrieval request.
[0074] The technical solution of this specification embodiment can receive a product processing request, the product processing request including first product data; determine whether the product processing request is a risk request; if it is a risk request, a detection request can be sent to a first blockchain network so that the first blockchain network performs risk detection on the first product data, and the detection result is stored in the first blockchain network; if the detection result is successful, a first business request can be sent to a second blockchain network so that the second blockchain network performs first processing on the first product data, and the processing result of the first processing is stored in the second blockchain network; first information can be fed back, the first information being used to indicate successful processing. By performing risk detection on the first product data, compliance issues can be avoided. Through the decentralized function and consensus mechanism of the blockchain network, trust issues can be avoided. In addition, the combination of the first blockchain network and the second blockchain network forms a dual-chain structure, realizing a controllable, reliable, and decentralized product data processing method. Risk detection and business processing are executed by different blockchain networks, which also helps to reduce the size of a single blockchain network, thereby facilitating the construction of the blockchain network.
[0075] Please see Figure 5 This invention also provides a blockchain-based data processing device, as described in the following embodiments. Since the principle by which this device solves the problem is similar to that of the blockchain-based data processing method, the implementation of this device can refer to the implementation of the blockchain-based data processing method; repeated details will not be elaborated further.
[0076] Receiving unit 21 is used to receive a product processing request, the product processing request including first product data;
[0077] Judgment unit 22 is used to determine whether a product processing request is a risky request;
[0078] The first sending unit 23 is used to send a detection request to the first blockchain network if it is a risk request, so that the first blockchain network can perform risk detection on the first commodity data, and the detection result of the risk detection is stored in the first blockchain network.
[0079] The second sending unit 24 is used to send a first business request to the second blockchain network if the detection result is passed, so that the second blockchain network performs a first processing on the first commodity data, and the processing result of the first processing is stored in the second blockchain network.
[0080] The first feedback unit 25 is used to provide first information, which indicates that the processing was successful.
[0081] Please see Figure 6 This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned blockchain-based data processing method.
[0082] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned blockchain-based data processing method.
[0083] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the aforementioned blockchain-based data processing method.
[0084] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0085] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0086] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0087] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0088] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A blockchain-based data processing method applied to a platform device, wherein the platform device is used to connect a first blockchain network to a second blockchain network, the first blockchain network being used for risk detection, the first blockchain network including multiple first node devices, and the second blockchain network being used for business processing, the second blockchain network including multiple second node devices; the method includes: Receive a product processing request sent by a terminal device, the product processing request including first product data; Determine whether a product processing request is a risky request; If it is a risk request, a detection request is sent to the first node device in the first blockchain network so that the first blockchain network can perform risk detection on the first commodity data, and the detection result of the risk detection is stored in the first blockchain network; If the detection result is passed, a first business request is sent to the second node device in the second blockchain network so that the second blockchain network performs a first processing on the first commodity data, and the processing result of the first processing is stored in the second blockchain network. The terminal device is fed back first information, which indicates that the processing was successful.
2. The method according to claim 1, wherein determining whether a product processing request is a risk request includes: Identify the type of product processing request; Based on the type, determine whether the product processing request is a risky request.
3. The method according to claim 1, wherein the product processing request includes a product listing request, the product listing request is a risk request, and the first product data includes data on products to be listed; Sending a detection request to the first node device in the first blockchain network includes: Send a compliance inspection request to the first node device in the first blockchain network, so that the first node device can call the compliance inspection smart contract deployed in the first blockchain network to perform compliance inspection on the first commodity data; Sending the first service request to the second node device in the second blockchain network includes: Send a product listing request to the second node device in the second blockchain network so that the second node device can perform the product listing operation based on the first product data; The first piece of information indicates that the product has been successfully listed.
4. The method according to claim 1, wherein the product processing request includes a product evaluation request, the product evaluation request is a risk request, and the first product data includes product evaluation data; Sending a detection request to the first node device in the first blockchain network includes: Send a compliance inspection request to the first node device in the first blockchain network, so that the first node device can call the compliance inspection smart contract deployed in the first blockchain network to perform compliance inspection on the first commodity data; Sending the first service request to the second node device in the second blockchain network includes: Send a product evaluation request to a second node device in the second blockchain network so that the second node device can perform a product evaluation operation based on the first product data; The first piece of information is used to indicate that the evaluation was successful.
5. The method according to claim 1, wherein the product processing request includes a product order request, the product order request is a risk request, and the first product data includes product order data; Sending a detection request to the first node device in the first blockchain network includes: Send a risk detection request to the first node device in the first blockchain network so that the first node device can call the risk detection smart contract deployed in the first blockchain network to perform risk detection on the first commodity data; Sending the first service request to the second node device in the second blockchain network includes: Send a product order request to the second node device in the second blockchain network, so that the second node device can call the order smart contract deployed in the second blockchain network based on the first product data and execute the product order operation; The first message indicates that the order was successfully placed.
6. The method according to claim 5, wherein the first information includes order information; The method further includes: Receive a payment request, which includes order information; Send a payment request to the second blockchain network to execute the payment operation on the order information.
7. The method according to claim 1, further comprising: If the test result is not passed, a second message is sent out, which indicates that the processing has failed.
8. The method according to claim 1, further comprising: If it is not a risk request, a second business request is sent to the second blockchain network so that the second blockchain network can perform a second processing on the first commodity data; The feedback includes a third piece of information, which includes the processing result of the second processing.
9. The method according to claim 8, wherein the product processing request includes a product query request, the product query request is not a risk request, and the first product data includes query conditions; Sending the second service request to the second blockchain network includes: Send a product query request to the second blockchain network to obtain second product data that meets the query conditions; The third information includes the second product data.
10. A blockchain-based data processing device, applied to a platform device, wherein the platform device is used to connect a first blockchain network to a second blockchain network, the first blockchain network being used for risk detection, the first blockchain network including multiple first node devices, and the second blockchain network being used for business processing, the second blockchain network including multiple second node devices; the device comprises: A receiving unit is configured to receive a product processing request sent by a terminal device, wherein the product processing request includes first product data; The judgment unit is used to determine whether a product processing request is a risky request. The first sending unit is configured to send a detection request to the first node device in the first blockchain network if it is a risk request, so that the first blockchain network can perform risk detection on the first commodity data, and the detection result of the risk detection is stored in the first blockchain network. The second sending unit is configured to send a first service request to a second node device in the second blockchain network if the detection result is passed, so that the second blockchain network performs a first processing on the first commodity data, and the processing result of the first processing is stored in the second blockchain network. The first feedback unit is used to provide first information to the terminal device, which indicates that the processing was successful.
11. The apparatus according to claim 10, wherein the determining unit comprises: The identification module is used to identify the type of product processing request; The judgment module is used to determine whether the product processing request is a risky request based on the type.
12. The apparatus of claim 10, further comprising: The second feedback unit is used to provide second information if the detection result is not passed, and the second information is used to indicate that the processing has failed.
13. The apparatus of claim 10, further comprising: The third sending unit is used to send a second business request to the second blockchain network if it is not a risk request, so that the second blockchain network can perform a second processing on the first commodity data. The third feedback unit is used to provide third information, which includes the processing result of the second processing.
14. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 9.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 9.
16. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Business processing method and apparatus
CN107341702A