Method for determining identifier of application, device, and system
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.
Patent Information
- Application Number
- PCT/CN2025/104612
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-14
- Filing Date
- 2025-06-27
- Publication Date
- 2026-02-19
AI Technical Summary
In existing technologies, the methods for determining application names are not accurate enough, which leads to the inability to accurately execute subsequent processing, especially when the rules fail when the webpage structure changes.
By receiving download links from web pages, 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 determining the identifier from the web page.
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.
Smart Images

Figure CN2025104612_19022026_PF_FP_ABST
Abstract
Description
Method, device and system for determining an identifier of an application
[0001] Cross-reference to Related Applications
[0002] This application claims priority to the Chinese Patent Application No. 202411121421.X, filed on August 14, 2024, and titled “Method, device and system for determining an identifier of an application”, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the technical field of terminal, and in particular, to a method, device and system for determining an identifier of an application. BACKGROUND
[0004] In some scenarios, it is required to determine the name of an application requested to be downloaded by a user, and then perform corresponding processing according to the name of the application. For example, the application can be downloaded from a server of an application vendor according to the name of the application requested to be downloaded by the user.
[0005] However, the accuracy of the current method for determining the name of the application is not high, which leads to the failure to perform subsequent processing. For example, when downloading an application from a webpage, the name of the application can be determined from the webpage according to a pre-configured rule. However, if the structure of the webpage changes, the rule can be invalid, and thus the name of the application cannot be accurately determined. SUMMARY
[0006] The present application provides a method, device and system for determining an identifier of an application, which are used to determine the identifier of an application required to be downloaded by a user.
[0007] In a first aspect, a method for determining an identifier of an application is provided. The method can be executed by a client, which can be installed in an electronic device or included in an application installed in the electronic device. The method comprises: receiving a first operation on a first download link on a webpage, the first operation being used to download a first application; in response to the first operation, obtaining first information according to a first installation package stored in 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 an identifier corresponding to the first information as an 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.
[0008] In this embodiment, the identity of the application is determined according to the information of the first installation package stored in the first server, which is equivalent to determining the identity of the application according to the information in the server, without determining the identity of the application from the webpage. Therefore, even if the structure of the webpage changes, the scheme of the embodiment of the application can accurately determine the identity of the application, improving the accuracy of the determined identity of the application.
[0009] In a possible implementation, the first information can indicate the signature of the first installation package. For example, the first information can be determined according to the signature of the first installation package. Since the signatures of different installation packages are usually different, the identity of the application corresponding to the installation package can be determined by the signature, which helps to improve the accuracy of the determined identity. Alternatively, the first information can indicate first data in the first installation package, and the first data is data located at a first position in the first installation package. Since there is a possibility that the data located at the same position in different installation packages is different, the effect of determining the identity of the application corresponding to the installation package can also be achieved by intercepting part of the data in the installation package. Alternatively, the first information can indicate the data amount of the first installation package. Different installation packages can contain different amounts of data, so the data amount of the installation package can also be used as a feature to assist in verifying the identity of the application, which helps to improve the accuracy of the determined identity. Alternatively, the first information can indicate one or more of the above information.
[0010] In a possible implementation, the client can pre-store information corresponding to one or more installation packages, wherein the information of each installation package can include a correspondence relationship between information determined according to the installation package and the identity of the application corresponding to the installation package. Then, the client can match the first information with the stored information to determine the information matched with the first information. For example, the client stores second information corresponding to the first installation package, and the second information includes a correspondence relationship between third information and the first identity, wherein the third information is information determined according to the first installation package in advance. 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 then determine that the first identity is determined as the identity of the first application. Through this embodiment, the client can determine the identity of the first application by the correspondence relationship between the stored information of the installation package and the identity, which improves the accuracy of determining the identity of the application required to be downloaded by the user.
[0011] In a possible implementation, the client can also use the server to implement the process of determining the identity of the application. For example, the client can send a first request to a second server corresponding to the client, and the first request is used to request to determine the identity of the first application, and the first request includes the first information. Then, the identity of the first application is received from the second server. Through this embodiment, the client does not need to store the correspondence relationship between the information of the installation package and the identity locally, which can save the storage resources of the electronic device where the client is located.
[0012] In a possible implementation, the client can determine the first information according to the signature of the first installation package by reading the signature of the first installation package stored in the first server. One way of reading the signature of the first installation package is that the client sends a second request to the first server, the second request is used to request reading of second data, the second data is data of a first length located at the end of the first installation package, and receives the second data from the first server. Then, the client can determine the signature of the first installation package according to the second data. Through this implementation, the signature of the first installation package can be determined by reading part of data at the end of the first installation package, without reading the complete first installation package, and the security risk caused by downloading the first installation package that has not passed the security check can be reduced.
[0013] In a possible implementation, since the data at the end of the first installation package can indicate the position of the signature of the first installation package in the first installation package, the client can determine a second address according to the second data, the second address is the address of a first data block corresponding to the first installation package, and the first data block includes the signature of the first installation package. Then, the client can send a third request to the first server, the third request is used to request reading of third data, the third data is data of a second length related to the second address, and receive the third data from the first server. Then, the client can determine the signature of the first installation package according to the third data. Through this implementation, the second address of the first data block in which the signature of the first installation package is located is determined by analyzing the tail data in the first installation package, and then the third data is read according to the second address to successfully obtain the signature of the first installation package.
[0014] In a possible implementation, for an installation package, the data structure adopted is usually standardized, and the data structure of each data block in the installation package is also standardized, so that the data block can be analyzed by combining the data structure of the data block to read the required data. For example, when the signature of the first installation package is determined according to the second data, the client can determine a third length corresponding to the signature of the first installation package according to 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 third length of the obtained signature, which helps to improve the accuracy of determining the identification of the application required to be downloaded by the user.
[0015] In a possible implementation, after determining that the identifier corresponding to the first information is the identifier of the first application, the client can have multiple output modes. For example, the client can output the identifier of the first application. In this way, the user can intuitively perceive the identifier of the first application corresponding to the first installation package currently being downloaded, thereby reducing the probability that the user is misled by the webpage to download a wrong application. For another example, the client can output prompt information for inquiring whether to download the first installation package. In this way, the user can again confirm whether to download the first installation package, and the probability that the user downloads an application that the user does not need can be reduced. For yet another example, the client can output prompt information for inquiring whether to download the installation package of the first application through a first download mode, the first download mode being used to download the installation package of the first application from another download path. For example, the download from another download path can be a download from a third server corresponding to an application market, because the installation package in the third server corresponding to the application market has been subjected to security verification, the security is higher, and guiding the user to download the installation package of the first application from the third server corresponding to the application market helps to improve the security of the installation package downloaded by the user. For yet another example, the client can output risk information of the first installation package. In this way, the user can know the risk level of the first installation package currently being downloaded through the risk information, which can assist the user in judging whether to download the first installation package, and the probability of downloading an installation package with low security can be reduced.
[0016] In a possible implementation, after outputting the prompt information for inquiring whether to download the installation package of the first application through the first download mode, the client can receive a second operation, the second operation being used to confirm that the installation package of the first application is downloaded through the first download mode. Then, the client can send a fourth request to a third server in response to the second operation, the third server being a server corresponding to another download path, the fourth request being used to request to download the first application. A second installation package is received from the third server, the second installation package being the installation package of the first application. Then, the installation package of the first application can be downloaded through another download path, for example, the third server is a server corresponding to an application market, and then the installation package of the first application can be downloaded from the third server. Because the installation package in the application market has been subjected to security verification, the security is higher, and downloading the installation package of the first application through the third server helps to improve the security of the installation package downloaded by the user.
[0017] In a possible implementation, after downloading the installation package, the client can further extract corresponding information and the identifier of the application corresponding to the installation package according to the downloaded installation package, and the extracted information can serve as a data basis for subsequent determination of the identifier of the application. For example, when the first installation package is downloaded, the client can obtain the first information and the identifier of the first application according to the stored first installation package, and send a fifth request to the second server corresponding to the client, where the fifth request includes the first information and the identifier of the first application. By reporting the first information and the identifier of the first application of the first installation package to the second server, the second server can determine the identifier of the first application according to the information reported by the client when other clients download the first installation package.
[0018] In a possible implementation, the client can further determine a second identifier according to the download time of the first installation package, where the second identifier is used to indicate a time period in which the download time is located, and the fifth request sent by the client can further include the second identifier, which can assist the second server in excluding malicious reporting and help improve the reliability between the information of the installation package stored by the second server and the identifier of the application.
[0019] In a second aspect, a method for determining an identifier of an application is provided, which can be executed by a server. The server can be a server corresponding to the client in the first aspect. The method includes: receiving a first request from a client, where the first request includes first information, and the first information is determined according to a first installation package stored by the first server, and the first installation package is an installation package of a first application; determining that an identifier corresponding to the first information is an 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; and sending the identifier of the first application to the client.
[0020] This embodiment determines the identifier of the application according to the information of the first installation package stored by the first server, which is equivalent to determining the identifier of the application according to the information in the server, without determining the identifier of the application from a web page. Therefore, even if the structure of the web page changes, the solution of the embodiment of the application can still accurately determine the identifier of the application, and the accuracy of the determined identifier of the application is improved. In addition, the process of determining the identifier of the application is implemented by the server, so that the client does not need to store the correspondence between the information of the installation package and the identifier locally, and the storage resources of the electronic device where the client is located can be saved.
[0021] In a possible implementation, the server can further receive a first download link from the client, the first download link being used to download the first installation package from the first server, and then the server can obtain the first information according to the first installation package stored in the first server, and determine that the identifier corresponding to the first information is the identifier of the first application, and send the identifier of the first application to the client. Through this implementation, the server can be used to perform the process of obtaining the first information, which can further reduce the steps required to be performed by the client, reduce the processing pressure of the client, and compared with the client, the server has higher processing capability, and can effectively improve the efficiency of determining the identifier of the application.
[0022] In a 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, the first data being data located at a first position in the first installation package; or a data amount of the first installation package.
[0023] In a possible implementation, the server stores second information, the second information including a correspondence between third information and the first identifier, and then the server can determine that the first information is the same as the third information included in the second information, and determine that the first identifier is determined as the identifier of the first application.
[0024] In a possible implementation, the second information further includes a first number of times and a first time length, the first number of times being a total number of times that the first information is reported, and the first time length being a time difference between a time when the first information is reported for the first time and a current time. Then, the server determines that the second information satisfies a first condition. The first condition includes that the first number of times is greater than or equal to a first threshold, and / or the first time length is greater than or equal to a second threshold. Then, the server determines that the first identifier is determined as 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 is reported a large number of times, and the first time of reporting is far away from the current time, so it can be considered that the first installation package does not belong to a small amount of data application sample, and thus the second information can be considered to be reliable, and then the first identifier is determined as the identifier of the first application, thereby improving the reliability of finally determining the identifier of the application.
[0025] In a possible implementation, if the server determines that no information same as the first information is stored, the server can send a sixth request to a third server corresponding to the application market, the first information included in the sixth request being used to determine the identifier of the first application, and receive the identifier of the first application from the third server. Through this implementation, the third server can be requested to determine the identifier of the application, thereby improving the success rate of determining the identifier of the application.
[0026] In a possible implementation, the server receives a fifth request from the client, the fifth request comprising the first information of the first installation package and the identification of the first application. The server can store the first information and the identification of the first application, so as to determine the identification of the first application when other clients download the first installation package.
[0027] In a possible implementation, the fifth request further comprises a second identification, the second identification being used to indicate a time period in which the client downloads the first installation package. If the server determines that the total number of reports of the client in the first time period is less than or equal to the third threshold value, and determines that the first information and the identification of the first application are not received from the client in the first time period, the server stores the first information and the identification of the first application. Through this implementation, the server can determine whether the client is malicious by determining the number of reports of the client in the time period indicated by the second identification and whether the same information is reported, and store the information of the first installation package only when it is determined that the client is not malicious, so as to improve the reliability of the information of the installation package stored in the server.
[0028] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method in any one of the first aspect and / or the second aspect when executing the computer program.
[0029] In a fourth aspect, the present application provides a device for determining the identification of an application, comprising modules / cells for implementing the method corresponding to any one of the design of the first aspect and / or the second aspect. These modules / cells can be implemented by hardware, or by hardware executing corresponding software.
[0030] In a fifth aspect, the embodiments of the present application provide a communication system, comprising a first device and a second device, the first device being used to implement the method in any one of the first aspect, and the second device being used to implement the method in any one of the second aspect.
[0031] In a sixth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, and when the computer program is executed by at least one processor, the method in any one of the first aspect and / or the second aspect is implemented.
[0032] In a seventh aspect, the present application provides a chip, comprising a processor and an interface; the processor is used to read instructions through the interface to execute the method in any one of the first aspect and / or the second aspect.
[0033] In an eighth aspect, the present application provides a chip system, comprising a processing circuit, and a storage medium, wherein the storage medium stores instructions; when the instructions are executed by the processing circuit, the method in any one of the first aspect and / or the second aspect is implemented.
[0034] In a ninth aspect, the present application provides a computer program product, comprising a computer program, when the computer program is executed on a computer, the computer can execute the method in any one of the first aspect and / or the second aspect.
[0035] The beneficial effects of the embodiments in any one of the second aspect to the ninth aspect can refer to the beneficial effects of the corresponding embodiments in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0036] FIGS. 1A-1C are schematic diagrams of a communication system according to an embodiment of the present application;
[0037] FIG. 1D is a schematic diagram of a structure of an electronic device according to an embodiment of the present application;
[0038] FIG. 1E is a schematic diagram of a structure of a server according to an embodiment of the present application;
[0039] FIG. 2 is a schematic diagram of a system architecture to which the method for determining the identifier of an application according to an embodiment of the present application can be applied;
[0040] FIG. 3 is a schematic diagram of a software architecture of an electronic device according to an embodiment of the present application;
[0041] FIGS. 4A-4B are schematic diagrams of identifying an application name in a webpage in the related art;
[0042] FIG. 5 is a schematic diagram of identifying an identifier of an application in a webpage according to an embodiment of the present application;
[0043] FIGS. 6A-6D are schematic diagrams of interfaces according to an embodiment of the present application;
[0044] FIGS. 7-10 are schematic diagrams of a flow of the method for determining the identifier of an application according to an embodiment of the present application;
[0045] FIG. 11A is a schematic diagram of a structure of an installation package according to an embodiment of the present application;
[0046] FIG. 11B is a schematic diagram of a flow of obtaining first information according to an embodiment of the present application;
[0047] FIG. 12 is a schematic diagram of a flow of maintaining an application information library according to an embodiment of the present application;
[0048] FIG. 13 is another flow diagram of a method for maintaining an application information library according to an embodiment of the present application;
[0049] FIG. 14 is still another flow diagram of a method for determining an application identifier according to an embodiment of the present application;
[0050] FIG. 15 is a structural diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0051] In the following, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0052] At least one of the embodiments of the present application includes one or more, and the plurality means greater than or equal to two. In addition, it should be understood that the terms "first", "second", etc. in the description of the present specification are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order. For example, the first operating system and the second operating system do not represent the importance or order of the two, but only distinguish the description. In the embodiments of the present application, "and / or" is only used to describe the relationship, which means that there are three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.
[0053] The orientation terms mentioned in the embodiments of the present application, such as "up", "down", "left", "right", "in", "out", etc. are only the direction of the drawings, therefore, the orientation terms used are to better and more clearly illustrate and understand the embodiments of the present application, and are not intended to indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the embodiments of the present application.
[0054] In the present specification, the reference "one embodiment", "in some examples" or "some embodiments" and the like means that the specific features, structures or characteristics described in connection with the embodiment are included in one or more embodiments of the present specification. Therefore, the statements "in some examples", "in one embodiment", "in some embodiments", "in other some embodiments", "in further some embodiments" and the like appearing in different places in the present specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "include", "contain", "have" and their variants mean "including but not limited to", unless otherwise specifically emphasized.
[0055] There are multiple ways to download an application at present. One way is to download an installation package of an application in an application market provided by a terminal vendor. Another way is to download an installation package of an application through other ways than the application market, for example, downloading an installation package of an application through a browser webpage. Since the terminal vendor usually performs security check on the installation package of an application when the application is put on the application market, the security of the application downloaded through the application market is higher. However, when downloaded through other ways than the application market, the installation package may lack security check, and the installation package of the application may have potential security risks.
[0056] Taking browser webpage downloading as an example, when an application is downloaded through a browser webpage, two modes of normal downloading and secure downloading can be provided. The normal downloading mode is that a user directly uses a download link in the browser webpage to download an installation package of an application from a corresponding server, but the installation package provided by the server is an installation package without security check, and may have potential security risks. The secure downloading mode is that the browser first identifies the name of an application to be downloaded by the user, and sends the name to a server of a terminal vendor. The server obtains a corresponding download link according to the name, and returns the download link to the browser. The browser can download the installation package using the download link, because the installation package pointed to by the download link is an installation package with security check, and thus the security of the installation package downloaded through the secure downloading mode is higher. However, at present, when identifying an application to be downloaded by a user, the name of the application is usually determined from a webpage according to pre-configured rules. This way is prone to fail to accurately determine the name of the application due to invalid rules when the structure of the webpage changes or a new webpage appears.
[0057] To solve this problem, in the embodiments of the present application, after a first operation of the user to trigger downloading of a first application, first information is obtained according to a first installation package pointed to by a first download link targeted by the first operation. The first information may be one or more of, for example, a signature of the first installation package, part of data in the first installation package, a data amount of the first installation package, or a converted value of the foregoing information. Then, an identifier corresponding to the first information is determined as an identifier of the first application, thereby achieving the purpose of identifying an application to be downloaded by a user. In this method, the identifier of the application is determined according to information of the first installation package stored by a first server, which is equivalent to determining the identifier of the application according to information in the server, without determining the identifier of the application from a webpage. Therefore, even if the structure of the webpage changes, the scheme of the embodiments of the present application can still accurately determine the identifier of the application, and the accuracy of the determined identifier of the application is improved.
[0058] Please refer to FIG. 1A, which is a schematic diagram of a communication system to which a method for determining an identifier of an application provided in an embodiment of the present application can be applied. The communication system can include an electronic device 100 and a first server 200. The first server 200 refers to a server that provides a downloading service when an application is downloaded through a manner other than an application market, for example, can be a server corresponding to a first downloading link when a first application is downloaded by a user.
[0059] Optionally, the electronic device 100 can be, for example, a mobile phone, a tablet computer (PAD), a notebook computer, a desktop computer, a smart screen, a vehicle terminal, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a wearable device (such as a smart watch, etc.), a smart home appliance, an Artificial Intelligence (AI) device, a flying device, a business intelligence terminal (including a video phone, a conference table top intelligent terminal, etc.), an augmented reality (AR) \ virtual reality (VR) device, and the like. The operating system installed on the electronic device includes, but is not limited to, Android The specific type of the electronic device 100 and the installed operating system are not limited in the embodiments of the present application.
[0060] In some embodiments, when the electronic device 100 receives a first operation on a first downloading link on a webpage, the electronic device 100 obtains first information according to a first installation package stored by a first server 200 pointed by the first downloading link in response to the first operation, and determines that an identifier corresponding to the first information is an identifier of a first application. The first installation package is an 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 other than the first server 200. For example, the electronic device 100 can download the installation package of the first application from a server of an application market according to the identifier of the first application. Since the installation package in the server of the application market is a secure installation package that has been subjected to security verification, the security of the downloaded installation package of the first application can be improved, or the electronic device 100 can also find the first installation package stored by itself according to the identifier of the first application, and perform a security risk assessment on the first installation package, and timely remind the user when there is a security risk, thereby reducing the probability of downloading an installation package with a security risk.
[0061] In some examples, after the electronic device 100 downloads the installation package of the application, such as the first installation package of the first application, the electronic device 100 can further obtain the first information of the first installation package and the identifier of the first application according to the first installation package, and store the first information of the first installation package, the identifier of the first application, and the correspondence therebetween. The information can serve as a data basis for the electronic device to determine the identifier of the first application when the electronic device downloads the first application again.
[0062] Referring to FIG. 1B, FIG. 1B is a schematic diagram of another communication system to which the method for determining the identifier of the application provided in the embodiments of the present application can be applied. Different from FIG. 1A, the communication system shown in FIG. 1B can further 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.
[0063] Optionally, the second server 300 can be a cloud server or a network server, or a device or server having a computing function. The server can be a single server, a server cluster composed of multiple servers, or a distributed system, or a cloud computing service center, but is not limited thereto. The server can be a physical server or a virtual server.
[0064] In some embodiments, the electronic device 100 can install a client for implementing the scheme provided in the embodiments of the present application, and the second server 300 can be a server corresponding to the client. The implementation form of the client is not specifically limited. For example, the client can be a client of an independent application, or a small program, a software development kit (SDK), or a plug-in running in a host program, or other implementation forms.
[0065] In some embodiments, when the electronic device 100 receives a first operation on a first download link on a webpage, the electronic device 100 obtains the first information according to a first installation package stored by a first server 200 pointed by the first download link in response to the first operation, and sends a first request to a second server 300, the first request being used to request the second server 300 to identify an identifier of a first application to be downloaded by a user, and the first request including the first information. Correspondingly, the second server 300 determines, in response to the first request, an identifier corresponding to the first information provided by the electronic device 100 as the identifier of the first application to be downloaded by the user, and returns the identifier of the first application to the electronic device 100.
[0066] In some embodiments, when the electronic device 100 receives a first operation on a first download link on a webpage, in response to the first operation, the electronic device 100 sends a request to the second server 300 for identifying an application to be downloaded by the user, the request including the first download link, the second server 300 obtaining first information from a first installation package stored by a first server 200 to which the first download link points, determining an identifier corresponding to the first information as an identifier of the first application to be downloaded by the user, and returning the identifier of the first application to the electronic device 100.
[0067] In some embodiments, after the electronic device 100 downloads the first installation package of the first application, the electronic device 100 can further 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 a data basis for the second server 300 to determine the identifier of the first application when other electronic devices download the first application subsequently.
[0068] Please refer to FIG. 1C, which is a schematic diagram of another communication system to which the method for determining the identifier of an application provided by the embodiments of the present application can be applied. Different from FIG. 1B, the communication system shown in FIG. 1C can further include a third server 400.
[0069] The third server 400 can be a server corresponding to an application market. Optionally, the application market can be an application market provided by the manufacturer of the electronic device 100. In some embodiments, the third server 400 and the second server 300 can be implemented by 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.
[0070] In some embodiments, the third server 400 can be configured to provide information of installation package of an application included in the application market, for example, the information includes one or more of the signature of the installation package, the partial data, the data volume, or the conversion value of the foregoing information, and can further include the identification of the application corresponding to the installation package. For example, the electronic device 100 or the second server 300 can obtain and store the second information of the first installation package from the third server 400, the second information can include the first information of the first installation package and the identification of the first application, or the second information includes the corresponding relationship between the first information and the identification of the first application, the first information includes one or more of the signature of the first installation package, the partial data, the data volume, or the conversion value of the foregoing information, so that the electronic device 100 or the second server 300 can determine the identification of the first application to be downloaded by the user according to the stored second information of the first installation package, in combination with the first information of the first installation package pointed by the first download link obtained when the user triggers the first operation to download. Alternatively, when the electronic device 100 or the second server 300 fails to successfully identify the first application to be downloaded by the user according to the first information of the first installation package, for example, when the electronic device 100 or the second server 300 does not store the second information of the first installation package, the electronic device 100 or the second server 300 can send the first information to the third server 400 to request the third server 400 to determine the identification of the first application to be downloaded by the user. Since the third server 400 includes more installation packages, it can effectively assist in identifying the application to be downloaded by the user.
[0071] For example, FIG. 1D shows a structural schematic diagram of the electronic device 100.
[0072] The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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.
[0073] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). 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.
[0074] 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.
[0075] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can 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.
[0076] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc. The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antennas can be used in combination with tuning switches.
[0077] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert the signals into electromagnetic waves to be radiated out through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device.
[0078] The wireless communication module 160 can provide a solution for wireless communication, including wireless local area networks (WLAN) (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, frequency-modulate them, amplify them, and radiate them as electromagnetic waves via the antenna 2.
[0079] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology.
[0080] The display screen 194 is used to display a display interface of an application, and the like. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 can include one or N display screens 194, N being a positive integer greater than 1.
[0081] In some embodiments, the display screen 194 displays a first web page, and the first web page includes a first download control corresponding to a first download link, such as the first download link or an icon corresponding to the first download link. A 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 performs the first operation on the first download control, the electronic device 100 can send a request to the first server 200 through the wireless communication module 160 to obtain first information according to a first installation package pointed to by the first download link, and can send a request to the second server 300 through the wireless communication module 160, which can carry the first information to request the second server 300 to determine an identifier of the first application that the user intends to download according to the first information carried in the request. Alternatively, the electronic device 100 can send a request to the second server 300 through the wireless communication module 160, which can carry the first download link to request the second server 300 to determine the identifier of the first application that the user intends to download according to the first download link.
[0082] Subsequently, the electronic device 100 can receive the identification of the first application issued by the second server 300 through the wireless communication module 160, and can display the identification of the first application through the display screen 194, or, after processing the identification of the first application through the processor 110, can display the corresponding processing result through the display screen 194.
[0083] The electronic device 100 can implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.
[0084] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, software codes of at least one application program, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device 100, etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage, etc.
[0085] The external memory 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 memory interface 120 to realize a data storage function. For example, files such as pictures and videos are saved in the external memory card.
[0086] The electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor, etc. For example, music playing, recording, etc.
[0087] The touch sensor 180K, also known as a "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
[0088] The keys 190 include a power key, a volume key, and the like. The keys 190 can be mechanical keys. Alternatively, the keys 190 can be touch keys. The electronic device 100 can receive key input, and generate key signal input related to user settings and function control of the electronic device 100. The motor 191 can generate a vibration cue. The motor 191 can be used for incoming call vibration cues, and can be used for touch vibration feedback. The indicator 192 can be an indicator light, and can be used to indicate a charging state, a power change, and can be used to indicate a message, a missed call, a notification, and the like. The 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 the electronic device 100.
[0089] The structure shown in FIG. 1C does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware. Moreover, the interface connection relationship between the modules shown in FIG. 1C is only illustrative and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can also use different interface connection manners in the above embodiments, or a combination of multiple interface connection manners.
[0090] For example, FIG. 1E shows a structural schematic diagram of the second server 300.
[0091] The second server 300 includes at least one processor 301. The processor 301 can be used for internal processing of the second server 300 to implement certain control processing functions. The processor 301 can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling execution of programs of schemes of embodiments of the present application. Optionally, the processor 301 includes instructions. Optionally, the processor 301 can store data. Optionally, different processors can be independent devices, can be located at different physical locations, and can be located on different integrated circuits. Alternatively, different processors can be integrated in one or more processors, for example, integrated on one or more integrated circuits.
[0092] Optionally, the second server 300 includes one or more memories 303 for storing instructions. Optionally, the memory 303 can also store data. The processor and the memory can be separately provided or integrated together.
[0093] Optionally, the second server 300 comprises a communication line 302 and at least one communication interface 304. Among them, because the memory 303, the communication line 302 and the communication interface 304 are all optional, they are all represented by dashed lines in FIG. 1B.
[0094] Optionally, the second server 300 can also comprise a transceiver. Among them, the transceiver can be used to send information to other devices or receive information from other devices. The transceiver can be referred to as a transceiver, a transceiver circuit, an input / output interface, etc., for implementing the transceiving function of the second server 300. Optionally, the transceiver comprises a transmitter and a receiver. Illustratively, the transmitter can be used to generate a PLC signal based on a digital signal, and the receiver can be used to convert the PLC signal into a digital signal.
[0095] The processor 301 can include a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the schemes of the embodiments of the present application.
[0096] The communication line 302 can include a path for transmitting information between the above-mentioned components.
[0097] The communication interface 304 can be a module, circuit, bus, interface, transceiver or other device capable of realizing the communication function, for communicating with other devices. Optionally, when the communication interface 304 is a device such as a transceiver, it can be used to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), wired access network, etc.
[0098] The memory 303 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 303 can exist independently of the processor 301 and be connected to the processor 301 through the communication line 302. Alternatively, the memory 303 can be integrated with the processor 301.
[0099] The memory 303 is configured to store computer-executed instructions for implementing the embodiments of the present application, and the processor 301 is configured to control the execution of the computer-executed instructions stored in the memory 303. The processor 301 is configured to execute the computer-executed instructions stored in the memory 303, thereby implementing the method for determining the identity of an application provided by the embodiments of the present application.
[0100] Optionally, the computer-executed instructions in the embodiments of the present application can also be referred to as application program codes, instructions, computer programs, or other names, and the embodiments of the present application do not make a specific limitation thereto.
[0101] In a specific implementation, as an embodiment, the processor 301 can include one or more CPUs, such as the CPU0 and the CPU1 in FIG. 1B.
[0102] In a specific implementation, as an embodiment, the second server 300 can include a plurality of processors, such as the processor 301 and the processor 305 in FIG. 1B. Each of the processors can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (for example, computer program instructions).
[0103] In some embodiments, after the second server 300 receives the first information of the first installation package sent by the electronic device 100 through the communication interface 304, the second server 300 determines the identity of the first application to be downloaded by the user according to the first information through the processor 301; or, after the second server 300 receives the first download link sent by the electronic device 100 through the communication interface 304, the second server 300 can obtain the first information according to the first installation package stored in the first server 200 pointed by the first download link through the communication interface 304, and determine the identity of the first application to be downloaded by the user according to the first information through the processor 301. For example, the identity of the first application can 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 identity of the first application to the electronic device 100, which can be used to download the installation package of the first application from a server other than the first server 200. For example, the electronic device 100 can download the installation package of the first application from the server of the application market according to the identity of the first application, since the installation package in the server of the application market is a secure installation package that has been verified, which can improve the security of the downloaded first application installation package, or can also find the first installation package stored by itself according to the identity of the first application, and perform a security risk assessment on the first installation package, and timely remind the user when there is a security risk, thereby reducing the probability of downloading an installation package with security risks.
[0104] In some examples, the second server 300 can communicate with the electronic device 100 or other devices through the communication interface 304, such as receiving the first information of the first installation package sent by the electronic device 100, or sending the identity of the first application to the electronic device 100, etc.
[0105] In other examples, the second server 300 can also receive the first information of the first application obtained according to the first installation package after the electronic device 100 downloads the first installation package of the first application through the communication interface 304, and store the identity of the first application and the information, which can be used in the subsequent determination process of the identity of the first application as the data basis of the process of determining the identity of the application.
[0106] Please refer to FIG. 2, which is a system architecture diagram provided by the embodiment of the present application, which can be applied to the method for determining the identity of the application. The architecture can include a client 101 and a server 306. The client 101 can be deployed in the electronic device 100 shown in FIG. 1A-1C, and the server 306 can be deployed in the second server 300 shown in FIG. 1B-1C or the third server 400 shown in FIG. 1C. The modules included in the client 101 and the server 306 will be introduced respectively as follows.
[0107] In some embodiments, the client 101 can include the following modules:
[0108] (1) The collection module 1011. When the user triggers the first operation of downloading the first application, the collection module 1011 can be used to collect the first information of the first installation package of the application according to the first installation package pointed by the first download link (stored in the first server), and the collected first information can be used to determine the identity 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 signature, part of the data, the data volume, or the conversion value of the aforementioned information of the first installation package. The specific information included in the first information will be introduced later, and will not be described in detail here.
[0109] (2) The extraction module 1012. After the user downloads the installation package of the application (for example, downloads the first installation package of the first application), the downloaded first installation package is saved in the local storage space, and the extraction module 1012 can be used to extract the first information of the first installation package and the identity of the first application from the locally stored first installation package. The first information includes but is not limited to one or more of the signature, part of the data, the data volume, or the conversion value of the aforementioned information of the first installation package.
[0110] In some embodiments, the server 306 can include the following modules:
[0111] (1) The identification module 3061. After the electronic device 100 sends the first information of the first installation package collected by the collection module 1011 to the second server 300, the second server 300 can identify the identity of the first application that the user intends to download from the information library 3063 according to the first information of the first installation package through the identification module 3061.
[0112] (2) The 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 second server 300 can process the first information of the first installation package through the accumulation module 3062, and write the information obtained after the processing into the information library 3063. The information obtained after the processing includes but is not limited to one or more of the first information of the first installation package, the cumulative download count of the first installation package, and the cumulative download time length of the first installation package.
[0113] (3) The information library 3063. The information library 3063 is used to store the information of one or more installation packages, and the information of the installation package includes but is not limited to one or more of the signature, part of the data, the data volume, or the conversion value of the aforementioned information of the installation package, and the identity of the application, the cumulative download count, or the cumulative download time length. These information can be used as the data basis for determining the identity of the application that the user intends to download.
[0114] In some embodiments, when the method for determining the identity of an application is applied to the communication system shown in FIG. 1A, all the processes of the method for determining the identity of an application are performed by the electronic device 100, and each module included in the client 101 and the server 306 can be deployed in the electronic device 100.
[0115] Referring to FIG. 3, FIG. 3 shows possible software architecture diagrams of the electronic device 100 according to an embodiment of the present application. Here, the relationship between the client 101 and other software in the electronic device 100 can be as shown in (a) and (b) of FIG. 3, which will be introduced below.
[0116] In some embodiments, the electronic device 100 can include an application market application (APP) 103. Optionally, the application market APP 103 can be a system self-provided application market APP of the electronic device 100, that is, an application market APP provided by the manufacturer of the electronic device 100. The electronic device 100 can also include a host program of the client 101, and accordingly, the client 101 can be in any implementation form of a functional module, an applet, a fast application, a light application, an SDK or a plug-in in the host program. When a user downloads an application in the host program, the client 101 can execute the method according to an embodiment of the present application to identify the application to be downloaded by the user. The host program is not limited in the present application, for example, the host program can be a browser or WeChat or any application program that has the ability to open a webpage to download an application.
[0117] In one example, referring to (a) of FIG. 3, the host program can be a browser 102, and the client 101 can be a functional module, a functional unit, a plug-in or an SDK in the browser 102. When the client 101 is a functional module in the browser 102, the client 101 can also be referred to as a browser secure download module or a browser application identification module, and the specific name is not limited. Alternatively, the function of the client 101 can be one of the functions of the host program, in which case the client 101 can be understood as the host program itself. In one example, the client 101 is the browser 102, and when a user downloads an application through a browser webpage, the browser 102 can execute the method for determining the identity of an application according to an embodiment of the present application to determine the identity of the application to be downloaded by the user.
[0118] In some embodiments, the client 101 in the electronic device 100 can be a standalone application, and the client 101 can be a system application or a system service that is pre-installed in the electronic device 100; or the client 101 can also be installed in the electronic device 100 by a user after downloading an installation package according to the user's own needs. Referring to (b) in FIG. 3, the electronic device 100 can further include a browser 102 and an application market APP 103, and the client 101, the browser 102 and the application market APP 103 are different applications. The client 101 can detect the operation of downloading an application in the electronic device 100, for example, can obtain the permission to detect the operation of downloading an application in the electronic device 100 under the authorization of the user, so that when the operation of downloading an application is detected, the client 101 can execute the method provided in the embodiments of the present application to determine the identity of the application to be downloaded by the user.
[0119] In one example, when downloading an application in the application market APP 103, because the applications in the application market APP 103 are usually security-verified, the client 101 can not identify the downloading operation in this case; when downloading an application in an application other than the application market APP 103 (such as the browser 102), the client 101 can execute the method provided in the embodiments of the present application to determine the identity of the application to be downloaded by the user, and then can execute the subsequent security policy according to the identity of the application, for example, can download the application in a secure downloading mode to improve the security of the installation package of the downloaded application, or take other security-related measures to reduce the probability of downloading the installation package with security risks by the user.
[0120] The technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings.
[0121] Currently, in order to improve the security of downloading an application from a webpage, a secure downloading mode is provided. Unlike a normal downloading mode which directly downloads an installation package from a download link in a webpage, the secure downloading mode first identifies the name of an application to be downloaded by a user in the webpage, and then downloads the installation package from a server of a terminal vendor according to the name of the application. When an application is downloaded by using the secure downloading mode, in order to identify the application to be downloaded by the user, an extraction rule of configuring an application name according to the webpage structure of a specific webpage is usually used to obtain the application name of the application from the webpage. Taking the browser webpage downloading as an example, the following two ways can be used to identify the application to be downloaded by the user. In the following introduction, the electronic device 100 is taken as a mobile phone, and the application is taken as a video application A. As shown in FIGS. 4A-4B and 5, the download webpage of the video application A includes a download control 401 and the application name 402 of the video application A. Optionally, the download webpage of the video application A can also include the application names of similar applications recommended for the user, such as the application name 403 of the video application B, the application name 404 of the video application C, and the application name 405 of the video application D. The download control in the embodiment of the present application can be the download link itself, or an icon or text corresponding to the download link.
[0122] Method 1: Pre-injecting a preset application name extraction rule of a target webpage to identify the application name in the webpage
[0123] The user usually downloads an application by clicking a download control. Therefore, in the method 1, the display relationship between the download control and the application name to be downloaded in the webpage of a specific website, and the node configuration relationship of the corresponding webpage content display need to be analyzed to configure the extraction rule of the application name for the webpage of the specific website. The display relationship indicates the positional relationship of the download control and the application name when they are displayed in the webpage, and the node configuration relationship refers to the hierarchical relationship between the nodes corresponding to the download control and the application name in the webpage structure. Both the display relationship and the node configuration relationship can be determined according to the source file of the webpage, such as a hypertext markup language (HTML) file.
[0124] Then, the extraction rule can be injected into the webpage of the specific website. When the user operates the download control in the webpage, the application name corresponding to the download control can be extracted according to the extraction rule, and then the installation package of the application can be obtained by using the secure downloading mode according to the application name.
[0125] Referring to FIG. 4A, an example of identifying an application name in a webpage in a manner 1 in the related art is shown. As shown in FIG. 4A, for a download webpage of a video application A, the application name 402 (i.e., "video application A" shown in FIG. 4A) of the video application A and the download control 401 (i.e., "download immediately" shown in FIG. 4A) can be regarded as nodes in the webpage structure, and thus the extraction rule for the download webpage of the video application A needs to be configured according to the display relationship and node configuration relationship of the two nodes "video application A" and "download immediately" in the webpage. Then, after the user clicks "download immediately", the configured extraction rule can be used to determine that the application name is "video application A".
[0126] However, the manner 1 also has many disadvantages. First, because the webpage types or structures of different websites can be different, the extraction rule needs to be configured for the webpages of different websites respectively, and the process consumes a long time, which makes the efficiency of identifying the application to be downloaded by the user according to the manner 1 not high. Second, the extraction rule needs to be adapted in advance according to the target webpage operated by the user, and can be used to capture the application name existing in the target webpage, and when a new webpage appears, the application name cannot be identified by the manner before the extraction rule is configured. Third, when the webpage structure changes, the extraction rule can be invalid, for example, when the content in the webpage is modified, the display relationship between the download control and the corresponding application name in the webpage can be different from that before the modification, and thus the extraction rule configured according to the webpage before the modification can be invalid, which causes the application name of the application to be unable to be correctly acquired, and finally causes the safe download mode to be unable to be used.
[0127] Manner 2: Capturing text information near the download control in batches to acquire the application name in the webpage
[0128] In the manner 2, when the user clicks the download control in the webpage to download the application, first, the node position of the download control in the webpage structure is determined, the texts of the parent nodes and the sibling nodes in the preset level range of the node position are acquired, the application name appearing in the acquired texts is determined, when multiple different application names appear in the texts, the weighted values are calculated according to the distances between the node positions of the application names in the webpage structure and the node position corresponding to the download control and the number of times of appearance of the application names in the texts, and the application name corresponding to the maximum weighted value is taken as the final identification result. Then, the installation package of the application is acquired by using the safe download mode according to the application name.
[0129] Referring to FIG. 4B, an example of identifying the application name in the webpage by the way 2 in the related art is shown. As shown in FIG. 4B, after the user clicks the download control 401, the way 2 determines the node position of the download control 401 in the webpage, and obtains the texts of other nodes within a preset level range of the node position, and determines the application name from the texts. As shown in FIG. 4B, in addition to the "video application A", the webpage can also include "video application B", "video application C" and "video application D", and thus the weighted values of the application names need to be calculated respectively to determine the final identification result.
[0130] It can be seen that the way 2 is similar to the way 1, and both essentially obtain the application name by analyzing the webpage structure, and thus have the same shortcomings as the way 1. First, when the webpage structure changes, the text in the webpage can no longer include the application name, or even if the text includes the application name, the application name can be incorrect, resulting in inaccurate identification of the application name. Second, when multiple different application names appear in the obtained text, the application name selected based on the maximum weighted value can be incorrect, resulting in inaccurate identification of the application name.
[0131] Therefore, the ways of analyzing the webpage structure currently have the problem of inaccurate identification of the application name.
[0132] To this end, an embodiment of the present application provides a method for determining the identity of an application. The method obtains first information according to a first installation package pointed to by a first download link on a webpage after a user performs a first operation on the first download link, and determines the identity of a first application intended to be downloaded by the user according to the first information in combination with a pre-configured application information library.
[0133] For example, referring to FIG. 5, an example of identifying the identity of an application in a webpage by the scheme of the embodiment of the present application is shown. After the user clicks the download control 401, according to the original download process, the electronic device 100 sends a request for downloading the application to the first server 200 to request downloading the installation package of the application obtained by the first server 200. In the embodiment of the present application, the request for downloading the application is paused, the download link corresponding to the download control 401 is obtained, and then a request for obtaining the data of the installation package is sent to the first server 200 according to the download link. After receiving the request, the first server 200 returns the data of the installation package to the electronic device 100, and then the electronic device 100 can determine the first information according to the data of the installation package to determine the identity of the application intended to be downloaded by the user in combination with the pre-configured application information library. 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 request for downloading the application sent to the first server 200.
[0134] Please compare FIG. 4A, FIG. 4B and FIG. 5, the manners of FIG. 4A and FIG. 4B are both manners of obtaining the application name by analyzing the webpage structure, which are easy to be affected by the webpage structure, while in the manner of FIG. 5, the identification of the application is determined according to the information of the first installation package stored by the first server, which is equivalent to determining the identification of the application according to the information in the server, without determining the identification of the application from the webpage. Therefore, no matter how the webpage structure changes, the first download link can be obtained when the user triggers the first operation, and then the above process can be performed according to the first download link to determine the identification of the first application, and the webpage structure change or the appearance of a new webpage will not affect the obtaining of the first download link, so the method of the embodiment of the present application will not be affected by the webpage structure change or the appearance of a new webpage, and the success rate of determining the identification of the first application is higher. On the other hand, in the manners of FIG. 4A and FIG. 4B, the application name obtained by analyzing the webpage structure has a low confidence level, for example, in the manner of FIG. 4B, multiple application names exist, and the application name may be misidentified due to the calculation of the weighting value, while in the manner of FIG. 5, the identification of the application is determined by matching the information of the installation package with the application information library, and the identification of the application can be obtained only when the information is completely matched, so the situation that multiple application names cannot be accurately distinguished in FIG. 4B will not occur, and thus the identification of the application obtained by the method of the embodiment of the present application is more accurate, and the accuracy of determining the identification of the application to be downloaded by the user is improved.
[0135] In some embodiments, the determined identification of the application can also be verified by a certain verification manner, to further improve the accuracy of identifying the application to be downloaded by the user. In an example, the information of the installation package can include the characteristics of the installation package, such as the data amount of the installation package, etc., by comparing with the characteristics of the installation package stored in the preset information library, whether it is the same installation package can be further verified, to increase the reliability of the application identification result.
[0136] The technical solution of the embodiment of the present application can be used to assist the user to more safely download the application. The following lists several application scenarios of the technical solution provided by the embodiment of the present application.
[0137] Application scenario 1: when the user triggers the operation of downloading the application, by determining the identification of the application to be downloaded by the user, the identification of the current downloaded application, such as the application name, the package name of the installation package, etc., can be output to the user, so that the user can determine whether the current downloaded application is the application that the user actually needs to download according to the identification of the current downloaded application, thereby reducing the probability that the user is misled by the webpage to download the application that the user does not need.
[0138] For example, the user needs to download the application 1, but due to webpage display or other reasons, the user mistakenly believes that the download control of the application 2 is used to download the application 1, and thus mistakenly clicks the download control, which causes the installation package to be downloaded incorrectly. However, by using the method for determining the identifier of the application provided in the embodiments of the present application, the download link corresponding to the download control clicked by the user can be analyzed to obtain the identifier of the application that the user intends to download, and the identifier of the currently downloaded application can be output to the user, so that the user can intuitively see that the currently downloaded application is the application 2, and the probability of incorrect downloading can be reduced.
[0139] In one example, referring to (a) of FIG. 6A, the electronic device 100 displays a download interface 60 of the browser application A, and the webpage provides two download modes, one of which is local download, and the other of which is secure download, and the corresponding download controls are 601 and 602 shown in (a) of FIG. 6A. The secure download here is different from the secure download mode involved in the embodiments of the present application. The secure download here refers to the need to first download a security management application (here, the mobile security manager is taken as an example), and then download the browser application A through the security management application. Therefore, when the user clicks the download control 602, the installation package of the application "mobile security manager" is downloaded first, rather than the installation package of the browser application A that the user expects. However, the user often does not want to install too many security management applications in the electronic device 100.
[0140] Therefore, in the embodiments of the present application, after the user clicks the download control 602, the download link corresponding to the download control 602 is obtained, and the information of the installation package pointed to by the download link is obtained. The identifier of the application that the user intends to download is identified according to the information of the installation package in combination with the preset information library, and the prompt interface 61 shown in (b) of FIG. 6A is displayed. The prompt interface 61 prompts the user that the "mobile security manager" is being downloaded, and whether to continue downloading is provided, and the user is provided with an interactive confirmation control 611 and a cancel control 612. The user can confirm or cancel according to the user's own situation. Clicking the confirmation control 611 continues to download the installation package of the mobile security manager, and clicking the cancel control 612 cancels the download of the installation package of the mobile security manager.
[0141] For another example, the webpage for downloading the application can be tampered with to become a page for downloading other types of files, but the webpage is still displayed as the original application download page, which causes the user to mistakenly believe that the webpage is still used to download the application. In other words, the download link in the webpage is tampered with to point to a download link of other types of files, or the content pointed to by the download link is a file of a type other than the installation package type, which ultimately causes the user to mistakenly download other types of files.
[0142] In one example, referring to (a) of FIG. 6B, the electronic device 100 displays a download interface 62 of the video application B, which includes a download control 621 of the video application B. The download control 621 originally corresponds to a download link 1 of the video application B, but is tampered to be a download link 2 of a file of other non-install package type, which is imperceptible to the user, so the user will normally click the download control 621 to download the video application B.
[0143] Then, in the embodiment of the present application, after the user clicks the download control 621, the download link corresponding to the download control 621 is obtained, and the information of the installation package pointed to by the download link is acquired, and the identity of the application to be downloaded by the user is identified according to the installation package information in combination with the preset information library. Since the content pointed to by the download link is not an installation package, if the information of the file of the non-install package type is stored in the preset information library, it can be determined that the content currently being downloaded is not an installation package, and a prompt interface 63 shown in (b) of FIG. 6B is displayed. The prompt interface 63 prompts the user that a file of non-install package type (or the actual format of the output file, etc.) is being downloaded, whether to continue downloading, and provides the user with an interactive confirmation control 631 and a cancel control 632. The user can confirm or cancel according to his own situation, clicks the confirmation control 631 to continue downloading the file, and clicks the cancel control 632 to cancel downloading the file.
[0144] Application scenario 2: When the user triggers the operation of downloading the application, the identity of the application to be downloaded by the user is determined, and the application can be downloaded through the secure download mode. The secure download mode refers to downloading the installation package using the server (such as the third server 400) of the manufacturer of the electronic device 100, because the installation package provided by the server of the manufacturer is a secure installation package, which helps to improve the security of downloading the installation package.
[0145] In one example, referring to (a) of FIG. 6C, the electronic device 100 displays a download interface 64 of the game application A, which includes a download control 641 of the game application A. The download control 641 corresponds to a download link of the game application A. Then, in the embodiment of the present application, after the user clicks the download control 641, the download link corresponding to the download control 641 is obtained, and the information of the installation package pointed to by the download link is acquired, and the identity of the application to be downloaded by the user is identified according to the installation package information in combination with the preset information library, and then the game application A can be downloaded through the secure download mode.
[0146] Among them, downloading the video application through the secure download mode can have various implementation manners.
[0147] In the implementation manner 1, when the method of identifying the application is executed by the electronic device 100, after the electronic device 100 identifies the identity of the application to be downloaded by the user, the electronic device 100 can call the application market APP in the electronic device 100, search the application in the application market APP, and if the application market includes the application, the electronic device 100 can prompt the user to download the application through the application market APP. Referring to (b) shown in FIG. 6C, the electronic device 100 displays a prompt interface 65, the prompt interface 65 can prompt "the game application A can be downloaded through the application market, do you want to download the application in the application market?", and provide the user with an interactive confirmation control 651 and a continue downloading control 652, and the user can confirm or continue to download according to the user's own situation. If the user clicks the confirmation control 651, the game application A can be downloaded through the application market APP, for example, the electronic device 100 can automatically jump to the download interface of the application market APP, and automatically download the installation package of the game application A or download the installation package of the game application A after the user clicks the download control in the interface. If the user clicks the continue downloading control 652, it means that the user wants to continue to download the game application A through the current downloading manner, and then the game application A is downloaded through the webpage downloading manner.
[0148] In the implementation manner 2, when the method of identifying the application is executed by the second server 300, after the second server 300 determines the identity of the application to be downloaded by the user, the second server 300 can request the third server 400 corresponding to the application market to obtain the download link of the game application A according to the identification result, the download link is 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 downloads the game application A using the download link.
[0149] In the implementation manner 3, when the method of identifying the application is executed by the second server 300, after the second server 300 obtains the identity of the application to be downloaded by the user, the second server 300 can send the identification result to the electronic device 100, and the electronic device 100 can call the application market to download the game application A in a manner similar to the implementation manner 1, and thus is not described in detail.
[0150] In some embodiments, the user can be unaware of the jump from the webpage downloading application to the application market downloading application. For example, the user can pre-configure to preferentially download the application in the application market, and then after identifying the application to be downloaded by the user, and the application market includes the application, the application can be directly downloaded from the application market without the user's confirmation again.
[0151] Scenario 3: When the user triggers the operation of downloading the application, the identifier of the application to be downloaded is determined, for example, the package name of the application to be downloaded can be determined, and whether the installation package of the application is stored can be detected according to the package name. When the installation package of the application is stored, the risk detection of the installation package can be performed. When the installation package has security risks, the risk prompt of the installation package of the application can be output to the user, so as to reduce the probability that the user downloads the installation package with security risks.
[0152] In one example, referring to (a) of FIG. 6D, the electronic device 100 displays the download interface 64 of the game application A, which includes the download control 641 of the game application A. After the user clicks the download control 641, the identifier of the application to be downloaded can be determined, and then the risk detection of the installation package of the game application A can be performed when the installation package of the game application A is stored. Referring to (b) of FIG. 6D, the electronic device 200 displays the prompt interface 66, which prompts “the current installation package has high risk, do you want to continue downloading?” and provides the user with the confirm control 661 and the cancel control 662 that can be interacted. The user can confirm or continue to download according to the situation. If the user clicks the confirm control 661, the installation package of the game application A is downloaded through the webpage downloading mode. If the user clicks the cancel control 662, the installation package of the game application A is canceled.
[0153] In some embodiments, the risk prompt output to the user can include the risk level or specific risk content in the installation package, so as to help the user judge whether to continue to download the installation package through the current downloading mode. For example, as shown in (b) of FIG. 6D, the prompt interface can display that the installation package includes the plug-in A and the plug-in B, or the specific information of the plug-in A and the plug-in B, so as to help the user judge whether to continue to download the installation package.
[0154] The technical solutions of the embodiments of the present application can also be applied to other possible scenarios, which are not limited by the embodiments of the present application.
[0155] In the above introduction, the identifier of the application to be downloaded by the user can be determined when the user performs the operation of downloading the application. The implementation principle of the method of determining the identifier of the application will be described below with reference to the drawings.
[0156] Please refer to FIG. 7, which is a flowchart of the method of determining the identifier of the application provided by the embodiments of the present application. The method can be executed by the electronic device (such as the electronic device 100 described above) or the client (such as the client 101 in FIG. 2 or FIG. 3) in the electronic device, or the client and the second server in combination, which will be introduced below taking the client as an example. As shown in FIG. 7, the flowchart can include:
[0157] Step 701: The client receives a first operation for a first download link on a webpage, the first operation being used to download a first application.
[0158] Optionally, the first operation can be an operation performed by the user in any manner. For example, the first operation can be an operation of the user on one or more keys on a keyboard. For another example, the first operation can be a touch operation of the user. For yet another example, the first operation can also be a mouse click operation performed by the user, etc. The embodiments of the present application do not limit the specific manner of the first operation.
[0159] In some embodiments, the user can download the application through a manner other than the application market APP provided by the electronic device out of the factory, such as a manner of downloading the application through a webpage, or a manner of downloading the application in another application market installed in the electronic device by the user, etc. Then, the first operation can be an operation triggered when the application is downloaded through these manners, and the embodiments of the present application mainly take the webpage downloading as an example for description.
[0160] In one example, as shown in the architecture of (a) in FIG. 3, the client can be a browser application (here, the browser application is taken as an example, and other host programs can also be taken), or the client is included in the browser application. Then, the browser (or the client) can display a first webpage, and the first webpage can be used to download the application. Optionally, the first webpage includes a first download link used to download the first application, and the first operation can be an operation performed on the first download link.
[0161] In another example, as shown in the architecture of (b) in FIG. 3, the client can be an application independent of the browser application. Then, the browser can display a first webpage, and the first webpage can be used to download the application. The first webpage includes a first download link used to download 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 an interface provided by the browser application, or the client can request to obtain a permission provided by an operating system of the electronic device to detect the first operation through a system interface of the operating system, or the detection of the first operation can also be implemented through other possible manners.
[0162] The first download link is used to download the first application, or in other words, is used to download the first installation package. In some embodiments, the first download link can be directly displayed in the first webpage, and the first operation can be an operation performed on the displayed first download link itself. In some embodiments, the first download link can not be directly displayed in the first webpage, but is displayed in the form of a first download control associated with the first download link, and an operation performed on the first download control can also be an operation performed on the first download link, i.e., the first operation can also be an operation performed on the first download control. Optionally, the first download control can be displayed in the form of an icon, which can be referred to as a download icon. When an operation is performed on the download icon, the corresponding first application can be downloaded. The first download control can also be displayed in the form of text.
[0163] Optionally, in addition to the first download link of the first application, the first webpage can also include download links of other applications. For example, in one example, the first webpage is a download page of the first application, and the first webpage can also include other applications recommended for the user to download. For another example, the first webpage is a download page of a second application, and the first application is an application recommended for the user to download, or an application associated with the second application (for example, the first application needs to be downloaded before the second application is downloaded, etc.).
[0164] Step 702: The client obtains the first information according to the first installation package stored by the first server in response to the first operation, 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.
[0165] The first download link points to the first installation package stored in the first server. For example, the first download link can be a file storage path in the first server, and the first installation package stored in the corresponding storage space can be accessed and obtained according to the file storage path. After the user triggers the first operation, the client can obtain the first information according to the first installation package pointed to by the first download link. The client can obtain the first download link in the following ways:
[0166] Method 1: The first download link is displayed in the first webpage. Then, the first download link operated by the user can be determined according to the position of the first operation of the user in the first webpage.
[0167] 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.
[0168] For example, the following is a sample source code snippet from an HTML file: <a rel="nofollow"href="https: / / download.XXXXXXXXX>Download
[0169] in, The tag represents the above example is a hyperlink element, used to create a clickable link to the specified uniform resource locator (URL). rel = "nofollow" represents that this is a link attribute, telling the search engine not to follow this link. href = "https: / / download.XXXXXXXXX is the first download link, pointing to the file that needs to be downloaded, where the download attribute indicates that this content is a download link. The tag signifies that this is an inline element, used to add extra text or style inside a link. The text content inside is "download", which is the link text that the user sees on the webpage, that is, the aforementioned clickable first download control. Therefore, the first download link can be obtained by analyzing the HTML file.
[0170] In a manner 3, generally, after the user performs the first operation on the first download control, the browser sends a request for downloading the first application to the first server through the first download link to download the first installation package from the first server. Therefore, the first download link can be obtained from the request generated by the browser. For example, the client can intercept the request and obtain the first download link carried in the request.
[0171] In some embodiments, the above manners can be used alone or in combination, and no specific limitation is made in this regard.
[0172] After obtaining the first download link, the client can access the first installation package stored in the first server through the first download link, and then obtain the first information according to the first installation package. The first information is determined according to the data in the first installation package. The data can be part of the data in the first installation package, that is, the method does not need to obtain all the information of the first installation package, but only determines the identifier of the first application according to 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. Alternatively, 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 can be converted from the information in the first installation package. For example, the first information can indicate one or more of the following information:
[0173] (1) the signature of the first installation package. For the convenience of description, the information indicating the signature of the first installation package is referred to as a first fingerprint in the embodiments of the present application, and the first fingerprint can also be referred to as a first application fingerprint or other names, which are not limited, and will be referred to as the first fingerprint hereinafter. The first fingerprint is determined according to 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 conversion of the signature of the first installation package can be hash calculation of the signature of the first installation package, and 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 referred to as a digital signature, which is a mechanism for verifying the authenticity and integrity of a software package or a file. The digital signature is obtained by encrypting the hash value of the file by using a private key, and then decrypting and verifying by using a 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, and then the first fingerprint is obtained. Since the probability of repetition of the digital signatures of different first installation packages is low, the probability of repetition of the first fingerprints determined according to the signatures of the first installation packages is also low, and thus different applications can be identified by the first fingerprints.
[0174] (2) the first data in the first installation package, and the first data is data located at a first position in the first installation package. Optionally, the first position can include any data position specified in the first installation package. For example, the first data can be a data segment of a specified data length starting from the first data position of the first installation package, or can be a data segment of a specified data length starting from the last data position of the first installation package, and the like, which are not limited. For the convenience of description, the information indicating the first data in the first installation package is referred to as a second fingerprint in the embodiments of the present application, and the second fingerprint can also be referred to as a second application fingerprint or other names, which are not limited, and will be referred to as the second fingerprint hereinafter. The second fingerprint is determined according to the first data in the first installation package. Optionally, the second fingerprint can be the first data, or can be obtained by converting the first data. Optionally, the conversion of the first data can be hash calculation of the first data, and the second fingerprint is the hash value of the first data. Since the data contained in different first installation packages is often different, the first data is intercepted for comparison, which can also identify the application to some extent.
[0175] (3) the data amount of the first installation package, i.e., the size of the first installation package. In an example, the size of the first installation package is usually included in the first installation package, such as a filesize field, and the data amount of the first installation package can be obtained by reading the value corresponding to the field. The data amount of the first installation package can assist in verifying whether the determined first application identifier is accurate, so as to improve the accuracy of the obtained first application identifier.
[0176] The first information can also include any other information that can be used to identify the first installation package, and the embodiments of the present application do not limit this. The manner in which the client obtains the first installation package will be described in detail later, and will not be described in detail here.
[0177] Step 703: The client determines that the identifier corresponding to the first information is the first application identifier, and the first application identifier is used to download the installation package of the first application from a download path other than the first server.
[0178] Optionally, the first application identifier can be the package name of the first installation package, the application name of the first application, or other identifiers, etc. The first installation package is the installation package of the first application that the user intends to download, and the first application identifier can also be understood as the identifier of the first installation package.
[0179] In the embodiments of the present application, the correspondence between the information and the identifier of the installation package (or application) can be stored in advance, so that after obtaining the first information of the first installation package, the identifier corresponding to the first information can be determined as the first application identifier. Alternatively, the information of different installation packages (or applications) can also be stored in advance, and the information of the first installation package stored in advance can be referred to as second information. The second information can include the correspondence between the third information and the identifier of the application, or in other words, the second information includes the third information and the identifier of the application. The third information is the same type of information as the first information, and here, the first and third are used to distinguish, but the contents included therein can be the same, such as the third information indicating one or more of the signature of the first installation package, the first data, or the data amount. Then, the first information of the first installation package can be matched in these information, and the identifier corresponding to the matched information is determined as the first application identifier.
[0180] In some embodiments, an information library can be constructed to store the information obtained according to each installation package, and the information library can also be referred to as an application information library or a fingerprint information library, etc. For the convenience of description, the application information library will be referred to hereinafter.
[0181] By pre-extracting the information of the plurality of installation packages, the information can indicate one or more of the signature of the installation package, the first data or the data amount, when the user triggers the first operation of downloading the first application, the first information of the first installation package obtained can be matched with the application information library, if the matching is successful, for example, it is determined that the first information is the same as the third information included in the second information in the application information library, the first identifier in the second information matched successfully can be determined as the identifier of the first application, so as to successfully realize the identification of the first application to be downloaded. Since the application identification manner does not need to analyze the webpage structure, it is not affected by the factors such as the change of the browser webpage structure, the online of the new webpage of the browser and the complexity of the text information in the webpage of the browser, the probability of application identification error caused by the change of the webpage structure is reduced, and the accuracy of application identification is greatly improved. Moreover, the application identification manner is realized by information matching, and the application identification is successful only when the first information is completely matched with the information in the application information library, so as to improve the accuracy of determining the identifier of the application to be downloaded by the user.
[0182] Step 704: The client outputs prompt information according to the first identifier of the first application.
[0183] In some embodiments, the client can output corresponding prompt information according to the first identifier of the first application in the manner shown in FIGS. 6A-6D, and thus details are not repeated here.
[0184] Optionally, step 704 is an optional step, that is, step 704 can be executed or not executed, and thus is shown by a dashed line in FIG. 7.
[0185] In some embodiments, the client can have multiple ways to determine the identifier of the first application.
[0186] Method 1: If the client locally configures the application information library, the client can store the information obtained according to the installation package locally, and the client can perform a local matching process, that is, match the first information of the first installation package with the application information library, and determine the first identifier included in the second information matched successfully as the identifier of the first application.
[0187] In some embodiments, the information in the application information library locally stored by the client can be obtained by the client according to the downloaded installation package. For example, the client can detect the event of downloading the installation package of the application by the electronic device, when the downloading event is detected, the information can be extracted according to the downloaded installation package and stored in the application information library.
[0188] In some embodiments, the client can load information from the second server to the application information library. When the information stored in the application information library of the second server is updated, the second server can notify the client to perform incremental update.
[0189] In a second manner, if the second server configures an application information library, the client can request the second server to determine the identity of the first application.
[0190] In one example, referring to FIG. 8, another flow diagram of the method for determining the identity of an application provided by the embodiments of the present application is shown.
[0191] In step 801, the client receives a first operation for a first download link on a webpage, and the first operation is used to download a first application.
[0192] In step 802, the client obtains first information according to a first installation package stored by a first server in response to the first operation, the first installation package is an installation package of the first application, and the first server is a server corresponding to the first download link.
[0193] Steps 801-802 are similar to steps 701-702 shown in FIG. 7, and the description of the corresponding embodiments in FIG. 7 can be referred to, and thus will not be repeated here.
[0194] In step 803, the client sends a first request to a second server. The first request is used to request the second server to determine the identity of the first application, and the first request includes the first information. Alternatively, the first information included in the first request is used to determine the identity of the first application. Correspondingly, the second server receives the first request.
[0195] In one example, the client can call an identification interface of the second server to send the first request to the second server, so as to request the second server to identify the identity of the first application according to the first information of the first installation package.
[0196] In step 804, the second server determines that the identity corresponding to the first information is the identity of the first application, and the identity of the first application is used to download the installation package of the first application from a server outside the first server.
[0197] The application information library in the second server includes information obtained according to at least one installation package, which can indicate one or more of a signature of the installation package, first data, or a data amount. The second server can match the first information of the first installation package with the application information library, and determine the first identity included in the second information that is matched successfully as the identity of the first application. The second information includes a corresponding relationship between the third information and the first identity, or the second information includes the third information and the first identity.
[0198] In step 805, the second server sends the identity of the first application to the client. Correspondingly, the client receives the identity of the first application.
[0199] In this embodiment, the process of matching the application information library can be implemented by the second server, which has higher computing performance than the client, so as to improve the efficiency of the process of matching the application information library. On the other hand, the steps required to be performed by the client can be reduced, the load of the electronic device can be reduced, and the probability of the electronic device freezing can be reduced.
[0200] In some embodiments, in order to improve the download efficiency of the installation package, the second server can also send the installation package of the first application to be downloaded by the user to the client. The second server can send the installation package to the client in two ways, way 1 corresponds to steps 806-807, and way 2 corresponds to steps 808-810. Steps 806-807 or steps 808-810 are optional steps, and thus are shown in dashed lines in FIG. 8.
[0201] Step 806: The second server obtains the second installation package of the first application according to the identifier of the first application.
[0202] In one example, if the second server stores the installation package of some applications, the second server can query the locally stored installation package according to the first identifier of the first application, and if the query is successful, the second server can obtain the second installation package of the first application from the local storage.
[0203] In another example, the second server can also send a request for obtaining the installation package to a third server of an application market of the electronic device, and if the third server stores the second installation package of the first application, the third server can send the second installation package to the second server.
[0204] The second installation package and the first installation package can be the same installation package, or can be installation packages of different versions of the same application. Here, different names are used to distinguish the sources 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 of the present embodiment.
[0205] Step 807: The second server sends the second installation package to the client. Correspondingly, the client receives the second installation package.
[0206] Step 808: The second server obtains a second download link of the second installation package according to the identifier of the first application.
[0207] Step 809: The second server sends the second download link to the client. Correspondingly, the client receives the second download link.
[0208] Step 810: The client downloads the second installation package according to the second download link.
[0209] In some embodiments, the second server can also send a second download link to the client, the second download link pointing to the second installation package, and the client can download the second installation package according to the second download link. The second download link can point to the second server, or can point to a third server, or can point to any storage space associated with the second server or the third server.
[0210] Optionally, the first application identifier, the second installation package, or the second download link can be sent to the client in a response, or can be sent to the client respectively, and no limitation is made in this regard.
[0211] In some embodiments, the execution of steps 806-807 or steps 808-810 can have a precondition. For example, the precondition is that the user agrees to download the installation package from the second server or the third server. In one example, the user can pre-configure to preferentially download the installation package from the second server or the third server, i.e., to download the installation package from the second server or the third server by default, and then the second server can send the second installation package to the client by executing steps 806-807, or the second server can send the second download link to the client by executing steps 808-810. In another example, in step 805, the client can prompt the user to download the application in a secure download mode or to download the application from an application market, and after the user confirms, the second server can send the second installation package to the client by executing steps 806-807, or the second server can send the second download link to the client by executing steps 808-810.
[0212] In one example, referring to FIG. 9, another flow diagram of a method for determining an application identifier is provided in the embodiments of the present application.
[0213] Step 901: The client receives a first operation on a first download link on a webpage, the first operation being used to download a first application, and the first download link pointing to a first server or a first installation package stored by the first server.
[0214] Step 902: The client obtains a first download link of the first application in response to the first operation, the first download link being used to download a first installation package of the first application.
[0215] When the first download link is directly displayed in the webpage or is obtained in advance, the first download link is known to the client, and then step 902 can not be executed. Therefore, step 902 is an optional step, and thus is represented by a dashed line in FIG. 9.
[0216] Step 903: The client sends the first download link to the second server. Correspondingly, the second server receives the first download link.
[0217] Step 904: The second server obtains the first information of the first installation package according to the first download link.
[0218] The process in which the server obtains the first information of the first installation package can be similar to the process in which the client obtains the first information of the first installation package, and thus reference can be made to the foregoing description.
[0219] Step 905: The second server determines the identity of the first application according to the first information of the first installation package and the application information library.
[0220] Step 906: The second server sends the identity of the first application to the client. Correspondingly, the client receives the identity of the first application.
[0221] Step 907: The client outputs prompt information according to the identity of the first application.
[0222] The process in the foregoing steps can refer to the description of the corresponding part in FIG. 7 or FIG. 8, and thus no further description is given here.
[0223] In this embodiment, the client can send the obtained first download link to the second server, and the subsequent steps can be completely executed by the second server. In comparison with the client, the server has higher computing performance, and thus the efficiency of application identification can be improved. On the other hand, the steps required to be executed by the client can be reduced, the load of the electronic device can be reduced, and the probability of freezing of the electronic device can be reduced.
[0224] In some embodiments, considering that the installation package downloaded in the manner such as webpage download can have security risks, after detecting the first operation, the client can pause downloading the first application to avoid downloading the installation package with security risks. Please refer to FIG. 10, which is another flowchart of the method provided in the embodiments of the present application.
[0225] Step 1001: The client receives a first operation, and the first operation is used to download a first application.
[0226] Step 1002: The client pauses downloading the first installation package in response to the first operation. Alternatively, the client can not prevent downloading the first installation package, but pause decompression or installation of the installation package after the first installation package is downloaded.
[0227] Step 1003: The client obtains the identity of the first application in response to the first operation.
[0228] In step 1003, any manner in the corresponding embodiments of FIGS. 7-9 can be used to obtain the identity of the first application.
[0229] Step 1004: The client outputs prompt information according to the identification of the first application.
[0230] The prompt information may be, for example, the prompt information shown in FIGS. 6A-6D. For example, the identification of the first application is outputted; prompt information for inquiring whether to download the first installation package is outputted; prompt information for inquiring whether to download the installation package of the first application through a first download mode is outputted, the first download mode being used to download the installation package of the first application from another download path, such as a second server or a third server corresponding to an application market; risk information of the first installation package is outputted, and the like.
[0231] Step 1005: The client receives a second operation. The second operation is a feedback operation performed on the prompt information. For example, the second operation is an operation of confirming to download the first application through the first download mode, i.e., selecting 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 to download the first installation package from the first server.
[0232] Step 1006: If the second operation is used to indicate to download the first installation package, the client sends a request for downloading the first application to the first server, so as to download the first installation package from the first server.
[0233] In one example, the client can pause the downloading of the first installation package by intercepting the first download request for downloading the application sent to the first server, and then when it is needed to continue to download the first installation package, the client can continue to send the intercepted first download request to the first server, so as to continue to download the first installation package from the first server. In another example, the client can also regenerate the request for downloading the application according to the first download link, and send the regenerated request to the first server, so as to continue to download the first installation package from the first server.
[0234] Step 1007: If the second operation is used to indicate to download the first application through the first download mode, the client sends a fourth request to the second server, the fourth request being used to download the first application, so as to download the second installation package of the first application from the second server. Alternatively, the client sends the fourth request to the third server, so as to download the second installation package of the first application from the third server.
[0235] Through the embodiment, the user can be prompted according to the result of application identification whether to download the installation package in a safer manner, which helps to improve the security of the downloaded installation package. The user can also select to continue to download the first installation package of the original webpage, so as to meet the user's own use requirements.
[0236] In the above introduction, the first information can be obtained according to the first installation package pointed by the first download link. The implementation principle of obtaining the first information according to the first installation package pointed by the first download link will be described below in combination with the drawings.
[0237] In some embodiments, the electronic device can install different operating systems, and the formats of the installation packages adaptable in different operating systems are different. For example, the installation package of the Android operating system is an Android application package (APK), the installation package of the OH operating system or the Harmony operating system is a HarmonyOS ability package (HAP), and the installation package of the Linux operating system is a redhat package. Although the structures of different installation packages are different, the principle of obtaining the first information of the first installation package is similar, that is, the positions of the required information are determined according to the structures of various types of installation packages, and the required information is read according to the positions. Hereinafter, taking the first installation package as an APK package as an example for description.
[0238] Please refer to FIG. 11A, which is a structural diagram of an APK file. The APK file includes the contents of ZIP entries, an APK signing block, a central directory, and an end of central directory record.
[0239] The APK signing block includes an APK signing block length field, N key-value pairs, an APK signing block length, and a magic number of the APK signing block. The two APK signing block length fields in the APK signing block are the same, and the value of the APK signing block length field indicates the length of the entire APK signing block. The N key-value pairs are used to store specific signature data of the signing block. The complete signature data is divided into N parts, and each part is stored in a key-value pair. The magic number is usually a fixed byte sequence, which is used to identify the type or format of the data block, etc. The magic number of the signing block is used to identify that the data block is signature data or signature data of a specific format. As shown in FIG. 11A, the magic number of the APK signing block occupies 16 bytes, and the first 8 bytes of the magic number is the APK signing block length.
[0240] The central directory end record is used to identify the end of the file and the description record of the overall structure, which contains important data of the overall information of the file, such as the total number of files, the starting address of the central directory area, and the like, which helps to locate and correctly parse the structure of the file, so as to effectively read and operate the content of the file. Referring to FIG. 11A, the central directory end record can include a magic number of the central directory end record, other fields, and a central directory start address field. The magic number of the central directory end record is similar to the magic number of the APK signature block, and can be used to identify that this data block belongs to the central directory end record, or a central directory end record of a specific format. Referring to FIG. 11A, the magic number of the central directory end record occupies 4 bytes, the other fields occupy 12 bytes, and the central directory start address field occupies 4 bytes. The central directory start address can also be referred to as a central directory start disk number.
[0241] Therefore, in combination with the above structural description, it can be known that the part of data including the central directory end record at the end of the APK file can be read, and the magic number of the central directory end record is a fixed sequence value, so that the starting address of the central directory end record can be determined according to the magic number of the central directory end record. The starting address of the central directory area is 16 bytes after the starting address of the central directory end record. The APK signature block length field is 16 bytes before the starting address of the central directory area, and finally the part of the installation package belonging to the APK signature block can be determined according to the signature block length.
[0242] Referring to FIG. 11B, a flowchart of obtaining first information according to a first installation package stored by a first server is provided, which can be executed by a client (or an electronic device) or a second server. Here, the client is taken as an example for description. Steps 1101-1108 are a first fingerprint obtaining process, steps 1109-1111 are a second fingerprint obtaining process, and steps 1112-1113 are a first installation package data amount obtaining process. In actual scenarios, the three processes can be executed separately or combined, and no limitation is made thereto.
[0243] Step 1101: The client sends a second request to the first server, the second request is used to request reading the second data included in the first installation package. The first server is the server pointed by the first download link, the second data is the data of the first length located at the end of the first installation package, or the second data is the data of the first length located before the first address, the first address is the data end address of the first installation package. For example, the second data is the data including the central directory end record. Since the client does not know the data length of the central directory end record, the client can request the first server to obtain the data of the first length which is usually greater than its data length. The value of the first length can be set according to experience.
[0244] Optionally, the second request can include the first address, or can not include the first address, when not including the first address, the data to be read can be determined by the type of the request message or the pre-configured default address.
[0245] Step 1102: The first server sends the second data to the client. Correspondingly, the client receives the second data.
[0246] Then, the client can determine the signature of the first installation package according to 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 installation package according to the second data to obtain the signature of the first installation package. Continue to refer to steps 1103-1105 in FIG. 11B, which are specifically illustrated by way of example in this manner.
[0247] Step 1103: The client determines the second address according to 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 address or the 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 the APK signature block.
[0248] In some embodiments, such as in the APK file, the second address can be the end address of the first data block. Since the central directory is located at the position adjacent to the first data block, the second address can also be the start address of the central directory in the first installation package, the end address of the APK signature block is the address one before the start address of the central directory. For example, after the client obtains the second data, since the magic number of the central directory end record is a fixed sequence value, the start address of the central directory end record can be determined according to the magic number of the central directory end record, and the start address of the central directory is obtained by offsetting 16 bytes from the start address of the central directory end record, thereby obtaining the second address.
[0249] Step 1104: The client sends a third request to the first server, the second read request is used to read third data, the third data is the second length of data related to the second address. For example, in the APK file, the second address is the end address of the first data block, and the third data can be the second length of data located before the second address. Or, in the installation package of other data format, the second address is the start address of the first data block, and then the third data can also be the second length of data located after the second address.
[0250] Optionally, the second length is an empirical value, for example, it can be a value greater than the length of the signature block determined according to experience, so that the data containing the APK signature block can be read into the client.
[0251] Step 1105: The first server sends the third data to the client. Correspondingly, the client receives the third data.
[0252] Then, the client can obtain the signature of the first installation package according to the third data, and determine the first fingerprint according to the signature of the first installation package. Please continue to refer to steps 1106-1107 in FIG. 11B, which shows a possible way to obtain the signature of the first installation package according to the third data.
[0253] Step 1106: The client determines a third length corresponding to the signature of the first installation package from the third data.
[0254] Taking APK as an example, it can be seen from FIG. 11A that the start address of the central directory area (i.e. the second address) is offset by 16 bytes to the front to be the APK signature block length field, then 16 bytes are found from the end of the obtained third data to the front to be the end of the APK signature block length field, and 8 bytes are read from the front to obtain the third length.
[0255] Step 1107: The client determines the third length of data starting from the second position of the third data as the signature of the first installation package. The second position is, for example, the end position of the second data, or the second position can be a position determined according to the second address, for example, it is the end position of the key-value pair n before the APK signature block length in FIG. 11A.
[0256] In some embodiments, the client can obtain the signature of the first installation package by reading the third length of data from the last bit of the third data forward according to the third length. Or, when the data length of the second data is less than the third length, it indicates that the read third data does not include a complete signature block, and then the first server can be requested to read the third length of data starting from the end position of the third data to obtain the signature of the first installation package.
[0257] Step 1108: The client determines the first fingerprint according to the signature of the first installation package. For example, the signature of the first installation package is taken as the first fingerprint, or the first fingerprint is obtained by hash calculation according to the signature of the first installation package.
[0258] Since the first installation package pointed by the first download link is stored on the first server, the first installation package can not be in a standard format, for example, the content pointed by the first download link can not be an APK file, and then the method of collecting the signature of the installation package according to the APK structure can not be used, resulting in that the first fingerprint can not be successfully obtained.
[0259] In some embodiments, when the first fingerprint is not successfully obtained (which can be caused by the failure of any of the above steps), steps 1109-1111 can be performed to obtain the second fingerprint as a backup for subsequent application identification.
[0260] In some embodiments, steps 1109-1111 can be continuously performed to obtain the second fingerprint regardless of whether the first fingerprint is successfully obtained or not, and the second fingerprint is used as one of the bases for subsequent application identification. That is, if the first fingerprint is successfully obtained, the subsequent application identification process is performed according to the first fingerprint and / or the second fingerprint, and if the first fingerprint is not successfully obtained, the subsequent application identification process is performed according to the second fingerprint.
[0261] Step 1109: The client sends a seventh request to the first server, and the seventh request is used to read the first data of the first installation package. The first data is the data at the first position in the first installation package. Optionally, the seventh request can include the starting address of the first data, and the seventh request is used to read the data of the specified length starting from the address. The first position includes the data position of the specified length starting from the address. Alternatively, the seventh request can not include any address, and the client and the first server agree to read the data of the specified length starting from the specified position of the first installation package, for example, the specified position is the starting address or the ending address of the first installation package.
[0262] Step 1110: The first server sends the first data to the client.
[0263] Step 1111: The client determines the second fingerprint according to the first data. Optionally, the second fingerprint is the first data, or the second fingerprint is obtained by converting the first data, for example, the hash value of the first data. Regardless of whether the first fingerprint can be successfully obtained or not, the data of the first length in the first installation package can be successfully obtained, and thus the second fingerprint can be successfully obtained.
[0264] Step 1112: The client sends an eighth request to the first server, and the eighth request is used to obtain the data amount of the first installation package. In some embodiments, the data amount of the installation package is a property of the installation package, such as the filesize, and the value of the property of the data amount of the installation package can be read through an application programming interface (API) provided by the first server.
[0265] Step 1113: The first server sends the data amount of the first installation package to the client.
[0266] Through the flow, the first fingerprint, the second fingerprint, and the data amount of the first installation package can be obtained, and one or more of them can be used as the first information to perform the process of determining the identity of the application. Since these information are determined according to the first installation package in the first server, and are irrelevant to the webpage structure of the downloaded webpage, the application recognition error probability caused by the change of the webpage structure, the online of the new webpage of the browser, and the complexity of the text information in the webpage of the browser is reduced, and the accuracy of the application recognition is greatly improved. Moreover, the method of recognizing the application uses the information of the installation package as the fingerprint information of the installation package, and the recognition of the application is realized through the matching of the fingerprint information and the application information library. Only when the fingerprint information is completely matched with the information in the application information library, the recognition of the application is successful, and the accuracy of recognizing the application to be downloaded by the user is improved.
[0267] In some embodiments, the first fingerprint is determined according to the signature in the first installation package, and the unique performance of the signature in the installation package guarantees the uniqueness of the first fingerprint, which helps to improve the recognition accuracy. When the first fingerprint fails to be obtained, the specific length of data in the header of the first installation package is collected as the second fingerprint, which helps to improve the recognition ability of the installation package in a non-standard format.
[0268] In some embodiments, after the electronic device downloads the installation package, the corresponding information can be obtained according to the installation package and stored in the application information library, so that the process of determining the identity of the application can be realized according to the information in the application information library in the subsequent process.
[0269] Referring to FIG. 12, a flowchart of maintaining the application information library is provided in an embodiment of the present application.
[0270] Step 1201: The client obtains the first information and the identity of the first application according to the stored first installation package in response to the completion of the download of the first installation package.
[0271] In addition to the first installation package, the flow of FIG. 12 can also be performed for any installation package downloaded in the electronic device, such as the second installation package described above, and also a third installation package, a fourth installation package, and the like in addition to the second installation package.
[0272] The first information of the first installation package can include one or more of the first fingerprint, the second fingerprint, or the data volume of the first installation package.
[0273] After downloading the first installation package, since the first installation package is stored locally in the electronic device, the client can obtain the first information and the identifier of the first application by parsing the first installation package. This is different from the process of obtaining the first information from the first installation package stored in the first server described above, with the first difference being that the first information in the above process is collected from the first installation package pointed to by the first download link, while here the first information and the identifier of the first application can be extracted from the locally stored first installation package after downloading the first installation package. The second difference is that when obtaining the first information from the first installation package stored in the first server, the second fingerprint can be obtained as a backup when the first fingerprint is not successfully obtained, but here when extracting the first information of the locally stored first installation package, as much information as possible can be extracted to the application information library, and therefore the first information of the first installation package extracted can include the first fingerprint and the second fingerprint, and the like.
[0274] In some embodiments, after parsing the first installation package, the first fingerprint can be obtained according to the signature of the first installation package, the second fingerprint can be obtained according to the first data of the first installation package, and the data volume and other attributes of the first installation package can be extracted. Each installation package usually includes a configuration file (or referred to as a header file), which includes configuration information of the installation package, such as the identifier of the application (such as the package name or the application name), and the like, and therefore after parsing the first installation package, the identifier of the first application can be obtained from the configuration file.
[0275] In one example, taking the first installation package as an APK for example, the APK package can be parsed, the first fingerprint can be obtained according to the APK signature block therein, the second fingerprint can be obtained according to the data of the specified length in the header, the size of the APK package can be calculated, the package name of the first installation package can be obtained from the manifest configuration file in the APK package, and these information can be stored to the application information library.
[0276] In some embodiments, the client can detect the download of the application in the electronic device, and when the download of the application is completed, the required information can be extracted according to the downloaded installation package. For example, when the client is a browser or is included in the browser, the client can extract the required information according to the downloaded installation package after the browser downloads the installation package.
[0277] Step 1202: The client stores the first information and the identification of the first application into the application information library.
[0278] In some embodiments, when the client configures the application information library locally, the client can store the extracted information of the first installation package into the local application information library.
[0279] Step 1203: The client sends a fifth request to the second server, the fifth request being a request for reporting information of the downloaded installation package, and the fifth request including the first information and the identification of the first application. For example, the client can call a reporting interface of the second server to send the fifth request to the second server.
[0280] Step 1204: The second server stores the first information and the identification of the first application into the application information library.
[0281] In some embodiments, when the application information library is deployed in the second server, after the client extracts the first information and the identification of the first application, the client can report the obtained first information and the identification of the first application to the second server for storage, and these information can be used for determining the identification of the first application downloaded by other clients subsequently.
[0282] In some embodiments, in addition to the first information and the identification of the application, the application information library of the second server can also calculate the first number of times and the first time length of the installation package. For example, for the first installation package, the first number of times is the number of times that the first information and the identification of the first installation package reported by the client (the client does not refer to a specific client, but all possible reporting clients) are accumulated, i.e., the number of times that the second server receives the information of the first installation package, and since the client reports the information of the first installation package once when the electronic device downloads the first installation package, the first number of times can also be referred to as the accumulated number of downloads or the accumulated number of reporting times. Optionally, the first number of times can be the accumulated number of times since the first time that the second server receives the first information of the first installation package, or the accumulated number of times within a specified period of time, which is not limited specifically. The first time length is the time difference between the time when the second server first receives the first information of the first installation package and the current time, or in other words, the first time length is the accumulated reporting time length of the first information of the first installation package, and the reporting time length can be understood as the time difference between the time when the second server first receives the information of the first installation package and the current time. Optionally, the time when the second server first receives the information of the first installation package can be the time when the second server actually first receives the information of the first installation package, or the time when the second server first receives the information of the first installation package within a specified period of time, which is not limited specifically. Optionally, the granularity of the first time length can be hours, days, weeks, or months, and when the granularity of the first time length is days, the first time length can also be referred to as the accumulated number of days.
[0283] For example, Table 1 below shows a structure example of the application information base, in which a second information is taken as an example.
[0284] Table 1
[0285] In some embodiments, when the second server stores the information reported by the client, it can also check whether the current report is a malicious report (or malicious attack), and only when it is determined that the report is not malicious, the information reported by the client is stored in the application information base, so as to improve the reliability of the information stored in the application information base.
[0286] Referring to FIG. 13, another flowchart for maintaining the application information base is provided in the embodiments of the present application.
[0287] In step 1301, the client determines a second identifier according to the download time of the first installation package after the completion of the download of the first installation package, and the second identifier is used to indicate the first time period in which the download time is located.
[0288] It can also be understood that a time period is a period or a reporting period, and then the second identifier can also be used to identify the reporting period in which the download time of the first installation package is located, and each reporting period corresponds to a unique second identifier, and the second identifier can also be referred to as an identity (ID). Optionally, the granularity of the reporting period can be day, week, month, etc. In an example, the granularity of the reporting period is day, and the second identifier can also be referred to as a daily ID. Then after the completion of the download of the first installation package, the second identifier of the first installation package can be determined according to the download date of the first installation package, and the second identifier can uniquely identify the download date. For example, the second identifier is the download date, or the second identifier is a hash value calculated according to the download date, or the second identifier can also be an identifier generated by other methods, which is not limited.
[0289] In some embodiments, the value of the reporting period can be a default value, or a configuration value issued by the second server to the client. The client can generate a second identifier for each period according to the preconfigured value of the reporting period.
[0290] In step 1302, the client obtains the first information of the first installation package and the identifier of the first application.
[0291] The way in which the client obtains the second information of the first installation package can refer to the introduction of the corresponding part of step 1201 in FIG. 12, which will not be repeated here.
[0292] Step 1303: The client sends a fifth request to the second server, the fifth request is a request for reporting information of the client downloading the installation package, and the fifth request includes the second identifier, the first information, and the identifier of the first application. For example, the client can call a reporting interface of the second server to send the fifth request to the second server. Correspondingly, the second server receives the fifth request.
[0293] In some embodiments, before sending the fifth request, the client can first determine whether the information of the first installation package has been reported to the second server. If the information of the first installation package has been reported, the step 1303 can not be performed. If the information of the first installation package has not been reported, the step 1303 is performed. Optionally, determining whether the information of the first installation package has been reported to the second server can refer to whether the information of the first installation package has been reported to the second server within a reporting period corresponding to the second identifier.
[0294] Step 1304: The second server determines the total number of reports of the client in the first time period. The total number of reports of the client is the number of times of receiving the request of reporting the information of the installation package (or the application) of the client, or the number of times of reporting the information of the installation package (or the application) of the client.
[0295] For example, the second server can store statistical data related to reporting in each time period, and the statistical data can include the number of times of reporting the information of each client. Then, the second server can determine the corresponding first time period according to the second identifier, and query the total number of reports of the client in the statistical data corresponding to the first time period. Optionally, the statistical data can be stored in a cache or can be stored persistently in a disk. Optionally, the total number of reports can include only the number of times of reporting the first information of the first installation package of the client, or can include the number of times of reporting the information of any installation package of the client.
[0296] Step 1305: The second server determines whether the total number of reports is greater than a third threshold. If the determination result of step 1306 is no, i.e., the total number of reports is less than or equal to the third threshold, jump to step 1306 for execution. If the determination result of step 1305 is yes, i.e., the total number of reports is greater than the third threshold, jump to step 1309 for execution.
[0297] Step 1306: The second server determines whether the same information from the client has been received, i.e., the first information and the identifier of the first application. If the determination result of step 1306 is no, i.e., the first information and the identifier of the first application from the client have not been received, jump to step 1307 for execution. If the determination result of step 1306 is yes, jump to step 1309 for execution.
[0298] In some embodiments, the second server can store the reporting records of respective clients, and then determine whether the first information and the identifier of the first application from the client have been received by the second server by querying whether the first information and the identifier of the first application from the client have been included in the reporting record of the client. For example, the second server can query whether the first information and the identifier of the first application from the client have been included in the reporting record of the client according to the first information and the identifier of the first application from the client. If the first information and the identifier of the first application from the client have been included in the reporting record of the client, it indicates that the second server has received the first information and the identifier of the first application from the client. Otherwise, if the first information and the identifier of the first application from the client have not been included in the reporting record of the client, it indicates that the second server has not received the first information and the identifier of the first application from the client.
[0299] Optionally, the determining, by the second server, whether the first information and the identifier of the first application from the client have been received can include determining, by the second server, whether the first information and the identifier of the first application from the client have been received within the first time period corresponding to the second identifier. The reporting records of the clients stored by the second server can be stored according to different reporting periods respectively. When step 1306 is performed, only the records of the reporting period corresponding to the second identifier can be queried, the data query range is reduced, and the processing efficiency is improved.
[0300] Step 1307: The second server determines the first number of times and the first time length of the first installation package.
[0301] When the judgment conditions of step 1305 and step 1306 are met, the second server determines that the reporting behavior of the client this time does not belong to malicious reporting, and then the second server needs to store the related information of the first installation package sent by the client into the application information library.
[0302] Step 1308: The second server stores the related information of the first installation package (or the first application) into the application information library. The related information includes one or more of the second identifier, the first information and the identifier of the first application, the first number of times, and the first time length.
[0303] In some embodiments, the second server can first store the related information of the first installation package sent by the client into the cache, and then accumulate the application data into the application information library.
[0304] Step 1309: The second server determines that the reporting of the client this time belongs to malicious reporting. Then, the second server will not store the information of the reporting of the client this time, and the process ends.
[0305] Through the above process, the second server will store the data reported by the client into the application information library when it is determined that the client does not belong to malicious reporting, prevent the client from maliciously reporting data, exclude the noise data when accumulating the application information library, and improve the accuracy of identifying the application installation package to be downloaded by the user.
[0306] The steps in the above flow can be selectively executed, such as the judgment conditions of steps 1305 and 1306 can be used alternatively or in combination, and the specific implementation is not limited.
[0307] In some embodiments, in addition to the above-mentioned manner of reporting information by the client, the second server can also actively collect the information of the installation package. For example, the second server can extract information from the installation package stored by the third server, and store the extracted information into the application information library.
[0308] In some embodiments, when the identity of the first application is determined according to the first information, the application information library can be matched according to the first information, and if the matching is successful, the installation package matched successfully can be further verified to improve the accuracy of the application identification result. For example, the first fingerprint or the second fingerprint can be used to match the application information library, the features of the first installation package can be used to perform consistency verification on the second information matched, and the first number and the first time length can be used to make a confidence judgment on the identified application. Through the verification of multiple means, the accuracy of the application identification result is improved. Next, the process of identifying the application will be described. Please refer to FIG. 14, which is another flowchart of a method for determining the identity of an application provided by an embodiment of the present application. The flowchart can be executed by the client or the second server, and the following will be described taking the second server as an example.
[0309] Step 1401: The second server queries the application information library according to the first information of the first installation package. Or it can also be described that the second server matches the first information with the information in the application information library.
[0310] In some embodiments, the first information only includes one kind of information, such as only including the first fingerprint or the second fingerprint, then the second server directly matches the first fingerprint or the second fingerprint with the application information library, obtains the first identity in the second information matched with the first fingerprint or the second fingerprint, and takes the first identity as the identity of the first application.
[0311] In some embodiments, the first information includes multiple kinds of information, such as including the first fingerprint and the second fingerprint, then the second server can match the first fingerprint and the second fingerprint with the application information library, obtains the first identity in the second information matched with the first fingerprint and the second fingerprint, and takes the first identity as the identity of the first application.
[0312] In some embodiments, the first information includes multiple information, for example, including the first fingerprint and the second fingerprint, then the second server can also set priorities for the first fingerprint and the second fingerprint, and the second server can select the information with higher priority to match with the application information base. For example, the second server can select the first fingerprint as the application fingerprint to query the application information base. This is specifically illustrated in FIG. 14. As shown in FIG. 14, step 1401 can include sub-steps S14011-S14014. 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 matching fingerprint. 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 matching fingerprint. In S14014, the second server queries the application information base using the matching fingerprint.
[0313] Step 1402: The second server determines whether the second information including the first information is queried in the application information base. Alternatively, it can also be described as the second server determines whether the first application to be downloaded by the user is queried in the application information base.
[0314] If no, step 1407 is executed. If yes, step 1403 is executed.
[0315] Step 1403: The second server determines whether the consistency check passes. If no, step 1406 is executed. If yes, step 1404 is executed.
[0316] The second server can compare some features of the first installation package with the corresponding features in the queried second information to check whether they indeed indicate the same application (or installation package). In one example, the second server compares the data amount of the first installation package with the data amount of the installation package in the queried second information. If they are consistent, the consistency check passes. Otherwise, the consistency check does not pass.
[0317] Step 1404: The second server determines whether the queried second information meets the first condition. If yes, step 1405 is executed. If no, step 1406 is executed.
[0318] In one example, the first condition includes one or more of the following conditions:
[0319] Sub-condition 1: the first number of times in the queried second information is greater than a second threshold. For example, the second threshold is m times, and the second server determines that the first number of times is greater than m times, and determines that sub-condition 1 is satisfied. The first number of times is the cumulative reporting number of times of the second information of the first installation package, because the second information is usually reported when the first installation package is downloaded, and thus the first number of times can also be understood as the download number of times of the first installation package. Therefore, the first number of times greater than m times represents that the cumulative number of times of downloading the first installation package of the third server in the entire network is greater than m times.
[0320] Sub-condition 2: the first time length in the queried second information is greater than a third threshold. For example, the third threshold is n days, and the second server determines that the first number of times is greater than n days, and determines that sub-condition 2 is satisfied. The first time length is the time difference between the time when the first installation package first uploads the second information and the current time, and thus the first time length greater than n days represents that the cumulative time of the application installation package of the third server in the application information library is not greater than n days.
[0321] When the above two conditions are not satisfied, it is considered that the queried application data belongs to small sample data, and thus through the above conditions, small sample data in the application information library can be excluded. Because small sample data belongs to data of applications used less by users, and can include data generated by application manufacturers when testing the application downloads, it is considered that the confidence of small sample data is not high, and thus in specific implementation, small sample data can be excluded, that is, the second information of such an application can not participate in the application identification process, so that the application participating in the identification of the application package name is more confident. Alternatively, other arbitrary possible conditions can also be included, which are not limited herein.
[0322] Step 1405: The second server generates an identification result of successful identification, and in the identification result, the first identifier of the queried second information can be determined as the identifier of the first application.
[0323] Step 1406: The second server generates an identification result of failed identification.
[0324] Through the above steps 1403 to 1406, the second information of the queried application can be verified through consistency strong check and confidence judgment, and the accuracy of the application identification result is improved.
[0325] 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 determined matching fingerprint, for example, the first fingerprint and / or the second fingerprint. In this way, the third server can query in the application market according to the first information of the first installation package.
[0326] Step 1408: The second server determines whether the first installation package (or the corresponding application) is queried according to the first response from the third server. If yes, step 1409 is executed; if no, step 1406 is executed.
[0327] Step 1409: The second server obtains the identity of the first application from the first response, and step 1405 is executed.
[0328] Through steps 1407-1408, if the second server does not query the application in the application information library, the interface of the third server corresponding to the application market can be called to query the application from the third server as a bottom solution. If the application is queried, the first identity of the queried installation package is obtained as the identity of the first application, and the first installation package is the installation package of the first application to be downloaded by the user.
[0329] FIG. 15 is a structural schematic diagram of a computer device 1500 provided by an embodiment of the present application. The computer device 1500 can be the electronic device or the second server in the foregoing. As shown in FIG. 15, the computer device 1500 can include one or more processors 1501, one or more memories 1502, a communication interface 1503, and one or more computer programs 1504. The above devices can be connected through 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 the computer device 1500 is the electronic device in the foregoing, the instructions can be used to execute the related steps of the electronic device in the corresponding embodiments, for example, execute the related steps of each flow in the foregoing embodiments. When the computer device 1500 is the second server in the foregoing, the instructions can be used to execute the related steps of the second server in the corresponding embodiments, for example, execute the related steps of each flow in the foregoing embodiments. The communication interface 1503 is configured to implement the communication between the computer device 1500 and other devices, for example, the communication interface can be a transceiver.
[0330] In the embodiments provided by the present application, the method provided by the present application is introduced from the perspective of the client (or the electronic device) and the server (such as the first server, the second server, or the third server) as the execution subject. In order to implement each function in the method provided by the embodiments of the present application, the client and the server can include hardware structures and / or software modules, and implement the above functions in the form of hardware structures, software modules, or hardware structures plus software modules. Whether a certain function in the above functions is executed in the form of hardware structure, software module, or hardware structure plus software module depends on the specific application of the technical solution and the design constraint conditions.
[0331] In the embodiments described above, all or some of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or some of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, all or some of the computer program instructions cause the functions or procedures in the embodiments of the present application to be performed. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk (SSD)), etc. The solutions of the above embodiments can be combined without conflict.
[0332] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0333] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems) and computer program products of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.
[0334] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart or flowsheets and / or block or blocks of the block diagrams.
[0335] These computer program instructions can 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 the flowchart or flowsheets and / or block or blocks of the block diagrams.
[0336] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
A method of determining an identity of an application, characterized by, The method is applied to a client, and the method comprises: receiving a first operation for a first download link on a webpage, the first operation being used to download a first application; obtaining first information according to a first installation package stored by a first server in response to the first operation, 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 an identifier corresponding to the first information is an 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. The method of claim 1, wherein The first information indicates one or more of the following: a signature of the first installation package; first data in the first installation package, the first data being data located at a first position in the first installation package; or a data amount of the first installation package. 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 comprises: determining that the first information is the same as third information included in second information, wherein the second information includes a correspondence relationship between the third information and a first identifier; determining that the first identifier is determined as the identifier of the first application. The method according to claim 1 or 2, characterized in that The determination that the identifier corresponding to the first information is the identifier of the first application comprises: sending a first request to a second server corresponding to the client, the first request being used to request to determine the identifier of the first application, the first request including the first information; receiving the identifier of the first application from the second server. The method according to any one of claims 1 to 4, characterized in that The obtaining of the first information according to the first installation package stored by the first server comprises: sending a second request to the first server, the second request being used to request to read second data, the second data being data of a first length located at the end of the first installation package; receiving the second data from the first server; determining the signature of the first installation package according to the second data; determining the first information according to the signature of the first installation package. The method according to claim 5, characterized in that The determination of the signature of the first installation package according to the second data comprises: determining a second address according to the second data, the second address being an address of a first data block in the first installation package, the first data block including the signature of the first installation package; sending a third request to the first server, the third request being used to request to read third data, the third data being data of a second length related to the second address; receiving the third data from the first server; determining the signature of the first installation package according to the third data. The method according to claim 6, characterized in that The determination of the signature of the first installation package according to the third data comprises: determining a third length corresponding to the signature of the first installation package according to the third data; determining that data of the third length starting from a second position of the third data is the signature of the first installation package. The method according to any one of claims 1 to 7, characterized in that After the determination that the identifier corresponding to the first information is the identifier of the first application, the method further comprises one or more of the following: outputting the identifier of the first application; outputting prompt information used to inquire whether to download the first installation package; output prompt information for inquiring whether to download the installation package of the first application through a first download mode, the first download mode being used for downloading the installation package of the first application from the other download path; or output risk information of the first installation package. The method of claim 8, wherein After the output of the prompt information for inquiring whether to download the installation package of the first application through the first download mode, the method further comprises: receiving a second operation for confirming to download the installation package of the first application through the first download mode; in response to the second operation, sending a fourth request to a third server, the fourth request being used for requesting to download the first application, the third server being a server corresponding to the other download path; receiving a second installation package from the third server, the second installation package being the installation package of the first application. The method according to any one of claims 1 to 9, characterized in that The method further comprises: in response to completion of downloading of the first installation package, obtaining the first information and the identifier of the first application according to the stored first installation package; sending a fifth request to a second server corresponding to the client, the fifth request comprising the first information and the identifier of the first application. The method according to claim 10, wherein the fifth request further comprises a second identifier, the second identifier being determined according to a download time of the first installation package, the second identifier being used for indicating a time period in which the download time is located. A method of determining an identity of an application, characterized in that, The method is applied to a server, and the method comprises: receiving a first request from a client, the first request comprising first information, the first information being determined according to a first installation package stored by a first server, the first installation package being an installation package of a first application; determining that an identifier corresponding to the first information is an identifier of the first application, the identifier of the first application being used for downloading the installation package of the first application from an other download path except the first server; sending the identifier of the first application to the client. The method of claim 12, wherein The method further comprises: receiving a first download link from the client, the first download link being used for downloading the first installation package from the first server; obtaining the first information according to the first installation package stored by the first server; determining that the identifier corresponding to the first information is the identifier of the first application; sending the identifier of the first application to the client. The method according to claim 12 or 13, characterized in that The first information indicates one or more of the following: a signature of the first installation package; first data in the first installation package, the first data being data located at a first position in the first installation package; or a data amount of the first installation package. The method of claim 14, wherein The determination that the identifier corresponding to the first information is the identifier of the first application comprises: determining that the first information is same as third information included in second information, wherein the second information comprises a corresponding relationship between the third information and a first identifier; determining that the first identifier is determined as the identifier of the first application. The method of claim 15, wherein The second information further includes a first number of times and a first time length, the first number of times being a total number of times that the first information is reported, and the first time length being a time difference between a time when the first information is first reported and a current time. Before the determining that the first identifier is determined as the identifier of the first application, the method further includes: determining that the second information satisfies a first condition, wherein the first condition includes that the first number of times is greater than or equal to a first threshold value, and / or the first time length is greater than or equal to a second threshold value. The method according to claim 15 or 16, characterized in that The method further includes: determining that information same as the first information is not stored; sending a sixth request to a third server corresponding to an application market, the sixth request being used to determine the identifier of the first application, the sixth request including the first information; receiving the identifier of the first application from the third server. The method according to any one of claims 12 to 17, characterized in that The method further includes: receiving a fifth request from the client, the fifth request including first information of a first installation package and an identifier of a first application; storing the first information and the identifier of the first application. The method of claim 18, wherein The fifth request further includes a second identifier, the second identifier being used to indicate a time period in which a download time of the first installation package by the client is located; Before storing the first information and the identifier of the first application, the method further includes: determining that a total number of times of reporting by the client in the first time period is less than or equal to a third threshold value; determining that the first information and the identifier of the first application are not received from the client in the first time period. A communication system characterized by comprise: a first device configured to perform the method according to any one of claims 1-11; and a second device configured to perform the method according to any one of claims 12-19. An apparatus for determining an identity of an application, the apparatus comprising: comprise a module configured to perform the method according to any one of claims 1-11, or comprise a module configured to perform the method according to any one of claims 12-19. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1-11, or the method according to any one of claims 12-19. A chip system, characterized by The chip system includes processing circuitry and a storage medium, the storage medium storing instructions; the instructions are executed by the processing circuitry to implement the method according to any one of claims 1-19. A computer-readable storage medium, characterized by The computer readable storage medium is used to store a computer program, when the computer program runs on a computer, so that the computer executes the method according to any one of claims 1-11, or executes the method according to any one of claims 12-19. A computer program product, characterized in that The computer program product includes a computer program, when the computer program runs on a computer, so that the computer executes the method according to any one of claims 1-11, or executes the method according to any one of claims 12-19.
Citation Information
Patent Citations
Application installing method and apparatus
CN106487793A
Application downloading method and system, and related device
CN107465646A
Application downloading recommendation method and device and electronic equipment
CN114519142A
Interception method, system and related device
CN118260748A
Method and System for Obtaining Download Information of Application, Server, and Storage Medium
US20230214201A1