Service Settlement Method and Device Based on Blockchain Trusted Monitoring Data

Through Istio proxy and blockchain monitoring technology, combined with database summary, the independent on-chain evidence storage of service call data is realized, solving the data credibility and recovery problems in blockchain service settlement, and improving settlement efficiency and stability.

CN117459592BActive Publication Date: 2025-07-11ZHEJIANG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311164327.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2025-07-11
Estimated Expiration
2043-09-11

AI Technical Summary

Technical Problem

The existing blockchain service settlement methods have shortcomings in data credibility and recovery, especially the trustworthiness of database data is difficult to verify, smart contract computing is high and the performance is low, making it difficult to meet the batch settlement needs of multiple call records.

Method used

Through Istio proxy technology, service call records are monitored, and combined with blockchain monitoring and analysis technology, the service call data is automatically circulated and stored, the smart contract process is simplified, and the blockchain traceability characteristics are used to ensure the credibility and recovery of the data source, and settlement and transfer records are generated based on database summary.

Benefits of technology

It improves the credibility of service call records and data recovery, reduces the computing pressure of smart contracts, and improves the efficiency and stability of batch summary settlement function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117459592B_ABST
    Figure CN117459592B_ABST
Patent Text Reader

Abstract

The present invention discloses a service settlement method based on blockchain-trusted monitored data: First, through the monitoring technology based on the Istio proxy combined with the smart contract technology of the blockchain, the service call data is autonomously stored on the blockchain from the network traffic; then, the blockchain monitoring technology is adopted to obtain the latest block of the blockchain; finally, by parsing the data of the latest block, the specific trusted data on the chain is obtained, and the parsed data is stored in the database for evidence. The present invention also provides a service settlement device based on blockchain-trusted monitored data. The method and device provided by the present invention ensure the credibility of the call record and the recoverability of the data; by simplifying the smart contract process, the computing pressure is reduced, and thus the efficiency and stability of the batch summary settlement function are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of blockchain, and particularly relates to a service settlement method and device based on blockchain-trusted monitored data. Background Technique

[0002] With the progress and development of cloud computing and cloud service technologies, a large number of service applications are deployed in cloud resources for easy invocation by service users. For the transaction settlement of service applications, batch invocation settlement is mostly carried out through a third-party intermediary institution. The settlement process is complex, lacking a fair mechanism, and it is difficult to ensure or prove the credibility of settlement data; some studies use blockchain technology to achieve autonomous settlement based on invocation records, which to a certain extent ensures the credibility and fairness of service settlement. That is, currently, for traditional service usage settlement methods, most are batch trusted settlements based on blockchain technology.

[0003] In the process of ensuring data credibility, the current blockchain settlement methods are mainly divided into the following two methods:

[0004] (1) After the source data is stored in the database for certification and then a hash digest is generated and stored on the chain: Store the source data such as invocation records, which the settlement operation depends on, in the database, and store its hash on the chain for certification to ensure the trusted verification of the source data. Then, service settlement is performed based on the source data in the database; for example, the Chinese patent with the publication number CN113781048A discloses a blockchain-based transaction information verification and settlement method, including configuring a blockchain for recording transactions; preparing a transaction information table and providing corresponding hash values for each data column in the transaction information table; recording a hash in the blockchain as the identification identifier of the blockchain transaction; configuring a barcode as a pointer to locate the blockchain transaction; inserting the barcode on the transaction information table and handing the transaction information table to the data processing module; when the data processing module processes the data in the transaction information table under the control of the processor.

[0005] (2) The source data is directly stored on the chain for certification: Store source data such as invocation records in the blockchain to ensure the credibility of the data. Then, a settlement summary is performed based on the invocation records in the database or blockchain, and finally, transfer settlement is performed based on the summary; for example, the Chinese patent with the publication number CN109840845A discloses a communication settlement method that can improve settlement efficiency, including the following steps: Writing the settlement rules among the first operator node, the second operator node, and the customer node into a smart contract and recording it on the blockchain; the smart contract collects the operator services used by the user for roaming and performs real-time settlement among the first operator node, the second operator node, and the user node and records it on the blockchain. The communication settlement method proposed by the present invention can achieve real-time inter-network settlement and prevent tampering, avoiding fee arrears and disputes.

[0006] After the hash is chained in the above method (1), although it can ensure the trustworthy verification of the database data, if the database data is tampered with, it is difficult to restore the real data through the hash on the chain, and it is difficult to prove the trustworthiness of the database data before the data hash is chained; that is, it only has the data verification function, does not have the trustworthy data recovery function, and the trustworthiness of the call record data in the database is difficult to verify, resulting in certain trust disputes.

[0007] The above method (2) combines smart contract technology to ensure the trustworthiness of the data chained from the data source. However, the process of integrating call records into settlement parameters and then conducting settlement transfers can only be calculated through smart contracts. At present, service settlements are mostly based on batch call record settlements, relying too much on smart contracts for operations such as summarizing batch call records and transfer settlements. The contract calculation pressure is high, the performance is low, and the stability is poor, making it difficult to meet the batch settlement requirements of multiple call records. Summary of the Invention

