Decoupling method and device for debugging equipment and application signature, equipment and storage medium

By pre-store the device identifier of the debugging device in the target device identification database and bind it to the digital signature of the application, the problem of binding the debugging device and the application signature in the prior art is solved, efficient debugging device management is achieved, and the debugging efficiency of the application is improved.

CN119645815AActive Publication Date: 2025-03-18深圳开鸿数字产业发展有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411439055.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-03-18
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

In the prior art, the debugging device is bound to the application signature, resulting in the application signature being modified every time the debugging device is added, which increases complexity and reduces the debugging efficiency.

Method used

By pre-store the device identifier of the debugging device in the target device identification database and bind the target device identification database with the digital signature of the application, decoupling the debugging device and the application can be achieved. Only by adjusting the target device identification database, new debugging devices can be added.

Benefits of technology

Improves the debugging efficiency of the application, reduces the complexity and time of the newly added debugging equipment, and avoids the need to modify the device identity in the application signature.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645815A_ABST
    Figure CN119645815A_ABST
Patent Text Reader

Abstract

The invention discloses a decoupling method and device for debugging equipment and application signatures, equipment and a storage medium. The method comprises the steps that an operation instruction for an application program is received, and an equipment identifier of electronic equipment corresponding to the operation instruction is read; when the operation instruction is a debugging instruction, detecting whether the equipment identifier is contained in a target equipment identifier library or not; and if the device identifier is contained in the target device identifier library, responding to the debugging instruction to debug the application program through the electronic device. According to the application, the device identifier of the debugging device is pre-stored in the target device identifier library, and then the target device identifier library is bound with the digital signature of the application to realize the binding of the debugging device and the application, so that when the debugging device is newly added, only the target device identifier library needs to be adjusted; and the device identifier bound with the application program does not need to be modified in the application signature, so that the debugging efficiency of the application program is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method, apparatus, device and storage medium for decoupling a debugging device from an application signature. Background Art

[0002] Before the application is released, it will be debugged, and the debugging device will be restricted by binding the device ID of the debugging device with the application signature of the application. Although this can prevent the leakage of the application in the debugging stage, it will result in the need to modify the device ID bound to the application in the application signature every time a new debugging device is needed, which increases the complexity of adding new application debugging devices and reduces the efficiency of adding new application debugging devices, thereby reducing the debugging efficiency of the application.

[0003] Therefore the prior art still needs to be improved and enhanced. Summary of the invention

[0004] The technical problem to be solved by the present application is to provide a method, apparatus, device and storage medium for decoupling a debugging device from an application signature in view of the deficiencies in the prior art.

[0005] In order to solve the above technical problems, the first aspect of the present application provides a method for decoupling a debugging device from an application signature, wherein the method for decoupling a debugging device from an application signature specifically includes:

[0006] Receiving an operation instruction for an application program, and reading a device identification of an electronic device corresponding to the operation instruction;

[0007] When the operation instruction is a debugging instruction, detecting whether the device identification is included in a target device identification library;

[0008] If the device identification is included in the target device identification library, the debugging instruction is responded to so as to debug the application program through the electronic device.

[0009] The method for decoupling the debugging device from the application signature, wherein the method further comprises:

[0010] When the operation instruction is an adjustment instruction for the target device identification library, the target device identification library is adjusted based on the adjustment instruction, wherein the adjustment instruction includes one or more of adding a device identification and deleting a device identification.

[0011] The method for decoupling the debugging device from the application signature, wherein when the operation instruction is a debugging instruction, detecting whether the device identification is included in the target device identification library specifically includes:

[0012] When the operation instruction is a debugging instruction, detecting whether the electronic device has installed the application;

[0013] When the electronic device has installed the application, reading the installation time of the application;

[0014] If the installation time satisfies the first preset condition, reading the target device identification library bound to the application digital certificate of the application program, and detecting whether the device identification is included in the target device identification library;

[0015] If the installation time does not meet the first preset condition, the debugging instruction is rejected.

