Method, device and system for determining identifier of application

By retrieving the installation package information stored on the server to determine the application identifier, the problem of inaccurate application names caused by changes in webpage structure is solved, improving the accuracy and security of identification.

CN121597923APending Publication Date: 2026-03-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411121421.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In existing technologies, the methods for determining application names are not accurate enough, which leads to the inability to effectively perform subsequent processing, especially when the rules fail when the webpage structure changes.

Method used

By receiving download links, the system obtains information about the installation package stored on the server, such as signature, data location, or data volume, to identify the application and avoid directly identifying it from the webpage.

Benefits of technology

It improves the accuracy of application identification, ensuring that applications can still be accurately identified when the webpage structure changes, reducing the probability of users downloading the wrong applications and enhancing security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597923A_ABST
    Figure CN121597923A_ABST
Patent Text Reader

Abstract

A method, device and system for determining an identifier of an application are used for determining the identifier of the application required to be downloaded by a user. For example, in the method, when an electronic device receives a first operation for a first download link on a webpage, first information is obtained according to a first installation package stored in a first server in response to the first operation, the first installation package is an installation package of a first application, and an identifier corresponding to the first information is determined as an identifier of the first application. Or, the electronic equipment sends the first information to the server, and the server can determine the identifier of the first application and return the identifier to the electronic equipment according to the first information and the stored information of one or more installation packages. According to the method, the first information is obtained through the first installation package stored in the first server, and the identifier of the application is determined according to the first information, so that the method is not influenced by the change of a webpage structure or the appearance of a new webpage, and the accuracy of determining the identifier of the application is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a method, apparatus and system for determining the identifier of an application. Background Technology

[0002] In some scenarios, it's necessary to determine the name of the application the user requests to download, and then perform appropriate processing based on that name. For example, the application can be downloaded from the application vendor's server based on its requested name.

[0003] However, the current method of determining application names is not accurate enough, making subsequent processing impossible. For example, when downloading an application from a webpage, the application name can be determined from the webpage according to pre-configured rules. However, if the structure of the webpage changes, these rules may become invalid, making it impossible to accurately determine the application name. Summary of the Invention

[0004] This application provides a method, apparatus, and system for determining the identifier of an application, used to determine the identifier of an application that a user needs to download.

[0005] In a first aspect, a method for determining the identifier of an application is provided. This method can be executed by a client, which may be installed on an electronic device, or the client may be included in an application installed on the electronic device. The method includes: receiving a first operation on a first download link on a webpage, the first operation being for downloading a first application; responding to the first operation, obtaining first information based on a first installation package stored on a first server, the first installation package being an installation package of the first application, and the first server being a server corresponding to the first download link; determining that the identifier corresponding to the first information is the identifier of the first application, the identifier of the first application being used to download the installation package of the first application from a download path other than the first server.

[0006] In this embodiment, the application identifier is determined based on the information of the first installation package stored on the first server. This is equivalent to determining the application identifier based on information stored on the server, eliminating the need to determine the application identifier from the webpage. Therefore, even if the webpage structure changes, the solution of this embodiment can still accurately determine the application identifier, improving the accuracy of the determined application identifier.

[0007] In one possible implementation, the first information may indicate the signature of the first installation package. For example, the first information may be determined by the signature of the first installation package. Since the signatures of different installation packages are usually different, the identifier of the application corresponding to the installation package can be determined by the signature, which helps to improve the accuracy of the determined identifier. Alternatively, the first information may indicate the first data in the first installation package, where the first data is data located at a first position in the first installation package. Since the data at the same position in different installation packages may be different, the effect of determining the identifier of the application corresponding to the installation package can also be achieved by extracting a portion of the data in the installation package. Or, the first information may indicate the amount of data in the first installation package. Different installation packages may contain different amounts of data, so the amount of data in the installation package can also be used as a feature to assist in the verification of the application identifier, which helps to improve the accuracy of the determined identifier. Or, the first information may indicate one or more of the above information.

[0008] In one possible implementation, the client can pre-store information corresponding to one or more installation packages. The information for each installation package can include a correspondence between information determined based on the installation package and the identifier of the application corresponding to that installation package. The client can then match first information with this stored information to determine the information that matches the first information. For example, the client stores second information corresponding to the first installation package. This second information includes a correspondence between third information and the first identifier. The third information refers to information pre-determined based on the first installation package. After obtaining the first information, the client can determine that the first information is the same as the third information included in the second information, and thus determine that the first identifier is the identifier of the first application. Through this implementation, the client can determine the identifier of the first application by using the stored correspondence between the information of the installation packages and the identifier, improving the accuracy of determining the identifier of the application that the user needs to download.

[0009] In one possible implementation, the client can also utilize a server to determine the application's identifier. For example, the client can send a first request to a second server corresponding to the client, the first request requesting the determination of the identifier of a first application, the first request including first information. Then, the client receives the identifier of the first application from the second server. With this implementation, the client does not need to store the correspondence between the installation package information and the identifier locally, saving storage resources on the electronic device where the client is located.

[0010] In one possible implementation, the client can determine the first information based on the signature of the first installation package stored on the first server. One method for reading the signature of the first installation package is for the client to send a second request to the first server, requesting the reading of second data, which is data of a first length located at the end of the first installation package. The client then receives the second data from the first server and can determine the signature of the first installation package based on the second data. This implementation allows the signature of the first installation package to be determined by reading only a portion of the data at the end of the package, eliminating the need to read the entire package and reducing the security risks associated with downloading an unverified first installation package.

[0011] In one possible implementation, since the data at the end of the first installation package may indicate the location of the signature of the first installation package within the first installation package, the client can determine a second address based on the second data. The second address is the address of a first data block corresponding to the first installation package, and this first data block includes the signature of the first installation package. Then, the client can send a third request to the first server to request the reading of third data, which is data of a second length related to the second address, and receive the third data from the first server. Afterward, the client can determine the signature of the first installation package based on the third data. This implementation determines the second address of the first data block containing the signature of the first installation package by analyzing the tail data in the first installation package, and then successfully obtains the signature of the first installation package by reading the third data based on this second address.

[0012] In one possible implementation, the data structure used in an installation package is typically standardized, and the data structures of each data block within the installation package are also standardized. Therefore, the required data can be obtained by analyzing the data blocks in conjunction with their data structures. For example, when determining the signature of the first installation package based on the second data, the client can determine the third length corresponding to the signature of the first installation package based on the second data, and then determine that the data of the third length starting from the second position of the second data is the signature of the first installation package. Through this implementation, the signature of the first installation package can be accurately read by combining the obtained third length of the signature, which helps to improve the accuracy of determining the identifier of the application that the user needs to download.

[0013] In one possible implementation, after determining that the identifier corresponding to the first information is the identifier of the first application, the client can have several output methods. For example, the client can output the identifier of the first application. This allows the user to intuitively perceive the identifier of the first application corresponding to the first installation package currently being downloaded, reducing the probability of the user being misled by the webpage into downloading the wrong application. Another example is that the client can output a prompt asking whether to download the first installation package. This allows the user to confirm whether to download the first installation package again, also reducing the probability of the user downloading an application they don't need. Yet another example is that the client can output a prompt asking whether to download the first application's installation package through a first download mode, which is used to download the first application's installation package from other download paths. For example, downloading from other download paths could be from a third-party server corresponding to an app store. Since the installation packages from the third-party server corresponding to the app store have undergone security verification and are more secure, guiding the user to download the first application's installation package from the third-party server corresponding to the app store helps improve the security of the installation package downloaded by the user. Yet another example is that the client can output risk information about the first installation package. In this way, users can learn about the risk level of the first installation package they are downloading through risk information, which can help them decide whether they need to download the first installation package and reduce the probability of downloading an installation package with low security.

[0014] In one possible implementation, after outputting a prompt asking whether to download the installation package of the first application via the first download mode, the client can receive a second operation to confirm downloading the installation package of the first application via the first download mode. In response to the second operation, the client can send a fourth request to a third server (a server corresponding to another download path), requesting to download the first application. The client then receives a second installation package from the third server, which is the installation package of the first application. The installation package of the first application can then be downloaded via another download path; for example, if the third server is a server corresponding to an app store, the installation package can be downloaded from the third server. Since installation packages from app stores undergo security verification and are more secure, downloading the installation package of the first application via the third server helps improve the security of the downloaded installation package.

[0015] In one possible implementation, after downloading the installation package, the client can extract relevant information and the identifier of the application corresponding to the installation package. This extracted information can serve as the data basis for subsequently determining the application's identifier. For example, when the first installation package is downloaded, the client can obtain first information and the identifier of the first application based on the stored first installation package, and send a fifth request to the second server corresponding to the client. The fifth request includes the first information and the identifier of the first application. By reporting the first information of the first installation package and the identifier of the first application to the second server, the second server can determine the identifier of the first application when other clients download the first installation package, based on the information reported by the client.

[0016] In one possible implementation, the client can also determine a second identifier based on the download time of the first installation package. The second identifier is used to indicate the time period in which the download time occurs. In this way, the fifth request sent by the client can also include the second identifier. This can help the second server exclude malicious reports and improve the reliability between the information of the installation package stored by the second server and the identifier of the application.

[0017] Secondly, a method for determining the identifier of an application is provided. This method can be executed by a server, such as the server corresponding to the client in the first aspect described above. The method includes: receiving a first request from a client, the first request including first information, the first information being determined based on a first installation package stored on a first server, the first installation package being an installation package of a first application; determining that the identifier corresponding to the first information is the identifier of the first application, the identifier of the first application being used to download the installation package of the first application from a download path other than the first server; and sending the identifier of the first application to the client.

[0018] This implementation determines the application identifier based on information from the first installation package stored on the first server. This is equivalent to determining the application identifier based on information stored on the server, eliminating the need to determine the application identifier from the webpage. Therefore, even if the webpage structure changes, the solution in this embodiment can accurately determine the application identifier, improving the accuracy of the determined application identifier. Furthermore, by implementing the application identifier determination process through the server, the client does not need to store the correspondence between the installation package information and the identifier locally, saving storage resources on the client's electronic device.

[0019] In one possible implementation, the server can also receive a first download link from the client, which is used to download a first installation package from the first server. The server can then obtain first information based on the first installation package stored on the first server. Afterward, the server determines that the identifier corresponding to the first information is the identifier of the first application and sends the identifier of the first application to the client. This implementation allows the server to perform the process of obtaining the first information, further reducing the steps required on the client, lowering the client's processing load, and, compared to the client, the server has higher processing power, effectively improving the efficiency of determining the application identifier.

[0020] In one possible implementation, the first information indicates one or more of the following: a signature of the first installation package; first data in the first installation package, wherein the first data is data located at a first position in the first installation package; or, the amount of data in the first installation package.

[0021] In one possible implementation, the server stores second information, which includes the correspondence between third information and the first identifier. The server can then determine that the first information is the same as the third information included in the second information, and determine that the first identifier is the identifier of the first application.

[0022] In one possible implementation, the second information further includes a first count and a first duration. The first count is the total number of times the first information has been reported, and the first duration is the time difference between the time the first information was first reported and the current time. The server then determines that the second information satisfies a first condition. The first condition includes: the first count being greater than or equal to a first threshold, and / or, the first duration being greater than or equal to a second threshold. Only then will the server determine that the first identifier is the identifier of the first application. In this implementation, the second information satisfying the first condition indicates that the first information of the first installation package has been reported a large number of times, and the first report is a long time ago. Therefore, the first installation package can be considered not to belong to the application sample with a small amount of data, and the second information can be considered reliable. Only then will the first identifier be determined as the identifier of the first application, thereby improving the reliability of the final determination of the application identifier.

[0023] In one possible implementation, if the server determines that it does not store information identical to the first information, it can send a sixth request to a third server corresponding to the application market. The sixth request includes the first information used to determine the identifier of the first application, and the server receives the identifier of the first application from the third server. This implementation allows the server to be requested to determine the application's identifier, improving the success rate of identifying the application's identifier.

[0024] In one possible implementation, the server receives a fifth request from the client, the fifth request including first information about the first installation package and an identifier of the first application. The server may store the first information and the identifier of the first application so that the identifier of the first application can be determined when other clients download the first installation package.

[0025] In one possible implementation, the fifth request further includes a second identifier, which indicates the time period in which the client downloads the first installation package. If the server determines that the total number of reports from the client within the first time period is less than or equal to a third threshold, and determines that it has not received the first information and the identifier of the first application from the client within the first time period, the server stores the first information and the identifier of the first application. Through this implementation, the server can determine whether a client is maliciously reporting by determining the number of reports from the client within the time period indicated by the second identifier and whether the same information has been reported before. Only if it is determined that the report is not malicious will the server store the relevant information of the first installation package, thereby improving the reliability of the installation package-related information stored on the server.

[0026] Thirdly, this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any of the first and / or second aspects above.

[0027] Fourthly, this application provides an apparatus for determining the identifier of an application, including modules / units for performing the methods corresponding to any one of the designs in the first and / or second aspects described above. These modules / units can be implemented in hardware or by hardware executing corresponding software.

[0028] Fifthly, embodiments of this application provide a communication system including a first device and a second device, wherein the first device is used to implement the method as described in any of the first aspects above, and the second device is used to implement the method as described in any of the second aspects above.

[0029] Sixthly, this application provides a computer-readable storage medium storing a computer program that, when executed by at least one processor, implements the method as described in any one of the first and / or second aspects above.