[0008] The purpose of the present invention is to provide a service settlement method and device based on blockchain trustworthy monitoring data, which ensure the trustworthiness of call records and the recoverability of data; by simplifying the smart contract process, the calculation pressure is reduced, thereby improving the efficiency and stability of the batch summary settlement function.

[0009] The present invention provides the following technical solutions:

[0010] A service settlement method based on blockchain trustworthy monitoring data, the service settlement method includes:

[0011] (1) The service publisher publishes a service application on the service call platform and deploys the service in the Kubernetes cluster. The interaction between services in the cluster and the traffic forwarding in the cluster are managed through Istio technology;

[0012] (2) The service call platform generates a service publication record of the service publisher and stores it on the blockchain node for evidence;

[0013] (3) The service call platform generates a service call transaction record of the service consumer and stores it on the blockchain node for evidence;

[0014] (4) Based on the service call transaction record, verify whether the funds of the service consumer meet the requirements of this service call transaction. If so, generate a service call prepayment record and store it on the blockchain for evidence;

[0015] (5) Through a service call monitoring program based on Istio proxy technology, real-time monitor and obtain the call detail information of each service, generate a service call record, and store it on the blockchain node for evidence;

[0016] Among them, after steps (2)-(5), the following operations are performed before proceeding to the next step:

[0017] Specific on-chain trusted data is obtained through blockchain monitoring technology and data parsing and stored in a database as the monitored blockchain trusted data;

[0018] (6) Based on the monitored blockchain trusted data in the database, a service call summary record is generated, the service call transaction settlement is completed, and a service call transfer record is generated and stored on the chain for certification;

[0019] (7) Specific on-chain trusted data is obtained through blockchain monitoring technology and data parsing and stored in a database.

[0020] The present invention first realizes the autonomous storage of service call data from network traffic to the blockchain for certification through the monitoring technology based on the Istio proxy combined with the smart contract technology of the blockchain; then the blockchain monitoring technology is adopted to obtain the latest block of the blockchain; finally, through data parsing of the latest block, specific on-chain trusted data is obtained, and the parsed data is stored in the database for certification. Therefore, the present invention realizes the credibility and verifiability of the data source of the database by optimizing the process of storing the source data, solves the problem of the credibility of the service call data of the source data, and at the same time realizes the recoverability of the database data based on the traceability characteristics of the blockchain.

[0021] Furthermore, the service settlement method includes:

[0022] (1) The service publisher publishes a service application on the service call platform and deploys the service in the Kubernetes cluster. The interaction between services in the cluster and the traffic forwarding in the cluster are managed through Istio technology;

[0023] (2) The service call platform generates a service publication record of the service publisher and stores it on the chain for certification through a blockchain node;

[0024] (3) Based on the blockchain Event real-time monitoring program, the latest block is obtained and data parsing is performed on it, and then the on-chain data is obtained and stored in the service publication table of the database. The on-chain data includes the service publication record generated in step (2) and the corresponding blockchain transaction hash and timestamp;

[0025] (4) The service call platform generates a service call transaction record of the service consumer and stores it on the chain for certification through a blockchain node;

[0026] (5) The service call transaction table is obtained by the blockchain Event real-time monitoring program to acquire the latest block, parse its data, and then obtain the data uploaded to the chain and store it in the database. The data uploaded to the chain includes the data of the service call transaction record generated in step (4), the corresponding blockchain transaction hash, and the timestamp.

[0027] (6) Based on the service call transaction record, verify whether the funds of the service consumer are sufficient for this service call transaction. If so, generate a service call prepayment record and upload it to the chain for deposit and proof.

[0028] (7) The service call prepayment record table in the database is obtained by the blockchain Event real-time monitoring program to acquire the latest block, parse its data, and then obtain the data uploaded to the chain and store it in the database. The data uploaded to the chain includes the service call prepayment record generated in step (6), the corresponding blockchain transaction hash, and the timestamp.

[0029] (8) Through the service call monitoring program based on Istio proxy technology, the call details information of each service is obtained in real-time, and the service call record is uploaded to the chain for deposit and proof through the blockchain node.

[0030] (9) The service call table in the database is obtained by the blockchain Event real-time monitoring program to acquire the latest block, parse its data, and then obtain the data uploaded to the chain and store it in the database. The data uploaded to the chain includes the service call record generated in step (8), the corresponding blockchain transaction hash, and the timestamp.

[0031] (10) Based on the blockchain trusted data monitored in the database, summarize and generate a service call summary record, complete the service call transaction settlement, and generate a service call transfer record and upload it to the chain for deposit and proof.

[0032] (11) The service call transfer table in the database is obtained by the blockchain Event real-time monitoring program to acquire the latest block, parse its data, and then obtain the data uploaded to the chain and store it in the database. The data uploaded to the chain includes the service call transfer record generated in step (10), the corresponding blockchain transaction hash, and the timestamp.

