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

By storing the device identifier of the debugging device in the target device identifier library and binding it with the digital signature of the application, the complexity problem caused by binding the debugging device and the application signature in the prior art is solved, and the debugging efficiency of the application is improved.

CN119645815BActive Publication Date: 2025-12-05深圳开鸿数字产业发展有限公司
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, the binding of debugging devices to application signatures requires modifying the application signature every time a new debugging device is added, which increases complexity and reduces debugging efficiency.

Method used

By pre-storing the device identifier of the debugging device in the target device identifier library, and binding the target device identifier library with the application's digital signature, the debugging device and the application can be bound together. Only the target device identifier library needs to be adjusted without modifying the application signature.

Benefits of technology

It improves the efficiency of application debugging and simplifies the process of adding new debugging devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645815B_ABST
    Figure CN119645815B_ABST
Patent Text Reader

Abstract

The application discloses a debugging device and application signature decoupling method, device and equipment and storage medium, and the method comprises the following steps: receiving an operation instruction for an application program, reading the device identifier of the electronic device corresponding to the operation instruction; when the operation instruction is a debugging instruction, detecting whether the device identifier is contained in the target device identifier library; 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. The application pre-stores the device identifier of the debugging device in the target device identifier library, and then realizes the binding of the debugging device and the application program by binding the target device identifier library with the digital signature of the application program. In this way, when a new debugging device is added, the target device identifier library only needs to be adjusted, and the device identifier bound with the application program in the application signature does not need to be modified, 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] This application relates to the field of Internet technology, and in particular to a method, apparatus, device and storage medium for decoupling debugging equipment and application signature. Background Technology

[0002] Before release, applications undergo debugging, and the debugging devices are restricted by binding their device identifiers to the application's signature. While this prevents applications in the debugging phase from being leaked, it also increases the complexity and reduces the efficiency of adding new debugging devices, requiring modification of the device identifier bound to the application signature whenever a new debugging device is needed. This ultimately lowers the overall debugging efficiency of the application.

[0003] Therefore, the existing technology still needs to be improved and enhanced. Summary of the Invention

[0004] The technical problem to be solved by this application is to provide a method, apparatus, device and storage medium for decoupling debugging equipment and application signature, in order to address the shortcomings of the prior art.

[0005] To address the aforementioned technical problems, the first aspect of this application provides a method for decoupling debugging equipment from application signatures, wherein the method specifically includes:

[0006] Receive operation instructions for the application and read the device identifier of the electronic device corresponding to the operation instructions;

[0007] When the operation command is a debugging command, it is detected whether the device identifier is included in the target device identifier library;

[0008] If the device identifier is included in the target device identifier library, then the debugging instruction is responded to to debug the application through the electronic device.

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

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

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

[0012] When the operation command is a debugging command, it is then detected whether the electronic device has the application installed;

[0013] When the application is installed on the electronic device, read the installation time of the application;

[0014] If the installation time meets the first preset condition, then the target device identifier library bound to the application's application digital certificate is read, and it is detected whether the device identifier is included in the target device identifier library;

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

[0016] The decoupling method between debugging device and application signature, wherein, when the operation instruction is a debugging instruction, detecting whether the device identifier is included in the target device identifier library further includes:

[0017] When the electronic device is installing 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 passes, the electronic device is controlled to install the application, and the step of reading the installation time of the application is executed;

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

[0020] The method for decoupling the debugging device from the application signature, wherein after the electronic device is controlling the installation of the application, the method further includes:

[0021] Record the installation time of the application.

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

[0023] Receive an application certificate generation request sent by the 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] Issue an application certificate for the development end;

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

[0026] Based on the profile private key, the application information of the application to be signed is signed using the profile file to obtain the signed application information;

[0027] The signature application information and the preset profile signature certificate are packaged into p7b format to obtain the profile authorization file, which in turn yields the application signature data.

[0028] The method for decoupling debugging equipment from 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 intermediate certificates using the root certificate;