[0016] The method for decoupling a debugging device from an application signature, wherein when the operation instruction is a debugging instruction, detecting whether the device identification is included in a target device identification library further comprises:

[0017] When the electronic device installs the application for the first time, the system time of the electronic device is obtained, and the application signature data of the application is verified based on the system time;

[0018] If the verification is passed, controlling the electronic device to install the application and executing the step of reading the installation time of the application;

[0019] If the verification fails, the debugging instruction is rejected.

[0020] The method for decoupling the debugging device from the application signature, wherein after controlling the electronic device to install the application, the method further comprises:

[0021] Record the time when the application was installed.

[0022] The method for decoupling the debugging device from the application signature, wherein the application signature data is generated by a cloud platform, wherein the generation process of the application signature data specifically includes:

[0023] Receiving an application certificate generation request sent by a development end, wherein the application certificate generation request is used to apply for an application certificate and a profile authorization file for the application to be signed;

[0024] issuing an application certificate for the development end;

[0025] Get the profile private key from the preset profile key pair;

[0026] Performing a profile file signing on the application information of the application to be signed based on the profile private key to obtain signed application information;

[0027] The signed application information and the preset profile signing certificate are packaged into a p7b format to obtain a profile authorization file to obtain application signature data.

[0028] The method for decoupling the debugging device from the application signature, wherein before receiving the application certificate generation request sent by the development end, the method includes:

[0029] Generate a self-signed root certificate and issue an intermediate certificate through the root certificate;

[0030] Generate a profile key pair and use the intermediate certificate pair to issue a profile signing certificate.

[0031] A second aspect of the present application provides a decoupling device for a debugging device and an application signature, wherein the decoupling device for a debugging device and an application signature specifically includes:

[0032] A reading module, used to receive an operation instruction for an application program, and read a device identification of an electronic device corresponding to the operation instruction;

[0033] A detection module, used for detecting whether the device identification is included in a target device identification library when the operation instruction is a debugging instruction;

[0034] The allocation module is used to respond to the debugging instruction to debug the application program through the electronic device if the device identification is included in the target device identification library.

[0035] A third aspect of the present application provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in any of the above-described methods for decoupling a debugging device and an application signature.

[0036] A fourth aspect of the present application provides a terminal device, comprising: a processor and a memory;

[0037] The memory stores a computer-readable program executable by the processor;

[0038] When the processor executes the computer-readable program, the processor implements the steps in any of the above-mentioned methods for decoupling a debugging device from an application signature.

[0039] Beneficial effect: Compared with the prior art, the present application provides a method, apparatus, device and storage medium for decoupling a debugging device from an application signature, the method comprising receiving an operation instruction for an application, reading a device identification of an electronic device corresponding to the operation instruction; when the operation instruction is a debugging instruction, detecting whether the device identification is included in a target device identification library; if the device identification is included in the target device identification library, responding to the debugging instruction to debug the application through the electronic device. The present application implements the binding of the debugging device and the application by pre-storing the device identification of the debugging device in the target device identification library, and then binding the target device identification library with the digital signature of the application. In this way, when adding a new debugging device, it is only necessary to adjust the target device identification library, without modifying the device identification bound to the application in the application signature, thereby improving the debugging efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] 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 ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A flowchart of a method for decoupling a debugging device from an application signature provided in an embodiment of the present application.

[0042] Figure 2 It is a flowchart of a specific implementation process of step S20.

[0043] Figure 3 Flowchart of the process for generating a signature for an app.

[0044] Figure 4 A functional block diagram of a decoupling device for a debugging device and an application signature provided in an embodiment of the present application.

[0045] Figure 5 A functional block diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The embodiments of the present application provide a method, device, equipment and storage medium for decoupling a debugging device from an application signature. To make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0048] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0049] It should be understood that the sequence numbers and sizes of the steps in this embodiment do not mean the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0050] After research, it was found that the application will be debugged before release, and the debugging device will be restricted by binding the device ID of the debugging device with the application signature of the application. Although this can prevent the leakage of the application in the debugging stage, it will result in the need to modify the device ID bound to the application in the application signature every time a new debugging device is needed, which increases the complexity of adding new application debugging devices and reduces the efficiency of adding new application debugging devices, thereby reducing the debugging efficiency of the application.