[0033] In step (2), the service publication record includes the service ID, service name, service label, service publisher ID, service API interface, service parameters, publication time, service version, service function description, and service call transaction rules.

[0034] The blockchain node uploads the service publication record to the chain for deposit and proof by calling the service publication contract. The service publication contract refers to the contract for depositing the service publication record on the blockchain for the use of the service publisher.

[0035] In step (3), the service call transaction record includes a transaction ID, a service consumer ID, a service publisher ID, a service ID, a service call transaction rule, a service version, a service call link, a service publication time, and a service transaction time;

[0036] The blockchain node stores the evidence on the chain by invoking a service transaction contract, where the service transaction contract refers to a contract for storing the service call transaction record on the chain for use by the service consumer.

[0037] In step (4), if the funds of the service consumer are insufficient for this service call transaction, the service consumer will be prompted that the funds are insufficient and they need to recharge;

[0038] After storing the evidence on the chain, a fund prepayment contract is triggered. The fund prepayment contract refers to a contract for completing the account fund prepayment operation in the blockchain, including fund balance verification, deposit of service call prepayment records, and account fund prepayment;

[0039] The service call prepayment record includes a prepayment ID, a transaction ID, a prepayment amount, a service publisher ID, and a service consumer ID.

[0040] In step (5), the blockchain node stores the service call record on the chain by invoking a service call contract;

[0041] The service call contract refers to a contract for storing the service call record on the chain for use by the service call monitoring program;

[0042] The service call record includes a service call ID, a prepayment ID, a transaction ID, a service ID, a service publisher ID, a service consumer ID, call details, whether the call was successful, and the call time.

[0043] In step (6), by triggering a service call summary program based on a time period, a service call summary record is generated based on the blockchain trusted data monitored in the database;

[0044] The service call summary record includes a call summary ID, a list of service call IDs, a service call time period, a service consumer ID, a service publisher ID, a service ID, a transaction ID, a prepayment ID, and the number of successful calls;

[0045] The blockchain node completes the service call transaction settlement by invoking a service settlement contract. The service settlement contract refers to a contract for performing service application call settlement based on the service call summary record and the service call prepayment record for use by the service call summary program;

[0046] The service call transfer record includes a call summary ID, a list of service call IDs, a service call time period, a service consumer ID, a service publisher ID, a service ID, a transaction ID, a prepayment ID, and a transfer amount.

[0047] Further, the service settlement method based on blockchain trusted monitoring data further includes the following steps:

[0048] (8) When the service consumer no longer needs any service application, a service liquidation application can be initiated to trigger the service call summary program. Similarly, a service call summary record is generated based on the trusted data in the database. The service liquidation contract is called through the blockchain node to complete the liquidation of the service call transaction, and a service call liquidation record is generated and stored on the blockchain for evidence.

[0049] The service liquidation contract refers to a contract for liquidating service application calls based on the service call summary record and the service call prepayment record, which is used by the service call summary program. Compared with the service settlement contract, in addition to the service call settlement function, it also includes a balance refund function.

[0050] The service call liquidation record includes a call summary ID, a list of service call IDs, a service call time period, a service consumer ID, a service publisher ID, a service ID, a transaction ID, a prepayment ID, a transfer amount, and a refund amount.

[0051] (9) Based on the blockchain Event real-time monitoring program, the latest block is obtained and its data is parsed, and then the data on the chain is obtained and stored in the service call liquidation table in the database. Here, the data on the chain is the service call liquidation record and the corresponding blockchain transaction hash and timestamp.

[0052] The present invention also provides a service settlement device based on blockchain trusted monitoring data, including a memory and one or more processors. An executable code is stored in the memory. When the one or more processors execute the executable code, it is used to implement the above-mentioned service settlement method based on blockchain trusted monitoring data.

[0053] The present invention also provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, it is used to implement the above-mentioned service settlement method based on blockchain trusted monitoring data.

[0054] Compared with the prior art, the present invention has the following excellent effects:

[0055] The service settlement method and device based on blockchain trusted monitoring data provided by the present invention build a secure and trusted data deposition environment for service calls through the blockchain, combine the monitoring technology based on the Istio proxy with the smart contract technology to realize the autonomous deposition of service call records on the chain, and ensure the credibility of the data source; through the blockchain event monitoring technology and block parsing technology, realize the storage of the latest trusted data on the chain into the database, and then ensure the credibility of the data source in the database and the recoverability of the data; afterwards, summarize the call records based on the trusted data in the database, generate the corresponding settlement transfer records, and realize the on-chain fund transfer through the smart contract technology.

[0056] The service settlement method and device based on blockchain trusted monitoring data provided by the present invention ensure the credibility of call records and the recoverability of data; on the other hand, by simplifying the smart contract process, it solves the problems of high computing pressure, low performance, and poor stability caused by excessive reliance on smart contracts for batch call record summarization, transfer settlement, etc., and thus improves the efficiency and stability of the batch summarization and settlement function. Brief Description of the Drawings