[0030] In a seventh aspect, this application provides a chip including a processor and an interface; the processor is configured to read instructions through the interface to perform the methods described in any of the first and / or second aspects above.

[0031] Eighthly, this application provides a chip system, the chip system including a processing circuit and a storage medium, the storage medium storing instructions; when the instructions are executed by the processing circuit, they implement the method of any one of the first and / or second aspects described above.

[0032] Ninthly, this application provides a computer program product comprising a computer program that, when run on a computer, enables the computer to perform the methods described in any of the first and / or second aspects above.

[0033] The beneficial effects of the embodiments in any of the second to ninth aspects described above can be referred to the beneficial effects of the corresponding embodiments in the first aspect described above, and this application will not elaborate on them one by one. Attached Figure Description

[0034] Figures 1A to 1C A schematic diagram of the communication system provided in the embodiments of this application;

[0035] Figure 1D A schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0036] Figure 1E A schematic diagram of the structure of a server provided in an embodiment of this application;

[0037] Figure 2 A system architecture diagram showing the applicability of the method for determining the identifier of an application provided in the embodiments of this application;

[0038] Figure 3 A schematic diagram of the software architecture of the electronic device provided in the embodiments of this application;

[0039] Figures 4A-4B This is a diagram illustrating the identification of application names on web pages using related technologies.

[0040] Figure 5 A schematic diagram illustrating the identification of an application in a webpage, provided as an embodiment of this application;

[0041] Figures 6A to 6D This is a schematic diagram of the interface provided for an embodiment of this application;

[0042] Figures 7-10 A flowchart illustrating the method for determining the identifier of an application provided in an embodiment of this application;

[0043] Figure 11A A schematic diagram of the structure of the installation package provided in an embodiment of this application;

[0044] Figure 11B A schematic diagram of a process for obtaining first information provided in an embodiment of this application;

[0045] Figure 12 A flowchart illustrating the maintenance application information database provided in this application embodiment;

[0046] Figure 13 Another flowchart illustrating the maintenance of the application information database provided in this application embodiment;

[0047] Figure 14 Another flowchart illustrating the method for determining the identifier of an application provided in this application embodiment;

[0048] Figure 15 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0049] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0050] The embodiments of this application involve at least one, including one or more; where "multiple" means two or more. Furthermore, it should be understood that in the description of this specification, terms such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating relative importance or order. For example, "first operating system" and "second operating system" do not represent the degree of importance of the two or their order, but are merely for descriptive distinction. In the embodiments of this application, "and / or" merely describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0051] The directional terms mentioned in the embodiments of this application, such as "up", "down", "left", "right", "inner", and "outer", are only for reference to the directions in the accompanying drawings. Therefore, the directional terms used are for better and clearer explanation and understanding of the embodiments of this application, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.

[0052] References to "one embodiment," "in some examples," or "some embodiments" as described in this specification mean that one or more embodiments of this specification include a particular feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in some examples," "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0053] There are currently several ways to download applications. One way is to download the application installation package from the app store provided by the device manufacturer. Another way is to download the application installation package through other means besides app stores, such as downloading it through a web browser. Because device manufacturers usually perform security checks on the application installation packages when listing applications on app stores, applications downloaded through app stores are generally more secure. However, applications downloaded through other means may lack security checks, and therefore may pose potential security risks.

[0054] Taking browser webpage downloads as an example, browsers offer two modes for downloading applications: normal download and secure download. In normal download mode, the user directly downloads the application's installation package from the corresponding server using a download link within the browser webpage. However, the installation package provided by this server is not security-verified and may pose potential security risks. In secure download mode, the browser first identifies the name of the application the user intends to download and sends this name to the device manufacturer's server. The server then obtains the corresponding download link based on the name and returns it to the browser. The browser can use this download link to download the installation package. Because the installation package pointed to by this download link is security-verified, the installation package downloaded through secure download mode is more secure. However, currently, identifying the application the user intends to download usually involves determining the application name from the webpage based on pre-configured rules. This method is prone to errors when the webpage structure changes or new webpages appear, as the rules may become invalid, leading to inaccurate application name determination.

[0055] To address this issue, in this embodiment, after a user triggers a first operation to download a first application, first information is obtained from the first installation package pointed to by the first download link targeted by the first operation. This first information may include, for example, one or more of the following: the signature of the first installation package, partial data within the first installation package, the data volume of the first installation package, or conversion values ​​of the aforementioned information. The identifier corresponding to this first information is then used to determine the identifier of the first application, thereby achieving the goal of identifying the application the user intends to download. In this method, the application identifier is determined based on information from the first installation package stored on a first server, which is equivalent to determining the application identifier based on information from the server, eliminating the need to determine the application identifier from the webpage. Therefore, even if the webpage structure changes, the solution in this embodiment can accurately determine the application identifier, improving the accuracy of the determined application identifier.

[0056] Please see Figure 1A , Figure 1A This diagram illustrates a communication system to which the method for determining the identifier of an application provided in this application embodiment can be applied. The communication system may include an electronic device 100 and a first server 200. The first server 200 refers to a server that provides download services when an application is downloaded through means other than an application market; for example, it may be the server corresponding to the first download link when a user downloads the first application.

[0057] Optionally, the electronic device 100 can be, for example, a mobile phone, tablet computer (PAD), laptop computer, desktop computer, smart screen, in-vehicle terminal, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), wearable device (such as smartwatch), smart home appliance, artificial intelligence (AI) device, aircraft, business smart terminal (including: video phone, conference desktop smart terminal, etc.), augmented reality (AR) / virtual reality (VR) device, etc. The operating system installed on the electronic device includes, but is not limited to, Android. HarmonyOS Open HarmonyOS Other operating systems. This application does not limit the specific type of electronic device 100 or the operating system installed.

[0058] In some embodiments, when the electronic device 100 receives a first operation targeting a first download link on a webpage, in response to the first operation, it obtains first information based on a first installation package stored on a first server 200 pointed to by the first download link, and determines that the identifier corresponding to the first information is the identifier of a first application. Here, the first installation package is the installation package of the first application, and the identifier of the first application can be used to download the installation package of the first application from a server outside the first server 200. For example, the electronic device 100 can download the installation package of the first application from an application market server based on the identifier of the first application. Since the installation packages on the application market server are security-verified, this can improve the security of the downloaded installation package of the first application. Alternatively, it can also find the first installation package stored within itself based on the identifier of the first application, perform a security risk assessment on the first installation package, and promptly remind the user if a security risk exists, reducing the probability that the user downloads an installation package with security risks.

[0059] In some examples, after downloading the installation package of an application, such as the first installation package of a first application, the electronic device 100 can obtain the first information of the first installation package and the identifier of the first application based on the first installation package, and store the first information of the first installation package and the identifier of the first application, as well as the correspondence between the two. This information can serve as the data basis for determining the identifier of the first application when the electronic device downloads the first application again.

[0060] Please see Figure 1B , Figure 1B This is a schematic diagram of another communication system to which the method for determining the identifier of an application provided in this application can be applied. Figure 1A The difference is that, Figure 1B The communication system shown may also include a second server 300. Then, one or more steps of the method for determining the identifier of the application performed by the electronic device 100 can be performed by the second server 300.

[0061] Optionally, the second server 300 can be a device or server with computing capabilities, such as a cloud server or a network server. The aforementioned server can be a single server, a server cluster or distributed system composed of multiple servers, or a cloud computing service center, but is not limited to these. The aforementioned server can be a physical server or a virtual server.

[0062] In some embodiments, an electronic device 100 may install a client for implementing the solution provided in the embodiments of this application, and the second server 300 may be a server corresponding to the client. The implementation form of the client is not specifically limited. For example, the client may be a client for an independent application, or it may be a small program, a software development kit (SDK), or a plugin running in the host program, or other implementation forms.

[0063] In some embodiments, when the electronic device 100 receives a first operation targeting a first download link on a webpage, in response to the first operation, it obtains first information based on a first installation package stored in a first server 200 pointed to by the first download link, and sends a first request to a second server 300. The first request requests the second server 300 to identify the identifier of a first application that the user intends to download, and the first request includes the first information. Accordingly, in response to the first request, the second server 300 determines the identifier corresponding to the first information provided by the electronic device 100 as the identifier of the first application that the user intends to download, and returns the identifier of the first application to the electronic device 100.

[0064] In some embodiments, when electronic device 100 receives a first operation on a first download link on a webpage, in response to the first operation, it sends a request to second server 300 to identify the application the user intends to download. The request includes the first download link. Second server 300 can obtain first information from a first installation package stored in first server 200 pointed to by the first download link, and determine the identifier corresponding to the first information as the identifier of the first application the user intends to download, and return the identifier of the first application to electronic device 100.

[0065] In some embodiments, after the electronic device 100 downloads the first installation package of the first application, it can also upload the first information of the first installation package and the identifier of the first application to the second server 300 for storage, so as to serve as the data basis for the second server 300 to determine the identifier of the first application when other electronic devices download the first application in the future.

[0066] Please see Figure 1C , Figure 1C This is a schematic diagram illustrating another communication system to which the method for determining the identifier of an application provided in this application embodiment can be applied. Figure 1B The difference is that, Figure 1C The communication system shown may also include a third server 400.

[0067] The third server 400 can be a server corresponding to an application marketplace. Optionally, the application marketplace can be an application marketplace provided by the manufacturer of the electronic device 100. In some embodiments, the third server 400 and the second server 300 can be implemented using the same server; in other words, the functions implemented by the third server 400 and the second server 300 can be different functional modules of the same server.

[0068] In some embodiments, the third server 400 may be used to provide information about the installation packages of applications included in the application market. This information may include one or more of the following: the installation package signature, partial data, data volume, or conversion values ​​of the aforementioned information. It may also include the identifier of the application corresponding to the installation package. For example, the electronic device 100 or the second server 300 may obtain and store second information about the first installation package from the third server 400. This second information may include first information about the first installation package and the identifier of the first application, or it may include a correspondence between the first information and the identifier of the first application. The first information may be, for example, one or more of the following: the first installation package signature, partial data, data volume, or conversion values ​​of the aforementioned information. This allows the electronic device 100 or the second server 300 to determine the identifier of the first application that the user intends to download based on the stored second information of the first installation package and the first information of the first installation package pointed to by the first download link obtained when the user triggers the first download operation. Alternatively, if the electronic device 100 or the second server 300 fails to identify the first application the user intends to download based on the first information of the first installation package—for example, if the electronic device 100 or the second server 300 does not store the second information of the first installation package—it can send the first information to the third server 400, requesting the third server 400 to determine the identifier of the first application the user intends to download. Since the third server 400 includes a larger number of installation packages, it can effectively assist in identifying the application the user intends to download.

[0069] For example, Figure 1D A schematic diagram of an electronic device 100 is shown.

[0070] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0071] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of the electronic device 100. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that processor 110 has recently used or is repeatedly used. If processor 110 needs to reuse an instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of processor 110, and thus improves system efficiency.

[0072] In some embodiments, the processor 110 may execute the method for determining the identifier of an application provided in the embodiments of this application. For example, upon receiving a first operation on a first download link on a webpage, in response to the first operation, first information is obtained based on a first installation package stored on a first server 200 pointed to by the first download link, and the identifier corresponding to the first information is determined to be the identifier of a first application. Here, the first installation package is the installation package of the first application, and the identifier of the first application can be used to download the installation package of the first application from a download path other than the first server 200. As another example, after obtaining the first information based on the first installation package stored on the first server 200 pointed to by the first download link, a first request is sent to a second server 300. The first request requests the second server 300 to identify the identifier of the first application that the user intends to download. The first request includes the first information, and the identifier of the first application is received from the second server 300.

[0073] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0074] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0075] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0076] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0077] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0078] The display screen 194 is used to display the application's interface, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0079] In some embodiments, the display screen 194 displays a first webpage, which includes a first download control corresponding to a first download link, such as a first download link or an icon corresponding to the first download link. The user can perform a first operation on the first download control to instruct the electronic device 100 to download a first application. After the electronic device 100 determines that the user has performed the first operation on the first download control, the electronic device 100 can send a request to the first server 200 via the wireless communication module 160 to obtain first information based on the first installation package pointed to by the first download link. The electronic device 100 can also send a request to the second server 300 via the wireless communication module 160, which may carry the first information, requesting the second server 300 to determine the identifier of the first application the user intends to download based on the first information carried in the request. Alternatively, the electronic device 100 can send a request to the second server 300 via the wireless communication module 160, which may carry the first download link, requesting the second server 300 to determine the identifier of the first application the user intends to download based on the first download link.

[0080] Subsequently, the electronic device 100 can receive the identifier of the first application issued by the second server 300 through the wireless communication module 160, and can display the identifier of the first application through the display screen 194. Alternatively, after the processor 110 processes the identifier of the first application, the corresponding processing result can be displayed through the display screen 194.

[0081] The electronic device 100 can perform shooting functions through an ISP, a camera 193, a video codec, a GPU, a display 194, and an application processor. The ISP is used to process the data fed back by the camera 193.

[0082] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and software code for at least one application program. The data storage area may store data generated during the use of electronic device 100 (e.g., images, videos, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, general-purpose flash memory, etc.

[0083] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, videos, and other files can be saved on the external memory card.

[0084] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0085] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event.

[0086] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with electronic device 100.