[0051] In order to solve the above problems, in an embodiment of the present application, an operation instruction for an application is received, and the device identification of the electronic device corresponding to the operation instruction is read; when the operation instruction is a debugging instruction, it is detected whether the device identification is included in the target device identification library; if the device identification is included in the target device identification library, the debugging instruction is responded to so as to debug the application through the electronic device. The present application implements the binding of the debugging device and the application by pre-storing the device identification of the debugging device in the target device identification library, and then binding the target device identification library with the digital signature of the application. In this way, when adding a new debugging device, it is only necessary to adjust the target device identification library, without modifying the device identification bound to the application in the application signature, thereby improving the debugging efficiency of the application.

[0052] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.

[0053] This embodiment provides a method for decoupling a debugging device from an application signature. Figure 1 As shown, the method includes:

[0054] S10: Receive an operation instruction for an application program, and read a device identification of an electronic device corresponding to the operation instruction.

[0055] Specifically, the electronic device is an electronic device that the developer expects to use to debug the application, that is, the developer sends an operation instruction to the electronic device that the developer expects to be a debugging device, wherein the operation instruction may be sent through an external device or formed by triggering the electronic device. For example, when the electronic device installs the application, the operation instruction may be formed by clicking on the application, or the operation instruction may be sent to the electronic device through the cloud.

[0056] S20: When the operation instruction is a debugging instruction, detect whether the device identification is included in a target device identification library, wherein the database identification of the target device identification library is bound to the application signature data of the application program.

[0057] Specifically, the debugging instruction refers to the desire to use the electronic device as a debugging device for the application. To this end, when the operation instruction is a debugging instruction, the device identification of the electronic device corresponding to the operation instruction is detected, and whether the device identification is included in the target device identification library is detected to determine whether the electronic device can be used as a debugging device for the application. In addition, the operation instruction can also be an adjustment instruction for the target device identification library corresponding to the application. When the operation instruction is an adjustment instruction, the target device identification library corresponding to the application will be read, and the device identification in the target device identification library will be adjusted according to the adjustment instruction. Based on this, the method also includes:

[0058] When the operation instruction is an adjustment instruction for the target device identification library, the target device identification library is adjusted based on the adjustment instruction, wherein the adjustment instruction includes one or more of adding a device identification and deleting a device identification.

[0059] Specifically, when the operation instruction is an instruction to adjust the target device identification library, the operation instruction includes the target device identification and the operation type, and the operation type can be adding a device identification / deleting a device identification. When the operation type is adding a device identification, the target device identification included in the operation instruction is added to the target device identification library, and when the operation type is deleting a device identification, the target device identification included in the operation instruction is deleted from the target device identification library. Of course, in actual applications, the operation instruction can only include the operation type, and the target device identification is obtained by reading the device identification of the electronic device, and then the device identification of the electronic device is added to the target device identification library or deleted from the target device identification library according to the operation type.

[0060] The target device identification library is pre-set and used to store the device identification of the debugging device corresponding to the application. The target device identification library may include one device identification, or may include device identifications. Each electronic device corresponding to the device identification in the target device identification library can be used as a debugging device for the application, that is, it has the authority to debug the application. The target device identification library is configured with a unique library identification, and the library identification is bound to the signature of the application, so that the target device identification library is bound to the signature of the application. When the application performs signature verification, it will find the target device identification library according to the library identification of the target device identification library, and then verify whether the device identification of the electronic device is stored in the target device identification library to verify whether the electronic device is a debugging device for the application.

