Business data processing method and device based on block chain, equipment and storage medium
By using a blockchain-based business data processing method, the problems of incomplete content and low efficiency in the invoice issuance process have been solved, and automated transaction contract updates and electronic invoice generation have been achieved, improving invoicing efficiency and transaction speed.
Patent Information
- Application Number
- CN202411361942.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Existing technologies suffer from incomplete or non-standard invoice information during the invoice issuance process, resulting in low invoice issuance efficiency and the need for manual assistance, further contributing to inefficiency.
A blockchain-based business data processing method is adopted to predict prices by acquiring business data to be traded, generate initial transaction contracts, update contracts based on feedback information, and finally generate electronic invoices. The blockchain is used for data verification and on-chain processing.
It improved invoicing efficiency, reduced the number of information exchanges, accelerated transaction completion time, and reduced manual input and error rates.
Smart Images

Figure CN119338539A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a blockchain-based business data processing method, device, equipment and storage medium. Background Art
[0002] In today's digital age, the issuance and management of financial invoices has become an indispensable part of corporate operations. With the advancement of "Internet +" technology and the development of the market, electronic invoices have gradually replaced traditional paper invoices and become the mainstream form of invoices. The current form of invoicing requires manual assistance. However, when the workload of invoicing is large, problems such as incomplete, non-standard or unclear invoice content may occur, such as missing purchaser information, unclear product or service names, etc., and the invoicing efficiency during the invoicing process is not high. Summary of the invention
[0003] The embodiments of the present application provide a blockchain-based business data processing method, device, equipment and storage medium, which can improve the efficiency of invoicing.
[0004] On the one hand, an embodiment of the present application provides a business data processing method based on blockchain, the method comprising:
[0005] Acquire the business data to be traded sent by the first object, perform price prediction on the business data to be traded, obtain the predicted transaction price of the business data to be traded, generate an initial transaction contract based on the predicted transaction price and the business data to be traded, and send the initial transaction contract to the first object, so that the first object generates feedback information based on the initial transaction contract;
[0006] Acquire feedback information sent by the first object, predict contract update data that meets the transaction rate condition based on the feedback information, and update the initial transaction contract based on the contract update data to obtain an updated transaction contract;
[0007] Generate a transaction order based on the updated transaction contract, send the transaction order to the first object, and send the first invoicing key data in the transaction order to the invoicing node in the blockchain, so that the invoicing node generates a first block to be uploaded to the blockchain based on the first invoicing key data; the transaction order includes the updated transaction contract and the contract signature generated for the updated transaction contract;
[0008] When it is detected that the second block to be chained has been created in the invoicing node, the transaction data and transaction signature in the second block are verified; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block;
[0009] If it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the first block and the second block are sequentially chained, a first electronic bill corresponding to the transaction order is generated based on the chained first block, the first electronic bill is sent to the first object, and the account balance of the first object and the account balance of the main object in the state tree in the blockchain are updated based on the chained second block.
[0010] On the one hand, an embodiment of the present application provides a business data processing device based on blockchain, the device comprising:
[0011] A contract generation module, configured to obtain the business data to be traded sent by the first object, perform price prediction on the business data to be traded, obtain the predicted transaction price of the business data to be traded, generate an initial transaction contract based on the predicted transaction price and the business data to be traded, and send the initial transaction contract to the first object, so that the first object generates feedback information based on the initial transaction contract;
[0012] A contract update module, configured to obtain feedback information sent by the first object, predict contract update data that meets the transaction rate condition based on the feedback information, and update the initial transaction contract based on the contract update data to obtain an updated transaction contract;
[0013] A block creation module, configured to generate a transaction order based on the updated transaction contract, send the transaction order to the first object, and send the first invoicing key data in the transaction order to the invoicing node in the blockchain, so that the invoicing node generates a first block to be uploaded to the blockchain based on the first invoicing key data; the transaction order includes the updated transaction contract and the contract signature generated for the updated transaction contract;
[0014] A data verification module is used to verify the transaction data and transaction signature in the second block when it is detected that the second block to be chained has been created in the invoicing node; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block;
[0015] The bill generation module is used to, if it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, then sequentially chain the first block and the second block, generate a first electronic bill corresponding to the transaction order based on the chained first block, send the first electronic bill to the first object, and update the account balance of the first object and the account balance of the main object in the state tree in the blockchain based on the chained second block.
[0016] In a possible implementation, when the contract generation module is used to generate an initial transaction contract based on the predicted transaction price and the business data to be traded, the contract generation module is specifically used to perform the following operations:
[0017] Obtaining the contract template associated with the to-be-traded business data from the business template library, and generating a Gaussian noise image according to the contract template and the initial noise data;
[0018] The predicted transaction price and the business data to be traded are semantically expanded through a large language model to obtain an instruction text;
[0019] The Gaussian noise image and the instruction text are input into the Wensheng graph model, the Gaussian noise image is feature extracted by the Wensheng graph model to obtain Gaussian noise features, and the Gaussian noise features are forward diffused to obtain a forward noise vector;
[0020] The feature encoding of the instruction text is performed through the text graph model to obtain the text encoding feature. The Gaussian noise image is denoised according to the forward noise vector and the text encoding feature to obtain the initial transaction contract.
[0021] In a possible implementation, when the contract update module is used to predict the contract update data that meets the transaction rate condition based on the feedback information, the contract update module is specifically used to perform the following operations:
[0022] Perform semantic analysis on the feedback information to obtain feedback semantic data, and generate the object demand price based on the feedback semantic data;
[0023] Obtain price update parameters, and generate M transaction prices to be updated based on the object demand price, predicted transaction price and price update parameters; M is a positive integer;
[0024] Obtaining M historical transaction behavior data corresponding to the transaction prices to be updated, respectively, and performing feature extraction on the M historical transaction behavior data to obtain M historical transaction behavior features;
[0025] Extract features of the transaction business data to obtain features of the transaction business, perform cross-attention processing on the transaction business features and M historical transaction behavior features, and obtain M cross-attention scores;
[0026] Determine an attention score threshold based on the transaction rate condition, and form a cross-attention sequence with the cross-attention scores greater than or equal to the attention score threshold among the M cross-attention scores; the cross-attention sequence includes N cross-attention scores, where N is a positive integer less than or equal to M;
[0027] Obtain the transaction prices to be updated corresponding to the N cross-attention scores respectively, and determine the largest transaction price to be updated among the N transaction prices to be updated as the contract update data.
[0028] In a possible implementation, the contract update module is used to update the initial transaction contract based on the contract update data. When the updated transaction contract is obtained, the contract update module is specifically used to perform the following operations:
[0029] Perform image recognition on the initial transaction contract to obtain an image recognition result, and perform text feature extraction on the image recognition result to obtain initial text features;
[0030] Performing character segmentation on the initial text features to obtain character segmentation features, performing character recognition on the character segmentation features to obtain text information, typeset the text information, and obtain text parsing results;
[0031] Determine the fields to be updated that match the predicted transaction price in the text parsing results, replace the fields to be updated with the contract update data in the text parsing results to obtain an updated text parsing result, merge the non-text layer corresponding to the initial transaction contract with the updated text parsing result to obtain an updated transaction contract; the non-text layer refers to the image of the initial transaction contract after the text parsing result is removed.
[0032] In a possible implementation, when the bill generation module is used to generate a first electronic bill corresponding to a transaction order based on the first block on the chain, the bill generation module is specifically used to perform the following operations:
[0033] Acquire the first invoicing key data for the transaction order in the first block on the chain, and generate a first invoicing instruction for the first invoicing key data; the first invoicing instruction includes the first invoicing key data;
[0034] The first invoicing instruction is sent to the invoicing processing component, so that the invoicing processing component adds the first invoicing instruction to the invoicing processing sequence; the first invoicing instruction is located at the end of the invoicing processing sequence; the invoicing processing component is used to perform invoicing processing on each invoicing instruction in the invoicing processing sequence according to the sorting position of the invoicing instructions in the invoicing processing sequence;
[0035] A processing result of the invoicing processing component on the first invoicing instruction is obtained, and the processing result is determined as a first electronic bill corresponding to the transaction order.
[0036] In a possible implementation, the bill generation module is further configured to perform the following operations:
[0037] Performing an urgency test on the transaction order corresponding to the first invoicing instruction to obtain an urgency value corresponding to the transaction order;
[0038] If the urgency value is greater than or equal to the urgency threshold, a priority invoicing processing request for the transaction order is generated, and the priority invoicing processing request is sent to the first processing node, so that the first processing node generates an invoicing processing notification for the priority invoicing processing request;
[0039] When the invoicing processing notification indicates that the priority invoicing processing request is passed, the invoicing processing component is notified to move the sorting position of the first invoicing instruction to the first position in the invoicing processing sequence.
[0040] In a possible implementation, the bill generation module is used to perform an urgency detection on the transaction order corresponding to the first billing instruction. When the urgency value corresponding to the transaction order is obtained, the bill generation module is specifically used to perform the following operations:
[0041] Determine an influencing factor affecting the urgency of the transaction order corresponding to the first invoicing instruction, obtain urgency impact data associated with the influencing factor from the transaction order, input the urgency impact data into an urgency assessment model, perform feature extraction on the urgency impact data based on the urgency assessment model, and obtain impact data features;
[0042] Obtain B urgency tags and the tag degree values corresponding to the B urgency tags, perform feature extraction on the B urgency tags, and obtain a tag feature sequence containing B tag features; B is a positive integer;
[0043] Cross-attention processing is performed on the influencing data features and label feature sequences to obtain an urgency attention sequence containing B attention scores, the urgency label corresponding to the largest attention score in the urgency attention sequence is determined as the target urgency label, and the label degree value corresponding to the target urgency label is determined as the urgency value corresponding to the transaction order; the B urgency labels include the target urgency label.
[0044] In a possible implementation, the blockchain-based business data processing device further includes a bill approval module, which is specifically used to perform the following operations:
[0045] When receiving the second electronic bill sent by the second object, obtaining the second invoicing key data in the second electronic bill, performing block traversal in the blockchain based on the second invoicing key data, and determining that the legitimacy check for the second electronic bill has passed if the target block containing the second invoicing key data is traversed;
[0046] Acquire the third object indicated in the second invoicing key data, and if the third object is an associated object of the main object, determine that the compliance check for the second electronic invoice passes;
[0047] If the legality check and the compliance check for the second electronic bill are both passed, the transaction value corresponding to the second electronic bill is obtained from the target block;
[0048] The account address of the second object is obtained, the asset to be transferred corresponding to the transaction value is obtained from the digital assets corresponding to the account of the main object, and the asset to be transferred is transferred to the account address of the second object.
[0049] In a possible implementation, the blockchain-based business data processing device further includes a business processing module, which is specifically used to perform the following operations:
[0050] Acquire an electronic bill set associated with the main object, and acquire transaction flow information of the account corresponding to the main object; the electronic bill set includes a first electronic bill and a second electronic bill;
[0051] The electronic bill set is verified by transaction flow information, and the electronic bills in the electronic bill set that pass the data verification are determined as actual electronic bills;
[0052] Generate financial statements for master objects based on actual electronic invoices.
[0053] In a possible implementation, when the business processing module is used to generate a financial statement for a primary object based on an actual electronic invoice, the business processing module is specifically used to perform the following operations:
[0054] The actual electronic bills are classified according to the bill type, and P expenditure electronic bills and Q income electronic bills are obtained; P and Q are both positive integers;
[0055] Extracting expenditure transaction data and business types corresponding to the expenditure transaction data from P expenditure electronic receipts respectively, and adding first-type characters to the P expenditure transaction data respectively, to obtain P updated expenditure transaction data; the first-type characters are used to represent the data type of the updated expenditure transaction data;
[0056] Respectively extracting the income transaction data from Q income electronic receipts and the business types corresponding to the income transaction data, respectively adding the second type of characters to the Q income transaction data, to obtain Q updated income transaction data; the second type of characters are used to represent the data type of the updated income transaction data;
[0057] Drawing processing is performed on the P updated expenditure transaction data, the business types corresponding to the P updated expenditure transaction data, the Q updated income transaction data, and the business types corresponding to the Q updated income transaction data to obtain a financial statement for the main object.
[0058] In a possible implementation, the service processing module is further configured to perform the following operations:
[0059] Obtaining a business analysis request, obtaining a business analysis template indicated by the business analysis request from a business template library based on the business analysis request, and inputting the business analysis request, the financial statement, and the business analysis template into a large language model;
[0060] The business analysis request is semantically parsed through a large language model to obtain business semantic information, and the initial business analysis results for the business analysis request are generated based on the business semantic information and financial statements;
[0061] Determine A to-be-supplemented fields in the business analysis template, obtain context information of the A to-be-supplemented fields respectively, segment the initial business analysis result based on the A context information, and obtain business analysis fields corresponding to the A to-be-supplemented fields respectively; A is a positive integer;
[0062] In the business analysis template, the A fields to be supplemented are replaced with business analysis fields corresponding to the A fields to be supplemented, respectively, to obtain a target business analysis result for the business analysis request.
[0063] On the one hand, an embodiment of the present application provides a computer device, including a processor, a memory, and an input and output interface;
[0064] The processor is connected to the memory and the input / output interface respectively, wherein the input / output interface is used to receive and output data, the memory is used to store a computer program, and the processor is used to call the computer program so that a computer device including the processor executes the method in one aspect of an embodiment of the present application.
[0065] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method in one aspect of the embodiment of the present application.
[0066] In one aspect, an embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional ways in one aspect of the embodiment of the present application. In other words, when the computer instruction is executed by the processor, the method provided in various optional ways in one aspect of the embodiment of the present application is implemented.
[0067] Implementing the embodiments of the present application will have the following beneficial effects:
[0068] In an embodiment of the present application, the business data to be traded sent by the first object is obtained, a price prediction is performed on the business data to be traded to obtain a predicted transaction price of the business data to be traded, an initial transaction contract is generated based on the predicted transaction price and the business data to be traded, and the initial transaction contract is sent to the first object, so that the first object generates feedback information based on the initial transaction contract; the feedback information sent by the first object is obtained, contract update data that meets the transaction rate condition is predicted based on the feedback information, and the initial transaction contract is updated based on the contract update data to obtain an updated transaction contract; a transaction order is generated based on the updated transaction contract, and the transaction order is sent to the first object, and the first invoicing key data in the transaction order is sent to the invoicing node in the blockchain, so that the invoicing node generates a first block to be chained based on the first invoicing key data; the transaction order includes updating the transaction contract The same as the contract signature generated for the updated transaction contract; when it is detected that the second block to be chained has been created in the invoicing node, the transaction data and transaction signature in the second block are verified; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block; if it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the first block and the second block are chained in turn, and the first electronic bill corresponding to the transaction order is generated based on the first block that has been chained, the first electronic bill is sent to the first object, and the account balance of the first object and the account balance of the main object in the state tree of the blockchain are updated based on the second block that has been chained. Through the above process, the transaction price is predicted based on the business data to be traded, and the initial transaction contract is generated based on the predicted transaction price. The initial transaction contract is directly sent to the first object to obtain feedback information, and the initial transaction contract is updated based on the feedback information to obtain an updated transaction contract, thereby saving unnecessary multiple information exchange processes and accelerating the transaction completion time; after the transaction order is generated, the corresponding first block to be chained is generated based on the first invoicing key data corresponding to the transaction order, so that when it is detected that the second block (including transaction data for the transaction order) has been created, that is, when the first object agrees to the transaction order, the two blocks can be directly chained to obtain the corresponding electronic invoice, thereby improving the invoicing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 This is a network interaction architecture diagram provided by an embodiment of the present application;
[0071] Figure 2 This is a scenario diagram of a business data processing method based on blockchain provided in an embodiment of the present application;
[0072] Figure 3 This is a flowchart of a business data processing method based on blockchain provided in an embodiment of the present application. Figure 1 ;
[0073] Figure 4 This is a flowchart of a business data processing method based on blockchain provided in an embodiment of the present application. Figure 2 ;
[0074] Figure 5 This is a schematic diagram of a business data processing device based on blockchain provided in an embodiment of the present application;
[0075] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0077] Among them, if it is necessary to collect object (such as user, etc.) data in this application, a prompt interface or pop-up window will be displayed before or during the collection. The prompt interface or pop-up window is used to prompt the user that certain data is currently being collected. Only after the user confirms the prompt interface or pop-up window, the relevant steps of data acquisition will be started, otherwise the process will end. Moreover, the acquired user data will be used in reasonable and legal scenarios or purposes. Optionally, in some scenarios where user data needs to be used but has not been authorized by the user, authorization can be requested from the user, and the user data can be used when the authorization is passed.
[0078] It is understandable that in the specific implementation of this application, the user data involved, when the following embodiments of this application are applied to specific products or technologies, needs to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of the relevant regions.
[0079] In the examples of this application, see Figure 1 , Figure 1It is a network interaction architecture diagram provided by the embodiment of the present application. Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism and encryption algorithm. It is mainly used to organize data in chronological order and encrypt it into an account book so that it cannot be tampered with or forged, and can verify, store and update data at the same time. Blockchain is essentially a decentralized database. Each node in the database stores an identical blockchain. The blockchain network divides nodes into core nodes, data nodes and light nodes, where the core node is responsible for the consensus of the entire blockchain network, that is, the core node is the consensus node in the blockchain network. For the process of data or generated blocks being written into the account book in the blockchain network, it can be that the client sends data or generated blocks to data nodes or light nodes, and then the data or generated blocks are passed between data nodes or light nodes in the blockchain network in a relay manner until the consensus node receives the data or generated blocks, and the consensus node then packs the data into blocks, and reaches consensus with other consensus nodes. After the consensus is passed, the blocks carrying the data are written into the account book.
[0080] like Figure 1 As shown, the network architecture may include a core node cluster 101, a data node cluster 102, and a user terminal cluster 103. Figure 1 As shown, the core node cluster 101 may include core nodes 101a, core nodes 101b, ..., core nodes 101n, the data node cluster 102 may specifically include data nodes 102a, data nodes 102b, ..., data nodes 102n, and the user terminal cluster 103 may specifically include user terminals 103a, user terminals 103b, ..., user terminals 103n.
[0081] like Figure 1 As shown, user terminal 103a, user terminal 103b, ..., user terminal 103n can respectively establish network connections with data node 102a, data node 102b, ..., data node 102n, so that the user terminal can perform data interaction with the data node through the network connection; data node 102a, data node 102b, ..., data node 102n can respectively establish network connections with core node 101a, core node 101b, ..., core node 101n, so that the data node can perform data interaction with the core node through the network connection; data node 102a, data node 102b, ..., data node 102n are connected to each other so that data nodes can perform data interaction, and core node 101a, core node 101b, ..., core node 101n are connected to each other so that core nodes can perform data interaction.
[0082] Taking the user terminal 103a, the data node 102a and the core node 101a as an example, the data node 102a can receive the data sent by the user terminal 103a, and the data node 102a can package the data to generate a block, and send the block to the core node 101a through the data node cluster 102; then, the core node 101a can send the above blocks to other core nodes in the blockchain network where it is located according to the node identifiers of other core nodes (i.e., consensus nodes) in the blockchain network, and the other core nodes will verify the newly generated blocks (i.e., reach consensus), and add the above blocks to the ledger to which they belong after the verification is completed. Among them, each core node in the blockchain network has a node identifier corresponding to it, and each core node in the blockchain network can store the node identifiers of other core nodes in the blockchain network, so that the generated block can be broadcast to other core nodes in the blockchain network according to the node identifiers of other core nodes. Other core nodes will reach a consensus on the newly generated block and add the newly generated block to the ledgers of other core nodes after the consensus is passed. In this way, the transaction data stored on all core nodes in the blockchain network are consistent.
[0083] For ease of understanding, the user terminal corresponding to the first object (ie, the user) may be Figure 1 The user terminal 103b shown in the figure, the user terminal corresponding to the main object can be Figure 1 The user terminal 103a shown. Both the user terminal 103a and the user terminal 103b can be installed with a resource client, which can be used to implement the resource management business function and realize the communication connection with the decentralized application client based on the resource management business function. Among them, the resource client is a tool for managing and storing user digital assets. For example, digital assets can be transferred to other accounts based on the resource client, and digital assets transferred from other accounts can be received based on the resource client. The resource client can be a hardware device or a software program. It is understandable that with the widespread deployment of various decentralized applications on the blockchain, the user's activities on the blockchain have increased. When using decentralized applications, general users can use the blockchain key management tool to log in. The address in the blockchain key management tool corresponds to a user on the blockchain. The decentralized application can obtain the user address from the key management tool through some interfaces.
[0084] The user terminal 103a can obtain the business data to be traded sent by the first object (user terminal 103b), wherein the business data to be traded may include items that the first object needs to rent or purchase from the main object corresponding to the user terminal 103a, as well as the quantity of items, etc. The user terminal 103a can predict the price of the business data to be traded through the price list prepared in advance by the main object or the trained pricing prediction model, and obtain the predicted transaction price of the business data to be traded. An initial transaction contract can be generated based on the predicted transaction price and the business data to be traded, and the initial transaction contract can be sent to the user terminal 103b corresponding to the first object. After receiving the initial transaction contract, the first object can read and determine the transaction content and predicted transaction price, etc., and generate a feedback information based on the initial transaction contract, and send the feedback information to the user terminal 103a. Among them, when the first object has doubts about the predicted transaction price (for example, it is believed that the predicted transaction price does not meet psychological expectations), the feedback information may include feedback on the predicted transaction price (for example, it is believed that the predicted transaction price is too high, and a price reduction is requested or an expected transaction price is fed back, etc.).
[0085] The user terminal 103a can obtain the feedback information sent by the first object, and predict the contract update data that meets the transaction rate condition based on the feedback information. For example, the user terminal 103a can determine a transaction price that satisfies a certain transaction rate condition (for example, the expected transaction rate reaches 85%) and greatly satisfies its own benefits based on the feedback information and the predicted transaction price, and determine it as the contract update data. The initial transaction contract can be updated based on the contract update data to obtain an updated transaction contract. The user terminal 103a can generate a transaction order based on the updated transaction contract, send the transaction order to the first object, and send the first invoicing key data in the transaction order to the invoicing node in the blockchain (for example, it can be Figure 1The data node 102a shown in ) is used to enable the invoicing node to generate the first block to be chained based on the first invoicing key data. Among them, the transaction order includes an updated transaction contract and a contract signature generated for the updated transaction contract. The transaction order can be a transaction invitation including an updated transaction contract and a contract signature generated for the updated transaction contract. That is, when the first object agrees to the transaction invitation, the transaction can take effect. When the user terminal 103a detects that the second block to be chained has been created in the invoicing node, that is, after the first object agrees to the transaction order (or signs an updated transaction contract), the user terminal 103b can send the transaction information for the transaction order (including the transaction order, the transaction data and transaction signature for the transaction order, etc.) to the invoicing node. The invoicing node can determine the block hash of the first block as the parent block hash, generate a block body based on the transaction information, and create a second block based on the parent block hash and the block body. At this time, the second block can be detected in the invoicing node. The user terminal 103a can verify the transaction data and transaction signature in the second block; wherein the transaction data is used to indicate the transfer of the transaction funds in the account address of the first object to the account address of the main object (the object corresponding to the user terminal 103a). If it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the first block and the second block are sequentially chained, and the first electronic bill corresponding to the transaction order is generated based on the chained first block, and the first electronic bill is sent to the first object, and the account balance of the first object and the account balance of the main object in the state tree of the blockchain are updated based on the chained second block.
[0086] It is understandable that the user terminal mentioned in the embodiment of the present application may also be a computer device, and the computer device in the embodiment of the present application includes but is not limited to a terminal device or a server. In other words, the computer device may be a server or a terminal device, or a system composed of a server and a terminal device. Among them, the terminal device mentioned above may be an electronic device, including but not limited to a mobile phone, a tablet computer, a desktop computer, a laptop computer, a PDA, a vehicle-mounted device, an augmented reality / virtual reality (AR / VR) device, a helmet display, a smart TV, a wearable device, a smart speaker, a digital camera, a camera and other mobile Internet devices (mobile internet device, MID) with network access capability, or terminal devices in scenarios such as trains, ships, and flights. Among them, the server mentioned above may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, vehicle-road collaboration, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0087] Through the above process, the transaction price is predicted based on the business data to be traded, and the initial transaction contract is generated based on the predicted transaction price. The initial transaction contract is directly sent to the first object to obtain feedback information, and the initial transaction contract is updated based on the feedback information to obtain an updated transaction contract, thereby saving unnecessary multiple information exchange processes, improving transaction efficiency, and accelerating transaction completion time; after the transaction order is generated, the corresponding first block to be chained is generated based on the first invoicing key data corresponding to the transaction order, so that when it is detected that the second block (including transaction data for the transaction order) has been created, that is, when the first object agrees to the transaction order, the two blocks can be quickly and directly processed on the chain, thereby obtaining the corresponding electronic invoice, thereby improving the invoicing efficiency.
[0088] For details, see Figure 2 , Figure 2 Schematic diagram of a business data processing method based on blockchain provided by an embodiment of the present application. Figure 2As shown, the user terminal 103a can obtain the business data to be traded sent by the user terminal 103b (first object), perform price prediction on the business data to be traded to obtain a predicted transaction price, generate an initial transaction contract 201 based on the predicted transaction price and the business data to be traded, and send the initial transaction contract 201 to the user terminal 103b. After the user terminal 103b receives the initial transaction contract 201, feedback information can be generated based on the initial transaction contract 201, and the feedback information can be sent to the user terminal 103a. After the user terminal 103a receives the feedback information, it can predict the contract update data that meets the transaction rate condition based on the feedback information, and update the initial transaction contract 201 based on the contract update data to obtain an updated transaction contract 202. A transaction order is generated based on the updated transaction contract 202, wherein the transaction order includes the updated transaction contract and the contract signature generated for the updated transaction contract. The user terminal 103a can send the transaction order to the user terminal 103b, and send the first invoicing key data in the transaction order to the invoicing node in the blockchain (for example, it can be Figure 1 The data node 102a shown in FIG. 10A ) enables the billing node to generate a first block to be chained (for example, block 203 ) based on the first billing key data.
[0089] When it is detected that the second block to be chained has been created in the invoicing node (for example, it can be block 204), that is, when the user terminal 103b receives the above-mentioned transaction order, after the first object agrees to carry out the transaction order, the user terminal 103b can send the transaction information (including transaction data and transaction signature) corresponding to the transaction order to the above-mentioned invoicing node, so that the invoicing node can create a second block based on the transaction information. At this time, the user terminal 103a can detect that the second block to be chained has been created in the invoicing node, and can verify the transaction data and transaction signature in the second block. Among them, the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object; the parent block hash in the block header of the second block is the block hash of the first block. If it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the first block and the second block are sequentially chained, that is, the invoicing node (data node 102a) sends block 203 and block 204 to the core node (consensus node) for consensus, and after the consensus is completed, the above blocks (including block 203 and block 204) are added to the ledger to which they belong, that is, block 203 and block 204 in blockchain 205 have been chained. User terminal 103a can generate a first electronic bill corresponding to the transaction order based on the first block that has been chained, send the first electronic bill to the first object (user terminal 103b), and update the account balance of the first object and the account balance of the main object in the state tree in blockchain 205 based on the second block that has been chained.
[0090] Through the above process, the transaction price is predicted based on the business data to be traded, and the initial transaction contract is generated based on the predicted transaction price. The initial transaction contract is directly sent to the first object to obtain feedback information, and the initial transaction contract is updated based on the feedback information to obtain an updated transaction contract, thereby saving unnecessary multiple information exchange processes, improving transaction efficiency, and accelerating transaction completion time; after the transaction order is generated, the corresponding first block to be chained is generated based on the first invoicing key data corresponding to the transaction order, so that when it is detected that the second block (including transaction data for the transaction order) has been created, that is, when the first object agrees to the transaction order, the two blocks can be quickly and directly processed on the chain, thereby obtaining the corresponding electronic invoice, thereby improving the invoicing efficiency.
[0091] For further information, see Figure 3 , Figure 3 This is a flowchart of a business data processing method based on blockchain provided in an embodiment of the present application. Figure 1 The blockchain-based business data processing method can be executed by a computer device, which can be Figure 1Any user terminal in the user terminal device cluster shown. The following will take the data processing method executed by a computer device as an example for explanation. The data processing method may at least include the following steps S301-S305:
[0092] Step S301, obtain the business data to be traded sent by the first object, perform price prediction on the business data to be traded, obtain the predicted transaction price of the business data to be traded, generate an initial transaction contract based on the predicted transaction price and the business data to be traded, and send the initial transaction contract to the first object, so that the first object generates feedback information based on the initial transaction contract.
[0093] In an embodiment of the present application, a computer device may obtain the business data to be traded sent by the first object, predict the price of the business data to be traded, and obtain the predicted transaction price of the business data to be traded. Among them, the business data to be traded may be the items that the first object needs to purchase or rent and the number of items that need to be purchased or rented. The computer device may obtain the selling price or rental price of a single item set in advance by the party to which the item belongs, and calculate the predicted transaction price of the business data to be traded. Optionally, the computer device may call and train a pricing prediction model, and use the pricing prediction model to predict the price of one or more items included in the business data to be traded to obtain the predicted transaction price of the business data to be traded. The computer device may obtain the contract template associated with the business data to be traded from the business template library, and generate an initial transaction contract based on the contract template, the business data to be traded, and the predicted transaction price through the text graph model. It can be understood that the initial transaction contract also includes the identity information, account information, and signatures of the two parties to the transaction. The computer device may send the initial transaction contract to the first object so that the first object generates feedback information based on the initial transaction contract. That is, after receiving the initial transaction contract, the first business object can check the contract content in the initial transaction contract, generate feedback information based on the contract content, and send the feedback information to the computer device. The feedback information can be opinion information on the predicted transaction price in the initial transaction contract, for example, it can be an expected transaction price proposed by the first object, or it can be information that the predicted transaction price is too high and needs to be discounted or reduced.
[0094] Step S302, obtaining feedback information sent by the first object, predicting contract update data that meets the transaction rate condition based on the feedback information, and updating the initial transaction contract based on the contract update data to obtain an updated transaction contract.
[0095] In an embodiment of the present application, the computer device can obtain the feedback information sent by the first object, and predict the contract update data that meets the transaction rate condition based on the feedback information. It can be understood that in order to maximize the benefits, the contract update data predicted by the computer device can meet certain transaction rate conditions (for example, the probability of reaching a transaction with the first object reaches 90%), and is the highest price among multiple transaction prices that meet the transaction rate conditions. For example, transaction price 2000 and transaction price 2100 can both meet the transaction rate condition of 90%, but because transaction price 2100 is higher than transaction price 2000, transaction price 2100 is determined as contract update data. Further, the computer device updates the initial transaction contract based on the contract update data, that is, replaces the predicted transaction price in the initial transaction contract with the contract update data to obtain an updated transaction contract.
[0096] Step S303, generating a transaction order based on the updated transaction contract, sending the transaction order to the first object, and sending the first invoicing key data in the transaction order to the invoicing node in the blockchain, so that the invoicing node generates a first block to be uploaded to the chain based on the first invoicing key data; the transaction order includes the updated transaction contract and the contract signature generated for the updated transaction contract.
[0097] In an embodiment of the present application, a computer device can generate a transaction order based on an updated transaction contract. The transaction order may include an updated transaction contract and a contract signature generated for the updated transaction contract. Among them, the contract signature is a digital signature obtained by encrypting the contract summary with the private key of the object (main object) corresponding to the computer device, and the contract summary is obtained by hashing the updated transaction contract with a hash function. The computer device can send the transaction order to the first object. The transaction order can be a transaction page. After confirming that the transaction order is correct, the first object can directly click on the button or component indicating the agreement to the transaction on the transaction page to make the transaction order effective. While sending the first invoicing key data in the transaction order to the first object, the computer device also needs to send the transaction order to the invoicing node in the blockchain, so that the invoicing node generates the first block to be chained based on the first invoicing key data. Among them, the first invoicing key data includes the information of the invoicing party (the object corresponding to the computer device) and the invoicing party (the first object), the invoicing business (data for pending transactions), the invoicing amount (contract update data), date, etc.; the first block contains a block header and a block body, the block header contains the version number, the hash value of the previous block in the blockchain, the timestamp, the difficulty value and the random number, etc., and the block body is used to store the hash value of the first invoicing key data.
[0098] Step S304, when it is detected that the second block to be chained has been created in the invoicing node, the transaction data and transaction signature in the second block are verified; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block.
[0099] In an embodiment of the present application, when the computer device detects that the second block to be chained has been created in the invoicing node, the transaction data and transaction signature in the second block can be verified. Among them, the parent block hash in the block header of the second block is the block hash of the first block (the hash value of the first block); the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object (the object corresponding to the computer device). Specifically, the computer device can obtain the storage information in the second block, and the storage information includes transaction data and transaction signatures. The computer device can obtain the transaction funds in the transaction data, and compare the transaction funds with the contract funds in the updated transaction contract (i.e., contract update data). If the two values are the same, it is considered that the transaction funds in the transaction data match the contract funds in the updated transaction contract; further, the computer device obtains the public key of the main object, decrypts the transaction signature through the public key of the main object, obtains the transaction summary corresponding to the transaction signature, and compares the transaction summary with the contract summary mentioned above to verify whether the two are the same.
[0100] Step S305: If it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the first block and the second block are sequentially chained, a first electronic bill corresponding to the transaction order is generated based on the chained first block, the first electronic bill is sent to the first object, and the account balance of the first object and the account balance of the main object in the state tree in the blockchain are updated based on the chained second block.
[0101] In an embodiment of the present application, if the computer device verifies that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the computer device can sequentially chain the first block and the second block, that is, send the first block and the second block in the invoicing node to the consensus node in the blockchain for consensus processing, and after the consensus is completed, the chaining process of the first block and the second block is completed. The computer device can generate a first electronic bill corresponding to the transaction order based on the chained first block, and send the first electronic bill to the first object; the account balance of the first object and the account balance of the main object in the state tree in the blockchain can be updated based on the chained second block, that is, the digital assets corresponding to the transaction funds that the first object needs to pay are transferred from the account of the first object to the account corresponding to the main object to complete the payment operation. Optionally, the computer device may also create a trusted asset certificate (Token) for the digital asset corresponding to the transaction funds, and send the trusted asset certificate to the first object. The trusted asset certificate is used to indicate the first object's payable to the main object (i.e., the digital asset corresponding to the transaction funds). After the digital asset corresponding to the transaction funds in the first object's account balance is transferred to the main object's account balance, the trusted asset certificate can be transferred to the main object's account, indicating that the main object's accounts receivable for the first object have been settled. For example, if the main object sells a product worth 1,000 yuan to the first object, the main object can create a Token of equal value to the first object. This Token represents the 1,000 yuan payable by the first object to the main object. When the first object pays the money, the Token will be transferred to the main object's account, indicating that the accounts receivable have been settled.
[0102] Through the above process, the transaction price is predicted based on the business data to be traded, the initial transaction contract is generated based on the predicted transaction price, the initial transaction contract is directly sent to the first object to obtain feedback information, and the initial transaction contract is updated based on the feedback information to obtain an updated transaction contract, thereby saving unnecessary multiple information exchange processes and accelerating the transaction completion time; after the transaction order is generated, the corresponding first block to be chained is generated based on the first invoicing key data corresponding to the transaction order, so that when it is detected that the second block (including the transaction data for the transaction order) has been created, that is, when the first object agrees to the transaction order, the two blocks can be directly chained to obtain the corresponding electronic invoice, thereby improving the invoicing efficiency. Moreover, the first key invoicing information obtained by the computer device from the transaction order includes all the key data for generating the electronic invoice, thereby reducing the omission rate of manually obtaining the first key invoicing information; the computer device automatically inputs it into the electronic invoice template to generate the final electronic invoice, thereby not only reducing the time of manual input, but also reducing the error rate.
[0103] For further information, see Figure 4 , Figure 4 This is a flowchart of a business data processing method based on blockchain provided in an embodiment of the present application. Figure 2 The blockchain-based business data processing method can be executed by a computer device, which can be Figure 1 Any user terminal in the user terminal device cluster shown. The following will take the data processing method executed by a computer device as an example for explanation. The data processing method may at least include the following steps S401-S408:
[0104] Step S401, obtain the business data to be traded sent by the first object, perform price prediction on the business data to be traded, obtain the predicted transaction price of the business data to be traded, generate an initial transaction contract based on the predicted transaction price and the business data to be traded, and send the initial transaction contract to the first object, so that the first object generates feedback information based on the initial transaction contract.
[0105] In an embodiment of the present application, a computer device may obtain the business data to be traded sent by the first object, predict the price of the business data to be traded, and obtain the predicted transaction price of the business data to be traded. Among them, the business data to be traded may be the items that the first object needs to purchase or rent and the quantity of items that need to be purchased or rented. The computer device may obtain the selling price or rental price of a single item set in advance by the party to which the item belongs, and calculate the predicted transaction price of the business data to be traded. Optionally, the computer device may call and train a pricing prediction model, and use the pricing prediction model to predict the price of one or more items included in the business data to be traded to obtain the predicted transaction price of the business data to be traded. The computer device may obtain the contract template associated with the business data to be traded from the business template library, and generate a Gaussian noise image based on the contract template and the initial noise data; the predicted transaction price and the business data to be traded may be semantically expanded through a large language model to obtain an instruction text; for example, the instruction text may be expressed as "using the predicted transaction price and the business data to be traded as the specific data content of the contract". The computer device can input the Gaussian noise image and the instruction text into the Vincent graph model, and extract the features of the Gaussian noise image through the Vincent graph model to obtain the mean vector and variance vector of the Gaussian noise image. The mean vector can be the average value of all pixel values of the Gaussian noise image on each channel, that is, the first-order statistic of the Gaussian noise image, and the variance vector can be the average value of the variance of the pixel values of each channel, that is, the second-order statistic of the Gaussian noise image. The computer device can randomly sample the mean vector and variance vector of the Gaussian noise image to obtain the potential mean vector and potential variance vector, and generate Gaussian noise features based on the potential mean vector and potential variance vector.
[0106] Furthermore, the computer device obtains the latent variable distribution in the forward diffusion network layer of the Vincent graph model, wherein the latent variable distribution is a conceptual distribution of added noise, for example, it can be a Gaussian distribution. The computer device can continuously add a random noise vector to the Gaussian noise feature in T time steps to obtain a forward noise vector. Wherein, T is a positive integer, the time step refers to the amplitude of adding noise to the Gaussian noise feature based on the latent variable distribution, and the noise can refer to unnecessary or redundant interference information present in the image data. When T is large enough, the forward noise vector can be used to represent an image that completely contains noise. Further, the computer device can feature encode the indication text through the text encoding layer in the Vincent graph to obtain a text encoding feature. Specifically, the computer device can perform text segmentation on the indication text through the text encoding layer to obtain a word element sequence corresponding to the indication text, and encode each word element in the word element sequence corresponding to the indication text to obtain a text encoding feature. Wherein, a word element in the word element sequence refers to the smallest basic unit obtained after the target frame text is segmented. The method of text segmentation can be based on word segmentation (word-based), character segmentation (character-based), and subword segmentation (subword-based), which is not limited in the embodiments of the present application. Further, the computer device can perform denoising on the Gaussian noise image according to the forward noise vector and the text encoding feature to obtain the initial transaction contract. That is, the computer device continuously performs noise prediction on the forward noise vector through the text encoding feature in T time steps to obtain a predicted noise vector, and denoises the forward noise vector through the predicted noise vector to obtain a target potential vector. The computer device can reconstruct the target potential vector through the decoder in the Wensheng graph model to obtain a target predicted image, and determine the target predicted image as the initial transaction contract. The initial transaction contract is further sent to the first object so that the first object generates corresponding feedback information based on the initial transaction contract. Among them, the feedback information can be opinion information on the predicted transaction price in the initial transaction contract, for example, it can be an expected transaction price proposed by the first object, or it can be information that the predicted transaction price is too high and needs to be discounted or reduced.
[0107] Step S402, obtaining feedback information sent by the first object, predicting contract update data that meets the transaction rate condition based on the feedback information, and updating the initial transaction contract based on the contract update data to obtain an updated transaction contract.
[0108] In an embodiment of the present application, a computer device can obtain feedback information sent by a first object, perform semantic analysis on the feedback information, obtain feedback semantic data, and generate an object demand price based on the feedback semantic data; the object demand price refers to the psychological expected price of the first object obtained by analyzing the feedback information. The computer device can obtain a price update parameter, and generate M transaction prices to be updated based on the object demand price, the predicted transaction price and the price update parameter; M is a positive integer. The price update parameter can be set manually, for example, if the price update parameter is set to 100, the object demand price is 2400, and the predicted transaction price is 3000, then M is 6, and the M transaction prices to be updated are "2400, 2500, 2600, 2700, 2800, 2900" respectively. The computer device can obtain the historical transaction behavior data corresponding to the M transaction prices to be updated, that is, from the historical transaction behavior data of a transaction price to be updated, obtain the historical transaction behavior data corresponding to the transaction price to be updated, and the historical transaction behavior data that has been completed includes the items that have been completed, the quantity of items, the transaction time, and the transaction object, etc.
[0109] The computer device can extract features from M completed historical transaction behavior data to obtain M historical transaction behavior features; can extract features from pending transaction business data to obtain pending transaction business features, and perform cross-attention processing on pending transaction business features and M historical transaction behavior features to obtain M cross-attention scores. Among them, a possible cross-attention processing method can be seen in formula ①:
[0110]
[0111] As shown in formula ①, Attention(Q,K,V) represents the cross attention function, Q is used to represent the query vector query, K is used to represent the key vector key, and V is used to represent the value vector value; T represents transposition, K T Represents the transposed matrix of K. The computer device can determine the M historical transaction behavior features as the query vector, and determine the transaction business features as the key vector and the value vector. k It is used to indicate the number of dimensions corresponding to the characteristics of the business to be traded. The cross-attention score sequence can be obtained through formula ①, and the cross-attention score sequence includes M cross-attention scores.
[0112] The computer device can determine the attention score threshold based on the transaction rate condition, and form a cross-attention sequence with the cross-attention scores greater than or equal to the attention score threshold among the M cross-attention scores; the cross-attention sequence includes N cross-attention scores, where N is a positive integer less than or equal to M. For example, the attention score threshold is 0.85, and the cross-attention score sequence composed of M cross-attention scores is (0.44, 0.99, 0.87, 0.64, 0.92, 0.66), then the final cross-attention sequence can be (0.99, 0.87, 0.92). The computer device can obtain the transaction prices to be updated corresponding to the N cross-attention scores, and determine the largest transaction price to be updated among the N transaction prices to be updated as the contract update data. For example, the transaction prices to be updated corresponding to the cross-attention score sequences (0.44, 0.99, 0.87, 0.64, 0.92, 0.66) are (2400, 2500, 2600, 2700, 2800, 2900), respectively. Then, the N transaction prices to be updated corresponding to the cross-attention sequence (0.99, 0.87, 0.92) are (2500, 2600, 2800). The largest transaction price to be updated among the N transaction prices to be updated is 2800, and the contract update parameter can be 2800.
[0113] Furthermore, the computer device can perform image recognition on the initial transaction contract to obtain an image recognition result. The image recognition result may include a non-text layer and a text layer. The text layer in the image recognition result can be extracted using image processing and machine learning technology to obtain initial text features. Optionally, the computer device can also perform operations such as denoising, binarization, and tilt correction on the image corresponding to the initial transaction contract to improve the accuracy of image recognition. Furthermore, the initial text features can be segmented to obtain character segmentation features, and character recognition can be performed on the character segmentation features to obtain text information; that is, the extracted character segmentation features are matched with the template to identify the text corresponding to the character segmentation features to obtain the final text information. The text information can be typeset and proofread to obtain a text analysis result; wherein, the computer device can perform image recognition on the initial transaction contract through optical character recognition (OCR) technology to obtain the final text analysis result.
[0114] The computer device can determine the to-be-updated fields that match the predicted transaction price in the text parsing results, replace the to-be-updated fields with the contract update data in the text parsing results to obtain an updated text parsing result, and merge the non-text layer corresponding to the initial transaction contract with the updated text parsing result to obtain an updated transaction contract; the non-text layer refers to the image of the initial transaction contract after the text parsing result is removed.
[0115] Step S403, generating a transaction order based on the updated transaction contract, sending the transaction order to the first object, and sending the first invoicing key data in the transaction order to the invoicing node in the blockchain, so that the invoicing node generates a first block to be uploaded to the chain based on the first invoicing key data; the transaction order includes the updated transaction contract and the contract signature generated for the updated transaction contract.
[0116] In the embodiment of the present application, the specific implementation process of step S403 can be referred to as follows. Figure 3 The specific description process in step S303 in will not be repeated here.
[0117] Step S404, when it is detected that the second block to be chained has been created in the invoicing node, the transaction data and transaction signature in the second block are verified; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block.
[0118] In the embodiment of the present application, the specific implementation process of step S404 can be referred to as follows. Figure 3 The specific description process in step S304 in will not be repeated here.
[0119] Step S405: If it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the first block and the second block are sequentially chained, a first electronic bill corresponding to the transaction order is generated based on the chained first block, the first electronic bill is sent to the first object, and the account balance of the first object and the account balance of the main object in the state tree in the blockchain are updated based on the chained second block.
[0120] In an embodiment of the present application, if the computer device verifies that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the computer device can sequentially process the first block and the second block on the chain, that is, send the first block and the second block in the invoicing node to the consensus node in the blockchain for consensus processing, and after the consensus is completed, the chain process of the first block and the second block is completed. The computer device can obtain the first invoicing key data for the transaction order in the first block that has been chained, and generate a first invoicing instruction for the first invoicing key data. Among them, the first invoicing instruction includes the first invoicing key data; that is, the computer device needs to create a machine instruction that can be recognized by the machine for the first invoicing key data. Further, the first invoicing instruction can be sent to the invoicing processing component so that the invoicing processing component adds the first invoicing instruction to the invoicing processing sequence. Among them, the invoicing processing sequence includes one or more invoicing instructions, and the position of the first invoicing instruction is at the end of the invoicing processing sequence; the invoicing processing component is used to perform invoicing processing on each invoicing instruction in the invoicing processing sequence according to the sorting position of the invoicing instructions in the invoicing processing sequence; under normal circumstances, the invoicing instructions in the invoicing processing sequence are sorted according to the order of addition or timestamps of the invoicing instructions, and the invoicing processing component needs to install the timestamps of the invoicing instructions and process them one by one. When the invoicing processing component completes the invoicing processing of the invoicing instructions before the first invoicing instruction, it can perform invoicing processing on the first invoicing instruction, obtain the processing result of the invoicing processing component for the first invoicing instruction, and determine the processing result as the first electronic invoice corresponding to the transaction order.
[0121] Optionally, in an abnormal situation, for example, the computer device performs an urgency detection on the transaction order corresponding to the first invoicing instruction to obtain the urgency value corresponding to the transaction order. If the urgency value is greater than or equal to the urgency threshold, it is considered that the computer device needs to expedite the first invoicing instruction. At this time, the computer device can generate a priority invoicing processing request for the transaction order, and send the priority invoicing processing request to the first processing node, so that the first processing node generates a priority invoicing processing request. Among them, the invoicing processing notification can indicate whether the priority invoicing processing request is passed. For example, if the first processing node determines that the first invoicing instruction can be expeditiously processed, "the priority invoicing processing request is passed" is determined as the invoicing processing notification; if the first processing node determines that the first invoicing instruction cannot be expeditiously processed, "the priority invoicing processing request is not passed" is determined as the invoicing processing notification. When the invoicing processing notification indicates that the priority invoicing processing request is passed, the computer device can notify the invoicing processing component to move the sorting position of the first invoicing instruction to the first place in the invoicing processing sequence. Subsequently, the invoicing processing component may process the first invoicing instruction preferentially and complete the expedited processing of the first invoicing instruction.
[0122] The specific implementation process of the computer device performing an urgency detection on the transaction order corresponding to the first invoicing instruction and obtaining the urgency value corresponding to the transaction order may be: the computer device may determine the influencing factors affecting the urgency of the transaction order corresponding to the first invoicing instruction, obtain the urgency impact data associated with the influencing factors from the transaction order, input the urgency impact data into the urgency assessment model, and extract the features of the urgency impact data based on the urgency assessment model to obtain the influencing data features. The influencing factors include the delivery period of the order, the importance of the customer (first object), the order amount (contract update parameters, transaction funds), inventory status, etc. Further, B urgency tags and the tag degree values corresponding to the B urgency tags may be obtained, and the features of the B urgency tags may be extracted to obtain a tag feature sequence containing B tag features; B is a positive integer. The urgency tags may be "extremely high", "high", "medium", "low", "extremely low", etc. The computer device may perform cross-attention processing on the influencing data features and the tag feature sequence to obtain an urgency attention sequence containing B attention scores. The cross-attention processing process may refer to the above formula ①, which will not be repeated here. The urgency tag corresponding to the maximum attention score in the urgency attention sequence can be further determined as the target urgency tag, and the tag degree value corresponding to the target urgency tag can be determined as the urgency value corresponding to the transaction order; the B urgency tags include the target urgency tag.
[0123] Step S406, when receiving the second electronic receipt sent by the second object, obtain the account address of the second object, obtain the to-be-transferred assets corresponding to the transaction value from the digital assets corresponding to the account of the main object, and transfer the to-be-transferred assets to the account address of the second object.
[0124] In an embodiment of the present application, when a computer device receives a second electronic bill sent by a second object, the computer device can obtain the second billing key data in the second electronic bill, and perform block traversal in the blockchain based on the second billing key data. If the target block containing the second billing key data is traversed, it is determined that the legitimacy test for the second electronic bill has passed; that is, the computer device detects whether the second electronic bill exists in the blockchain and verifies whether the second electronic bill is legal. Among them, the second object can be one or more employee objects in the company corresponding to the main object. The computer device can obtain the third object indicated in the second billing key data, and if the third object is an associated object of the main object, it is determined that the compliance test for the second electronic bill has passed. Among them, the third object refers to the payee indicated in the second electronic bill. When a transaction is reached between the second object and the third object, the third object is an associated object of the main object, and the actual transaction parties of the transaction are the main object and the third object, and the payment behavior of the second object is an advance payment behavior, it is determined that the compliance test for the second electronic bill has passed. If the legality check and compliance check for the second electronic bill are both passed, the computer device can obtain the transaction value corresponding to the second electronic bill from the target block (the amount paid by the second object to the third object), further obtain the account address of the second object, obtain the assets to be transferred corresponding to the transaction value from the digital assets corresponding to the account of the main object, and transfer the assets to be transferred to the account address of the second object. That is, the whole process is the process of electronic bill (i.e. invoice) reimbursement. After the second object pays a payable to the third object (actually the main object pays the third object), the second object can obtain the digital assets corresponding to the payable from the main object based on the second electronic bill.
[0125] Step S407: acquiring an electronic bill set associated with the main object, and generating a financial statement for the main object based on the electronic bill set.
[0126] In an embodiment of the present application, a computer device may obtain an electronic bill set associated with a main object, wherein the electronic bill set includes a payment electronic bill (an invoice issued by a transaction party) and a collection electronic bill (an invoice issued by the main object to the transaction party), and the payment electronic bill includes a second electronic bill, and the collection electronic bill includes a first electronic bill. Further, the transaction flow information of the account corresponding to the main object may be obtained; that is, the collection information and payment information of the main object. The computer device may perform data verification on the electronic bill set through the transaction flow information, that is, verify whether the collection information in the transaction flow information of the main object account includes the receivables data in the collection electronic bill; and verify whether the payment information in the transaction flow information of the main object account includes the payables data in the payment electronic bill. The electronic bills in the electronic bill set that have passed the data verification may be determined as actual electronic bills.
[0127] Furthermore, the computer device can generate financial statements for the main object based on the actual electronic invoice. Specifically, the computer device can classify the actual electronic invoice according to the invoice type to obtain P expenditure electronic invoices and Q income electronic invoices; P and Q are both positive integers. The expenditure transaction data in the P expenditure electronic invoices and the business type corresponding to the expenditure transaction data are extracted respectively, and the first type of characters are added to the P expenditure transaction data respectively to obtain P updated expenditure transaction data. Among them, the first type of characters are used to characterize the data type of the updated expenditure transaction data; for example, the first type of characters can be represented as "-", when the expenditure transaction data in an expenditure electronic invoice is 4000, the updated expenditure transaction data corresponding to the expenditure electronic invoice can be represented as "-4000", which is used to indicate that the main object expenditure or payment is 4000, that is, the value of the main object account balance is reduced by 4000.
[0128] The computer device can extract the income transaction data in the Q income electronic bills and the business types corresponding to the income transaction data, respectively, and add the second type of characters to the Q income transaction data, respectively, to obtain Q updated income transaction data. Among them, the second type of characters are used to characterize the data type of the updated income transaction data; for example, the second type of characters can be represented as "+", when the income transaction data in an income electronic bill is 80000, the updated income transaction data corresponding to the income electronic bill can be represented as "+80000", which is used to represent the income or receipt of the main object 80000, that is, the value of the main object account balance has increased by 80000. Subsequently, the computer device can perform drawing processing on the P updated expenditure transaction data, the business types corresponding to the P updated expenditure transaction data, the Q updated income transaction data, and the business types corresponding to the Q updated income transaction data, respectively, to obtain a financial statement for the main object. The computer device can use the above data as the instruction text to generate the corresponding financial statement through the Wensheng graph model, or select a suitable data visualization tool or library for drawing processing, such as Excel, Tableau, Power BI, Python's Matplotlib, etc., which is not limited here.
[0129] It should be understood that before the drawing process is carried out, the computer equipment should also determine the basic structure of the financial statements, including the balance sheet, income statement, cash flow statement, etc., and determine the key indicators that need to be displayed, such as total revenue, total expenditure, net profit, total assets, total liabilities, etc.
[0130] Step S408: obtaining a business analysis request, and generating a target business analysis result for the business analysis request.
[0131] In an embodiment of the present application, a computer device can obtain a business analysis request, obtain a business analysis template indicated by the business analysis request from a business template library based on the business analysis request, and input the business analysis request, financial statements, and business analysis template into a large language model. The business analysis request can be semantically parsed by the large language model to obtain business semantic information, that is, to determine what the business analysis request is, what needs to be done, etc. Based on the business semantic information and financial statements, initial business analysis results for the business analysis request can be generated; that is, based on the business semantic information, the data in the financial statements are analyzed to obtain initial business analysis results. For example, identifying changing trends and potential problems in financial conditions, or preparing explanations and discussions of financial statements for reporting to stakeholders (such as management, investors, or auditors).
[0132] The computer device may determine A fields to be supplemented in the business analysis template, respectively obtain context information of the A fields to be supplemented, and segment the initial business analysis results based on the A context information to obtain business analysis fields corresponding to the A fields to be supplemented; A is a positive integer. The fields to be supplemented may be fields in the business analysis template that need to be filled according to specific data (e.g., initial business analysis results). The computer device may replace the A fields to be supplemented in the business analysis template with the business analysis fields corresponding to the A fields to be supplemented, respectively, to obtain the target business analysis results for the business analysis request.
[0133] Through the above process, the transaction price is predicted based on the transaction business data to be traded, the initial transaction contract is generated based on the predicted transaction price, the initial transaction contract is directly sent to the first object to obtain feedback information, and the initial transaction contract is updated based on the feedback information to obtain an updated transaction contract, thereby saving unnecessary multiple information exchange processes and accelerating the transaction completion time; after the transaction order is generated, the corresponding first block to be chained is generated based on the first invoicing key data corresponding to the transaction order, so that when it is detected that the second block (including the transaction data for the transaction order) has been created, that is, when the first object agrees to the transaction order, the two blocks can be directly chained to obtain the corresponding electronic bill, thereby improving the billing efficiency. Moreover, the first key invoicing information obtained by the computer device from the transaction order includes all the key data for generating the electronic bill, thereby reducing the omission rate of manually obtaining the first key invoicing information; the computer device automatically inputs it into the electronic bill template to generate the final electronic bill, thereby reducing not only the time for manual input, but also the error rate. The computer device can accurately identify the second invoicing key data in the second electronic bill, and verify the legality and compliance, thereby reducing the error of manual review. In addition, financial statements and template business analysis results can be generated based on electronic invoice collections, eliminating the need for manual drawing and analysis, thus saving labor costs.
[0134] For further information, see Figure 5 , Figure 5 Schematic diagram of a business data processing device based on blockchain provided in an embodiment of the present application. The business data processing device based on blockchain can be a computer program (including program code, etc.) running on a computer device. For example, the business data processing device based on blockchain can be an application software; the business data processing device based on blockchain can be used to execute the corresponding steps in the method provided in an embodiment of the present application. Figure 5 As shown, the blockchain-based business data processing device 500 can be used Figure 3 and Figure 4 The computer device in the corresponding embodiment, specifically, the blockchain-based business data processing device may include: a contract generation module 11, a contract update module 12, a block creation module 13, a data verification module 14, a bill generation module 15, a bill approval module 16, and a business processing module 17.
[0135] The contract generation module 11 is used to obtain the business data to be traded sent by the first object, perform price prediction on the business data to be traded, obtain the predicted transaction price of the business data to be traded, generate an initial transaction contract based on the predicted transaction price and the business data to be traded, and send the initial transaction contract to the first object, so that the first object generates feedback information based on the initial transaction contract;
[0136] The contract updating module 12 is used to obtain feedback information sent by the first object, predict contract update data that meets the transaction rate condition based on the feedback information, and update the initial transaction contract based on the contract update data to obtain an updated transaction contract;
[0137] The block creation module 13 is used to generate a transaction order based on the updated transaction contract, send the transaction order to the first object, and send the first invoicing key data in the transaction order to the invoicing node in the blockchain, so that the invoicing node generates a first block to be uploaded to the blockchain based on the first invoicing key data; the transaction order includes the updated transaction contract and the contract signature generated for the updated transaction contract;
[0138] The data verification module 14 is used to verify the transaction data and transaction signature in the second block when it is detected that the second block to be chained has been created in the invoicing node; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block;
[0139] The bill generation module 15 is used to, if it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, then sequentially chain the first block and the second block, generate a first electronic bill corresponding to the transaction order based on the chained first block, send the first electronic bill to the first object, and update the account balance of the first object and the account balance of the main object in the state tree in the blockchain based on the chained second block.
[0140] In a possible implementation, when the contract generation module 11 is used to generate an initial transaction contract based on the predicted transaction price and the transaction business data, the contract generation module 11 is specifically used to perform the following operations:
[0141] Obtaining the contract template associated with the to-be-traded business data from the business template library, and generating a Gaussian noise image according to the contract template and the initial noise data;
[0142] The predicted transaction price and the business data to be traded are semantically expanded through a large language model to obtain an instruction text;
[0143] The Gaussian noise image and the instruction text are input into the Wensheng graph model, the Gaussian noise image is feature extracted by the Wensheng graph model to obtain Gaussian noise features, and the Gaussian noise features are forward diffused to obtain a forward noise vector;
[0144] The feature encoding of the instruction text is performed through the text graph model to obtain the text encoding feature. The Gaussian noise image is denoised according to the forward noise vector and the text encoding feature to obtain the initial transaction contract.
[0145] In a possible implementation, when the contract updating module 12 is used to predict the contract updating data satisfying the transaction rate condition based on the feedback information, the contract updating module 12 is specifically used to perform the following operations:
[0146] Perform semantic analysis on the feedback information to obtain feedback semantic data, and generate the object demand price based on the feedback semantic data;
[0147] Obtain price update parameters, and generate M transaction prices to be updated based on the object demand price, predicted transaction price and price update parameters; M is a positive integer;
[0148] Obtaining M historical transaction behavior data corresponding to the transaction prices to be updated, respectively, and performing feature extraction on the M historical transaction behavior data to obtain M historical transaction behavior features;
[0149] Extract features of the transaction business data to obtain features of the transaction business, perform cross-attention processing on the transaction business features and M historical transaction behavior features, and obtain M cross-attention scores;
[0150] Determine an attention score threshold based on the transaction rate condition, and form a cross-attention sequence with the cross-attention scores greater than or equal to the attention score threshold among the M cross-attention scores; the cross-attention sequence includes N cross-attention scores, where N is a positive integer less than or equal to M;
[0151] Obtain the transaction prices to be updated corresponding to the N cross-attention scores respectively, and determine the largest transaction price to be updated among the N transaction prices to be updated as the contract update data.
[0152] In a possible implementation, the contract updating module 12 is used to update the initial transaction contract based on the contract update data. When the updated transaction contract is obtained, the contract updating module 12 is specifically used to perform the following operations:
[0153] Perform image recognition on the initial transaction contract to obtain an image recognition result, and perform text feature extraction on the image recognition result to obtain initial text features;
[0154] Performing character segmentation on the initial text features to obtain character segmentation features, performing character recognition on the character segmentation features to obtain text information, typeset the text information, and obtain text parsing results;
[0155] Determine the fields to be updated that match the predicted transaction price in the text parsing results, replace the fields to be updated with the contract update data in the text parsing results to obtain an updated text parsing result, merge the non-text layer corresponding to the initial transaction contract with the updated text parsing result to obtain an updated transaction contract; the non-text layer refers to the image of the initial transaction contract after the text parsing result is removed.
[0156] In a possible implementation, when the bill generation module 15 is used to generate a first electronic bill corresponding to a transaction order based on the first block on the chain, the bill generation module 15 is specifically used to perform the following operations:
[0157] Acquire the first invoicing key data for the transaction order in the first block on the chain, and generate a first invoicing instruction for the first invoicing key data; the first invoicing instruction includes the first invoicing key data;
[0158] The first invoicing instruction is sent to the invoicing processing component, so that the invoicing processing component adds the first invoicing instruction to the invoicing processing sequence; the first invoicing instruction is located at the end of the invoicing processing sequence; the invoicing processing component is used to perform invoicing processing on each invoicing instruction in the invoicing processing sequence according to the sorting position of the invoicing instructions in the invoicing processing sequence;
[0159] A processing result of the invoicing processing component on the first invoicing instruction is obtained, and the processing result is determined as a first electronic bill corresponding to the transaction order.
[0160] In a possible implementation, the bill generation module 15 is further configured to perform the following operations:
[0161] Performing an urgency test on the transaction order corresponding to the first invoicing instruction to obtain an urgency value corresponding to the transaction order;
[0162] If the urgency value is greater than or equal to the urgency threshold, a priority invoicing processing request for the transaction order is generated, and the priority invoicing processing request is sent to the first processing node, so that the first processing node generates an invoicing processing notification for the priority invoicing processing request;
[0163] When the invoicing processing notification indicates that the priority invoicing processing request is passed, the invoicing processing component is notified to move the sorting position of the first invoicing instruction to the first position in the invoicing processing sequence.
[0164] In a possible implementation, the bill generation module 15 is used to perform an urgency detection on the transaction order corresponding to the first billing instruction. When the urgency value corresponding to the transaction order is obtained, the bill generation module 15 is specifically used to perform the following operations:
[0165] Determine an influencing factor affecting the urgency of the transaction order corresponding to the first invoicing instruction, obtain urgency impact data associated with the influencing factor from the transaction order, input the urgency impact data into an urgency assessment model, perform feature extraction on the urgency impact data based on the urgency assessment model, and obtain impact data features;
[0166] Obtain B urgency tags and the tag degree values corresponding to the B urgency tags, perform feature extraction on the B urgency tags, and obtain a tag feature sequence containing B tag features; B is a positive integer;
[0167] Cross-attention processing is performed on the influencing data features and label feature sequences to obtain an urgency attention sequence containing B attention scores, the urgency label corresponding to the largest attention score in the urgency attention sequence is determined as the target urgency label, and the label degree value corresponding to the target urgency label is determined as the urgency value corresponding to the transaction order; the B urgency labels include the target urgency label.
[0168] In a possible implementation, the blockchain-based business data processing device 500 further includes a bill approval module 16, which is specifically configured to perform the following operations:
[0169] When receiving the second electronic bill sent by the second object, obtaining the second invoicing key data in the second electronic bill, performing block traversal in the blockchain based on the second invoicing key data, and determining that the legitimacy check for the second electronic bill has passed if the target block containing the second invoicing key data is traversed;
[0170] Acquire the third object indicated in the second invoicing key data, and if the third object is an associated object of the main object, determine that the compliance check for the second electronic invoice passes;
[0171] If the legality check and the compliance check for the second electronic bill are both passed, the transaction value corresponding to the second electronic bill is obtained from the target block;
[0172] The account address of the second object is obtained, the asset to be transferred corresponding to the transaction value is obtained from the digital assets corresponding to the account of the main object, and the asset to be transferred is transferred to the account address of the second object.
[0173] In a possible implementation, the blockchain-based business data processing device 500 further includes a business processing module 17, which is specifically configured to perform the following operations:
[0174] Acquire an electronic bill set associated with the main object, and acquire transaction flow information of the account corresponding to the main object; the electronic bill set includes a first electronic bill and a second electronic bill;
[0175] The electronic bill set is verified by transaction flow information, and the electronic bills in the electronic bill set that pass the data verification are determined as actual electronic bills;
[0176] Generate financial statements for master objects based on actual electronic invoices.
[0177] In a possible implementation, when the business processing module 17 is used to generate a financial statement for a primary object based on an actual electronic invoice, the business processing module 17 is specifically used to perform the following operations:
[0178] The actual electronic bills are classified according to the bill type, and P expenditure electronic bills and Q income electronic bills are obtained; P and Q are both positive integers;
[0179] Extracting expenditure transaction data and business types corresponding to the expenditure transaction data from P expenditure electronic receipts respectively, and adding first-type characters to the P expenditure transaction data respectively, to obtain P updated expenditure transaction data; the first-type characters are used to represent the data type of the updated expenditure transaction data;
[0180] Respectively extracting the income transaction data from Q income electronic receipts and the business types corresponding to the income transaction data, respectively adding the second type of characters to the Q income transaction data, to obtain Q updated income transaction data; the second type of characters are used to represent the data type of the updated income transaction data;
[0181] Drawing processing is performed on the P updated expenditure transaction data, the business types corresponding to the P updated expenditure transaction data, the Q updated income transaction data, and the business types corresponding to the Q updated income transaction data to obtain a financial statement for the main object.
[0182] In a possible implementation, the service processing module 17 is further configured to perform the following operations:
[0183] Obtaining a business analysis request, obtaining a business analysis template indicated by the business analysis request from a business template library based on the business analysis request, and inputting the business analysis request, the financial statement, and the business analysis template into a large language model;
[0184] The business analysis request is semantically parsed through a large language model to obtain business semantic information, and the initial business analysis results for the business analysis request are generated based on the business semantic information and financial statements;
[0185] Determine A to-be-supplemented fields in the business analysis template, obtain context information of the A to-be-supplemented fields respectively, segment the initial business analysis result based on the A context information, and obtain business analysis fields corresponding to the A to-be-supplemented fields respectively; A is a positive integer;
[0186] In the business analysis template, the A fields to be supplemented are replaced with business analysis fields corresponding to the A fields to be supplemented, respectively, to obtain a target business analysis result for the business analysis request.
[0187] See also Figure 6 , Figure 6 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 6As shown, the computer device 600 in the embodiment of the present application may include: a processor 601, a network interface 604 and a memory 605. In addition, the above-mentioned computer device 600 may also include: a user interface 603, and at least one communication bus 602. Among them, the communication bus 602 is used to realize the connection and communication between these components. Among them, the user interface 603 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 603 may also include a standard wired interface and a wireless interface. The network interface 604 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 605 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 605 may optionally also be at least one storage device located away from the aforementioned processor 601. As Figure 6 As shown, the memory 605 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
[0188] The network interface 604 can provide a network communication network element; the user interface 603 is mainly used to provide an input interface for the user; and the processor 601 can be used to call the device control application stored in the memory 605 to perform the following operations:
[0189] Acquire the business data to be traded sent by the first object, perform price prediction on the business data to be traded, obtain the predicted transaction price of the business data to be traded, generate an initial transaction contract based on the predicted transaction price and the business data to be traded, and send the initial transaction contract to the first object, so that the first object generates feedback information based on the initial transaction contract;
[0190] Acquire feedback information sent by the first object, predict contract update data that meets the transaction rate condition based on the feedback information, and update the initial transaction contract based on the contract update data to obtain an updated transaction contract;
[0191] Generate a transaction order based on the updated transaction contract, send the transaction order to the first object, and send the first invoicing key data in the transaction order to the invoicing node in the blockchain, so that the invoicing node generates a first block to be uploaded to the blockchain based on the first invoicing key data; the transaction order includes the updated transaction contract and the contract signature generated for the updated transaction contract;
[0192] When it is detected that the second block to be chained has been created in the invoicing node, the transaction data and transaction signature in the second block are verified; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block;
[0193] If it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the first block and the second block are sequentially chained, a first electronic bill corresponding to the transaction order is generated based on the chained first block, the first electronic bill is sent to the first object, and the account balance of the first object and the account balance of the main object in the state tree in the blockchain are updated based on the chained second block.
[0194] In addition, it should be noted that: the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program is suitable for being loaded and executed by the processor Figure 3 or Figure 4 For details on the methods provided in each step, please refer to the Figure 3 or Figure 4 The implementation methods provided in each step are not repeated here. In addition, the description of the beneficial effects of adopting the same method is not repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the computer program can be deployed to execute on one computer device, or on multiple computer devices located in one place, or on multiple computer devices distributed in multiple locations and interconnected by a communication network.
[0195] The computer-readable storage medium may be the device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0196] The present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 3 or Figure 4 The methods provided in the various optional methods are therefore not described in detail here.
[0197] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.
[0198] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0199] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in this description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0200] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1The computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including the instruction device, or are transmitted through a computer-readable storage medium. Computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The instruction device is implemented in the process Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide the functions for implementing the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
[0201] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0202] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0203] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A business data processing method based on blockchain, characterized in that: The method comprises: Acquire the business data to be traded sent by the first object, perform price prediction on the business data to be traded, obtain the predicted transaction price of the business data to be traded, generate an initial transaction contract based on the predicted transaction price and the business data to be traded, and send the initial transaction contract to the first object, so that the first object generates feedback information based on the initial transaction contract; Acquire the feedback information sent by the first object, predict contract update data that meets the transaction rate condition based on the feedback information, and update the initial transaction contract based on the contract update data to obtain an updated transaction contract; Generate a transaction order based on the updated transaction contract, send the transaction order to the first object, and send the first invoicing key data in the transaction order to the invoicing node in the blockchain, so that the invoicing node generates a first block to be uploaded to the blockchain based on the first invoicing key data; the transaction order includes the updated transaction contract and the contract signature generated for the updated transaction contract; When it is detected that the second block to be chained has been created in the invoicing node, the transaction data and transaction signature in the second block are verified; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block; If it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, the first block and the second block are sequentially chained, a first electronic bill corresponding to the transaction order is generated based on the chained first block, the first electronic bill is sent to the first object, and the account balance of the first object and the account balance of the main object in the status tree in the blockchain are updated based on the chained second block.
2. The method according to claim 1, characterized in that The generating of the initial transaction contract based on the predicted transaction price and the to-be-transacted business data comprises: Acquire a contract template associated with the to-be-traded business data from a business template library, and generate a Gaussian noise image according to the contract template and initial noise data; Performing semantic expansion on the predicted transaction price and the to-be-transacted business data through a large language model to obtain an indication text; Inputting the Gaussian noise image and the instruction text into a Vincent graph model, performing feature extraction on the Gaussian noise image through the Vincent graph model to obtain Gaussian noise features, and performing forward diffusion processing on the Gaussian noise features to obtain a forward noise vector; The instruction text is feature encoded by the text graph model to obtain text encoding features, and the Gaussian noise image is denoised according to the forward noise vector and the text encoding features to obtain an initial transaction contract.
3. The method according to claim 1, characterized in that: The predicting of contract update data satisfying a transaction rate condition based on the feedback information includes: Performing semantic analysis on the feedback information to obtain feedback semantic data, and generating an object demand price based on the feedback semantic data; Obtaining price update parameters, and generating M transaction prices to be updated based on the object demand price, the predicted transaction price and the price update parameters; M is a positive integer; Obtaining the completed historical transaction behavior data corresponding to the M transaction prices to be updated, respectively, and performing feature extraction on the M completed historical transaction behavior data to obtain M historical transaction behavior features; Extracting features from the to-be-traded business data to obtain features of the to-be-traded business, and performing cross-attention processing on the to-be-traded business features and the M historical transaction behavior features to obtain M cross-attention scores; Determine an attention score threshold based on the transaction rate condition, and form a cross-attention sequence with the cross-attention scores greater than or equal to the attention score threshold among the M cross-attention scores; the cross-attention sequence includes N cross-attention scores, where N is a positive integer less than or equal to M; The transaction prices to be updated corresponding to the N cross-attention scores are obtained, and the largest transaction price to be updated among the N transaction prices to be updated is determined as the contract update data.
4. The method according to claim 1, characterized in that: The updating of the initial transaction contract based on the contract update data to obtain an updated transaction contract includes: Performing image recognition on the initial transaction contract to obtain an image recognition result, and performing text feature extraction on the image recognition result to obtain initial text features; Performing character segmentation on the initial text features to obtain character segmentation features, performing character recognition on the character segmentation features to obtain text information, and typeset the text information to obtain a text parsing result; Determine the to-be-updated fields that match the predicted transaction price in the text parsing result, replace the to-be-updated fields with the contract update data in the text parsing result to obtain an updated text parsing result, merge the non-text layer corresponding to the initial transaction contract with the updated text parsing result to obtain an updated transaction contract; the non-text layer refers to the image of the initial transaction contract after the text parsing result is removed.
5. The method according to claim 1, characterized in that: The step of generating a first electronic bill corresponding to the transaction order based on the first block on the chain includes: Acquire the first invoicing key data for the transaction order in the first block that has been uploaded to the chain, and generate a first invoicing instruction for the first invoicing key data; the first invoicing instruction includes the first invoicing key data; The first invoicing instruction is sent to the invoicing processing component, so that the invoicing processing component adds the first invoicing instruction to the invoicing processing sequence; the first invoicing instruction is located at the end of the invoicing processing sequence; the invoicing processing component is used to perform invoicing processing on each invoicing instruction in the invoicing processing sequence according to the sorting position of the invoicing instructions in the invoicing processing sequence; A processing result of the invoicing processing component on the first invoicing instruction is obtained, and the processing result is determined as a first electronic bill corresponding to the transaction order.
6. The method according to claim 5, characterized in that The method further comprises: Performing an urgency detection on the transaction order corresponding to the first invoicing instruction to obtain an urgency value corresponding to the transaction order; If the urgency value is greater than or equal to the urgency threshold, a priority invoicing processing request is generated for the transaction order, and the priority invoicing processing request is sent to the first processing node, so that the first processing node generates an invoicing processing notification for the priority invoicing processing request; When the invoicing processing notification indicates that the priority invoicing processing request is passed, the invoicing processing component is notified to move the sorting position of the first invoicing instruction to the first place in the invoicing processing sequence.
7. The method according to claim 6, characterized in that The performing an urgency detection on the transaction order corresponding to the first invoicing instruction to obtain an urgency value corresponding to the transaction order includes: Determine an influencing factor affecting the urgency of the transaction order corresponding to the first invoicing instruction, obtain urgency impact data associated with the influencing factor from the transaction order, input the urgency impact data into an urgency assessment model, and perform feature extraction on the urgency impact data based on the urgency assessment model to obtain impact data features; Obtain B urgency tags and tag degree values corresponding to the B urgency tags, perform feature extraction on the B urgency tags, and obtain a tag feature sequence containing B tag features; B is a positive integer; Cross-attention processing is performed on the influencing data features and the label feature sequence to obtain an urgency attention sequence including B attention scores, the urgency label corresponding to the maximum attention score in the urgency attention sequence is determined as the target urgency label, and the label degree value corresponding to the target urgency label is determined as the urgency value corresponding to the transaction order; the B urgency labels include the target urgency label.
8. The method according to claim 1, characterized in that Said also includes: When receiving the second electronic bill sent by the second object, obtaining the second billing key data in the second electronic bill, performing block traversal in the blockchain based on the second billing key data, and determining that the legitimacy check for the second electronic bill has passed if the target block containing the second billing key data is traversed; Acquire a third object indicated in the second invoicing key data, and if the third object is an associated object of the main object, determine that the compliance check for the second electronic invoice passes; If the legality check and the compliance check for the second electronic bill are both passed, obtaining the transaction value corresponding to the second electronic bill from the target block; The account address of the second object is obtained, the asset to be transferred corresponding to the transaction value is obtained from the digital assets corresponding to the account of the main object, and the asset to be transferred is transferred to the account address of the second object.
9. The method according to claim 8, characterized in that The method further comprises: Acquire an electronic bill set associated with the main object, and acquire transaction flow information of the account corresponding to the main object; the electronic bill set includes the first electronic bill and the second electronic bill; Performing data verification on the electronic bill set through the transaction flow information, and determining the electronic bills in the electronic bill set that have passed the data verification as actual electronic bills; A financial statement for the master object is generated based on the actual electronic invoice.
10. The method according to claim 9, characterized in that The generating of a financial statement for the main object based on the actual electronic bill includes: Classify the actual electronic bills according to bill types to obtain P expenditure electronic bills and Q income electronic bills; P and Q are both positive integers; Respectively extracting the expenditure transaction data in the P expenditure electronic receipts and the business types corresponding to the expenditure transaction data, respectively adding first type characters to the P expenditure transaction data, to obtain P updated expenditure transaction data; the first type characters are used to represent the data type of the updated expenditure transaction data; Respectively extracting the income transaction data from the Q income electronic receipts and the business types corresponding to the income transaction data, and respectively adding second-type characters to the Q income transaction data to obtain Q updated income transaction data; the second-type characters are used to represent the data type of the updated income transaction data; The P updated expenditure transaction data, the business types respectively corresponding to the P updated expenditure transaction data, the Q updated income transaction data, and the business types respectively corresponding to the Q updated income transaction data are graphed to obtain a financial statement for the main object.
11. The method according to claim 9, characterized in that The method further comprises: Obtaining a business analysis request, obtaining a business analysis template indicated by the business analysis request from a business template library based on the business analysis request, and inputting the business analysis request, the financial statement, and the business analysis template into a large language model; Performing semantic analysis on the business analysis request through the large language model to obtain business semantic information, and generating an initial business analysis result for the business analysis request based on the business semantic information and the financial statement; Determine A to-be-supplemented fields in the business analysis template, respectively obtain context information of the A to-be-supplemented fields, and segment the initial business analysis result based on the A context information to obtain business analysis fields corresponding to the A to-be-supplemented fields respectively; A is a positive integer; The A fields to be supplemented are replaced in the business analysis template with business analysis fields corresponding to the A fields to be supplemented, respectively, to obtain a target business analysis result for the business analysis request.
12. A business data processing device based on blockchain, characterized in that: The device comprises: a contract generation module, configured to obtain the business data to be traded sent by the first object, perform price prediction on the business data to be traded, obtain the predicted transaction price of the business data to be traded, generate an initial transaction contract based on the predicted transaction price and the business data to be traded, and send the initial transaction contract to the first object, so that the first object generates feedback information based on the initial transaction contract; A contract updating module, configured to obtain the feedback information sent by the first object, predict contract update data satisfying a transaction rate condition based on the feedback information, and update the initial transaction contract based on the contract update data to obtain an updated transaction contract; A block creation module, configured to generate a transaction order based on the updated transaction contract, send the transaction order to the first object, and send the first invoicing key data in the transaction order to an invoicing node in the blockchain, so that the invoicing node generates a first block to be uploaded to the blockchain based on the first invoicing key data; the transaction order includes the updated transaction contract and a contract signature generated for the updated transaction contract; A data verification module, configured to verify the transaction data and transaction signature in the second block when it is detected that the second block to be chained has been created in the invoicing node; the transaction data is used to indicate that the transaction funds in the account address of the first object are transferred to the account address of the main object, and the parent block hash in the block header of the second block is the block hash of the first block; The bill generation module is used to, if it is verified that the value of the transaction funds in the transaction data matches the value of the contract funds in the updated transaction contract, and the transaction signature is the same as the contract signature, then sequentially chain the first block and the second block, generate a first electronic bill corresponding to the transaction order based on the chained first block, send the first electronic bill to the first object, and update the account balance of the first object and the account balance of the main object in the state tree in the blockchain based on the chained second block.
13. A computer device, characterized in that: Includes processor, memory, input and output interfaces; The processor is connected to the memory and the input / output interface respectively, wherein the input / output interface is used to receive and output data, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Data processing method, device and equipment based on block chain and readable storage medium
CN112907244A
Data processing method and device, equipment and storage medium
CN117114903A
Asset-backed tokens
US20200042989A1