[0057] Figure 1 It is a flowchart of the trusted settlement method for service calls based on blockchain monitoring data in the embodiment. Detailed Embodiment

[0058] Next, in combination with the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.

[0059] The trusted settlement method for service calls based on blockchain monitoring data provided in this embodiment has the following specific process Figure 1 as shown, and includes the following steps:

[0060] Step 1: The service publisher publishes a service application on the service call trading platform and deploys the service in the Kubernetes cluster. The interaction between services in the cluster and the traffic forwarding in the cluster are managed through the Istio technology.

[0061] The service publisher refers to the user who publishes the service application on the platform. By publishing the service application, the platform becomes more active.

[0062] The service call trading platform refers to the platform that centrally aggregates service applications. The service publisher can publish service applications on the platform for service consumers to subscribe to and call the required service applications. Finally, based on technologies such as blockchain, the trusted settlement of service applications is realized.

[0063] Meanwhile, the service publisher sets the service invocation transaction rules for the corresponding service. The service invocation transaction rules refer to rules such as the number of service invocations and the charging standards, which are set by the service publisher. For example: 5¥ / 6 times, 10¥ / 12 times, 30¥ / month, etc.

[0064] In this embodiment, specifically: Service publisher A publishes a weather service in the Jianmu Cloud service invocation transaction platform (hereinafter collectively referred to as the "Jianmu Cloud platform") and formulates the service invocation transaction rule as 10 yuan / 10 times, that is, 10 yuan can be paid for 10 invocations of this service.

[0065] Step 2: The service invocation transaction platform generates a service publication record based on the service application published by the service publisher, and invokes the service publication contract through the blockchain node to store it on the chain for evidence.

[0066] The service publication record mainly includes information such as service ID, service name, service label, service publisher ID, service API interface, service parameters, publication time, service version, service function description, service invocation transaction rules, etc.

[0067] The service publication contract refers to the contract for storing the service publication record on the blockchain, mainly for the use of service publishers.

[0068] In this embodiment, specifically: After service publisher A publishes the weather service on the Jianmu Cloud platform, the Jianmu Cloud platform generates a weather service publication record and invokes the service publication contract through the blockchain node to store it on the chain for evidence. Among them, the specific information of the weather service publication record is (service ID: s1; service name: weather service; service label: weather; service publisher ID: A; service API interface: https: / / tianqi.com / ; service parameters: time, location; publication time: 2023.9.6 10:30:00; service version: v1; service function description: query the weather conditions at a certain time point in a certain area; service invocation transaction rules: 10 yuan / 10 times).

[0069] Step 3: Based on the blockchain Event real-time monitoring program, obtain the latest block, parse the data of the latest block, and then obtain the data on the chain and store it in the service publication table of the database. Here, the data on the chain is data such as service publication records and corresponding blockchain transaction hashes and timestamps.

[0070] The blockchain Event real-time monitoring program refers to a program that monitors data such as the latest generated blocks and transactions in a specified channel through the blockchain Event client based on the blockchain account identity. This program needs to be started before the data is stored on the chain for evidence.

[0071] The latest block refers to the block with the highest block height based on the current time, the latest generated block.

[0072] The service release table refers to the table in the database that stores service release records. In addition to the relevant data attributes of service release records, it also includes data attributes such as blockchain transaction hash and timestamp.

[0073] In this embodiment, specifically: after the Jianmu Cloud Platform stores the weather service release record on the blockchain for evidence, the blockchain Event real-time monitoring program monitors the blockchain transaction corresponding to the weather service release record, and stores the weather service release record and data such as the transaction hash and timestamp of the weather service release transaction into the service release record table in the database.

[0074] Step 4: Based on its own needs, the service consumer selects a suitable service call transaction rule for the required service. The service call trading platform generates a corresponding service call transaction record based on the selection of the service consumer, and invokes the service trading contract through the blockchain node to store the evidence on the blockchain.

[0075] The service consumer refers to the user who purchases service applications in the service call trading platform.

[0076] The service call transaction record mainly includes information such as transaction ID, service consumer ID, service publisher ID, service ID, the service call transaction rule, service version, service call link, service release time, and service transaction time.

[0077] The service trading contract refers to the contract that stores the service call transaction record on the blockchain for evidence, and is mainly used by service consumers.

[0078] In this embodiment, specifically: Service consumer B selects to purchase the weather service and selects the service call transaction rule of 10 yuan / 100 times. Then the Jianmu Cloud Platform generates a weather service call transaction record and stores the evidence on the blockchain. Among them, the specific information of the weather service call transaction record is (transaction ID: tx1; service consumer ID: B; service publisher ID: A; service ID: s1; the service call transaction rule: 10 yuan / 10 times; service version: v1; service call link: https: / / tianqi.com / ; service release time: 2023.9.6 10:30:00; service transaction time: 2023.9.6 12:30:00).