[0061] It should be noted that the target device identification library can be pre-stored locally in the electronic device, or stored in the cloud, or stored in the management device, wherein, when the target device identification library is stored locally in the electronic device, the electronic device can directly read the target device identification library locally when performing signature verification on the application program, and when the target device identification library is stored in the cloud or management device, the electronic device will send a request for obtaining the library identification to the cloud or management device when performing signature verification on the application program, and then send the target device identification library to the electronic device through the cloud or management device. In addition, when the target device identification library is stored in the cloud or management device, the step of detecting whether the device identification is included in the target device identification library can be performed by storing the target device identification library in the cloud or management device, and the detection result can be fed back to the electronic device; or, after sending the target device identification library to the electronic device through the cloud or management device, the electronic device will be controlled to automatically delete the target device identification library after a preset time.

[0062] Furthermore, the electronic device may have installed the application or may not have installed the application. To this end, when the operation instruction is a debugging instruction, it will first detect whether the electronic device has installed the application, and then detect whether the device identification is included in the target device identification library. When the electronic device installs the application, it will directly detect whether the device identification is included in the target device identification library, or it will first open the electronic device for verification, and then detect whether the device identification is included in the target device identification library.

[0063] For example, Figure 2 As shown, when the operation instruction is a debugging instruction, detecting whether the device identification is included in the target device identification library specifically includes:

[0064] S21, when the operation instruction is a debugging instruction, detecting whether the electronic device has installed the application;

[0065] S22, when the electronic device has installed the application, reading the installation time of the application;

[0066] S23: If the installation time satisfies a first preset condition, reading a target device identification library bound to the application digital certificate of the application program, and detecting whether the device identification is included in the target device identification library;

[0067] S24: If the installation time does not meet the first preset condition, reject the debugging instruction.

[0068] Specifically, the first preset condition is used to perform an opening check on the application, wherein the opening check is used to check whether the electronic device is within the debugging device range corresponding to the application. The first preset condition can be that the installation time is less than the application limit usage time, or that the installation time is less than the application limit usage time, and the application signature of the application is within the authorization validity period.

[0069] In one implementation, when the electronic device has installed the application, after reading the installation time of the application, the method further includes performing an opening verification based on the installation time, wherein the opening verification process may include:

[0070] Inputting the installation time and the current system time of the electronic device into a signature verification module in the package management module;

[0071] Calculate the relative time interval between the installation time and the current system time by means of a signature verification module;

[0072] If the relative time interval is less than or equal to the application restricted usage time, it is determined that the installation time meets the first preset condition;

[0073] If the relative time interval is greater than the application usage restriction duration, it is determined that the installation time does not meet the first preset condition due to a failure in checking the application usage restriction duration.

[0074] Specifically, a signature verification module is provided in the package management module, and the signature verification module is used to verify the application, wherein a RunVerify interface and a RemoveDebugData interface are newly added in the signature verification module, and a debugging range verification function is configured in the hapVerify interface in the signature verification module, that is, the signature verification module in the package management module is configured with a hapVerify interface, a RunVerify interface and a RemoveDebugData interface; the hapVerify interface is used to verify the application when the application is installed, and the verification of the application when the application is installed includes signature verification and debugging range verification, and the debugging range verification is used to perform signature time verification and authorization validity period verification; the RunVerify interface is used to verify the application to be opened when the application is opened (i.e., perform an opening verification); the RemoveDebugData interface is used to delete the installation information of the program to be uninstalled when the application is uninstalled. The implementation process of the hapVerify interface remains unchanged, only the interface logic of the hapVerify interface is changed. The modified interface logic can determine the application type according to the incoming application package name. If the application type is a release type, the verification passes and returns HAP_VERIFY_RELEASE_OK; if the application type is a debug type, a signature verification and a debug range verification are performed. If the verification fails, HAP_VERIFY_TIME_ERROR is returned and the application is not allowed to be opened; if the verification passes, HAP_VERIFY_OK is returned and the application is allowed to be opened. If an error occurs in searching the database, HAP_VERIFY_FIND_ERROR is returned and the application is not allowed to be opened.

[0075] The RunVerify interface is represented as int RunVerify(const std::string bundleName);

[0076] Function parameter: application package name bundleName.

[0077] Function return value:

[0078]

