Software program verification method, electronic device and storage medium

By recording the identification code, hash value and verification code of the software program on the blockchain, encrypting operations and comparison, the problem of pirated software being solved by forging the unique identification code and hash value of the device is realized, and the effectiveness of the software program is achieved Verification and copyright protection.

CN114065140BActive Publication Date: 2025-01-14FU TAI HUA IND SHENZHEN +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010773973.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-04
Publication Date
2025-01-14
Estimated Expiration
2040-08-04

AI Technical Summary

Technical Problem

By obtaining the hash value of the genuine software and the unique identification code of the forged device, pirated software programs can pass verification and use, causing huge losses to software development companies, and the existing technology is difficult to effectively solve this problem.

Method used

By obtaining the identification code and hash value of the software program, performing encryption operations to generate verification code, writing it to the blockchain, and comparing the hash value and verification code of the verification software program to determine whether it is consistent with the genuine software , if inconsistent, send alarm information to improve the cracking difficulty and verification accuracy of the software program.

Benefits of technology

Effectively verify the authenticity of the software program, improve the difficulty of cracking and verification accuracy of the software program, and ensure the copyright security of the software development company.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114065140B_ABST
    Figure CN114065140B_ABST
Patent Text Reader

Abstract

The present invention provides a software program verification method, including obtaining a first identification code and a first hash value of a first software program; performing an encryption operation on the first identification code and the first hash value to generate a first verification code; writing the first identification code, the first hash value and the first verification code into a blockchain; obtaining a second identification code of a second software program to be verified and calculating a second hash value of the second software program; determining whether the second hash value is the same as the first hash value; when the second hash value is the same as the first hash value, performing the encryption operation on the second identification code and the second hash value to generate a second verification code; determining whether the second verification code is the same as the first verification code; and when the second verification code is the same as the first verification code, determining that the second software program is a genuine program. The present invention also provides an electronic device and a storage medium. The present invention improves the difficulty of cracking software programs and the accuracy of verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software program management, and in particular to a software program verification method, an electronic device and a storage medium. Background Art

[0002] As a shared database, blockchain is decentralized, unforgeable, and traceable, making it suitable for recording important information. Based on this, many companies record key information of developed software programs, such as device unique identification codes and hash values, on the blockchain to verify whether the software programs available on the market are genuine. However, pirates can obtain hash values ​​through genuine software programs and use forged device unique identification codes to write the information of pirated software programs into the blockchain, so that pirated software programs can also pass verification and be used, causing huge losses to software program development companies. Summary of the invention

[0003] In view of this, it is necessary to provide a software program verification method, an electronic device and a storage medium, which can verify whether the software program is a genuine program through a unique device identification code, a hash value and a verification code.

[0004] A first aspect of the present invention provides a software program verification method, comprising:

[0005] Obtaining a first identification code and a first hash value of a first software program;

[0006] Performing an encryption operation on the first identification code and the first hash value to generate a first verification code;

[0007] Writing the first identification code, the first hash value, and the first verification code into the blockchain as verification information of the first software program;

[0008] Obtaining a second identification code of a second software program to be verified and calculating a second hash value of the second software program;

[0009] determining whether a second hash value of the second software program is the same as the first hash value;

[0010] When it is determined that the second hash value of the second software program is the same as the first hash value, performing the encryption operation on the second identification code and the second hash value to generate a second verification code;

[0011] determining whether the second verification code is the same as the first verification code; and

[0012] When it is determined that the second verification code is the same as the first verification code, the second software program is determined to be a genuine program.

[0013] Preferably, the method further comprises:

[0014] When it is determined that the second hash value of the second software program is different from the first hash value, or when it is determined that the second verification code is different from the first verification code, it is determined that the second software program is not a genuine program.

[0015] Preferably, the method further comprises:

[0016] When it is determined that the second software program is not a genuine program, an alarm message is sent to the developer of the first software program.

[0017] Preferably, performing encryption operation on the first identification code and the first hash value to generate a first verification code comprises:

[0018] An exclusive OR operation is performed on the first identification code and the first hash value to generate the first verification code.

[0019] Preferably, performing encryption operation on the first identification code and the first hash value to generate a first verification code comprises:

[0020] The first identification code and the first hash value are added together and the last 16 bits are taken to generate the first verification code.

[0021] Preferably, the method further comprises:

[0022] Encapsulating the encryption operation into a QR code algorithm; and

[0023] The two-dimensional code algorithm is executed on the first identification code and the first hash value to generate the first verification code.