[0087] Figure 1C The illustrated structure does not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Figure 1C The illustrated interface connections between modules are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0088] For example, Figure 1E A schematic diagram of a second server 300 is shown.

[0089] The second server 300 includes at least one processor 301. The processor 301 can be used for internal processing within the second server 300 to implement certain control processing functions. The processor 301 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program in the embodiments of this application. Optionally, the processor 301 includes instructions. Optionally, the processor 301 can store data. Optionally, different processors can be independent devices, located in different physical locations, or located on different integrated circuits. Optionally, different processors can be integrated into one or more processors, for example, integrated on one or more integrated circuits.

[0090] Optionally, the second server 300 includes one or more memories 303 for storing instructions. Optionally, the memories 303 may also store data. The processor and memories may be configured separately or integrated together.

[0091] Optionally, the second server 300 includes a communication line 302 and at least one communication interface 304. Since the memory 303, communication line 302, and communication interface 304 are all optional, therefore... Figure 1B All are represented by dashed lines.

[0092] Optionally, the second server 300 may further include a transceiver. The transceiver can be used to send information to or receive information from other devices. The transceiver can be referred to as a transceiver unit, transceiver circuit, input / output interface, etc., and is used to implement the transmission and reception functions of the second server 300. Optionally, the transceiver includes a transmitter and a receiver. For example, the transmitter can be used to generate PLC signals based on digital signals, and the receiver can be used to convert the PLC signals into digital signals.

[0093] Processor 301 may include a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the embodiments of this application.

[0094] Communication line 302 may include a path for transmitting information between the aforementioned components.

[0095] The communication interface 304 can be a module, circuit, bus, interface, transceiver, or other device capable of communication functions, used for communicating with other devices. Optionally, when the communication interface 304 is a device using any transceiver, it can be used to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), wired access network, etc.

[0096] Memory 303 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 303 may exist independently and be connected to processor 301 via communication line 302. Alternatively, memory 303 may be integrated with processor 301.

[0097] The memory 303 stores computer execution instructions for implementing the solutions of the embodiments of this application, and the processor 301 controls the execution. The processor 301 executes the computer execution instructions stored in the memory 303, thereby implementing the method for determining the identifier of an application provided in the embodiments of this application.

[0098] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, instructions, computer program or other names, and the embodiments of this application do not specifically limit them.

[0099] In a specific implementation, as one example, processor 301 may include one or more CPUs, for example... Figure 1B CPU0 and CPU1 in the CPU.

[0100] In a specific implementation, as one example, the second server 300 may include multiple processors, for example... Figure 1BProcessors 301 and 305 are described herein. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0101] In some embodiments, after receiving first information about the first installation package sent by the electronic device 100 through the communication interface 304, the second server 300 determines the identifier of the first application that the user intends to download based on the first information through the processor 301; or, after receiving the first download link sent by the electronic device 100 through the communication interface 304, the second server 300 obtains the first information through the communication interface 304 based on the first installation package stored in the first server 200 pointed to by the first download link, and determines the identifier of the first application that the user intends to download based on the first information through the processor 301. For example, the identifier of the first application may include one or more of the application name of the first application, the package name of the first installation package, etc. Then, the second server 300 can send the identifier of the first application to the electronic device 100, and the identifier of the first application can be used to download the installation package of the first application from a server outside the first server 200. For example, electronic device 100 can download the installation package of the first application from the server of the application market based on the identifier of the first application. Since the installation package in the server of the application market is a security-verified installation package, this can improve the security of the downloaded installation package of the first application. Alternatively, it can also find the first installation package stored in itself based on the identifier of the first application, perform a security risk assessment on the first installation package, and promptly remind the user when there is a security risk, thereby reducing the probability that the user downloads an installation package with security risks.

[0102] In some examples, the second server 300 may communicate with the electronic device 100 or other devices via the communication interface 304, for example, by receiving first information of the first installation package sent by the electronic device 100, or by sending the identifier of the first application to the electronic device 100, etc.

[0103] In other examples, the second server 300 may also receive the first installation package of the first application downloaded by the electronic device 100 through the communication interface 304, obtain the first information of the application and the identifier of the first application based on the first installation package, and store this information. This information can be used as the data basis for the subsequent determination of the identifier of the first application.

[0104] Please refer to Figure 2This is a system architecture diagram showing the applicability of the method for determining the identifier of an application provided in this application embodiment. The architecture may include a client 101 and a server 306. The client 101 may, for example, be deployed on the aforementioned... Figures 1A to 1C In the electronic device 100 shown, the server 306 can, for example, be deployed on the aforementioned Figures 1B-1C The second server 300 shown Figure 1C The third server 400 shown below. The modules included in client 101 and server 306 are described below.

[0105] In some embodiments, client 101 may include the following modules:

[0106] (1) Acquisition Module 1011. When a user triggers the first operation to download the first application, the acquisition module 1011 can collect the first information of the first installation package of the application based on the first installation package pointed to by the first download link (stored in the first server). The collected first information can be used to subsequently determine the identifier of the first application that the user intends to download. In one example, the first information includes information that can be used to identify the first installation package, including but not limited to one or more of the following: the signature of the first installation package, partial data, data volume, or conversion values ​​of the aforementioned information. The specific information included in the first information will be introduced later and will not be elaborated on here.

[0107] (2) Extraction module 1012. After the user downloads the installation package of the application (e.g., downloads the first installation package of the first application), the downloaded first installation package is saved in the local storage space. The extraction module 1012 can be used to extract the first information of the first installation package and the identifier of the first application from the first installation package stored locally. The first information includes, but is not limited to, one or more of the following: the signature of the first installation package, partial data, data volume, or the conversion value of the aforementioned information.

[0108] In some embodiments, server 306 may include the following modules:

[0109] (1) Identification module 3061. After the electronic device 100 sends the first information of the first installation package collected by the acquisition module 1011 to the second server 300, the server 300 can identify the identifier of the first application that the user intends to download from the information database 3063 based on the first information of the first installation package through the identification module 3061.

[0110] (2) Accumulation module 3062. After the electronic device 100 sends the first information of the first installation package extracted by the extraction module 1012 to the second server 300, the server 300 can process the first information of the first installation package through the accumulation module 3062 and write the processed information into the information database 3063. The processed information includes, but is not limited to, one or more of the following: the first information of the first installation package, the cumulative number of downloads of the first installation package, and the cumulative download duration of the first installation package.

[0111] (3) Information Base 3063. Information Base 3063 is used to store information about one or more installation packages. The information about the installation packages includes, but is not limited to, the installation package signature, partial data, data volume or converted values ​​of the aforementioned information, and one or more of the following: application identifier, cumulative download count, or cumulative download duration. This information can serve as the data basis for determining the identifier of the application that the user intends to download.

[0112] In some embodiments, the method for determining the identifier of an application is applied to Figure 1A In the communication system shown, all the processing procedures of the method for determining the identifier of the application are executed by the electronic device 100, and the various modules included in the client 101 and the server 306 mentioned above can all be deployed in the electronic device 100.

[0113] Please refer to Figure 3 , Figure 3 This illustration shows several possible software architectures for the electronic device 100 provided in embodiments of this application. Here, we continue with... Figure 2 Taking the system architecture shown as an example, the relationship between client 101 and other software in electronic device 100 can be as follows: Figure 3 As shown in (a) to (b), they will be introduced below.

[0114] In some embodiments, the electronic device 100 may include an application market (APP) 103. Optionally, the application market APP 103 may be an application market APP that comes pre-installed with the electronic device 100's system, i.e., an application market APP provided by the manufacturer of the electronic device 100. The electronic device 100 may also include a host program of client 101. Correspondingly, client 101 may be any implementation form of the host program, such as a functional module, mini-program, quick app, lightweight app, SDK, or plugin. When a user downloads an application in the host program, client 101 can execute the method of the embodiments of this application to identify the application that the user intends to download. The embodiments of this application do not limit the host program. For example, the host program may be any application with the ability to open web pages and download applications, such as a browser or WeChat.

[0115] In one example, see Figure 3 As shown in (a), the host program can be browser 102, and the client 101 can be a functional module, functional unit, plugin, or SDK within browser 102. When client 101 is a functional module within browser 102, it can also be called a browser secure download module or a browser application identification module, etc., without limitation on the specific name. Alternatively, the function of client 101 can be one of the functions of the host program; in this case, client 101 can be understood as the host program itself. In one example, client 101 is browser 102. When a user downloads an application through a browser webpage, browser 102 can execute the method for determining the application identifier provided in this embodiment to determine the identifier of the application the user intends to download.

[0116] In some embodiments, the client 101 in the electronic device 100 can be a standalone application. In this case, the client 101 can be an application that comes pre-installed with the electronic device 101, meaning the client 101 can be a system application or system service. Alternatively, the client 101 can also be installed on the electronic device 100 by the user after downloading and installing a package according to their own needs. See also Figure 3 As shown in (b), the electronic device 100 may further include a browser 102 and an app store APP 103, with the client 101, browser 102, and app store APP 103 being different applications. The client 101 can detect the operation of downloading an application on the electronic device 100. For example, with the user's authorization, it can obtain permission to detect the operation of downloading an application on the electronic device 100. Therefore, when the operation of downloading an application is detected, the client 101 can execute the method for determining the identifier of the application provided in the embodiments of this application to identify the application that the user intends to download.

[0117] In one example, when downloading an application from the app store APP 103, since applications in the app store APP 103 are usually security verified, the client 101 may not need to identify the download operation in this case. When downloading an application from an application other than the app store APP 103 (such as browser 102), the client 101 can execute the method provided in this application embodiment to determine the identifier of the application that the user intends to download, and then execute subsequent security policies based on the identifier of the application. For example, the application can be downloaded using a secure download mode to improve the security of the downloaded application installation package, or other security-related measures can be taken to reduce the probability that the user downloads an installation package with security risks.

[0118] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings.

[0119] Currently, to enhance security when downloading applications from web pages, a secure download mode is provided. Unlike the normal download mode, which directly downloads the installation package from a download link on a webpage, the secure download mode first identifies the name of the application the user intends to download on the webpage, and then downloads the installation package from the device manufacturer's server based on the application name. Currently, when using the secure download mode to download applications, identifying the application the user intends to download typically involves configuring application name extraction rules based on the specific webpage structure. These rules are then used to retrieve the application name from the webpage. Taking browser webpage downloads as an example, the following two methods can be used to identify the application the user intends to download. In the following description, we will use a mobile phone as an example, with video application A as the application. See [link to documentation]. Figures 4A-4B as well as Figure 5 As shown, the download webpage for video application A includes a download control 401 and the application name of video application A 402. Optionally, the download webpage for video application A may also include the application names of similar applications recommended to the user, such as the application name of video application B 403, the application name of video application C 404, and the application name of video application D 405. In this embodiment, the download control can be the download link itself, or it can be an icon or text corresponding to the download link.

[0120] Method 1: Identify application names in web pages using pre-injected application name crawling rules.

[0121] Users typically download applications by clicking download controls. Therefore, in Method 1, it's necessary to analyze the display relationship between download controls and corresponding application names on a specific website's webpage, as well as the node configuration relationship of the corresponding webpage content, in advance to configure application name extraction rules for that website's webpage. The display relationship refers to the positional relationship between the download control and the application name when displayed on the webpage, while the node configuration relationship refers to the hierarchical relationship between the download control and the application name's corresponding nodes in the webpage structure. Both the display relationship and the node configuration relationship can be determined based on the webpage's source file, such as a Hypertext Markup Language (HTML) file.

[0122] Then, extraction rules can be injected into the webpage of a specific website. When a user operates on the download control on the webpage, the application name corresponding to the download control can be extracted according to the extraction rules, and then the application installation package can be obtained using the secure download mode based on the application name.