[0079] RUN_VERIFY_OK indicates that the application type is debug type, the usage time is limited and the verification has passed, and the application is allowed to be opened;

[0080] RUN_VERIFY_FIND_ERROR means that the database search based on the package name fails and the application cannot be opened;

[0081] RUN_VERIFY_TIME_ERROR indicates that the application type is debugging type, the validity period verification fails, and the application is not allowed to be opened;

[0082] RUN_VERIFY_RELEASE_OK indicates that the application type is a release type, there is no validity period, and the application is allowed to be opened.

[0083] The interface logic of the RunVerify interface is:

[0084] The application type is determined based on the incoming application package name. If the application type is a release type, the verification passes and RUN_VERIFY_RELEASE_OK is returned. If the application type is a debug type, the validity period verification is performed. If the verification fails, RUN_VERIFY_TIME_ERROR is returned and the application is not allowed to be opened. If the verification passes, RUN_VERIFY_OK is returned and the application is allowed to be opened. If an error occurs in searching the database, RUN_VERIFY_FIND_ERROR is returned and the application is not allowed to be opened.

[0085] How to use the RunVerify interface:

[0086] The package management module calls the RunVerify interface every time the application is opened, and adds relevant judgment logic based on the return value to control whether the opening is allowed, and if not allowed, a pop-up interface prompts that the application has exceeded the validity period.

[0087] The RemoveDebugData interface is represented by int RemoveDebugData(const std::stringbundleName)

[0088] Function parameter: application package name

[0089] Function return value:

[0090]

[0091] REMOVE_OK means the application type is debugging type and the database is deleted successfully;

[0092] REMOVE_FIND_ERROR means that the database search failed and you need to check whether the database is wrong;

[0093] REMOVE_DELETE_ERROR indicates that the application type is debugging type, and database deletion fails. You need to check whether the database is correct.

[0094] REMOVE_RELEASE_OK indicates that the application type is release type and the database does not need to be deleted;

[0095] The interface logic of the RemoveDebugData interface:

[0096] The application type is determined by searching the database based on the passed application package name. If REMOVE_FIND_ERROR is returned, it means that the database search failed. If it is a release type, REMOVE_RELEASE_OK is returned, and there is no need to delete the database. If it is a debug type, the database needs to be deleted. Returning REMOVE_OK means the deletion is successful, and returning REMOVE_DELETE_ERROR means the deletion failed.

[0097] How to use the RemoveDebugData interface:

[0098] The package management module calls this interface to delete the corresponding record in the database every time the application is uninstalled.

[0099] Furthermore, the relative time interval refers to the interval between the installation time and the current system time, which is used to reflect the usage time of the electronic device using the application. The application limit usage time is pre-set, which is the usage time that the electronic device can use the application. To this end, after obtaining the relative time interval, the relative time interval is compared with the application limit usage time. If the relative time interval is less than or equal to the application limit usage time, it means that the electronic device can continue to use the application. If the relative time interval is greater than the application limit usage time, it means that the electronic device cannot continue to use the application. In this way, the usage time can be limited to restrict the electronic device, which can prevent debugging-type applications from being used indefinitely by electronic devices.

[0100] In another implementation, the process of opening the verification may include:

[0101] Obtaining the signing time of the application, and inputting the signing time, the installation time, and the current system time of the electronic device into the signature verification module in the package management module;

[0102] Calculate the relative time interval between the installation time and the current system time, and the absolute time interval between the signature time and the current system time respectively through the signature verification module;

[0103] If the relative time interval is less than or equal to the application usage restriction duration, and the absolute time interval is less than or equal to the authorization validity period, it is determined that the installation time meets the first preset condition;

[0104] If the relative time interval is greater than the application usage restriction duration, and the absolute time interval is less than or equal to the authorization period, it is determined that the installation time does not meet the first preset condition due to the failure of the application usage restriction duration check;

[0105] If the absolute time interval is greater than the authorization validity period, and the relative time interval is less than or equal to the application usage restriction duration, it is determined that the installation time does not meet the first preset condition due to failure of the authorization validity period check;

