WO2022222696A1 - Application distribution method, apparatus, device, and medium - Google Patents

Application distribution method, apparatus, device, and medium Download PDF

Info

Publication number
WO2022222696A1
WO2022222696A1 PCT/CN2022/083328 CN2022083328W WO2022222696A1 WO 2022222696 A1 WO2022222696 A1 WO 2022222696A1 CN 2022083328 W CN2022083328 W CN 2022083328W WO 2022222696 A1 WO2022222696 A1 WO 2022222696A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
certificate
developer
server
application certificate
Prior art date
Application number
PCT/CN2022/083328
Other languages
French (fr)
Chinese (zh)
Inventor
梁永峰
李林锋
刘连喜
曾容华
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022222696A1 publication Critical patent/WO2022222696A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Definitions

  • the present application relates to the field of electronics, and in particular, to a method, apparatus, device and medium for distributing applications.
  • the package name of the application is used as the unique identifier of the application, and when the application is installed, upgraded, or run, the application with the same package name will be recognized as the same application.
  • the present application provides a method, apparatus, device and medium for distributing applications, which are used to solve the problem of package name conflict caused by duplicate application package names in the process of application distribution.
  • a first aspect of the present application provides a method for distributing applications, including:
  • the application certificate server sends a first application certificate to the application developer device, where the first application certificate is used to identify the application developer, and the application developer device is used to add the first application certificate to the application to be distributed to obtain the target application ;
  • the application certificate server obtains second application certificate information from the application distribution server, where the second application certificate information is used to record the information of the second application certificate carried in the target application sent by the application developer device to the application distribution server;
  • the application certificate server If the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the application certificate server sends a verification result to the application distribution server.
  • the application certificate server is used for unified management and control, and the application certificate for distinguishing from other developers is allocated to the developer, and then the developer adds the application certificate to the application, thus solving the package name caused by the duplication of package names. conflict issues.
  • the application certificate server can assist the application distribution server to verify the application to be put on the shelf according to the application certificate information sent by the application distribution server, thereby ensuring the unified management and control of the application to be distributed.
  • the method further includes: the application certificate server obtains a request from the application developer device; the application certificate server generates a developer identifier according to the request, and the development The developer identifier is used to identify the application developer; the application certificate server generates the first application certificate, and the first application certificate includes the developer identifier.
  • the developer sends a request to the application certificate server through the application developer device, and the request is used to apply for an application certificate, and then the application certificate server allocates the developer identifier and generates the application certificate according to the request, and then issues the application certificate to the application certificate server.
  • the device of the application developer thus realizing the unified management and control of the application certificate by the application certificate server.
  • the request includes information about the company name where the application developer is located, and/or information about the country where the application developer is located
  • the generation of the first application certificate by the application certificate server includes: the application certificate server according to the development identifier of the developer, and generate the first application certificate according to the company name information where the application developer is located and/or the country information where the application developer is located, where the first application certificate includes the developer identifier and is related to the developer identifier.
  • the company name information or the country information associated with the company includes: the application certificate server according to the development identifier of the developer, and generate the first application certificate according to the company name information where the application developer is located and/or the country information where the application developer is located, where the first application certificate includes the developer identifier and is related to the developer identifier.
  • the application certificate includes the developer identifier, and one or more of the company name information or the country information associated with the developer identifier, so that the application certificate can identify the developer according to these information, In this way, it can be distinguished from other developers and avoid conflicts caused by the same application package name.
  • the application certificate server acquiring the second application certificate information from the application distribution server includes: the application certificate server acquiring the developer identifier and the second digest of the second application certificate from the application distribution server; the application certificate server After obtaining the second application certificate information from the application distribution server, the method further includes: the application certificate server obtains the first digest of the first application certificate locally according to the developer identifier; Confirm that the first application certificate matches the second application certificate, and the application certificate server sends a verification pass result to the application distribution server, including: if the application certificate server determines the first application certificate according to the first digest and the second digest The application certificate matches the second application certificate, and the application certificate server sends the verification pass result to the application distribution server.
  • the application certificate server since the application certificate server is responsible for the unified management and control of application certificates, the application certificate server can verify the target application to be put on the shelf according to the second application certificate information sent by the application distribution server, and the second application certificate information is based on the application certificate.
  • the advantage of digest implementation is that the amount of transmitted data is small, and the application distribution server only needs to send the content of the digest to the application certificate server to verify whether the application certificate matches.
  • the first digest is a first hash value generated by the application certificate server according to the recorded content of the first application certificate
  • the second digest is generated by the application distribution server according to the recorded content of the second application certificate.
  • second hash value if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the application certificate server sends the verification result to the application distribution server.
  • the method includes: if the application certificate server determines that the first hash value is the same as the second hash value, the application certificate server sends the verification pass result to the application distribution server.
  • the second digest and the first digest can have hash values respectively. Since the content of the application certificate changes, the hash value will change. Therefore, when the hash values of the first digest and the second digest are consistent, the application The certificate server may determine that the first application certificate matches the second application certificate, that is, the content of the application certificate on the side of the application distribution server has not changed, so the verification is passed. Conversely, if the hash values of the first digest and the second digest are inconsistent, it means that the first application certificate does not match the second application certificate, the application certificate obtained by the application distribution server has changed, and the verification fails.
  • obtaining the second application certificate information from the application distribution server by the application certificate server includes: the application certificate server obtains the second application certificate from the application distribution server; the application certificate server obtains the second application certificate from the application distribution server After the information, it also includes: the application certificate server obtains the developer identifier from the second application certificate; the application certificate server obtains the first application certificate locally according to the developer identifier; if the application certificate server obtains the first application certificate according to the first application certificate The second application certificate information confirms that the first application certificate matches the second application certificate, and the application certificate server sends a verification result to the application distribution server, including: if the application certificate server compares the first application certificate with the second application certificate The developer identifiers of the two application certificates are the same, and the company name information of the application developer and/or the country information of the application developer is the same, and the application certificate server sends the verification result to the application distribution server.
  • the application distribution server sends the entire content of the application certificate to the application certificate server during the verification process, so that the application certificate server can compare the application certificate with the application certificate stored by the developer locally in the application certificate server, thereby Perform more precise verification, such as integrity verification, validity verification and attribution verification of application certificates.
  • a second aspect of the present application provides a method for distributing applications, including: an application distribution server acquires a target application from an application developer device; the application distribution server acquires a second application certificate from the target application, where the second application certificate is The application certificate server sends to the application developer device, and the application developer device joins the target application; the application distribution server sends the second application certificate information of the second application certificate to the application certificate server, the second application certificate
  • the certificate information is used to record the content in the second application certificate;
  • the application distribution server allows distribution of the target application according to the verification result obtained from the application certificate server, and the verification result is used to indicate the second application
  • the certificate matches the first application certificate distributed by the application certificate server for the application developer.
  • the second application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, and the developer identifier is allocated by the application certificate server.
  • the ID used to identify the developer of this app.
  • the second application certificate information includes the second digest of the second application certificate and the developer identifier, so that the application certificate server obtains the locally stored first application certificate according to the developer identifier, and passes the first application certificate through the first application certificate.
  • the verification result is sent; then the application distribution server sends the second application certificate to the application certificate server.
  • the method further includes: the application distribution server generates the second digest according to the content recorded in the second application certificate.
  • the second digest is a hash value, so that the first hash value generated by the application certificate server according to the first application certificate is sent when the first hash value and the second hash value are the same If the verification is passed, the application distribution server generates the second digest according to the content recorded in the second application certificate, which includes: the application distribution server generates a second hash value according to the content recorded in the second application certificate.
  • sending, by the application distribution server, the second application certificate information of the second application certificate to the application certificate server includes: the application distribution server sending the second application certificate to the application certificate server, so that the application certificate server can send the second application certificate to the application certificate server.
  • the application is distributed to the application The server sends the verification pass result.
  • a third aspect of the present application provides a method for distributing applications, including: an application developer device obtains a first application certificate from an application certificate server, where the first application certificate is used to identify the application developer; the application developer device uses the first application certificate to identify the application developer; An application certificate is added to the application to be distributed to obtain the target application; the application developer device sends the target application to the application distribution server.
  • the method further includes: the application developer device sends a request to the application certificate server, where the request is used for requesting to acquire the first application certificate.
  • the request includes information on the company name where the application developer is located, and/or information on the country where the application developer is located.
  • the first application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, wherein the developer identifier is allocated by the application certificate server. , which is used to identify the developer of the application.
  • a fourth aspect of the present application provides a method for distributing an application, including:
  • the user equipment obtains the target application from the application distribution server, the target application is the application uploaded to the application distribution server by the application developer device, the target application includes the application certificate, and the application certificate is the certificate sent by the application certificate server to the application developer device , so that the application distribution server verifies the target application through the application certificate; when the package name of the target application is the same as the package name of the first local application in the user equipment, and the application certificate of the target application is the same as that of the first local application in the user equipment When the application certificates of a local application match, the user equipment determines the target application as an upgrade package of the first local application, and uses the target application to upgrade or overwrite the first local application.
  • the target application includes an application certificate
  • the application certificate can identify the developer of the application
  • the user equipment can determine, according to the application certificate, that the application that matches the application certificate is an upgrade package of the existing application , so as to avoid the application conflict problem that occurs when the package name is repeated.
  • the method further includes: when the package name of the target application is repeated with the package name of the first local application in the user equipment, and the application certificate of the target application does not match the application certificate of the first local application,
  • the user equipment determines the target application as a new application; the user equipment installs the target application into the local system.
  • the application certificate can identify the developer of the application. Therefore, in the process of installing the target application, in the case of repeated package names, the user equipment can determine the current The application is a brand new application, which avoids the application conflict problem that occurs when the package name is repeated.
  • the method further includes: when the package name of the target application does not overlap with the package name of the local application of the user equipment, the user equipment determines that the target application is a new application; the user equipment installs the target application to in the local system.
  • the target application since the target application has been verified by the application distribution server during the distribution process, when the package name is not repeated, the target application can directly identify the current application as a brand-new application installation, and the verification process of the application distribution server guarantees application security.
  • a fifth aspect of the present application provides a system for distributing applications, including: an application developer device and an application distribution server, wherein the application developer device is used to add an application certificate to an application to be distributed to obtain a target application, The application certificate is used to identify the application developer; the application distribution server is used to obtain the target application from the application developer's device, and verify the target application according to the application certificate; the application distribution server is also used for the application in the school The distribution of the target application is allowed when the verification is passed.
  • the system further includes an application certificate server, wherein the application certificate server is configured to distribute the application certificate to the application developer device according to the request of the application developer device; the application distribution server is also configured to obtain the application certificate from the application developer device.
  • the target application obtains the application certificate, and sends the application certificate information of the application certificate to the application certificate server; the application certificate server is also used to compare the application certificate information sent by the application distribution server with the application of the local application certificate certificate information, to judge whether the application certificate sent by the application distribution server matches the local application certificate, and if it matches, send the verification result to the application distribution server; the application distribution server is also used to obtain the verification pass As a result, distribution of the target application is allowed.
  • the system further includes user equipment, wherein the user equipment is used to obtain the target application distributed by the application distribution server, and determine whether the target application is a brand-new application or a local application according to the application certificate of the target application. Install the upgrade package.
  • a sixth aspect of the present application provides an application certificate server, including:
  • a sending unit configured to send a first application certificate to the application developer device, where the first application certificate is used to identify the application developer, and the application developer device is used to add the first application certificate to the application to be distributed to obtain target application;
  • an obtaining unit configured to obtain second application certificate information from the application distribution server, where the second application certificate information is used to record the information of the second application certificate carried in the target application sent by the application developer device to the application distribution server;
  • a verification unit configured to make the sending unit send a verification pass result to the application distribution server if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information.
  • the obtaining unit is further configured to: obtain a request from the application developer device;
  • an execution unit configured to generate a developer identifier according to the request, and the developer identifier is used to identify the application developer;
  • the execution unit is further configured to generate the first application certificate, where the first application certificate includes the developer identifier.
  • the execution unit is further used for:
  • the first application certificate is generated according to the developer identifier and the company name information where the application developer is located and/or the country information where the application developer is located, where the first application certificate includes the developer identifier and is related to the developer.
  • the obtaining unit is further configured to: obtain the developer identifier and the second digest of the second application certificate from the application distribution server;
  • the execution unit is further configured to: obtain the first digest of the first application certificate locally according to the developer identifier;
  • the verification unit is further configured to: if it is determined according to the first digest and the second digest that the first application certificate matches the second application certificate, make the sending unit send the verification pass result to the application distribution server.
  • the first digest is a first hash value generated by the application certificate server according to the recorded content of the first application certificate
  • the second digest is generated by the application distribution server according to the recorded content of the second application certificate.
  • second hash value then if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the verification unit is further configured to:
  • the sending unit sends the verification pass result to the application distribution server.
  • the obtaining unit is further configured to: obtain the second application certificate from the application distribution server;
  • the execution unit is further configured to: obtain the developer identifier from the second application certificate;
  • the execution unit is further configured to: obtain the first application certificate locally according to the developer identifier;
  • the verification unit is further configured to: if the developer identification of the first application certificate and the second application certificate are the same, and the company name information where the application developer is located, and/or, the application developer is located in The country information is the same, so that the sending unit sends the verification result to the application distribution server.
  • a seventh aspect of the present application provides an application distribution server, including:
  • an acquisition unit used to acquire the target application from the application developer's device
  • an execution unit configured to acquire a second application certificate from the target application, where the second application certificate is sent by the application certificate server to the application developer device, and the application developer device joins the target application;
  • a sending unit configured to send second application certificate information of the second application certificate to the application certificate server, where the second application certificate information is used to record content in the second application certificate;
  • the execution unit is further configured to allow distribution of the target application according to a verification result obtained from the application certificate server, where the verification result is used to indicate that the second application certificate and the application certificate server are the application developer The distributed first application certificate matches.
  • the second application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, and the developer identifier is allocated by the application certificate server.
  • the ID used to identify the developer of this app.
  • the second application certificate information includes the second digest of the second application certificate and the developer identifier, so that the application certificate server obtains the locally stored first application certificate according to the developer identifier, and passes the first application certificate through the first application certificate.
  • the execution unit is further configured to:
  • the second digest is generated according to the content recorded in the second application certificate.
  • the second digest is a hash value, so that the first hash value generated by the application certificate server according to the first application certificate is sent when the first hash value and the second hash value are the same
  • the execution unit is also used for:
  • a second hash value is generated according to the content recorded in the second application certificate.
  • the sending unit is further used for:
  • An eighth aspect of the present application provides an application developer device, including:
  • an obtaining unit configured to obtain a first application certificate from an application certificate server, where the first application certificate is used to identify the application developer
  • an execution unit configured to add the first application certificate to the application to be distributed to obtain a target application
  • the sending unit is used for sending the target application to the application distribution server.
  • the sending unit is further configured to send a request to the application certificate server, where the request is used to request to obtain the first application certificate.
  • the request includes information on the company name where the application developer is located, and/or information on the country where the application developer is located.
  • the first application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, wherein the developer identifier is allocated by the application certificate server. , which is used to identify the developer of the application.
  • a ninth aspect of the present application provides a user equipment, including:
  • an obtaining unit configured to obtain a target application from an application distribution server, where the target application is an application uploaded by an application developer device to the application distribution server, the target application includes an application certificate, and the application certificate is sent by the application certificate server to the application developer The certificate of the device, so that the application distribution server can verify the target application through the application certificate;
  • an execution unit configured to determine the target application when the package name of the target application is repeated with the package name of the first local application in the user equipment, and the application certificate of the target application matches the application certificate of the first local application It is an upgrade package of the first local application, and the first local application is upgraded or over-installed with the target application.
  • the execution unit is also used for:
  • the target application When the package name of the target application duplicates the package name of the first local application in the user equipment, and the application certificate of the target application does not match the application certificate of the first local application, the target application is determined as a new application;
  • the execution unit is also used for:
  • the target application is determined as a new application
  • a tenth aspect of the present application provides an electronic device, the electronic device comprising: an interaction device, an input/output (I/O) interface, a processor, and a memory, where program instructions are stored in the memory;
  • I/O input/output
  • processor processor
  • memory where program instructions are stored in the memory
  • the interaction device is used to obtain the operation instruction input by the user
  • the processor is configured to execute program instructions stored in the memory, so that the electronic device executes the method according to any one of the first to fourth aspects.
  • An eleventh aspect of the present application provides a computer-readable storage medium, comprising instructions, which when executed on a computer device, cause the computer device to execute the method according to any one of the first to fourth aspects.
  • FIG. 1 is a schematic diagram of a terminal device downloading applications through different application markets
  • FIG. 2 is a schematic diagram of a terminal showing an interface to a user when the signatures of the applications are inconsistent;
  • FIG. 3 is a schematic diagram of a method for distributing an application provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a user equipment verifying a target application in the method for distributing an application provided by an embodiment of the present application;
  • FIG. 5 is a schematic diagram of a system for distributing applications provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an application certificate server provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an application distribution server provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an application developer device provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a user equipment provided by an embodiment of the present application.
  • the embodiments of the present invention provide a method for distributing applications, which is used to solve the problem of package name conflict caused by repeated application package names in the process of application distribution.
  • the package name of the application is used as the unique identifier of the application, and when the application is installed, upgraded, or run, the application with the same package name will be recognized as the same application.
  • the package name of application A (101) is “com.123”, which is uploaded by developer A to application market A (102), and the terminal device 105 uses application market A (102) to upload the application A (102). 101) Download and install into the local system.
  • the package name of the application B (103) is also "com.123", which is uploaded to the application market B (104) by the developer B, and the terminal device 105 downloads the application B (103) to the local through the application market B (104).
  • the package names used for application B (103) and the installed application A (101) are also "com.123", and a package name conflict occurs. Install on the local system of the terminal.
  • the current application identification generally adopts the method of "package name + signature certificate", wherein the signature certificate is a certificate generated by the developer through private key signature when developing the application.
  • the signature certificate is a certificate generated by the developer through private key signature when developing the application.
  • Consistent signature certificate Identify the application with the same signature certificate currently installed in the current system as the same application developed by the same developer. The application currently to be installed can perform overwrite/upgrade installation on the installed application.
  • Inconsistent signature certificates Identify the current application to be installed as a different application developed by different developers, the application is not allowed to be installed/upgraded, and the old application must be uninstalled before the new application can be installed.
  • an embodiment of the present application provides a method for distributing applications, through unified management and control of the server, assigning application certificates to developers for distinguishing from other developers, and solving the problem of package name conflict caused by repeated package names .
  • FIG. 3 is a schematic diagram of a method for distributing an application provided by an embodiment of the present application. As shown in FIG. 3 , the method for distributing an application provided by an embodiment of the present application includes.
  • the application developer device obtains the application certificate from the application certificate server.
  • the application developer device is the terminal where the application developer is located.
  • the application developer device is provided with a developer platform provided for the developer, and the application developer can use the development platform on the application developer device.
  • Develop applications The application certificate server is used to manage the application certificate
  • the application certificate server is the application certificate generated by the application developer device
  • the subject (subject) in the application certificate includes a content provider identity (CPID)
  • the CPID is an identifier allocated by the application certificate server to the device of the application developer, which is used to identify the developer.
  • the CPID may also be referred to as a developer identifier.
  • the CPID has a unique corresponding relationship with the developer, so that the application developed by the developer can be distinguished from the applications developed by other developers according to the subject of the application certificate.
  • the subject in the application certificate may also include the company name and the country of the developer where the developer of the application developer device is located, and optionally, may also include any other information that can identify the developer's identity.
  • the embodiments of the present application are not limited.
  • the same developer may obtain multiple application certificates, and at least some of the subjects included in the multiple application certificates may be the same.
  • developer A in the development stage of the target application, he needs to obtain the debugging certificate of the target application: application certificate A; in the online stage of the target application, he needs to obtain the commercial certificate of the target application: application certificate B;
  • the content of the application certificate may be leaked.
  • the content of application certificate B is leaked.
  • developer A needs to apply for a new application certificate C.
  • at least some of the subjects contained in the multiple application certificates A, B and C obtained by the same developer A have the same contents.
  • the CPIDs in the subjects of the three application certificates are the same.
  • all the contents recorded in the subject included in the three application certificates are the same.
  • the developer sends a request to the application certificate server through the application developer device, and the request is used to apply for an application certificate.
  • the certificate server verifies the request, such as the authenticity of the company name and the developer's country, then assigns a CPID and generates an application certificate according to the request, and then issues the application certificate to the application developer's device.
  • the device obtains the application certificate.
  • the subject of the application certificate is content allocated by the application certificate server to the device of the application developer that can be distinguished from other developers.
  • the subject of the application certificate may be globally unique.
  • the CPID of the certificate is different.
  • the subject in the application certificate allocated to the terminal by one or more servers is unique within a certain geographical scope, for example, the subject content of the application certificate is unique within the scope of mainland China. In this way, when the target application is listed on the subsequent application market, the target application to be listed can be verified according to the subject of the application certificate.
  • the certificate can be prevented from being forged, the security of the certificate is improved, and the security of subsequent application verification is also improved, and the signature certificate will not appear. resulting conflict.
  • the application developer device adds the application certificate to the target application.
  • the target application is an application developed by the developer through the developer platform on the application developer device.
  • the application developer device packages the application certificate and adds it to the target application, so that the target application can It is identified by the subject in the application certificate.
  • the target application can prevent conflicts with other applications according to the subject.
  • the application developer device may also add a package name PackageName and a developer signature to the target application, where the package name is used to identify the name of the target application, thereby forming an identification method of "PackageName+subject" in the target application.
  • the developer's signature is a signature generated by the developer according to the private key.
  • the developer's signature can be used for the integrity check of the target application to prevent the installation package of the target application from being in the data transmission process. damage has occurred.
  • the application developer device sends the target application to the application distribution server.
  • the application distribution server is used to manage and distribute application programs.
  • the application distribution server may be a server that provides application market services, or other application distribution channels that allow end users to download applications.
  • the application examples are not limited.
  • the application distribution server as the server supporting the application market service as an example, the application developer device sends the target application to the application distribution server, so that the target application can be listed in the application market, and other users can download the target application from the application market. application.
  • the application distribution server verifies the target application according to the application certificate.
  • the subject in the application certificate is the content that is uniformly controlled by the application certificate server, so the application market in the application distribution server can use the application certificate server to verify the target application according to the application certificate to prevent conflicts between applications Case.
  • the signature certificate used for application verification is generated by the user, which lacks unified management and control, so it is impossible to prove that the source of the signature certificate is legitimate.
  • the specific verification step can be performed through the following steps.
  • the application distribution server obtains the second digest and CPID of the second application certificate.
  • the application certificate obtained by the application distribution server from the target application is the second application certificate
  • the application distribution server generates a second digest according to the content recorded in the second application certificate.
  • the hash value generated by the content of the second application certificate, the change of the content in the application certificate will cause the change of the hash value, so the second digest can accurately represent the content contained in the current second application certificate.
  • the CPID is the content recorded in the subject of the application certificate, and the application distribution server may obtain the CPID from the subject of the second application certificate.
  • the application distribution server sends the second digest and the CPID to the application certificate server.
  • the application certificate server is used to manage the application certificate, and the application certificate server records the information of the application certificate distributed to each developer. Therefore, the application distribution server sends the second digest to the application certificate server, and the application certificate server sends the second digest to the application certificate server. The server performs the verification of the second digest.
  • the application distribution server may also obtain a developer signature from the target application, where the developer signature is a signature generated by the developer according to the private key, and can be used to verify the integrity of the second digest.
  • the application distribution server sends the developer's signature to the application certificate server together, so that the server can determine whether the second digest has been tampered with according to the developer's signature.
  • application certificate server and the application distribution server may be two independent servers, or may be two different functional modules in the same server, which are not limited in this embodiment of the present application.
  • the application certificate server verifies the application certificate of the target application according to the second digest and the CPID.
  • the application certificate server is a module for managing certificates.
  • verification is performed in the following manner.
  • the application certificate server obtains locally the first application certificate assigned to the corresponding developer according to the CPID.
  • the application certificate is generated and controlled by the application certificate server. Therefore, the application certificate server locally stores the application certificate corresponding to each CPID. According to the CPID sent by the application distribution server, the application certificate server can query the CPID. The corresponding application certificate locally.
  • the application certificate server generates a first digest according to the content of the first application certificate.
  • the first digest is the first digest generated by the application certificate server according to the content recorded in the locally stored first application certificate
  • the method for generating the digest is the same as the application distribution server according to the content recorded in the second application certificate.
  • the method for generating the second abstract is consistent.
  • the application certificate server compares the first digest with the second digest.
  • the second digest and the first digest can have hash values respectively. Since the change of the content in the application certificate will cause the change of the hash value, when the first digest and the second digest When the hash values of the two are consistent, the application certificate server can determine that the first application certificate matches the second application certificate, that is, the content of the application certificate on the application distribution server side has not changed, so the verification is passed. Conversely, if the hash values of the first digest and the second digest are inconsistent, it means that the first application certificate does not match the second application certificate, the application certificate obtained by the application distribution server has changed, and the verification fails.
  • the application certificate server sends the verification result to the application distribution server.
  • the application certificate server sends the verification result to the application distribution server, so that the application distribution server knows the verification status of the target application by the application certificate server. If the verification result is not passed, the application distribution server determines that the current target application is illegal and does not put it on the shelf, and the process ends. If the verification result is passed, the application distribution server puts the target application on the shelf.
  • the methods provided in the above steps 1 to 4 are based on the verification of the digest of the application certificate. Verify that the app certificates match.
  • the application distribution server may also send the entire content of the application certificate to the application certificate server, so that the application certificate server can compare the application certificate with the application certificate stored by the developer locally in the application certificate server, so that the execution is more accurate. verification, such as integrity verification, validity verification and attribution verification of application certificates.
  • two verification methods for the second application certificate are provided, one is to realize the verification by sending the digest of the application certificate, and the other is to directly send the entire content of the second application certificate to realize the verification.
  • the result of the verification is to determine whether the first application certificate matches the second application certificate.
  • “matching” can be achieved by:
  • the first abstract is identical or partially identical to the second abstract.
  • the first hash value is identical or partially identical to the second hash value.
  • the application certificate server determines that any one of the above conditions a to c is satisfied, and can determine that the verification is passed, and sends the verification pass result to the application distribution server.
  • the application certificate can be verified at the application distribution server (ie, the application market) side through interaction with the application certificate server, thereby preventing Conflicts between apps.
  • the application distribution server opens the download permission of the target application.
  • the application distribution server passes the verification of the target application, it indicates that the target application is a legitimate application and does not conflict with the previous application, and at this time, the target application is an application that can be downloaded by other terminals.
  • the application distribution server is an application market
  • the specific implementation method of this step is: the application market puts the target application on the shelf, and the application after the shelf can be queried and downloaded by each terminal.
  • the above application distribution server only represents the server where one of the application markets is located.
  • there may also be multiple application distribution servers and each server corresponds to a different application market or application distribution channel.
  • the specific working mode of each server may be the same as that of the application distribution server, so the embodiments of the present application will not repeat them.
  • the user equipment acquires the target application from the application distribution server.
  • the user equipment is any terminal that needs to download and install the target application.
  • the application distribution server is a server supporting the application market service
  • the user equipment is the terminal of the common user accessing the application market.
  • the target application is downloaded by the user equipment from the application market (application distribution server) to the local user equipment in the form of an installation package, and the installation package of the target application includes the package name of the target application, the application certificate and the development signature.
  • the user equipment verifies the target application.
  • the verification step of the user equipment may be performed in the following manner.
  • the user equipment obtains the application certificate of the target application.
  • the application certificate in the target application is the certificate added to the target application in the preceding steps.
  • the following steps are further performed.
  • the user equipment determines whether the package name of the target application duplicates the package name of the local application.
  • the application distribution server since the application certificate of the target application carries a subject that is uniformly managed and controlled by the application certificate server and can be distinguished from other developers, on the application distribution server (application market) side, the application distribution server has The application has been verified. After the user device downloads the target application from the application market to the local, if it is determined during verification that the package name of the target application and the package name of the local application are not identical, the user device can directly transfer the current The target application is judged to be a brand new application, and the verification is passed. If the package name of the target application is the same as the package name of the application installed locally on the user equipment, further perform subsequent steps.
  • the user equipment determines whether the application certificate of the target application is consistent with the application certificate of the local application.
  • the user equipment can determine that the current target application is an upgrade package of the first local application, and the Pass the test. If the subject contained in the application certificate of the target application is inconsistent with the subject' in the application certificates of all the locally installed applications, the user equipment determines that the target application is a brand-new application, and the verification passes.
  • the user equipment verifies the target application. Since the application certificate in the target application carries the subject that is uniformly managed and controlled by the application certificate server, it is avoided that in an open system, due to the application package Installation conflicts caused by duplicate names, while ensuring the security and accuracy of application verification.
  • the user equipment installs the target application locally.
  • the target application is directly installed in the local system. If the user equipment determines that the target application is an upgrade package of the first local application that has been installed locally, the first application is upgraded or over-installed according to the target application.
  • the user equipment does not obtain the application certificate from the application when verifying the application downloaded to the local, it means that the current application does not execute the method for distributing the application provided by this application. It can be directly determined that the application is an illegal application, and the verification fails.
  • the application certificate obtained by the application developer device from the application certificate server includes the subject that is uniformly managed and controlled by the application certificate server.
  • the target application is uploaded to the application distribution server.
  • the application distribution server verifies the target application according to the subject and the package name in the application certificate, and then the target application is open for download. verify. Since the subject of the application certificate is the content uniformly managed and controlled by the application certificate server and used to distinguish developers, the situation of installation conflicts between applications caused by the same package name is avoided. It eliminates the problem of different developers with the same package name, and effectively solves the problem of application identification conflicts under multiple application distribution channels.
  • the mechanism that the application certificate is uniformly managed and controlled by the application certificate server can ensure that the source of the application certificate is legal and the format is uniform, and provide a basis for introducing developer identity information into the application identification.
  • the developer can distribute the application through different channels, and the server of each distribution channel can verify the application to be put on the shelf through the subject uniformly controlled by the application certificate server. The openness of the system is taken into account while ensuring that the application ecology of the system is uniformly managed and controlled.
  • the developer applies to the application certificate server for an application certificate through the application developer device, and the subject in the application certificate is generated by the application certificate server in a fixed format.
  • the CPID of the application developer device is 98789479145275401, If the company is Beijing xx Co., Ltd. and the country where the developer is located is China CN, the subject in the application certificate adopts the following format.
  • the name of the software is "First Application", and the package name of the software, PackageName, is in the following format.
  • the developer signs the "first application” application through the private key, thereby obtaining the developer's signature in the "first application” application.
  • the developer packages the "first application” application through the application developer device, and the packaged “first application” application includes the aforementioned packagename, subject, and the developer's signature.
  • the application developer device uploads the packaged "first application” application to the "A application market", which is an application market running on the application distribution server.
  • the "A application market” verifies the "first application” application according to the relevant steps described in 304 above.
  • the user's mobile phone installer module extracts the application certificate in the application for verification:
  • the package name of the installed application does not overlap, the "first application” is identified as a brand-new application, and a brand-new installation is performed at this time, and the process ends.
  • the two applications are identified as the same application, and the upgrade/overwrite installation is performed, and the process ends.
  • the "second application” and the "first application” are originally applications with the same package name, but because the subjects in the application certificates are different, the user's mobile phone can access the two applications during the installation process. To distinguish, to avoid the installation conflict caused by the same package name.
  • the application market "A application market” can verify the “first application” according to the subject in the application certificate, so that the application market It can verify the applications listed on the shelves, which ensures the security of applications in the application market while ensuring the openness of the system.
  • the embodiments of the present application further provide an operating system, the operating system supports a third-party application market, and resolves package name conflicts in a multi-party application market distributed distribution scenario. And problems such as application identity spoofing.
  • the system provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
  • the operating system provided by the embodiment of the present application includes.
  • the application developer device 501 is the above-mentioned application developer device. For details, please refer to the foregoing description, which will not be repeated here.
  • the certificate management module 502 wherein the certificate management module 502 runs in the above-mentioned application certificate server, and the certificate management module 502 specifically includes a certificate management unit 5021 and a certificate verification unit 5022, wherein the certificate management unit 5021 is used according to the application developer device.
  • the application of 501 allocates an application certificate 506 to the application developer device, and the application certificate 506 contains a globally unique subject generated by the certificate management unit 5021 .
  • the certificate verification unit 5022 is used to verify the application certificate 506 of the application according to the application of the application market 504 to verify the integrity, legality and attribution of the application certificate 506.
  • the relevant records of the above step 304 please refer to the relevant records of the above step 304 , and will not be repeated here.
  • the application certificate 506 obtained by the application developer device 501 from the certificate management unit 5021
  • the package name of the application the developer's company Name and developer country and other information
  • package these information into the target application 507 developed by the developer module to obtain the packaged target application 508 For a specific implementation manner, reference may be made to the description of the foregoing step 302, which will not be repeated here.
  • the application market 504 in the embodiment of this application, the application market 504 runs on the application distribution server, and the application market 504 is used to obtain the packaged target application 508 uploaded by the application developer device 501, and pass the certificate verification unit 5022 to the target application 508.
  • the application certificate 506 in the application is verified.
  • the above-mentioned application market 504 running on the application distribution server is the application market A. Since the system provided by the embodiment of the present application supports the third-party application market, the system may also include the application market B, the application market C... Application Market N and many other application markets. The working methods of each application market can be referred to the above records, and will not be repeated here.
  • the verified target application 509 is put on the shelf for the user equipment 505 to download.
  • the user equipment 505 is a terminal on the user side that downloads the target application through the application market 504.
  • the specific method of the user equipment 505 downloading, verifying and installing the target application 510 can be referred to the relevant records of the above-mentioned FIG. 3 and FIG. 4 , It will not be repeated here.
  • an application certificate is allocated to the developer terminal through the certificate management unit in the certificate management module, and the application certificate contains a globally unique subject, and the application certificate is packaged to the developer terminal by the application packaging and signing module of the developer terminal.
  • the application market verifies the application certificate of the target application through the certificate verification unit in the certificate management module. Therefore, developers can distribute applications through different channels, and the servers of each distribution channel can verify the applications to be put on the shelves through the globally unique subject in the application certificate, which improves the openness of the system and ensures the purity of the system.
  • the application market puts the target application on the shelf for the user equipment to download, and the user equipment verifies the target application through the application certificate of the target application after downloading the target application, thereby avoiding application conflicts caused by the same package name.
  • the above method may be implemented by one entity device, or jointly implemented by multiple entity devices, or may be a logic function module in one entity device, which is not specifically limited in this embodiment of the present application.
  • FIG. 6 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application; the electronic device may be an application developer device, an application certificate server, an application distribution server, or a user device in an embodiment of the present invention, and the electronic device includes at least A processor 601 , communication lines 602 , memory 603 and at least one communication interface 604 .
  • the processor 601 can be a general-purpose central processing unit (central processing unit, CPU), a microprocessor, an application-specific integrated circuit (application-specific integrated circuit, server IC), or one or more programs used to control the program execution of the present application of integrated circuits.
  • CPU central processing unit
  • microprocessor central processing unit
  • application-specific integrated circuit application-specific integrated circuit, server IC
  • programs used to control the program execution of the present application of integrated circuits.
  • Communication line 602 may include a path to communicate information between the aforementioned components.
  • Communication interface 604 using any transceiver-like device, for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc. .
  • RAN radio access network
  • WLAN wireless local area networks
  • Memory 603 may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of storage devices that can store information and instructions It can also be an electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being executed by a computer Access any other medium without limitation.
  • the memory may exist independently and be connected to the processor through communication line 602 .
  • the memory can also be integrated with the processor.
  • the memory 603 is used for storing computer-executed instructions for executing the solutions of the present application, and the execution is controlled by the processor 601 .
  • the processor 601 is configured to execute the computer-executed instructions stored in the memory 603, thereby implementing the charging management method provided by the following embodiments of the present application.
  • the computer-executed instructions in the embodiment of the present application may also be referred to as application code, which is not specifically limited in the embodiment of the present application.
  • the processor 601 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 6 .
  • the electronic device may include multiple processors, for example, the processor 601 and the processor 607 in FIG. 6 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the electronic device may further include an output device 605 and an input device 606 .
  • the output device 605 is in communication with the processor 601 and can display information in a variety of ways.
  • the output device 605 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector (projector) Wait.
  • Input device 606 is in communication with processor 601 and can receive user input in a variety of ways.
  • the input device 606 may be a mouse, a keyboard, a touch screen device or a sensing device, or the like.
  • the above-mentioned electronic device may be a general-purpose device or a special-purpose device.
  • the electronic device may be a server, a wireless terminal device, an embedded device, or a device with a similar structure in FIG. 6 .
  • the embodiments of the present application do not limit the type of the electronic device.
  • the electronic device may be divided into functional units according to the foregoing method examples.
  • each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and other division methods may be used in actual implementation.
  • FIG. 7 shows a schematic structural diagram of an application certificate server provided by an embodiment of the present application.
  • an application certificate server provided by an embodiment of the present application includes.
  • a sending unit 701 is configured to send a first application certificate to an application developer device, where the first application certificate is used to identify the application developer, and the application developer device is used to add the first application certificate to the application to be distributed, to get the target application;
  • Obtaining unit 702 configured to obtain second application certificate information from the application distribution server, where the second application certificate information is used to record the information of the second application certificate carried in the target application sent by the application developer device to the application distribution server ;
  • the verification unit 703 is configured to cause the sending unit 701 to send a verification pass result to the application distribution server if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information.
  • the obtaining unit 702 is further configured to: obtain a request from the application developer device;
  • an execution unit 704 the execution unit 704 is configured to generate a developer identifier according to the request, and the developer identifier is used to identify the application developer;
  • the executing unit 704 is further configured to generate the first application certificate, where the first application certificate includes the developer identifier.
  • the execution unit 704 is further configured to:
  • the first application certificate is generated according to the developer identifier and the company name information where the application developer is located and/or the country information where the application developer is located, where the first application certificate includes the developer identifier and is related to the developer.
  • the obtaining unit 702 is further configured to: obtain the developer identifier and the second digest of the second application certificate from the application distribution server;
  • the executing unit 704 is further configured to: obtain the first digest of the first application certificate locally according to the developer identifier;
  • the verification unit 703 is further configured to: if it is determined according to the first digest and the second digest that the first application certificate matches the second application certificate, make the sending unit 701 send the verification pass result to the application distribution server .
  • the first digest is a first hash value generated by the application certificate server according to the recorded content of the first application certificate
  • the second digest is generated by the application distribution server according to the recorded content of the second application certificate.
  • second hash value then if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the verification unit 703 is further configured to:
  • the sending unit 701 sends the verification pass result to the application distribution server.
  • the obtaining unit 702 is further configured to: obtain the second application certificate from the application distribution server;
  • the executing unit 704 is further configured to: obtain the developer identifier from the second application certificate;
  • the executing unit 704 is further configured to: obtain the first application certificate locally according to the developer identifier;
  • the verification unit 703 is further configured to: compare the developer ID of the first application certificate and the second application certificate to be the same, and the company name information where the application developer is located, and/or, where the application developer is located The country information is the same, so that the sending unit 701 sends the verification result to the application distribution server.
  • an application distribution server provided by an embodiment of the present application includes.
  • an obtaining unit 801 configured to obtain a target application from an application developer device
  • an execution unit 802 configured to acquire a second application certificate from the target application, the second application certificate is sent by the application certificate server to the application developer device, and the application developer device joins the target application;
  • a sending unit 803, configured to send the second application certificate information of the second application certificate to the application certificate server, where the second application certificate information is used to record the content in the second application certificate;
  • the execution unit 802 is further configured to allow distribution of the target application according to the verification result obtained from the application certificate server, where the verification result is used to indicate that the second application certificate and the application certificate server are developed for the application The first application certificate distributed by the user matches.
  • the second application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, and the developer identifier is allocated by the application certificate server.
  • the ID used to identify the developer of this app.
  • the second application certificate information includes the second digest of the second application certificate and the developer identifier, so that the application certificate server obtains the locally stored first application certificate according to the developer identifier, and passes the first application certificate through the first application certificate.
  • the execution unit 802 is further configured to:
  • the second digest is generated according to the content recorded in the second application certificate.
  • the second digest is a hash value, so that the first hash value generated by the application certificate server according to the first application certificate is sent when the first hash value and the second hash value are the same
  • the verification passes the result; then the execution unit 802 is also used for:
  • a second hash value is generated according to the content recorded in the second application certificate.
  • the sending unit 803 is further configured to:
  • an application developer device provided by an embodiment of the present application includes.
  • an obtaining unit 901 configured to obtain a first application certificate from an application certificate server, where the first application certificate is used to identify the application developer;
  • an executing unit 902 configured to add the first application certificate to the application to be distributed to obtain a target application
  • the sending unit 903 is configured to send the target application to the application distribution server.
  • the sending unit 903 is further configured to send a request to the application certificate server, where the request is used to request to acquire the first application certificate.
  • the request includes information on the company name where the application developer is located, and/or information on the country where the application developer is located.
  • the first application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, wherein the developer identifier is allocated by the application certificate server. , which is used to identify the developer of the application.
  • a user equipment provided by an embodiment of the present application includes.
  • Obtaining unit 1001 configured to obtain a target application from an application distribution server, where the target application is an application uploaded to the application distribution server by an application developer device, the target application includes an application certificate, and the application certificate is sent by the application certificate server to the application development server certificate of the target device, so that the application distribution server verifies the target application through the application certificate;
  • Executing unit 1002 configured to execute the target application when the package name of the target application is repeated with the package name of the first local application in the user equipment, and the application certificate of the target application matches the application certificate of the first local application It is determined to be an upgrade package of the first local application, and the first local application is upgraded or over-installed with the target application.
  • execution unit 1002 is also used for:
  • the target application When the package name of the target application duplicates the package name of the first local application in the user equipment, and the application certificate of the target application does not match the application certificate of the first local application, the target application is determined as a new application;
  • execution unit 1002 is also used for:
  • the target application is determined as a new application
  • Embodiments of the present application further provide a computer-readable storage medium, including instructions, when the instructions are executed on a computer device, the computer device is made to execute the above-mentioned method for distributing an application provided by the embodiments of the present application.
  • a computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center over a wire (e.g. coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) to another website site, computer, server, or data center.
  • a wire e.g. coaxial cable, fiber optic, digital subscriber line (DSL)
  • wireless e.g, infrared, wireless, microwave, etc.
  • the computer-readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a server, a data center, etc. that includes one or more available media integrated.
  • Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), among others.
  • the disclosed communication method, relay device, host base station, and computer storage medium may be implemented in other ways.
  • the apparatus embodiments described above are only illustrative.
  • the division of units is only a logical function division.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (full English name: Read-Only Memory, English abbreviation: ROM), random access memory (English full name: Random Access Memory, English abbreviation: RAM), magnetic Various media that can store program codes, such as discs or optical discs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Embodiments of the present application disclose an application distribution method, comprising: an application certificate server sends a first application certificate to an application developer device, wherein the first application certificate is used to identify an application developer, and the application developer device is used to add the first application certificate to a target application; the application certificate server obtains second application certificate information from an application distribution server; if according to the second application certificate information, the application certificate server confirms that the first application certificate matches a second application certificate, the application certificate server sends a verification successful result to the application distribution server. The present application also provides an apparatus, a device, and a medium. The application developer device adds application certificates uniformly managed by the application certificate server to the target application, so that the application distribution server can check an application by means of the application certificates, and installation conflicts caused by repeated package names during a multi-channel distribution application process are avoided.