[0123] See Figure 4A This is a diagram illustrating method 1 in related technologies for identifying application names on web pages. For example... Figure 4AAs shown, for the download webpage of video application A, it is necessary to analyze the webpage structure in advance. The application name of video application A is 402 (i.e. Figure 4A The “Video Application A” shown) and the download control 401 (i.e. Figure 4A The "Download Now" button shown can be considered a node in the webpage structure. Therefore, it is necessary to configure the extraction rules for the download webpage of Video Application A based on the display relationship and node configuration relationship between the "Video Application A" and "Download Now" nodes in the webpage. Then, when the user clicks "Download Now", the configured extraction rules can be used to determine that the application name is "Video Application A".

[0124] However, Method 1 also has several drawbacks. First, since different websites may have different webpage types or structures, extraction rules need to be configured separately for each website's webpages. This process is time-consuming, making Method 1 inefficient at identifying the application a user intends to download. Second, the extraction rules must be pre-adapted to the target webpage the user is interacting with in order to capture the application name present on that webpage. When a new webpage appears, the application name cannot be identified using this method before the extraction rules are configured. Third, when the webpage structure changes, the extraction rules may become invalid. For example, if the content of a webpage is modified, the display relationship between the download control and the corresponding application name may differ from before the modification. In this case, the extraction rules configured based on the previous webpage may become invalid, resulting in the inability to correctly obtain the application name and ultimately rendering the secure download mode unusable.

[0125] Method 2: Batch extract text information near the download control to obtain the application name on the webpage.

[0126] In Method 2, when a user clicks the download control on a webpage to download an application, the process first determines the node position of the download control within the webpage's structure. It then retrieves the text of the parent and sibling nodes within a preset hierarchical range at that node position. The application name appearing in this text is then identified. If multiple different application names appear in the text, a weighted value is calculated based on the distance between the node position of each application name in the webpage structure and the node position corresponding to the download control, as well as the frequency of each application name in the text. The application name with the highest weighted value is taken as the final recognition result. Afterward, the application's installation package is obtained using a secure download mode based on this application name.

[0127] See Figure 4B This is a diagram illustrating method 2 in related technologies for identifying application names on web pages. For example... Figure 4BAs shown, when the user clicks the download control 401, method 2 determines the node position of the download control 401 on the webpage and retrieves the text of other nodes within a preset hierarchical range at that node position, from which the application name is determined. For example... Figure 4B As shown, in addition to "Video Application A", the page may also include "Video Application B", "Video Application C" and "Video Application D", so it is necessary to calculate the weighted values ​​of these application names separately to determine the final recognition result.

[0128] As can be seen, Method 2 is similar to Method 1, essentially obtaining the application name by analyzing the webpage structure, and therefore suffers from the same drawbacks as Method 1. First, when the webpage structure changes, the application name may no longer appear in the text, or even if it does, it may be an incorrect application name, leading to inaccurate application name identification. Second, when multiple different application names appear in the obtained text, the application name selected based on the highest weighted value may be incorrect, resulting in inaccurate application name identification.

[0129] Therefore, current methods of analyzing webpage structure all suffer from inaccurate application name identification.

[0130] To address this, embodiments of this application provide a method for determining the identifier of an application. This method involves obtaining first information based on a first installation package pointed to by a first download link on a webpage after a user performs a first operation, and then determining the identifier of the first application the user intends to download based on this first information and a pre-configured application information database.

[0131] For example, see Figure 5 The diagram illustrates an example of identifying an application identifier on a webpage using the solution of this application embodiment. After a user clicks the download control 401, following the normal download process, the electronic device 100 sends a request to the first server 200 to download the application's installation package. However, in this embodiment, the request to download the application is paused, and the download link corresponding to the download control 401 is obtained. Then, based on the download link, a request to obtain the installation package data is sent to the first server 200. After receiving the request, the first server 200 returns the installation package data to the electronic device 100. The electronic device 100 can then determine first information based on the installation package data, and combine this information with a pre-configured application information database to determine the identifier of the application the user intends to download. In one example, the download link corresponding to the download control 401 can be obtained from the information associated with the node corresponding to the download control 401. In another example, the download link can also be obtained from the application download request sent to the first server 200.

[0132] Please compare. Figure 4A , Figure 4B and Figure 5 , Figure 4A and Figure 4B The methods used are all based on analyzing the webpage structure to obtain the application name, which is easily affected by the webpage structure. Figure 5 In this method, since the application identifier is determined based on the information of the first installation package stored on the first server, it is equivalent to determining the application identifier based on the information in the server, without needing to determine the application identifier from the webpage. Therefore, regardless of changes in the webpage structure, the first download link can be obtained when the user triggers the first operation. Thus, the above process can be performed based on the first download link to determine the identifier of the first application. Changes in the webpage structure or the appearance of a new webpage will not affect the acquisition of the first download link. Therefore, the method of this embodiment is not affected by changes in the webpage structure or the appearance of a new webpage, resulting in a higher success rate in determining the identifier of the first application. On the other hand, Figure 4A and Figure 4B The method of obtaining the application name by analyzing the webpage structure can only yield an application name with low confidence, such as... Figure 4B When multiple application names exist in a given method, the application name recognition may be incorrect due to the weighted value calculation. Figure 5 In this method, the application's identifier is determined by matching the information in the installation package with the application information database. The application's identifier can only be obtained when the information is completely matched, thus avoiding issues similar to... Figure 4B In cases where multiple application names cannot be accurately distinguished, the method implemented in this application ultimately yields more accurate application identifiers, improving the accuracy of determining the identifiers of applications that users intend to download.

[0133] In some embodiments, the identifier of the determined application can also be verified using a certain verification method to further improve the accuracy of identifying the application that the user intends to download. In one example, the information of the installation package may include the characteristics of the installation package, such as the data size of the installation package. By comparing it with the characteristics of the installation package stored in a preset information database, it can be further verified whether they are the same installation package, increasing the reliability of the application identification result.

[0134] The technical solutions of this application can be used to assist users in downloading applications more securely. Several application scenarios of the technical solutions provided in this application are listed below.

[0135] Application Scenario 1: When a user triggers an application download, by identifying the identifier of the application the user intends to download, the system can output the identifier of the currently downloaded application, such as the application name or the package name of the installation package. In this way, the user can determine whether the currently downloaded application is the one they actually need based on the identifier of the currently downloaded application, thereby reducing the probability that the webpage misleads the user into downloading an application that they do not need.

[0136] For example, a user needs to download application 1, but due to webpage display or other reasons, the user may mistakenly believe that the download control for application 2 is for downloading application 1, and therefore mistakenly click the download control, which will lead to an incorrect download of the installation package. However, the method for determining the application identifier provided in this application embodiment can analyze the download link corresponding to the download control clicked by the user to obtain the identifier of the application that the user intends to download, and then output the identifier of the currently downloaded application to the user. In this way, the user can intuitively see that the currently downloaded application is application 2, which can reduce the probability of incorrect download.

[0137] In one example, see Figure 6A As shown in Figure (a), the electronic device 100 displays a download interface 60 for browser application A. This webpage provides two download methods: local download and secure download. The corresponding download controls are 601 and 602 shown in Figure (a), respectively. The secure download here is different from the secure download mode involved in the embodiments of this application. The secure download here means that a security management application (taking Mobile Security Manager as an example) needs to be downloaded first, and then the browser application A is downloaded through the security management application. Therefore, when the user clicks the download control 602, the installation package of the "Mobile Security Manager" application will be downloaded first, instead of the installation package of the browser application A that the user expects. However, users often do not want to install too many security management applications on the electronic device 100.

[0138] Therefore, in this embodiment, after the user clicks the download control 602, they will obtain the download link corresponding to the download control 602, and obtain the information of the installation package pointed to by the download link. Based on the information of the installation package and a preset information database, the identifier of the application the user intends to download is identified and displayed. Figure 6A The reminder interface 61 shown in (b) prompts the user that "Mobile Security Manager" is currently being downloaded and asks whether to continue the download. It provides the user with an interactive confirmation control 611 and a cancellation control 612. The user can confirm or cancel according to their own situation. Clicking the confirmation control 611 will continue the download of the Mobile Security Manager installation package, and clicking the cancellation control 612 will cancel the download of the Mobile Security Manager installation package.

[0139] For example, a webpage for downloading an application might be hijacked to allow downloads of other file types, but the webpage would still display as the original application download page, leading users to mistakenly believe that the webpage is still for downloading applications. In other words, the download link on the webpage might be hijacked to point to a different type of file, or the download link itself might point to a file that is not an installation package, ultimately causing users to mistakenly download the wrong type of file.

[0140] In one example, see Figure 6B As shown in (a), the electronic device 100 displays a download interface 62 for video application B, which includes a download control 621 for video application B. The download control 621 originally corresponds to the download link 1 of video application B, but it has been tampered with to the download link 2 of other non-installation package files. This is imperceptible to the user, so the user will click the download control 621 to download video application B normally.

[0141] Therefore, in this embodiment, after the user clicks the download control 621, they will obtain the download link corresponding to the download control 621 and acquire the information of the installation package pointed to by the download link. Based on the information of the installation package and a preset information database, the identifier of the application the user intends to download is identified. Since the content pointed to by the download link is not an installation package, if the preset information database stores information about files of this non-installation package type, it can be determined that the currently downloaded content is not an installation package, and it will be displayed. Figure 6B The reminder interface 63 shown in (b) prompts the user that a non-installation package file (or the actual format of the output file, etc.) is currently being downloaded. The user is asked whether to continue the download and is provided with interactive confirmation controls 631 and cancellation controls 632. The user can confirm or cancel according to their own situation. Clicking the confirmation control 631 will continue the download of the file, and clicking the cancellation control 632 will cancel the download of the file.

[0142] Application Scenario 2: When a user triggers an application download, the application can be downloaded via a secure download mode by identifying the identifier of the application the user intends to download. Secure download mode refers to using the manufacturer's server (such as a third-party server 400) to download the installation package. Because the installation package provided by the manufacturer's server is a security-verified package, it helps improve the security of the downloaded installation package.

[0143] In one example, see Figure 6CAs shown in (a), the electronic device 100 displays a download interface 64 for game application A, which includes a download control 641 for game application A. This download control 641 corresponds to a download link for game application A. Therefore, in this embodiment, after the user clicks the download control 641, they obtain the download link corresponding to the download control 641 and acquire information about the installation package pointed to by the download link. Based on this installation package information and a preset information database, the identifier of the application the user intends to download is identified, and then game application A can be downloaded through a secure download mode.

[0144] There are several ways to download video applications using the secure download mode.

[0145] In implementation method 1, when the electronic device 100 executes the application identification method, after the electronic device 100 identifies the identifier of the application the user intends to download, it can call the application market APP on the electronic device 100, search for the application in the application market APP, and if the application is included in the application market, it can prompt the user to download the application through the application market APP. See also Figure 6C As shown in (b), the electronic device 100 displays a prompt interface 65, which may prompt "Game application A can be downloaded from the app store. Do you want to download the application from the app store?" and provide the user with interactive confirmation controls 651 and continue download controls 652. The user can confirm or continue downloading according to their own situation. If the user clicks the confirmation control 651, the game application A can be downloaded through the app store APP. For example, the electronic device 100 can automatically jump to the download interface of the app store APP and automatically download the installation package of game application A, or the user can click the download control on the next redirected interface to download the installation package of game application A. If the user clicks the continue download control 652, it means that the user wants to continue downloading game application A through the current download method, and then the game application A will continue to be downloaded through the web page download method.

[0146] In implementation method 2, when the second server 300 executes the application identification method, after determining the identifier of the application the user intends to download, the second server 300 can request the download link for game application A from the corresponding third server 400 in the application market based on the identification result. This download link points to the installation package in the second server 300. Then, the second server 300 can send the download link to the electronic device 100, and the electronic device 100 uses the download link to download game application A.

[0147] In implementation method 3, when the second server 300 executes the application identification method, after the second server 300 obtains the identifier of the application that the user intends to download, it can send the identification result to the electronic device 100. The electronic device 100 can use a method similar to implementation method 1 to call the application market to download the game application A, so it will not be elaborated further.

[0148] In some embodiments, redirecting a user from a webpage to an app store to download an app can be seamless. For example, a user can pre-configure themselves to prioritize downloading apps from the app store. Then, once the app the user intends to download is identified, and the app is available in the app store, the app can be downloaded directly from the app store without requiring further confirmation from the user.

[0149] Application Scenario 3: When a user triggers an application download, by identifying the app's identifier (e.g., the package name), the system can check if the app's installation package already exists. If it does, the system can perform a security check on the package. If the package poses a security risk, the system can display a warning to the user to reduce the probability of downloading a potentially risky package.

[0150] In one example, see Figure 6D As shown in (a), the electronic device 100 displays a download interface 64 for game application A, which includes a download control 641 for game application A. After the user clicks the download control 641, the identifier of the application the user intends to download can be determined. Then, when the installation package of game application A is stored, a risk detection can be performed on the installation package of game application A. See also... Figure 6D As shown in (b), the electronic device displays a prompt interface 66 on display 200. The prompt interface 66 may display the message "The currently downloaded installation package has a high risk, do you want to continue downloading?", and provides the user with interactive confirmation controls 661 and cancellation controls 662. The user can confirm or continue downloading according to their own situation. If the user clicks the confirmation control 661, the download of the game application A's installation package will continue via a webpage download. If the user clicks the cancellation control 662, the download of the game application A's installation package will be cancelled.

[0151] In some embodiments, the risk warning displayed to the user may include a risk level or specific risk content within the installation package, thus helping the user determine whether to continue downloading the installation package using the current method. For example, Figure 6D As shown in (b), the prompt interface can display information about whether the installation package includes plugin A and plugin B, or plugin A and plugin B, to help the user decide whether to continue downloading the installation package.

[0152] The technical solutions of this application embodiment can also be applied to any other possible scenarios, and this application embodiment does not limit them.

[0153] The above description shows how to determine the identifier of the application a user intends to download when the user performs an application download operation. The following section will explain the implementation principle of the method for determining the application identifier with reference to the accompanying drawings.

[0154] Please see Figure 7 The diagram shown is a flowchart illustrating a method for determining an application identifier according to an embodiment of this application. This method can be implemented by an electronic device (such as the electronic device 100 described above) or a client device within the electronic device (such as...). Figure 2 or Figure 3 The client (101) executes the command, or the client and a second server work together to execute the command. The following explanation uses client-side execution as an example. Figure 7 As shown, the process may include:

[0155] Step 701: The client receives a first operation for the first download link on the webpage, the first operation being used to download the first application.

[0156] Optionally, the first operation can be an operation performed by the user in any manner. For example, the first operation can be the user's operation on one or more keys on a keyboard. Another example is the user's touch operation. Yet another example is the user's mouse click operation, etc. This application does not limit the specific manner of the first operation.

[0157] In some embodiments, users can download applications through methods other than the application market APP that comes pre-installed on the electronic device. For example, they can download applications through a webpage or through other application markets that are installed on the electronic device. In this case, the first operation can be the operation triggered when downloading applications through these methods. In this embodiment, webpage download is mainly used as an example for explanation.

[0158] In one example, such as Figure 3 In the architecture shown in (a), the client can be a browser application (using a browser application as an example, but it could also be another host program), or the client can be included within a browser application. Then the browser (or client) can display a first webpage, which can be used to download the application. Optionally, the first webpage includes a first download link for downloading the first application, and the first operation can be an operation performed on the first download link.

[0159] In another example, such as Figure 3In the architecture shown in (b), the client application can be independent of the browser application. The browser can display a first webpage, which can be used to download the application. The first webpage includes a first download link for downloading the first application, and the first operation can be an operation performed on the first download link. The client can detect the first operation through the interface provided by the browser application, or the client can request permission from the operating system of the electronic device to detect the first operation through the operating system's system interface, or it can achieve the detection of the first operation through other possible means.

[0160] The first download link is used to download the first application, or in other words, to download the first installation package. In some embodiments, the first download link can be directly displayed on the first webpage, and the first operation can refer to the operation performed on the first download link itself. In some embodiments, the first download link may not be displayed directly on the first webpage, but rather in the form of a first download control associated with the first download link. Therefore, an operation performed on the first download control can also be an operation performed on the first download link; that is, the first operation can also be an operation on the first download control. Optionally, the first download control can be displayed as an icon, which can be called a download icon. Operating on the download icon can trigger the download of the corresponding first application. The first download control can also be displayed as text.

[0161] Optionally, in addition to including the first download link for the first application, the first webpage may also include download links for other applications. For example, in one example, the first webpage is the download page for the first application, and it may also include other applications recommended for download by the user. As another example, the first webpage may be the download page for a second application, where the first application is a recommended application for download, or an application associated with the second application (e.g., the first application must be downloaded before the second application can be downloaded).

[0162] Step 702: The client responds to the first operation by obtaining the first information based on the first installation package stored on the first server. The first installation package is the installation package of the first application, and the first server is the server corresponding to the first download link.

[0163] The first download link points to the first installation package stored on the first server. For example, the first download link could be a file storage path on the first server, allowing access to and retrieval of the first installation package stored in the corresponding storage space. After the user triggers the first operation, the client can obtain the first information based on the first installation package pointed to by the first download link. Specifically, the client can obtain the first download link in the following way:

[0164] Method 1: The first download link is displayed on the first webpage. Therefore, the first download link accessed by the user can be determined based on the position of the user's first action on the first webpage.

[0165] Method 2: The first webpage displays a first download control corresponding to the first download link. The first download control corresponds to (or is associated with) the first download link. After performing a first operation on the first download control, the corresponding first download link can be obtained based on the correspondence between the first download control and the first download link. For example, if the first download control is a download icon, then the first download link is the link corresponding to that download icon. Taking webpage download as an example, the content of a webpage is included in a webpage description file, which can be, for example, an HTML file. In the HTML file, both the first download control and the first download link are elements within the webpage. The first download control is used to implement user interaction and represents the external display effect of the first download link. The first download link allows users to download files, such as the first installation package of a first application.

[0166] For example, the following is a sample of source code from an HTML file:

[0167] <a rel="nofollow"href="https: download.xxxxxxxxx>

[0168] <span style="right:35px;"> download

[0169]

[0170] in, The `<link>` tag indicates that the example above is a hyperlink element used to create a clickable link pointing to a specified Uniform Resource Locator (URL). `rel="nofollow"` indicates that this is a link attribute, telling search engines not to follow this link. `href="https: / / download.XXXXXXXXX"` is the first download link, pointing to the file to be downloaded; the `download` attribute indicates that this content is a download link. The tag indicates that this is an inline element, used to add extra text or styles inside the link. The internal text content is "Download," which is the link text that users see on the webpage, specifically the aforementioned clickable first download control. Therefore, the first download link can be obtained by analyzing the HTML file.

[0171] Method 3: Generally, after the user performs the first operation on the first download control, the browser sends a request to the first server to download the first application via the first download link, thus downloading the first installation package from the first server. The browser's request will then carry the first download link, which can also be obtained through this request. For example, the client can intercept this request and obtain the first download link carried within it.

[0172] In some embodiments, the above methods can be used alone or in combination, without specific limitations.

[0173] After obtaining the first download link, the client can access the first installation package stored on the first server through the first download link, and then obtain the first information based on the first installation package. The first information is determined based on the data in the first installation package, which may be a portion of the data in the first installation package. That is, this method does not need to obtain all the information of the first installation package, but only determines the identifier of the first application based on the key information in the first installation package. The first information can be used to identify the first installation package, or in other words, the first information is the characteristic information of the first installation package. Optionally, the first information can be any information related to the first installation package that can be used to identify the first installation package. The first information can be included in the first installation package, or it can be converted from the information in the first installation package. For example, the first information may indicate one or more of the following:

[0174] (1) Signature of the first installation package. For ease of description, in this embodiment, the information indicating the signature of the installation package is referred to as the first fingerprint. The first fingerprint can also be called the first application fingerprint or other names, without limitation, and will be uniformly referred to as the first fingerprint thereafter. The first fingerprint is determined based on the signature of the first installation package. For example, the first fingerprint can be the signature of the first installation package, or the first fingerprint can be obtained by converting the signature of the first installation package. Optionally, the method of converting the signature of the first installation package can be to perform a hash calculation on the signature of the first installation package, then the first fingerprint is the hash value of the signature of the first installation package. The signature of the first installation package can also be called a digital signature. A digital signature is a mechanism used to verify the authenticity and integrity of a software package or file. A digital signature encrypts the hash value of the file using a private key, and then decrypts and verifies it using the corresponding public key. The first installation package usually includes a signature data block, and the signature of the first installation package can be obtained by reading the signature data block, thereby obtaining the first fingerprint. Since the probability of digital signatures of different first installation packages being repeated is low, the probability of the first fingerprint determined based on the signature of the first installation package being repeated is also low. Therefore, different applications can be identified by the first fingerprint.

[0175] (2) The first data in the first installation package, wherein the first data is the data located at the first position in the first installation package. Optionally, the first position may include any data position specified in the first installation package. For example, the first data may be a data segment of a specified length starting from the first data position in the first installation package, or it may be a data segment of a specified length starting from the last data position in the first installation package, etc., without limitation. For ease of description, in this embodiment, the information indicating the first data in the first installation package is referred to as the second fingerprint. The second fingerprint may also be referred to as the second application fingerprint or other names, without limitation, and will be uniformly referred to as the second fingerprint thereafter. The second fingerprint is determined based on the first data in the first installation package. Optionally, the second fingerprint may be the first data, or it may be obtained by converting the first data. Optionally, the first data may be converted by performing a hash calculation on the first data, then the second fingerprint is the hash value of the first data. Since the data contained in different first installation packages are often different, comparing the extracted first data can also achieve the effect of identifying the application to a certain extent.

[0176] (3) The data volume of the first installation package, i.e., the size of the first installation package. In one example, the first installation package typically includes a size field, such as a filesize field. The data volume of the first installation package can be obtained by reading the value corresponding to this field. The data volume of the first installation package can help verify whether the identified first application is accurate, thereby improving the accuracy of the obtained first application identification.

[0177] The first information may also include any other information that can be used to identify the first installation package, and this application embodiment does not impose any restrictions on this. The method by which the client obtains the first installation package will be described in detail later, and will not be elaborated on here.

[0178] Step 703: The client determines that the identifier corresponding to the first information is the identifier of the first application. The identifier of the first application is used to download the installation package of the first application from a download path other than the first server.

[0179] Optionally, the identifier of the first application can be the package name of the first installation package, the application name of the first application, or other identifiers. The first installation package is the installation package of the first application that the user intends to download, and the identifier of the first application can also be understood as the identifier of the first installation package.

[0180] In this embodiment, the correspondence between information and identifiers of installation packages (or applications) can be pre-stored. After obtaining the first information of the first installation package, the identifier corresponding to the first information can be determined as the identifier of the first application. Alternatively, information of different installation packages (or applications) can be pre-stored. The pre-stored information of the first installation package can be called the second information. The second information may include the correspondence between third information and the application's identifier. In other words, the second information includes the third information and the application's identifier. The third information is of the same type as the first information; for distinction, they are referred to as first and third, but the content they include can be the same. For example, the third information may indicate one or more of the first installation package's signature, first data, or data volume. Then, based on the first information of the first installation package, a match can be made among these information, and the identifier corresponding to the matched information can be determined as the identifier of the first application.

[0181] In some embodiments, a database can be constructed to store information obtained from each installation package. This database may also be called an application database or a fingerprint database, etc. For ease of description, it will be referred to as an application database in the following text.

[0182] By pre-extracting information from multiple installation packages—indicating one or more of the package's signature, first data, or data volume—when a user triggers the first operation to download the first application, the first information of the first installation package can be matched with an application information database. If a match is successful, for example, if the first information matches the third information included in the second information in the application information database, the first identifier in the successfully matched second information can be identified as the first application's identifier, thus successfully identifying the first application to be downloaded. Since this application identification method does not require analysis of the webpage structure and is unaffected by changes in browser webpage structure, the release of new webpages, or the complexity of text information within webpages, it reduces the probability of application identification errors caused by changes in webpage structure, greatly improving the accuracy of application identification. Furthermore, this application identification method, through information matching, only achieves successful application identification when the first information completely matches the information in the application information database, further improving the accuracy of determining the identifier of the application the user intends to download.

[0183] Step 704: The client outputs a prompt message based on the first identifier of the first application.

[0184] In some embodiments, the client may employ, for example Figures 6A to 6D The method shown outputs the corresponding prompt information based on the first identifier of the first application, so it will not be described in detail here.

[0185] Optionally, step 704 is optional; that is, step 704 can be executed or not. Figure 7 It is shown in dashed lines.

[0186] In some embodiments, the client may determine the identifier of the first application in a variety of ways.

[0187] Method 1: If the client configures an application information database locally, the client can store the information obtained from the installation package locally. The client can perform a local matching process, that is, match the first information of the first installation package with the application information database, and determine the first identifier included in the successfully matched second information as the identifier of the first application.

[0188] In some embodiments, the information in the application information repository on the client's local machine can be obtained by the client based on the downloaded installation package. For example, the client can detect events where an electronic device downloads an application installation package. When a download event is detected, the client can extract information based on the downloaded installation package and store it in the application information repository.

[0189] In some embodiments, the client can load information into the application information repository from the second server. When the information stored in the application information repository on the second server is updated, the second server can notify the client to perform an incremental update.

[0190] Method 2: If the second server is configured with an application information database, the client can request the second server to determine the identifier of the first application.

[0191] In one example, see Figure 8 The diagram shown is another flowchart illustrating the method for determining the identifier of an application provided in an embodiment of this application.

[0192] Step 801: The client receives a first operation for the first download link on the webpage, the first operation being used to download the first application.

[0193] Step 802: The client responds to the first operation and obtains the first information based on the first installation package stored on the first server. The first installation package is the installation package of the first application, and the first server is the server corresponding to the first download link.

[0194] Steps 801-802 are the same as those described above. Figure 7 Steps 701-702 shown are similar and can be found in [reference]. Figure 7 The descriptions of the corresponding embodiments will not be repeated here.

[0195] Step 803: The client sends a first request to the second server. The first request is used to request the second server to determine the identifier of the first application, and the first request includes first information. In other words, the first information included in the first request is used to determine the identifier of the first application. Accordingly, the second server receives the first request.

[0196] In one example, the client can call the identification interface of the second server to send a first request to the second server, requesting the second server to identify the identifier of the first application that the user intends to download based on the first information of the first installation package.

[0197] Step 804: The second server determines that the identifier corresponding to the first information is the identifier of the first application. The identifier of the first application is used to download the installation package of the first application from a server outside the first server.

[0198] The application information database in the second server includes information obtained from at least one installation package, which may indicate one or more of the following: the installation package's signature, first data, or data volume. The second server can identify the first application by matching the first information of the first installation package with the application information database and determining the first identifier included in the successfully matched second information as the identifier of the first application. The second information includes a correspondence between third information and the first identifier, or in other words, the second information includes both third information and the first identifier.

[0199] Step 805: The second server sends the first identifier of the first application to the client. Correspondingly, the client receives the first identifier of the first application.

[0200] In this implementation, the process of matching the application information database can be performed by a second server. Compared to the client, the server has higher computing power, which can improve the efficiency of the application information database matching process. On the other hand, it can also reduce the steps required by the client, reduce the load on the electronic device, and reduce the probability of the electronic device lagging.

[0201] In some embodiments, to improve the download efficiency of the installation package, the second server may also send the installation package of the first application that the user intends to download to the client. The second server can send the installation package to the client in two ways: method 1 corresponds to steps 806-807, and method 2 corresponds to steps 808-810. Steps 806-807 or steps 808-810 are optional steps, therefore... Figure 8 It is shown in dashed lines.

[0202] Step 806: The second server obtains the second installation package of the first application based on the identifier of the first application.

[0203] In one example, if the second server stores the installation packages of certain applications, the second server can query the locally stored installation packages based on the first identifier of the first application. If the query is successful, the second server can obtain the second installation package of the first application from the local storage.

[0204] In another example, the second server can also send a request to a third server in the application marketplace of the electronic device to obtain the installation package. If the third server has stored the second installation package of the first application, then the third server can send the second installation package to the second server.

[0205] The second installation package and the first installation package can be completely identical installation packages, or they can be different versions of the same application installation packages. Here, they are referred to by different names to distinguish the source of the installation packages. The first installation package refers to the installation package stored in the first server corresponding to the download webpage, and the second installation package refers to the installation package stored in the second server or the third server in this application embodiment.

[0206] Step 807: The second server sends the second installation package to the client. The client then receives the second installation package.

[0207] Step 808: The second server obtains the second download link for the second installation package based on the first identifier of the first application.

[0208] Step 809: The second server sends a second download link to the client. The client then receives the second download link.

[0209] Step 810: The client downloads the second installation package from the second download link.

[0210] In some embodiments, the second server may also send a second download link to the client, the second download link pointing to a second installation package, which the client can download. The second download link may point to a second server, a third server, or any storage space associated with the second or third server.

[0211] Optionally, the identifier of the first application, the second installation package, or the second download link mentioned above may be sent to the client in a single response, or they may be sent to the client separately; there is no limitation on this.

[0212] In some embodiments, the execution of steps 806-807 or 808-810 may have preconditions. For example, the precondition is that the user agrees to download the installation package from a second server or a third server. In one example, the user may pre-configure that the installation package is downloaded from the second server or the third server first, i.e., the installation package is downloaded from the second server or the third server by default. Then, the second server can send the second installation package to the client by executing steps 807-808 or 809-811, or the second server can send the second download link to the client by executing steps 809-811. In another example, in step 806, the client may prompt the user whether to download the application using a secure download mode or download the application from the app store. After the user confirms, the second server can send the second installation package to the client by executing steps 807-808 or 809-811, or the second server can send the second download link to the client by executing steps 809-811.

[0213] In one example, see Figure 9 The diagram shown is another flowchart illustrating a method for determining the identifier of an application provided in an embodiment of this application.

[0214] Step 901: The client receives a first operation for the first download link on the webpage. The first operation is used to download the first application. The first download link points to the first server, or the first download link points to the first installation package stored on the first server.

[0215] Step 902: The client responds to the first operation and obtains the first download link for the first application. The first download link is used to download the first installation package of the first application.

[0216] When the first download link is directly displayed on the webpage or obtained in advance, the first download link is known to the client, so step 902 can be skipped. Therefore, step 902 is optional. Figure 9 The dashed line is used to represent the middle part.

[0217] Step 903: The client sends the first download link to the second server. Correspondingly, the second server receives the first download link.

[0218] Step 904: The second server obtains the first information of the first installation package based on the first download link.

[0219] The process by which the server obtains the first information of the first installation package is similar to the process by which the client obtains the first information of the first installation package, so please refer to the above description and I will not go into details.

[0220] Step 905: The second server determines the first identifier of the first application based on the first information of the first installation package and the application information database.

[0221] Step 906: The second server sends the first identifier of the first application to the client. Correspondingly, the client receives the first identifier of the first application.

[0222] Step 907: The client outputs a prompt message based on the first identifier of the first application.

[0223] The processing steps described above can be found in [reference needed]. Figure 7 or Figure 8 The relevant sections will not be repeated here.

[0224] In this implementation, the client can send the obtained first download link to the second server, and subsequent steps can be entirely performed by the second server. Compared to the client, the server has higher computing power, which can improve the efficiency of application recognition. On the other hand, it can also reduce the steps that the client needs to perform, reduce the load on the electronic device, and reduce the probability of the electronic device lagging.

[0225] In some embodiments, considering the potential security risks of installation packages downloaded via web page downloads, the client can pause the download of the first application after detecting the first operation to avoid downloading installation packages with security risks. See also... Figure 10 The diagram shown is another flowchart illustrating the method provided in this application embodiment.

[0226] Step 1001: The client receives the first operation, which is used to download the first application.

[0227] Step 1002: In response to the first operation, the client pauses the download of the first installation package. Alternatively, the client may not block the download of the first installation package, but pause the decompression or installation of the package after the download is complete.

[0228] Step 1003: The client responds to the first operation and obtains the identifier of the first application.

[0229] In step 1003, the above-mentioned method can be used. Figures 7-9 The first identifier of the first application is obtained in any of the corresponding embodiments.

[0230] Step 1004: The client outputs a prompt message based on the identifier of the first application.

[0231] The prompt message could be, for example, like this: Figures 6A to 6D The prompts shown may include: outputting the identifier of the first application; outputting a prompt asking whether to download the first installation package; outputting a prompt asking whether to download the installation package of the first application using the first download mode, which is used to download the installation package of the first application from other download paths, such as from the second server or the third server corresponding to the application market; and outputting risk information for the first installation package.

[0232] Step 1005: The client receives the second operation. The second operation is a feedback operation in response to the prompt information. For example, the second operation is to confirm the download of the first application through the first download mode, that is, to select to download the first application from the second server or the third server corresponding to the application market; or, the second operation is used to select to continue downloading the first installation package from the first server.

[0233] Step 1006: If the second operation is used to instruct the download of the first installation package, the client sends a request to the first server to download the first application in order to download the first installation package from the first server.

[0234] In one example, the client can pause the download of the first installation package by intercepting the first download request sent to the first server. When it needs to resume downloading the first installation package, the client can send the intercepted first download request back to the first server to continue downloading it. In another example, the client can also regenerate the application download request based on the first download link and send the regenerated request to the first server to continue downloading the first installation package.

[0235] Step 1007: If the second operation is used to instruct the first application to be downloaded via the first download mode, the client sends a fourth request to the second server to download the second installation package of the first application from the second server. Alternatively, the client sends a fourth request to the third server to download the second installation package of the first application from the third server.

[0236] This implementation method allows users to be prompted to use a more secure method to download the installation package based on the application's identification results, thus improving the security of the downloaded installation package. Users can also choose to continue downloading the first installation package from the original webpage to suit their own needs.

[0237] The above description shows how to obtain first information based on the first installation package pointed to by the first download link. The following text will explain the implementation principle of obtaining first information based on the first installation package pointed to by the first download link in conjunction with the accompanying drawings.

[0238] In some embodiments, electronic devices can install different operating systems, and the formats of the installation packages compatible with different operating systems are different. For example, the installation package for the Android operating system is the Android application package (APK), the installation package for the OH or HarmonyOS operating system is the HarmonyOS ability package (HAP), and the installation package for the Linux operating system is the Red Hat package. Although the structures of different installation packages are different, the principle of obtaining the first information of the first installation package is similar. They all determine the location of the required information based on the structure of each type of installation package, and then read the required information according to the location. The following explanation uses an APK package as the first installation package as an example.

[0239] Please see Figure 11A The diagram shows the structure of an APK file. An APK file contains a data area (contents of ZIP entries), an APK signing block, a central directory, and an end record of the central directory.

[0240] An APK signature block includes an APK signature block length field, N key-value pairs, the APK signature block length itself, and the magic number of the APK signature block. The two APK signature block length fields in an APK signature block are identical, and the value of the APK signature block length field indicates the length of the entire APK signature block. The N key-value pairs are used to store the specific signature data of the signature block. The complete signature data is divided into N parts, and each of the N parts is stored in a key-value pair. The magic number is usually a fixed sequence of bytes used to identify the type or format of this data block. The magic number of the signature block identifies this data block as signature data, or signature data in a specific format. See also... Figure 11A As shown, the magic number of the APK signature block occupies 16 bytes, and the 8 bytes before the magic number are the length of the APK signature block.

[0241] The end-of-file record in the central directory area marks the end of a file and describes its overall structure. It contains crucial data about the file, such as the total number of files and the starting address of the central directory area. This information helps locate and correctly parse the file structure, enabling efficient reading and manipulation of file content. See also... Figure 11A As shown, the end-of-central-directory record can include the magic number of the end-of-central-directory record, other fields, and the starting address field of the central-directory section. The magic number of the end-of-central-directory record serves a similar purpose to the magic number of the APK signature block; it identifies that this data block belongs to the end-of-central-directory record, or a central-directory record with a specific format. See also... Figure 11A As shown, the magic number recorded at the end of the central directory area occupies 4 bytes, other fields occupy 12 bytes, and the central directory area start address field occupies 4 bytes. The central directory area start address can also be called the central directory start disk number.

[0242] Therefore, based on the above structural description, we know that by reading the data at the end of the APK file, including the end record of the central directory area, and considering that the magic number of the end record of the central directory area is a fixed sequence value, we can determine the starting address of the end record of the central directory area. Offset this starting address by 16 bytes gives us the starting address of the central directory area. Offset this starting address by 16 bytes gives us the APK signature block length field. Finally, based on the signature block length, we can determine the portion of the installation package that belongs to the APK signature block.

[0243] See Figure 11BThe diagram illustrates a process for obtaining first information from a first installation package stored on a first server, as provided in an embodiment of this application. This process can be executed by a client (or electronic device) or by a second server; here, client execution is used as an example. Steps 1101-1108 are the process for obtaining the first fingerprint, steps 1109-1111 are the process for obtaining the second fingerprint, and steps 1112-1113 are the process for obtaining the data volume of the first installation package. In practical scenarios, these three processes can be executed individually or in combination, without limitation.

[0244] Step 1101: The client sends a second request to the first server, requesting to read the second data included in the first installation package. The first server is the server pointed to by the first download link, and the second data is data of a first length located at the end of the first installation package, or in other words, data of a first length preceding a first address, where the first address is the data end address of the first installation package. For example, the second data includes the data including the record at the end of the central directory area. Since the client does not know the data length of the record at the end of the central directory area, the client can request the first server to obtain data of a first length, which is usually greater than its data length. The value of the first length can be set empirically.

[0245] Optionally, the second request may or may not include the first address. If the first address is not included, the data to be read can be determined by the type of the request message or a pre-configured default address.

[0246] Step 1102: The first server sends the second data to the client. Correspondingly, the client receives the second data.

[0247] The client can then determine the signature of the first installation package based on the second data. In some embodiments, the client can parse the second data to obtain the signature of the first installation package. In some embodiments, the client can also determine the position of the signature of the first installation package in the first data packet based on the second data to obtain the signature of the first installation package. See also... Figure 11B Steps 1103 to 1105 are illustrated using this method as an example.

[0248] Step 1103: The client determines the second address based on the second data. The second address is the address of the first data block in the first installation package. For example, the second address is the start or end address of the first data block. The first data block includes the signature of the first installation package, for example, the first data block is an APK signature block.

[0249] In some embodiments, such as in an APK file, the second address can be the end address of the first data block. Since the central directory area is located adjacent to the first data block, the second address can also be the start address of the central directory area in the first installation package, and the end address of the APK signature block is the address preceding the start address of the central directory area. For example, after the client obtains the second data, because the magic number recorded at the end of the central directory area is a fixed sequence value, the start address of the end record of the central directory area can be determined based on the magic number. Offset this start address by 16 bytes to obtain the start address of the central directory area, thus yielding the second address.

[0250] Step 1104: The client sends a third request to the first server. The second read request is used to read third data, which is data of a second length related to the second address. For example, in an APK file, the second address is the end address of the first data block, and the third data can be data of a second length preceding the second address. Alternatively, in an installation package with other data formats, the second address is the start address of the first data block, and the third data can also be data of a second length following the second address.

[0251] Optionally, the second length can be an empirical value, such as a value greater than the signature block length determined based on experience, so that data including the APK signature block can be read into the client.

[0252] Step 1105: The first server sends third data to the client. Correspondingly, the client receives the third data.

[0253] Therefore, the client can obtain the signature of the first installation package based on the third data, and determine the first fingerprint based on the signature of the first installation package. Please see below. Figure 11B Steps 1106-1107 in the diagram illustrate one possible way to obtain the signature of the first installation package based on the third data.

[0254] Step 1106: The client determines the third length corresponding to the signature of the first installation package from the third data.

[0255] Taking APK as an example, combined with Figure 11A As you can see, the APK signature block length field is 16 bytes forward from the starting address of the central directory area (i.e., the second address). So, 16 bytes forward from the end of the obtained third data is the end of the APK signature block length field. Reading 8 bytes forward from the end gives you the third length.

[0256] Step 1107: The client determines the signature of the first installation package from the third length of data starting from the second position of the third data. The second position is, for example, the end of the second data, or it can be a position determined by a second address, such as offsetting the second address forward by 24 bytes. Figure 11A The key-value pair n before the APK signature block length is shown in the figure.

[0257] In some embodiments, the client can obtain the signature of the first installation package by reading data of the third length from the last bit of the third data backwards. Alternatively, if the length of the second data is less than the third length, it indicates that the read third data does not include the complete signature block. In this case, the client can request the first server to read the third length of data starting from the end of the third data to obtain the signature of the first installation package.

[0258] Step 1108: The client determines the first fingerprint based on the signature of the first installation package. For example, the signature of the first installation package can be used as the first fingerprint, or the first fingerprint can be obtained by hashing the signature of the first installation package.

[0259] Since the first installation package pointed to by the first download link is stored on the first server, the first installation package may not be in a standard format. For example, the content pointed to by the first download link may not be an APK file. Therefore, the method of collecting the signature of the installation package according to the APK structure may not be usable, which may result in the first fingerprint not being successfully obtained.

[0260] In some embodiments, if the first fingerprint acquisition fails (which may be due to the failure of any of the above steps), steps 1109 to 1111 can be executed to acquire a second fingerprint as a backup data for subsequent identification applications.

[0261] In some embodiments, regardless of whether the first fingerprint is successfully acquired, steps 1109 to 1111 can be continued to acquire the second fingerprint, which will then be used as one of the data bases for subsequent identification applications. That is, if the first fingerprint is successfully acquired, the application identification process will be performed based on the first fingerprint and / or the second fingerprint; if the first fingerprint is not successfully acquired, the application identification process will be performed based on the second fingerprint.

[0262] Step 1109: The client sends a seventh request to the first server. This seventh request is used to read the first data from the first installation package. The first data is the data at a first position within the first installation package. Optionally, the seventh request may include the starting address of the first data. The seventh request is used to read data of a specified length starting from that address, and the first position includes the data position of the specified length starting from that address. Alternatively, the seventh request may not include any address. The client and the first server agree to read data of a specified length starting from a specified position in the first installation package, for example, the specified position may be the start address or end address of the first installation package.

[0263] Step 1110: The first server sends the first data to the client.

[0264] Step 1111: The client determines the second fingerprint based on the first data. Optionally, the second fingerprint is the first data, or the second fingerprint is obtained by transforming the first data, such as the hash value of the first data. Regardless of whether the first fingerprint can be successfully obtained, the data of the first length in the first installation package can definitely be successfully obtained, therefore the second fingerprint can definitely be successfully obtained.

[0265] Step 1112: The client sends an eighth request to the first server. The eighth request is used to obtain the data size of the first installation package. In some embodiments, the data size of the installation package is an attribute of the installation package, such as the filesize, and the value of this attribute can be read through the application programming interface (API) provided by the first server.

[0266] Step 1113: The first server sends the data volume of the first installation package to the client.

[0267] This process obtains the first fingerprint, second fingerprint, and data volume of the first installation package, allowing one or more of these to be used as the primary information for identifying the application. Since this information is determined based on the first installation package on the first server and is independent of the webpage structure of the downloaded webpage, it is unaffected by changes in browser webpage structure, the release of new webpages, or the complexity of text information within the webpage. This reduces the probability of application identification errors caused by changes in webpage structure, significantly improving the accuracy of application identification. Furthermore, this application identification method uses the information from the installation package as its fingerprint, matching the fingerprint with an application information database to achieve application identification. Successful application identification is only achieved when the fingerprint completely matches the information in the application information database, further enhancing the accuracy of identifying the application the user intends to download.

[0268] In some embodiments, a first fingerprint is determined based on a signature in the first installation package. The uniqueness of the signature in the installation package ensures the uniqueness of the first fingerprint, which helps improve recognition accuracy. When the first fingerprint acquisition fails, a specific length of header data from the first installation package is collected as a second fingerprint, which helps improve the recognition capability of non-standard format installation packages.

[0269] In some embodiments, after an electronic device downloads and installs an application package, it can obtain relevant information from the installation package and store it in an application information database so that it can subsequently determine the application's identifier based on the information in the application information database.

[0270] See Figure 12 The diagram shown is a flowchart illustrating a maintenance application information database provided in an embodiment of this application.

[0271] Step 1201: The client responds to the completion of the download of the first installation package and obtains the first information and the identifier of the first application based on the stored first installation package.

[0272] In addition to the first installation package, it can also execute any installation package downloaded to the electronic device. Figure 12 The process can be, for example, the second installation package mentioned above, or a third installation package, a fourth installation package, etc., in addition to the second installation package.

[0273] The first information of the first installation package may include one or more of the first fingerprint, second fingerprint, or data volume of the first installation package.

[0274] After downloading the first installation package, since it is stored locally on the electronic device, the client can obtain the first information and the identifier of the first application by parsing the first installation package. This differs from the process described above, where the first information is obtained from the first installation package stored on the first server. The first difference is that in the previous process, the first information was collected from the first installation package linked by the first download link, while here, after downloading the first installation package, the first information and the identifier of the first application can be extracted from the locally stored first installation package. The second difference is that when obtaining the first information from the first installation package stored on the first server, a second fingerprint might be obtained as a fallback only if the first fingerprint acquisition fails. However, here, when extracting the first information from the locally stored first installation package, as much information as possible can be extracted into the application information database. Therefore, the extracted first information from the first installation package can simultaneously include the first fingerprint and the second fingerprint, etc.

[0275] In some embodiments, after parsing the first installation package, a first fingerprint can be obtained based on the signature of the first installation package, a second fingerprint can be obtained based on the first data of the first installation package, and attributes such as the data volume of the first installation package can be extracted. Each installation package typically includes a configuration file (or header file), which includes configuration information of the installation package, such as the application identifier (e.g., package name or application name). Therefore, after parsing the first installation package, the identifier of the first application can be obtained from the configuration file.

[0276] In one example, taking the first installation package as an APK, the APK package can be parsed, the first fingerprint can be obtained from the APK signature block, the second fingerprint can be obtained from the data of a specified length in the header, the size of the APK package can be calculated, and the package name of the first installation package can be obtained from the manifest configuration file in the APK package, and this information can be stored in the application information database.

[0277] In some embodiments, the client can detect the download of applications on the electronic device, and when the application download is complete, extract the necessary information from the downloaded installation package. For example, if the client is a browser or included in a browser, the client can extract the necessary information from the downloaded installation package after the browser downloads it.

[0278] Step 1202: The client stores the first information and the identifier of the first application in the application information database.

[0279] In some embodiments, when configuring the application information repository locally on the client, the relevant information of the extracted first installation package can be stored in the local application information repository.

[0280] Step 1203: The client sends a fifth request to the second server. This fifth request is for reporting information about the downloaded installation package and includes the first information and the identifier of the first application. For example, the client can call the second server's reporting interface to send the fifth request to the second server.

[0281] Step 1204: The second server stores the first information and the identifier of the first application in the application information database.

[0282] In some embodiments, when the application information database is deployed on the second server, after the client extracts the first information and the identifier of the first application, it can report the obtained first information and the identifier of the first application to the second server for storage. Then, this information can be used to determine the identifier of the first application downloaded by other clients.

[0283] In some embodiments, in addition to the first information and application identifier mentioned above, the application information database of the second server can also calculate the first number of installations and the first duration of the installation package. For example, for the first installation package, the first number is the cumulative number of times the first information and the identifier of the first application of the first installation package reported by clients (this client does not refer to a specific client, but all clients that may report), that is, the total number of times the second server receives the relevant information of the first installation package. Since the client reports the relevant information of the first installation package once when the first installation package is downloaded to the electronic device, the first number can also be called the cumulative number of downloads or the cumulative number of reports. Optionally, the first number can be the cumulative number of times starting from the first time the second information of the first installation package is received, or it can be the cumulative number of times within a specified time period, without specific limitations. The first duration is the time difference between the time when the first information of the first installation package is first received from the client and the current time, or in other words, the first duration is the cumulative reporting duration of the second information of the first installation package. The reporting duration can be understood as the time difference between the time when the second server first receives the relevant information of the first installation package and the current time. Optionally, the time when the information related to the first installation package is first received can be either the time when the second server actually receives the information related to the first installation package for the first time, or the time when the information related to the first installation package is first received within a specified time period; there are no specific restrictions on this. Optionally, the granularity of the first duration can be hour, day, week, or month, etc. When the granularity of the first duration is day, the first duration can also be called the cumulative number of days.

[0284] For example, Table 1 below shows a structural example of an application information base, which is specifically illustrated using a second piece of information.

[0285]

[0286] Table 1

[0287] In some embodiments, when the second server stores the information reported by the client, it can also verify whether the report is a malicious report (or a malicious attack). Only when it is determined that the report is not malicious will the information reported by the client be stored in the application information database, so as to improve the reliability of the information stored in the application information database.

[0288] See Figure 13 The diagram shown is another flowchart illustrating the maintenance application information database provided in this application embodiment.

[0289] Step 1301: The client responds to the completion of the download of the first installation package and determines the second identifier based on the download time of the first installation package. The second identifier is used to indicate the first time period in which the download time is located.

[0290] This can also be understood as a time period constituting a cycle or reporting cycle. The second identifier can then be used to identify the reporting cycle in which the download time of the first installation package falls. Each reporting cycle corresponds to a unique second identifier, which can also be called a cycle identifier (identity, ID). Optionally, the granularity of the reporting cycle can be daily, weekly, or monthly. In one example, the granularity of the reporting cycle is daily, and the second identifier can also be called a daily ID. After the first installation package is downloaded, its second identifier can be determined based on the download date. This second identifier uniquely identifies the download date. For example, the second identifier can be the download date, or it can be a hash value calculated based on the download date, or it can be generated using other methods; there are no restrictions on this.

[0291] In some embodiments, the reporting period value can be a default value or a configuration value sent by the second server to the client. The client can generate a second identifier for each period according to the pre-configured reporting period value.

[0292] Step 1302: The client obtains the first information of the first installation package and the identifier of the first application.

[0293] The method by which the client obtains the second information of the first installation package can be found in [reference needed]. Figure 12 The details of step 1201 will not be repeated here.

[0294] Step 1303: The client sends a fifth request to the second server. This fifth request is for reporting information about the client's downloaded installation package. The fifth request includes a second identifier, first information, and the identifier of the first application. For example, the client can call the second server's reporting interface to send the fifth request to the second server. Correspondingly, the second server receives the fifth request.

[0295] In some embodiments, before sending the fifth request, the client may first determine whether it has already reported the information of the first installation package to the second server. If it has already reported, step 1303 can be skipped; if it has not been reported, step 1303 is executed. Optionally, determining whether the information of the first installation package has been reported to the second server may refer to whether the information of the first installation package has been reported to the second server within the reporting period corresponding to the second identifier.

[0296] Step 1304: The second server determines the total number of reports made by the client within the first time period. The total number of reports made by the client is the number of requests received from the client to report information about the installation package (or application), or in other words, the number of times the client reported information about the installation package (or application).

[0297] For example, the second server can store relevant statistical data for each time period. This statistical data can include the number of times each client reports information. The second server can then determine the corresponding first time period based on the second identifier and query the total number of reports for that client in the statistical data for that first time period. Optionally, the statistical data can be stored in a cache or persistently stored on disk. Optionally, the total number of reports can include only the number of times the client reports the first information of the first installation package, or it can include the number of times the client reports information of any installation package.

[0298] Step 1305: The second server determines whether the total number of reports is greater than the third threshold. If the determination result of step 1306 is no, that is, the total number of reports is less than or equal to the third threshold, proceed to step 1306. If the determination result of step 1305 is yes, that is, the total number of reports is greater than the third threshold, proceed to step 1309.

[0299] Step 1306: The second server determines whether it has already received the same information from the client, namely the first information and the identifier of the first application mentioned above. If the determination result of step 1306 is no, that is, no first information and the identifier of the first application have been received from the client, proceed to step 1307; if the determination result of step 1306 is yes, proceed to step 1309.

[0300] In some embodiments, the second server can store the reporting records of each client. Therefore, querying whether a client's reporting record exists can determine whether the first information and the identifier of the first application have been received from that client. For example, based on the first information and the identifier of the first application from the client, it can be queried whether the client's record already contains these information. If it does, it means the second server has received the first information and the identifier of the first application sent by the client; otherwise, if it does not, it means the second server has not received the first information and the identifier of the first application sent by the client.

[0301] Optionally, the second server's determination of whether it has received the first information and the identifier of the first application from the client may include the second server determining whether it has received the first information and the identifier of the first application from the client within the first time period corresponding to the second identifier. In this case, the client's reporting records stored by the second server can be stored separately according to different reporting periods. Therefore, when executing step 1306, only the records for the reporting period corresponding to the second identifier can be queried, reducing the data query scope and improving processing efficiency.

[0302] Step 1307: The second server determines the first number of times and the first duration of the first installation package.

[0303] If the judgment conditions of steps 1305 and 1306 are met, the second server determines that the client's reporting behavior is not malicious. Then, the second server needs to store the relevant information of the first installation package sent by the client in the application information database.

[0304] Step 1308: The second server stores the relevant information of the first installation package (or the first application) in the application information database. This relevant information includes one or more of the following: the second identifier, the identifier of the first information and the first application, the first count, and the first duration.

[0305] In some embodiments, the second server may first store the relevant information of the first installation package sent by the client in a cache, and then accumulate the application data into the application information database.

[0306] Step 1309: The second server determines that the client's report is malicious. Therefore, the second server will not store the information reported by the client, and the process ends.

[0307] Through the above process, the second server will store the data reported by the client in the application information database when it is determined that the client is not maliciously reporting data. This prevents the client from maliciously reporting data, eliminates noisy data when accumulating the application information database, and improves the accuracy of identifying the application installation package that the user intends to download.

[0308] The steps in the above process can be selected for execution. For example, the judgment conditions in steps 1305 and 1306 can be used individually or in combination, without any specific restrictions.

[0309] In some embodiments, in addition to the method of reporting information through the client as described above, the second server can also actively collect information from the installation package. For example, the second server can extract information from the installation package stored on the third server and store the extracted information in the application information database.

[0310] In some embodiments, when determining the identifier of the first application based on the first information, the application information database can be matched against the first information. If a match is successful, further verification can be performed on the matched installation package to improve the accuracy of the application identification result. For example, a first fingerprint or a second fingerprint can be used to match the application information database. The characteristics of the first installation package can be used to perform consistency verification on the matched second information. Furthermore, the first count and first duration can be used to make a confidence judgment on the identified application. Through multiple verification methods, the accuracy of the application identification result can be improved. The application identification process will be explained below. Please refer to... Figure 14The diagram shown is another flowchart illustrating the method for determining the identifier of an application provided in this application embodiment. This process can be executed by a client or a second server. The following description uses the execution by the second server as an example.

[0311] Step 1401: The second server queries the application information database based on the first information of the first installation package. Alternatively, it can be described as the second server matching the first information with the information in the application information database.

[0312] In some embodiments, the first information includes only one type of information, such as only the first fingerprint or the second fingerprint. In this case, the second server directly matches the first fingerprint or the second fingerprint with the application information database to obtain the first identifier in the second information that matches the first fingerprint or the second fingerprint, and uses the first identifier as the identifier of the first application.

[0313] In some embodiments, the first information includes multiple types of information, such as a first fingerprint and a second fingerprint. Then, the second server can match the first fingerprint and the second fingerprint with the application information database to obtain a first identifier in the second information that matches both the first fingerprint and the second fingerprint, and use the first identifier as the identifier of the first application.

[0314] In some embodiments, the first information includes multiple pieces of information, such as a first fingerprint and a second fingerprint. The second server can then set priorities for the first and second fingerprints, selecting the information with the higher priority for matching with the application information database. For example, the second server may preferentially select the first fingerprint as the application fingerprint to query the application information database. Figure 14 This is specifically illustrated by example, such as Figure 14 As shown, step 1401 may include sub-steps S14011 to S14014. Specifically, in S14011, the second server determines whether the first information includes the first fingerprint. In S14012, if the first information includes the first fingerprint, the second server uses the first fingerprint as the fingerprint for matching. In S14013, if the first information does not include the first fingerprint but includes the second fingerprint, the second server uses the second fingerprint as the fingerprint for matching. In S14014, the second server uses the fingerprint used for matching to query the application information database.

[0315] Step 1402: The second server determines whether it finds second information, including the first information, in the application information database. Alternatively, it can be described as the second server determining whether it finds the first application that the user intends to download in the application information database.

[0316] If no, proceed to step 1407. If yes, proceed to step 1403.

[0317] Step 1403: The second server determines whether the consistency check passed. If not, proceed to step 1406. If yes, proceed to step 1404.

[0318] The second server compares certain characteristics of the first installation package with corresponding characteristics in the retrieved second information to verify whether they indeed point to the same application (or installation package). In one example, the second server compares the data volume of the first installation package with the data volume of the installation package in the retrieved second information. If they match, the consistency check passes; otherwise, the consistency check fails.

[0319] Step 1404: The second server determines whether the queried second information meets the first condition. If yes, proceed to step 1405; if no, proceed to step 1406.

[0320] In one example, the first condition includes one or more of the following conditions:

[0321] Sub-condition 1: The first count of the second information retrieved is greater than the second threshold. For example, if the second threshold is m times, then the second server determines that sub-condition 1 is satisfied when the first count is greater than m times. The first count is the cumulative number of times the second information of the first installation package has been reported. Since the second information is usually reported when the first installation package is downloaded, the first count can also be understood as the number of times the first installation package has been downloaded. Therefore, a first count greater than m times indicates that the cumulative number of times the first installation package from the third-party server has been downloaded across the entire network is greater than m times.

[0322] Sub-condition 2: The first duration in the second information retrieved is greater than the third threshold. For example, if the second threshold is n days, then when the second server determines that the first count is greater than n days, sub-condition 2 is satisfied. The first duration is the time difference between the first installation package's upload time to the current time and the first upload time of the second information. Therefore, if the first duration is greater than n days, it indicates that the accumulated application installation package time of the third-party server in the application information database is no greater than n days.

[0323] If the above two conditions are not met, the retrieved application data is considered to be small sample data. Therefore, based on the above conditions, small sample data in the application information database can be excluded. Because small sample data represents data from applications used less frequently by users, and may include data generated by a small number of application vendors during their own testing of application downloads, the confidence level of small sample data is considered low. Therefore, in practical implementation, such small sample data can be excluded. In other words, the second information of such applications can not participate in the application identification process, making the applications involved in identifying application package names more reliable. Alternatively, any other possible conditions can be included, without specific restrictions.

[0324] Step 1405: The second server generates a successful identification result. In this identification result, the first identifier of the queried second information can be identified as the identifier of the first application.

[0325] Step 1406: The second server generates the recognition result for the failed recognition.

[0326] Through steps 1403 to 1406 above, the second information of the application obtained from the query can be verified through strong consistency verification and confidence judgment, thereby improving the accuracy of the application identification results.

[0327] Step 1407: The second server sends a sixth request to the third server. The sixth request includes the first information. Optionally, the first information sent by the second server to the third server includes the fingerprint used for matching as determined above, such as including the first fingerprint and / or the second fingerprint. In this way, the third server can perform a query in the application market based on the first information of the first installation package.

[0328] Step 1408: The second server determines whether it has found the first installation package (or the corresponding application) based on the first response from the third server. If yes, proceed to step 1409; otherwise, proceed to step 1406.

[0329] Step 1409: The second server obtains the identifier of the first application from the first response and then proceeds to step 1405.

[0330] Through steps 1407-1408 above, if the second server does not find the application in the application information database, it can call the interface of the third server corresponding to the application market to query the application from the third server as a fallback solution. If the application is found, the first identifier of the found installation package is obtained as the identifier of the first application. The first installation package is the installation package of the first application that the user intends to download.

[0331] Figure 15 This is a schematic diagram of the structure of a computer device 1500 provided in an embodiment of this application. The computer device 1500 may be the electronic device described above or a second server. Figure 15As shown, computer device 1500 may include: one or more processors 1501; one or more memories 1502; a communication interface 1503; and one or more computer programs 1504. These devices can be connected via one or more communication buses 1505. The one or more computer programs 1504 are stored in the memory 1502 and configured to be executed by the one or more processors 1501. The one or more computer programs 1504 include instructions. For example, when computer device 1500 is an electronic device as described above, the instructions can be used to perform relevant steps of the electronic device as described in the corresponding embodiments above, such as performing relevant steps of the processes in the aforementioned embodiments; or, when computer device 1500 is a second server as described above, the instructions can be used to perform relevant steps of the second server as described in the corresponding embodiments above, such as performing relevant steps of the processes in the aforementioned embodiments. The communication interface 1503 is used to enable communication between computer device 1500 and other devices; for example, the communication interface may be a transceiver.

[0332] The methods provided in the embodiments of this application above are described from the perspective of the client (or electronic device) and the server (such as a first server, a second server, or a third server) as the executing entities. To implement the functions of the methods provided in the embodiments of this application above, the client and server may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.

[0333] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)). Where there is no conflict, the solutions in the above embodiments can be combined.