[0079] Step 5: Based on the blockchain Event real-time monitoring program, obtain the latest block, parse the data of the latest block, and then obtain the data stored on the blockchain and store it in the service call transaction table in the database. Here, the data stored on the blockchain is the service call transaction record and corresponding blockchain transaction hash, timestamp, and other data.

[0080] The service call transaction table refers to the table in the database that stores service call transaction records. In addition to the relevant data attributes of service call transaction records, it also includes data attributes such as blockchain transaction hash and timestamp.

[0081] In this embodiment, specifically: after the weather service call transaction record is stored on the blockchain for evidence, the blockchain Event real-time monitoring program monitors the blockchain transaction corresponding to the weather service call transaction record, and stores the weather service call transaction record and data such as the transaction hash and timestamp of the blockchain transaction into the service call transaction table in the database.

[0082] Step 6: As the service call transaction record is stored on the blockchain for evidence, trigger the fund prepayment contract. Based on the data of the service call transaction record, verify whether the funds of the service consumer meet the requirements of this service call transaction. If so, generate a service call prepayment record and store it on the blockchain for evidence; if not, prompt the service consumer that the funds are insufficient and please recharge.

[0083] The fund prepayment contract refers to the contract that completes the operation of prepaying the account funds in the blockchain, mainly including functions such as fund balance verification, service call prepayment record storage for evidence, and account fund prepayment.

[0084] The service call prepayment record mainly includes information such as prepayment ID, transaction ID, prepayment amount, service publisher ID, and service consumer ID.

[0085] Account fund prepayment refers to the pretreatment of the funds for this service call transaction to avoid the situation where the call fee cannot be paid after the service call in the later stage. If the consumer does not use up the call times or the service call is unsuccessful in the later stage, the funds can be refunded based on the actual call record.

[0086] In this embodiment, the prepayment function can be implemented by adopting the method of prepaying the corresponding transaction funds to a third-party trusted account or a virtual account that the service consumer cannot operate.

[0087] In this embodiment, specifically: after the weather service call transaction record is stored on the blockchain for evidence, trigger the fund prepayment contract, and audit the account funds of service consumer B to complete the fund prepayment for service publisher A, and generate the corresponding weather service call prepayment record and store it on the blockchain for evidence. Among them, the specific information of the weather service call prepayment record is (prepayment ID: m1; transaction ID: tx1; prepayment amount: 10 yuan; service publisher ID: A; service consumer ID: B).

[0088] Step 7: The blockchain Event real-time monitoring program obtains the latest block, parses the data of the latest block, and then obtains the data uploaded to the chain and stores it in the service call prepayment table in the database. Here, the data uploaded to the chain is service call prepayment records and corresponding blockchain transaction hashes, timestamps and other data.

[0089] The service call prepayment table refers to the table in the database that stores service call prepayment records. In addition to the relevant data attributes of service call prepayment records, it also includes data attributes such as blockchain transaction hashes and timestamps.

[0090] In this embodiment, specifically: after the Jianmu Cloud Platform uploads the weather service call prepayment record to the chain for deposit and proof, the blockchain Event real-time monitoring program monitors the blockchain transaction corresponding to the weather service call prepayment record, and stores the weather service call prepayment record and data such as the transaction hash and timestamp of the blockchain transaction in the service call prepayment table in the database.

[0091] Step 8: Through the service call monitoring program based on Istio proxy technology, the call details information of each service is obtained in real-time, and the service call record is uploaded to the chain for deposit and proof through the blockchain node by calling the service call contract.

[0092] The service call monitoring program is based on Istio proxy technology to detect data such as traffic control of service applications deployed in the Kubernetes cluster, and then obtains the specific call data of service applications. This monitoring program needs to be deployed before the service is released.

[0093] The service call contract refers to the contract that uploads the service call record to the chain for deposit and proof, and is mainly used by the service call monitoring program.

[0094] Service call records mainly include data such as service call ID, prepayment ID, transaction ID, service ID, service publisher ID, service consumer ID, call details, whether the call is successful, and call time.

[0095] In this embodiment, specifically: after service consumer B calls the weather service, the service call monitoring program will monitor the specific call details information, generate weather service call record 1, and upload it to the chain for deposit and proof by calling the service call contract through the blockchain node. Among them, the specific information of weather service call record 1 is (service call ID: c1; prepayment ID: m1; transaction ID: tx1; service ID: s1; service publisher ID: A; service consumer ID: B; call details: query the weather conditions in Hangzhou during the National Day holiday in 2023; whether the call is successful: yes; call time: 2023.9.6 15:30:00).

[0096] Step 9: The blockchain Event real-time monitoring program obtains the latest block, parses the data of the latest block, and then obtains the data uploaded to the blockchain and stores it in the service call table of the database. Here, the data uploaded to the blockchain is service call records and corresponding blockchain transaction hashes, timestamps, and other data.