[0106] If the relative time interval is greater than the application usage restriction duration, and the absolute time interval is greater than the authorization validity period, it is determined that the installation time does not meet the first preset condition because both the application usage restriction duration and the authorization validity period have failed the inspection.

[0107] Specifically, the verification process of the installation time is the same as that in the above-mentioned implementation method, and will not be repeated here. Here, only the authorization validity period verification performed after the installation time verification is passed is described. The absolute time interval is the interval between the signature time and the current system time, which is used to verify the validity of the application's signature. In other words, by comparing the absolute time interval with the authorization validity period, it is determined whether the digital signature of the application has expired, wherein if the absolute time interval is greater than the authorization validity period, it means that the digital signature has expired; conversely, if the absolute time interval is less than or equal to the authorization validity period, it means that the digital signature has not expired.

[0108] In addition, in actual applications, applications are generally installed only after being signed, so the signing time will be earlier than the installation time, and the usage restrictions are generally within the validity period of the signature, so in the embodiments of the present application, the authorization validity period is greater than the application limit usage time, so that the use of applications within the validity period of the signature can be restricted. Of course, in actual applications, applications that have been signed for a long time will also be installed and used by electronic devices, so the embodiments of the present application perform double verification by applying the limit usage time and the authorization validity period, which not only restricts the use of electronic devices, but also prevents the use of applications with expired signatures of electronic devices.

[0109] Exemplarily, when the electronic device has not installed the application, the electronic device is first controlled to install the application, and then the device identification is detected to be included in the target device identification library. To this end, when the operation instruction is a debugging instruction, detecting whether the device identification is included in the target device identification library also includes:

[0110] When the electronic device installs the application for the first time, the system time of the electronic device is obtained, and the application signature data of the application is verified based on the system time;

[0111] If the verification is passed, controlling the electronic device to install the application and executing the step of reading the installation time of the application;

[0112] If the verification fails, the debugging instruction is rejected.

[0113] Specifically, the application signature data of the application is verified based on the system time for installation verification of the electronic device to determine whether the electronic device can install the application. The specific process of verifying the application signature data of the application based on the system time can be: when the electronic device installs a debugging type application, the application is verified by the package management module; if the signature verification is passed, the current system time of the electronic device where the application is installed, the signature time of the application, and the authorization validity period of the profile authorization file of the application are obtained; the first time difference between the current system time and the signature time is calculated, and the calculated first time difference is compared with the first time threshold; when the first time difference is less than the first time threshold, the profile authorization file is verified based on the authorization validity period to see if it is expired; if the profile authorization file is not expired, the application is installed, and the installation time, the application package name of the application, and the authorization validity period are stored as the installation information of the application in the database, wherein the signature time and the authorization validity period are verified based on the current system time.

[0114] It should be noted that the application signature data is generated through the cloud platform, such as Figure 3 As shown, the generation process of the application signature data specifically includes:

[0115] Receiving an application certificate generation request sent by a development end, and issuing an application certificate to the development end based on the application certificate generation request, wherein the application certificate generation request is used to apply for an application certificate and a profile authorization file for the application to be signed;

[0116] Get the profile private key from the preset profile key pair;

[0117] Performing a profile file signing on the application information of the application to be signed based on the profile private key to obtain signed application information;

[0118] The signed application information and the preset profile signing certificate are packaged into a p7b format to obtain a profile authorization file to obtain application signature data.

[0119] Specifically, the application certificate is a digital certificate used to sign the application, that is, the application to be released is obtained by digitally signing based on the application certificate. The application certificate is issued by the digital twin platform based on the public key in the developer key pair, where the developer key pair can be generated by the developer itself or by the digital twin platform for the developer.

[0120] The profile key pair and profile signing certificate are preset and used to issue profile authorization files for the target application. The profile key pair is used as the key information of the profile authorization file to encrypt the profile authorization file. Among them, the profile key pair can be randomly generated or generated according to preset conditions, for example, the generation method of the profile key pair is given in advance, or the key information that the profile key pair needs to include is given in advance. The profile signing certificate is used by the digital twin platform to issue the profile signing certificate using an intermediate certificate pair.