[0334] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0335] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0336] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0337] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0338] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope and intent of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and variations.

Claims

1. A method for determining the identifier of an application, characterized in that, The method is applied to a client, and the method includes: Receive a first operation for a first download link on a webpage, the first operation being used to download the first application; In response to the first operation, first information is obtained based on the first installation package stored on the first server, wherein the first installation package is the installation package of the first application, and the first server is the server corresponding to the first download link; The identifier corresponding to the first information is determined to be the identifier of the first application, and the identifier of the first application is used to download the installation package of the first application from a download path other than the first server.

2. The method according to claim 1, characterized in that, The first information indicates one or more of the following: The signature of the first installation package; The first data in the first installation package, wherein the first data is data located at a first position in the first installation package; or, The data size of the first installation package.

3. The method according to claim 1 or 2, characterized in that, Determining that the identifier corresponding to the first information is the identifier of the first application includes: It is determined that the first information and the second information include the same third information, wherein the second information includes the correspondence between the third information and the first identifier; The first identifier is determined to be the identifier of the first application.

4. The method according to claim 1 or 2, characterized in that, Determining that the identifier corresponding to the first information is the identifier of the first application includes: Send a first request to the second server corresponding to the client. The first request is used to request the identification of the first application. The first request includes the first information. Receive the identifier of the first application from the second server.

5. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the first information based on the first installation package stored on the first server includes: Send a second request to the first server, the second request being used to request the reading of second data, the second data being data of a first length located at the end of the first installation package; Receive the second data from the first server; The signature of the first installation package is determined based on the second data; The first information is determined based on the signature of the first installation package.

6. The method according to claim 5, characterized in that, Determining the signature of the first installation package based on the second data includes: The second address is determined based on the second data. The second address is the address of the first data block in the first installation package. The first data block includes the signature of the first installation package. Send a third request to the first server, the third request being for requesting to read third data, the third data being data of a second length related to the second address; Receive the third data from the first server; The signature of the first installation package is determined based on the third data.

7. The method according to claim 6, characterized in that, Determining the signature of the first installation package based on the third data includes: The third length corresponding to the signature of the first installation package is determined based on the third data; The third length of data, starting from the second position of the third data, is determined to be the signature of the first installation package.

8. The method according to any one of claims 1 to 7, characterized in that, After determining that the identifier corresponding to the first information is the identifier of the first application, the method further includes one or more of the following: Output the identifier of the first application; Output a prompt message asking whether to download the first installation package; Output a prompt message asking whether to download the installation package of the first application using the first download mode, whereby the first download mode is used to download the installation package of the first application from the other download path; or, Output the risk information of the first installation package.