[0097] The service call table refers to the table in the database that stores service call records. In addition to the relevant data attributes of service call records, it also includes data attributes such as blockchain transaction hashes and timestamps.

[0098] In this embodiment, specifically: after the Jianmu Cloud Platform uploads the weather service call record 1 to the blockchain for deposit and proof, the blockchain Event real-time monitoring program monitors the blockchain transaction corresponding to the weather service call record 1, and stores the weather service call record 1 and data such as the transaction hash and timestamp of the blockchain transaction in the service call table in the database.

[0099] Step 10: Trigger the service call summary program according to the time period. Based on the blockchain trusted data monitored in the database, summarize and generate service call summary records, call the service settlement contract through the blockchain node, complete the service call transaction settlement, and generate a service call transfer record for upload and deposit on the blockchain.

[0100] The service call summary program refers to a program that can be automatically called based on a time period or actively called by service consumers. Its main function is to summarize service call records based on the blockchain trusted data monitored in the database and generate service call summary records relied on for service settlement.

[0101] The service call summary records mainly include information such as call summary ID, service call ID list, service call time period, service consumer ID, service publisher ID, service ID, transaction ID, prepayment ID, and successful call times.

[0102] The service settlement contract refers to a contract for service application call settlement based on service call summary records and service call prepayment records, mainly for use by the service call summary program.

[0103] The service call transfer records mainly include information such as call summary ID, service call ID list, service call time period, service consumer ID, service publisher ID, service ID, transaction ID, prepayment ID, and transfer amount.

[0104] In this embodiment, specifically: the service call summary program is triggered regularly. Based on trusted data information such as service call record 1 and weather service call prepayment record, weather service call summary record 1 is generated. The service settlement contract is called through the blockchain node to complete the service call transaction settlement, and weather service call transfer record 1 is generated for upload and deposit on the blockchain.

[0105] Among them, the specific information of the weather service call summary record 1 is (call summary ID: sumc1; service call ID list: {c1}; service call time period: 2023.9.6 12:30:00 - 2023.9.6 23:30:00; service consumer ID: B; service publisher ID: A; service ID: s1; transaction ID: tx1; prepayment ID: m1; successful call count: 1); the specific information of the weather service call transfer record 1 is (call summary ID: sumc1; service call ID list: {c1}; service call time period: 2023.9.6 12:30:00 - 2023.9.6 23:30:00; service consumer ID: B; service publisher ID: A; service ID: s1; transaction ID: tx1; prepayment ID: m1; transfer amount: 1 yuan).

[0106] Step 11: The blockchain Event real-time monitoring program obtains the latest block, parses the data of the latest block, and then obtains the data on the chain and stores it in the service call transfer table in the database. Here, the data on the chain is the service call transfer record and the corresponding blockchain transaction hash, timestamp and other data.

[0107] The service call transfer table refers to the table in the database that stores service call transfer records. In addition to the relevant attributes of the service call transfer records, it also includes data attributes such as blockchain transaction hash and timestamp.

[0108] In this embodiment, specifically: after the Jianmu cloud platform stores the weather service call transfer record 1 on the chain for evidence, the blockchain Event real-time monitoring program monitors the blockchain transaction corresponding to the weather service call transfer record 1, and stores the weather service call transfer record 1 and the transaction hash, timestamp and other data of the blockchain transaction in the service call transfer table in the database.

[0109] Step 12: When the service consumer no longer needs a certain service application, a service liquidation application can be initiated, triggering the service call summary program. Similarly, a service call summary record is generated based on the trusted data in the database, and the service liquidation contract is called through the blockchain node to complete the liquidation of the service call transaction, and a service call liquidation record is generated and stored on the chain for evidence.

[0110] The service liquidation contract refers to a contract for service application call liquidation based on the service call summary record and the service call prepayment record, which is mainly used by the service call summary program. Compared with the service settlement contract, in addition to the service call settlement function, it also includes a balance refund function.

[0111] The service call settlement record mainly includes information such as call summary ID, service call ID list, service call time period, service consumer ID, service publisher ID, service ID, transaction ID, prepayment ID, transfer amount, and refund amount.

[0112] In this embodiment, specifically: after service consumer B calls the weather service once and decides not to use the service anymore, a weather service settlement application is initiated, triggering the service call summary program. Based on reliable data such as service call record 1 and weather service call prepayment record in the database, a service call summary record is generated. The service settlement contract is called through the blockchain node to complete the settlement of the service call transaction, and the weather service call settlement record is generated and stored on the chain for evidence.

[0113] Among them, the specific information of the weather service call settlement record is (call summary ID: sumc1; service call ID list: {c1}; service call time period: 2023.9.6 12:30:00 - 2023.9.6 23:30:00; service consumer ID: B; service publisher ID: A; service ID: s1; transaction ID: tx1; prepayment ID: m1; transfer amount: 1 yuan; refund amount: 9 yuan).