[0121] Exemplarily, before receiving the application certificate generation request sent by the development end, the method includes:

[0122] Generate a self-signed root certificate and issue an intermediate certificate through the root certificate;

[0123] Generate a profile key pair and use the intermediate certificate pair to issue a profile signing certificate.

[0124] Specifically, the root certificate is issued by the digital twin platform itself, and the intermediate certificate is issued by the root certificate. The digital twin platform uses the intermediate certificate to issue digital certificates. In other words, the digital twin platform will pre-issue the root certificate and the intermediate certificate, and then use the intermediate certificate to issue the digital certificate when it needs to issue the digital certificate.

[0125] Application information may include application package name and version information, etc., wherein application information can be obtained by parsing application certificate generation request. Thus, when issuing application certificate and profile authorization file for target application based on application certificate generation request, application information can be obtained by directly parsing application certificate generation request, without the need to communicate with the development end. This can reduce the time spent on communication and improve application signing efficiency on the one hand; on the other hand, it can also avoid signing failure or signing error caused by communication abnormality.

[0126] S30: If the device identification is included in the target device identification library, respond to the debugging instruction to debug the application program through the electronic device.

[0127] Specifically, if the device identification is included in the target device identification library, indicating that the electronic device is a debugging device of the application, then the debugging instruction is responded to so as to debug the application through the electronic device. On the contrary, when the device identification is not included in the target device identification library, the debugging device is rejected. Of course, in actual applications, it is also possible to first detect whether the device identification is included in the target device identification library, and when the device identification is not included in the target device identification library, then perform an open verification (i.e., the above-mentioned open verification process), and if the open verification passes, the debugging instruction is also responded to so as to debug the application through the electronic device. In this way, when a temporary debugging device needs to be added, the target device identification library corresponding to the application needs to be corrected, and the temporary debugging device is directly verified by the open verification method, which can improve the flexibility of application debugging.

[0128] In summary, this embodiment provides a method, apparatus, device and storage medium for decoupling a debugging device from an application signature, the method comprising receiving an operation instruction for an application, reading a device identification of an electronic device corresponding to the operation instruction; when the operation instruction is a debugging instruction, detecting whether the device identification is included in a target device identification library; if the device identification is included in the target device identification library, responding to the debugging instruction to debug the application through the electronic device. This application implements the binding of the debugging device and the application by pre-storing the device identification of the debugging device in the target device identification library, and then binding the target device identification library with the digital signature of the application. In this way, when adding a new debugging device, it is only necessary to adjust the target device identification library, without modifying the device identification bound to the application in the application signature, thereby improving the debugging efficiency of the application.

[0129] Based on the above decoupling method of debugging device and application signature. The embodiment of the present application provides a decoupling device of debugging device and application signature, such as Figure 4 As shown, the decoupling device of the debugging device and the application signature specifically includes:

[0130] A reading module, used to receive an operation instruction for an application program, and read a device identification of an electronic device corresponding to the operation instruction;

[0131] A detection module, used for detecting whether the device identification is included in a target device identification library when the operation instruction is a debugging instruction;

[0132] The allocation module is used to respond to the debugging instruction to debug the application program through the electronic device if the device identification is included in the target device identification library.

[0133] Based on the above-mentioned method for decoupling a debugging device from an application signature, an embodiment of the present application provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method for decoupling a debugging device from an application signature as described in the above-mentioned embodiment.

[0134] Based on the above-mentioned decoupling method of debugging device and application signature, the present application also provides a terminal device, such as Figure 5 As shown, it includes at least one processor (processor) 20; display screen 21; and memory (memory) 22, and may also include a communications interface (Communications Interface) 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logic instructions in the memory 22 to execute the method in the above embodiment.

[0135] In addition, the logic instructions in the memory 22 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0136] The memory 22 is a computer-readable storage medium that can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implementing the methods in the above embodiments.

