Blockchain-based transaction method, device, electronic device, and readable medium
By integrating the reward process between management agencies and users on the blockchain, the problem of difficulty in synchronizing data on rewards for good deeds is solved and management efficiency is improved.
Patent Information
- Application Number
- CN202210597748.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-05-27
AI Technical Summary
In the existing reward system for good deeds, data synchronization between the management agency and the agency providing rewards is difficult, resulting in low efficiency in the execution of the management process.
Using a blockchain-based transaction method, the process of the management agency issuing rewards and the process of users receiving rewards are integrated on the same blockchain to realize online data management and transactions and simplify the data synchronization process.
It improves the execution efficiency of the management process and simplifies data synchronization and transaction processes by unifying data between institutions online.
Smart Images

Figure CN114936879B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a transaction method, device, electronic device and readable medium based on blockchain. Background Art
[0002] In terms of social governance, the reward system for various good deeds is often a systematic project that requires the collaboration of multiple parties. With the development of technology, under the guarantee of distributed technologies such as cloud computing, distributed architecture, distributed ledger, and blockchain, it is expected that a transparent, equal, and credible cooperation paradigm will be formed among multiple participants, thus bringing opportunities for convenient changes such as social governance.
[0003] At present, rewards for good deeds are usually given by a management agency that can collect data on good deeds, which recognizes the user's good deeds and issues corresponding reward certificates. The user then goes to the agency that provides the rewards to redeem the corresponding reward with the reward certificate.
[0004] However, in this process, since the management agency that collects data and the agency that provides rewards are usually different, data synchronization between management systems usually needs to be carried out offline. The data is stored in multiple agencies in a scattered manner, which makes data synchronization difficult and reduces the execution efficiency of the entire management process. Summary of the invention
[0005] Based on the above technical problems, the present application provides a blockchain-based transaction method, device, electronic device and readable medium, so that the entire process of the management agency issuing rewards and the process of users receiving rewards are carried out on the same blockchain, thereby performing online unified management of the data between the management agency and the management system of the agency providing the rewards, simplifying the data synchronization and transaction process, and improving the execution efficiency of the management process.
[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0007] According to one aspect of an embodiment of the present application, a transaction method based on blockchain is provided, comprising:
[0008] Sending first transaction information to N institutional nodes so that the N institutional nodes endorse the first transaction information to obtain a first endorsement result, wherein the first transaction information includes the account information of the sender, the account information of the first receiver, and the first transaction amount, and N is an integer greater than 1;
[0009] If the first transaction information satisfies the kindness reward condition, a first transaction block is generated and added to the blockchain, wherein the kindness reward condition includes that the first endorsement result is a successful endorsement, and the first transaction block includes the sender's reward score;
[0010] Determining the cumulative reward score of the sender according to the reward score of the sender;
[0011] Sending second transaction information to the N institution nodes so that the N institution nodes endorse the second transaction information to obtain a second endorsement result, wherein the second transaction information includes the account information of the sender, the account information of the second recipient, the accumulated reward points of the sender, and the second transaction amount;
[0012] If the second endorsement result is a successful endorsement, and the sender's cumulative reward score is greater than or equal to a preset score, a second transaction block is generated and the second transaction block is added to the blockchain.
[0013] In some embodiments of the present application, based on the above technical solution, if the first transaction information meets the kindness reward condition, a first transaction block is generated, including:
[0014] Obtaining a designated recipient information set from the blockchain, wherein the designated recipient information set includes account information of at least one designated recipient;
[0015] If the account information of the first recipient in the first transaction information is the account information of one of the at least one designated recipient included in the designated recipient information set, a first transaction block is generated.
[0016] In some embodiments of the present application, based on the above technical solution, if the first transaction information meets the kindness reward condition, a first transaction block is generated, including:
[0017] Get the kindness reward threshold from the blockchain;
[0018] If the first transaction amount in the first transaction information is greater than the kindness reward threshold, a first transaction block is generated.
[0019] In some embodiments of the present application, based on the above technical solution, generating the first transaction block includes:
[0020] Obtain a preset reward period, a reward recipient account set, and at least one transaction amount range from the blockchain;
[0021] Determine a reward coefficient according to whether the sending time of the first transaction information belongs to the preset reward period and the account information of the first recipient and the reward recipient account set in the first transaction information;
[0022] Determining a basic score corresponding to the transaction amount range according to the transaction amount range to which the first transaction amount belongs;
[0023] Calculating the bonus score according to the basic score and the bonus coefficient;
[0024] A first transaction block is generated according to the reward score.
[0025] In some embodiments of the present application, based on the above technical solution, generating the second transaction block includes:
[0026] Determine the amount discount ratio according to the accumulated reward points in the second transaction information;
[0027] Calculate the transaction sending amount according to the amount discount ratio and the second transaction amount in the second transaction information;
[0028] A second transaction block is generated according to the transaction sending amount.
[0029] In some embodiments of the present application, based on the above technical solution, the method further includes:
[0030] Obtaining a kindness information set from the institution node, wherein the kindness information set includes the recipient's account information and the required amount;
[0031] The account information of the recipient in the kindness information set and the required amount are displayed to the user.
[0032] According to one aspect of an embodiment of the present application, a blockchain-based transaction device is provided, comprising:
[0033] A first sending module, configured to send first transaction information to N institutional nodes, so that the N institutional nodes endorse the first transaction information to obtain a first endorsement result, wherein the first transaction information includes the account information of the sender, the account information of the first receiver, and the first transaction amount, and N is an integer greater than 1;
[0034] A first generating module, configured to generate a first transaction block and add the first transaction block to a blockchain if the first transaction information satisfies a kindness reward condition, wherein the kindness reward condition includes that the first endorsement result is a successful endorsement, and the first transaction block includes a reward score of the sender;
[0035] A score determination module, used to determine the cumulative reward score of the sender according to the reward score of the sender;
[0036] A second sending module, configured to send second transaction information to the N institution nodes, so that the N institution nodes endorse the second transaction information to obtain a second endorsement result, wherein the second transaction information includes the account information of the sender, the account information of the second recipient, the accumulated reward points of the sender, and the second transaction amount;
[0037] The second generation module is used to generate a second transaction block and add the second transaction block to the blockchain if the second endorsement result is a successful endorsement and the cumulative reward score of the sender is greater than or equal to a preset score.
[0038] In some embodiments of the present application, based on the above technical solution, the first generating module includes:
[0039] An information set acquisition unit, configured to acquire a designated recipient information set from a blockchain, wherein the designated recipient information set includes account information of at least one designated recipient;
[0040] A block generation unit is configured to generate a first transaction block if the account information of the first recipient in the first transaction information is the account information of one of at least one designated recipient included in the designated recipient information set.
[0041] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the blockchain-based transaction method in the above technical solution by executing the executable instructions.
[0042] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, a blockchain-based transaction method as in the above technical solution is implemented.
[0043] In an embodiment of the present application, a first transaction message is sent to N institutional nodes for endorsement, and based on the endorsement result of the first transaction message, a reward score is added to the user. Subsequently, when the small reward score is added, a second transaction message is sent to the N institutional nodes, so that the N institutional nodes endorse the second transaction message, obtain the second endorsement result, and then conduct transactions based on the second endorsement result. The above scheme can conduct the entire process of the management agency issuing rewards and the process of users receiving rewards on the same blockchain, thereby performing online unified management of the data between the management agency and the management system of the institution providing the reward, simplifying the process of data synchronization and transaction, and improving the execution efficiency of the management process.
[0044] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0046] Figure 1 The following schematically shows an exemplary system architecture diagram of the technical solution of the present application in an application scenario;
[0047] Figure 2 This is a flowchart of a blockchain-based transaction method provided in an embodiment of the present application;
[0048] Figure 3 The block diagram schematically shows the composition of the transaction device on the blockchain in the embodiment of the present application;
[0049] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0051] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0053] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0054] Figure 1 The following schematically shows an exemplary system architecture diagram of the technical solution of the present application in an application scenario. Figure 1 As shown, there are multiple servers in this application scenario. Each server is one or more institutional nodes in the blockchain. There is a network connection between the structural nodes, and a blockchain network is formed. The internal structure of each institutional node can also be implemented in the form of a blockchain, so the structural nodes can be implemented in the form of a consortium chain. It is understandable that the above-mentioned server can 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, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0055] The following is a detailed description of the technical solution provided by this application in conjunction with the specific implementation method. For ease of introduction, please refer to Figure 2 , Figure 2This is a flowchart of a blockchain-based transaction method provided in an embodiment of the present application. The method can be applied to the above-mentioned server for execution. The server can be regarded as a computer device. In the embodiment of the present application, the blockchain-based transaction method is introduced with the computer device as the execution subject. The blockchain-based transaction method can include the following steps S210 to S250:
[0056] Step S210 sends the first transaction information to N institutional nodes so that the N institutional nodes endorse the first transaction information to obtain a first endorsement result, wherein the first transaction information includes the account information of the sender, the account information of the first recipient and the first transaction amount, and N is an integer greater than 1.
[0057] The institutional node is the blockchain node corresponding to the management agency in the blockchain. In this application, the blockchain network includes at least one or more nodes of the management agency, which can authenticate the user's good behavior and endorse the transaction proposed by the user. The N institutional nodes can also include nodes corresponding to some institutions that can use the reward points. In this application, the management agency is usually a bank institution, and the institution that can use the reward points can be the bank itself, or it can be other platforms. The nodes corresponding to these platforms and bank institutions can form a blockchain in the form of an alliance chain, where the bank's node is a node with relatively high credibility and serves as an endorsement node in the blockchain. A user's terminal can also be added to the blockchain as a node, and perform good deeds by transferring donations to other nodes in the blockchain. The first transaction information includes the sender's account information, the first recipient's account information and the first transaction amount, where the first recipient's account information and the first transaction amount are the content entered by the user when initiating the transaction. After receiving the first transaction information sent by the user, the institutional node will endorse the transaction. Specifically, the institutional node verifies the legality of the transaction and declares whether the transaction is legal, and generates a first endorsement result corresponding to the first transaction information.
[0058] In step S220, if the first transaction information satisfies the kindness reward condition, a first transaction block is generated and the first transaction block is added to the blockchain, wherein the kindness reward condition includes that the first endorsement result is a successful endorsement, and the first transaction block includes the sender's reward score.
[0059] Specifically, the kindness reward condition is a condition set by the management agency to reward the user's kind behavior, such as donating to a specific account during a specific period. For the content in the first transaction information, a reward score can be calculated, for example, based on the amount, time, and recipient account. When the client confirms that the content in the first transaction information meets the kindness reward condition, it can generate a first transaction block based on the content of the transaction and add the first transaction block to the blockchain, thereby completing the transfer to the recipient account and recording the reward score.
[0060] In one embodiment of the present application, if the first transaction information satisfies the kindness reward conditions, the process of generating the first transaction block may include the following steps: obtaining a designated recipient information set from the blockchain, the designated recipient information set including account information of at least one designated recipient; if the account information of the first recipient in the first transaction information is the account information of one of at least one designated recipient included in the designated recipient information set, then generating a first transaction block.
[0061] In one embodiment of the present application, if the first transaction information meets the kindness reward conditions, the process of generating the first transaction block may include the following steps: obtaining the kindness reward threshold from the blockchain; if the first transaction amount in the first transaction information is greater than the kindness reward threshold, generating the first transaction block.
[0062] In one embodiment of the present application, the process of generating the first transaction block may include the following steps: obtaining a preset reward period, a reward recipient account set, and at least one transaction amount interval from the blockchain; determining a reward coefficient based on whether the sending time of the first transaction information belongs to the preset reward period and the account information of the first recipient in the first transaction information and the reward recipient account set; determining a basic score corresponding to the transaction amount interval based on the transaction amount interval to which the first transaction amount belongs; calculating the reward score based on the basic score and the reward coefficient; generating the first transaction block based on the reward score. Specifically, the reward coefficient corresponding to the user's behavior can be determined based on the sending time and account information. For example, when a major event occurs, the reward coefficient corresponding to the operation of transferring money to a specific receiving account during the duration of the event can be appropriately increased, such as becoming a coefficient of 1.1 or 1.2, so that the user can obtain more reward coefficients without changing the basic score.
[0063] Step S230: determining the cumulative reward score of the sender according to the reward score of the sender;
[0064] The accumulated reward points are used to represent the total reward points in the sender's account. The accumulated reward points can be used to deduct or discount the transaction amount in subsequent transactions.
[0065] Step S240: sending the second transaction information to the N institutional nodes, so that the N institutional nodes endorse the second transaction information to obtain a second endorsement result, wherein the second transaction information includes the account information of the sender, the account information of the second recipient, the accumulated reward points of the sender, and the second transaction amount;
[0066] The second transaction information is the transaction information used for other transactions, such as purchasing products, paying taxes, etc. When conducting such transactions, the accumulated reward points and other content can be added to the second transaction information for the institutional node to endorse the user's transaction. After the endorsement is successful, the sender can use the reward points to obtain the corresponding rewards in the subsequent actual transaction process, such as deducting the corresponding amount or getting a partial discount.
[0067] In step S250, if the second endorsement result is a successful endorsement and the cumulative reward score of the sender is greater than or equal to the preset score, a second transaction block is generated and the second transaction block is added to the blockchain.
[0068] Successful endorsement indicates that the transaction initiated by the sender is legal, that is, the account status of both parties is normal, and the sender also has sufficient transaction amount and other contents. The preset score is the minimum score for using the reward score to obtain the reward. Usually, the preset score can be set to zero. After meeting the above conditions, the sender's client can generate a second transaction block and add the second transaction block to the blockchain. The transaction result recorded in the second transaction block is the result calculated based on the transaction amount and the reward score.
[0069] In one embodiment of the present application, the process of generating a second transaction block may include the following steps: determining an amount discount ratio based on the accumulated reward points in the second transaction information; calculating a transaction sending amount based on the amount discount ratio and the second transaction amount in the second transaction information; and generating a second transaction block based on the transaction sending amount.
[0070] The method further comprises:
[0071] Obtaining a kindness information set from the institution node, wherein the kindness information set includes the recipient's account information and the required amount;
[0072] The account information of the recipient in the kindness information set and the required amount are displayed to the user.
[0073] In an embodiment of the present application, a first transaction message is sent to N institutional nodes for endorsement, and based on the endorsement result of the first transaction message, a reward score is added to the user. Subsequently, when the small reward score is added, a second transaction message is sent to the N institutional nodes, so that the N institutional nodes endorse the second transaction message, obtain the second endorsement result, and then conduct transactions based on the second endorsement result. The above scheme can conduct the entire process of the management agency issuing rewards and the process of users receiving rewards on the same blockchain, thereby performing online unified management of the data between the management agency and the management system of the institution providing the reward, simplifying the process of data synchronization and transaction, and improving the execution efficiency of the management process.
[0074] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0075] The following introduces the device implementation of the present application, which can be used to execute the transaction method on the blockchain in the above-mentioned embodiment of the present application. Figure 3 The block diagram schematically shows the composition of the transaction device in the blockchain in the embodiment of the present application. Figure 3 As shown, the blockchain-based transaction device 300 may mainly include:
[0076] A first sending module 310 is configured to send first transaction information to N institution nodes, so that the N institution nodes endorse the first transaction information to obtain a first endorsement result, wherein the first transaction information includes the account information of the sender, the account information of the first receiver, and the first transaction amount, and N is an integer greater than 1;
[0077] A first generating module 320 is configured to generate a first transaction block and add the first transaction block to a blockchain if the first transaction information satisfies a kindness reward condition, wherein the kindness reward condition includes that the first endorsement result is a successful endorsement, and the first transaction block includes a reward score of the sender;
[0078] A score determination module 330, for determining the cumulative reward score of the sender according to the reward score of the sender;
[0079] A second sending module 340 is used to send second transaction information to the N institutional nodes, so that the N institutional nodes endorse the second transaction information to obtain a second endorsement result, wherein the second transaction information includes the account information of the sender, the account information of the second recipient, the accumulated reward points of the sender, and the second transaction amount;
[0080] The second generation module 350 is used to generate a second transaction block and add the second transaction block to the blockchain if the second endorsement result is a successful endorsement and the cumulative reward score of the sender is greater than or equal to a preset score.
[0081] In some embodiments of the present application, based on the above technical solution, the first generating module includes:
[0082] An information set acquisition unit, configured to acquire a designated recipient information set from a blockchain, wherein the designated recipient information set includes account information of at least one designated recipient;
[0083] A block generation unit is configured to generate a first transaction block if the account information of the first recipient in the first transaction information is the account information of one of at least one designated recipient included in the designated recipient information set.
[0084] In some embodiments of the present application, based on the above technical solution, the first generating module includes:
[0085] Get the kindness reward threshold from the blockchain;
[0086] If the first transaction amount in the first transaction information is greater than the kindness reward threshold, a first transaction block is generated.
[0087] In some embodiments of the present application, based on the above technical solution, the first generating module includes:
[0088] Obtain a preset reward period, a reward recipient account set, and at least one transaction amount range from the blockchain;
[0089] Determine a reward coefficient according to whether the sending time of the first transaction information belongs to the preset reward period and the account information of the first recipient and the reward recipient account set in the first transaction information;
[0090] Determining a basic score corresponding to the transaction amount range according to the transaction amount range to which the first transaction amount belongs;
[0091] Calculating the bonus score according to the basic score and the bonus coefficient;
[0092] A first transaction block is generated according to the reward score.
[0093] In some embodiments of the present application, based on the above technical solution, the second generating module includes:
[0094] Determine the amount discount ratio according to the accumulated reward points in the second transaction information;
[0095] Calculate the transaction sending amount according to the amount discount ratio and the second transaction amount in the second transaction information;
[0096] A second transaction block is generated according to the transaction sending amount.
[0097] In some embodiments of the present application, based on the above technical solution, the blockchain-based transaction device 400 further includes:
[0098] Obtaining a kindness information set from the institution node, wherein the kindness information set includes the recipient's account information and the required amount;
[0099] The account information of the recipient in the kindness information set and the required amount are displayed to the user.
[0100] It should be noted that the apparatus provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0101] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0102] It should be noted that Figure 4 The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0103] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403. Various programs and data required for system operation are also stored in the RAM 403. The CPU 401, the ROM 402 and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0104] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0105] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 409, and / or installed from a removable medium 411. When the computer program is executed by a central processing unit (CPU) 401, various functions defined in the system of the present application are executed.
[0106] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0107] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0108] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0109] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0110] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.
[0111] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A transaction method based on blockchain, characterized in that: include: Sending first transaction information to N institutional nodes so that the N institutional nodes endorse the first transaction information to obtain a first endorsement result, wherein the first transaction information includes the account information of the sender, the account information of the first receiver, and the first transaction amount, and N is an integer greater than 1; If the first transaction information satisfies the kindness reward condition, a first transaction block is generated and added to the blockchain, wherein the kindness reward condition includes that the first endorsement result is a successful endorsement, and the first transaction block includes the sender's reward score; Determining the cumulative reward score of the sender according to the reward score of the sender; Sending second transaction information to the N institution nodes so that the N institution nodes endorse the second transaction information to obtain a second endorsement result, wherein the second transaction information includes the account information of the sender, the account information of the second recipient, the accumulated reward points of the sender, and the second transaction amount; If the second endorsement result is a successful endorsement, and the sender's cumulative reward score is greater than or equal to a preset score, a second transaction block is generated and the second transaction block is added to the blockchain.
2. The method according to claim 1, characterized in that: If the first transaction information meets the kindness reward condition, a first transaction block is generated, including: Obtaining a designated recipient information set from the blockchain, wherein the designated recipient information set includes account information of at least one designated recipient; If the account information of the first recipient in the first transaction information is the account information of one of the at least one designated recipient included in the designated recipient information set, a first transaction block is generated.
3. The method according to claim 1, characterized in that If the first transaction information meets the kindness reward condition, a first transaction block is generated, including: Get the kindness reward threshold from the blockchain; If the first transaction amount in the first transaction information is greater than the kindness reward threshold, a first transaction block is generated.
4. The method according to claim 1, characterized in that: The generating of the first transaction block comprises: Obtain a preset reward period, a reward recipient account set, and at least one transaction amount range from the blockchain; Determine a reward coefficient according to whether the sending time of the first transaction information belongs to the preset reward period and the account information of the first recipient and the reward recipient account set in the first transaction information; Determining a basic score corresponding to the transaction amount range according to the transaction amount range to which the first transaction amount belongs; Calculating the bonus score according to the basic score and the bonus coefficient; A first transaction block is generated according to the reward score.
5. The method according to claim 1, characterized in that The generating of the second transaction block comprises: Determine the amount discount ratio according to the accumulated reward points in the second transaction information; Calculate the transaction sending amount according to the amount discount ratio and the second transaction amount in the second transaction information; A second transaction block is generated according to the transaction sending amount.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Obtaining a kindness information set from the institution node, wherein the kindness information set includes the recipient's account information and the required amount; The account information of the recipient in the kindness information set and the required amount are displayed to the user.
7. A transaction device based on blockchain, characterized in that: include: A first sending module, configured to send first transaction information to N institutional nodes, so that the N institutional nodes endorse the first transaction information to obtain a first endorsement result, wherein the first transaction information includes the account information of the sender, the account information of the first receiver, and the first transaction amount, and N is an integer greater than 1; A first generating module, configured to generate a first transaction block and add the first transaction block to a blockchain if the first transaction information satisfies a kindness reward condition, wherein the kindness reward condition includes that the first endorsement result is a successful endorsement, and the first transaction block includes a reward score of the sender; A score determination module, used to determine the cumulative reward score of the sender according to the reward score of the sender; A second sending module, configured to send second transaction information to the N institution nodes, so that the N institution nodes endorse the second transaction information to obtain a second endorsement result, wherein the second transaction information includes the account information of the sender, the account information of the second recipient, the accumulated reward points of the sender, and the second transaction amount; The second generation module is used to generate a second transaction block and add the second transaction block to the blockchain if the second endorsement result is a successful endorsement and the cumulative reward score of the sender is greater than or equal to a preset score.
8. The device according to claim 7, characterized in that The first generating module comprises: An information set acquisition unit, configured to acquire a designated recipient information set from a blockchain, wherein the designated recipient information set includes account information of at least one designated recipient; A block generation unit is configured to generate a first transaction block if the account information of the first recipient in the first transaction information is the account information of one of at least one designated recipient included in the designated recipient information set.
9. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the blockchain-based transaction method described in any one of claims 1 to 6 by executing the executable instructions.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the blockchain-based transaction method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Reward management method for block chain system, electronic equipment and storage medium
CN111815443A
Transaction method and device based on block chain
CN112163954A
Method and system for processing of a real-time rebate at transaction authorization
US20150112780A1
