Information verification method and device, electronic equipment and storage medium
By obtaining and verifying the signature ciphertext in the application, decrypting the device information, and filtering and comparing the verification information items according to the operating environment, the problem of the application in the prior art failing license verification in various environments is solved, and the stability and flexibility of the application are improved.
Patent Information
- Application Number
- CN202311394480.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, when the application is used in various operating environments, the license verification fails frequently, resulting in the application being unable to run normally, reducing the stability of use.
By obtaining the signature ciphertext and using the target application's signature verification key to verify the signature, the encrypted ciphertext is obtained; then using the decryption key to decrypt the device information, determine the operating environment based on the device information, and filter out the information items to be verified from the device information, compare with the actual information items, and determine the running status of the application.
Improves the verification flexibility of applications in different operating environments, avoids the failure of license verification to fail, and improves the stability of applications to use.
Smart Images

Figure CN119885143A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to an information verification method, device, electronic device and storage medium. Background Art
[0002] Application developers often protect the intellectual property rights of applications by setting licenses for the applications. The essence of a license is to reasonably verify the usage permissions of the device running the application without affecting the normal use of the application by the user.
[0003] However, due to different usage scenarios of users, the operating environment of the application is also varied. In some operating environments, it is easy to have a license certificate verification failure, which constantly blocks users from using the application, causing the application to not function properly and reducing the stability of the application. Summary of the invention
[0004] The embodiments of the present application provide an information verification method, device, electronic device and storage medium, which can improve the problem of low usage stability of program software existing in the prior art.
[0005] The present application provides an information verification method, which is applied to a terminal device, wherein the terminal device runs a target application, and the method includes:
[0006] Obtaining a signature ciphertext, and verifying the signature ciphertext using the signature verification key corresponding to the target application to obtain an encrypted ciphertext, wherein the signature ciphertext is obtained by the first server signing the encrypted ciphertext using the signature key, and the encrypted ciphertext is obtained by the second server encrypting the device information using the encryption key, and the signature verification key corresponds to the signature key;
[0007] Decrypting the encrypted ciphertext using a decryption key corresponding to the target application to obtain the device information, wherein the decryption key corresponds to the encryption key;
[0008] Based on the device information, determining the operating environment of the target application;
[0009] Determine, based on the operating environment, an information item to be verified in the device information, wherein the information item to be verified is at least one item of information in the device information;
[0010] Selecting, from the current device information of the terminal device, an actual information item corresponding to the information item to be verified;
[0011] The actual information item is compared with the information item to be verified, and the running state of the target application is determined based on the comparison result.
[0012] The present application provides an information verification device, the device comprising:
[0013] an encryption ciphertext unit, used to obtain a signature ciphertext, and verify the signature ciphertext using a signature verification key corresponding to the target application to obtain an encrypted ciphertext, wherein the signature ciphertext is obtained by signing the encrypted ciphertext by the first server using the signature key, and the encrypted ciphertext is obtained by encrypting device information by the second server using the encryption key, and the signature verification key corresponds to the signature key;
[0014] A device information unit, used to decrypt the encrypted ciphertext using a decryption key corresponding to the target application to obtain the device information, wherein the decryption key corresponds to the encryption key;
[0015] An environment determination unit, configured to determine an operating environment of the target application based on the device information;
[0016] an information item to be verified unit, configured to determine an information item to be verified in the device information based on the operating environment, wherein the information item to be verified is at least one item of information in the device information;
[0017] An actual information item unit, configured to select an actual information item corresponding to the information item to be verified from the current device information of the terminal device;
[0018] The running status determining unit is used to compare the actual information item with the information item to be verified, and determine the running status of the target application based on the comparison result.
[0019] In one implementation, the device information includes a usage status indication parameter and a deployment type indication parameter; accordingly, the environment determination unit includes:
[0020] Based on the usage status indication parameter and the deployment type indication parameter, the operating environment of the target application is determined.
[0021] In one embodiment, the environment determination unit is specifically configured to: when the usage status indication parameter indicates that the current usage status is a trial status, determine that the operating environment is a trial environment based on the usage status indication parameter;
[0022] Correspondingly, the to-be-verified information item unit is specifically configured to determine the usage restriction time in the device information as the to-be-verified information item based on the trial environment.
[0023] In one embodiment, the environment determination unit is specifically configured to determine, when the usage status indication parameter indicates that the current usage status is the formal usage status, and the deployment type indication parameter indicates that the deployment type is virtual machine deployment, based on the usage status indication parameter and the deployment type indication parameter, that the operating environment is the formal usage environment running on the virtual machine;
[0024] Correspondingly, the information item unit to be verified is specifically configured to determine all of the device information as the information item to be verified based on the official use environment running on the virtual machine.
[0025] In one embodiment, the environment determination unit is specifically configured to determine, when the usage status indication parameter indicates that the current usage status is the formal usage status, and the deployment type indication parameter indicates that the deployment type is container deployment, based on the usage status indication parameter and the deployment type indication parameter, that the operating environment is the formal usage environment running in the container;
[0026] Correspondingly, the information item to be verified unit is specifically used to determine the device identity and Internet Protocol address in the device information as the information item to be verified based on the official use environment running in the container.
[0027] In one embodiment, the comparison result includes: all of the actual information items are consistent with the corresponding information items to be verified;
[0028] Correspondingly, the running status determining unit is specifically used to: when the comparison result is: all the actual information items are consistent with the corresponding information items to be verified, determine that the running status of the target application is normal running.
[0029] In one embodiment, the comparison result includes: there is inconsistency between the actual information item and the corresponding information item to be verified;
[0030] Correspondingly, the running state determining unit is specifically used to: when the comparison result is: there is inconsistency between the actual information item and the corresponding information item to be verified, determine that the running state of the target application is terminated.
[0031] In one implementation, the ciphertext encryption unit is specifically configured to receive the signed ciphertext sent by the first server.
[0032] In one embodiment, the device further comprises:
[0033] An information collection unit, used to collect information of the terminal device;
[0034] An information encryption unit, used to encrypt the information of the terminal device using a first secret key to obtain a machine identification file;
[0035] The file sending unit is used to send the machine identification file to the second server so that the second server can use the second key to decrypt the machine identification file to obtain the information of the terminal device; wherein, the information of the terminal device is added with the control authority information by the second server to obtain the device information; the device information is encrypted by the second server using the encryption key to obtain the encrypted ciphertext; the encrypted ciphertext is sent to the first server via the second server and signed by the first server using the signature key to obtain the signed ciphertext.
[0036] In one embodiment, the device further comprises:
[0037] an attribute information sending unit, configured to send program attribute information to the second server using the target application, so that the second server registers the target application based on the program attribute information, and generates the first key and the second key after registration, wherein the first key corresponds to the second key;
[0038] A first secret key receiving unit, used for receiving the first secret key sent by the second server;
[0039] a generating request unit, configured to send a key generation request to the first server, so that the first server generates the signing key and the signature verification key based on the key generation request;
[0040] The signature verification key receiving unit is used to receive the signature verification key sent by the first server.
[0041] In one embodiment, the device further comprises:
[0042] The instruction receiving unit is used to receive a triggered setting execution instruction, wherein the setting execution instruction is used to instruct the target application to run a preset function.
[0043] In the information verification method provided in the embodiment of the present application, the signature ciphertext can be obtained, and the signature verification key corresponding to the target application is used to verify the signature, and the encrypted ciphertext after the signature verification is passed is obtained; the encrypted ciphertext is then decrypted using the decryption key corresponding to the target application to obtain the device information. Based on the device information, the operating environment of the target application is determined; and based on the operating environment, at least one item of information is screened out from the device information as the information item to be verified. Then, the corresponding actual information item is selected from the current device information of the terminal device, and the actual information item is compared one by one with the corresponding information item to be verified to obtain the comparison result. Then, the operating status of the target application is determined based on the comparison result.
[0044] In the embodiment of the present application, the operating environment of the target application can be obtained through the device information, and then the information items to be verified suitable for verification in the current operating environment are screened out, and the information items to be verified are compared and verified one by one with the corresponding actual information items, so as to determine the operating status of the target application. Since the embodiment of the present application can select the information items to be verified based on the operating environment of the target application, the flexibility of the verification process can be increased, and the situation in which the failure of the license certificate verification in certain operating environments prevents the user from using the application is avoided, thereby improving the stability of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0046] Figure 1a It is a schematic diagram of an application scenario of the information verification method provided by this application;
[0047] Figure 1b It is a flowchart of the information verification method provided in the embodiment of the present application;
[0048] Figure 2 is a timing diagram of an information verification method provided by an embodiment of the present application;
[0049] Figure 3 It is a structural schematic diagram of an information verification device provided by an embodiment of the present application;
[0050] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0052] Embodiments of the present application provide an information verification method, device, electronic device, and storage medium.
[0053] The information verification device may be integrated into an electronic device, which may be a terminal, a server, or other device. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC). The server may be a single server or a server cluster consisting of multiple servers.
[0054] In some embodiments, the information verification device may also be integrated into multiple electronic devices. For example, the information verification device may be integrated into multiple servers, and the information verification method of the present application may be implemented by multiple servers.
[0055] In some embodiments, the server may also be implemented in the form of a terminal.
[0056] For more information, please see Figure 1a The method provided in the embodiment of the present application can obtain a signature ciphertext, and use the verification key corresponding to the target application to verify the signature ciphertext to obtain an encrypted ciphertext, wherein the signature ciphertext is obtained by signing the encrypted ciphertext with the signature key by the first server, and the encrypted ciphertext is obtained by encrypting the device information with the encryption key by the second server, and the verification key corresponds to the signature key; the encrypted ciphertext is decrypted with the decryption key corresponding to the target application to obtain the device information, wherein the decryption key corresponds to the encryption key; based on the device information, the operating environment of the target application is determined; based on the operating environment, the information item to be verified in the device information is determined, wherein the information item to be verified is at least one item of information in the device information; from the current device information of the terminal device, the actual information item corresponding to the information item to be verified is selected; the actual information item is compared with the information item to be verified, and the operating status of the target application is determined based on the comparison result.
[0057] The above method can select the information items to be verified based on the operating environment of the target application, thereby increasing the flexibility of the verification process, avoiding the failure of license certificate verification in certain operating environments, and preventing users from using the application, thereby improving the stability of application use.
[0058] It is understandable that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0059] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0060] In this embodiment, an information verification method is provided. Figure 1b As shown, the information verification method is applied to a terminal device. The specific process of the method may include the following steps 110 to 160:
[0061] 110. Obtain the signature ciphertext, and use the signature verification key corresponding to the target application to verify the signature ciphertext to obtain the encrypted ciphertext.
[0062] The signature ciphertext is obtained by the first server signing the encrypted ciphertext using the signature key. The signature verification key corresponds to the signature key. The encrypted ciphertext is obtained by the second server encrypting the device information using the encryption key.
[0063] Optionally, in one implementation, the signature ciphertext may be generated by: the second server encrypts the device information using the encryption key to obtain the encrypted ciphertext. The second server sends the encrypted ciphertext to the first server. The first server signs the encrypted ciphertext using the signature key to obtain the signature ciphertext.
[0064] The first server and the second server may be different servers; for example, the first server may be a third-party server, and the second server may be a server that matches the target application. The first server and the second server may also be the same server; the same server may be a server that matches the target application. It should be understood that the types of the first server and the second server should not be construed as limiting the present application.
[0065] The target application is the application for which information verification is to be performed.
[0066] The signature verification key is a key used to verify the signature. The signature verification process is used to confirm the integrity and authenticity of the data and to ensure that the data has not been tampered with or forged.
[0067] Optionally, in one implementation, the signature verification process may be specifically as follows:
[0068] Receive data: Receive data that needs to be verified. The data that needs to be verified usually includes the original data and the digital signature.
[0069] Obtaining the signature verification key: The signature verification key can be obtained in a variety of ways, such as from a digital certificate, a key management system, etc. If the signature verification key and the signature key are an asymmetric encryption key pair, then usually the signature verification key is the public key and the signature key is the corresponding private key.
[0070] Verify the signature: Use the verification key to decrypt the digital signature and obtain a summary. The above summary can be generated by the signer using a hash algorithm.
[0071] Calculate digest: Perform the same encryption process on the original data to generate a digest.
[0072] Compare results: Compare the summary obtained in the signature verification step with the summary generated in the calculation summary. If the two summary values are the same, the signature is valid and the data integrity and authenticity are verified; if they are different, the signature verification fails and the data may have been tampered with or forged.
[0073] The signature key is the key used to sign the original data to obtain a digital signature.
[0074] In a specific implementation manner, "obtaining the signed ciphertext" may include: receiving the signed ciphertext sent by the first server.
[0075] The signature ciphertext may be sent by the first server to a terminal device running a target application. The first server may implement the generation and sending process of the signature ciphertext.
[0076] Optionally, before the step of “receiving the signed ciphertext sent by the first server”, the embodiment of the present application may further include the following steps A1 to A7:
[0077] A1. Use the target application to send program attribute information to the second server, so that the second server registers the target application based on the program attribute information, and generates the first key and the second key after registration, wherein the first key corresponds to the second key.
[0078] The program attribute information is information reflecting the attributes of the target application program, and may include: the operating environment of the target application program, the module or component in the terminal device responsible for managing and controlling the target application program, the computing resources occupied by the target application program, and the like.
[0079] The second server receives the program attribute information, and can register the target application in the second server based on the program attribute information. And after the registration is successful, the corresponding first key and second key can be generated. Optionally, the first key and the second key can be symmetric encryption keys; or they can be asymmetric encryption keys. It should be understood that the encryption form of the first key and the second key should not be understood as a limitation of the present application. The role of the first key and the second key will be described in detail in the following steps.
[0080] A2. Receive the first secret key sent by the second server.
[0081] After generating the first key and the second key, the second server may send the first key to the terminal device running the target application.
[0082] Optionally, the second server may specifically generate a license software development kit (SDK). The license software development kit may be referred to as license SDK, and the first key may be stored in the license SDK, and then the license SDK storing the first key may be sent to a terminal device running the target application.
[0083] A3. Send a key generation request to the first server, so that the first server generates the signing key and the signature verification key based on the key generation request.
[0084] Optionally, in one implementation, the first server may be a third-party key management platform. After completing the qualification verification corresponding to the key generation request, the first server may generate the above-mentioned signature key and the signature verification key.
[0085] A4. Receive the signature verification key sent by the first server.
[0086] The terminal device may also send a key generation request to the first server so that the first server generates a matching signature key and a verification key based on the key generation request. After the first server generates the matching signature key and the verification key, it may send the verification key to the terminal device.
[0087] Optionally, in one implementation, the matching signature key and verification key may be an asymmetric key pair, the signature key may be a private key, and the verification key may be a public key. The first server may store the signature key in the form of a private key in its own memory, and send the verification key in the form of a public key to the terminal device running the target application.
[0088] A5. Collect information of the terminal device.
[0089] The information of the terminal device may include the above-mentioned program attribute information and the hardware information of the terminal device. The above-mentioned information may be collected by the target application running on the terminal device. The hardware information of the terminal device may include the name of the hardware component, the address information corresponding to the hardware component, and the information reflecting the hardware performance.
[0090] In one implementation, the hardware information of the terminal device includes the following:
[0091]
[0092]
[0093] In the above implementation, the hardware information of the terminal device may specifically include: the timestamp "Timestamp" corresponding to the terminal device: "2022-06-28 00:00:01"; the IP address "Addr" corresponding to the terminal device: "9.134.127.210"; the hardware components included in the terminal device: the name of the first network card "Name": "enp0s3"; the Mac address of the first network card "Addr": "02:5e:cd:fd:8c:44"; the IP address of the first network card "Ip": "189.178.8.9"; the name of the second network card "Name": "enp0s8"; the Mac address of the second network card "Addr":"08:00:27:86:ff:03"; IP address of the second network card "Ip":"189.178.8.9"; Device identity of the terminal device "MachineId":"b716a4da35c2447c97ec4fea356f0af8"; Information reflecting hardware performance is stored in "CustomInfo":{}, including the number of CPU cores, the number of independent processing units or computing nodes in the terminal device, etc.
[0094] A6. Encrypt the information of the terminal device using the first secret key to obtain a machine identification file.
[0095] Continuing with the above example, the terminal device can encrypt the information of the terminal device by running the target application using the first secret key stored in the license SDK to obtain a machine identification file. The machine identification file can be named: machine.id.
[0096] A7. Send the machine identification file to the second server so that the second server can use the second key to decrypt the machine identification file to obtain the information of the terminal device; wherein, the information of the terminal device is added with the control authority information by the second server to obtain the device information; the device information is encrypted by the second server using the encryption key to obtain the encrypted ciphertext; the encrypted ciphertext is sent to the first server via the second server and signed by the first server using the signature key to obtain the signed ciphertext.
[0097] The control permission information is information indicating the user level of the target application and the corresponding usage permissions. For example, suppose the user level of the target application is divided into: ordinary users and administrators. Ordinary users have their own corresponding usage permissions for the target application; administrators also have their own corresponding usage permissions for the target application. Generally, the usage permissions of administrators are higher than those of ordinary users.
[0098] Device information includes terminal device information and the above-mentioned management and control authority information.
[0099] The terminal device can send the machine identification file to the second server. The second server uses the second secret key to decrypt the machine identification file, and then obtains the information of the terminal device collected by the terminal device in step A5. Optionally, if the second server has control authority information, the control authority information can be supplemented to obtain the device information; if the second server does not have control authority information, the terminal device information can also be directly used as the device information.
[0100] After obtaining the device information, the second server may use the encryption key to encrypt the device information to obtain an encrypted ciphertext.
[0101] After obtaining the encrypted ciphertext, the second server may send the encrypted ciphertext to the first server. After receiving the encrypted ciphertext, the first server may sign the encrypted ciphertext using the signature key to obtain the signed ciphertext.
[0102] In some implementations, the device information including the terminal device information and the control authority information can also be recorded as a license. The license can be encrypted and signed in sequence to obtain the corresponding signature ciphertext. Specifically, in one implementation, the signature ciphertext can be as follows:
[0103] ZZ0AAAAAAAACAuT3JNLbXCS4JNADbeTcYLa7idzCZM6JkPthXSWrEINoBNp6e+Rx4dmEwODofyW1vlbnCFt6p+9FXXBB / 8apgculQbJBTRa4KNXVNPWRBMekF]4wUaFzCOOh+]EWzVe / 1i / Pe0 99hXryua6zWsi7us010TI37iet8s6XibrzVVr17F5Pla8GOoSMee6oSDGf6rYDjgyW38+Fdz+ EjKz8TGja4ZtP2U(Mai / 6BoVz9fhrPviavSoa7tnCDfKiBY5tvpF7IG+INRRGm3K310iByvpa e3FwF6 / wIwzvlhkc9oimale7vZ0B146vpVY40]Wy66D1L.SHECNOLci65BtcbyBkOLuEtKPsM ZavpIk]igxGsOwEtXNoW8aFR7zn60k1iDPiIIfRu7TXoEKYOLAnCODcssF396uYGePPeEfhls UpZTPV5PCeWdn7ArOrPrU20s6xCHd7Cg+9d9q4aVU6Vsf6nvlGol / kmPh2C3JobkLZJpeohF8 lJdKdfecV0WG59Z9w+n1XVAXMy3mophpRyVOtOXYEOnHgXONHJSmsCD9sLWAAAAAAeCXUXFPhL
[0104] In the above signature ciphertext, the signature ciphertext can be divided into two parts by ".":
[0105] "ZZ0AAAAAAAAAuT3JNLbXCS4JNADbeTcYLa7idzCZM6JkPthXSWrEINoBNp6e+Rx4dmEwODofyW1vlbnCFt6p+9FXXBB / 8apgculQbJBTRa4KNXV NPWRBMekF]4wUaFzCOOh+]EWzVe / 1i / Pe099hXryua6zWsi7us010TI37iet8s6XibrzVVr17F5Pla8GOoSMee6oSDGf6rYD jgyW38+Fdz+EjKz8TGja4ZtP2U(Mai / 6BoVz9fhrPviavSoa7tnCDfKiBY5tvpF7IG+INRRGm3K310iByvpae3FwF6 / wIwzv lhkc9oimale7vZ0B146vpVY40]Wy66D1L" and
[0106] "SHECNOLci65BtcbyBkOLuEtKPsMZavpIk]igxGsOwEtXNoW8aFR7zn60k1iDPiIIfRu7TXoEKYOLAnCODcssF396uYGePPeEfhlsUpZTPV5PCeWdn7ArO rPrU20s6xCHd7Cg+9d9q4aVU6Vsf6nvlGol / kmPh2C3JobkLZJpeohF8lJdKdfecV0WG59Z9w+n1XVAXMy3mophpRyVOtOXYEOnHgXONHJSmsCD9sLWAAAA AAeCXUXFPhL”.
[0107] The part before the “.” may be encrypted ciphertext, and the part after the “.” may be a signature generated for the encrypted ciphertext.
[0108] In the above implementation, the device information can be obtained first, and then encrypted and signed in sequence using two different servers, thereby improving the confidentiality of the device information and providing high standards of privacy and security for users of the target application.
[0109] 120. Decrypt the encrypted ciphertext using a decryption key corresponding to the target application to obtain the device information.
[0110] Among them, the decryption key corresponds to the encryption key. Optionally, the key pair consisting of the encryption key and the decryption key can be an existing key pair; for example, it can be a key pair consisting of a first key and a second key; or it can be a key pair consisting of a signature key and a signature verification key. The key pair consisting of the encryption key and the decryption key can also be a brand new key pair. The specific method of obtaining the above key pair should not be understood as a limitation on this application.
[0111] Optionally, the signature verification process in step 110 and the decryption process in step 120 can be implemented by the license SDK respectively calling the signature verification key and the decryption key.
[0112] 130. Determine an operating environment of the target application based on the device information.
[0113] The device information may include one or more indication parameters, which are used to reflect the operating environment of the target application. Optionally, in a specific implementation, the above indication parameters may include a usage status indication parameter and a deployment type indication parameter. Accordingly, step 130 may specifically include:
[0114] Based on the usage status indication parameter and the deployment type indication parameter, the operating environment of the target application is determined.
[0115] The usage status indication parameter is used to reflect the current usage status of the target application. The current usage status of the target application includes: trial status and formal usage status. The two usage statuses can be represented by their corresponding parameter values. Optionally, the usage status indication parameter is represented by type, type = 1 means: the current usage status of the target application is the trial status; type = 2 means: the current usage status of the target application is the formal usage status.
[0116] The deployment type indicator parameter is used to reflect the current deployment type of the target application. The current deployment types of the target application include: virtual machine (VM) type and container (Pod) type. Among them, the VM type refers to deploying the target application in the operating environment of the virtual machine. The Pod type refers to deploying and running the target application in the form of a Pod using the Kubernetes platform. In Kubernetes, a Pod is the smallest scheduling and management unit.
[0117] Optionally, the deployment type indication parameter is represented by DeploymentType, and DeploymentType=1 indicates that the current deployment type of the target application is a VM type; and DeploymentType=2 indicates that the current deployment type of the target application is a Pod type.
[0118] Optionally, the usage status indication parameter type and the deployment type indication parameter DeploymentType may both be recorded in the structure of license.
[0119] The use status indication parameter and the deployment type indication parameter can be manually set by the user of the target application based on their own needs. The target application can determine its own operating environment based on the combination of the above use status indication parameter and the deployment type indication parameter. The specific process of determining the operating environment based on the use status indication parameter and the deployment type indication parameter will be described in detail below.
[0120] Optionally, in a specific implementation, before step 130, the embodiment of the present application may include: receiving a triggered setting execution instruction.
[0121] Among them, the set execution instruction can be triggered by the user who uses the target application. The set execution instruction is used to instruct the target application to run the preset function. The preset function refers to the function implemented by the target application to meet the work or entertainment needs of the user. The specific functional content of the preset function is related to the application type of the target application. For example, if the target application is a text editing application, the preset function may specifically be the text input and editing function; if the target application is a video playback application, the preset function may specifically be the decoding and playback function of the video file; if the target application is an address book management application, the preset function may specifically be: importing the user information of the enterprise organizational structure into the target application, setting the corresponding address book information browsing permissions for enterprise employees at different levels, etc.
[0122] In the above implementation, the target application's operating environment can be determined before the target application runs the preset function. In the subsequent steps, the information items to be verified of the target application are verified one by one based on the operating environment. If the verification is passed, the target application is allowed to run the preset function; if the verification is not passed, the target application can be prevented from running the preset function, so that the use authority of the device running the target application can be reasonably verified to protect the legitimate rights and interests of the developer of the target application.
[0123] 140. Determine an information item to be verified in the device information based on the operating environment.
[0124] The information item to be verified is at least one item of the device information. Different operating environments correspond to different information items to be verified, which will be described below in different situations.
[0125] Optionally, in a specific implementation, the step of “determining the operating environment of the target application based on the usage status indication parameter and the deployment type indication parameter” includes:
[0126] If the usage status indication parameter indicates that the current usage status is a trial status, then based on the usage status indication parameter, it is determined that the operating environment is a trial environment.
[0127] Correspondingly, step 140 includes: based on the trial environment, determining the usage limit time in the device information as the information item to be verified.
[0128] Optionally, when the usage status indication parameter type=1 is obtained, it can be determined that the current usage status of the target application is a trial status. In one embodiment, for the trial status, since the value of the deployment type indication parameter does not affect the selection of the information item to be verified, it is not necessary to confirm the deployment type indication parameter of the target application. Based on the trial status, it is determined that the operating environment is a trial environment, and then the usage limit duration is determined as the information item to be verified.
[0129] In the above implementation, if the operating environment is determined to be a trial environment, only the usage limit time corresponding to the target application can be verified, that is, the actual usage time of the target application is compared with the usage limit time, and the machine information is no longer verified. The machine information includes: IP address, Mac address, device identity, etc. The device identity can be represented by machineId. The network environment where the user is located is often accompanied by complex network security policies, and there may be a phenomenon of multiple IP addresses jumping. In the trial environment, if the IP address is strictly restricted, it may cause repeated verification failures, affecting the user experience of the target application, and then leading to the loss of users. Therefore, in the trial environment, it is usually the first priority to ensure that the user can experience the program function normally. Therefore, only the usage limit time can be used as the information item to be verified. If the actual usage time is less than the usage limit time, it is determined that the target application can continue to be used normally. If the actual usage time is more than or equal to the usage limit time, it is determined that some or all functions of the target application are disabled. Usually, the usage limit time is a shorter time value, such as 10 days, 7 days, etc.
[0130] It can be understood that, in addition to the above implementation, for the trial state, there is also a situation where the value of the deployment type indication parameter affects the selection of the information item to be verified. For example, when the usage state indication parameter type=1 and the deployment type indication parameter DeploymentType=1, the usage limit duration and the virtual machine software type can be determined as the information items to be verified; when the usage state indication parameter type=1 and the deployment type indication parameter DeploymentType=2, the usage limit duration and the container specifications can be determined as the information items to be verified.
[0131] Optionally, in another specific implementation, the step of “determining the operating environment of the target application based on the usage status indication parameter and the deployment type indication parameter” includes:
[0132] If the usage status indication parameter indicates that the current usage status is the formal usage status, and the deployment type indication parameter indicates that the deployment type is virtual machine deployment, then based on the usage status indication parameter and the deployment type indication parameter, it is determined that the operating environment is the formal usage environment running on the virtual machine.
[0133] Correspondingly, step 140 includes: based on the official use environment running on the virtual machine, determining all the device information as the information items to be verified.
[0134] Optionally, when the usage status indication parameter type=2 and the deployment type indication parameter DeploymentType=1 are obtained, it can be determined that the operating environment of the target application is the official usage environment running on the virtual machine.
[0135] In the virtual machine deployment type, the IP address and Mac information are fixed, and the device identity machineId can also be obtained from a preset fixed address. Optionally, the preset fixed address can be / var / lib / dbus / machine-id or / etc / machine-id. Therefore, when selecting the information item to be verified, all device information including the IP address, Mac information, and device identity machineId can be used as the information item to be verified.
[0136] Optionally, in another specific implementation, the step of “determining the operating environment of the target application based on the usage status indication parameter and the deployment type indication parameter” includes:
[0137] If the usage status indication parameter indicates that the current usage status is the formal usage status, and the deployment type indication parameter indicates that the deployment type is container deployment, then based on the usage status indication parameter and the deployment type indication parameter, it is determined that the operating environment is the formal usage environment running in the container.
[0138] Correspondingly, step 140 includes: based on the official use environment running in the container, determining the device identity and Internet Protocol address in the device information as the information item to be verified.
[0139] The Internet Protocol address is the above-mentioned IP address. Optionally, when the usage status indication parameter type=2 and the deployment type indication parameter DeploymentType=2 are obtained, it can be determined that the operating environment of the target application is the formal usage environment running in the container.
[0140] In the container deployment type, the characteristics of pod will cause the Mac address to change every time the target application is restarted. The device identity machineId cannot be obtained from the preset fixed address, but the device identity machineId can be generated by the target application itself; and the IP address output by the pod can also be fixed through configuration. Therefore, when selecting the information items to be verified, the IP address and the device identity machineId can be used as the information items to be verified.
[0141] 150. Select, from the current device information of the terminal device, an actual information item corresponding to the information item to be verified.
[0142] The actual information item is the actual information item in the current device information that corresponds to the information item to be verified. For example, if the information item to be verified is the usage limit duration, the actual information item corresponding to the information item to be verified is the actual usage duration of the terminal device; if the information item to be verified is the IP address, the actual information item corresponding to the information item to be verified is the current IP address of the terminal device.
[0143] 160. Compare the actual information item with the information item to be verified, and determine the running status of the target application based on the comparison result.
[0144] After selecting the actual information items corresponding to the information items to be verified in step 150, the corresponding actual information items can be compared with the information items to be verified to obtain a comparison result, and the running state of the target application can be determined based on the comparison result.
[0145] Optionally, in one implementation, the comparison result includes: all the actual information items are consistent with the corresponding information items to be verified. Accordingly, step 160 may include:
[0146] If the comparison result is that all the actual information items are consistent with the corresponding information items to be verified, it is determined that the running state of the target application is normal running.
[0147] In the above implementation, if all the actual information items are consistent with the corresponding information items to be verified, it means that the target application has passed the information verification process, and the target application can be run normally.
[0148] Optionally, in another embodiment, the comparison result includes: there is inconsistency between the actual information item and the corresponding information item to be verified. Accordingly, step 160 may include:
[0149] If the comparison result is that there is an inconsistency between the actual information item and the corresponding information item to be verified, then the running state of the target application is determined to be terminated.
[0150] In the above implementation, if there is inconsistency between the actual information item and the corresponding information item to be verified, it means that the target application fails the information verification process, and it can be determined that some or all functions of the target application are disabled.
[0151] In the information verification method provided in the embodiment of the present application, the signature ciphertext can be obtained, and the signature verification key corresponding to the target application is used to verify the signature, and the encrypted ciphertext after the signature verification is passed is obtained; and the encrypted ciphertext is decrypted using the decryption key corresponding to the target application to obtain the device information. Based on the device information, the operating environment of the target application is determined; and based on the operating environment, at least one information is screened out from the device information as the information item to be verified. Then the corresponding actual information item is selected from the current device information of the terminal device, and the actual information item is compared one by one with the corresponding information item to be verified to obtain the comparison result. Then the operating state of the target application is determined based on the comparison result. In the embodiment of the present application, the operating environment of the target application can be obtained through the device information, and then the information items to be verified suitable for verification in the current operating environment are screened out, and the information items to be verified are compared and verified one by one with the corresponding actual information items, so as to determine the operating state of the target application. Since the embodiment of the present application can select the information items to be verified based on the operating environment of the target application, the flexibility of the verification process can be increased, and the occurrence of the situation where the license certificate verification fails in some operating environments and the user is prevented from using the application is avoided.
[0152] The embodiments of the present application can improve the stability of application usage.
[0153] In this embodiment, the interaction process among the terminal device, the second server and the first server is taken as an example to describe the method of the embodiment of the present application in detail.
[0154] like Figure 2 As shown, the specific process of an information verification method is as follows:
[0155] 201. The terminal device sends program attribute information to the second server.
[0156] 202. The second server registers based on the program attribute information and generates a first key and a second key.
[0157] 203. The second server sends the first secret key to the terminal device.
[0158] 204. The terminal device sends a key generation request to the first server.
[0159] 205. The first server responds to the key generation request and generates a signing key and a signature verification key.
[0160] 206. The first server sends the signature verification key to the terminal device.
[0161] 207. The terminal device collects information of the terminal device.
[0162] 208. The terminal device encrypts the information of the terminal device using the first secret key to obtain a machine identification file.
[0163] 209. The terminal device sends the machine identification file to the second server.
[0164] 210. The second server uses the second secret key to decrypt, obtains the information of the terminal device, and adds the control authority information to obtain the device information; and uses the encryption key to encrypt the device information to obtain the encrypted ciphertext.
[0165] 211. The second server sends the encrypted ciphertext to the first server.
[0166] 212. The first server receives the encrypted ciphertext, and signs the encrypted ciphertext using the signature key to obtain the signed ciphertext.
[0167] 213. The first server sends the signed ciphertext to the terminal device.
[0168] 214. The terminal device obtains the signature ciphertext, and uses the signature verification key corresponding to the target application to verify the signature ciphertext to obtain the encrypted ciphertext.
[0169] 215. The terminal device decrypts the encrypted ciphertext using the decryption key corresponding to the target application to obtain the device information.
[0170] 216. The terminal device determines the operating environment of the target application based on the device information.
[0171] Optionally, the device information includes a usage status indication parameter and a deployment type indication parameter. Accordingly, the above step 216 includes: determining the operating environment of the target application based on the usage status indication parameter and the deployment type indication parameter.
[0172] 217. The terminal device determines the information item to be verified in the device information based on the operating environment. In one embodiment, determining the operating environment of the target application based on the usage status indication parameter and the deployment type indication parameter includes: if the usage status indication parameter indicates that the current usage status is a trial status, determining the operating environment as a trial environment based on the usage status indication parameter;
[0173] Correspondingly, determining the information item to be verified in the device information based on the operating environment includes: based on the trial environment, determining the usage limit time in the device information as the information item to be verified.
[0174] In another embodiment, the determining the operating environment of the target application based on the use status indication parameter and the deployment type indication parameter includes: if the use status indication parameter indicates that the current use status is a formal use status, and the deployment type indication parameter indicates that the deployment type is a virtual machine deployment, then based on the use status indication parameter and the deployment type indication parameter, determining that the operating environment is a formal use environment running on a virtual machine;
[0175] The determining, based on the operating environment, the information item to be verified in the device information includes:
[0176] Based on the official use environment running on the virtual machine, all the device information is determined as the information items to be verified.
[0177] In yet another embodiment, the determining the operating environment of the target application based on the use status indication parameter and the deployment type indication parameter includes: if the use status indication parameter indicates that the current use status is a formal use status, and the deployment type indication parameter indicates that the deployment type is container deployment, then based on the use status indication parameter and the deployment type indication parameter, determining that the operating environment is a formal use environment running in a container;
[0178] The determining the information item to be verified in the device information based on the operating environment includes: based on the official use environment running in the container, determining the device identity and Internet Protocol address in the device information as the information item to be verified.
[0179] 218. The terminal device selects an actual information item corresponding to the information item to be verified from the current device information of the terminal device.
[0180] 219. The terminal device compares the actual information item with the information item to be verified, and determines the running status of the target application based on the comparison result.
[0181] In one embodiment, the comparison result includes: all of the actual information items are consistent with the corresponding information items to be verified;
[0182] Correspondingly, determining the running state of the target application based on the comparison result includes: if the comparison result is: all the actual information items are consistent with the corresponding information items to be verified, then determining that the running state of the target application is normal running.
[0183] In another embodiment, the comparison result includes: there is inconsistency between the actual information item and the corresponding information item to be verified;
[0184] Correspondingly, determining the running state of the target application based on the comparison result includes: if the comparison result is: there is inconsistency between the actual information item and the corresponding information item to be verified, determining that the running state of the target application is terminated.
[0185] The specific execution process of step 201 to step 219 has been described in detail above and will not be repeated here.
[0186] In the information verification method provided in the embodiment of the present application, the signature ciphertext can be obtained, and the signature verification key corresponding to the target application is used to verify the signature, and the encrypted ciphertext after the signature verification is passed is obtained; and the encrypted ciphertext is decrypted using the decryption key corresponding to the target application to obtain the device information. Based on the device information, the operating environment of the target application is determined; and based on the operating environment, at least one information is screened out from the device information as the information item to be verified. Then the corresponding actual information item is selected from the current device information of the terminal device, and the actual information item is compared one by one with the corresponding information item to be verified to obtain the comparison result. Then the operating state of the target application is determined based on the comparison result. In the embodiment of the present application, the operating environment of the target application can be obtained through the device information, and then the information items to be verified suitable for verification in the current operating environment are screened out, and the information items to be verified are compared and verified one by one with the corresponding actual information items, so as to determine the operating state of the target application. Since the embodiment of the present application can select the information items to be verified based on the operating environment of the target application, the flexibility of the verification process can be increased, and the occurrence of the situation where the license certificate verification fails in some operating environments and the user is prevented from using the application is avoided.
[0187] The embodiments of the present application can improve the stability of application usage.
[0188] In order to better implement the above method, the embodiment of the present application also provides an information verification device, which can be integrated into an electronic device, and the electronic device can be a terminal, a server, and other devices. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC) and other devices; the server can be a single server or a server cluster composed of multiple servers. For example, in this embodiment, the device of the embodiment of the present application will be described in detail by taking the information verification device specifically integrated in the server as an example.
[0189] For example, Figure 3 As shown, the information verification device includes:
[0190] The ciphertext encryption unit 301 is used to obtain the signature ciphertext, and verify the signature ciphertext using the signature verification key corresponding to the target application to obtain the encrypted ciphertext, wherein the signature ciphertext is obtained by the first server signing the encrypted ciphertext using the signature key, and the encrypted ciphertext is obtained by the second server encrypting the device information using the encryption key, and the signature verification key corresponds to the signature key;
[0191] The device information unit 302 is used to decrypt the encrypted ciphertext using a decryption key corresponding to the target application to obtain the device information, wherein the decryption key corresponds to the encryption key;
[0192] An environment determination unit 303, configured to determine the operating environment of the target application based on the device information;
[0193] The to-be-verified information item unit 304 is configured to determine, based on the operating environment, an to-be-verified information item in the device information, wherein the to-be-verified information item is at least one item of information in the device information;
[0194] An actual information item unit 305 is used to select an actual information item corresponding to the information item to be verified from the current device information of the terminal device;
[0195] The running status determining unit 306 is used to compare the actual information item with the information item to be verified, and determine the running status of the target application based on the comparison result.
[0196] In one implementation, the device information includes a usage status indication parameter and a deployment type indication parameter; accordingly, the environment determination unit 303 includes:
[0197] Based on the usage status indication parameter and the deployment type indication parameter, the operating environment of the target application is determined.
[0198] In one implementation, the environment determination unit 303 is specifically configured to: when the use status indication parameter indicates that the current use status is a trial status, determine that the operating environment is a trial environment based on the use status indication parameter;
[0199] Correspondingly, the to-be-verified information item unit 304 is specifically configured to determine the usage limit duration in the device information as the to-be-verified information item based on the trial environment.
[0200] In one embodiment, the environment determination unit 303 is specifically configured to determine, when the usage status indication parameter indicates that the current usage status is the formal usage status, and the deployment type indication parameter indicates that the deployment type is virtual machine deployment, based on the usage status indication parameter and the deployment type indication parameter, that the operating environment is the formal usage environment running on the virtual machine;
[0201] Correspondingly, the to-be-verified information item unit 304 is specifically configured to determine all of the device information as the to-be-verified information items based on the official use environment running on the virtual machine.
[0202] In one embodiment, the environment determination unit 303 is specifically configured to determine, when the usage status indication parameter indicates that the current usage status is the formal usage status, and the deployment type indication parameter indicates that the deployment type is container deployment, based on the usage status indication parameter and the deployment type indication parameter, that the operating environment is the formal usage environment running in the container;
[0203] Correspondingly, the to-be-verified information item unit 304 is specifically configured to determine the device identity and the Internet Protocol address in the device information as the to-be-verified information item based on the formal use environment running in the container.
[0204] In one embodiment, the comparison result includes: all of the actual information items are consistent with the corresponding information items to be verified;
[0205] Correspondingly, the running status determining unit 306 is specifically used to: when the comparison result is: all the actual information items are consistent with the corresponding information items to be verified, determine that the running status of the target application is normal running.
[0206] In one embodiment, the comparison result includes: there is inconsistency between the actual information item and the corresponding information item to be verified;
[0207] Correspondingly, the running state determining unit 306 is specifically used to: when the comparison result is: there is inconsistency between the actual information item and the corresponding information item to be verified, determine that the running state of the target application is suspended.
[0208] In one implementation, the ciphertext encryption unit 301 is specifically configured to receive the signed ciphertext sent by the first server.
[0209] In one embodiment, the device further comprises:
[0210] An information collection unit, used to collect information of the terminal device;
[0211] An information encryption unit, used to encrypt the information of the terminal device using a first secret key to obtain a machine identification file;
[0212] The file sending unit is used to send the machine identification file to the second server so that the second server can use the second key to decrypt the machine identification file to obtain the information of the terminal device; wherein, the information of the terminal device is added with the control authority information by the second server to obtain the device information; the device information is encrypted by the second server using the encryption key to obtain the encrypted ciphertext; the encrypted ciphertext is sent to the first server via the second server and signed by the first server using the signature key to obtain the signed ciphertext.
[0213] In one embodiment, the device further comprises:
[0214] an attribute information sending unit, configured to send program attribute information to the second server using the target application, so that the second server registers the target application based on the program attribute information, and generates the first key and the second key after registration, wherein the first key corresponds to the second key;
[0215] A first secret key receiving unit, used for receiving the first secret key sent by the second server;
[0216] a generating request unit, configured to send a key generation request to the first server, so that the first server generates the signing key and the signature verification key based on the key generation request;
[0217] The signature verification key receiving unit is used to receive the signature verification key sent by the first server.
[0218] In one embodiment, the device further comprises:
[0219] The instruction receiving unit is used to receive a triggered setting execution instruction, wherein the setting execution instruction is used to instruct the target application to run a preset function.
[0220] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0221] In the information verification method provided in the embodiment of the present application, the signature ciphertext can be obtained, and the signature verification key corresponding to the target application is used to verify the signature, and the encrypted ciphertext after the signature verification is passed is obtained; and the encrypted ciphertext is decrypted using the decryption key corresponding to the target application to obtain the device information. Based on the device information, the operating environment of the target application is determined; and based on the operating environment, at least one information is screened out from the device information as the information item to be verified. Then the corresponding actual information item is selected from the current device information of the terminal device, and the actual information item is compared one by one with the corresponding information item to be verified to obtain the comparison result. Then the operating state of the target application is determined based on the comparison result. In the embodiment of the present application, the operating environment of the target application can be obtained through the device information, and then the information items to be verified suitable for verification in the current operating environment are screened out, and the information items to be verified are compared and verified one by one with the corresponding actual information items, so as to determine the operating state of the target application. Since the embodiment of the present application can select the information items to be verified based on the operating environment of the target application, the flexibility of the verification process can be increased, and the occurrence of the situation where the license certificate verification fails in some operating environments and the user is prevented from using the application is avoided.
[0222] The embodiments of the present application can improve the stability of application usage.
[0223] The embodiments of the present application can reduce as much as possible the possibility that users who come to view reviews are maliciously misled through the above-mentioned method, so that the review platform can more realistically help users make viewing decisions and more realistically reflect the reputation of the work.
[0224] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.
[0225] In some embodiments, the information verification device may also be integrated into multiple electronic devices. For example, the information verification device may be integrated into multiple servers, and the information verification method of the present application may be implemented by multiple servers.
[0226] In this embodiment, the electronic device of this embodiment is an electronic device as an example for detailed description, for example, Figure 4 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0227] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0228] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0229] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and information verification by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may 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 may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0230] The electronic device also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0231] The electronic device may further include an input module 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0232] The electronic device may further include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The electronic device may perform short-range wireless transmission through the wireless module of the communication module 405, thereby providing the user with wireless broadband Internet access. For example, the communication module 405 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0233] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:
[0234] Obtain a signature ciphertext, and verify the signature ciphertext using the verification key corresponding to the target application to obtain an encrypted ciphertext, wherein the signature ciphertext is obtained by signing the encrypted ciphertext with the signature key by the first server, and the encrypted ciphertext is obtained by encrypting the device information with the encryption key by the second server, and the verification key corresponds to the signature key; decrypt the encrypted ciphertext using the decryption key corresponding to the target application to obtain the device information, wherein the decryption key corresponds to the encryption key; determine the operating environment of the target application based on the device information; determine the information item to be verified in the device information based on the operating environment, wherein the information item to be verified is at least one item of information in the device information; select the actual information item corresponding to the information item to be verified from the current device information of the terminal device; compare the actual information item with the information item to be verified, and determine the operating status of the target application based on the comparison result.
[0235] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0236] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0237] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the information verification methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0238] Obtain a signature ciphertext, and verify the signature ciphertext using the verification key corresponding to the target application to obtain an encrypted ciphertext, wherein the signature ciphertext is obtained by signing the encrypted ciphertext with the signature key by the first server, and the encrypted ciphertext is obtained by encrypting the device information with the encryption key by the second server, and the verification key corresponds to the signature key; decrypt the encrypted ciphertext using the decryption key corresponding to the target application to obtain the device information, wherein the decryption key corresponds to the encryption key; determine the operating environment of the target application based on the device information; determine the information item to be verified in the device information based on the operating environment, wherein the information item to be verified is at least one item of information in the device information; select the actual information item corresponding to the information item to be verified from the current device information of the terminal device; compare the actual information item with the information item to be verified, and determine the operating status of the target application based on the comparison result.
[0239] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0240] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementations provided in the above embodiments.
[0241] Since the instructions stored in the storage medium can execute the steps in any information verification method provided in the embodiments of the present application, the beneficial effects that can be achieved by any information verification method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0242] The above is a detailed introduction to an information verification method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An information verification method, characterized in that: The method is applied to a terminal device, the terminal device runs a target application, and the method includes: Obtaining a signature ciphertext, and verifying the signature ciphertext using the signature verification key corresponding to the target application to obtain an encrypted ciphertext, wherein the signature ciphertext is obtained by the first server signing the encrypted ciphertext using the signature key, and the encrypted ciphertext is obtained by the second server encrypting the device information using the encryption key, and the signature verification key corresponds to the signature key; Decrypting the encrypted ciphertext using a decryption key corresponding to the target application to obtain the device information, wherein the decryption key corresponds to the encryption key; Based on the device information, determining the operating environment of the target application; Determine, based on the operating environment, an information item to be verified in the device information, wherein the information item to be verified is at least one item of information in the device information; Selecting, from the current device information of the terminal device, an actual information item corresponding to the information item to be verified; The actual information item is compared with the information item to be verified, and the running state of the target application is determined based on the comparison result.
2. The method according to claim 1, characterized in that The device information includes a usage status indication parameter and a deployment type indication parameter; The determining, based on the device information, the operating environment of the target application program includes: Based on the usage status indication parameter and the deployment type indication parameter, the operating environment of the target application is determined.
3. The method according to claim 2, characterized in that The determining the operating environment of the target application based on the usage status indication parameter and the deployment type indication parameter includes: If the usage status indication parameter indicates that the current usage status is a trial status, determining that the operating environment is a trial environment based on the usage status indication parameter; The determining, based on the operating environment, the information item to be verified in the device information includes: Based on the trial environment, the usage limit duration in the device information is determined as the information item to be verified.
4. The method according to claim 2, characterized in that The determining the operating environment of the target application based on the usage status indication parameter and the deployment type indication parameter includes: If the usage status indication parameter indicates that the current usage status is the formal usage status, and the deployment type indication parameter indicates that the deployment type is virtual machine deployment, then based on the usage status indication parameter and the deployment type indication parameter, determining that the operating environment is the formal usage environment running on the virtual machine; The determining, based on the operating environment, the information item to be verified in the device information includes: Based on the official use environment running on the virtual machine, all the device information is determined as the information items to be verified.
5. The method according to claim 2, characterized in that The determining the operating environment of the target application based on the usage status indication parameter and the deployment type indication parameter includes: If the usage status indication parameter indicates that the current usage status is the formal usage status, and the deployment type indication parameter indicates that the deployment type is container deployment, then based on the usage status indication parameter and the deployment type indication parameter, determining that the operating environment is the formal usage environment running in a container; The determining, based on the operating environment, the information item to be verified in the device information includes: Based on the official use environment running in the container, the device identity and the Internet Protocol address in the device information are determined as the information items to be verified.
6. The method according to claim 1, characterized in that The comparison result includes: all the actual information items are consistent with the corresponding information items to be verified; Determining the running state of the target application based on the comparison result includes: If the comparison result is that all the actual information items are consistent with the corresponding information items to be verified, it is determined that the running state of the target application is normal running.
7. The method according to claim 1, characterized in that The comparison result includes: there is inconsistency between the actual information item and the corresponding information item to be verified; Determining the running state of the target application based on the comparison result includes: If the comparison result is that there is an inconsistency between the actual information item and the corresponding information item to be verified, it is determined that the running state of the target application is terminated.
8. The method according to claim 1, characterized in that The obtaining of the signature ciphertext comprises: Receive the signed ciphertext sent by the first server.
9. The method according to claim 8, characterized in that Before receiving the signed ciphertext sent by the first server, the method further includes: Collecting information of the terminal device; Encrypting the information of the terminal device using the first secret key to obtain a machine identification file; The machine identification file is sent to the second server so that the second server can use the second key to decrypt the machine identification file to obtain the information of the terminal device; wherein, the information of the terminal device is added with the control authority information by the second server to obtain the device information; the device information is encrypted by the second server using the encryption key to obtain the encrypted ciphertext; the encrypted ciphertext is sent to the first server via the second server and signed by the first server using the signature key to obtain the signed ciphertext.
10. The method according to claim 9, characterized in that Before collecting the information of the terminal device, the method further includes: Using the target application to send program attribute information to the second server, so that the second server registers the target application based on the program attribute information, and generates the first key and the second key after registration, wherein the first key corresponds to the second key; receiving the first secret key sent by the second server; Sending a key generation request to the first server, so that the first server generates the signing key and the signature verification key based on the key generation request; Receive the signature verification key sent by the first server.
11. The method according to claim 1, characterized in that Before determining the operating environment of the target application based on the device information, the method further includes: A triggered setting execution instruction is received, wherein the setting execution instruction is used to instruct the target application to run a preset function.
12. An information verification device, characterized in that: The device comprises: an encryption ciphertext unit, used to obtain a signature ciphertext, and verify the signature ciphertext using a signature verification key corresponding to the target application to obtain an encrypted ciphertext, wherein the signature ciphertext is obtained by signing the encrypted ciphertext by the first server using the signature key, and the encrypted ciphertext is obtained by encrypting device information by the second server using the encryption key, and the signature verification key corresponds to the signature key; A device information unit, used to decrypt the encrypted ciphertext using a decryption key corresponding to the target application to obtain the device information, wherein the decryption key corresponds to the encryption key; An environment determination unit, configured to determine an operating environment of the target application based on the device information; an information item to be verified unit, configured to determine an information item to be verified in the device information based on the operating environment, wherein the information item to be verified is at least one item of information in the device information; An actual information item unit, configured to select an actual information item corresponding to the information item to be verified from the current device information of the terminal device; The running status determining unit is used to compare the actual information item with the information item to be verified, and determine the running status of the target application based on the comparison result.
13. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the information verification method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the information verification method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the steps of the information verification method according to any one of claims 1 to 11.