[0024] Preferably, writing the first identification code, the first hash value and the first verification code into the blockchain as verification information of the first software program comprises:

[0025] Calculating a transaction hash value of the verification information; and

[0026] The verification information and the transaction hash value are packaged into a transaction record and written into the blockchain according to the smart contract.

[0027] Preferably, the method further comprises:

[0028] When the user downloads the second software program through the terminal device and determines that the second software program is a genuine program, a download instruction is sent to the terminal device to allow the second software program to be downloaded to the terminal device.

[0029] A second aspect of the present invention provides an electronic device, the electronic device comprising:

[0030] Processor; and

[0031] A memory, wherein a plurality of program modules are stored in the memory, and the plurality of program modules are loaded by the processor and execute the above-mentioned software program verification method.

[0032] A third aspect of the present invention provides a computer-readable storage medium having at least one computer instruction stored thereon, wherein the instruction is loaded by a processor and executes the above-mentioned software program verification method.

[0033] The above-mentioned software program verification method, electronic device and storage medium verify whether the software program is a genuine program through the device unique identification code, hash value and verification code. The verification code can establish an association between the device unique identification code and hash value of the software program in the blockchain, thereby improving the difficulty of cracking the software program and the accuracy of verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0035] Figure 1 It is a schematic diagram of the application environment architecture of the software program verification method provided by the preferred embodiment of the present invention.

[0036] Figure 2 It is a schematic diagram of the structure of an electronic device provided by a preferred embodiment of the present invention.

[0037] Figure 3 It is a structural diagram of a software program verification system provided by a preferred embodiment of the present invention.

[0038] Figure 4 It is a flowchart of a software program verification method provided by a preferred embodiment of the present invention.

[0039] Main component symbols

[0040] Electronic device 1

[0041] Processor 10

[0042] Software program verification system 100

[0043] Get Module 101

[0044] Generation module 102

[0045] Recording module 103

[0046] Determination module 104

[0047] Determination module 105

[0048] Sending module 106

[0049] Download module 107

[0050] Memory 20

[0051] Computer Program 30

[0052] Terminal device 2

[0053] Steps S401-S411

[0054] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0055] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0056] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than 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.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0058] See also Figure 1 , which is a schematic diagram of the application environment architecture of the software program verification method provided in a preferred embodiment of the present invention.

[0059] The software program verification method of the present invention is applied in an electronic device 1, and the electronic device 1 establishes a communication connection with at least one terminal device 2 through a network. The network can be a wired network or a wireless network, such as radio, wireless fidelity (WIFI), cellular, satellite, broadcast, etc.

[0060] The electronic device 1 may be an electronic device installed with a software program verification program, such as a personal computer, a server, etc., wherein the server may be a single server, a server cluster, or a cloud server, etc.

[0061] The terminal device 2 can be a smart phone or a personal computer.

[0062] See also Figure 2 FIG. 1 is a schematic diagram of the structure of a preferred embodiment of the electronic device of the present invention.

[0063] The electronic device 1 includes, but is not limited to, a processor 10, a memory 20, and a computer program 30 stored in the memory 20 and executable on the processor 10, such as a software program verification program. When the processor 10 executes the computer program 30, steps in the software program verification method are implemented, such as Figure 4 Alternatively, when the processor 10 executes the computer program 30, the functions of each module / unit in the software program verification system are realized, for example Figure 3 Modules 101-107 in.

[0064] Exemplarily, the computer program 30 may be divided into one or more modules / units, which are stored in the memory 20 and executed by the processor 10 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 30 in the electronic device 1. For example, the computer program 30 may be divided into Figure 3 The acquisition module 101, the generation module 102, the recording module 103, the judgment module 104, the determination module 105, the sending module 106 and the downloading module 107 in the embodiment of the software program verification system are shown in FIG. The specific functions of each module refer to the functions of each module in the embodiment of the software program verification system.

[0065] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation of the electronic device 1. The electronic device 1 may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the electronic device 1 may also include input and output devices, network access devices, buses, etc.

[0066] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor 10 may be any conventional processor, etc. The processor 10 is the control center of the electronic device 1, and uses various interfaces and lines to connect various parts of the entire electronic device 1.

[0067] The memory 20 can be used to store the computer program 30 and / or modules / units. The processor 10 implements various functions of the electronic device 1 by running or executing the computer program and / or modules / units stored in the memory 20 and calling the data stored in the memory 20. The memory 20 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device 1 (such as audio data, a phone book, etc.), etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0068] See also Figure 3 As shown, this is a functional module diagram of a preferred implementation of the software program verification system of the present invention.