[0030] Generate a profile key pair and issue a profile signing certificate using an intermediate certificate pair.

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

[0032] The reading module is used to receive operation instructions for the application and read the device identifier of the electronic device corresponding to the operation instructions.

[0033] The detection module is used to detect whether the device identifier is included in the target device identifier library when the operation instruction is a debugging instruction;

[0034] An allocation module is configured to respond to the debugging instruction to debug the application through the electronic device if the device identifier is included in the target device identifier library.

[0035] A third aspect of this application provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the decoupling method for debugging devices and application signatures as described above.

[0036] A fourth aspect of this application provides a terminal device, which includes: a processor and a memory;

[0037] The memory stores a computer-readable program that can be executed by the processor;

[0038] When the processor executes the computer-readable program, it implements the steps in the decoupling method for debugging device and application signature as described above.

[0039] Beneficial Effects: Compared with existing technologies, this application provides a method, apparatus, device, and storage medium for decoupling debugging devices and application signatures. The method includes receiving an operation instruction for an application and reading the device identifier of the electronic device corresponding to the operation instruction; when the operation instruction is a debugging instruction, detecting whether the device identifier is contained in a target device identifier library; if the device identifier is contained in the target device identifier library, responding to the debugging instruction to debug the application through the electronic device. This application achieves the binding of the debugging device and the application by pre-storing the device identifier of the debugging device in the target device identifier library and then binding the target device identifier library with the digital signature of the application. Thus, when adding a new debugging device, only the target device identifier library needs to be adjusted, without modifying the device identifier bound to the application in the application signature, thereby improving the debugging efficiency of the application. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 A flowchart illustrating the decoupling method between debugging equipment and application signature provided in this application embodiment.

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

[0043] Figure 3 A flowchart illustrating the process of generating an application signature.

[0044] Figure 4 A schematic diagram of the decoupling device for debugging equipment and application signature provided in the embodiments of this application.

[0045] Figure 5 A schematic block diagram of the terminal device provided in the embodiments of this application. Detailed Implementation

[0046] This application provides a method, apparatus, device, and storage medium for decoupling debugging equipment and application signatures. To make the objectives, technical solutions, and effects of this application clearer and more explicit, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.

[0047] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated 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 say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units 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 used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0049] It should be understood that the sequence number and size of each step in this embodiment do not imply 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 this application embodiment.

[0050] Research revealed that applications undergo debugging before release, and the debugging device's device identifier is bound to the application's application signature to restrict the use of debugging devices. While this prevents the application from being leaked during the debugging phase, it also increases the complexity and reduces the efficiency of adding debugging devices, as the device identifier bound to the application signature needs to be modified every time a new debugging device is added.

[0051] To address the aforementioned issues, in this embodiment, an operation instruction for an application is received, and the device identifier 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 identifier is included in a target device identifier library. If the device identifier is included in the target device identifier library, the debugging instruction is responded to to debug the application through the electronic device. This application achieves the binding of the debugging device and the application by pre-storing the device identifier of the debugging device in the target device identifier library and then binding the target device identifier library with the digital signature of the application. This way, when adding a new debugging device, only the target device identifier library needs to be adjusted, without needing to modify the device identifier bound to the application in the application signature, thus improving the debugging efficiency of the application.

[0052] The application content will be further explained below with reference to the accompanying drawings and the description of the embodiments.

[0053] This embodiment provides a method for decoupling debugging devices from application signatures, such as... Figure 1 As shown, the method includes:

[0054] S10. Receive an operation instruction for the application and read the device identifier of the electronic device corresponding to the operation instruction.

[0055] Specifically, the electronic device refers to the device that the developer intends to use for debugging the application. In other words, the developer sends operation commands to the electronic device they intend to use as a debugging device. These operation commands can be sent via an external device or triggered by the electronic device itself. For example, when an application is installed on the electronic device, operation commands can be generated by clicking on the application, or by sending operation commands to the electronic device via the cloud.

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