9. The method according to claim 8, characterized in that, After outputting a prompt message asking whether to download the installation package of the first application via the first download mode, the method further includes: Receive a second operation, the second operation being used to confirm that the installation package of the first application has been downloaded through the first download mode; In response to the second operation, a fourth request is sent to the third server, the fourth request being used to request the download of the first application, the third server being the server corresponding to the other download path; Receive a second installation package from the third server, wherein the second installation package is the installation package of the first application.

10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: In response to the completion of the download of the first installation package, the first information and the identifier of the first application are obtained based on the stored first installation package; A fifth request is sent to the second server corresponding to the client, the fifth request including the first information and the identifier of the first application.

11. The method according to claim 10, characterized in that, The fifth request also includes a second identifier, which is determined based on the download time of the first installation package, and the second identifier is used to indicate the time period in which the download time is located.

12. A method for determining the identifier of an application, characterized in that, The method is applied to a server, and the method includes: Receive a first request from a client, the first request including first information, the first information being determined based on a first installation package stored on a first server, the first installation package being an installation package for a first application; The identifier corresponding to the first information is determined to be the identifier of the first application, and the identifier of the first application is used to download the installation package of the first application from a download path other than the first server; Send the identifier of the first application to the client.

13. The method according to claim 12, characterized in that, The method further includes: Receive a first download link from the client, the first download link being used to download the first installation package from the first server; The first information is obtained based on the first installation package stored on the first server; The identifier corresponding to the first information is determined to be the identifier of the first application; Send the identifier of the first application to the client.