[0069] In some embodiments, the software program verification system 100 runs in the electronic device 1. The software program verification system 100 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the software program verification system 100 may be stored in the memory 20 of the electronic device 1 and executed by the at least one processor 10 to implement the software program verification function.

[0070] In this embodiment, the software program verification system 100 can be divided into multiple functional modules according to the functions it performs. Figure 3 As shown, the functional modules may include an acquisition module 101, a generation module 102, a recording module 103, a judgment module 104, a determination module 105, a sending module 106 and a download module 107. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in the memory 20. It can be understood that in other embodiments, the above modules may also be program instructions or firmware solidified in the processor 10.

[0071] The acquisition module 101 is used to acquire a first identification code and a first hash value of a first software program.

[0072] In this embodiment, the first software program is a software product developed by a developer. The first identification code is a unique device identification code corresponding to the first software program, and the first hash value is calculated by a program file of the first software program through a hash algorithm. The hash algorithm can be a direct addressing method, a digital analysis method, a square middle method, a folding method, or a random number method. The first identification code and the first hash value are both hexadecimal numbers.

[0073] The generating module 102 is configured to perform an encryption operation on the first identification code and the first hash value to generate a first verification code.

[0074] In this embodiment, the encryption operation is an XOR operation, and the generation module 102 performs the XOR operation on the first identification code and the first hash value to generate the first verification code. For example, the first identification code ID1 is 0x123456, the first hash value Hash1 is 0x0d0d0d, and the XOR operation function is xor, then the first verification code CK1 = (ID1) xor (Hash1) = 0x1f395b.

[0075] In other embodiments, the encryption operation is to add two values ​​and take the last 16 bits, that is, the generation module 102 adds the first identification code and the first hash value and takes the last 16 bits to generate the first verification code. For example, if the first identification code ID1 is 0x123456 and the first hash value Hash1 is 0x0d0d0d, then the first verification code CK1 = [(ID1) + (Hash1)] & 0xffff = 0x4163.

[0076] In this embodiment, the generating module 102 further encapsulates the encryption operation into a two-dimensional code algorithm, executes the two-dimensional code algorithm on the first identification code and the first hash value to generate the first verification code, thereby establishing an association between the identification code and the hash value of the first software program to increase the difficulty of cracking the verification code, thereby increasing the difficulty of cracking the first software program. The first verification code is a two-dimensional code.

[0077] The recording module 103 is used to write the first identification code, the first hash value and the first verification code into the blockchain as verification information of the first software program.

[0078] In this embodiment, the recording module 103 calculates the transaction hash value of the verification information, that is, re-executes the hash algorithm on the first identification code, the first hash value and the first verification code to calculate the transaction hash value. The recording module 103 also packages the verification information and the transaction hash value into a transaction record, and writes it into the blockchain according to the smart contract. The block where the verification information is located includes the transaction hash value of the previous block, the transaction hash value calculated by the recording module 103 and the transaction record.

[0079] The acquisition module 101 is further configured to acquire a second identification code of a second software program to be verified and calculate a second hash value of the second software program.

[0080] In this embodiment, when the user downloads the second software program through the terminal device 2, the acquisition module 101 determines that the second software program is to be verified, obtains the second identification code of the second software program, and calculates the second hash value of the second software program. In this embodiment, the second software program to be downloaded by the user is published on the Internet by a person other than the developer, and its name and function are the same as the first software program developed by the developer.

[0081] When the terminal device 2 requests to download the second software program, the name of the second software program is first read, and when the name of the second software program is the same as the name of the first software program, the terminal device 2 sends a request verification instruction to the electronic device 1. When the electronic device 1 receives the request verification instruction, the acquisition module 101 obtains the program file of the second software program through the terminal device 2 or the server storing the second software program.

[0082] In this embodiment, the second identification code of the second software program is the same as the first identification code. The acquisition module 101 calculates the second hash value of the second software program according to the hash algorithm used to calculate the first hash value and the acquired program file of the second software program.

[0083] The determination module 104 is configured to determine whether the second hash value of the second software program is the same as the first hash value.

[0084] In this embodiment, the judgment module 104 obtains a transaction record corresponding to a first identification code that is the same as the second identification code from the blockchain according to the blockchain network. The transaction record includes the first identification code, the first hash value, and the first verification code. The judgment module 104 further determines whether the second hash value is the same as the first hash value.