[0057] Specifically, a debugging instruction refers to the intention to use the electronic device as a debugging device for an application. Therefore, when the operation instruction is a debugging instruction, the device identifier of the electronic device corresponding to the operation instruction is checked, and it is determined whether the device identifier is included in the target device identifier library to determine whether the electronic device can be used as a debugging device for the application. Furthermore, the operation instruction can also be an adjustment instruction to the target device identifier library corresponding to the application. When the operation instruction is an adjustment instruction, the target device identifier library corresponding to the application is read, and the device identifiers in the target device identifier library are adjusted according to the adjustment instruction. Based on this, the method further includes:

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

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

[0060] The target device identifier library is a pre-configured library used to store device identifiers for debugging devices corresponding to applications. The target device identifier library may include a single device identifier or a combination of device identifiers. Each electronic device corresponding to a device identifier in the target device identifier library can serve as a debugging device for the application, meaning it has the authority to debug the application. The target device identifier library is configured with a unique library identifier, which is bound to the application's signature. When performing signature verification, the application will locate the target device identifier library based on its library identifier, and then verify whether the electronic device's device identifier is stored in the target device identifier library to confirm whether the electronic device is a debugging device for the application.

[0061] It should be noted that the target device identifier library can be pre-stored locally on the electronic device, in the cloud, or within a management device. When the target device identifier library is stored locally on the electronic device, the electronic device can directly read the target device identifier library locally when performing signature verification on the application. When the target device identifier library is stored in the cloud or on a management device, the electronic device will send a request carrying the library identifier to the cloud or management device when performing signature verification on the application, and then the target device identifier library will be sent to the electronic device via the cloud or management device. Furthermore, when the target device identifier library is stored in the cloud or on a management device, the step of detecting whether the device identifier is included in the target device identifier library can be performed through the cloud or management device, and the detection result can be fed back to the electronic device; alternatively, after sending the target device identifier library to the electronic device via the cloud or management device, the electronic device can be controlled to automatically delete the target device identifier library after a preset time.

[0062] Furthermore, the electronic device may or may not have an application installed. Therefore, when the operation command is a debugging command, it first checks whether the electronic device has an application installed, and then checks whether the device identifier is included in the target device identifier library. Specifically, when the electronic device has an application installed, it directly checks whether the device identifier is included in the target device identifier library; alternatively, it first performs an open verification on the electronic device, and then checks whether the device identifier is included in the target device identifier library.

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

[0064] S21. When the operation command is a debugging command, check whether the electronic device has installed the application.

[0065] S22. When the electronic device has the application installed, read the installation time of the application;

[0066] S23. If the installation time meets the first preset condition, then read the target device identifier library bound to the application digital certificate of the application and detect whether the device identifier is included in the target device identifier library.

[0067] S24. If the installation time does not meet the first preset condition, then the debugging command is rejected.

[0068] Specifically, the first preset condition is used to verify the opening of the application, wherein the opening verification is used to verify 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's limited usage time, or that the installation time is less than the application's limited usage time, and the application's application signature is within the authorized validity period.

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

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

[0071] The relative time interval between the installation time and the current system time is calculated using the signature verification module;

[0072] If the relative time interval is less than or equal to the application's usage time limit, the installation time is determined to meet the first preset condition.

[0073] If the relative time interval is greater than the application's usage time limit, it is determined that the installation time does not meet the first preset condition due to the failure of the application's usage time limit verification.

[0074] Specifically, the package management module includes a signature verification module for verifying applications. This module includes newly added RunVerify and RemoveDebugData interfaces, and configures debug scope verification functionality within the hapVerify interface. In other words, the package management module's signature verification module is configured with hapVerify, RunVerify, and RemoveDebugData interfaces. The hapVerify interface verifies the application during installation, including signature verification and debug scope verification. Debug scope verification verifies the signature time and authorization validity period. The RunVerify interface verifies the application to be opened (i.e., performs an opening verification). The RemoveDebugData interface deletes the installation information of the application to be uninstalled during uninstallation. The implementation of the hapVerify interface remains unchanged; only the interface logic is modified. The modified logic determines the application type based on the passed application package name. If the application type is a release application, the verification passes, and HAP_VERIFY_RELEASE_OK is returned. If the application type is a debug application, signature verification and debug scope verification are performed. If the verification fails, HAP_VERIFY_TIME_ERROR is returned, disallowing the application from opening. If the verification passes, HAP_VERIFY_OK is returned, allowing the application to open. If a database lookup error occurs, HAP_VERIFY_FIND_ERROR is returned, disallowing the application from opening.