[0114] Step 13: The blockchain Event real-time monitoring program obtains the latest block, parses the data of the latest block, and then obtains the data on the chain and stores it in the service call settlement table in the database. Here, the data on the chain is the service call settlement record and the corresponding blockchain transaction hash, timestamp, and other data.

[0115] The service call settlement table refers to the table in the database that stores service call settlement records. In addition to the relevant attributes of the service call settlement record, it also includes data attributes such as blockchain transaction hash and timestamp.

[0116] In this embodiment, specifically: after the Jianmu Cloud platform stores the weather service call settlement record on the chain for evidence, the blockchain Event real-time monitoring program monitors the blockchain transaction corresponding to the weather service call settlement record, and stores the weather service call settlement record and the transaction hash, timestamp, and other data of the blockchain transaction in the service call settlement table in the database.

[0117] This embodiment realizes the monitoring and warehousing of reliable data on the chain based on blockchain monitoring technology, and at the same time splits the call record summary function into off-chain operations, reducing the computing pressure on smart contracts, and then realizing high-performance and high-stability batch summary and settlement functions based on reliable data; it solves the problems of large computing pressure, low performance, and poor stability caused by excessive reliance on smart contracts for batch call record summary, transfer settlement, and other operations.

[0118] An embodiment of the present invention further provides a service settlement device based on blockchain trusted monitoring data, including one or more processors. An executable code is stored in the memory. When the processor executes the executable code, it is used to implement the service settlement method based on blockchain trusted monitoring data in the above embodiment. Taking software implementation as an example, as a logically meaningful device, it is formed by the processor of any device with data processing capabilities reading the corresponding computer program instructions in the non-volatile memory into the memory and running. From a hardware perspective, in addition to the processor, memory, network interface, and non-volatile memory, any device with data processing capabilities where the device in the embodiment is located usually includes other hardware according to the actual functions of the device with data processing capabilities, which will not be elaborated here.

[0119] An embodiment of the present invention further provides a computer-readable storage medium, on which a program is stored. When the program is executed by the processor, it implements the service settlement method based on blockchain trusted monitoring data in the above embodiment: The computer-readable storage medium can be an internal storage unit of any device with data processing capabilities in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card (Flash8 Card), etc. equipped on the device. Further, the computer-readable storage medium can also include both the internal storage unit of any device with data processing capabilities and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by any device with data processing capabilities, and can also be used to temporarily store the data that has been output or will be output.

[0120] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.

Claims

1. A service settlement method based on blockchain trusted monitoring data, characterized in that, The service settlement method includes: (1) The service publisher publishes a service application on the service invocation platform and deploys the service in a Kubernetes cluster. The interaction between services in the cluster and the traffic forwarding in the cluster are managed by Istio technology; (2) The service invocation platform generates a service publication record of the service publisher and stores it on the blockchain node for evidence preservation; (3) The service invocation platform generates a service invocation transaction record of the service consumer and stores it on the blockchain node for evidence preservation; (4) Based on the service invocation transaction record, verify whether the funds of the service consumer meet the requirements of this service invocation transaction. If so, generate a service invocation prepayment record and store it on the blockchain for evidence preservation; (5) Through a service invocation monitoring program based on Istio proxy technology, real-time monitor and obtain the invocation details information of each service, generate a service invocation record, and store it on the blockchain node for evidence preservation; Among them, after steps (2)-(5), the following operations are performed before proceeding to the next step: Obtain specific on-chain trusted data through blockchain listening technology and data parsing and store it in a database as the monitored blockchain trusted data; (6) Based on the monitored blockchain trusted data in the database, summarize and generate a service invocation summary record, complete the service invocation transaction settlement, and generate a service invocation transfer record and store it on the blockchain for evidence preservation; (7) Obtain specific on-chain trusted data through blockchain listening technology and data parsing and store it in a database.

2. The service settlement method based on blockchain-trusted monitored data according to claim 1, wherein After step (2), the following operations are performed before proceeding to step (3): Based on the blockchain Event real-time listening program, obtain the latest block and perform data parsing on it, and then obtain the on-chain data and store it in the service publication table of the database. The on-chain data includes the service publication record generated in step (2) and the corresponding blockchain transaction hash and timestamp; After step (3), the following operations are performed before proceeding to step (4): Based on the blockchain Event real-time listening program, obtain the latest block and perform data parsing on it, and then obtain the on-chain data and store it in the service invocation transaction table of the database. The on-chain data includes the data of the service invocation transaction record generated in step (3) and the corresponding blockchain transaction hash and timestamp; After step (4), the following operations are performed before proceeding to step (5): Based on the blockchain Event real-time listening program, obtain the latest block and perform data parsing on it, and then obtain the on-chain data and store it in the service invocation prepayment record table of the database. The on-chain data includes the service invocation prepayment record generated in step (4) and the corresponding blockchain transaction hash and timestamp; After step (5), the following operations are performed before proceeding to step (6): Based on the blockchain Event real-time listening program, obtain the latest block and perform data parsing on it, and then obtain the on-chain data and store it in the service invocation table of the database. The on-chain data includes the service invocation record generated in step (5) and the corresponding blockchain transaction hash and timestamp; Step (7) specifically is: Based on the blockchain Event real-time monitoring program, obtain the latest block and perform data parsing on it, and then obtain the data uploaded to the chain and store it in the service call transfer table in the database. The data uploaded to the chain includes the service call transfer record generated in step (6), the corresponding blockchain transaction hash, and the timestamp.