14. The method according to claim 12 or 13, characterized in that, The first information indicates one or more of the following: The signature of the first installation package; The first data in the first installation package, wherein the first data is data located at a first position in the first installation package; or, The data size of the first installation package.

15. The method according to claim 14, characterized in that, Determining that the identifier corresponding to the first information is the identifier of the first application includes: It is determined that the first information and the second information include the same third information, wherein the second information includes the correspondence between the third information and the first identifier; The first identifier is determined to be the identifier of the first application.

16. The method according to claim 15, characterized in that, The second information also includes a first count and a first duration, where the first count is the total number of times the first information is reported, and the first duration is the time difference between the time when the first information is first reported and the current time. Before determining that the first identifier is the identifier of the first application, the method further includes: The second information is determined to satisfy a first condition, wherein the first condition includes: the first number of times is greater than or equal to a first threshold, and / or the first duration is greater than or equal to a second threshold.

17. The method according to claim 15 or 16, characterized in that, The method further includes: It was determined that no information identical to the first information was stored. A sixth request is sent to the third server corresponding to the application market. The sixth request is used to determine the identifier of the first application. The sixth request includes the first information. Receive the identifier of the first application from the third server.

18. The method according to any one of claims 12 to 17, characterized in that, The method further includes: Receive a fifth request from the client, the fifth request including first information of the first installation package and the identifier of the first application; Store the first information and the identifier of the first application.

19. The method according to claim 18, characterized in that, The fifth request also includes a second identifier, which is used to indicate the time period in which the client downloads the first installation package; Before storing the first information and the identifier of the first application, the method further includes: It is determined that the total number of reports submitted by the client within the first time period is less than or equal to the third threshold; It is determined that no information or identifier of the first application has been received from the client during the first time period.

20. A communication system, characterized in that, include: A first device is configured to perform the method as described in any one of claims 1 to 11; The second device is used to perform the method as described in any one of claims 12 to 19.

21. A device for determining the identifier of an application, characterized in that, It includes a module for performing the method as described in any one of claims 1 to 11, or includes a module for performing the method as described in any one of claims 12 to 19.

22. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 11, or the method as described in any one of claims 12 to 19.

23. A chip system, characterized in that, The chip system includes a processing circuit and a storage medium, wherein the storage medium stores instructions; when the instructions are executed by the processing circuit, they implement the method as described in any one of claims 1 to 19.

24. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 11, or the method as described in any one of claims 12 to 19.

25. A computer program product, characterized in that, The computer program product includes a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 11, or to perform the method as described in any one of claims 12 to 19.