Terminal APP traceability verification method, device and readable storage medium
By recording the transaction records of terminal APPs in the blockchain and tracing and verification, the problem that the existing technology cannot effectively prevent APP tampering or counterfeiting is solved, and the secure traceability and efficient verification of APPs are achieved.
Patent Information
- Application Number
- CN202011313058.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-20
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-11-20
AI Technical Summary
The prior art cannot effectively prevent terminal APP from being tampered with or counterfeit, and the digital signature method poses a risk of CA center being attacked and tampered with.
Traceable through the terminal APP transaction records in the blockchain, and the preset consensus mechanism and the immutability of the blockchain are used to ensure the reliability of the transaction records.
It realizes traceability verification of terminal APP, prevents tampering or counterfeiting of APP, and improves the security and credibility of APP.
Smart Images

Figure CN114519207B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile terminal security, and in particular to a terminal APP source tracing verification method, device and readable storage medium. Background Art
[0002] With the rapid growth of mobile terminal devices, terminal APP (Application) has become the main link between Internet business and users. Terminal APP not only carries business service capabilities, but also directly affects the security of user privacy data and user assets (both online and offline).
[0003] Attackers can tamper with or counterfeit terminal apps by modifying in-app purchases, modifying software logic, inserting malicious code, inserting advertisements, copying popular app icons or names, etc. In order to prevent terminal apps from being tampered with or counterfeited, there are currently two main ways to prevent it. One method is to reinforce the software, usually using obfuscation, shelling and other technologies. Another method is to use digital signatures, where the CA (Certificate Authority) center issues digital certificates to certified terminal apps, developers use digital certificates to sign the apps, and the channel is responsible for verifying the terminal apps.
[0004] The existing methods of reinforcing terminal apps are a repeated game of security technology between the attacker and the defender. So far, the reinforcement technology has gone through more than three generations of changes. This method requires continuous updating of the terminal app reinforcement method. If the developer does not have strong security capabilities, it is still impossible to prevent the terminal app from being tampered with or counterfeited. Although the use of digital signatures can achieve APP protection and traceability, the CA center is at risk of being attacked and tampered with, and it is also impossible to prevent the terminal app from being tampered with or counterfeited. Summary of the invention
[0005] In view of the above-mentioned technical problems existing in the prior art, an embodiment of the present invention provides a terminal APP traceability verification method, device and readable storage medium.
[0006] In a first aspect, an embodiment of the present invention provides a terminal APP source tracing verification method, including:
[0007] Get the terminal APP transaction records in the blockchain;
[0008] Based on the transaction record of the terminal APP, the terminal APP is traced and verified;
[0009] Among them, the terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain.
[0010] Optionally, according to a terminal APP traceability verification method according to an embodiment of the present invention, the blockchain includes a terminal APP operation-related party node;
[0011] The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, specifically including:
[0012] Determine the blockchain consensus node based on the node of the terminal APP operation related party;
[0013] Determine the consensus master node based on the preset terminal APP operation stakeholder weights;
[0014] Based on the consensus voting result of the blockchain consensus node, the block established by the consensus master node is put on the chain; the block established by the consensus master node includes the terminal APP transaction record;
[0015] Among them, the parties involved in the terminal APP operation include: APP developers, APP monitors, APP sellers and consumer associations.
[0016] Optionally, according to the terminal APP traceability verification method of an embodiment of the present invention, the terminal APP transaction record is recorded in the blockchain based on a preset consensus mechanism of the blockchain, and further includes:
[0017] Based on the preset dynamic window period T of the blockchain consensus node, the blockchain consensus node is re-determined from the nodes of the terminal APP operation related parties.
[0018] Optionally, according to a terminal APP traceability verification method according to an embodiment of the present invention, determining a blockchain consensus node based on the terminal APP operation-related party node specifically includes:
[0019] Based on the preset fault tolerance value f, f nodes are selected from the APP developer node, APP monitoring node, and APP seller node, and 1 node is selected from the consumer association node as the blockchain consensus node.
[0020] Optionally, according to a terminal APP traceability verification method according to an embodiment of the present invention, the block of the blockchain includes a block header and a block body, the block header includes a hash value of the previous block, a transaction Merkle tree root of the current block body, a timestamp, and a signature generated by the building node based on the block header information, and the block body includes several terminal APP transaction records; the terminal APP transaction records include transaction type, transaction time, and APP hash value; the transaction types include release, pre-installation, listing, and offline.
[0021] Optionally, according to a terminal APP source tracing verification method according to an embodiment of the present invention, the source tracing verification of the terminal APP based on the terminal APP transaction record specifically includes:
[0022] Based on the terminal APP information, determine the target block for storing the terminal APP transaction record;
[0023] Based on the signature of the target block's building node and the Merkle tree root in the target block's header, confirm whether the APP hash value in the target block has been tampered with;
[0024] In the case where the APP hash value in the target block has not been tampered with, determining whether the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software;
[0025] When the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software, determine whether there is a first target transaction record of the terminal APP in the target block and no offline transaction record;
[0026] When the first target transaction record of the terminal APP exists in the target block and no offline transaction record exists, it is determined that the terminal APP passes the verification.
[0027] Optionally, according to a terminal APP traceability verification method according to an embodiment of the present invention, the dynamic window period T of the preset blockchain consensus node is a preset duration or a preset number of blocks.
[0028] In a second aspect, an embodiment of the present invention further provides a terminal APP source tracing verification device, comprising:
[0029] The transaction record acquisition module is used to obtain the terminal APP transaction records in the blockchain;
[0030] A traceability verification module, used to perform traceability verification on the terminal APP based on the terminal APP transaction record;
[0031] Among them, the terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain.
[0032] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method provided in the first aspect are implemented.
[0033] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method provided in the first aspect above.
[0034] The terminal APP traceability verification method, device and readable storage medium provided in the embodiments of the present invention perform traceability verification on the terminal APP through the terminal APP transaction records in the blockchain. The terminal APP transaction records are recorded in the blockchain based on the preset consensus mechanism of the blockchain. The preset consensus mechanism is used to ensure the normal operation of the blockchain. At the same time, the tamper-proof nature of the blockchain is used to ensure the reliability of the terminal APP transaction records, thereby realizing terminal APP traceability verification and preventing terminal APP from being tampered with or counterfeited. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 It is a flow chart of a terminal APP source tracing verification method provided by an embodiment of the present invention;
[0037] Figure 2 It is a blockchain network architecture provided by an embodiment of the present invention;
[0038] Figure 3 It is a blockchain platform architecture provided by an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of the chain-up process of an APP publishing transaction records provided by an embodiment of the present invention;
[0040] Figure 5 This is a schematic diagram of a chain-up process of APP pre-installation & listing transaction records provided by an embodiment of the present invention;
[0041] Figure 6 This is a schematic diagram of a chain-up process of an APP offline transaction record provided by an embodiment of the present invention;
[0042] Figure 7 This is a schematic diagram of a terminal APP traceability verification business process provided by an embodiment of the present invention;
[0043] Figure 8 This is a schematic diagram of an improved practical Byzantine consensus mechanism process provided by an embodiment of the present invention;
[0044] Fig. 9 It is a structural diagram of a terminal APP source tracing verification device provided by an embodiment of the present invention;
[0045] Fig.10 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] The existing technology cannot prevent the terminal APP from being tampered with or counterfeited. In this regard, an embodiment of the present invention provides a terminal APP traceability verification method. Figure 1 A schematic diagram of a terminal APP source tracing verification method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes:
[0048] Step 110, obtaining the terminal APP transaction record in the blockchain.
[0049] Specifically, the full life cycle of terminal APP includes five stages: APP release, terminal device pre-installation, application store listing, user installation and use, and APP offline. These five stages involve multiple stakeholders, including APP developers, APP regulatory agencies, terminal device sellers, APP application stores, users, consumer associations, etc., which together form the terminal APP operation ecosystem.
[0050] The main activities of APP developers are to develop APPs, initiate APP releases and offline transactions, etc. The main activities of APP monitoring parties are to review and conduct security tests on APPs to be released, etc. APP sellers include terminal equipment sellers and APP application malls. Among them, the main activities of terminal equipment sellers are to pre-install and delete APPs in terminal equipment to be sold, etc.; the main activities of APP application malls are to put APPs on the shelves and offline in the mall.
[0051] All kinds of activities involved in the terminal APP operation cycle, including APP release, APP pre-installation & listing, and APP offline business transaction records are stored in the blockchain, which fully records various activities in the terminal APP operation cycle. Based on the immutability of the blockchain, it provides a comprehensive, complete and reliable analysis basis for APP traceability verification. To achieve traceability verification, the terminal APP traceability verification device first needs to obtain the terminal APP transaction records in the blockchain.
[0052] Step 120, based on the terminal APP transaction record, perform traceability verification on the terminal APP;
[0053] Among them, the terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain.
[0054] Specifically, terminal device vendors, APP application stores and users can use the terminal APP traceability verification device to trace the terminal APP. The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain to ensure the normal operation of the blockchain and accurately record the transaction record of the terminal APP.
[0055] The method provided by the embodiment of the present invention performs traceability verification on the terminal APP through the terminal APP transaction record in the blockchain. The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain. The preset consensus mechanism is used to ensure the normal operation of the blockchain. At the same time, the tamper-proof nature of the blockchain is used to ensure the reliability of the terminal APP transaction record, thereby realizing terminal APP traceability verification and preventing terminal APP from being tampered with or counterfeited.
[0056] Based on the above embodiment, the blockchain includes a terminal APP operation-related party node;
[0057] The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, specifically including:
[0058] Determine the blockchain consensus node based on the node of the terminal APP operation related party;
[0059] Determine the consensus master node based on the preset terminal APP operation stakeholder weights;
[0060] Based on the consensus voting result of the blockchain consensus node, the block established by the consensus master node is put on the chain; the block established by the consensus master node includes the terminal APP transaction record;
[0061] Among them, the parties involved in the terminal APP operation include: APP developers, APP monitors, APP sellers and consumer associations.
[0062] Specifically, Figure 2 FIG. 1 is a block chain network architecture provided by an embodiment of the present invention. Figure 2 As shown, the blockchain includes nodes related to terminal APP operation, namely, APP developer node, APP monitoring node, APP seller node and consumer association node. Figure 3 FIG. 1 is a block chain platform architecture provided by an embodiment of the present invention. Figure 3 As shown in the figure, the blockchain platform is implemented by a three-layer architecture, which is the application layer, business layer and data layer from top to bottom. Among them, the data layer includes the ledger and terminal APP database for storing various transactions, the business layer includes the records of the business processes of the parties involved in the APP operation on the chain and the APP traceability verification activities, and the application layer supports the realization of platform management functions such as registration, transaction, and application management.
[0063] The existing blockchain mainly adopts the practical Byzantine consensus mechanism, which adopts permission voting and minority obeys majority to elect leaders for accounting. Since the fault tolerance rate of the practical Byzantine consensus mechanism is 33%, in order to resist collusion attacks, the preset consensus mechanism adopts an improved practical Byzantine consensus mechanism. Specifically: the terminal APP traceability verification device first determines the blockchain consensus node based on the terminal APP operation-related party node, and then determines the consensus master node based on the preset terminal APP operation-related party weight. The consensus master node establishes a block including the terminal APP transaction record, and based on the consensus voting results of all blockchain consensus nodes, the block is put on the chain. If the voting result is passed, that is, a consensus is reached, the block can be put on the chain and the transaction record can be stored.
[0064] The method provided by the embodiment of the present invention determines the blockchain consensus node based on the terminal APP operation-related party node, determines the consensus master node based on the preset terminal APP operation-related party weight, and puts the block established by the consensus master node on the chain based on the consensus voting result of the blockchain consensus node. It can ensure the normal operation of the blockchain, ensure the accurate recording of transaction records, provide basic guarantees for subsequent terminal APP traceability verification, and prevent terminal APP tampering or counterfeiting.
[0065] Based on the above embodiment, the terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, and also includes:
[0066] Based on the preset dynamic window period T of the blockchain consensus node, the blockchain consensus node is re-determined from the nodes of the terminal APP operation related parties.
[0067] Specifically, although the Byzantine fault tolerance algorithm assumes that the number of honest nodes is greater than 2 / 3 and the number of dishonest nodes is no more than 1 / 3, when the blockchain network is subject to serious security threats or complex and varied attacks, the accumulation of these complex threats and attacks over a certain period of time will cause the assumption of the Byzantine fault tolerance algorithm to no longer hold. Reselecting blockchain consensus nodes can effectively reduce the probability of such cumulative effects. Based on this, a dynamic window period T of blockchain consensus nodes is set, and once it expires, the blockchain consensus nodes are re-determined from the node group of the terminal APP operation-related parties.
[0068] The method provided in the embodiment of the present invention, by redetermining the blockchain consensus node from the nodes of the terminal APP operation-related parties based on the dynamic window period T of the preset blockchain consensus node, can avoid the assumption of the Byzantine fault tolerance algorithm no longer being valid when the blockchain is subjected to cumulative attacks for a certain period of time, resulting in the blockchain being unable to work normally, providing basic protection for subsequent terminal APP traceability verification, and preventing terminal APP from being tampered with or counterfeited.
[0069] Based on the above embodiment, based on the terminal APP operation related party node, determining the blockchain consensus node specifically includes:
[0070] Based on the preset fault tolerance value f, f nodes are selected from the APP developer node, APP monitoring node, and APP seller node, and 1 node is selected from the consumer association node as the blockchain consensus node.
[0071] Specifically, the practical Byzantine consensus mechanism is improved, and the accounting nodes are divided into APP developer node group, APP monitoring node group, APP seller node group and consumer association node group according to the maintenance party. The terminal APP traceability verification device first selects (3f+1) blockchain consensus nodes from the four node groups. The APP developer, APP monitoring party and APP seller each have f nodes to participate in the blockchain consensus process. The consumer association represents the interests of the end users and has 1 node to participate in the blockchain consensus process. Based on this improvement, even if all f blockchain consensus nodes of any node group of the APP developer, APP monitoring party and APP seller collude to cheat, as long as the other consensus nodes work normally, that is, (2f+1) work normally, according to the Byzantine fault tolerance algorithm, the blockchain can still work normally at this time.
[0072] The method provided by the embodiment of the present invention, based on a preset fault tolerance value f, selects f nodes from the APP developer node, the APP monitoring node, and the APP seller node, and selects 1 node from the consumer association node as the blockchain consensus node. It can maintain the normal operation of the blockchain when all blockchain consensus nodes of any node group among the APP developer, the APP monitoring party, and the APP seller collude to cheat, provide basic guarantees for subsequent terminal APP traceability verification, and prevent terminal APP from being tampered with or counterfeited.
[0073] Based on the above embodiment, the block of the blockchain includes a block header and a block body, the block header includes the hash value of the previous block, the transaction Merkle tree root of the current block body, a timestamp, and a signature generated by the building node based on the block header information, and the block body includes several terminal APP transaction records; the terminal APP transaction records include transaction type, transaction time, and APP hash value; the transaction types include release, pre-installation, listing, and offline.
[0074] Specifically, the basic unit of blockchain is block. Each block includes block header and block body. The block header contains the hash value of the previous block, the transaction Merkle tree root of the current block body, the timestamp and the signature of the block-building node based on the block header information. The block body consists of several ordered terminal APP transaction records. The block-building node collects a certain amount of transaction records of activities in the terminal APP operation cycle for a certain period of time, packages them into blocks, and broadcasts them to other consensus nodes for consensus. The content of each terminal APP transaction record is shown in Table 1, where the transaction types are divided into four categories: release, pre-installation, listing and offline. The APP software summary is the APP software hash value, which is the unique identifier of the APP.
[0075] Table 1 Terminal APP transaction record content
[0076]
[0077] The method provided by the embodiment of the present invention, through the block header including the hash value of the previous block, the transaction Merkle tree root of the current block body, the timestamp and the signature generated by the building node based on the block header information, the terminal APP transaction record includes the transaction type, transaction time, and APP hash value, which can facilitate and quickly find the terminal APP transaction record information and improve the efficiency of terminal APP traceability verification. At the same time, the transaction Merkle tree root, timestamp and the signature information generated by the building node based on the block header information can prevent the terminal APP from being tampered with or counterfeited.
[0078] Based on the above embodiment, the traceability verification of the terminal APP based on the terminal APP transaction record specifically includes:
[0079] Based on the terminal APP information, determine the target block for storing the terminal APP transaction record;
[0080] Based on the signature of the target block's building node and the Merkle tree root in the target block's header, confirm whether the APP hash value in the target block has been tampered with;
[0081] In the case where the APP hash value in the target block has not been tampered with, determining whether the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software;
[0082] When the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software, determine whether there is a first target transaction record of the terminal APP in the target block and no offline transaction record;
[0083] When the first target transaction record of the terminal APP exists in the target block and no offline transaction record exists, it is determined that the terminal APP passes the verification.
[0084] Specifically, Figure 4-6 The following are schematic diagrams of the chain process of APP release, APP pre-installation & listing, and APP offline transaction records provided by the embodiments of the present invention. Figure 4 FIG. 1 is a schematic diagram of the on-chain process of an APP publishing transaction records provided by an embodiment of the present invention, such as Figure 4 As shown, it is initiated by the APP developer and the recipient is the APP monitoring party. The APP monitoring party reviews the qualifications of the APP developer, compares the APP to be released with the published APP database in the blockchain, verifies whether it is unreleased, and evaluates the functions, performance, security, etc. of the APP. After the APP passes the evaluation, the APP monitoring party uploads the hash summary and other characteristic information of the APP to the blockchain database before signing the transaction and uploading the transaction record to the blockchain.
[0085] like Figure 5 FIG. 1 is a schematic diagram of the chain flow of APP pre-installation & listing transaction records provided by an embodiment of the present invention, as shown in FIG. Figure 5 As shown in the figure, the initiators of this type of transaction are terminal device vendors and APP application stores, and the recipients are the corresponding APP developers. Before pre-installing and putting APPs on the shelves, terminal device vendors and APP application stores need to verify the source of the APPs, pre-install and put the verified APPs on the shelves, and after the pre-installation and putting them on the shelves, the developer signs and approves the transaction and uploads the transaction record to the blockchain.
[0086] like Figure 6 FIG. 1 is a schematic diagram of the chain process of the offline transaction record of the APP provided by the embodiment of the present invention, as shown in FIG. Figure 6 As shown, it is initiated by the developer of the APP, and the recipient is the terminal device seller and APP application store with pre-installed & listed transaction records. The recipient of the offline transaction should complete the offline of the APP, sign the transaction, and upload the transaction record to the blockchain.
[0087] like Figure 7 The figure is a schematic diagram of a terminal APP traceability verification business process provided by an embodiment of the present invention. Figure 7 The method described in any of the above embodiments is further described as follows:
[0088] like Figure 7 As shown, ordinary users, terminal equipment sellers and APP application stores can all initiate APP traceability verification business processes to prevent tampering or counterfeiting. Before pre-installing and putting the target terminal APP on the shelves, terminal equipment sellers and APP application stores can verify the target terminal APP through the terminal APP traceability verification device: according to the APP information, find out whether there is a release transaction record of the relevant developer on the blockchain and there is no offline transaction, and verify whether the APP hash value recorded on the chain is consistent with the hash value calculated according to the APP software and has not been tampered with; and whether the APP hash value recorded on the chain has been tampered with is verified by calculating the transaction Merkle tree root in the block where the APP is located, and verifying whether it is consistent with the Merkle tree root in the block header of the block; whether the Merkle tree root in the block header of the block has been tampered with is further confirmed by verifying the signature of the block-building node and the hash value of the latter block pointing to this block.
[0089] Before downloading the APP, ordinary users can also verify the target terminal APP through the terminal APP traceability verification device: check on the blockchain whether there are transaction records initiated by terminal equipment sellers and APP application stores to pre-install and put the target terminal APP on the shelves. If so, continue to search for offline transaction records of the target terminal APP. If not, the verification is passed and it can be downloaded and installed.
[0090] The method provided by the embodiment of the present invention confirms whether the APP hash value in the target block has been tampered with based on the signature of the building node of the target block and the Merkle tree root in the block header of the target block. If the APP hash value in the target block has not been tampered with, it is determined whether the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software. If the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software, it is determined whether the terminal APP has passed the verification based on the transaction record of the terminal APP, which can prevent tampering or counterfeiting of the terminal APP to the greatest extent.
[0091] Based on the above embodiment, the dynamic window period T of the preset blockchain consensus node is a preset duration or a preset number of blocks.
[0092] Specifically, the dynamic window period setting can be based on time, such as weeks or months; it can also be based on the number of blocks built, such as every 10 blocks. The dynamic window period can be adjusted according to the actual operation situation to reduce the probability of failure of the blockchain consensus mechanism.
[0093] The method provided by the embodiment of the present invention can flexibly adjust the dynamic window period T of the preset blockchain consensus node as a preset duration or a preset number of blocks, thereby reducing the probability of failure of the blockchain consensus mechanism, providing a basic guarantee for subsequent terminal APP traceability verification, and preventing terminal APP tampering or counterfeiting.
[0094] Figure 8 : is a schematic diagram of the improved practical Byzantine consensus mechanism provided by an embodiment of the present invention, such as Figure 8 As shown, the specific process is as follows:
[0095] 1. Based on the Byzantine fault tolerance algorithm, we improve it and select (3f+1) blockchain consensus nodes from 4 node groups. Assume that the fault tolerance of the blockchain is f nodes, and the number of nodes in each node group i (i=1, 2, 3, 4) is N. i ≥f, randomly select f blockchain consensus nodes from each of the three node groups of APP developer, APP monitor, and APP seller, and randomly select 1 blockchain consensus node from the consumer association node group. The total number of blockchain consensus nodes selected is (3f+1).
[0096] Second, based on the principle of compatibility between autonomy and regulatory governance, select the consensus master node from the (3f+1) blockchain consensus nodes. The (3f+1) blockchain consensus nodes from the APP developer node group, APP monitoring node group, APP seller node group and consumer association node group, on the one hand, each party has its own key, independently verifies transaction information, signatures, and votes, and after reaching a consensus, the block is uploaded to the chain and stored independently. On the other hand, according to the governance strength of the blockchain system, different weights are assigned to the APP developer, APP monitoring party, APP seller and consumer association, and based on the weight W i (i=1, 2, 3, 4) (for example, APP developer 40, APP monitor 30, APP seller 20, consumer association 10) uses a random selection method to select a consensus master node, which executes block building.
[0097] 3. According to the consensus window principle, (3f+1) blockchain consensus nodes are re-selected from the 4 node groups when the window expires. Set the dynamic window period T of the blockchain consensus node. Once it expires, (3f+1) blockchain consensus nodes are re-selected from the 4 node groups, as described in step 1.
[0098] Based on any of the above embodiments, Fig. 9 A schematic diagram of a terminal APP source tracing verification device provided by an embodiment of the present invention, such as Fig. 9 As shown, the device comprises:
[0099] The transaction record acquisition module 910 is used to obtain the terminal APP transaction record in the blockchain.
[0100] Specifically, in order to implement traceability verification, the terminal APP traceability verification device first needs to obtain the terminal APP transaction record in the blockchain through the transaction record acquisition module 910.
[0101] A traceability verification module 920 is used to perform traceability verification on the terminal APP based on the terminal APP transaction record;
[0102] Among them, the terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain.
[0103] Specifically, the terminal device vendor, the APP application store and the user may utilize the traceability verification module 920 to perform traceability verification on the terminal APP.
[0104] The device provided by the embodiment of the present invention performs traceability verification on the terminal APP through the terminal APP transaction record in the blockchain. The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain. The preset consensus mechanism is used to ensure the normal operation of the blockchain. At the same time, the tamper-proof nature of the blockchain is used to ensure the reliability of the terminal APP transaction record, thereby realizing terminal APP traceability verification and preventing terminal APP from being tampered with or counterfeited.
[0105] Based on the above embodiment, the blockchain includes a terminal APP operation-related party node;
[0106] The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, specifically including:
[0107] Determine the blockchain consensus node based on the node of the terminal APP operation related party;
[0108] Determine the consensus master node based on the preset terminal APP operation stakeholder weights;
[0109] Based on the consensus voting result of the blockchain consensus node, the block established by the consensus master node is put on the chain; the block established by the consensus master node includes the terminal APP transaction record;
[0110] Among them, the parties involved in the terminal APP operation include: APP developers, APP monitors, APP sellers and consumer associations.
[0111] Based on the above embodiment, the terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, and also includes:
[0112] Based on the preset dynamic window period T of the blockchain consensus node, the blockchain consensus node is re-determined from the nodes of the terminal APP operation related parties.
[0113] Based on the above embodiment, based on the terminal APP operation related party node, determining the blockchain consensus node specifically includes:
[0114] Based on the preset fault tolerance value f, f nodes are selected from the APP developer node, APP monitoring node, and APP seller node, and 1 node is selected from the consumer association node as the blockchain consensus node.
[0115] Based on the above embodiment, the block of the blockchain includes a block header and a block body, the block header includes the hash value of the previous block, the transaction Merkle tree root of the current block body, a timestamp, and a signature generated by the building node based on the block header information, and the block body includes several terminal APP transaction records; the terminal APP transaction records include transaction type, transaction time, and APP hash value; the transaction types include release, pre-installation, listing, and offline.
[0116] Based on the above embodiment, the traceability verification of the terminal APP based on the terminal APP transaction record specifically includes:
[0117] Based on the terminal APP information, determine the target block for storing the terminal APP transaction record;
[0118] Based on the signature of the target block's building node and the Merkle tree root in the target block's header, confirm whether the APP hash value in the target block has been tampered with;
[0119] In the case where the APP hash value in the target block has not been tampered with, determining whether the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software;
[0120] When the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software, determine whether there is a first target transaction record of the terminal APP in the target block and no offline transaction record;
[0121] When the first target transaction record of the terminal APP exists in the target block and no offline transaction record exists, it is determined that the terminal APP passes the verification.
[0122] Based on the above embodiment, the dynamic window period T of the preset blockchain consensus node is a preset duration or a preset number of blocks.
[0123] The terminal APP traceability verification device provided in the embodiment of the present invention can execute the above-mentioned terminal APP traceability verification method. Its specific working principle and corresponding technical effects are the same as those of the above-mentioned method embodiment, and will not be repeated here.
[0124] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute the step flow provided in the above method embodiment.
[0125] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0126] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the step flow provided in the above method embodiment is implemented.
[0127] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A terminal APP traceability verification method, characterized in that: include: Get the terminal APP transaction records in the blockchain; Based on the transaction record of the terminal APP, the terminal APP is traced and verified; Wherein, the terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain; The blockchain includes nodes related to terminal APP operation; The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, specifically including: Determine the blockchain consensus node based on the node of the terminal APP operation related party; Determine the consensus master node based on the preset terminal APP operation stakeholder weights; Based on the consensus voting result of the blockchain consensus node, the block established by the consensus master node is put on the chain; the block established by the consensus master node includes the terminal APP transaction record; Among them, the parties involved in the terminal APP operation include: APP developers, APP monitors, APP sellers and consumer associations; The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, and also includes: Based on the preset dynamic window period T of the blockchain consensus node, redetermine the blockchain consensus node from the nodes of the terminal APP operation related parties; Based on the nodes of the terminal APP operation related parties, the blockchain consensus nodes are determined, including: Based on preset tolerance values f , respectively from the APP developer node, APP monitoring node, and APP seller node f Nodes, select one node from the consumer association nodes as the blockchain consensus node.
2. The terminal APP source tracing verification method according to claim 1 is characterized in that: The block of the blockchain includes a block header and a block body. The block header contains the hash value of the previous block, the transaction Merkle tree root of the current block body, a timestamp, and a signature generated by the block building node based on the block header information. The block body contains several terminal APP transaction records; the terminal APP transaction records include transaction type, transaction time, and APP hash value; the transaction types include release, pre-installation, listing, and offline.
3. The terminal APP source tracing verification method according to claim 2 is characterized in that: The tracing verification of the terminal APP based on the terminal APP transaction record specifically includes: Based on the terminal APP information, determine the target block for storing the terminal APP transaction record; Based on the signature of the target block's building node and the Merkle tree root in the target block's header, confirm whether the APP hash value in the target block has been tampered with; In the case where the APP hash value in the target block has not been tampered with, determining whether the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software; When the APP hash value in the target block is consistent with the APP hash value determined based on the terminal APP software, determine whether there is a first target transaction record of the terminal APP in the target block and no offline transaction record; When the first target transaction record of the terminal APP exists in the target block and no offline transaction record exists, it is determined that the terminal APP passes the verification.
4. The terminal APP source tracing verification method according to claim 1 is characterized in that: The dynamic window period T of the preset blockchain consensus node is a preset duration or a preset number of blocks.
5. A terminal APP traceability verification device, characterized in that: include: The transaction record acquisition module is used to obtain the terminal APP transaction records in the blockchain; A traceability verification module, used to perform traceability verification on the terminal APP based on the terminal APP transaction record; Wherein, the terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain; The blockchain includes nodes related to terminal APP operation; The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, specifically including: Determine the blockchain consensus node based on the node of the terminal APP operation related party; Determine the consensus master node based on the preset terminal APP operation stakeholder weights; Based on the consensus voting result of the blockchain consensus node, the block established by the consensus master node is put on the chain; the block established by the consensus master node includes the terminal APP transaction record; Among them, the parties involved in the terminal APP operation include: APP developers, APP monitors, APP sellers and consumer associations; The terminal APP transaction record is recorded in the blockchain based on the preset consensus mechanism of the blockchain, and also includes: Based on the preset dynamic window period T of the blockchain consensus node, redetermine the blockchain consensus node from the nodes of the terminal APP operation related parties; Based on the nodes of the terminal APP operation related parties, the blockchain consensus nodes are determined, including: Based on preset tolerance values f , respectively from the APP developer node, APP monitoring node, and APP seller node f Nodes, select one node from the consumer association nodes as the blockchain consensus node.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the terminal APP traceability verification method as described in any one of claims 1 to 4 are implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the terminal APP traceability verification method as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
A fruit and vegetable agricultural product quality safety traceability system based on a block chain
CN109191003A
A shared economic accounting method based on a block chain
CN109685504A