3. The service settlement method based on blockchain-trusted monitored data according to claim 1, wherein, In step (2), the service publication record includes the service ID, service name, service label, service publisher ID, service API interface, service parameters, publication time, service version, service function description, service call transaction rules. The blockchain node uploads and stores the evidence on the chain by calling the service publication contract. The service publication contract refers to the contract for storing the service publication record on the blockchain for the use of the service publisher.

4. The service settlement method based on blockchain-trusted monitored data according to claim 1, wherein In step (3), the service call transaction record includes the transaction ID, service consumer ID, service publisher ID, service ID, service call transaction rules, service version, service call link, service publication time, service transaction time. The blockchain node uploads and stores the evidence on the chain by calling the service transaction contract. The service transaction contract refers to the contract for storing the service call transaction record on the blockchain for the use of the service consumer.

5. The service settlement method based on blockchain-trusted monitored data according to claim 1, characterized in that In step (4), if the funds of the service consumer are insufficient for this service call transaction, prompt the service consumer that the funds are insufficient and please recharge. After uploading and storing the evidence on the chain, trigger the fund prepayment contract. The fund prepayment contract refers to the contract for completing the account fund prepayment operation in the blockchain, including the fund balance review, the deposit of the service call prepayment record, and the account fund prepayment. The service call prepayment record includes the prepayment ID, transaction ID, prepayment amount, service publisher ID, service consumer ID.

6. The service settlement method based on blockchain-trusted monitored data according to claim 1, wherein In step (5), the blockchain node uploads and stores the service call record on the chain by calling the service call contract. The service call contract refers to the contract for storing the service call record on the chain for the use of the service call monitoring program. The service call record includes the service call ID, prepayment ID, transaction ID, service ID, service publisher ID, service consumer ID, call details, whether the call is successful, and the call time.

7. The service settlement method based on blockchain-trusted monitored data according to claim 1, characterized in that In step (6), trigger the service call summary program according to the time period, and based on the blockchain trusted data monitored in the database, summarize and generate the service call summary record. The service call summary record includes the call summary ID, service call ID list, service call time period, service consumer ID, service publisher ID, service ID, transaction ID, prepayment ID, and number of successful calls. The blockchain node completes the service call transaction settlement by calling the service settlement contract. The service settlement contract refers to the contract for performing service application call settlement based on the service call summary record and the service call prepayment record for the use of the service call summary program. The service call transfer record includes the call summary ID, service call ID list, service call time period, service consumer ID, service publisher ID, service ID, transaction ID, prepayment ID, and transfer amount.

8. The service settlement method based on blockchain-trusted monitored data according to claim 7, characterized in that The service settlement method further includes: (8) When the service consumer no longer needs any service application, a service liquidation application can be initiated to trigger the service call summary program. Similarly, a service call summary record is generated based on the trusted data in the database, and the service liquidation contract is called through the blockchain node to complete the liquidation of the service call transaction, and the service call liquidation record is generated and stored on the blockchain for evidence. The service liquidation contract refers to a contract for liquidating service application calls based on the service call summary record and the service call prepayment record, which is used by the service call summary program. Compared with the service settlement contract, in addition to the service call settlement function, it also includes a balance refund function. The service call liquidation record includes the call summary ID, service call ID list, service call time period, service consumer ID, service publisher ID, service ID, transaction ID, prepayment ID, transfer amount, and refund amount. (9) Based on the blockchain Event real-time monitoring program, the latest block is obtained and its data is parsed, and then the data on the chain is obtained and stored in the service call liquidation table in the database. Here, the data on the chain is the service call liquidation record and the corresponding blockchain transaction hash and timestamp.

9. A service settlement device based on blockchain trusted monitoring data, including a memory and one or more processors. Executable code is stored in the memory. When the one or more processors execute the executable code, it is used to implement the service settlement method based on blockchain trusted monitoring data according to any one of claims 1-8.

10. A computer-readable storage medium, on which a program is stored. When the program is executed by a processor, it is used to implement the service settlement method based on blockchain trusted monitoring data according to any one of claims 1-8.

Citation Information

Patent Citations

  • Communication settlement method

    CN109840845A

  • Block chain-based transaction information verification and settlement method

    CN113781048A

  • Account collection record processing method and system based on block chain smart contract

    CN109961365A

  • Prepayment consumption management method and system based on block chain and storage medium

    CN110163595A