[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, the usage time limit has passed the verification, and the application can be opened.

[0080] RUN_VERIFY_FIND_ERROR indicates that the database search based on the package name failed and the application is not allowed to be opened;

[0081] RUN_VERIFY_TIME_ERROR indicates that the application type is debug, the validity period of the usage time has failed the verification, and the application is not allowed to be opened.

[0082] RUN_VERIFY_RELEASE_OK indicates that the application type is a release type, with no expiration time, and allows the application to be opened.

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

[0084] The application type is determined based on the passed application package name. If the application type is a release application, the validation passes and returns `RUN_VERIFY_RELEASE_OK`. If the application type is a debug application, a usage time validity period validation is performed. If the validation fails, `RUN_VERIFY_TIME_ERROR` is returned, and the application cannot be opened. If the validation passes, `RUN_VERIFY_OK` is returned, and the application can be opened. If a database lookup error occurs, `RUN_VERIFY_FIND_ERROR` is returned, and the application cannot be opened.

[0085] How to use the RunVerify API:

[0086] The package management module calls the RunVerify interface every time the application is opened, adds relevant judgment logic based on the return value, controls whether to allow opening, and pops up an interface to prompt that the application has exceeded its validity period if opening is not allowed.

[0087] The RemoveDebugData interface is represented as int RemoveDebugData(const std::string bundleName).

[0088] Function parameter: application package name

[0089] Function return value:

[0090]

[0091] REMOVE_OK indicates that the application type is debug and the database deletion was successful.

[0092] REMOVE_FIND_ERROR indicates that the database search failed and you need to check if there are any errors in the database.

[0093] REMOVE_DELETE_ERROR indicates that the application type is debug and the database deletion failed. It is necessary to check whether there are any errors in the database.

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

[0095] The logic of the RemoveDebugData interface:

[0096] The system searches the database based on the passed application package name to determine the application type. A `REMOVE_FIND_ERROR` return value indicates a database search failure. For release applications, `REMOVE_RELEASE_OK` is returned, and no database deletion is required. For debug applications, database deletion is necessary; `REMOVE_OK` indicates successful deletion, while `REMOVE_DELETE_ERROR` indicates deletion failure.

[0097] How to use the RemoveDebugData interface:

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

[0099] Furthermore, the relative time interval refers to the interval between the installation time and the current system time, reflecting the duration the electronic device uses the application. The application's usage time limit is preset and represents the total time the electronic device can use the application. Therefore, after obtaining the relative time interval, it is compared with the application's usage time limit. If the relative time interval is less than or equal to the application's usage time limit, the electronic device can continue using the application; if the relative time interval is greater than the application's usage time limit, the electronic device cannot continue using the application. This limits the usage time of the electronic device, preventing debugging-type applications from being used indefinitely.

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

[0101] Obtain the application's signature time, and input the signature time, installation time, and the electronic device's current system time into the signature verification module in the package management module;

[0102] The signature verification module calculates the relative time interval between the installation time and the current system time, as well as the absolute time interval between the signature time and the current system time.

[0103] If the relative time interval is less than or equal to the application's usage time limit, and the absolute time interval is less than or equal to the authorization validity period, then the installation time is determined to meet the first preset condition.

[0104] If the relative time interval is greater than the application's usage time limit 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 application's usage time limit verification failure.

[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 time limit, it is determined that the installation time does not meet the first preset condition because the authorization validity period verification fails.

[0106] If the relative time interval is greater than the application's usage time limit and the absolute time interval is greater than the authorization validity period, then it is determined that the installation time does not meet the first preset condition because both the application's usage time limit and the authorization validity period fail the test.

[0107] Specifically, the installation time verification process is the same as in the implementation described above, and will not be repeated here. Only the authorization validity period verification performed after the installation time verification is successful will be explained. The absolute time interval is the interval between the signature time and the current system time, used to verify the validity of the application's signature. That is, by comparing the absolute time interval with the authorization validity period, it is determined whether the application's digital signature has expired. If the absolute time interval is greater than the authorization validity period, the digital signature has expired; conversely, if the absolute time interval is less than or equal to the authorization validity period, the digital signature has not expired.

[0108] Furthermore, in practical applications, applications are typically installed only after signing, meaning the signing time is earlier than the installation time. Usage restrictions usually fall within the signature validity period. Therefore, in this embodiment, the authorization validity period is longer than the application usage restriction duration, thus restricting the use of applications within the signature validity period. Of course, in practice, applications with long-term signatures may still be installed and used on electronic devices. Therefore, this embodiment uses a dual verification of application usage restriction duration and authorization validity period to not only restrict the use of electronic devices but also prevent the use of expired applications.

[0109] For example, when the electronic device does not have an application installed, the system first controls the electronic device to install the application, and then checks whether the device identifier is included in the target device identifier library. Therefore, when the operation instruction is a debug instruction, checking whether the device identifier is included in the target device identifier library further includes:

[0110] When the electronic device is installing 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 passes, the electronic device is controlled to install the application, and the step of reading the installation time of the application is executed;

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

[0113] Specifically, the application signature data of the application is verified based on the system time to verify the installation of the application on the electronic device, thereby determining whether the electronic device can install the application. The specific process for verifying the application signature data based on the system time can be as follows: When an electronic device installs a debug-type application, the application signature is verified through the package management module; if the signature verification passes, the current system time of the electronic device installing the application, the signature time of the application, and the authorization validity period of the application's profile authorization file are obtained; a first time difference between the current system time and the signature time is calculated, and the calculated first time difference is compared with a first time threshold; if the first time difference is less than the first time threshold, the profile authorization file is verified to see if it has expired based on the authorization validity period; if the profile authorization file has not expired, the application is installed, and the installation time, the application package name, and the authorization validity period are stored as the application's installation information 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 a cloud platform, such as... Figure 3 As shown, the process of generating the application signature data specifically includes:

[0115] Receive an application certificate generation request sent by the development end, and issue 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] Retrieve the profile private key from the preset profile key pair;

[0117] Based on the profile private key, the application information of the application to be signed is signed using the profile file to obtain the signed application information;

[0118] The signature application information and the preset profile signature certificate are packaged into p7b format to obtain the profile authorization file, which in turn yields the application signature data.

[0119] Specifically, an application certificate is a digital certificate used to sign an application; that is, the application to be released is obtained by digitally signing it 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. The developer key pair can be generated by the developer itself or generated by the digital twin platform for the developer.

[0120] The profile key pair and profile signing certificate are pre-defined and used to issue profile authorization files for the target application. The profile key pair serves as the key information for encrypting the profile authorization file. The profile key pair can be randomly generated or generated according to preset conditions; for example, the generation method or the key information to be included in the profile key pair can be pre-defined. The profile signing certificate is issued by the digital twin platform using an intermediate certificate pair.

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

[0122] Generate a self-signed root certificate, and issue intermediate certificates using the root certificate;

[0123] Generate a profile key pair and issue a profile signing certificate using an intermediate certificate pair.

[0124] Specifically, the root certificate is issued by the digital twin platform itself, while the intermediate certificate is issued by the root certificate. The digital twin platform uses the intermediate certificate for digital certificate issuance. In other words, the digital twin platform pre-issues the root certificate and the intermediate certificate, and then uses the intermediate certificate for issuance when a digital certificate needs to be issued.

[0125] Application information can include the application package name and version information. This application information can be obtained by parsing the application certificate generation request. When issuing application certificates and profile authorization files for the target application based on the application certificate generation request, the application information can be obtained directly by parsing the application certificate generation request, instead of communicating with the development team. This reduces the time spent on communication and improves the efficiency of application signing. It also avoids signing failures or errors caused by communication anomalies.

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

[0127] Specifically, if the device identifier is included in the target device identifier library, indicating that the electronic device is a debugging device for the application, then the debugging command will be responded to to debug the application through the electronic device. Conversely, if the device identifier is not included in the target device identifier library, then debugging of the device will be rejected. Of course, in practical applications, it is also possible to first check whether the device identifier is included in the target device identifier library, and if the device identifier is not included, then perform an opening verification (i.e., the opening verification process described above). If the opening verification passes, the debugging command will also be responded to to debug the application through the electronic device. This way, when a temporary debugging device needs to be added, the target device identifier library corresponding to the application needs to be modified, while directly verifying the temporary debugging device through opening verification improves the flexibility of application debugging.

[0128] In summary, this embodiment provides a method, apparatus, device, and storage medium for decoupling debugging devices and application signatures. The method includes receiving an operation instruction for an application and reading the device identifier of the electronic device corresponding to the operation instruction; when the operation instruction is a debugging instruction, detecting whether the device identifier is contained in a target device identifier library; if the device identifier is contained in the target device identifier library, responding to the debugging instruction to debug the application through the electronic device. This application achieves the binding of the debugging device and the application by pre-storing the device identifier of the debugging device in the target device identifier library and then binding the target device identifier library with the digital signature of the application. Thus, when adding a new debugging device, only the target device identifier library needs to be adjusted, without modifying the device identifier bound to the application in the application signature, thereby improving the debugging efficiency of the application.

[0129] Based on the above-described decoupling method between debugging equipment and application signature, this application provides a decoupling apparatus for debugging equipment and application signature, such as... Figure 4 As shown, the decoupling device between the debugging equipment and the application signature specifically includes:

[0130] The reading module 100 is used to receive operation instructions for the application and read the device identifier of the electronic device corresponding to the operation instructions.

[0131] The detection module 200 is used to detect whether the device identifier is included in the target device identifier library when the operation instruction is a debugging instruction;

[0132] The response module 300 is configured to respond to the debugging instruction to debug the application through the electronic device if the device identifier is included in the target device identifier library.

[0133] Based on the above-described decoupling method for debugging equipment and application signature, this application provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the decoupling method for debugging equipment and application signature as described in the above embodiments.

[0134] Based on the above-mentioned decoupling method between debugging equipment and application signature, this application also provides a terminal device, such as... Figure 5 As shown, it includes at least one processor 20; a display screen 21; and a memory 22, and may also include a communications interface 23 and a bus 24. The processor 20, display screen 21, memory 22, and communications interface 23 can communicate with each other via the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setup mode. The communications interface 23 can transmit information. The processor 20 can invoke logical instructions in the memory 22 to execute the methods described in the above embodiments.

[0135] Furthermore, the logical instructions in the aforementioned memory 22 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

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

[0137] The memory 22 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 22 may include high-speed random access memory (RAM) and non-volatile memory. Examples include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as transient storage media.

[0138] Furthermore, the specific process of loading and executing multiple instruction processors in the aforementioned storage medium and terminal device has been described in detail in the above method, and will not be repeated here.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for decoupling debugging equipment from application signature, characterized in that, The debugging device and the application signature decoupling method specifically comprises: An operation instruction for an application program is received, and a device identifier of an electronic device corresponding to the operation instruction is read; When the operation instruction is a debugging instruction, it is detected whether the device identifier is contained in a target device identifier library, wherein a database identifier of the target device identifier library is bound with application signature data of the application program; If the device identifier is contained in the target device identifier library, the application program is debugged through the electronic device in response to the debugging instruction; When the operation instruction is an adjustment instruction for the target device identifier library, the target device identifier library is adjusted based on the adjustment instruction, wherein the adjustment instruction comprises one or more of adding a device identifier and deleting a device identifier; The detection of whether the device identifier is contained in the target device identifier library when the operation instruction is the debugging instruction specifically comprises: When the operation instruction is the debugging instruction, it is detected whether the electronic device has installed the application program; When the electronic device has installed the application program, an installation time of the application program is read; If the installation time meets a first preset condition, a target device identifier library bound with the application signature data of the application program is read, and it is detected whether the device identifier is contained in the target device identifier library, wherein the application signature data is generated through a cloud platform; If the installation time does not meet the first preset condition, the debugging instruction is rejected; The generation process of the application signature data specifically comprises: An application certificate generation request sent by a development end is received, wherein the application certificate generation request is used to apply for an application certificate and a profile authorization file for a to-be-signed application program; An application certificate is issued for the development end; A profile private key in a preset profile key pair is obtained; Application information of the to-be-signed application program is profile file signed based on the profile private key to obtain signed application information; The signed application information and a preset profile signature certificate are packed into a p7b format to obtain a profile authorization file, thereby obtaining the application signature data.

2. The method of claim 1, wherein, The detection of whether the device identifier is contained in the target device identifier library when the operation instruction is the debugging instruction further comprises: When the electronic device is installed with the application program for the first time, a system time of the electronic device is obtained, and the application signature data of the application program is verified based on the system time; If the verification is passed, the electronic device is controlled to install the application program, and the step of reading the installation time of the application program is executed; If the verification is not passed, the debugging instruction is rejected.

3. The method of claim 2, wherein, After the electronic device is controlled to install the application program, the method further comprises: The installation time of the application program is recorded.

4. The method of claim 1, wherein, Before the application certificate generation request sent by the development end is received, the method comprises: A self-issued root certificate is generated, and an intermediate certificate is issued through the root certificate; A profile key pair is generated, and a profile signature certificate is issued using the intermediate certificate.

5. A decoupling device for debugging equipment and application signature, characterized in that, The debugging device and application signature decoupling device specifically comprises: a reading module, configured to receive an operation instruction for an application program, and read a device identifier of an electronic device corresponding to the operation instruction; a detection module, configured to, when the operation instruction is a debugging instruction, detect whether the device identifier is contained in a target device identifier library; a response module, configured to, if the device identifier is contained in the target device identifier library, respond to the debugging instruction to debug the application program through the electronic device, and when the operation instruction is an adjustment instruction for the target device identifier library, adjust the target device identifier library based on the adjustment instruction, wherein the adjustment instruction comprises one or more of adding a device identifier and deleting a device identifier; wherein, when the operation instruction is a debugging instruction, detecting whether the device identifier is contained in the target device identifier library specifically comprises: when the operation instruction is a debugging instruction, detecting whether the electronic device has installed the application program; when the electronic device has installed the application program, reading an installation time of the application program; if the installation time meets a first preset condition, reading a target device identifier library to which application signature data of the application program is bound, and detecting whether the device identifier is contained in the target device identifier library, the application signature data being generated through a cloud platform; if the installation time does not meet the first preset condition, rejecting the debugging instruction; the generation process of the application signature data specifically comprises: 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 a to-be-signed application program; issuing an application certificate for the development end; obtaining a profile private key in a preset profile key pair; performing profile file signature on application information of the to-be-signed application program based on the profile private key to obtain signed application information; packing the signed application information and a preset profile signature certificate into a p7b format to obtain a profile authorization file, thereby obtaining application signature data.

6. A computer readable storage medium characterized by, The computer readable storage medium stores one or more programs which can be executed by one or more processors to implement the steps in the debugging device and application signature decoupling method of any one of claims 1-4.

7. A terminal device, characterized by comprising: comprise: a processor and a memory; the memory stores a computer readable program which can be executed by the processor; the processor executes the computer readable program to implement the steps in the debugging device and application signature decoupling method of any one of claims 1-4.

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