Description

一种分发应用的方法、装置、设备及介质A method, apparatus, device and medium for distributing applications
本申请要求于2021年04月21日提交的申请号为CN202110431800.9、发明名称为“一种分发应用的方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on April 21, 2021 with the application number CN202110431800.9 and the invention titled "A method, device, device and medium for distributing applications", the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及电子领域,尤其涉及一种分发应用的方法、装置、设备及介质。The present application relates to the field of electronics, and in particular, to a method, apparatus, device and medium for distributing applications.
背景技术Background technique
当前,在一些操作系统中,使用应用的包名PackageName作为应用的唯一标识,在安装、升级、运行应用时,相同包名的应用会被识别为相同应用。Currently, in some operating systems, the package name of the application is used as the unique identifier of the application, and when the application is installed, upgraded, or run, the application with the same package name will be recognized as the same application.
一些系统基于开放性的考虑,支持从多方市场/渠道(例如浏览器、应用内安装)安装应用,不同开发者在不同渠道分发的不同应用,包名无法保证全局唯一,便会诱发诸多的包名冲突问题,这影响了应用在系统中的正常工作,同时对开发者的体验较差。Based on the consideration of openness, some systems support the installation of applications from multiple markets/channels (such as browsers, in-app installations). For different applications distributed by different developers in different channels, the package name cannot be guaranteed to be globally unique, which will induce many packages. Name conflict problem, which affects the normal work of the application in the system, and the developer experience is poor.
因此,现有技术中存在的上述问题还有待于改进。Therefore, the above problems existing in the prior art still need to be improved.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种分发应用的方法、装置、设备及介质,用于解决应用分发过程中由于应用包名重复而导致的包名冲突问题。The present application provides a method, apparatus, device and medium for distributing applications, which are used to solve the problem of package name conflict caused by duplicate application package names in the process of application distribution.
有鉴于此,本申请第一方面提供了一种分发应用的方法,包括:In view of this, a first aspect of the present application provides a method for distributing applications, including:
应用证书服务器向应用开发者设备发送第一应用证书,该第一应用证书用于标识应用开发者,该应用开发者设备用于将该第一应用证书加入待分发的应用中,以获得目标应用;The application certificate server sends a first application certificate to the application developer device, where the first application certificate is used to identify the application developer, and the application developer device is used to add the first application certificate to the application to be distributed to obtain the target application ;
该应用证书服务器从应用分发服务器获取第二应用证书信息,该第二应用证书信息用于记录该应用开发者设备发送给该应用分发服务器的该目标应用中携带的第二应用证书的信息;The application certificate server obtains second application certificate information from the application distribution server, where the second application certificate information is used to record the information of the second application certificate carried in the target application sent by the application developer device to the application distribution server;
若该应用证书服务器根据该第二应用证书信息确认该第一应用证书与该第二应用证书匹配,该应用证书服务器向该应用分发服务器发送校验通过结果。If the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the application certificate server sends a verification result to the application distribution server.
本申请中,由应用证书服务器来统一管控,向开发者分配用于与其他开发者区分的应用证书,之后由开发者将应用证书加入到应用中,从而解决了包名重复而导致的包名冲突问题。同时,由于应用证书由应用证书服务器统一管控,应用证书服务器可以根据应用分发服务器发送的应用证书信息协助应用分发服务器对待上架的应用进行校验,从而保证了对待分发应用的统一管控。In this application, the application certificate server is used for unified management and control, and the application certificate for distinguishing from other developers is allocated to the developer, and then the developer adds the application certificate to the application, thus solving the package name caused by the duplication of package names. conflict issues. At the same time, since the application certificate is uniformly managed and controlled by the application certificate server, the application certificate server can assist the application distribution server to verify the application to be put on the shelf according to the application certificate information sent by the application distribution server, thereby ensuring the unified management and control of the application to be distributed.
可选地,该应用证书服务器向应用开发者设备发送第一应用证书之前,还包括:该应用证书服务器从该应用开发者设备获取请求;该应用证书服务器根据该请求生成开发者标识,该开发者标识用于标识该应用开发者;该应用证书服务器生成该第一应用证书,该第一应用证书包括该开发者标识。Optionally, before the application certificate server sends the first application certificate to the application developer device, the method further includes: the application certificate server obtains a request from the application developer device; the application certificate server generates a developer identifier according to the request, and the development The developer identifier is used to identify the application developer; the application certificate server generates the first application certificate, and the first application certificate includes the developer identifier.
本申请中,开发者通过应用开发者设备向应用证书服务器发送请求,该请求用于申请应用证书,之后应用证书服务器根据该请求分配开发者标识并生成应用证书,之后将该应用证书下发给应用开发者设备,从而实现了应用证书服务器对应用证书的统一管控。In this application, the developer sends a request to the application certificate server through the application developer device, and the request is used to apply for an application certificate, and then the application certificate server allocates the developer identifier and generates the application certificate according to the request, and then issues the application certificate to the application certificate server. The device of the application developer, thus realizing the unified management and control of the application certificate by the application certificate server.
可选地,该请求包括该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息,则该应用证书服务器生成该第一应用证书包括:该应用证书服务器根据该开发者标识,以及根据该应用开发者所在的公司名称信息和/或该应用开发者所在的国家信息生成该第一应用证书,该第一应用证书包括该开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个。Optionally, the request includes information about the company name where the application developer is located, and/or information about the country where the application developer is located, and the generation of the first application certificate by the application certificate server includes: the application certificate server according to the development identifier of the developer, and generate the first application certificate according to the company name information where the application developer is located and/or the country information where the application developer is located, where the first application certificate includes the developer identifier and is related to the developer identifier. One or more of the company name information or the country information associated with the company.
本申请中,应用证书中包括开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个,从而使得应用证书能够根据这些信息对开发者进行标识,从而与其他开发者进行区分,避免应用包名相同而造成的冲突问题。In this application, the application certificate includes the developer identifier, and one or more of the company name information or the country information associated with the developer identifier, so that the application certificate can identify the developer according to these information, In this way, it can be distinguished from other developers and avoid conflicts caused by the same application package name.
可选地,该应用证书服务器从应用分发服务器获取第二应用证书信息,包括:该应用证书服务器从该应用分发服务器获取该开发者标识和该第二应用证书的第二摘要;该应用证书服务器从应用分发服务器获取第二应用证书信息之后,还包括:该应用证书服务器根据该开发者标识从本地获取该第一应用证书的第一摘要;该若该应用证书服务器根据该第二应用证书信息确认该第一应用证书与该第二应用证书匹配,该应用证书服务器向该应用分发服务器发送校验通过结果,包括:若该应用证书服务器根据该第一摘要和该第二摘要确定该第一应用证书与该第二应用证书匹配,该应用证书服务器向该应用分发服务器发送该校验通过结果。Optionally, the application certificate server acquiring the second application certificate information from the application distribution server includes: the application certificate server acquiring the developer identifier and the second digest of the second application certificate from the application distribution server; the application certificate server After obtaining the second application certificate information from the application distribution server, the method further includes: the application certificate server obtains the first digest of the first application certificate locally according to the developer identifier; Confirm that the first application certificate matches the second application certificate, and the application certificate server sends a verification pass result to the application distribution server, including: if the application certificate server determines the first application certificate according to the first digest and the second digest The application certificate matches the second application certificate, and the application certificate server sends the verification pass result to the application distribution server.
本申请中,由于应用证书服务器负责应用证书的统一管控,因此,应用证书服务器可以根据应用分发服务器发送的第二应用证书信息对待上架的目标应用进行校验,第二应用证书信息基于应用证书的摘要实现,其优点在于传输数据量较小,应用分发服务器只需要向应用证书服务器发送摘要的内容即可校验应用证书是否匹配。In this application, since the application certificate server is responsible for the unified management and control of application certificates, the application certificate server can verify the target application to be put on the shelf according to the second application certificate information sent by the application distribution server, and the second application certificate information is based on the application certificate. The advantage of digest implementation is that the amount of transmitted data is small, and the application distribution server only needs to send the content of the digest to the application certificate server to verify whether the application certificate matches.
可选地,该第一摘要为该应用证书服务器根据该第一应用证书所记录内容生成的第一哈希值,该第二摘要为该应用分发服务器根据该第二应用证书所记录内容生成的第二哈希值;则该若该应用证书服务器根据该第二应用证书信息确认该第一应用证书与该第二应用证书匹配,该应用证书服务器向该应用分发服务器发送该校验通过结果,包括:若该应用证书服务器判断该第一哈希值与该第二哈希值相同,该应用证书服务器向该应用分发服务器发送该校验通过结果。Optionally, the first digest is a first hash value generated by the application certificate server according to the recorded content of the first application certificate, and the second digest is generated by the application distribution server according to the recorded content of the second application certificate. second hash value; then if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the application certificate server sends the verification result to the application distribution server, The method includes: if the application certificate server determines that the first hash value is the same as the second hash value, the application certificate server sends the verification pass result to the application distribution server.
本申请中,第二摘要和第一摘要可以分别哈希值,由于应用证书中内容的变化会引起哈希值的改变,因此,当第一摘要与第二摘要的哈希值一致时,应用证书服务器可以判定第一应用证书与第二应用证书匹配,即应用分发服务器一端应用证书的内容没有发生改变,从而校验通过。反之,若第一摘要与第二摘要的哈希值不一致,说明第一应用证书与第二应用证书不匹配,应用分发服务器所获取的应用证书发生了改变,校验失败。In this application, the second digest and the first digest can have hash values respectively. Since the content of the application certificate changes, the hash value will change. Therefore, when the hash values of the first digest and the second digest are consistent, the application The certificate server may determine that the first application certificate matches the second application certificate, that is, the content of the application certificate on the side of the application distribution server has not changed, so the verification is passed. Conversely, if the hash values of the first digest and the second digest are inconsistent, it means that the first application certificate does not match the second application certificate, the application certificate obtained by the application distribution server has changed, and the verification fails.
可选地,该应用证书服务器从应用分发服务器获取第二应用证书信息,包括:该应用证书服务器从该应用分发服务器获取该第二应用证书;该应用证书服务器从应用分发服务器获取第二应用证书信息之后,还包括:该应用证书服务器从该第二应用证书中获取该开发者标识;该应用证书服务器根据该开发者标识从本地获取该第一应用证书;该若该应用证书服务器根据该第二应用证书信息确认该第一应用证书与该第二应用证书匹配,该应用证书服务器向该应用分发服务器发送校验通过结果,包括:若该应用证书服务器比对该第 一应用证书与该第二应用证书的开发者标识相同,且该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息相同,该应用证书服务器向该应用分发服务器发送校验通过结果。Optionally, obtaining the second application certificate information from the application distribution server by the application certificate server includes: the application certificate server obtains the second application certificate from the application distribution server; the application certificate server obtains the second application certificate from the application distribution server After the information, it also includes: the application certificate server obtains the developer identifier from the second application certificate; the application certificate server obtains the first application certificate locally according to the developer identifier; if the application certificate server obtains the first application certificate according to the first application certificate The second application certificate information confirms that the first application certificate matches the second application certificate, and the application certificate server sends a verification result to the application distribution server, including: if the application certificate server compares the first application certificate with the second application certificate The developer identifiers of the two application certificates are the same, and the company name information of the application developer and/or the country information of the application developer is the same, and the application certificate server sends the verification result to the application distribution server.
本申请中,应用分发服务器在校验过程中向应用证书服务器发送应用证书的全部内容,以使得应用证书服务器可以将该应用证书与开发者存储在应用证书服务器本地的应用证书进行比对,从而执行更加精准的校验,例如应用证书的完整性校验,合法性校验和归属性校验。In this application, the application distribution server sends the entire content of the application certificate to the application certificate server during the verification process, so that the application certificate server can compare the application certificate with the application certificate stored by the developer locally in the application certificate server, thereby Perform more precise verification, such as integrity verification, validity verification and attribution verification of application certificates.
本申请第二方面提供了一种分发应用的方法,包括:应用分发服务器从应用开发者设备获取目标应用;该应用分发服务器从该目标应用中获取获取第二应用证书,该第二应用证书为应用证书服务器发送给该应用开发者设备,并由该应用开发者设备加入该目标应用的;该应用分发服务器向该应用证书服务器发送该第二应用证书的第二应用证书信息,该第二应用证书信息用于记录该第二应用证书中的内容;该应用分发服务器根据从该应用证书服务器获取到校验通过结果,允许该目标应用的分发,该校验通过结果用于指示该第二应用证书与该应用证书服务器为该应用开发者分发的第一应用证书匹配。A second aspect of the present application provides a method for distributing applications, including: an application distribution server acquires a target application from an application developer device; the application distribution server acquires a second application certificate from the target application, where the second application certificate is The application certificate server sends to the application developer device, and the application developer device joins the target application; the application distribution server sends the second application certificate information of the second application certificate to the application certificate server, the second application certificate The certificate information is used to record the content in the second application certificate; the application distribution server allows distribution of the target application according to the verification result obtained from the application certificate server, and the verification result is used to indicate the second application The certificate matches the first application certificate distributed by the application certificate server for the application developer.
可选地,该第二应用证书包括开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个,该开发者标识为该应用证书服务器分配的、用于标识该应用开发者的标识。Optionally, the second application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, and the developer identifier is allocated by the application certificate server. The ID used to identify the developer of this app.
可选地,该第二应用证书信息包括第二应用证书的第二摘要和该开发者标识,以使该应用证书服务器根据该开发者标识获取存储在本地的第一应用证书,并通过该第一应用证书的第一摘要和该第二摘要确定该第一应用证书与该第二应用证书匹配时发送该校验通过结果;则该应用分发服务器向该应用证书服务器发送该第二应用证书的第二应用证书信息之前,还包括:该应用分发服务器根据该第二应用证书中记录的内容生成该第二摘要。Optionally, the second application certificate information includes the second digest of the second application certificate and the developer identifier, so that the application certificate server obtains the locally stored first application certificate according to the developer identifier, and passes the first application certificate through the first application certificate. When the first digest of the application certificate and the second digest determine that the first application certificate matches the second application certificate, the verification result is sent; then the application distribution server sends the second application certificate to the application certificate server. Before the second application certificate information, the method further includes: the application distribution server generates the second digest according to the content recorded in the second application certificate.
可选地,该第二摘要为哈希值,以使该应用证书服务器根据该第一应用证书生成的第一哈希值,在该第一哈希值和该第二哈希值相同时发送该校验通过结果;则该应用分发服务器根据该第二应用证书中记录的内容生成该第二摘要,包括:该应用分发服务器根据该第二应用证书中记录的内容生成第二哈希值。Optionally, the second digest is a hash value, so that the first hash value generated by the application certificate server according to the first application certificate is sent when the first hash value and the second hash value are the same If the verification is passed, the application distribution server generates the second digest according to the content recorded in the second application certificate, which includes: the application distribution server generates a second hash value according to the content recorded in the second application certificate.
可选地,该应用分发服务器向该应用证书服务器发送该第二应用证书的第二应用证书信息,包括:该应用分发服务器向该应用证书服务器发送该第二应用证书,以使该应用证书服务器在比对该第一应用证书与该第二应用证书的开发者标识相同,且该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息相同时,向该应用分发服务器发送该校验通过结果。Optionally, sending, by the application distribution server, the second application certificate information of the second application certificate to the application certificate server includes: the application distribution server sending the second application certificate to the application certificate server, so that the application certificate server can send the second application certificate to the application certificate server. When comparing the developer ID of the first application certificate and the second application certificate, and the company name information where the application developer is located, and/or the country information where the application developer is located is the same, the application is distributed to the application The server sends the verification pass result.
上述第二方面的有益效果可参阅前述第一方面的相关记载,此处不再赘述。For the beneficial effects of the second aspect, reference may be made to the relevant records of the first aspect, which will not be repeated here.
本申请第三方面提供了一种分发应用的方法,包括:应用开发者设备从应用证书服务器获取第一应用证书,该第一应用证书用于标识应用开发者;该应用开发者设备将该第一应用证书添加到待分发的应用中,以获得目标应用;该应用开发者设备向应用分发服务器发送该目标应用。A third aspect of the present application provides a method for distributing applications, including: an application developer device obtains a first application certificate from an application certificate server, where the first application certificate is used to identify the application developer; the application developer device uses the first application certificate to identify the application developer; An application certificate is added to the application to be distributed to obtain the target application; the application developer device sends the target application to the application distribution server.
可选地,该应用开发者设备从应用证书服务器获取第一应用证书之前,还包括:该应 用开发者设备向该应用证书服务器发送请求,该请求用于请求获取该第一应用证书。Optionally, before the application developer device acquires the first application certificate from the application certificate server, the method further includes: the application developer device sends a request to the application certificate server, where the request is used for requesting to acquire the first application certificate.
可选地,该请求包括该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息。Optionally, the request includes information on the company name where the application developer is located, and/or information on the country where the application developer is located.
可选地,该第一应用证书包括开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个,其中,该开发者标识为该应用证书服务器分配的、用于标识该应用开发者的标识。Optionally, the first application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, wherein the developer identifier is allocated by the application certificate server. , which is used to identify the developer of the application.
上述第三方面的有益效果可参阅前述第一方面的相关记载,此处不再赘述。For the beneficial effects of the third aspect, reference may be made to the relevant records of the first aspect, which will not be repeated here.
本申请第四方面提供了一种分发应用的方法,包括:A fourth aspect of the present application provides a method for distributing an application, including:
用户设备从应用分发服务器获取目标应用,该目标应用为应用开发者设备上传到该应用分发服务器的应用,该目标应用包括应用证书,该应用证书为应用证书服务器发送给该应用开发者设备的证书,以使该应用分发服务器通过该应用证书对该目标应用进行校验;当该目标应用的包名与该用户设备中第一本地应用的包名重复,且该目标应用的应用证书与该第一本地应用的应用证书匹配时,该用户设备将该目标应用判定为该第一本地应用的升级包,以该目标应用对该第一本地应用进行升级或覆盖安装。The user equipment obtains the target application from the application distribution server, the target application is the application uploaded to the application distribution server by the application developer device, the target application includes the application certificate, and the application certificate is the certificate sent by the application certificate server to the application developer device , so that the application distribution server verifies the target application through the application certificate; when the package name of the target application is the same as the package name of the first local application in the user equipment, and the application certificate of the target application is the same as that of the first local application in the user equipment When the application certificates of a local application match, the user equipment determines the target application as an upgrade package of the first local application, and uses the target application to upgrade or overwrite the first local application.
本申请中,由于目标应用中包括应用证书,该应用证书能够标识应用的开发者,因此用户设备在安装目标应用的过程中,能够根据应用证书确定应用证书匹配的应用为现有应用的升级包,从而避免了包名重复时发生的应用冲突问题。In this application, since the target application includes an application certificate, and the application certificate can identify the developer of the application, during the process of installing the target application, the user equipment can determine, according to the application certificate, that the application that matches the application certificate is an upgrade package of the existing application , so as to avoid the application conflict problem that occurs when the package name is repeated.
可选地,该方法还包括:当该目标应用的包名与该用户设备中第一本地应用的包名重复,且该目标应用的应用证书与该第一本地应用的应用证书不匹配时,该用户设备将该目标应用判定为新应用;该用户设备将该目标应用安装到本地系统中。Optionally, the method further includes: when the package name of the target application is repeated with the package name of the first local application in the user equipment, and the application certificate of the target application does not match the application certificate of the first local application, The user equipment determines the target application as a new application; the user equipment installs the target application into the local system.
本申请中,由于目标应用中包括应用证书,该应用证书能够标识应用的开发者,因此用户设备在安装目标应用的过程中,在包名重复的情况下,能够根据不匹配的应用证书确定当前应用为全新应用,从而避免了包名重复时发生的应用冲突问题。In this application, since the target application includes an application certificate, the application certificate can identify the developer of the application. Therefore, in the process of installing the target application, in the case of repeated package names, the user equipment can determine the current The application is a brand new application, which avoids the application conflict problem that occurs when the package name is repeated.
可选地,该方法还包括:当该目标应用的包名与该用户设备本地应用的包名不重复时,该用户设备将该目标应用判定为新应用;该用户设备将该目标应用安装到本地系统中。Optionally, the method further includes: when the package name of the target application does not overlap with the package name of the local application of the user equipment, the user equipment determines that the target application is a new application; the user equipment installs the target application to in the local system.
本申请中,由于目标应用在分发过程中经过了应用分发服务器的校验,因此,当包名不重复时,目标应用可以将当前应用直接识别为全新应用安装,应用分发服务器的校验过程保证了应用的安全性。In this application, since the target application has been verified by the application distribution server during the distribution process, when the package name is not repeated, the target application can directly identify the current application as a brand-new application installation, and the verification process of the application distribution server guarantees application security.
本申请第五方面提供了一种分发应用的系统,包括:应用开发者设备和应用分发服务器,其中,该应用开发者设备,用于将应用证书添加到待分发的应用中以获得目标应用,该应用证书用于标识应用开发者;该应用分发服务器,用于从该应用开发者设备获取该目标应用,并根据该应用证书校验该目标应用;该应用分发服务器,还用于在该校验通过时允许该目标应用的分发。A fifth aspect of the present application provides a system for distributing applications, including: an application developer device and an application distribution server, wherein the application developer device is used to add an application certificate to an application to be distributed to obtain a target application, The application certificate is used to identify the application developer; the application distribution server is used to obtain the target application from the application developer's device, and verify the target application according to the application certificate; the application distribution server is also used for the application in the school The distribution of the target application is allowed when the verification is passed.
可选地,该系统还包括应用证书服务器,其中,该应用证书服务器,用于根据该应用开发者设备的请求向该应用开发者设备分配该应用证书;该应用分发服务器,还用于从该目标应用中获取该应用证书,并将该应用证书的应用证书信息发送给该应用证书服务器;该应用证书服务器,还用于比对该应用分发服务器发送的该应用证书信息与本地应用证书 的应用证书信息,以判断该应用分发服务器发送的该应用证书是否与本地应用证书匹配,若匹配,向该应用分发服务器发送校验通过结果;该应用分发服务器,还用于在获取到该校验通过结果时允许该目标应用的分发。Optionally, the system further includes an application certificate server, wherein the application certificate server is configured to distribute the application certificate to the application developer device according to the request of the application developer device; the application distribution server is also configured to obtain the application certificate from the application developer device. The target application obtains the application certificate, and sends the application certificate information of the application certificate to the application certificate server; the application certificate server is also used to compare the application certificate information sent by the application distribution server with the application of the local application certificate certificate information, to judge whether the application certificate sent by the application distribution server matches the local application certificate, and if it matches, send the verification result to the application distribution server; the application distribution server is also used to obtain the verification pass As a result, distribution of the target application is allowed.
可选地,该系统还包括用户设备,其中,该用户设备,用于获取该应用分发服务器分发的该目标应用,并根据该目标应用的该应用证书判断该目标应用是全新应用还是本地应用的安装升级包。Optionally, the system further includes user equipment, wherein the user equipment is used to obtain the target application distributed by the application distribution server, and determine whether the target application is a brand-new application or a local application according to the application certificate of the target application. Install the upgrade package.
上述第五方面的有益效果可参阅前述第一方面及第四方面的相关记载,此处不再赘述。For the beneficial effects of the fifth aspect, reference may be made to the relevant records of the first aspect and the fourth aspect, which will not be repeated here.
本申请第六方面提供了一种应用证书服务器,包括:A sixth aspect of the present application provides an application certificate server, including:
发送单元,用于向应用开发者设备发送第一应用证书,该第一应用证书用于标识应用开发者,该应用开发者设备用于将该第一应用证书加入待分发的应用中,以获得目标应用;a sending unit, configured to send a first application certificate to the application developer device, where the first application certificate is used to identify the application developer, and the application developer device is used to add the first application certificate to the application to be distributed to obtain target application;
获取单元,用于从应用分发服务器获取第二应用证书信息,该第二应用证书信息用于记录该应用开发者设备发送给该应用分发服务器的该目标应用中携带的第二应用证书的信息;an obtaining unit, configured to obtain second application certificate information from the application distribution server, where the second application certificate information is used to record the information of the second application certificate carried in the target application sent by the application developer device to the application distribution server;
校验单元,用于若该应用证书服务器根据该第二应用证书信息确认该第一应用证书与该第二应用证书匹配,使该发送单元向该应用分发服务器发送校验通过结果。A verification unit, configured to make the sending unit send a verification pass result to the application distribution server if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information.
可选地,该获取单元,还用于:从该应用开发者设备获取请求;Optionally, the obtaining unit is further configured to: obtain a request from the application developer device;
还包括,执行单元,该执行单元用于根据该请求生成开发者标识,该开发者标识用于标识该应用开发者;Also includes, an execution unit, the execution unit is configured to generate a developer identifier according to the request, and the developer identifier is used to identify the application developer;
该执行单元,还用于生成该第一应用证书,该第一应用证书包括该开发者标识。The execution unit is further configured to generate the first application certificate, where the first application certificate includes the developer identifier.
可选地,该请求包括该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息,则执行单元,还用于:Optionally, if the request includes the company name information where the application developer is located, and/or the information about the country where the application developer is located, the execution unit is further used for:
根据该开发者标识,以及根据该应用开发者所在的公司名称信息和/或该应用开发者所在的国家信息生成该第一应用证书,该第一应用证书包括该开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个。The first application certificate is generated according to the developer identifier and the company name information where the application developer is located and/or the country information where the application developer is located, where the first application certificate includes the developer identifier and is related to the developer. One or more of the company name information or the country information associated with the person identification.
可选地,该获取单元还用于:从该应用分发服务器获取该开发者标识和该第二应用证书的第二摘要;Optionally, the obtaining unit is further configured to: obtain the developer identifier and the second digest of the second application certificate from the application distribution server;
该执行单元还用于:根据该开发者标识从本地获取该第一应用证书的第一摘要;The execution unit is further configured to: obtain the first digest of the first application certificate locally according to the developer identifier;
该校验单元还用于:若根据该第一摘要和该第二摘要确定该第一应用证书与该第二应用证书匹配,使该发送单元向该应用分发服务器发送该校验通过结果。The verification unit is further configured to: if it is determined according to the first digest and the second digest that the first application certificate matches the second application certificate, make the sending unit send the verification pass result to the application distribution server.
可选地,该第一摘要为该应用证书服务器根据该第一应用证书所记录内容生成的第一哈希值,该第二摘要为该应用分发服务器根据该第二应用证书所记录内容生成的第二哈希值;则该若该应用证书服务器根据该第二应用证书信息确认该第一应用证书与该第二应用证书匹配,该校验单元,还用于:Optionally, the first digest is a first hash value generated by the application certificate server according to the recorded content of the first application certificate, and the second digest is generated by the application distribution server according to the recorded content of the second application certificate. second hash value; then if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the verification unit is further configured to:
若判断该第一哈希值与该第二哈希值相同,使发送单元向该应用分发服务器发送该校验通过结果。If it is determined that the first hash value is the same as the second hash value, the sending unit sends the verification pass result to the application distribution server.
可选地,该获取单元还用于:从该应用分发服务器获取该第二应用证书;Optionally, the obtaining unit is further configured to: obtain the second application certificate from the application distribution server;
该执行单元,还用于:从该第二应用证书中获取该开发者标识;The execution unit is further configured to: obtain the developer identifier from the second application certificate;
该执行单元,还用于:根据该开发者标识从本地获取该第一应用证书;The execution unit is further configured to: obtain the first application certificate locally according to the developer identifier;
该校验单元,还用于:若比对该第一应用证书与该第二应用证书的开发者标识相同,且该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息相同,使发送单元向该应用分发服务器发送校验通过结果。The verification unit is further configured to: if the developer identification of the first application certificate and the second application certificate are the same, and the company name information where the application developer is located, and/or, the application developer is located in The country information is the same, so that the sending unit sends the verification result to the application distribution server.
本申请第七方面提供了一种应用分发服务器,包括:A seventh aspect of the present application provides an application distribution server, including:
获取单元,用于从应用开发者设备获取目标应用;an acquisition unit, used to acquire the target application from the application developer's device;
执行单元,用于从该目标应用中获取获取第二应用证书,该第二应用证书为应用证书服务器发送给该应用开发者设备,并由该应用开发者设备加入该目标应用的;an execution unit, configured to acquire a second application certificate from the target application, where the second application certificate is sent by the application certificate server to the application developer device, and the application developer device joins the target application;
发送单元,用于向该应用证书服务器发送该第二应用证书的第二应用证书信息,该第二应用证书信息用于记录该第二应用证书中的内容;a sending unit, configured to send second application certificate information of the second application certificate to the application certificate server, where the second application certificate information is used to record content in the second application certificate;
该执行单元,还用于根据从该应用证书服务器获取到校验通过结果,允许该目标应用的分发,该校验通过结果用于指示该第二应用证书与该应用证书服务器为该应用开发者分发的第一应用证书匹配。The execution unit is further configured to allow distribution of the target application according to a verification result obtained from the application certificate server, where the verification result is used to indicate that the second application certificate and the application certificate server are the application developer The distributed first application certificate matches.
可选地,该第二应用证书包括开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个,该开发者标识为该应用证书服务器分配的、用于标识该应用开发者的标识。Optionally, the second application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, and the developer identifier is allocated by the application certificate server. The ID used to identify the developer of this app.
可选地,该第二应用证书信息包括第二应用证书的第二摘要和该开发者标识,以使该应用证书服务器根据该开发者标识获取存储在本地的第一应用证书,并通过该第一应用证书的第一摘要和该第二摘要确定该第一应用证书与该第二应用证书匹配时发送该校验通过结果;则执行单元还用于:Optionally, the second application certificate information includes the second digest of the second application certificate and the developer identifier, so that the application certificate server obtains the locally stored first application certificate according to the developer identifier, and passes the first application certificate through the first application certificate. When the first digest of the application certificate and the second digest determine that the first application certificate matches the second application certificate, the verification pass result is sent; then the execution unit is further configured to:
根据该第二应用证书中记录的内容生成该第二摘要。The second digest is generated according to the content recorded in the second application certificate.
可选地,该第二摘要为哈希值,以使该应用证书服务器根据该第一应用证书生成的第一哈希值,在该第一哈希值和该第二哈希值相同时发送该校验通过结果;则该执行单元,还用于:Optionally, the second digest is a hash value, so that the first hash value generated by the application certificate server according to the first application certificate is sent when the first hash value and the second hash value are the same The result of the verification is passed; then the execution unit is also used for:
根据该第二应用证书中记录的内容生成第二哈希值。A second hash value is generated according to the content recorded in the second application certificate.
可选地,该发送单元,还用于:Optionally, the sending unit is further used for:
向该应用证书服务器发送该第二应用证书,以使该应用证书服务器在比对该第一应用证书与该第二应用证书的开发者标识相同,且该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息相同时,向该应用分发服务器发送该校验通过结果。sending the second application certificate to the application certificate server, so that the application certificate server compares the first application certificate and the second application certificate with the same developer identification, and the company name information of the application developer, and /Or, when the information about the country where the application developer is located is the same, send the verification pass result to the application distribution server.
本申请第八方面提供了一种应用开发者设备,包括:An eighth aspect of the present application provides an application developer device, including:
获取单元,用于从应用证书服务器获取第一应用证书,该第一应用证书用于标识应用开发者;an obtaining unit, configured to obtain a first application certificate from an application certificate server, where the first application certificate is used to identify the application developer;
执行单元,用于将该第一应用证书添加到待分发的应用中,以获得目标应用;an execution unit, configured to add the first application certificate to the application to be distributed to obtain a target application;
发送单元,用于向应用分发服务器发送该目标应用。The sending unit is used for sending the target application to the application distribution server.
可选地,该发送单元,还用于向该应用证书服务器发送请求,该请求用于请求获取该第一应用证书。Optionally, the sending unit is further configured to send a request to the application certificate server, where the request is used to request to obtain the first application certificate.
可选地,该请求包括该应用开发者所在的公司名称信息,和/或,该应用开发者所在的 国家信息。Optionally, the request includes information on the company name where the application developer is located, and/or information on the country where the application developer is located.
可选地,该第一应用证书包括开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个,其中,该开发者标识为该应用证书服务器分配的、用于标识该应用开发者的标识。Optionally, the first application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, wherein the developer identifier is allocated by the application certificate server. , which is used to identify the developer of the application.
本申请第九方面提供了一种用户设备,包括:A ninth aspect of the present application provides a user equipment, including:
获取单元,用于从应用分发服务器获取目标应用,该目标应用为应用开发者设备上传到该应用分发服务器的应用,该目标应用包括应用证书,该应用证书为应用证书服务器发送给该应用开发者设备的证书,以使该应用分发服务器通过该应用证书对该目标应用进行校验;an obtaining unit, configured to obtain a target application from an application distribution server, where the target application is an application uploaded by an application developer device to the application distribution server, the target application includes an application certificate, and the application certificate is sent by the application certificate server to the application developer The certificate of the device, so that the application distribution server can verify the target application through the application certificate;
执行单元,用于当该目标应用的包名与该用户设备中第一本地应用的包名重复,且该目标应用的应用证书与该第一本地应用的应用证书匹配时,将该目标应用判定为该第一本地应用的升级包,以该目标应用对该第一本地应用进行升级或覆盖安装。an execution unit, configured to determine the target application when the package name of the target application is repeated with the package name of the first local application in the user equipment, and the application certificate of the target application matches the application certificate of the first local application It is an upgrade package of the first local application, and the first local application is upgraded or over-installed with the target application.
可选地,该执行单元还用于:Optionally, the execution unit is also used for:
当该目标应用的包名与该用户设备中第一本地应用的包名重复,且该目标应用的应用证书与该第一本地应用的应用证书不匹配时,将该目标应用判定为新应用;When the package name of the target application duplicates the package name of the first local application in the user equipment, and the application certificate of the target application does not match the application certificate of the first local application, the target application is determined as a new application;
将该目标应用安装到本地系统中。Install the target application to the local system.
可选地,该执行单元还用于:Optionally, the execution unit is also used for:
当该目标应用的包名与该用户设备本地应用的包名不重复时,将该目标应用判定为新应用;When the package name of the target application does not overlap with the package name of the local application of the user equipment, the target application is determined as a new application;
将该目标应用安装到本地系统中。Install the target application to the local system.
本申请第十方面提供了一种电子设备,该电子设备包括:交互装置、输入/输出(I/O)接口、处理器和存储器,该存储器中存储有程序指令;A tenth aspect of the present application provides an electronic device, the electronic device comprising: an interaction device, an input/output (I/O) interface, a processor, and a memory, where program instructions are stored in the memory;
该交互装置用于获取用户输入的操作指令;The interaction device is used to obtain the operation instruction input by the user;
该处理器用于执行存储器中存储的程序指令,使得该电子设备执行如第一方面至第四方面任一项所述的方法。The processor is configured to execute program instructions stored in the memory, so that the electronic device executes the method according to any one of the first to fourth aspects.
本申请第十一方面提供了一种计算机可读存储介质,包括指令,当该指令在计算机设备上运行时,使得该计算机设备执行如第一方面至第四方面任一项所述的方法。An eleventh aspect of the present application provides a computer-readable storage medium, comprising instructions, which when executed on a computer device, cause the computer device to execute the method according to any one of the first to fourth aspects.
上述第六至第十一方面的有益效果可参阅前述第一方面及第四方面的记载,此处不再赘述。For the beneficial effects of the sixth to eleventh aspects, reference may be made to the descriptions of the first aspect and the fourth aspect, which will not be repeated here.
附图说明Description of drawings
图1为终端设备通过不同应用市场下载应用的示意图;1 is a schematic diagram of a terminal device downloading applications through different application markets;
图2为应用的签名不一致时终端向用户展示界面的示意图;2 is a schematic diagram of a terminal showing an interface to a user when the signatures of the applications are inconsistent;
图3为本申请实施例所提供的分发应用的方法的示意图;3 is a schematic diagram of a method for distributing an application provided by an embodiment of the present application;
图4为本申请实施例所提供的分发应用的方法中用户设备对目标应用进行校验的示意图;4 is a schematic diagram of a user equipment verifying a target application in the method for distributing an application provided by an embodiment of the present application;
图5为本申请实施例所提供的分发应用的系统的示意图;5 is a schematic diagram of a system for distributing applications provided by an embodiment of the present application;
图6为本申请实施例所提供的电子设备的示意图;6 is a schematic diagram of an electronic device provided by an embodiment of the present application;
图7为本申请实施例所提供的应用证书服务器的示意图;7 is a schematic diagram of an application certificate server provided by an embodiment of the present application;
图8为本申请实施例所提供的应用分发服务器的示意图;8 is a schematic diagram of an application distribution server provided by an embodiment of the present application;
图9为本申请实施例所提供的应用开发者设备的示意图;FIG. 9 is a schematic diagram of an application developer device provided by an embodiment of the present application;
图10为本申请实施例所提供的用户设备的示意图。FIG. 10 is a schematic diagram of a user equipment provided by an embodiment of the present application.
具体实施方式Detailed ways
本发明实施例提供分发应用的方法,用于解决应用分发过程中由于应用包名重复而导致的包名冲突问题。The embodiments of the present invention provide a method for distributing applications, which is used to solve the problem of package name conflict caused by repeated application package names in the process of application distribution.
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only The embodiments are part of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to Describe a particular order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
当前,在一些操作系统中,使用应用的包名PackageName作为应用的唯一标识,在安装、升级、运行应用时,相同包名的应用会被识别为相同应用。Currently, in some operating systems, the package name of the application is used as the unique identifier of the application, and when the application is installed, upgraded, or run, the application with the same package name will be recognized as the same application.
一些系统基于开放性的考虑,支持从多方市场/渠道(例如浏览器、应用内安装)安装应用,不同开发者在不同渠道分发的不同应用,包名无法保证全局唯一,便会诱发诸多的包名冲突问题,这影响了应用在系统中的正常工作,同时对开发者的体验较差。Based on the consideration of openness, some systems support the installation of applications from multiple markets/channels (such as browsers, in-app installations). For different applications distributed by different developers in different channels, the package name cannot be guaranteed to be globally unique, which will induce many packages. Name conflict problem, which affects the normal work of the application in the system, and the developer experience is poor.
例如,图1所示,应用A(101)的包名为“com.123”,被开发者A上传到应用市场A(102),终端设备105通过应用市场A(102)将该应用A(101)下载并安装到本地系统中。应用B(103)的包名同样为“com.123”,被开发者B上传到应用市场B(104),终端设备105通过应用市场B(104)将该应用B(103)下载下载到本地系统中,在安装过程中,用于应用B(103)与已安装的应用A(101)的包名同样为“com.123”,发生了包名冲突,此时应用B(103)无法在终端的本地系统中安装。For example, as shown in FIG. 1, the package name of application A (101) is “com.123”, which is uploaded by developer A to application market A (102), and the terminal device 105 uses application market A (102) to upload the application A (102). 101) Download and install into the local system. The package name of the application B (103) is also "com.123", which is uploaded to the application market B (104) by the developer B, and the terminal device 105 downloads the application B (103) to the local through the application market B (104). In the system, during the installation process, the package names used for application B (103) and the installed application A (101) are also "com.123", and a package name conflict occurs. Install on the local system of the terminal.
为此,当前应用标识普遍采用“包名+签名证书”的方式,其中,签名证书为开发者在开发应用时通过私钥签名生成的证书。作为一种具体的实现,当需要在系统上安装一个应用时,需要将待安装应用的“包名+签名证书”与系统中已安装应用的“包名+签名证书”进行比对,会出现以下情况。For this reason, the current application identification generally adopts the method of "package name + signature certificate", wherein the signature certificate is a certificate generated by the developer through private key signature when developing the application. As a specific implementation, when an application needs to be installed on the system, it is necessary to compare the "package name + signature certificate" of the application to be installed with the "package name + signature certificate" of the installed application in the system, and an error message will appear. The following cases.
1.包名不同:将待安装应用识别为全新应用,应用可独立安装,与已安装应用不冲突,可同时存在。1. Different package names: Identify the application to be installed as a brand-new application, and the application can be installed independently, without conflict with the installed application, and can exist at the same time.
2.包名相同,按照以下方式对签名证书进行验证:2. The package names are the same, and the signing certificate is verified as follows:
1)签名证书一致:将当前待安装应用与当前系统中已安装的签名证书一致的应用识别为同一开发者开发的同一应用,当前待安装用于应用可对已安装应用执行覆盖/升级安装。1) Consistent signature certificate: Identify the application with the same signature certificate currently installed in the current system as the same application developed by the same developer. The application currently to be installed can perform overwrite/upgrade installation on the installed application.
2)签名证书不一致:将当前待安装应用识别为不同开发者开发的不同应用,应用不允许安装/升级,必须卸载旧应用后方可安装新应用。2) Inconsistent signature certificates: Identify the current application to be installed as a different application developed by different developers, the application is not allowed to be installed/upgraded, and the old application must be uninstalled before the new application can be installed.
依然以上述图1的例子进行说明,其中,应用A和应用B分别为不同开发者开发的应用,两个应用的包名均为“com.123”,但由于开发者A和开发者B的私钥不同,应用A和应用B的签名证书不同,则在安装应用B的过程中,系统验证发现应用B与应用A的签名证书不一致,此时,终端向用户展示如图2所示的界面,以通过提示框201提示用户,当前应用B与已安装旧版本应用A的签名不一致,需要卸载应用A之后才能安装应用B。The above example in Figure 1 is still used for description, in which, application A and application B are applications developed by different developers, and the package names of the two applications are both "com.123". If the private keys are different, and the signature certificates of application A and application B are different, during the process of installing application B, the system verifies that the signature certificates of application B and application A are inconsistent. At this time, the terminal displays the interface as shown in Figure 2 to the user. , to prompt the user through a prompt box 201 that the signature of the current application B is inconsistent with that of the installed old version of the application A, and the application B can be installed only after the application A is uninstalled.
然而在当前方案中,依然存在一些问题。开发者对同一应用更换签名证书后,系统会识别应用签名证书变更,不允许升级,依然会出现必须卸载旧版应用后才可安装新版应用。同时,如果开发者证书/私钥如果泄露,其他开发者可以使用泄露的证书/私钥对恶意应用(与被攻击应用同包名)进行签名,该恶意应用在系统上可以直接安装并覆盖掉原版应用。However, in the current scheme, there are still some problems. After the developer replaces the signing certificate for the same application, the system will recognize the change of the application signing certificate, and the upgrade is not allowed, and it will still appear that the old version of the application must be uninstalled before the new version of the application can be installed. At the same time, if the developer certificate/private key is leaked, other developers can use the leaked certificate/private key to sign a malicious application (with the same package name as the attacked application), and the malicious application can be directly installed and overwritten on the system. Original app.
上述问题都影响了应用标识的识别效率和安全性。The above problems all affect the identification efficiency and security of the application identification.
因此,为了解决此问题,本申请实施例提供一种分发应用的方法,通过服务器统一管控,向开发者分配用于与其他开发者区分的应用证书,解决包名重复而导致的包名冲突问题。为便于理解,以下结合附图,对本申请实施例所提供的方法进行详细说明。Therefore, in order to solve this problem, an embodiment of the present application provides a method for distributing applications, through unified management and control of the server, assigning application certificates to developers for distinguishing from other developers, and solving the problem of package name conflict caused by repeated package names . For ease of understanding, the methods provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
请参阅图3,图3为本申请实施例所提供分发应用的方法的示意图,如图3所示,本申请实施例所提供的分发应用的方法包括。Please refer to FIG. 3 , which is a schematic diagram of a method for distributing an application provided by an embodiment of the present application. As shown in FIG. 3 , the method for distributing an application provided by an embodiment of the present application includes.
301.应用开发者设备从应用证书服务器获取应用证书。301. The application developer device obtains the application certificate from the application certificate server.
本实施例中,应用开发者设备为应用开发者所在的终端,作为一种具体的实现,应用开发者设备上设置有为开发者提供的开发者平台,应用的开发者可在该开发平台上对应用进行开发。该应用证书服务器为用于对应用证书进行管理,该应用证书服务器为应用开发者设备生成的该应用证书,该应用证书中的主题(subject)包括内容提供商标识(content provider identity,CPID),该CPID为应用证书服务器向应用开发者设备分配的标识,用于对开发者进行标识。该CPID也可以称为开发者标识。在一种可能的实现方式中,CPID与开发者具有唯一的对应关系,以使得该开发者所开发的应用能够根据该应用证书的subject与其他开发者开发的应用相区分。In this embodiment, the application developer device is the terminal where the application developer is located. As a specific implementation, the application developer device is provided with a developer platform provided for the developer, and the application developer can use the development platform on the application developer device. Develop applications. The application certificate server is used to manage the application certificate, the application certificate server is the application certificate generated by the application developer device, and the subject (subject) in the application certificate includes a content provider identity (CPID), The CPID is an identifier allocated by the application certificate server to the device of the application developer, which is used to identify the developer. The CPID may also be referred to as a developer identifier. In a possible implementation manner, the CPID has a unique corresponding relationship with the developer, so that the application developed by the developer can be distinguished from the applications developed by other developers according to the subject of the application certificate.
进一步地,该应用证书中的subject还可以包括应用开发者设备的开发者所在的公司名称及开发者国家,可选地,还可以包括其他任何能够对开发者身份进行标识的信息,对此,本申请实施例并不进行限定。Further, the subject in the application certificate may also include the company name and the country of the developer where the developer of the application developer device is located, and optionally, may also include any other information that can identify the developer's identity. For this, The embodiments of the present application are not limited.
需要说明的是,作为另一种具体的实现,同一开发者可领取多个应用证书,该多个应用证书中包含的subject中可以至少有部分内容相同。例如,对开发者甲而言,在目标应用的开发阶段,需要领取目标应用的调试证书:应用证书A;在目标应用上线阶段,需要领取目标应用的商用证书:应用证书B;开发者甲还可能发生应用证书内容泄露的情况,例如应用证书B的内容发生泄露,此时开发者甲需要申请更换新的应用证书C。上述举例 中,同一开发者甲领取的多个应用证书A、应用证书B和应用证书C所分别包含的subject中,至少有部分内容相同,例如,三个应用证书的subject中CPID相同。可选地,三个应用证书所包含的subject中记录的全部内容均相同。It should be noted that, as another specific implementation, the same developer may obtain multiple application certificates, and at least some of the subjects included in the multiple application certificates may be the same. For example, for developer A, in the development stage of the target application, he needs to obtain the debugging certificate of the target application: application certificate A; in the online stage of the target application, he needs to obtain the commercial certificate of the target application: application certificate B; The content of the application certificate may be leaked. For example, the content of application certificate B is leaked. At this time, developer A needs to apply for a new application certificate C. In the above example, at least some of the subjects contained in the multiple application certificates A, B and C obtained by the same developer A have the same contents. For example, the CPIDs in the subjects of the three application certificates are the same. Optionally, all the contents recorded in the subject included in the three application certificates are the same.
作为一种具体的实现,开发者通过应用开发者设备向应用证书服务器发送请求,该请求用于申请应用证书,可选地,该请求中包括开发者的公司名称和开发者国家等信息,应用证书服务器对请求进行验证,例如公司名称和开发者国家的真实性进行审核,之后根据该请求分配CPID并生成应用证书,之后将该应用证书下发给应用开发者设备,从而实现了应用开发者设备对应用证书的获取。As a specific implementation, the developer sends a request to the application certificate server through the application developer device, and the request is used to apply for an application certificate. The certificate server verifies the request, such as the authenticity of the company name and the developer's country, then assigns a CPID and generates an application certificate according to the request, and then issues the application certificate to the application developer's device. The device obtains the application certificate.
作为一种可能的实现,应用证书的subject为应用证书服务器为应用开发者设备分配的能够与其他开发者相区分的内容,例如,应用证书的subject可以为全局唯一的。在一种可能的场景中,如有多台服务器均用于分发应用证书,则可以配置每台服务器所分发应用证书的字段范围不同,由此保证每台服务器在其管理域范围内分发的应用证书的CPID不同。或者,一台或多台服务器向终端分配的应用证书中的subject在一定地域范围内唯一,例如在中国大陆范围内应用证书的subject内容唯一。通过此种方式,后续应用市场在上架目标应用时,能够根据应用证书的subject对待上架的目标应用进行校验。相对于现有技术中用户通过私钥生成签名证书用于校验的方式,能够防止证书被伪造,提升了证书的安全性,同时,也提升了后续应用验证的安全性,不会出现签名证书产生的冲突问题。As a possible implementation, the subject of the application certificate is content allocated by the application certificate server to the device of the application developer that can be distinguished from other developers. For example, the subject of the application certificate may be globally unique. In a possible scenario, if multiple servers are used to distribute application certificates, you can configure the fields of application certificates distributed by each server to be different, thus ensuring that each server distributes applications within its management domain. The CPID of the certificate is different. Or, the subject in the application certificate allocated to the terminal by one or more servers is unique within a certain geographical scope, for example, the subject content of the application certificate is unique within the scope of mainland China. In this way, when the target application is listed on the subsequent application market, the target application to be listed can be verified according to the subject of the application certificate. Compared with the method in the prior art in which the user generates a signature certificate for verification through a private key, the certificate can be prevented from being forged, the security of the certificate is improved, and the security of subsequent application verification is also improved, and the signature certificate will not appear. resulting conflict.
302.应用开发者设备将应用证书添加到目标应用中。302. The application developer device adds the application certificate to the target application.
本实施例中,目标应用为开发者通过应用开发者设备上的开发者平台开发的应用,当目标应用开发完成时,应用开发者设备将应用证书打包添加到目标应用中,从而使得目标应用能够被应用证书中的subject所标识,在后续目标应用的安装过程中,目标应用能够根据该subject防止与其他应用发生冲突。In this embodiment, the target application is an application developed by the developer through the developer platform on the application developer device. When the development of the target application is completed, the application developer device packages the application certificate and adds it to the target application, so that the target application can It is identified by the subject in the application certificate. In the subsequent installation process of the target application, the target application can prevent conflicts with other applications according to the subject.
可选地,应用开发者设备还可以在目标应用中添加包名PackageName和开发者签名,该包名用于对目标应用的名称进行标识,从而在目标应用中形成“PackageName+subject”的标识方式,该开发者签名为开发者根据私钥生成的签名,在本申请实施例所提供的方案中,开发者签名可用于目标应用的完整性校验,以防止目标应用的安装包在数据传输过程中发生损坏的情况。Optionally, the application developer device may also add a package name PackageName and a developer signature to the target application, where the package name is used to identify the name of the target application, thereby forming an identification method of "PackageName+subject" in the target application. , the developer's signature is a signature generated by the developer according to the private key. In the solution provided by the embodiment of this application, the developer's signature can be used for the integrity check of the target application to prevent the installation package of the target application from being in the data transmission process. damage has occurred.
303.应用开发者设备将目标应用发送给应用分发服务器。303. The application developer device sends the target application to the application distribution server.
本实施例中,应用分发服务器用于对应用程序进行管理和分发,例如,应用分发服务器可以为提供应用市场业务的服务器,或者其他可供终端用户对应用进行下载的应用分发渠道,对此本申请实施例并不进行限定。以应用分发服务器为支持应用市场业务的服务器为例,应用开发者设备将目标应用发送给应用分发服务器,以使得目标应用可以在应用市场中上架,可供其他用户从该应用市场中下载该目标应用。In this embodiment, the application distribution server is used to manage and distribute application programs. For example, the application distribution server may be a server that provides application market services, or other application distribution channels that allow end users to download applications. The application examples are not limited. Taking the application distribution server as the server supporting the application market service as an example, the application developer device sends the target application to the application distribution server, so that the target application can be listed in the application market, and other users can download the target application from the application market. application.
304.应用分发服务器根据应用证书对目标应用进行校验。304. The application distribution server verifies the target application according to the application certificate.
本实施例中,应用证书中的subject是由应用证书服务器统一管控的内容,因此应用分发服务器中的应用市场能够通过应用证书服务器以根据该应用证书对目标应用进行校验,防止应用间发生冲突的情况。相比之下,在传统方案中,用于应用校验的签名证书由 用户自行生成,缺乏统一管控,因此无法证明签名证书的来源合法。In this embodiment, the subject in the application certificate is the content that is uniformly controlled by the application certificate server, so the application market in the application distribution server can use the application certificate server to verify the target application according to the application certificate to prevent conflicts between applications Case. In contrast, in the traditional scheme, the signature certificate used for application verification is generated by the user, which lacks unified management and control, so it is impossible to prove that the source of the signature certificate is legitimate.
可选地,具体的校验步骤可以通过以下步骤来进行。Optionally, the specific verification step can be performed through the following steps.
1.应用分发服务器获取第二应用证书的第二摘要和CPID。1. The application distribution server obtains the second digest and CPID of the second application certificate.
本实施例中,应用分发服务器从目标应用中获取的应用证书为第二应用证书,应用分发服务器根据第二应用证书中所记录的内容生成第二摘要,可选地,第二摘要可以是根据第二应用证书内容所生成的哈希值,应用证书中内容的变更会引起该哈希值的变更,因此第二摘要可以准确地表示当前第二应用证书所包含的内容。CPID为应用证书的subject中记录的内容,应用分发服务器可从第二应用证书的subject中获取到CPID。In this embodiment, the application certificate obtained by the application distribution server from the target application is the second application certificate, and the application distribution server generates a second digest according to the content recorded in the second application certificate. The hash value generated by the content of the second application certificate, the change of the content in the application certificate will cause the change of the hash value, so the second digest can accurately represent the content contained in the current second application certificate. The CPID is the content recorded in the subject of the application certificate, and the application distribution server may obtain the CPID from the subject of the second application certificate.
2.应用分发服务器向应用证书服务器发送第二摘要和CPID。2. The application distribution server sends the second digest and the CPID to the application certificate server.
本实施例中,应用证书服务器用于对应用证书进行管理,应用证书服务器中记录有向各个开发者分配的应用证书的信息,因此应用分发服务器将第二摘要发送给应用证书服务器,由应用证书服务器来执行对第二摘要的验证。In this embodiment, the application certificate server is used to manage the application certificate, and the application certificate server records the information of the application certificate distributed to each developer. Therefore, the application distribution server sends the second digest to the application certificate server, and the application certificate server sends the second digest to the application certificate server. The server performs the verification of the second digest.
可选地,应用分发服务器还可以从目标应用中获取开发者签名,该开发者签名为开发者根据私钥自行生成的签名,可以用于校验第二摘要的完整性。作为一种具体的实现,应用分发服务器将开发者签名一并发送给应用证书服务器,以使得服务器能够根据该开发者签名确定第二摘要是否被篡改。Optionally, the application distribution server may also obtain a developer signature from the target application, where the developer signature is a signature generated by the developer according to the private key, and can be used to verify the integrity of the second digest. As a specific implementation, the application distribution server sends the developer's signature to the application certificate server together, so that the server can determine whether the second digest has been tampered with according to the developer's signature.
需要说明的是,应用证书服务器与应用分发服务器可以为两个独立的服务器,也可以是同一服务器中两个不同的功能模块,对此本申请实施例并不进行限定。It should be noted that the application certificate server and the application distribution server may be two independent servers, or may be two different functional modules in the same server, which are not limited in this embodiment of the present application.
3.应用证书服务器根据第二摘要和CPID对目标应用的应用证书进行校验。3. The application certificate server verifies the application certificate of the target application according to the second digest and the CPID.
本实施例中,应用证书服务器是证书进行管理的模块,作为一种具体的实现,通过以下方式进行校验。In this embodiment, the application certificate server is a module for managing certificates. As a specific implementation, verification is performed in the following manner.
1)、应用证书服务器根据CPID从本地获取分配给对应开发者的第一应用证书。1) The application certificate server obtains locally the first application certificate assigned to the corresponding developer according to the CPID.
本实施例中,应用证书是由应用证书服务器生成并统一管控的,因此,应用证书服务器本地存储有每个CPID对应的应用证书,根据应用分发服务器发送的CPID,应用证书服务器可以查询到该CPID在本地对应的应用证书。In this embodiment, the application certificate is generated and controlled by the application certificate server. Therefore, the application certificate server locally stores the application certificate corresponding to each CPID. According to the CPID sent by the application distribution server, the application certificate server can query the CPID. The corresponding application certificate locally.
2)、应用证书服务器根据第一应用证书的内容生成第一摘要。2) The application certificate server generates a first digest according to the content of the first application certificate.
本实施例中,第一摘要为应用证书服务器根据存储在本地的第一应用证书所记录的内容生成的第一摘要,该摘要的生成方法与应用分发服务器根据第二应用证书中所记录的内容生成第二摘要的方法一致。In this embodiment, the first digest is the first digest generated by the application certificate server according to the content recorded in the locally stored first application certificate, and the method for generating the digest is the same as the application distribution server according to the content recorded in the second application certificate. The method for generating the second abstract is consistent.
3)、应用证书服务器比对第一摘要与第二摘要。3) The application certificate server compares the first digest with the second digest.
本实施例中,作为一种具体的实现,第二摘要和第一摘要可以分别哈希值,由于应用证书中内容的变化会引起哈希值的改变,因此,当第一摘要与第二摘要的哈希值一致时,应用证书服务器可以判定第一应用证书与第二应用证书匹配,即应用分发服务器一端应用证书的内容没有发生改变,从而校验通过。反之,若第一摘要与第二摘要的哈希值不一致,说明第一应用证书与第二应用证书不匹配,应用分发服务器所获取的应用证书发生了改变,校验失败。In this embodiment, as a specific implementation, the second digest and the first digest can have hash values respectively. Since the change of the content in the application certificate will cause the change of the hash value, when the first digest and the second digest When the hash values of the two are consistent, the application certificate server can determine that the first application certificate matches the second application certificate, that is, the content of the application certificate on the application distribution server side has not changed, so the verification is passed. Conversely, if the hash values of the first digest and the second digest are inconsistent, it means that the first application certificate does not match the second application certificate, the application certificate obtained by the application distribution server has changed, and the verification fails.
4.应用证书服务器将校验结果发送给应用分发服务器。4. The application certificate server sends the verification result to the application distribution server.
本实施例中,应用证书服务器将校验结果发送给应用分发服务器,以使得应用分发服务器知晓应用证书服务器对目标应用的校验情况。若校验结果为不通过,则应用分发服务器判定当前目标应用非法,不予上架,流程结束。若校验结果为通过,则应用分发服务器将目标应用上架。In this embodiment, the application certificate server sends the verification result to the application distribution server, so that the application distribution server knows the verification status of the target application by the application certificate server. If the verification result is not passed, the application distribution server determines that the current target application is illegal and does not put it on the shelf, and the process ends. If the verification result is passed, the application distribution server puts the target application on the shelf.
需要说明的是,上述步骤1至4所提供的方式是基于应用证书的摘要实现的校验,其优点在于传输数据量较小,应用分发服务器只需要向应用证书服务器发送摘要的内容即可校验应用证书是否匹配。可选地,应用分发服务器还可以向应用证书服务器发送应用证书的全部内容,以使得应用证书服务器可以将该应用证书与开发者存储在应用证书服务器本地的应用证书进行比对,从而执行更加精准的校验,例如应用证书的完整性校验,合法性校验和归属性校验。It should be noted that the methods provided in the above steps 1 to 4 are based on the verification of the digest of the application certificate. Verify that the app certificates match. Optionally, the application distribution server may also send the entire content of the application certificate to the application certificate server, so that the application certificate server can compare the application certificate with the application certificate stored by the developer locally in the application certificate server, so that the execution is more accurate. verification, such as integrity verification, validity verification and attribution verification of application certificates.
本实施例中,提供了对第二应用证书的两种校验方式,一种是通过发送应用证书的摘要实现校验,另一种是直接发送第二应用证书的全部内容实现校验,校验的结果是确定第一应用证书与第二应用证书是否匹配。可选地,“匹配”可以是通过以下方式实现:In this embodiment, two verification methods for the second application certificate are provided, one is to realize the verification by sending the digest of the application certificate, and the other is to directly send the entire content of the second application certificate to realize the verification. The result of the verification is to determine whether the first application certificate matches the second application certificate. Optionally, "matching" can be achieved by:
a.第一摘要与第二摘要完全相同或部分相同。a. The first abstract is identical or partially identical to the second abstract.
b.第一哈希值与第二哈希值完全相同或部分相同。b. The first hash value is identical or partially identical to the second hash value.
c.第一应用证书与第二应用证书中所记录的内容完全相同或部分相同。c. The contents recorded in the first application certificate and the second application certificate are completely or partially the same.
由此可知,在上述步骤304的校验过程中,应用证书服务器判定满足上述a至c任意一种条件,即可判定校验通过,并向应用分发服务器发送校验通过结果。It can be seen that, in the verification process of the above step 304, the application certificate server determines that any one of the above conditions a to c is satisfied, and can determine that the verification is passed, and sends the verification pass result to the application distribution server.
本实施例中,由于应用证书中的subject为应用证书服务器统一管控的内容,因此在应用分发服务器(即应用市场)一端即可通过与应用证书服务器的交互实现对应用证书的校验,从而防止应用之间发生冲突的情况。In this embodiment, since the subject in the application certificate is the content uniformly managed and controlled by the application certificate server, the application certificate can be verified at the application distribution server (ie, the application market) side through interaction with the application certificate server, thereby preventing Conflicts between apps.
需要说明的是,由于上述校验步骤是通过应用证书来执行的,作为一种具体的实现,若开发者根据需要,更换了目标应用中的开发者签名信息,例如,开发者由于执行应用签名的私钥泄露而更改开发者签名,该操作并不会对校验产生影响,即,应用分发服务器不会因为开发者更换了开发者签名而影响校验结果,这提升了方案的稳定性,只要保持所分配的应用证书中subject的内容不变,“PackageName+subject”的标识方式就不会发生改变,从而应用证书不会对应用的标识产生影响,在开发者换证的情况下不影响验证,仍然可以保证应用安装/升级的正常进行。It should be noted that since the above verification steps are performed through the application certificate, as a specific implementation, if the developer replaces the developer signature information in the target application as required, for example, the developer executes the application signature due to If the private key is leaked and the developer's signature is changed, this operation will not affect the verification, that is, the application distribution server will not affect the verification result because the developer changes the developer's signature, which improves the stability of the scheme. As long as the content of the subject in the assigned application certificate remains unchanged, the identification method of "PackageName+subject" will not change, so the application certificate will not affect the identification of the application, and it will not affect the developer's certificate change. Verify that the application installation/upgrade can still be carried out normally.
进一步地,当应用分发服务器对目标应用的校验结果为通过时,执行后续步骤。Further, when the verification result of the application distribution server on the target application is passed, the subsequent steps are performed.
305.应用分发服务器开放目标应用的下载权限。305. The application distribution server opens the download permission of the target application.
本实施例中,当应用分发服务器对目标应用校验通过时,说明目标应用为合法应用,且不与在先的应用发生冲突,此时该目标应用为可供其他终端下载的应用。例如,应用分发服务器为应用市场,则本步骤的具体实现方式为:应用市场将目标应用上架,上架后的应用可供各终端查询和下载。In this embodiment, when the application distribution server passes the verification of the target application, it indicates that the target application is a legitimate application and does not conflict with the previous application, and at this time, the target application is an application that can be downloaded by other terminals. For example, if the application distribution server is an application market, the specific implementation method of this step is: the application market puts the target application on the shelf, and the application after the shelf can be queried and downloaded by each terminal.
需要说明的是,上述应用分发服务器只是代表其中一个应用市场所在的服务器,作为一种具体的实现,还可以有多个应用分发服务器,每个服务器分别对应不同的应用市场或应用分发渠道,其中,每个服务器的具体工作方式可以与应用分发服务器相同,因此本申 请实施例不再赘述。It should be noted that the above application distribution server only represents the server where one of the application markets is located. As a specific implementation, there may also be multiple application distribution servers, and each server corresponds to a different application market or application distribution channel. , and the specific working mode of each server may be the same as that of the application distribution server, so the embodiments of the present application will not repeat them.
306.用户设备从应用分发服务器获取目标应用。306. The user equipment acquires the target application from the application distribution server.
本实施例中,用户设备为需要下载和安装目标应用的任意终端,例如,应用分发服务器为支持应用市场业务的服务器,则用户设备为访问应用市场的普通用户所在的终端。作为一种具体的实现,该目标应用以安装包的形式被用户设备从应用市场(应用分发服务器)下载到用户设备本地,该目标应用的安装包内包括目标应用的包名、应用证书和开发者签名。In this embodiment, the user equipment is any terminal that needs to download and install the target application. For example, the application distribution server is a server supporting the application market service, and the user equipment is the terminal of the common user accessing the application market. As a specific implementation, the target application is downloaded by the user equipment from the application market (application distribution server) to the local user equipment in the form of an installation package, and the installation package of the target application includes the package name of the target application, the application certificate and the development signature.
307.用户设备对目标应用进行校验。307. The user equipment verifies the target application.
本实施例中,当用户设备将目标应用下载到本地后,在安装该目标应用前需要对该目标应用进行校验,以确定当前目标应用是一个全新的应用,还是本地应用的一个升级包,具体地,请参阅图4,图4示出了用户设备对目标应用进行校验的一种实现方式,如图4所示,用户设备的校验步骤可以按照以下方式进行。In this embodiment, after the user equipment downloads the target application locally, it needs to verify the target application before installing the target application to determine whether the current target application is a brand-new application or an upgrade package of the local application, Specifically, please refer to FIG. 4 , which shows an implementation manner in which the user equipment verifies the target application. As shown in FIG. 4 , the verification step of the user equipment may be performed in the following manner.
401.用户设备获取目标应用的应用证书。401. The user equipment obtains the application certificate of the target application.
本实施例中,目标应用中的应用证书为前述步骤中添加到目标应用中的证书,当用户设备从目标应用中获取到应用证书时,进一步执行后续步骤。In this embodiment, the application certificate in the target application is the certificate added to the target application in the preceding steps. When the user equipment obtains the application certificate from the target application, the following steps are further performed.
402.用户设备判断目标应用的包名是否与本地应用的包名重复。402. The user equipment determines whether the package name of the target application duplicates the package name of the local application.
本实施例中,由于目标应用的应用证书中携带了由应用证书服务器统一管控的,能够与其他开发者相区分的subject,因此在应用分发服务器(应用市场)一侧,应用分发服务器已经对目标应用进行过校验,当用户设备将目标应用从应用市场下载到本地后,在校验时若判断目标应用的包名PackageName与本地应用的包名PackageName’不重复,则用户设备可以直接将当前目标应用判定为全新应用,校验通过。若目标应用的包名与用户设备本地已安装应用的包名重复,则进一步执行后续步骤。In this embodiment, since the application certificate of the target application carries a subject that is uniformly managed and controlled by the application certificate server and can be distinguished from other developers, on the application distribution server (application market) side, the application distribution server has The application has been verified. After the user device downloads the target application from the application market to the local, if it is determined during verification that the package name of the target application and the package name of the local application are not identical, the user device can directly transfer the current The target application is judged to be a brand new application, and the verification is passed. If the package name of the target application is the same as the package name of the application installed locally on the user equipment, further perform subsequent steps.
403.用户设备判断目标应用的应用证书是否与本地应用的应用证书一致。403. The user equipment determines whether the application certificate of the target application is consistent with the application certificate of the local application.
本实施例中,若目标应用的应用证书中的subject与本地已安装的第一本地应用的应用证书中的subject一致,则用户设备可以判断,当前目标应用为第一本地应用的升级包,校验通过。若目标应用的应用证书所包含的subject与本地已安装所有应用的应用证书中的subject’都不一致,此时用户设备判断目标应用为全新的应用,校验通过。In this embodiment, if the subject in the application certificate of the target application is consistent with the subject in the application certificate of the first local application installed locally, the user equipment can determine that the current target application is an upgrade package of the first local application, and the Pass the test. If the subject contained in the application certificate of the target application is inconsistent with the subject' in the application certificates of all the locally installed applications, the user equipment determines that the target application is a brand-new application, and the verification passes.
本实施例中,通过上述步骤401至403,用户设备对目标应用进行了校验,由于目标应用中的应用证书携带了由应用证书服务器统一管控的subject,避免了开放性系统中,由于应用包名重复而造成的安装冲突,同时保证了应用校验的安全性和准确性。In this embodiment, through the above steps 401 to 403, the user equipment verifies the target application. Since the application certificate in the target application carries the subject that is uniformly managed and controlled by the application certificate server, it is avoided that in an open system, due to the application package Installation conflicts caused by duplicate names, while ensuring the security and accuracy of application verification.
进一步地,当用户设备对目标应用校验通过时,执行以下步骤。Further, when the user equipment passes the verification of the target application, the following steps are performed.
308.用户设备将目标应用安装在本地。308. The user equipment installs the target application locally.
本实施例中,根据校验结果,若用户设备判断目标应用为全新应用,则直接将该目标应用安装在本地系统中。若用户设备判断目标应用为已经安装在本地的第一本地应用的升级包,则根据目标应用对第一应用进行升级或覆盖安装。In this embodiment, according to the verification result, if the user equipment determines that the target application is a brand-new application, the target application is directly installed in the local system. If the user equipment determines that the target application is an upgrade package of the first local application that has been installed locally, the first application is upgraded or over-installed according to the target application.
需要说明的是,上述工作过程中,用户设备在对下载到本地的应用进行校验时,若没有从应用中获取到应用证书,则说明当前应用没有执行本申请所提供的分发应用的方法, 可以直接判定该应用为非法应用,校验失败。It should be noted that, in the above working process, if the user equipment does not obtain the application certificate from the application when verifying the application downloaded to the local, it means that the current application does not execute the method for distributing the application provided by this application. It can be directly determined that the application is an illegal application, and the verification fails.
本实施例中,应用开发者设备从应用证书服务器获取的应用证书中包含由应用证书服务器统一管控的subject,将应用证书和包名PackageName打包入目标应用后,将目标应用上传至应用分发服务器,应用分发服务器根据应用证书中的subject和包名PackageName对目标应用校验通过后上架开放下载,用户设备从应用分发服务器下载目标应用后,通过应用证书的subject和包名PackageName在本地对目标应用进行验证。由于应用证书的subject为应用证书服务器统一管控的、用于区分开发者的内容,因此避免了由于包名相同而产生的应用间安装冲突的情况。杜绝了不同开发者同包名的问题,有效解决多应用分发渠道下的应用标识冲突问题。同时,应用证书由应用证书服务器统一管控的机制可以保证应用证书来源合法以及格式统一,为应用标识中引入开发者身份信息提供基础。在获得应用证书的前提下,开发者可通过不同的渠道分发应用,各分发渠道的服务器可通过应用证书服务器统一管控的subject对待上架的应用程序进行校验。在保证系统应用生态得到统一管控的情况下兼顾了系统的开放性。In this embodiment, the application certificate obtained by the application developer device from the application certificate server includes the subject that is uniformly managed and controlled by the application certificate server. After the application certificate and the package name PackageName are packaged into the target application, the target application is uploaded to the application distribution server. The application distribution server verifies the target application according to the subject and the package name in the application certificate, and then the target application is open for download. verify. Since the subject of the application certificate is the content uniformly managed and controlled by the application certificate server and used to distinguish developers, the situation of installation conflicts between applications caused by the same package name is avoided. It eliminates the problem of different developers with the same package name, and effectively solves the problem of application identification conflicts under multiple application distribution channels. At the same time, the mechanism that the application certificate is uniformly managed and controlled by the application certificate server can ensure that the source of the application certificate is legal and the format is uniform, and provide a basis for introducing developer identity information into the application identification. On the premise of obtaining the application certificate, the developer can distribute the application through different channels, and the server of each distribution channel can verify the application to be put on the shelf through the subject uniformly controlled by the application certificate server. The openness of the system is taken into account while ensuring that the application ecology of the system is uniformly managed and controlled.
为便于理解,以下列举一个例子,对本申请实施例所提供的分发应用的方法进行说明。For ease of understanding, an example is given below to describe the method for distributing applications provided by the embodiments of the present application.
在上述步骤301中,开发者通过应用开发者设备向应用证书服务器申请应用证书,该应用证书中的subject由应用证书服务器按照固定格式生成,例如,该应用开发者设备的CPID为98789479145275401,开发者所在公司为北京xx有限公司,开发者所在国家为中国CN,则应用证书中的subject采取以下格式。In the above step 301, the developer applies to the application certificate server for an application certificate through the application developer device, and the subject in the application certificate is generated by the application certificate server in a fixed format. For example, the CPID of the application developer device is 98789479145275401, If the company is Beijing xx Co., Ltd. and the country where the developer is located is China CN, the subject in the application certificate adopts the following format.
subject=(O=北京xx有限公司,OU=98789479145275401,C=CN)subject=(O=Beijing xx Co., Ltd., OU=98789479145275401, C=CN)
该软件的名称为“第一应用”,软件的包名PackageName为如下格式。The name of the software is "First Application", and the package name of the software, PackageName, is in the following format.
packagename=(com.123.example.video)packagename=(com.123.example.video)
开发者通过私钥对“第一应用”应用进行签名,从而在“第一应用”应用中得到开发者签名。The developer signs the "first application" application through the private key, thereby obtaining the developer's signature in the "first application" application.
最终,开发者通过应用开发者设备对“第一应用”应用进行打包,打包后的“第一应用”应用包括上述packagename,subject以及开发者签名。Finally, the developer packages the "first application" application through the application developer device, and the packaged "first application" application includes the aforementioned packagename, subject, and the developer's signature.
应用开发者设备将打包完成后的“第一应用”应用上传至“A应用市场”,该“A应用市场”为运行在应用分发服务器上的应用市场。The application developer device uploads the packaged "first application" application to the "A application market", which is an application market running on the application distribution server.
“A应用市场”获取到“第一应用”应用后,按照上述304记载的相关步骤对“第一应用”应用进行校验。After obtaining the "first application" application, the "A application market" verifies the "first application" application according to the relevant steps described in 304 above.
校验通过后,“A应用市场”将“第一应用”应用上架,用户设备,例如用户手机可通过“A应用市场”将“第一应用”应用下载到用户设备本地,之后,用户手机需要对“第一应用”应用执行以下校验步骤。After the verification is passed, "App Market A" will put the "First App" application on the shelves, and the user device, such as the user's mobile phone, can download the "First App" application to the local user device through "App Market A". Perform the following verification steps for the "first application" application.
1).“第一应用”安装时,用户手机安装器模块提取应用中的应用证书进行验证:1). When the "first application" is installed, the user's mobile phone installer module extracts the application certificate in the application for verification:
a).如果提取不到应用证书,则识别为非法应用,禁止安装,流程结束。a). If the application certificate cannot be extracted, it is identified as an illegal application, installation is prohibited, and the process ends.
b).如果可以正常提取到,则进入后续流程。b). If it can be extracted normally, enter the subsequent process.
2).用户手机安装器模块提取“第一应用”的PackageName=(com.123.example.video),将其与已安装应用的PackageName进行比较:2). The user's mobile phone installer module extracts the PackageName=(com.123.example.video) of the "first application", and compares it with the PackageName of the installed application:
a).如果与已安装应用的包名不重复,则识别“第一应用”为全新应用,此时执行全新安装,流程结束。a). If the package name of the installed application does not overlap, the "first application" is identified as a brand-new application, and a brand-new installation is performed at this time, and the process ends.
b).如果与已安装应用包名重复,则进入后续流程。b). If it is the same as the package name of the installed application, enter the subsequent process.
3).用户手机安装器模块提取“第一应用”应用中的应用证书的subject=(O=北京xx有限公司,OU=98789479145275401,C=CN),判断其与重包名应用的开发者证书subject是否一致:3). The user's mobile phone installer module extracts the subject=(O=Beijing xx Co., Ltd., OU=98789479145275401, C=CN) of the application certificate in the "First Application" application, and judges it and the developer certificate of the repackaged application Is the subject consistent:
a).如果应用证书中的subject一致,例如已安装的重包名应用是“第一应用”的低版本,此时将两款应用识别为相同应用,执行升级/覆盖安装,流程结束。a). If the subject in the application certificate is the same, for example, the installed application with the repackage name is a lower version of the "first application", at this time, the two applications are identified as the same application, and the upgrade/overwrite installation is performed, and the process ends.
b).如果应用证书中的subject不一致,例如,“第一应用”的包名PackageName=(com.123.example.video)与已安装在用户手机本地的“第二应用”的包名PackageName=(com.123.example.video)相同,产生了重复,但“第二应用”的应用证书subject=(O=上海xx有限公司,OU=98789479111111111,C=CN),与“第一应用”的应用证书subject=(O=北京xx有限公司,OU=98789479145275401,C=CN)不同,此时将两款应用识别为不同开发者提供的不同应用,执行全新安装,两款应用可以同时存在,不会覆盖,流程结束。b). If the subjects in the application certificate are inconsistent, for example, the package name of the "first application" PackageName=(com.123.example.video) and the package name of the "second application" installed locally on the user's mobile phone PackageName= (com.123.example.video) is the same, resulting in duplication, but the application certificate of the "second application" subject=(O=Shanghai xx Co., Ltd., OU=98789479111111111, C=CN), which is the same as that of the "first application" The application certificate subject=(O=Beijing xx Co., Ltd., OU=98789479145275401, C=CN) is different. At this time, the two applications are identified as different applications provided by different developers, and a new installation is performed. The two applications can exist at the same time, not will be overwritten and the process will end.
本实施例中,通过上述方法,“第二应用”和“第一应用”原本为具有同样包名的应用,但由于应用证书中subject不同,使得用户手机在安装的过程中可以对两个应用进行区分,避免了因包名相同而产生的安装冲突的问题。同时,由于“第一应用”应用的应用证书中subject为应用证书服务器统一管控的,使得应用市场“A应用市场”可以根据应用证书中的subject对“第一应用”校验,从而使得应用市场能够对上架的应用进行校验,在保障系统开放度的同时,确保了应用市场中应用的安全性。In this embodiment, through the above method, the "second application" and the "first application" are originally applications with the same package name, but because the subjects in the application certificates are different, the user's mobile phone can access the two applications during the installation process. To distinguish, to avoid the installation conflict caused by the same package name. At the same time, since the subject in the application certificate of the "first application" application is uniformly managed and controlled by the application certificate server, the application market "A application market" can verify the "first application" according to the subject in the application certificate, so that the application market It can verify the applications listed on the shelves, which ensures the security of applications in the application market while ensuring the openness of the system.
进一步地,基于本申请实施例所提供所得分发应用的方法,本申请实施例进一步提供一种操作系统,该操作系统支持第三方应用市场,在多方应用市场分布式分发场景下,解决包名冲突以及应用身份仿冒等问题。为便于理解,以下结合附图对本申请实施例所提供的系统进行详细说明。Further, based on the method for distributing applications provided by the embodiments of the present application, the embodiments of the present application further provide an operating system, the operating system supports a third-party application market, and resolves package name conflicts in a multi-party application market distributed distribution scenario. And problems such as application identity spoofing. For ease of understanding, the system provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
请参阅图5,如图5所示,本申请实施例所提供的操作系统包括。Please refer to FIG. 5. As shown in FIG. 5, the operating system provided by the embodiment of the present application includes.
应用开发者设备501,应用开发者设备501即为上述的应用开发者设备,具体可参阅前述记载,此处不再赘述。The application developer device 501 is the above-mentioned application developer device. For details, please refer to the foregoing description, which will not be repeated here.
证书管理模块502,其中,该证书管理模块502运行在上述应用证书服务器中,该证书管理模块502具体包括证书管理单元5021和证书验证单元5022,其中,证书管理单元5021用于根据应用开发者设备501的申请向应用开发者设备分配应用证书506,该应用证书506中包含由证书管理单元5021生成的,全局唯一的subject。具体实现方式可参阅上述步骤301,此处不再赘述。The certificate management module 502, wherein the certificate management module 502 runs in the above-mentioned application certificate server, and the certificate management module 502 specifically includes a certificate management unit 5021 and a certificate verification unit 5022, wherein the certificate management unit 5021 is used according to the application developer device. The application of 501 allocates an application certificate 506 to the application developer device, and the application certificate 506 contains a globally unique subject generated by the certificate management unit 5021 . For a specific implementation manner, reference may be made to the foregoing step 301, which will not be repeated here.
进一步地,该证书验证单元5022用于根据应用市场504的申请对应用的应用证书506进行校验,以验证应用证书506的完整性、合法性和归属性,具体可参阅上述步骤304的相关记载,此处不再赘述。Further, the certificate verification unit 5022 is used to verify the application certificate 506 of the application according to the application of the application market 504 to verify the integrity, legality and attribution of the application certificate 506. For details, please refer to the relevant records of the above step 304 , and will not be repeated here.
应用打包签名模块503,该应用打包签名模块503运行在应用开发者设备501上,用 于将应用开发者设备501从证书管理单元5021获取的应用证书506,以及应用的包名,开发者的公司名称以及开发者国家等信息,并将这些信息打包到开发者模块开发的目标应用507中,得到打包后的目标应用508。具体实现方式可参阅前述步骤302的记载,此处不再赘述。The application packaging and signing module 503, which runs on the application developer device 501, is used to obtain the application certificate 506 obtained by the application developer device 501 from the certificate management unit 5021, as well as the package name of the application, the developer's company Name and developer country and other information, and package these information into the target application 507 developed by the developer module to obtain the packaged target application 508 . For a specific implementation manner, reference may be made to the description of the foregoing step 302, which will not be repeated here.
应用市场504,本申请实施例中,应用市场504运行在应用分发服务器上,该应用市场504用于获取应用开发者设备501上传的、打包后的目标应用508,并通过证书验证单元5022对目标应用中的应用证书506进行验证,具体可参阅上述步骤304的相关记载,此处不再赘述。The application market 504, in the embodiment of this application, the application market 504 runs on the application distribution server, and the application market 504 is used to obtain the packaged target application 508 uploaded by the application developer device 501, and pass the certificate verification unit 5022 to the target application 508. The application certificate 506 in the application is verified. For details, please refer to the relevant records of the above-mentioned step 304, which will not be repeated here.
进一步地,上述运行在应用分发服务器上的应用市场504为应用市场A,由于本申请实施例所提供的系统支持第三方应用市场,则本系统中还可以包括应用市场B,应用市场C……应用市场N等多个应用市场。每个应用市场的工作方式均可参考上述记载,此处不再赘述。Further, the above-mentioned application market 504 running on the application distribution server is the application market A. Since the system provided by the embodiment of the present application supports the third-party application market, the system may also include the application market B, the application market C... Application Market N and many other application markets. The working methods of each application market can be referred to the above records, and will not be repeated here.
上述应用市场504在完成验证后,将验证后的目标应用509上架,供用户设备505下载。After the above-mentioned application market 504 completes the verification, the verified target application 509 is put on the shelf for the user equipment 505 to download.
用户设备505,该用户设备505为用户侧,通过应用市场504对目标应用进行下载的终端,用户设备505下载、验证及安装目标应用510的具体方式可参阅上述图3及图4的相关记载,此处不再赘述。 User equipment 505, the user equipment 505 is a terminal on the user side that downloads the target application through the application market 504. The specific method of the user equipment 505 downloading, verifying and installing the target application 510 can be referred to the relevant records of the above-mentioned FIG. 3 and FIG. 4 , It will not be repeated here.
本实施例所提供的操作系统,通过证书管理模块中的证书管理单元向开发者终端分配应用证书,该应用证书中包含全局唯一的subject,由开发者终端的应用打包签名模块将应用证书打包到开发好的目标应用中,并将该打包好的目标应用上传到应用市场,之后应用市场通过证书管理模块中的证书验证单元对目标应用的应用证书进行校验。从而开发者可通过不同的渠道分发应用,各分发渠道的服务器可通过应用证书中全局唯一的subject对待上架的应用程序进行校验,提升了系统的开放性,也保证了系统的纯净性。校验通过后,应用市场将该目标应用上架供用户设备下载,用户设备下载目标应用后通过目标应用的应用证书对目标应用进行验证,从而避免了由于包名相同导致的应用冲突。In the operating system provided by this embodiment, an application certificate is allocated to the developer terminal through the certificate management unit in the certificate management module, and the application certificate contains a globally unique subject, and the application certificate is packaged to the developer terminal by the application packaging and signing module of the developer terminal. In the developed target application, upload the packaged target application to the application market, and then the application market verifies the application certificate of the target application through the certificate verification unit in the certificate management module. Therefore, developers can distribute applications through different channels, and the servers of each distribution channel can verify the applications to be put on the shelves through the globally unique subject in the application certificate, which improves the openness of the system and ensures the purity of the system. After the verification is passed, the application market puts the target application on the shelf for the user equipment to download, and the user equipment verifies the target application through the application certificate of the target application after downloading the target application, thereby avoiding application conflicts caused by the same package name.
从硬件结构上来描述,上述方法可以由一个实体设备实现,也可以由多个实体设备共同实现,还可以是一个实体设备内的一个逻辑功能模块,本申请实施例对此不作具体限定。Described in terms of hardware structure, the above method may be implemented by one entity device, or jointly implemented by multiple entity devices, or may be a logic function module in one entity device, which is not specifically limited in this embodiment of the present application.
例如,上述方法可以通过图6中的电子设备来实现。图6为本申请实施例提供的一种电子设备的硬件结构示意图;该电子设备可以是本发明实施例中的应用开发者设备、应用证书服务器、应用分发服务器或用户设备,该电子设备包括至少一个处理器601,通信线路602,存储器603以及至少一个通信接口604。For example, the above method can be implemented by the electronic device in FIG. 6 . 6 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application; the electronic device may be an application developer device, an application certificate server, an application distribution server, or a user device in an embodiment of the present invention, and the electronic device includes at least A processor 601 , communication lines 602 , memory 603 and at least one communication interface 604 .
处理器601可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,服务器IC),或一个或多个用于控制本申请方案程序执行的集成电路。The processor 601 can be a general-purpose central processing unit (central processing unit, CPU), a microprocessor, an application-specific integrated circuit (application-specific integrated circuit, server IC), or one or more programs used to control the program execution of the present application of integrated circuits.
通信线路602可包括一通路,在上述组件之间传送信息。Communication line 602 may include a path to communicate information between the aforementioned components.
通信接口604,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks, WLAN)等。 Communication interface 604, using any transceiver-like device, for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc. .
存储器603可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路602与处理器相连接。存储器也可以和处理器集成在一起。 Memory 603 may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of storage devices that can store information and instructions It can also be an electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being executed by a computer Access any other medium without limitation. The memory may exist independently and be connected to the processor through communication line 602 . The memory can also be integrated with the processor.
其中,存储器603用于存储执行本申请方案的计算机执行指令,并由处理器601来控制执行。处理器601用于执行存储器603中存储的计算机执行指令,从而实现本申请下述实施例提供的计费管理的方法。The memory 603 is used for storing computer-executed instructions for executing the solutions of the present application, and the execution is controlled by the processor 601 . The processor 601 is configured to execute the computer-executed instructions stored in the memory 603, thereby implementing the charging management method provided by the following embodiments of the present application.
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。Optionally, the computer-executed instructions in the embodiment of the present application may also be referred to as application code, which is not specifically limited in the embodiment of the present application.
在具体实现中,作为一种实施例,处理器601可以包括一个或多个CPU,例如图6中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 601 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 6 .
在具体实现中,作为一种实施例,电子设备可以包括多个处理器,例如图6中的处理器601和处理器607。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the electronic device may include multiple processors, for example, the processor 601 and the processor 607 in FIG. 6 . Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
在具体实现中,作为一种实施例,电子设备还可以包括输出设备605和输入设备606。输出设备605和处理器601通信,可以以多种方式来显示信息。例如,输出设备605可以是液晶显示器(liquid crystal display,LCD),发光二级管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备606和处理器601通信,可以以多种方式接收用户的输入。例如,输入设备606可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an embodiment, the electronic device may further include an output device 605 and an input device 606 . The output device 605 is in communication with the processor 601 and can display information in a variety of ways. For example, the output device 605 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector (projector) Wait. Input device 606 is in communication with processor 601 and can receive user input in a variety of ways. For example, the input device 606 may be a mouse, a keyboard, a touch screen device or a sensing device, or the like.
上述的电子设备可以是一个通用设备或者是一个专用设备。在具体实现中,电子设备可以服务器、无线终端设备、嵌入式设备或有图6中类似结构的设备。本申请实施例不限定电子设备的类型。The above-mentioned electronic device may be a general-purpose device or a special-purpose device. In a specific implementation, the electronic device may be a server, a wireless terminal device, an embedded device, or a device with a similar structure in FIG. 6 . The embodiments of the present application do not limit the type of the electronic device.
本申请实施例可以根据上述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the electronic device may be divided into functional units according to the foregoing method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and other division methods may be used in actual implementation.
比如,以采用集成的方式划分各个功能单元的情况下,图7示出了本申请实施例所提供的一种应用证书服务器的结构示意图。For example, when each functional unit is divided in an integrated manner, FIG. 7 shows a schematic structural diagram of an application certificate server provided by an embodiment of the present application.
请参阅图7,如图7所示,本申请实施例所提供的一种应用证书服务器包括。Please refer to FIG. 7. As shown in FIG. 7, an application certificate server provided by an embodiment of the present application includes.
发送单元701,用于向应用开发者设备发送第一应用证书,该第一应用证书用于标识应用开发者,该应用开发者设备用于将该第一应用证书加入待分发的应用中,以获得目标应用;A sending unit 701 is configured to send a first application certificate to an application developer device, where the first application certificate is used to identify the application developer, and the application developer device is used to add the first application certificate to the application to be distributed, to get the target application;
获取单元702,用于从应用分发服务器获取第二应用证书信息,该第二应用证书信息用于记录该应用开发者设备发送给该应用分发服务器的该目标应用中携带的第二应用证书的信息;Obtaining unit 702, configured to obtain second application certificate information from the application distribution server, where the second application certificate information is used to record the information of the second application certificate carried in the target application sent by the application developer device to the application distribution server ;
校验单元703,用于若该应用证书服务器根据该第二应用证书信息确认该第一应用证书与该第二应用证书匹配,使该发送单元701向该应用分发服务器发送校验通过结果。The verification unit 703 is configured to cause the sending unit 701 to send a verification pass result to the application distribution server if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information.
可选地,该获取单元702,还用于:从该应用开发者设备获取请求;Optionally, the obtaining unit 702 is further configured to: obtain a request from the application developer device;
还包括,执行单元704,该执行单元704用于根据该请求生成开发者标识,该开发者标识用于标识该应用开发者;Also includes, an execution unit 704, the execution unit 704 is configured to generate a developer identifier according to the request, and the developer identifier is used to identify the application developer;
该执行单元704,还用于生成该第一应用证书,该第一应用证书包括该开发者标识。The executing unit 704 is further configured to generate the first application certificate, where the first application certificate includes the developer identifier.
可选地,该请求包括该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息,则执行单元704,还用于:Optionally, if the request includes name information of the company where the application developer is located, and/or information about the country where the application developer is located, the execution unit 704 is further configured to:
根据该开发者标识,以及根据该应用开发者所在的公司名称信息和/或该应用开发者所在的国家信息生成该第一应用证书,该第一应用证书包括该开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个。The first application certificate is generated according to the developer identifier and the company name information where the application developer is located and/or the country information where the application developer is located, where the first application certificate includes the developer identifier and is related to the developer. One or more of the company name information or the country information associated with the person identification.
可选地,该获取单元702还用于:从该应用分发服务器获取该开发者标识和该第二应用证书的第二摘要;Optionally, the obtaining unit 702 is further configured to: obtain the developer identifier and the second digest of the second application certificate from the application distribution server;
该执行单元704还用于:根据该开发者标识从本地获取该第一应用证书的第一摘要;The executing unit 704 is further configured to: obtain the first digest of the first application certificate locally according to the developer identifier;
该校验单元703还用于:若根据该第一摘要和该第二摘要确定该第一应用证书与该第二应用证书匹配,使该发送单元701向该应用分发服务器发送该校验通过结果。The verification unit 703 is further configured to: if it is determined according to the first digest and the second digest that the first application certificate matches the second application certificate, make the sending unit 701 send the verification pass result to the application distribution server .
可选地,该第一摘要为该应用证书服务器根据该第一应用证书所记录内容生成的第一哈希值,该第二摘要为该应用分发服务器根据该第二应用证书所记录内容生成的第二哈希值;则该若该应用证书服务器根据该第二应用证书信息确认该第一应用证书与该第二应用证书匹配,该校验单元703,还用于:Optionally, the first digest is a first hash value generated by the application certificate server according to the recorded content of the first application certificate, and the second digest is generated by the application distribution server according to the recorded content of the second application certificate. second hash value; then if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the verification unit 703 is further configured to:
若判断该第一哈希值与该第二哈希值相同,使发送单元701向该应用分发服务器发送该校验通过结果。If it is determined that the first hash value is the same as the second hash value, the sending unit 701 sends the verification pass result to the application distribution server.
可选地,该获取单元702还用于:从该应用分发服务器获取该第二应用证书;Optionally, the obtaining unit 702 is further configured to: obtain the second application certificate from the application distribution server;
该执行单元704,还用于:从该第二应用证书中获取该开发者标识;The executing unit 704 is further configured to: obtain the developer identifier from the second application certificate;
该执行单元704,还用于:根据该开发者标识从本地获取该第一应用证书;The executing unit 704 is further configured to: obtain the first application certificate locally according to the developer identifier;
该校验单元703,还用于:若比对该第一应用证书与该第二应用证书的开发者标识相同,且该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息相同,使发送单元701向该应用分发服务器发送校验通过结果。The verification unit 703 is further configured to: compare the developer ID of the first application certificate and the second application certificate to be the same, and the company name information where the application developer is located, and/or, where the application developer is located The country information is the same, so that the sending unit 701 sends the verification result to the application distribution server.
请参阅图8,如图8所示,本申请实施例所提供的一种应用分发服务器包括。Please refer to FIG. 8. As shown in FIG. 8, an application distribution server provided by an embodiment of the present application includes.
获取单元801,用于从应用开发者设备获取目标应用;an obtaining unit 801, configured to obtain a target application from an application developer device;
执行单元802,用于从该目标应用中获取获取第二应用证书,该第二应用证书为应用证书服务器发送给该应用开发者设备,并由该应用开发者设备加入该目标应用的;an execution unit 802, configured to acquire a second application certificate from the target application, the second application certificate is sent by the application certificate server to the application developer device, and the application developer device joins the target application;
发送单元803,用于向该应用证书服务器发送该第二应用证书的第二应用证书信息,该第二应用证书信息用于记录该第二应用证书中的内容;A sending unit 803, configured to send the second application certificate information of the second application certificate to the application certificate server, where the second application certificate information is used to record the content in the second application certificate;
该执行单元802,还用于根据从该应用证书服务器获取到校验通过结果,允许该目标应用的分发,该校验通过结果用于指示该第二应用证书与该应用证书服务器为该应用开发者分发的第一应用证书匹配。The execution unit 802 is further configured to allow distribution of the target application according to the verification result obtained from the application certificate server, where the verification result is used to indicate that the second application certificate and the application certificate server are developed for the application The first application certificate distributed by the user matches.
可选地,该第二应用证书包括开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个,该开发者标识为该应用证书服务器分配的、用于标识该应用开发者的标识。Optionally, the second application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, and the developer identifier is allocated by the application certificate server. The ID used to identify the developer of this app.
可选地,该第二应用证书信息包括第二应用证书的第二摘要和该开发者标识,以使该应用证书服务器根据该开发者标识获取存储在本地的第一应用证书,并通过该第一应用证书的第一摘要和该第二摘要确定该第一应用证书与该第二应用证书匹配时发送该校验通过结果;则执行单元802还用于:Optionally, the second application certificate information includes the second digest of the second application certificate and the developer identifier, so that the application certificate server obtains the locally stored first application certificate according to the developer identifier, and passes the first application certificate through the first application certificate. When the first digest of an application certificate and the second digest determine that the first application certificate matches the second application certificate, send the verification pass result; then the execution unit 802 is further configured to:
根据该第二应用证书中记录的内容生成该第二摘要。The second digest is generated according to the content recorded in the second application certificate.
可选地,该第二摘要为哈希值,以使该应用证书服务器根据该第一应用证书生成的第一哈希值,在该第一哈希值和该第二哈希值相同时发送该校验通过结果;则该执行单元802,还用于:Optionally, the second digest is a hash value, so that the first hash value generated by the application certificate server according to the first application certificate is sent when the first hash value and the second hash value are the same The verification passes the result; then the execution unit 802 is also used for:
根据该第二应用证书中记录的内容生成第二哈希值。A second hash value is generated according to the content recorded in the second application certificate.
可选地,该发送单元803,还用于:Optionally, the sending unit 803 is further configured to:
向该应用证书服务器发送该第二应用证书,以使该应用证书服务器在比对该第一应用证书与该第二应用证书的开发者标识相同,且该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息相同时,向该应用分发服务器发送该校验通过结果。sending the second application certificate to the application certificate server, so that the application certificate server compares the first application certificate and the second application certificate with the same developer identification, and the company name information of the application developer, and /Or, when the information about the country where the application developer is located is the same, send the verification pass result to the application distribution server.
请参阅图9,如图9所示,本申请实施例所提供的一种应用开发者设备包括。Please refer to FIG. 9. As shown in FIG. 9, an application developer device provided by an embodiment of the present application includes.
获取单元901,用于从应用证书服务器获取第一应用证书,该第一应用证书用于标识应用开发者;an obtaining unit 901, configured to obtain a first application certificate from an application certificate server, where the first application certificate is used to identify the application developer;
执行单元902,用于将该第一应用证书添加到待分发的应用中,以获得目标应用;an executing unit 902, configured to add the first application certificate to the application to be distributed to obtain a target application;
发送单元903,用于向应用分发服务器发送该目标应用。The sending unit 903 is configured to send the target application to the application distribution server.
可选地,该发送单元903,还用于向该应用证书服务器发送请求,该请求用于请求获取该第一应用证书。Optionally, the sending unit 903 is further configured to send a request to the application certificate server, where the request is used to request to acquire the first application certificate.
可选地,该请求包括该应用开发者所在的公司名称信息,和/或,该应用开发者所在的国家信息。Optionally, the request includes information on the company name where the application developer is located, and/or information on the country where the application developer is located.
可选地,该第一应用证书包括开发者标识,以及与该开发者标识相关联的该公司名称信息或该国家信息中的一个或多个,其中,该开发者标识为该应用证书服务器分配的、用于标识该应用开发者的标识。Optionally, the first application certificate includes a developer identifier, and one or more of the company name information or the country information associated with the developer identifier, wherein the developer identifier is allocated by the application certificate server. , which is used to identify the developer of the application.
请参阅图10,如图10所示,本申请实施例所提供的一种用户设备包括。Please refer to FIG. 10. As shown in FIG. 10, a user equipment provided by an embodiment of the present application includes.
获取单元1001,用于从应用分发服务器获取目标应用,该目标应用为应用开发者设备 上传到该应用分发服务器的应用,该目标应用包括应用证书,该应用证书为应用证书服务器发送给该应用开发者设备的证书,以使该应用分发服务器通过该应用证书对该目标应用进行校验;Obtaining unit 1001, configured to obtain a target application from an application distribution server, where the target application is an application uploaded to the application distribution server by an application developer device, the target application includes an application certificate, and the application certificate is sent by the application certificate server to the application development server certificate of the target device, so that the application distribution server verifies the target application through the application certificate;
执行单元1002,用于当该目标应用的包名与该用户设备中第一本地应用的包名重复,且该目标应用的应用证书与该第一本地应用的应用证书匹配时,将该目标应用判定为该第一本地应用的升级包,以该目标应用对该第一本地应用进行升级或覆盖安装。Executing unit 1002, configured to execute the target application when the package name of the target application is repeated with the package name of the first local application in the user equipment, and the application certificate of the target application matches the application certificate of the first local application It is determined to be an upgrade package of the first local application, and the first local application is upgraded or over-installed with the target application.
可选地,该执行单元1002还用于:Optionally, the execution unit 1002 is also used for:
当该目标应用的包名与该用户设备中第一本地应用的包名重复,且该目标应用的应用证书与该第一本地应用的应用证书不匹配时,将该目标应用判定为新应用;When the package name of the target application duplicates the package name of the first local application in the user equipment, and the application certificate of the target application does not match the application certificate of the first local application, the target application is determined as a new application;
将该目标应用安装到本地系统中。Install the target application to the local system.
可选地,该执行单元1002还用于:Optionally, the execution unit 1002 is also used for:
当该目标应用的包名与该用户设备本地应用的包名不重复时,将该目标应用判定为新应用;When the package name of the target application does not overlap with the package name of the local application of the user equipment, the target application is determined as a new application;
将该目标应用安装到本地系统中。Install the target application to the local system.
本申请实施例还提供一种计算机可读存储介质,包括指令,当该指令在计算机设备上运行时,使得该计算机设备执行本申请实施例所提供的上述分发应用的方法。Embodiments of the present application further provide a computer-readable storage medium, including instructions, when the instructions are executed on a computer device, the computer device is made to execute the above-mentioned method for distributing an application provided by the embodiments of the present application.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product.
计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本发明实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present invention result in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center over a wire (e.g. coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) to another website site, computer, server, or data center. The computer-readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a server, a data center, etc. that includes one or more available media integrated. Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), among others.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的通信方法、中继设备、宿主基站及计算机存储介质,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed communication method, relay device, host base station, and computer storage medium may be implemented in other ways. For example, the apparatus embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件 可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(英文全称:Read-Only Memory,英文缩写:ROM)、随机存取存储器(英文全称:Random Access Memory,英文缩写:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (full English name: Read-Only Memory, English abbreviation: ROM), random access memory (English full name: Random Access Memory, English abbreviation: RAM), magnetic Various media that can store program codes, such as discs or optical discs.
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (27)

  1. 一种分发应用的方法,其特征在于,包括:A method for distributing applications, comprising:
    应用证书服务器向应用开发者设备发送第一应用证书,所述第一应用证书用于标识应用开发者,所述应用开发者设备用于将所述第一应用证书加入待分发的应用中,以获得目标应用;The application certificate server sends a first application certificate to the application developer device, where the first application certificate is used to identify the application developer, and the application developer device is used to add the first application certificate to the application to be distributed to get the target application;
    所述应用证书服务器从应用分发服务器获取第二应用证书信息,所述第二应用证书信息用于记录所述应用开发者设备发送给所述应用分发服务器的所述目标应用中携带的第二应用证书的信息;The application certificate server obtains second application certificate information from an application distribution server, where the second application certificate information is used to record the second application carried in the target application sent by the application developer device to the application distribution server information about the certificate;
    若所述应用证书服务器根据所述第二应用证书信息确认所述第一应用证书与所述第二应用证书匹配,所述应用证书服务器向所述应用分发服务器发送校验通过结果。If the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the application certificate server sends a verification result to the application distribution server.
  2. 根据权利要求1所述的方法,其特征在于,所述应用证书服务器向应用开发者设备发送第一应用证书之前,还包括:The method according to claim 1, wherein before the application certificate server sends the first application certificate to the application developer device, the method further comprises:
    所述应用证书服务器从所述应用开发者设备获取请求;obtaining, by the application certificate server, a request from the application developer device;
    所述应用证书服务器根据所述请求生成开发者标识,所述开发者标识用于标识所述应用开发者;The application certificate server generates a developer identifier according to the request, where the developer identifier is used to identify the application developer;
    所述应用证书服务器生成所述第一应用证书,所述第一应用证书包括所述开发者标识。The application certificate server generates the first application certificate, where the first application certificate includes the developer identifier.
  3. 根据权利要求2所述的方法,其特征在于,所述请求包括所述应用开发者所在的公司名称信息,和/或,所述应用开发者所在的国家信息,则所述应用证书服务器生成所述第一应用证书包括:The method according to claim 2, wherein the request includes the name information of the company where the application developer is located, and/or the information of the country where the application developer is located, and the application certificate server generates the information The first application certificate includes:
    所述应用证书服务器根据所述开发者标识,以及根据所述应用开发者所在的公司名称信息和/或所述应用开发者所在的国家信息生成所述第一应用证书,所述第一应用证书包括所述开发者标识,以及与所述开发者标识相关联的所述公司名称信息或所述国家信息中的一个或多个。The application certificate server generates the first application certificate according to the developer identifier, the company name information where the application developer is located and/or the country information where the application developer is located, and the first application certificate The developer identification is included, and one or more of the company name information or the country information associated with the developer identification.
  4. 根据权利要求2或3所述的方法,其特征在于,所述应用证书服务器从应用分发服务器获取第二应用证书信息,包括:The method according to claim 2 or 3, wherein the application certificate server obtains the second application certificate information from the application distribution server, comprising:
    所述应用证书服务器从所述应用分发服务器获取所述开发者标识和所述第二应用证书的第二摘要;The application certificate server obtains the developer identifier and the second digest of the second application certificate from the application distribution server;
    所述应用证书服务器从应用分发服务器获取第二应用证书信息之后,还包括:After the application certificate server obtains the second application certificate information from the application distribution server, the method further includes:
    所述应用证书服务器根据所述开发者标识从本地获取所述第一应用证书的第一摘要;obtaining, by the application certificate server, a first digest of the first application certificate locally according to the developer identifier;
    所述若所述应用证书服务器根据所述第二应用证书信息确认所述第一应用证书与所述第二应用证书匹配,所述应用证书服务器向所述应用分发服务器发送校验通过结果,包括:If the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the application certificate server sends a verification pass result to the application distribution server, including :
    若所述应用证书服务器根据所述第一摘要和所述第二摘要确定所述第一应用证书与所述第二应用证书匹配,所述应用证书服务器向所述应用分发服务器发送所述校验通过结果。If the application certificate server determines that the first application certificate matches the second application certificate according to the first digest and the second digest, the application certificate server sends the verification to the application distribution server through the results.
  5. 根据权利要求4所述的方法,其特征在于,所述第一摘要为所述应用证书服务器根据所述第一应用证书所记录内容生成的第一哈希值,所述第二摘要为所述应用分发服务器根据所述第二应用证书所记录内容生成的第二哈希值;则所述若所述应用证书服务器根据所述第二应用证书信息确认所述第一应用证书与所述第二应用证书匹配,所述应用证书服务器向所述应用分发服务器发送所述校验通过结果,包括:The method according to claim 4, wherein the first digest is a first hash value generated by the application certificate server according to the content recorded in the first application certificate, and the second digest is the a second hash value generated by the application distribution server according to the content recorded in the second application certificate; then the if the application certificate server confirms the first application certificate and the second application certificate according to the second application certificate information The application certificate matches, and the application certificate server sends the verification pass result to the application distribution server, including:
    若所述应用证书服务器判断所述第一哈希值与所述第二哈希值相同,所述应用证书服务器向所述应用分发服务器发送所述校验通过结果。If the application certificate server determines that the first hash value is the same as the second hash value, the application certificate server sends the verification pass result to the application distribution server.
  6. 根据权利要求3所述的方法,其特征在于,所述应用证书服务器从应用分发服务器获取第二应用证书信息,包括:The method according to claim 3, wherein the application certificate server obtains the second application certificate information from the application distribution server, comprising:
    所述应用证书服务器从所述应用分发服务器获取所述第二应用证书;obtaining, by the application certificate server, the second application certificate from the application distribution server;
    所述应用证书服务器从应用分发服务器获取第二应用证书信息之后,还包括:After the application certificate server obtains the second application certificate information from the application distribution server, the method further includes:
    所述应用证书服务器从所述第二应用证书中获取所述开发者标识;obtaining, by the application certificate server, the developer identifier from the second application certificate;
    所述应用证书服务器根据所述开发者标识从本地获取所述第一应用证书;obtaining, by the application certificate server, the first application certificate locally according to the developer identifier;
    所述若所述应用证书服务器根据所述第二应用证书信息确认所述第一应用证书与所述第二应用证书匹配,所述应用证书服务器向所述应用分发服务器发送校验通过结果,包括:If the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information, the application certificate server sends a verification pass result to the application distribution server, including :
    若所述应用证书服务器比对所述第一应用证书与所述第二应用证书的开发者标识相同,且所述应用开发者所在的公司名称信息,和/或,所述应用开发者所在的国家信息相同,所述应用证书服务器向所述应用分发服务器发送校验通过结果。If the application certificate server compares the developer ID of the first application certificate and the second application certificate to be the same, and the company name information of the application developer, and/or, the application developer is located in The country information is the same, and the application certificate server sends the verification result to the application distribution server.
  7. 一种分发应用的方法,其特征在于,包括:A method for distributing applications, comprising:
    应用分发服务器从应用开发者设备获取目标应用;The application distribution server obtains the target application from the application developer's device;
    所述应用分发服务器从所述目标应用中获取获取第二应用证书,所述第二应用证书为应用证书服务器发送给所述应用开发者设备,并由所述应用开发者设备加入所述目标应用的;The application distribution server acquires a second application certificate from the target application, the second application certificate is sent by the application certificate server to the application developer device, and the application developer device joins the target application of;
    所述应用分发服务器向所述应用证书服务器发送所述第二应用证书的第二应用证书信息,所述第二应用证书信息用于记录所述第二应用证书中的内容;sending, by the application distribution server, second application certificate information of the second application certificate to the application certificate server, where the second application certificate information is used to record content in the second application certificate;
    所述应用分发服务器根据从所述应用证书服务器获取到校验通过结果,允许所述目标应用的分发,所述校验通过结果用于指示所述第二应用证书与所述应用证书服务器为所述应用开发者分发的第一应用证书匹配。The application distribution server allows distribution of the target application according to the verification result obtained from the application certificate server, and the verification result is used to indicate that the second application certificate and the application certificate server are the same. match the first application certificate distributed by the application developer.
  8. 根据权利要求7所述的方法,其特征在于,所述第二应用证书包括开发者标识,以及与所述开发者标识相关联的所述公司名称信息或所述国家信息中的一个或多个,所述开发者标识为所述应用证书服务器分配的、用于标识所述应用开发者的标识。The method of claim 7, wherein the second application certificate includes a developer identification and one or more of the company name information or the country information associated with the developer identification , where the developer identifier is an identifier assigned by the application certificate server and used to identify the application developer.
  9. 根据权利要求8所述的方法,其特征在于,所述第二应用证书信息包括第二应用证书的第二摘要和所述开发者标识,以使所述应用证书服务器根据所述开发者标识获取存储 在本地的第一应用证书,并通过所述第一应用证书的第一摘要和所述第二摘要确定所述第一应用证书与所述第二应用证书匹配时发送所述校验通过结果;则所述应用分发服务器向所述应用证书服务器发送所述第二应用证书的第二应用证书信息之前,还包括:The method according to claim 8, wherein the second application certificate information comprises a second digest of the second application certificate and the developer identifier, so that the application certificate server obtains the developer identifier according to the The first application certificate stored locally, and the verification result is sent when it is determined that the first application certificate matches the second application certificate according to the first digest and the second digest of the first application certificate ; before the application distribution server sends the second application certificate information of the second application certificate to the application certificate server, the method further includes:
    所述应用分发服务器根据所述第二应用证书中记录的内容生成所述第二摘要。The application distribution server generates the second digest according to the content recorded in the second application certificate.
  10. 根据权利要求9所述的方法,其特征在于,所述第二摘要为哈希值,以使所述应用证书服务器根据所述第一应用证书生成的第一哈希值,在所述第一哈希值和所述第二哈希值相同时发送所述校验通过结果;则所述应用分发服务器根据所述第二应用证书中记录的内容生成所述第二摘要,包括:The method according to claim 9, wherein the second digest is a hash value, so that the first hash value generated by the application certificate server according to the first application certificate, in the first When the hash value is the same as the second hash value, the verification result is sent; then the application distribution server generates the second digest according to the content recorded in the second application certificate, including:
    所述应用分发服务器根据所述第二应用证书中记录的内容生成第二哈希值。The application distribution server generates a second hash value according to the content recorded in the second application certificate.
  11. 根据权利要求8所述的方法,其特征在于,所述应用分发服务器向所述应用证书服务器发送所述第二应用证书的第二应用证书信息,包括:The method according to claim 8, wherein the sending, by the application distribution server, the second application certificate information of the second application certificate to the application certificate server, comprises:
    所述应用分发服务器向所述应用证书服务器发送所述第二应用证书,以使所述应用证书服务器在比对所述第一应用证书与所述第二应用证书的开发者标识相同,且所述应用开发者所在的公司名称信息,和/或,所述应用开发者所在的国家信息相同时,向所述应用分发服务器发送所述校验通过结果。The application distribution server sends the second application certificate to the application certificate server, so that the application certificate server compares the first application certificate and the second application certificate with the same developer identifier, and all information about the company name where the application developer is located, and/or when the information about the country where the application developer is located is the same, send the verification pass result to the application distribution server.
  12. 一种分发应用的方法,其特征在于,包括:A method for distributing applications, comprising:
    应用开发者设备从应用证书服务器获取第一应用证书,所述第一应用证书用于标识应用开发者;The application developer device obtains a first application certificate from the application certificate server, where the first application certificate is used to identify the application developer;
    所述应用开发者设备将所述第一应用证书添加到待分发的应用中,以获得目标应用;The application developer device adds the first application certificate to the application to be distributed to obtain the target application;
    所述应用开发者设备向应用分发服务器发送所述目标应用。The application developer device sends the target application to an application distribution server.
  13. 根据权利要求12所述的方法,其特征在于,所述应用开发者设备从应用证书服务器获取第一应用证书之前,还包括:The method according to claim 12, wherein before the application developer device acquires the first application certificate from the application certificate server, the method further comprises:
    所述应用开发者设备向所述应用证书服务器发送请求,所述请求用于请求获取所述第一应用证书。The application developer device sends a request to the application certificate server, where the request is used for requesting to acquire the first application certificate.
  14. 根据权利要求12或13所述的方法,其特征在于,所述请求包括所述应用开发者所在的公司名称信息,和/或,所述应用开发者所在的国家信息。The method according to claim 12 or 13, wherein the request includes information on the company name where the application developer is located, and/or information on the country where the application developer is located.
  15. 根据权利要求14所述的方法,其特征在于,所述第一应用证书包括开发者标识,以及与所述开发者标识相关联的所述公司名称信息或所述国家信息中的一个或多个,其中,所述开发者标识为所述应用证书服务器分配的、用于标识所述应用开发者的标识。The method of claim 14, wherein the first application certificate includes a developer identification and one or more of the company name information or the country information associated with the developer identification , wherein the developer identifier is an identifier assigned by the application certificate server and used to identify the application developer.
  16. 一种分发应用的方法,其特征在于,包括:A method for distributing applications, comprising:
    用户设备从应用分发服务器获取目标应用,所述目标应用为应用开发者设备上传到所述应用分发服务器的应用,所述目标应用包括应用证书,所述应用证书为应用证书服务器发送给所述应用开发者设备的证书,以使所述应用分发服务器通过所述应用证书对所述目标应用进行校验;The user equipment obtains a target application from an application distribution server, the target application is an application uploaded to the application distribution server by an application developer device, and the target application includes an application certificate, and the application certificate is sent to the application by the application certificate server a certificate of the developer device, so that the application distribution server verifies the target application through the application certificate;
    当所述目标应用的包名与所述用户设备中第一本地应用的包名重复,且所述目标应用的应用证书与所述第一本地应用的应用证书匹配时,所述用户设备将所述目标应用判定为所述第一本地应用的升级包,以所述目标应用对所述第一本地应用进行升级或覆盖安装。When the package name of the target application is the same as the package name of the first local application in the user equipment, and the application certificate of the target application matches the application certificate of the first local application, the user equipment will The target application is determined to be an upgrade package of the first local application, and the first local application is upgraded or over-installed with the target application.
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:The method of claim 16, wherein the method further comprises:
    当所述目标应用的包名与所述用户设备中第一本地应用的包名重复,且所述目标应用的应用证书与所述第一本地应用的应用证书不匹配时,所述用户设备将所述目标应用判定为新应用;When the package name of the target application is the same as the package name of the first local application in the user equipment, and the application certificate of the target application does not match the application certificate of the first local application, the user equipment will The target application is determined to be a new application;
    所述用户设备将所述目标应用安装到本地系统中。The user equipment installs the target application into the local system.
  18. 根据权利要求16所述的方法,其特征在于,所述方法还包括:The method of claim 16, wherein the method further comprises:
    当所述目标应用的包名与所述用户设备本地应用的包名不重复时,所述用户设备将所述目标应用判定为新应用;When the package name of the target application does not overlap with the package name of the local application of the user equipment, the user equipment determines that the target application is a new application;
    所述用户设备将所述目标应用安装到本地系统中。The user equipment installs the target application into the local system.
  19. 一种分发应用的系统,其特征在于,包括:应用开发者设备和应用分发服务器,其中,A system for distributing applications, comprising: an application developer device and an application distribution server, wherein,
    所述应用开发者设备,用于将应用证书添加到待分发的应用中以获得目标应用,所述应用证书用于标识应用开发者;the application developer device, configured to add an application certificate to the application to be distributed to obtain a target application, where the application certificate is used to identify the application developer;
    所述应用分发服务器,用于从所述应用开发者设备获取所述目标应用,并根据所述应用证书校验所述目标应用;the application distribution server, configured to acquire the target application from the application developer device, and verify the target application according to the application certificate;
    所述应用分发服务器,还用于在所述校验通过时允许所述目标应用的分发。The application distribution server is further configured to allow distribution of the target application when the verification is passed.
  20. 根据权利要求19所述的系统,其特征在于,所述系统还包括应用证书服务器,其中,The system of claim 19, wherein the system further comprises an application certificate server, wherein:
    所述应用证书服务器,用于根据所述应用开发者设备的请求向所述应用开发者设备分配所述应用证书;the application certificate server, configured to allocate the application certificate to the application developer device according to the request of the application developer device;
    所述应用分发服务器,还用于从所述目标应用中获取所述应用证书,并将所述应用证书的应用证书信息发送给所述应用证书服务器;The application distribution server is further configured to obtain the application certificate from the target application, and send the application certificate information of the application certificate to the application certificate server;
    所述应用证书服务器,还用于比对所述应用分发服务器发送的所述应用证书信息与本地应用证书的应用证书信息,以判断所述应用分发服务器发送的所述应用证书是否与本地应用证书匹配,若匹配,向所述应用分发服务器发送校验通过结果;The application certificate server is further configured to compare the application certificate information sent by the application distribution server with the application certificate information of the local application certificate, to determine whether the application certificate sent by the application distribution server is the same as the local application certificate match, if it matches, send the verification pass result to the application distribution server;
    所述应用分发服务器,还用于在获取到所述校验通过结果时允许所述目标应用的分发。The application distribution server is further configured to allow distribution of the target application when the verification result is obtained.
  21. 根据权利要求19或20所述的系统,其特征在于,所述系统还包括用户设备,其中,The system according to claim 19 or 20, wherein the system further comprises user equipment, wherein:
    所述用户设备,用于获取所述应用分发服务器分发的所述目标应用,并根据所述目标应用的所述应用证书判断所述目标应用是全新应用还是本地应用的安装升级包。The user equipment is configured to acquire the target application distributed by the application distribution server, and determine whether the target application is a brand-new application or an installation upgrade package of a local application according to the application certificate of the target application.
  22. 一种应用证书服务器,其特征在于,包括:An application certificate server, characterized in that it includes:
    发送单元,用于向应用开发者设备发送第一应用证书,所述第一应用证书用于标识应用开发者,所述应用开发者设备用于将所述第一应用证书加入待分发的应用中,以获得目标应用;a sending unit, configured to send a first application certificate to an application developer device, where the first application certificate is used to identify the application developer, and the application developer device is configured to add the first application certificate to the application to be distributed , to obtain the target application;
    获取单元,用于从应用分发服务器获取第二应用证书信息,所述第二应用证书信息用于记录所述应用开发者设备发送给所述应用分发服务器的所述目标应用中携带的第二应用证书的信息;an obtaining unit, configured to obtain second application certificate information from an application distribution server, where the second application certificate information is used to record the second application carried in the target application sent by the application developer device to the application distribution server information about the certificate;
    校验单元,用于若所述应用证书服务器根据所述第二应用证书信息确认所述第一应用证书与所述第二应用证书匹配,使所述发送单元向所述应用分发服务器发送校验通过结果。a verification unit, configured to make the sending unit send a verification to the application distribution server if the application certificate server confirms that the first application certificate matches the second application certificate according to the second application certificate information through the results.
  23. 一种应用分发服务器,其特征在于,包括:An application distribution server, comprising:
    获取单元,用于从应用开发者设备获取目标应用;an acquisition unit, used to acquire the target application from the application developer's device;
    执行单元,用于从所述目标应用中获取获取第二应用证书,所述第二应用证书为应用证书服务器发送给所述应用开发者设备,并由所述应用开发者设备加入所述目标应用的;an execution unit, configured to acquire a second application certificate from the target application, where the second application certificate is sent by the application certificate server to the application developer device, and the application developer device joins the target application of;
    发送单元,用于向所述应用证书服务器发送所述第二应用证书的第二应用证书信息,所述第二应用证书信息用于记录所述第二应用证书中的内容;a sending unit, configured to send second application certificate information of the second application certificate to the application certificate server, where the second application certificate information is used to record content in the second application certificate;
    所述执行单元,还用于根据从所述应用证书服务器获取到校验通过结果,允许所述目标应用的分发,所述校验通过结果用于指示所述第二应用证书与所述应用证书服务器为所述应用开发者分发的第一应用证书匹配。The execution unit is further configured to allow distribution of the target application according to a verification pass result obtained from the application certificate server, where the verification pass result is used to indicate the second application certificate and the application certificate The server matches the first application certificate distributed by the application developer.
  24. 一种应用开发者设备,其特征在于,包括:An application developer device, characterized in that it includes:
    获取单元,用于从应用证书服务器获取第一应用证书,所述第一应用证书用于标识应用开发者;an obtaining unit, configured to obtain a first application certificate from an application certificate server, where the first application certificate is used to identify the application developer;
    执行单元,用于将所述第一应用证书添加到待分发的应用中,以获得目标应用;an execution unit, configured to add the first application certificate to the application to be distributed to obtain a target application;
    发送单元,用于向应用分发服务器发送所述目标应用。A sending unit, configured to send the target application to an application distribution server.
  25. 一种用户设备,其特征在于,包括:A user equipment, characterized in that it includes:
    获取单元,用于从应用分发服务器获取目标应用,所述目标应用为应用开发者设备上传到所述应用分发服务器的应用,所述目标应用包括应用证书,所述应用证书为应用证书服务器发送给所述应用开发者设备的证书,以使所述应用分发服务器通过所述应用证书对所述目标应用进行校验;An acquiring unit, configured to acquire a target application from an application distribution server, where the target application is an application uploaded by an application developer device to the application distribution server, the target application includes an application certificate, and the application certificate is sent by the application certificate server to the application distribution server. a certificate of the application developer device, so that the application distribution server verifies the target application through the application certificate;
    执行单元,用于当所述目标应用的包名与所述用户设备中第一本地应用的包名重复, 且所述目标应用的应用证书与所述第一本地应用的应用证书匹配时,将所述目标应用判定为所述第一本地应用的升级包,以所述目标应用对所述第一本地应用进行升级或覆盖安装。an execution unit, configured to: when the package name of the target application is the same as the package name of the first local application in the user equipment, and the application certificate of the target application matches the application certificate of the first local application, The target application is determined to be an upgrade package of the first local application, and the first local application is upgraded or over-installed with the target application.
  26. 一种电子设备,其特征在于,所述电子设备包括:交互装置、输入/输出(I/O)接口、处理器和存储器,所述存储器中存储有程序指令;An electronic device, characterized in that the electronic device comprises: an interaction device, an input/output (I/O) interface, a processor, and a memory, wherein program instructions are stored in the memory;
    所述交互装置用于获取用户输入的操作指令;The interaction device is used to obtain the operation instruction input by the user;
    所述处理器用于执行存储器中存储的程序指令,使得所述电子设备执行如权利要求1-6或7-11或12-15或16-18中任一项所述的方法。The processor is configured to execute program instructions stored in the memory, so that the electronic device performs the method of any one of claims 1-6 or 7-11 or 12-15 or 16-18.
  27. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在计算机设备上运行时,使得所述计算机设备执行如权利要求1-6或7-11或12-15或16-18中任一项所述的方法。A computer-readable storage medium, comprising instructions, characterized in that, when the instructions are executed on a computer device, the computer device is made to execute the method described in claims 1-6 or 7-11 or 12-15 or 16-18 The method of any of the above.
PCT/CN2022/083328 2021-04-21 2022-03-28 Application distribution method, apparatus, device, and medium WO2022222696A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110431800.9 2021-04-21
CN202110431800.9A CN115220733A (en) 2021-04-21 2021-04-21 Method, device, equipment and medium for distributing applications

Publications (1)

Publication Number Publication Date
WO2022222696A1 true WO2022222696A1 (en) 2022-10-27

Family

ID=83605168

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083328 WO2022222696A1 (en) 2021-04-21 2022-03-28 Application distribution method, apparatus, device, and medium

Country Status (2)

Country Link
CN (1) CN115220733A (en)
WO (1) WO2022222696A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024107A (en) * 2010-11-17 2011-04-20 中国联合网络通信集团有限公司 Application software control platform, developer terminal as well as application software distribution system and method
CN102035653A (en) * 2010-11-30 2011-04-27 中国联合网络通信集团有限公司 Controllable distributing method and system used in software examining and verifying stage
US20150304307A1 (en) * 2014-04-18 2015-10-22 Cellco Partnership D/B/A Verizon Wireless Application signing
CN108021379A (en) * 2017-11-09 2018-05-11 维沃移动通信有限公司 A kind of upgrade method of application program, mobile terminal and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024107A (en) * 2010-11-17 2011-04-20 中国联合网络通信集团有限公司 Application software control platform, developer terminal as well as application software distribution system and method
CN102035653A (en) * 2010-11-30 2011-04-27 中国联合网络通信集团有限公司 Controllable distributing method and system used in software examining and verifying stage
US20150304307A1 (en) * 2014-04-18 2015-10-22 Cellco Partnership D/B/A Verizon Wireless Application signing
CN108021379A (en) * 2017-11-09 2018-05-11 维沃移动通信有限公司 A kind of upgrade method of application program, mobile terminal and server

Also Published As

Publication number Publication date
CN115220733A (en) 2022-10-21

Similar Documents

Publication Publication Date Title
CN108551487B (en) Application deployment method, device, server and storage medium of PaaS platform
US10992482B2 (en) Verified boot and key rotation
US8990953B2 (en) Software distribution service federation
TWI359597B (en) Method,computer system ,and computer-readable medi
CN108028827B (en) Method and device for managing certificate in network function virtualization architecture
US9026795B2 (en) Apparatus and method for signing application
KR20120134509A (en) Apparatus and method for generating and installing application for device in application development system
KR20210151926A (en) Version history management using blockchain
US10379894B1 (en) Lineage-based trust for virtual machine images
JP7021239B2 (en) Remote management of initial operating system setup options
CN111066016A (en) Application certificate
US20230004371A1 (en) Package distribution and installation in response to user logon
CN112311779B (en) Data access control method and device applied to block chain system
CN110262821A (en) A kind of management method of software module, device and server
WO2023093500A1 (en) Access verification method and apparatus
US10552176B1 (en) Certifying operating system images
WO2023124420A1 (en) Application signature methods and system, transaction terminal and service platform
JP2023525576A (en) Scope of control of authentication keys for software updates
WO2022222696A1 (en) Application distribution method, apparatus, device, and medium
CN112416395A (en) Hot repair updating method and device
WO2018233638A1 (en) Method and apparatus for determining security state of ai software system
KR20130053867A (en) Management method of trusted application download, management server, device and system using it
CN110806935B (en) Application program construction method, device and system
US11726798B2 (en) Connected provisioning
CN112395021B (en) Power metering equipment application software loading control method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22790805

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22790805

Country of ref document: EP

Kind code of ref document: A1