[0085] The generating module 102 also performs the encryption operation on the second identification code and the second hash value to generate a second verification code when the judging module 104 determines that the second hash value of the second software program is the same as the first hash value. It should be noted that the encryption operation for generating the second verification code is the same as the encryption operation for generating the first verification code. The second verification code is a QR code.

[0086] The determination module 104 further determines whether the second verification code is the same as the first verification code.

[0087] The determination module 105 is configured to determine that the second software program is a genuine program when the determination module 104 determines that the second verification code is the same as the first verification code.

[0088] The determination module 105 is further configured to determine that the second software program is not a genuine program when the judgment module 104 determines that the second hash value of the second software program is different from the first hash value, or determines that the second verification code is different from the first verification code.

[0089] The sending module 106 is used to send an alarm message to the developer of the first software program when the determining module 105 determines that the second software program is not a genuine program.

[0090] In this embodiment, the sending module 106 sends the alarm information to the mailbox of the designated person of the developer by email. The alarm information at least includes the network address of the second software program, the publisher information and the text information that determines that the second software program is not a genuine program. In other embodiments, the sending module 106 can also notify the designated person of the developer of the alarm information by making a phone call.

[0091] The download module 107 is configured to send a download instruction to the terminal device 2 to allow the second software program to be downloaded to the terminal device 2 when the determination module 105 determines that the second software program is a legitimate program.

[0092] See also Figure 4 FIG. 1 is a flowchart of the software program verification method provided by the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0093] Step S401, obtaining a first identification code and a first hash value of a first software program.

[0094] In this embodiment, the first software program is a software product developed by a developer. The first identification code is a unique device identification code corresponding to the first software program, and the first hash value is calculated by a program file of the first software program through a hash algorithm. The hash algorithm can be a direct addressing method, a digital analysis method, a square middle method, a folding method, or a random number method. The first identification code and the first hash value are both hexadecimal numbers.

[0095] Step S402: performing an encryption operation on the first identification code and the first hash value to generate a first verification code.

[0096] In this embodiment, the encryption operation is an XOR operation. The step S402 specifically includes performing the XOR operation on the first identification code and the first hash value to generate the first verification code. For example, the first identification code ID1 is 0x123456, the first hash value Hash1 is 0x0d0d0d, and the XOR operation function is xor, then the first verification code CK1 = (ID1) xor (Hash1) = 0x1f395b.

[0097] In other embodiments, the encryption operation is to add two values ​​and take the last 16 bits, that is, the step S402 includes adding the first identification code and the first hash value and taking the last 16 bits to generate the first verification code. For example, if the first identification code ID1 is 0x123456 and the first hash value Hash1 is 0x0d0d0d, then the first verification code CK1 = [(ID1) + (Hash1)] & 0xffff = 0x4163.

[0098] In this embodiment, step S402 includes encapsulating the encryption operation into a two-dimensional code algorithm, executing the two-dimensional code algorithm on the first identification code and the first hash value to generate the first verification code, thereby establishing an association between the identification code and the hash value of the first software program to increase the difficulty of cracking the verification code, thereby increasing the difficulty of cracking the first software program. Wherein, the first verification code is a two-dimensional code.

[0099] Step S403: write the first identification code, the first hash value and the first verification code into the blockchain as verification information of the first software program.

[0100] In this embodiment, the step S403 specifically includes calculating the transaction hash value of the verification information, that is, re-executing the hash algorithm on the first identification code, the first hash value and the first verification code to calculate the transaction hash value. The step S403 also includes packaging the verification information into a transaction record and writing it into the blockchain according to the smart contract. The block where the verification information is located includes the transaction hash value of the previous block, the calculated transaction hash value and the transaction record.

[0101] Step S404: Obtain a second identification code of a second software program to be verified and calculate a second hash value of the second software program.

[0102] In this embodiment, when the user downloads the second software program through the terminal device 2, the acquisition module 101 determines that the second software program is to be verified, obtains the second identification code of the second software program, and calculates the second hash value of the second software program. In this embodiment, the second software program to be downloaded by the user is published on the Internet by a person other than the developer, and its name and function are the same as the first software program developed by the developer.

[0103] When the terminal device 2 requests to download the second software program, the name of the second software program is first read, and when the name of the second software program is the same as the name of the first software program, the terminal device 2 sends a request verification instruction to the electronic device 1. When the electronic device 1 receives the request verification instruction, the program file of the second software program is obtained through the terminal device 2 or the server storing the second software program.

[0104] In this embodiment, the second identification code of the second software program is the same as the first identification code, and the second hash value of the second software program is calculated according to the hash algorithm used to calculate the first hash value and the obtained program file of the second software program.