[0137] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, may also be a transient storage medium.

[0138] In addition, the specific process of loading and executing the multiple instruction processors in the above-mentioned storage medium and the terminal device has been described in detail in the above-mentioned method, and will not be described one by one here.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for decoupling a debugging device from an application signature, characterized in that: The method for decoupling the debugging device from the application signature specifically includes: Receiving an operation instruction for an application program, and reading a device identification of an electronic device corresponding to the operation instruction; When the operation instruction is a debugging instruction, detecting whether the device identification is included in a target device identification library, wherein the database identification of the target device identification library is bound to the application signature data of the application program; If the device identification is included in the target device identification library, the debugging instruction is responded to so as to debug the application program through the electronic device.

2. The method for decoupling a debugging device from an application signature according to claim 1, characterized in that: The method further comprises: When the operation instruction is an adjustment instruction for the target device identification library, the target device identification library is adjusted based on the adjustment instruction, wherein the adjustment instruction includes one or more of adding a device identification and deleting a device identification.

3. The method for decoupling a debugging device from an application signature according to claim 1, characterized in that: When the operation instruction is a debugging instruction, detecting whether the device identification is included in the target device identification library specifically includes: When the operation instruction is a debugging instruction, detecting whether the electronic device has installed the application; When the electronic device has installed the application, reading the installation time of the application; If the installation time satisfies the first preset condition, reading the target device identification library bound to the application digital certificate of the application program, and detecting whether the device identification is included in the target device identification library; If the installation time does not meet the first preset condition, the debugging instruction is rejected.

4. The method for decoupling a debugging device from an application signature according to claim 3, characterized in that: When the operation instruction is a debugging instruction, detecting whether the device identification is included in the target device identification library further includes: When the electronic device installs the application for the first time, the system time of the electronic device is obtained, and the application signature data of the application is verified based on the system time; If the verification is passed, controlling the electronic device to install the application and executing the step of reading the installation time of the application; If the verification fails, the debugging instruction is rejected.

5. The method for decoupling a debugging device from an application signature according to claim 4, characterized in that: After controlling the electronic device to install the application, the method further includes: Record the time when the application was installed.

6. The method for decoupling a debugging device from an application signature according to claim 1 or 4, characterized in that: The application signature data is generated by the cloud platform, wherein the generation process of the application signature data specifically includes: Receiving an application certificate generation request sent by a development end, wherein the application certificate generation request is used to apply for an application certificate and a profile authorization file for the application to be signed; issuing an application certificate for the development end; Get the profile private key from the preset profile key pair; Performing a profile file signing on the application information of the application to be signed based on the profile private key to obtain signed application information; The signed application information and the preset profile signing certificate are packaged into a p7b format to obtain a profile authorization file to obtain application signature data.

7. The method for decoupling a debugging device from an application signature according to claim 6, characterized in that: Before receiving the application certificate generation request sent by the development end, the method includes: Generate a self-signed root certificate and issue an intermediate certificate through the root certificate; Generate a profile key pair and use the intermediate certificate pair to issue a profile signing certificate.

8. A decoupling device for debugging equipment and application signature, characterized in that: The decoupling device of the debugging device and the application signature specifically includes: A reading module, used to receive an operation instruction for an application program, and read a device identification of an electronic device corresponding to the operation instruction; A detection module, used for detecting whether the device identification is included in a target device identification library when the operation instruction is a debugging instruction; The response module is used for responding to the debugging instruction to debug the application program through the electronic device if the device identification is included in the target device identification library.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method for decoupling a debugging device and an application signature as described in any one of claims 1-7.

10. A terminal device, characterized in that: include: Processor and memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the processor implements the steps in the method for decoupling a debugging device from an application signature as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Authentication calling method and device for open interface, equipment and readable storage medium

    CN112016106A

  • Software use verification method and device and storage medium

    CN117454332A

  • Access verification method and device, computer equipment and storage medium

    CN118473797A

  • Automatic discovery and installation of secure boot certificates

    US20160378970A1