[0105] Step S405, determining whether the second hash value of the second software program is the same as the first hash value. When it is determined that the second hash value of the second software program is the same as the first hash value, the process proceeds to step S406. When it is determined that the second hash value of the second software program is different from the first hash value, the process proceeds to step S409.

[0106] In this embodiment, the step S405 specifically includes obtaining a transaction record corresponding to a first identification code that is the same as the second identification code from the blockchain according to the blockchain network. The transaction record includes the first identification code, the first hash value, and the first verification code. The step S405 also includes determining whether the second hash value is the same as the first hash value in the transaction record.

[0107] Step S406, performing the encryption operation on the second identification code and the second hash value to generate a second verification code.

[0108] In this embodiment, the encryption operation for generating the second verification code is the same as the encryption operation for generating the first verification code, that is, the second verification code is also a two-dimensional code.

[0109] Step S407, determining whether the second verification code is the same as the first verification code. When it is determined that the second verification code of the second software program is the same as the first verification code, the process proceeds to step S408. When it is determined that the second hash value of the second software program is different from the first hash value, the process proceeds to step S410.

[0110] Step S408: determining that the second software program is a genuine program.

[0111] Step S409 , sending a download instruction to the terminal device 2 to allow the second software program to be downloaded to the terminal device 2 .

[0112] Step S410: determining that the second software program is not a genuine program.

[0113] Step S411, sending an alarm message to the developer of the first software program.

[0114] If the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0115] The software program verification method, electronic device and storage medium provided by the present invention verify whether the software program is a genuine program through a device unique identification code, a hash value and a verification code. The verification code can establish an association between the device unique identification code and the hash value of the software program in the blockchain, thereby improving the difficulty of cracking the software program and the accuracy of verification.

[0116] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by the same unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A software program verification method, characterized in that: The method comprises: Obtaining a first identification code and a first hash value of a first software program; Performing an encryption operation on the first identification code and the first hash value to generate a first verification code; Writing the first identification code, the first hash value, and the first verification code into the blockchain as verification information of the first software program; Obtaining a second identification code of a second software program to be verified and calculating a second hash value of the second software program; determining whether a second hash value of the second software program is the same as the first hash value; When it is determined that the second hash value of the second software program is the same as the first hash value, performing the encryption operation on the second identification code and the second hash value to generate a second verification code; determining whether the second verification code is the same as the first verification code; and When it is determined that the second verification code is the same as the first verification code, the second software program is determined to be a genuine program.

2. The software program verification method according to claim 1, characterized in that: The method further comprises: When it is determined that the second hash value of the second software program is different from the first hash value, or when it is determined that the second verification code is different from the first verification code, it is determined that the second software program is not a genuine program.

3. The software program verification method according to claim 2, characterized in that: The method further comprises: When it is determined that the second software program is not a genuine program, an alarm message is sent to the developer of the first software program.

4. The software program verification method according to claim 1, characterized in that: The performing of encryption operation on the first identification code and the first hash value to generate a first verification code comprises: An exclusive OR operation is performed on the first identification code and the first hash value to generate the first verification code.

5. The software program verification method according to claim 1, characterized in that: The performing of encryption operation on the first identification code and the first hash value to generate a first verification code comprises: The first identification code and the first hash value are added together and the last 16 bits are taken to generate the first verification code.

6. The software program verification method according to claim 1, characterized in that: The method further comprises: Encapsulating the encryption operation into a QR code algorithm; and The two-dimensional code algorithm is executed on the first identification code and the first hash value to generate the first verification code.

7. The software program verification method according to claim 1, characterized in that: Writing the first identification code, the first hash value, and the first verification code as verification information of the first software program into the blockchain includes: Calculating a transaction hash value of the verification information; and The verification information and the transaction hash value are packaged into a transaction record and written into the blockchain according to the smart contract.

8. The software program verification method according to claim 1, characterized in that: The method further comprises: When the user downloads the second software program through the terminal device and determines that the second software program is a genuine program, a download instruction is sent to the terminal device to allow the second software program to be downloaded to the terminal device.

9. An electronic device, characterized in that: The electronic device comprises: Processor; and A memory, wherein a plurality of program modules are stored in the memory, and the plurality of program modules are loaded by the processor and execute the software program verification method as described in any one of claims 1 to 8.

10. A computer-readable storage medium having at least one computer instruction stored thereon, characterized in that: The instructions are loaded by the processor and executed by the software program verification method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Encryption and decryption methods of embedded software program

    CN101950344A

  • Method and device for publishing and validating software applications

    CN107077557A