Channel information reporting method, electronic equipment, storage medium and program product
By determining whether preinstalled applications need to be installed based on the configuration file when the electronic device is turned on for the first time, and reading and saving channel information is read and saved, the problem of inaccurate server statistics is solved, and the precise statistics of the number of preinstalled applications is achieved.
Patent Information
- Application Number
- CN202411547245.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The prior art has resulted in the server statistics that the number of pre-installed applications installed through the installation package stored before leaving the factory after the first startup is inaccurate.
When the electronic device is powered on for the first time, determine whether the preinstalled application needs to be installed based on the configuration file, and read the channel information of the preinstalled application from the configuration file and save it in the first file. When starting the preinstalled application, obtain channel information from the first file and report it to the server.
Ensure that the server can more accurately count the number of pre-installed applications that are actually installed through the installation package stored before leaving the factory after the first boot.
Smart Images

Figure CN119645755A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a channel information reporting method, electronic equipment, storage medium and program product. Background Art
[0002] With the continuous development of electronic technology, electronic devices such as mobile phones and tablet computers have become common tools in people's daily life and work. Electronic devices can store some application installation packages in advance before leaving the factory. Such applications with installation packages pre-stored before leaving the factory are called pre-installed applications.
[0003] In some electronic devices, after the first power-on, the installation package of the pre-installed application stored before leaving the factory can be automatically run to install the corresponding pre-installed application, and after the user opens the pre-installed application, the channel information of the pre-installed application can be obtained from the electronic device and reported to the server, and the channel information is used to indicate that the installation channel of the pre-installed application is installed through the installation package stored before leaving the factory after the first power-on; in other electronic devices, after the first power-on, the installation package of the pre-installed application stored before leaving the factory is not automatically run to install the pre-installed application. Instead, during the process of the user using the electronic device, the pre-installed application is downloaded and installed through an application market (also called an application store) or a web page, and after the user opens the pre-installed application, the channel information of the pre-installed application can also be obtained from the electronic device and reported to the server, and the channel information is still used to indicate that the installation channel of the pre-installed application is installed through the installation package stored before leaving the factory after the first power-on.
[0004] However, this approach will result in an inaccurate number of pre-installed applications actually installed through the installation package stored before leaving the factory after the first startup, as counted by the server. Summary of the invention
[0005] The embodiments of the present application provide a channel information reporting method, electronic device, storage medium and program product, so that the server can more accurately count the number of pre-installed applications actually installed through the installation package stored before leaving the factory after the first startup.
[0006] In a first aspect, an embodiment of the present application proposes a method for reporting channel information, which is applied to an electronic device, wherein the electronic device stores an installation package and a configuration file of a pre-installed application before leaving the factory, the method comprising: when the electronic device is powered on for the first time, the electronic device determines whether the pre-installed application needs to be installed based on the configuration file, the first power-on including the first power-on after leaving the factory or restarting after restoring the factory settings; when the pre-installed application needs to be installed, the electronic device reads the channel information of the pre-installed application from the configuration file, the channel information is used to indicate the installation channel of the pre-installed application, and is installed after the first power-on through the installation package stored before leaving the factory; the electronic device saves the channel information in a first file; when the pre-installed application is started, the electronic device obtains the channel information from the first file; the electronic device reports the channel information to a server.
[0007] In this way, when the electronic device is powered on for the first time and the pre-installed application is installed through the installation package stored before leaving the factory, the channel information of the pre-installed application is read from the configuration file and saved in the first file. When the user opens the pre-installed application, the channel information of the pre-installed application can be obtained from the first file and reported to the server. If the electronic device does not install the pre-installed application through the installation package stored before leaving the factory after the first power-on, the channel information of the pre-installed application will not be read from the configuration file, nor will the channel information of the pre-installed application be saved in the first file. If the user downloads and installs the pre-installed application through the application market during the use of the electronic device, when the user opens the pre-installed application, since the channel information of the pre-installed application is not saved in the first file, the channel information of the pre-installed application cannot be obtained, and the channel information of the pre-installed application will not be reported to the server, so that the channel information of the pre-installed application that is not installed by itself through the installation package stored before leaving the factory after the first power-on will not be counted by the server. In this way, the server can more accurately count the number of pre-installed applications that are actually installed through the installation package stored before leaving the factory after the first power-on.
[0008] In a possible implementation, the electronic device saves the channel information in the first file, including: the electronic device writes the channel information into the second file, the second file is a different file from the first file; the electronic device reads the channel information from the second file; the electronic device obtains the installation package name of the preinstalled application from the channel information; the electronic device saves the installation package name and the channel information in the first file in the form of a key-value pair. In this way, when the preinstalled application is subsequently started, the preinstalled application can obtain the channel information from the first file.
[0009] In a possible implementation, the electronic device includes a system service. The electronic device reads the channel information of the preinstalled application from the configuration file, including: the preinstalled application reads the channel information from the configuration file. Accordingly, the electronic device writes the channel information into the second file, including: the preinstalled application sends the channel information to the system service; the system service generates the second file, and writes the channel information into the second file. In this way, based on the preinstalled application and the system service, the channel information of the preinstalled application can be written into the second file.
[0010] In a possible implementation, the electronic device further includes a startup customization service. The electronic device reads the channel information from the second file, including: when the channel information is written into the second file, the preinstalled application sets the state of the channel attribute hot update switch to the startup state; when the state of the channel attribute hot update switch is the startup state, the startup customization service reads the channel information from the second file. In this way, based on the preinstalled application and the startup customization service, the startup customization service can read the channel information of the preinstalled application from the second file.
[0011] In a possible implementation, when the channel information is written into the second file, the preinstalled application sets the state of the channel attribute hot update switch to the start state, including: when the system service writes the channel information into the second file, the system service sends first indication information to the preinstalled application, the first indication information is used to indicate that the channel information has been written into the second file; the preinstalled application sets the state of the channel attribute hot update switch to the start state in response to the first indication information. In this way, the preinstalled application can set the state of the channel attribute hot update switch to the start state in a timely manner.
[0012] In a possible implementation, the electronic device further includes an attribute service. When the state of the channel attribute hot update switch is in the startup state, the startup customization service reads the channel information from the second file, including: when the attribute service monitors that the state of the channel attribute hot update switch is in the startup state, the attribute service sends second indication information to the startup customization service, and the second indication information is used to indicate that the state of the channel attribute hot update switch is in the startup state; the startup customization service responds to the second indication information and reads the channel information from the second file. In this way, the startup customization service can read the channel information of the pre-installed application from the second file in a timely manner.
[0013] In one possible implementation, the electronic device obtains the installation package name of the preinstalled application from the channel information, including: the startup customization service obtains the installation package name of the preinstalled application from the channel information. Correspondingly, the electronic device saves the installation package name and the channel information in the form of a key-value pair in the first file, including: the startup customization service saves the installation package name and the channel information in the form of a key-value pair in the first file. Since the startup customization service provides an external data interface, when the preinstalled application is subsequently started, the preinstalled application can obtain the channel information of the preinstalled application from the first file.
[0014] In a possible implementation, the electronic device further includes an attribute service. After the startup customization service saves the installation package name and channel information in the form of a key-value pair in the first file, the startup customization service further includes: the startup customization service sets the state of the channel attribute hot update switch to the end state; and the attribute service monitors that the state of the channel attribute hot update switch is the end state.
[0015] In one possible implementation, the configuration file includes the first subscriber identification module (SIM) card information associated with the preinstalled application. The electronic device determines whether the preinstalled application needs to be installed according to the configuration file, including: the electronic device obtains the second SIM card information corresponding to the SIM card installed on the electronic device; the electronic device determines whether the first SIM card information matches the second SIM card information. Wherein, when the first SIM card information matches the second SIM card information, the electronic device determines that the preinstalled application needs to be installed; when the first SIM card information does not match the second SIM card information, the electronic device determines that the preinstalled application does not need to be installed. In this way, a method for determining whether the preinstalled application needs to be installed based on the SIM card information is provided.
[0016] In one possible implementation, the configuration file includes first country information associated with the preinstalled application. The electronic device determines whether the preinstalled application needs to be installed according to the configuration file, including: the electronic device obtains second country information of the country where the electronic device is located; the electronic device determines whether the first country information matches the second country information. Wherein, when the first country information matches the second country information, the electronic device determines that the preinstalled application needs to be installed; when the first country information does not match the second country information, the electronic device determines that the preinstalled application does not need to be installed. In this way, a method for determining whether the preinstalled application needs to be installed based on country information is provided.
[0017] In a possible implementation, when the preinstalled application is started, the electronic device obtains the channel information from the first file, including: when the preinstalled application is started, the preinstalled application obtains the channel information from the first file based on the installation package name of the preinstalled application. Accordingly, the electronic device reports the channel information to the server, including: the preinstalled application reports the channel information to the server. In this way, the preinstalled application can quickly obtain the channel information from the first file based on the installation package name.
[0018] In a second aspect, an embodiment of the present application proposes an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the above-mentioned channel information reporting method.
[0019] In a third aspect, an embodiment of the present application proposes a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed, the above-mentioned channel information reporting method is implemented.
[0020] In a fourth aspect, an embodiment of the present application proposes a computer program product, including a computer program, which, when executed, enables a computer to execute the above-mentioned method for reporting channel information.
[0021] The possible implementation methods of the second to fourth aspects have effects similar to those of the first aspect and the possible designs of the first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flow chart of a method for reporting channel information provided for related technologies;
[0023] Figure 2 A schematic diagram of the hardware system structure of an electronic device provided in an embodiment of the present application;
[0024] Figure 3 A schematic diagram of the software system structure of an electronic device provided in an embodiment of the present application;
[0025] Figure 4 A flow chart of a method for reporting channel information provided in an embodiment of the present application;
[0026] Figure 5 A flowchart of another method for reporting channel information provided in an embodiment of the present application;
[0027] Figure 6 A schematic diagram of the interaction of modules for storing channel information in a first file provided in an embodiment of the present application;
[0028] Figure 7 A schematic diagram of the structure of a channel information reporting device provided in an embodiment of the present application;
[0029] Figure 8 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit them to be different.
[0031] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0032] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0033] Before explaining a method for reporting channel information provided in an embodiment of the present application, an application scenario of the embodiment of the present application is first introduced.
[0034] First of all, the "pre-installed applications" involved in this application can also be referred to as "pre-installed application software" or "pre-installed application programs". Those skilled in the art should understand that "application" has the same meaning as "application software" and "application program", and all refer to the software provided in electronic devices to meet the application needs of users in different fields and different problems.
[0035] In some embodiments, the applications in the electronic device may include pre-installed applications and non-pre-installed applications. Pre-installed applications refer to applications that have installation packages pre-stored before the electronic device leaves the factory. When the electronic device is turned on for the first time, some electronic devices may install pre-installed applications based on the installation packages stored before leaving the factory. Non-pre-installed applications refer to applications that have no installation packages stored before the electronic device leaves the factory and are downloaded and installed by the user during the use of the electronic device.
[0036] It should be understood that the pre-installed applications can be cooperative applications negotiated between the electronic device manufacturer and a third-party software development company, or can be the electronic device manufacturer's own applications, and are not limited here. For example, the pre-installed applications can be instant messaging applications, social applications, game applications, phone books, browsers, cameras, etc.
[0037] Currently, for electronic devices sold globally, before the electronic devices leave the factory, the electronic device manufacturers can formulate corresponding version plans based on the results of negotiations with their user groups, determine the installation packages of pre-installed applications required by the user groups under the version plan, and store them in the electronic devices. In addition, before the electronic devices leave the factory, the configuration files and channel information of the pre-installed applications will also be stored in the electronic devices. The channel information is used to indicate that the installation channel of the pre-installed applications is to install them through the installation packages stored before leaving the factory after the first boot.
[0038] Optionally, user groups may be divided according to specific regions, countries, operators, enterprises, etc. The embodiment of the present application does not limit the method of dividing user groups.
[0039] In one example, taking user groups divided by specific regions as an example, user group M is all electronic devices in region A, and user group N is all electronic devices in region B. For example, the specific region may be a European region or an Asia, Africa, and Latin America region, and a specific region may include multiple different countries, such as the Asia, Africa, and Latin America region may include country A and non-A countries.
[0040] In another example, taking the user groups divided by operators as an example, the electronic devices in user group M are all electronic devices supporting operator m, and the electronic devices in user group N are all electronic devices supporting operator n.
[0041] It should be noted that the electronic devices included in a user group have the same requirements for pre-installed applications, that is, the installation packages of pre-installed applications stored in electronic devices belonging to the same user group before leaving the factory can be the same, and the installation packages of pre-installed applications stored in electronic devices belonging to different user groups before leaving the factory can be different.
[0042] For example, the user group is divided into a specific region, and the specific region is the Asia-Africa-Latin America region, which includes country A and non-countries A. Figure 1As shown, in the related art, the method for reporting channel information may specifically include the following steps:
[0043] S101, in all electronic devices shipped to the Asia, Africa and Latin America region, an installation package of a pre-installed application X, a configuration file of the pre-installed application X and channel information of the pre-installed application X are stored before leaving the factory, and the channel information is used to indicate that the installation channel of the pre-installed application X is to install it through the installation package stored before leaving the factory after the device is turned on for the first time.
[0044] That is to say, electronic devices shipped to country A will store the installation package of pre-installed application X, the configuration file of pre-installed application X, and the channel information of pre-installed application X before leaving the factory; electronic devices shipped to countries other than A will also store the installation package of pre-installed application X, the configuration file of pre-installed application X, and the channel information of pre-installed application X before leaving the factory.
[0045] Among them, the installation package of the preinstalled application X, the configuration file of the preinstalled application X, and the channel information of the preinstalled application X are stored separately in the electronic device, and they can all be stored in the system file of the electronic device. In one implementation, the installation package of the preinstalled application X can be stored in the preload file of the electronic device. For example, if the preinstalled application X is Zhihu, the storage path of its installation package can be: preload / app / zhihu / zhihu.apk; the configuration file of the preinstalled application X can be stored in the preload file of the electronic device; the channel information of the preinstalled application X can be stored in the system file of the electronic device.
[0046] S102: For an electronic device shipped to country A, after the electronic device is turned on for the first time, it is determined according to a configuration file of the pre-installed application X that the pre-installed application X needs to be installed.
[0047] S103, the electronic device shipped to country A installs the pre-installed application X after being turned on for the first time.
[0048] S104: For an electronic device shipped to a country other than country A, after the device is turned on for the first time, it is determined according to the configuration file of the pre-installed application X that the pre-installed application X does not need to be installed.
[0049] S105, the electronic device shipped to a country other than country A does not install the pre-installed application X after being turned on for the first time, but downloads and installs the pre-installed application X through the application market during use.
[0050] In some scenarios, the configuration file of pre-installed application X indicates that electronic devices shipped to country A need to install pre-installed application X after first startup, while electronic devices shipped to non-countries A do not need to install pre-installed application X after first startup.
[0051] For electronic devices shipped to country A, after the first startup (including the first startup after leaving the factory or restarting after restoring the factory settings), the installation package of the pre-installed application X stored before leaving the factory can be automatically run to install the pre-installed application X. For electronic devices shipped to countries other than country A, after the first startup (including the first startup after leaving the factory or restarting after restoring the factory settings), the installation package of the pre-installed application X stored before leaving the factory is not automatically run to install the pre-installed application X, but the pre-installed application X is downloaded and installed through the application market or webpage during the user's use of the electronic device.
[0052] S106: When the pre-installed application X is started, the stored channel information of the pre-installed application X is obtained and reported to the server.
[0053] For electronic devices shipped to country A, after installing pre-installed application X at the first startup, users in country A can open and use pre-installed application X. In this way, when pre-installed application X is started, the electronic device shipped to country A can obtain the channel information of pre-installed application X stored before leaving the factory, and report the channel information of pre-installed application X to the server, and the channel information of pre-installed application X is used to indicate that the installation channel of pre-installed application X is to install it through the installation package stored before leaving the factory after the first startup.
[0054] For electronic devices shipped to countries other than A, pre-installed application X is not installed after the first startup. Instead, the pre-installed application X is downloaded and installed through the application market during the user's use of the electronic device. Users in countries other than A can open and use the pre-installed application X downloaded and installed through the application market. In this way, when the pre-installed application X is started, the electronic device shipped to countries other than A can also obtain the channel information of the pre-installed application X stored before leaving the factory, and report the channel information of the pre-installed application X to the server. The channel information of the pre-installed application X is still used to indicate that the installation channel of the pre-installed application X is to be installed through the installation package stored before leaving the factory after the first startup.
[0055] S107 , based on the channel information of the pre-installed application X, the server counts the number of pre-installed applications X installed through the installation package stored before shipment after the computer is turned on for the first time.
[0056] The server may count the number of times the preinstalled application X is used and installed through the installation channel indicated by the channel information of the preinstalled application X based on the channel information of the preinstalled application X.
[0057] In the related art, the server counts the number of pre-installed applications X installed through installation packages stored before shipment after the first startup based on the channel information of pre-installed applications X reported by the electronic device, including: the number of electronic devices shipped to country A using pre-installed applications X and the number of electronic devices shipped to non-countries A using pre-installed applications X.
[0058] In fact, for electronic devices shipped to countries other than Country A, after the first startup, the pre-installed application X is not installed through the installation package stored before shipment. Instead, the pre-installed application X is downloaded and installed through the application market during the user's use of the electronic device. However, the channel information of the pre-installed application X is still reported to the server, so that the channel information of the pre-installed application X that is not installed by itself through the installation package stored before shipment after the first startup is also counted by the server, resulting in an inaccurate number of pre-installed applications X actually installed through the installation package stored before shipment after the first startup counted by the server.
[0059] It should be understood that user groups are not limited to being divided by specific regions, and can also be divided by countries and other methods. Take the scenario where user groups are divided by country, and a certain country includes operator m and operator n as an example. Before leaving the factory, electronic devices that support operator m will store the installation package of pre-installed application X, the configuration file of pre-installed application X, and the channel information of pre-installed application X. The channel information is used to indicate that the installation channel of pre-installed application X is installed through the installation package stored before leaving the factory after the first boot; electronic devices that support operator n will also store the installation package of pre-installed application X, the configuration file of pre-installed application X, and the channel information of pre-installed application X before leaving the factory. The channel information is also used to indicate that the installation channel of pre-installed application X is installed through the installation package stored before leaving the factory after the first boot.
[0060] For an electronic device supporting operator m, after the first startup, if it is determined according to the configuration file of the pre-installed application X that the pre-installed application X needs to be installed, the installation package of the pre-installed application X stored before leaving the factory can be automatically run after the first startup to install the pre-installed application X. Furthermore, when the pre-installed application X is started, the electronic device supporting operator m can obtain the channel information of the pre-installed application X stored before leaving the factory, and report the channel information of the pre-installed application X to the server.
[0061] For the electronic device supporting operator n, after the first startup, it is determined according to the configuration file of pre-installed application X that pre-installed application X does not need to be installed. Therefore, after the first startup, the installation package of pre-installed application X stored before leaving the factory is not automatically run to install pre-installed application X. Instead, during the process of the user using the electronic device, the pre-installed application X is downloaded and installed through the application market or webpage. In addition, when the pre-installed application X is started, the electronic device supporting operator n can also obtain the channel information of the pre-installed application X stored before leaving the factory, and report the channel information of the pre-installed application X to the server.
[0062] In this way, the server counts the number of pre-installed applications X installed through the installation package stored before leaving the factory after the first startup based on the channel information of the pre-installed application X reported by the electronic device, including: the number of electronic devices supporting operator m using the pre-installed application X and the number of electronic devices supporting operator n using the pre-installed application X.
[0063] In fact, for an electronic device supporting operator n, after being turned on for the first time, the pre-installed application X is not installed through the installation package stored before leaving the factory. Instead, the pre-installed application X is downloaded and installed through the application market during the user's use of the electronic device. However, the channel information of the pre-installed application X is still reported to the server, so that the channel information of the pre-installed application X that is not installed by itself through the installation package stored before leaving the factory after the first startup is also counted by the server, resulting in an inaccurate number of pre-installed applications X actually installed through the installation package stored before leaving the factory after the first startup counted by the server.
[0064] In summary, in the related art, in some electronic devices, the installation package of the pre-installed application stored before leaving the factory can be automatically run after the first startup to install the corresponding pre-installed application, and after the user opens the pre-installed application, the channel information of the pre-installed application can be obtained from the electronic device and reported to the server, and the channel information is used to indicate that the installation channel of the pre-installed application is installed through the installation package stored before leaving the factory after the first startup; in other electronic devices, the installation package of the pre-installed application stored before leaving the factory is not automatically run to install the pre-installed application after the first startup, but the pre-installed application is downloaded and installed through the application market or web pages during the user's use of the electronic device, and after the user opens the pre-installed application, the channel information of the pre-installed application can also be obtained from the electronic device and reported to the server, and the channel information is still used to indicate that the installation channel of the pre-installed application is installed through the installation package stored before leaving the factory after the first startup.
[0065] In this way, some electronic devices may not install pre-installed applications through the installation packages stored before leaving the factory after being turned on for the first time, but download and install pre-installed applications through the application market when the user uses the electronic device. However, the channel information of the pre-installed applications is still reported to the server, so that the channel information of these pre-installed applications that are not installed by themselves through the installation packages stored before leaving the factory after the first startup will also be counted by the server, resulting in inaccurate number of pre-installed applications actually installed through the installation packages stored before leaving the factory after the first startup counted by the server.
[0066] Based on this, an embodiment of the present application provides a method for reporting channel information. When an electronic device is turned on for the first time, it is determined whether the pre-installed application needs to be installed based on the configuration file of the pre-installed application stored before leaving the factory. If the pre-installed application needs to be installed, the channel information of the pre-installed application is read from the configuration file. The channel information is used to indicate that the installation channel of the pre-installed application is installed through the installation package stored before leaving the factory after the first startup, and the channel information is saved in the first file; when the pre-installed application is started, the channel information is obtained from the first file and the channel information is reported to the server.
[0067] Therefore, the embodiment of the present application can add the channel information of the preinstalled application to the configuration file of the preinstalled application, and bind the channel information of the preinstalled application to the installation of the preinstalled application. In the scenario where the preinstalled application is installed through the installation package stored before leaving the factory after the electronic device is turned on for the first time, the channel information of the preinstalled application is read from the configuration file and saved in the first file, so that when the user opens the preinstalled application, the channel information of the preinstalled application can be obtained from the first file and reported to the server. If the electronic device does not install the preinstalled application through the installation package stored before leaving the factory after the first startup, the channel information of the preinstalled application will not be read from the configuration file, nor will the channel information of the preinstalled application be saved in the first file. If the user downloads and installs the preinstalled application through the application market during the use of the electronic device, when the user opens the preinstalled application, since the channel information of the preinstalled application is not saved in the first file, the channel information of the preinstalled application cannot be obtained, and the channel information of the preinstalled application will not be reported to the server, so that the channel information of this part of the preinstalled application that is not installed by itself through the installation package stored before leaving the factory after the first startup will not be counted by the server. In this way, the server can more accurately count the number of pre-installed applications actually installed through the installation package stored before leaving the factory after the computer is turned on for the first time.
[0068] A method for reporting channel information provided in an embodiment of the present application can be applied to electronic devices. Electronic devices include terminal devices, which can also be called terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. Electronic devices can be mobile phones, smart TVs, wearable devices, tablet computers (Pad), computers with wireless transceiver functions, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc. The embodiments of the present application do not limit the specific technology and specific device form used by the electronic devices.
[0069] In order to better understand the embodiments of the present application, the structure of the electronic device according to the embodiments of the present application is introduced below.
[0070] Figure 2 The structure diagram of the electronic device 200 is shown. The electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a SIM card interface 295, etc.
[0071] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0072] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0073] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0074] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0075] The charging management module 240 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 may receive charging input from a wired charger through the USB interface 230. In some wireless charging embodiments, the charging management module 240 may receive wireless charging input through a wireless charging coil of the electronic device 200. While the charging management module 240 is charging the battery 242, it may also power the electronic device through the power management module 241.
[0076] The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the display screen 294, the camera 293, and the wireless communication module 260. In some other embodiments, the power management module 241 may also be disposed in the processor 210. In other embodiments, the power management module 241 and the charging management module 240 may also be disposed in the same device.
[0077] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0078] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0079] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the same device as at least some of the modules of the processor 210.
[0080] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 270A, a receiver 270B, etc.), or displays an image or video through a display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.
[0081] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0082] In some embodiments, the antenna 1 of the electronic device 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 200 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).
[0083] The electronic device 200 implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
[0084] The electronic device 200 can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
[0085] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0086] The internal memory 221 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functional applications and data processing of the electronic device 200 by running instructions stored in the internal memory 221, and / or instructions stored in a memory provided in the processor.
[0087] The electronic device 200 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.
[0088] The key 290 includes a power button, a volume button, etc. The key 290 can be a mechanical key. It can also be a touch key. The electronic device 200 can receive key input and generate key signal input related to the user settings and function control of the electronic device 200. The motor 291 can generate a vibration prompt. The motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 292 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
[0089] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 200 by inserting it into the SIM card interface 295 or pulling it out from the SIM card interface 295. The electronic device 200 can support one or more SIM card interfaces. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 295 at the same time. The types of multiple cards can be the same or different. The SIM card interface 295 can also be compatible with different types of SIM cards. The SIM card interface 295 can also be compatible with external memory cards. The electronic device 200 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the electronic device 200 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 200 and cannot be separated from the electronic device 200.
[0090] The software system of the electronic device 200 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 200.
[0091] Figure 3 2 is a software structure diagram of the electronic device 200 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Androidruntime) and the system library, and the kernel layer.
[0092] The application layer can include a series of application packages. Figure 3 As shown, the application package may include applications such as pre-installed applications and non-pre-installed applications.
[0093] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0094] like Figure 3 As shown, the application framework layer may include system services (system server), startup customization services (hncust_init services) and property services (property services), etc.
[0095] In some embodiments, after the electronic device is powered on for the first time and runs the installation package stored before leaving the factory to install the pre-installed application, the system service can generate a second file and write the channel information of the pre-installed application into the second file. The system service can also be called a system framework.
[0096] The startup customization service is a service located in the application framework layer, and is mainly used for customization services when the electronic device is turned on. In some embodiments, when the state of the channel attribute hot update switch is enabled, the startup customization service can read the channel information of the pre-installed application from the second file, and then obtain the installation package name of the pre-installed application from the channel information of the pre-installed application, and save the installation package name of the pre-installed application and the channel information of the pre-installed application in the first file in the form of a key-value pair.
[0097] In some embodiments, the attribute service is used to monitor the status of the channel attribute hot update switch in real time.
[0098] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0099] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0100] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0101] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0102] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0103] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG2, H.262, MP3, AAC, AMR, JPG, PNG, etc.
[0104] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.
[0105] The kernel layer is the layer between hardware and software. The kernel layer includes at least camera driver, sensor driver and display driver.
[0106] It should be noted that although the embodiment of the present application is described using the Android system, the principle of the method for reporting channel information is also applicable to electronic devices with operating systems such as iOS or Windows.
[0107] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0108] For example, Figure 4 A flowchart of a method for reporting channel information provided in an embodiment of the present application, which can be applied to an electronic device, where the electronic device stores an installation package of a pre-installed application and a configuration file of the pre-installed application before leaving the factory, and the configuration file of the pre-installed application includes the channel information of the pre-installed application. Figure 4 As shown, the method for reporting the channel information may specifically include the following steps:
[0109] S401, when the electronic device is powered on for the first time, the electronic device determines whether to install the pre-installed application according to the configuration file; the first power-on includes the first power-on after leaving the factory or restarting after restoring the factory settings.
[0110] In some embodiments, the electronic device stores an installation package of a pre-installed application before leaving the factory, and the installation package of the pre-installed application may be an application package (APK) file.
[0111] In addition, the electronic device also stores a configuration file of pre-installed applications before leaving the factory, and the channel information of the pre-installed applications is added to the configuration file of the pre-installed applications, so that the configuration file of the pre-installed applications can include the channel information of the pre-installed applications, and the channel information is used to indicate that the installation channel of the pre-installed applications is to install them through the installation package stored before leaving the factory after the first boot. For example, the pre-installed application is Zhihu, and the channel information in the configuration file can be expressed as ro.honor.channel.zhihu=honor_preinstall.
[0112] The installation package of the preinstalled application and the configuration file of the preinstalled application are stored separately in the electronic device, and they can both be stored in the system file of the electronic device. In one implementation, the installation package of the preinstalled application can be stored in the preload file of the electronic device, and the configuration file of the preinstalled application can also be stored in the preload file of the electronic device.
[0113] In some scenarios, electronic devices shipped to different countries may need to install different pre-installed applications after first power-on, and electronic devices supporting different operators may also need to install different pre-installed applications after first power-on. Therefore, when the electronic device is powered on for the first time, it can be determined whether to install pre-installed applications based on the configuration file.
[0114] When the electronic device determines that the preinstalled application needs to be installed according to the configuration file, the following steps S402 to S406 are performed; and when the electronic device determines that the preinstalled application does not need to be installed according to the configuration file, the following steps S402 to S406 do not need to be performed.
[0115] Specifically, the configuration file of the preinstalled application may include the first SIM card information associated with the preinstalled application or the first country information associated with the preinstalled application. The electronic device determines whether the preinstalled application needs to be installed based on the first SIM card information associated with the preinstalled application or the first country information associated with the preinstalled application.
[0116] In one implementation, the configuration file of the preinstalled application may include the first SIM card information associated with the preinstalled application. The electronic device obtains the second SIM card information corresponding to the SIM card installed on the electronic device; the electronic device determines whether the first SIM card information matches the second SIM card information. Wherein, if the first SIM card information matches the second SIM card information, the electronic device determines that the preinstalled application needs to be installed; if the first SIM card information does not match the second SIM card information, the electronic device determines that the preinstalled application does not need to be installed.
[0117] In the configuration file of the preinstalled application, the first SIM card information associated with the preinstalled application can be represented by the field "cardinfo". In the configuration file of the preinstalled application, the first SIM card information associated with the preinstalled application can be a public land mobile network (PLMN), and the second SIM card information corresponding to the SIM card installed on the electronic device can also be a PLMN. The PLMN can include a mobile country code (MCC) and a mobile network code (MNC).
[0118] For example, China Mobile's PLMN may include 46000, 46002, 46004, 46007, and 46008; China Unicom's PLMN may include 46001, 46006, 46009, and 46010; and China Telecom's PLMN may include 46003, 46011, and 46012.
[0119] Exemplarily, in the configuration file of the preinstalled application, the first SIM card information associated with the preinstalled application may include 46002, 46004, and 46007. If the second SIM card information corresponding to the SIM card installed on a certain electronic device is 46002, that is, the SIM card installed on the electronic device is a SIM card of China Mobile, then it is determined that the first SIM card information matches the second SIM card information, and the electronic device determines that the preinstalled application needs to be installed when it is turned on for the first time. If the second SIM card information corresponding to the SIM card installed on a certain electronic device is 46001, that is, the SIM card installed on the electronic device is a SIM card of China Unicom, then it is determined that the first SIM card information does not match the second SIM card information, and the electronic device determines that the preinstalled application does not need to be installed when it is turned on for the first time.
[0120] In another implementation, the configuration file of the preinstalled application may include the first country information associated with the preinstalled application. The electronic device obtains the second country information of the country where the electronic device is located; and the electronic device determines whether the first country information matches the second country information. Wherein, if the first country information matches the second country information, the electronic device determines that the preinstalled application needs to be installed; if the first country information does not match the second country information, the electronic device determines that the preinstalled application does not need to be installed.
[0121] In one embodiment, the second country information of the country where the electronic device is located can be input by the user in a startup wizard page. For example, when the electronic device is powered on for the first time, a startup wizard page will be displayed, and the startup wizard page may include multiple country options. The user can select one of the country options in the startup wizard page, and the electronic device can determine the second country information of the country where the electronic device is located based on the country option selected by the user.
[0122] For example, the startup wizard page includes multiple country options: Country A, Country B, and Country C. The country option selected by the user is Country A, and the second country information of the country where the electronic device is located is determined to be Country A.
[0123] In another way, the second country information of the country where the electronic device is located can be determined based on a matching factor, wherein the matching factor includes but is not limited to at least one of a language type, an operator connected to the electronic device, or network information.
[0124] Taking the language type as the matching factor as an example, when the language type is "Simplified Chinese", the second country information of the country where the electronic device is located can be determined to be country A; when the language type is "English", the second country information of the country where the electronic device is located can be determined to be country C.
[0125] For example, in the configuration file of the pre-installed application, the first country information associated with the pre-installed application may be country A. If the second country information of the country where the electronic device is located is country A, it is determined that the first country information matches the second country information, and the electronic device determines that the pre-installed application needs to be installed when the device is turned on for the first time. If the second country information of the country where the electronic device is located is country C, it is determined that the first country information does not match the second country information, and the electronic device determines that the pre-installed application does not need to be installed when the device is turned on for the first time.
[0126] In addition, the configuration file of the preinstalled application may further include at least one of the following: an operation type of the preinstalled application, an installation package name of the preinstalled application, an installation package path of the preinstalled application, an application category of the preinstalled application, and an uninstall attribute of the preinstalled application.
[0127] Among them, the operation type of the pre-installed application can be represented by the field "actiontype". When the value of the field "actiontype" is different, the operation type represented by the field "actiontype" is different. The value of the field "actiontype" can be set according to the actual situation, and the embodiment of the present application does not limit it. For example, when the field "actiontype = 1", it means that the application is a pre-installed application; when the field "actiontype = 0", it means that the application is not installed; when the field "actiontype = 2", it means that the application is an application that needs to be uninstalled.
[0128] The installation package name of the pre-installed application can be represented by the field "apkpackagename"; the installation package path of the pre-installed application can be represented by the field "apkpath".
[0129] The application category of the pre-installed application can be indicated by the field "systemflag". For example, when the field "systemflag" is "nosys", it means that the pre-installed application is a non-system application; when the field "systemflag" is "sys", it means that the pre-installed application is a system application.
[0130] The uninstallation property of the preinstalled application can be indicated by the field "uninstallflag". For example, when the field "uninstallflag" is "true", it means that the preinstalled application can be uninstalled; when the field "uninstallflag" is "flase", it means that the preinstalled application cannot be uninstalled.
[0131] S402, when it is necessary to install a pre-installed application, the electronic device reads the channel information of the pre-installed application from the configuration file; the channel information is used to indicate that the installation channel of the pre-installed application is to install it through the installation package stored before leaving the factory after the device is turned on for the first time.
[0132] S403: The electronic device writes the channel information into the second file.
[0133] When the electronic device determines that the preinstalled application needs to be installed according to the configuration file, the electronic device can automatically run the installation package of the preinstalled application stored before leaving the factory to install the preinstalled application. After the preinstalled application is installed, the electronic device can read the channel information of the preinstalled application from the configuration file and write it into the second file.
[0134] Exemplarily, the storage path of the second file may be: / data / system / auto_install / auto_install.prop, and the second file may be an auto_install.prop file.
[0135] In some scenarios, after the electronic device is turned on for the first time, it installs multiple pre-installed applications by running the installation packages of multiple pre-installed applications stored before leaving the factory. The electronic device can write the read channel information of the multiple pre-installed applications into the same second file, that is, the channel information of the multiple pre-installed applications can be located in the same second file, and each line of information in the second file represents the channel information of one pre-installed application.
[0136] S404: The electronic device reads channel information from the second file.
[0137] S405, the electronic device obtains the installation package name of the pre-installed application from the channel information.
[0138] S406, the electronic device saves the installation package name and channel information in the form of key-value pairs in the first file; the second file is different from the first file.
[0139] After the electronic device writes the channel information of the preinstalled application into the second file, the electronic device can also read the channel information of the preinstalled application from the second file and parse the channel information of the preinstalled application to obtain the installation package name of the preinstalled application from the channel information of the preinstalled application.
[0140] For example, the channel information of the pre-installed application is: ro.honor.channel.zhihu=honor_preinstall, and the installation package name of the pre-installed application obtained from the channel information of the pre-installed application may be: zhihu.
[0141] After the electronic device obtains the installation package name of the preinstalled application from the channel information of the preinstalled application, the installation package name of the preinstalled application and the channel information of the preinstalled application are saved in the first file in the form of a key-value pair. In the key-value pair, the key may be the installation package name of the preinstalled application, and the value may be the channel information of the preinstalled application.
[0142] Therefore, according to the execution steps from S403 to S406 described above, the electronic device saves the channel information in the first file.
[0143] It should be noted that after the electronic device writes the channel information of the pre-installed application into the second file, it also needs to read the channel information of the pre-installed application from the second file and save the channel information of the pre-installed application to the first file again. This is because when the pre-installed application is subsequently started, the pre-installed application cannot obtain the channel information from the second file, but the pre-installed application can obtain the channel information from the first file.
[0144] S407: When the pre-installed application is started, the electronic device obtains channel information from the first file.
[0145] S408, the electronic device reports the channel information to the server.
[0146] When the user opens the preinstalled application, that is, starts the preinstalled application, the electronic device can obtain the channel information of the preinstalled application from the first file based on the installation package name of the preinstalled application; then, the electronic device sends the obtained channel information of the preinstalled application to the server. The server can be an application server corresponding to the preinstalled application.
[0147] Specifically, the pre-installed application installed in the electronic device may obtain the channel information of the pre-installed application from the first file; or the pre-installed application in the electronic device may send the channel information of the pre-installed application to the server.
[0148] It is understandable that after installing the preinstalled application, the channel information of the preinstalled application can be obtained from the first file and reported to the server in the scenario of opening the preinstalled application for the first time; after installing the preinstalled application, the channel information of the preinstalled application can also be obtained from the first file and reported to the server in the scenario of not opening the preinstalled application for the first time. The specific timing of obtaining the channel information of the preinstalled application from the first file and reporting it to the server can be set by the preinstalled application itself, and the embodiments of the present application do not limit this.
[0149] Therefore, the embodiment of the present application can add the channel information of the preinstalled application to the configuration file of the preinstalled application, and bind the channel information of the preinstalled application to the installation of the preinstalled application. In the scenario where the preinstalled application is installed through the installation package stored before leaving the factory after the electronic device is turned on for the first time, the channel information of the preinstalled application is read from the configuration file and written into the second file, and then the channel information of the preinstalled application is read from the second file, and the installation package name of the preinstalled application and the channel information of the preinstalled application are saved in the first file in the form of a key-value pair. In this way, when the user opens the preinstalled application, the channel information of the preinstalled application can be obtained from the first file and reported to the server. If the electronic device does not install the pre-installed application through the installation package stored before leaving the factory after the first startup, the channel information of the pre-installed application will not be read from the configuration file, nor will the channel information of the pre-installed application be written into the second file. Accordingly, the channel information of the pre-installed application will not be read from the second file again and saved into the first file. If the user downloads and installs the pre-installed application through the application market during the use of the electronic device, when the user opens the pre-installed application, the channel information of the pre-installed application cannot be obtained because the channel information of the pre-installed application is not saved in the first file, and the channel information of the pre-installed application will not be reported to the server, so that the channel information of the pre-installed application that is not installed by itself through the installation package stored before leaving the factory after the first startup will not be counted by the server. In this way, the server can more accurately count the number of pre-installed applications that are actually installed through the installation package stored before leaving the factory after the first startup.
[0150] In one example, a user group is divided into a specific region, and the specific region is the Asia-Africa-Latin America region, which includes country A and non-countries A. Figure 5 As shown, in the embodiment of the present application, the method for reporting channel information may specifically include the following steps:
[0151] S501, in all electronic devices shipped to the Asia, Africa and Latin America region, an installation package and a configuration file of a pre-installed application X are stored before leaving the factory, and the configuration file includes channel information, and the channel information is used to indicate that the installation channel of the pre-installed application X is to be installed through the installation package stored before leaving the factory after the device is turned on for the first time.
[0152] That is to say, before leaving the factory, electronic devices shipped to country A will store the installation package of pre-installed application X and the configuration file of pre-installed application X, and the configuration file of pre-installed application X may include the channel information of pre-installed application X; before leaving the factory, electronic devices shipped to countries other than country A will also store the installation package of pre-installed application X and the configuration file of pre-installed application X, and the configuration file of pre-installed application X may also include the channel information of pre-installed application X.
[0153] S502: For an electronic device shipped to country A, after the electronic device is turned on for the first time, it is determined according to a configuration file of the pre-installed application X that the pre-installed application X needs to be installed.
[0154] S503, the electronic device shipped to country A installs the pre-installed application X after being turned on for the first time, and saves the channel information in the configuration file into the first file.
[0155] S504: When the pre-installed application X is started, the channel information of the pre-installed application X is obtained from the first file and reported to the server.
[0156] In some scenarios, the configuration file of pre-installed application X indicates that electronic devices shipped to country A need to install pre-installed application X after first startup, while electronic devices shipped to non-countries A do not need to install pre-installed application X after first startup.
[0157] For electronic devices shipped to country A, after the first startup (including the first startup after leaving the factory or restart after restoring the factory settings), the installation package of the pre-installed application X stored before leaving the factory can be automatically run to install the pre-installed application X.
[0158] After the electronic device shipped to country A installs the pre-installed application X after being turned on for the first time, the electronic device shipped to country A can read the channel information of the pre-installed application X from the configuration file of the pre-installed application X, and then use the steps corresponding to S403 to S406 above to save the channel information of the pre-installed application X into the first file.
[0159] For electronic devices shipped to country A, after installing pre-installed application X at the first startup, users in country A can open and use pre-installed application X. In this way, when pre-installed application X is started, the electronic device shipped to country A can obtain the channel information of pre-installed application X from the first file, and report the channel information of pre-installed application X to the server, where the channel information of pre-installed application X is used to indicate that the installation channel of pre-installed application X is to install it through the installation package stored before leaving the factory after the first startup.
[0160] S505 , for the electronic device shipped to a country other than country A, after the electronic device is turned on for the first time, it is determined according to the configuration file of the pre-installed application X that the pre-installed application X does not need to be installed.
[0161] S506, the electronic device shipped to a country other than country A does not install the pre-installed application X after being turned on for the first time, but downloads and installs the pre-installed application X through the application market during use.
[0162] S507: When the pre-installed application X is started, the channel information of the pre-installed application X cannot be obtained, and the channel information of the pre-installed application X is not reported to the server.
[0163] For an electronic device shipped to a country other than Country A, if the installation package of the pre-installed application X stored before shipment is not automatically run to install the pre-installed application X after the electronic device is first powered on (including the first power on after shipment or restart after restoring factory settings), the electronic device shipped to the country other than Country A will not read the channel information of the pre-installed application X from the configuration file of the pre-installed application X, and will not use the steps corresponding to S403 to S406 above to save the channel information of the pre-installed application X in the first file.
[0164] For electronic devices shipped to countries other than A, the pre-installed application X is not installed after the first startup. Instead, the pre-installed application X is downloaded and installed through the application market or webpage during the user's use of the electronic device. Users in countries other than A can open and use the pre-installed application X downloaded and installed in the application market. In this way, when the pre-installed application X is started, the electronic device shipped to countries other than A cannot obtain the channel information of the pre-installed application X from the first file, and will not report the channel information of the pre-installed application X to the server.
[0165] S508 , based on the channel information of the pre-installed application X, the server counts the number of pre-installed applications X installed through the installation package stored before shipment after the computer is turned on for the first time.
[0166] The server may count the number of times the preinstalled application X is used and installed through the installation channel indicated by the channel information of the preinstalled application X based on the channel information of the preinstalled application X.
[0167] In the embodiment of the present application, the server counts the number of pre-installed applications X installed through the installation package stored before shipment after the first startup based on the channel information of the pre-installed application X reported by the electronic device, including the number of electronic devices shipped to country A using the pre-installed application X, but not including the number of electronic devices shipped to countries other than country A using the pre-installed application X, so that the channel information of the pre-installed application X that is not installed by itself through the installation package stored before shipment after the first startup will not be counted by the server. In this way, the server can more accurately count the number of pre-installed applications X that are actually installed through the installation package stored before shipment after the first startup.
[0168] In another example, a scenario where user groups are divided by country and a certain country includes operator m and operator n is used as an example. Before leaving the factory, the electronic device supporting operator m will store the installation package of pre-installed application X and the configuration file of pre-installed application X. The configuration file of pre-installed application X may include the channel information of pre-installed application X, and the channel information is used to indicate that the installation channel of pre-installed application X is installed through the installation package stored before leaving the factory after the first boot; before leaving the factory, the electronic device supporting operator n will also store the installation package of pre-installed application X and the configuration file of pre-installed application X. The configuration file of pre-installed application X may also include the channel information of pre-installed application X, and the channel information is also used to indicate that the installation channel of pre-installed application X is installed through the installation package stored before leaving the factory after the first boot.
[0169] For an electronic device supporting operator m, after the first startup, it is determined according to the configuration file of the preinstalled application X that the preinstalled application X needs to be installed, and then the installation package of the preinstalled application X stored before leaving the factory can be automatically run after the first startup to install the preinstalled application X. In addition, after the electronic device supporting operator m installs the preinstalled application X after the first startup, the electronic device supporting operator m can read the channel information of the preinstalled application X from the configuration file and save the channel information of the preinstalled application X to the first file. In this way, when the preinstalled application X is started, the electronic device supporting operator m can obtain the channel information of the preinstalled application X from the first file and report it to the server.
[0170] For the electronic device supporting operator n, after the first startup, it is determined that the pre-installed application X does not need to be installed according to the configuration file of the pre-installed application X. If the installation package of the pre-installed application X stored before leaving the factory is not automatically run to install the pre-installed application X after the first startup, the electronic device supporting operator n will not read the channel information of the pre-installed application X from the configuration file, nor will it save the channel information of the pre-installed application X to the first file. If the user downloads and installs the pre-installed application X through the application market or webpage during the use of the electronic device, then when the pre-installed application X is started, the electronic device supporting operator n cannot obtain the channel information of the pre-installed application X from the first file, and will not report the channel information of the pre-installed application X to the server.
[0171] In this way, the server counts the number of pre-installed applications X installed through the installation package stored before leaving the factory after the first startup based on the channel information of the pre-installed application X reported by the electronic device, including the number of electronic devices supporting operator m using the pre-installed application X, but not including the number of electronic devices supporting operator n using the pre-installed application X, so that the channel information of the pre-installed application X that is not installed by itself through the installation package stored before leaving the factory after the first startup will not be counted by the server. In this way, the server can more accurately count the number of pre-installed applications X actually installed through the installation package stored before leaving the factory after the first startup.
[0172] It should be understood that the scenarios to which the embodiments of the present application are applicable are not limited to the scenarios corresponding to the electronic devices shipped to country A and the electronic devices shipped to non-countries A, as well as the scenarios corresponding to the electronic devices supporting operator m and the electronic devices supporting operator n. As long as both types of electronic devices store an installation package and a configuration file of a pre-installed application before leaving the factory, but one type of electronic device determines that the pre-installed application needs to be installed according to the configuration file of the pre-installed application after the first startup, and the other type of electronic device determines that the pre-installed application does not need to be installed according to the configuration file of the pre-installed application after the first startup, the scenarios are applicable to the present application.
[0173] For example, Figure 6 A schematic diagram of the module interaction for storing channel information in the first file provided in an embodiment of the present application. Figure 6 As shown, the electronic device may include pre-installed applications, system services, startup customization services and attribute services. The process of saving the channel information in the first file may specifically include the following steps:
[0174] S601: When the electronic device is powered on for the first time, the preinstalled application determines whether the preinstalled application needs to be installed according to the configuration file.
[0175] In some embodiments, the electronic device stores an installation package of a pre-installed application and a configuration file of the pre-installed application before leaving the factory. The configuration file of the pre-installed application may include channel information of the pre-installed application, and the channel information is used to indicate that the installation channel of the pre-installed application is to install it through the installation package stored before leaving the factory after the device is turned on for the first time.
[0176] When the electronic device is powered on for the first time, the preinstalled application can determine whether the preinstalled application needs to be installed based on the configuration file of the preinstalled application.
[0177] Specifically, the configuration file of the preinstalled application may include the first SIM card information associated with the preinstalled application or the first country information associated with the preinstalled application, and the electronic device determines whether the preinstalled application needs to be installed based on the first SIM card information associated with the preinstalled application or the first country information associated with the preinstalled application. The specific determination method can refer to the implementation method corresponding to the above S401, which will not be repeated here.
[0178] When the preinstalled application determines that the preinstalled application needs to be installed according to the configuration file, the following steps S602 to S613 are executed; and when the preinstalled application determines that the preinstalled application does not need to be installed according to the configuration file, the following steps S602 to S613 do not need to be executed.
[0179] S602: When the pre-installed application needs to be installed, the pre-installed application reads the channel information from the configuration file.
[0180] S603, the pre-installed application sends channel information to the system service.
[0181] When it is determined according to the configuration file that the preinstalled application needs to be installed, the installation package of the preinstalled application stored before shipment can be automatically run to install the preinstalled application. After the preinstalled application is installed, the preinstalled application can read the channel information of the preinstalled application from the configuration file.
[0182] Then, the preinstalled application calls the interface provided by the system service and sends the channel information of the preinstalled application to the system service. For example, the preinstalled application calls the interface provided by the system service and sends the saveAutoInstallChannelProrerties instruction to the system service, and the saveAutoInstallChannelProrerties instruction includes the channel information of the preinstalled application.
[0183] S604: The system service generates a second file and writes the channel information into the second file.
[0184] After receiving the channel information of the pre-installed application sent by the pre-installed application, the system service generates a second file in the data directory, and the system service writes the channel information of the pre-installed application into the second file.
[0185] In some scenarios, after the electronic device is turned on for the first time, it installs multiple pre-installed applications by running the installation packages of multiple pre-installed applications stored before leaving the factory. After the electronic device completes the installation of all the pre-installed applications, the system service can generate a second file, and then the system service writes the channel information of the multiple pre-installed applications into the second file at one time.
[0186] S605, when the system service writes the channel information into the second file, the system service sends first indication information to the preinstalled application; the first indication information is used to indicate that the channel information has been written into the second file.
[0187] S606: The preinstalled application sets the state of the channel attribute hot update switch to an enabled state in response to the first indication information.
[0188] After the system service writes the channel information of the preinstalled application into the second file, the system service may send first indication information to the preinstalled application to indicate that the channel information of the preinstalled application has been written into the second file.
[0189] After the preinstalled application receives the first indication information sent by the system service, the preinstalled application sets the state of the channel attribute hot update switch to the start state (ie, the start state) in response to the first indication information.
[0190] Therefore, according to the execution steps of S605 and S606 above, when the channel information is written into the second file, the preinstalled application sets the state of the channel attribute hot update switch to the start state.
[0191] S607: The attribute service detects that the status of the channel attribute hot update switch is enabled.
[0192] S608, when the attribute service monitors that the state of the channel attribute hot update switch is in the enabled state, the attribute service sends second indication information to the startup customization service; the second indication information is used to indicate that the state of the channel attribute hot update switch is in the enabled state.
[0193] The boot customization service can register a channel hot update event and a processing function (i.e., mscw.auto_install.prop_liveupdate), which are used to monitor the status of the channel property hot update switch. In some embodiments, the channel hot update event and the processing function can be an rc file, which can be understood as a file with the suffix rc.
[0194] The attribute service can monitor the status of the channel attribute hot update switch in real time based on the channel hot update event and processing function. Therefore, after the pre-installed application sets the status of the channel attribute hot update switch to the start state, the attribute service can monitor that the status of the channel attribute hot update switch is the start state.
[0195] When the attribute service monitors that the state of the channel attribute hot update switch is in the enabled state, the attribute service sends second indication information to the startup customization service to indicate that the state of the channel attribute hot update switch is in the enabled state.
[0196] S609: The startup customization service reads channel information from the second file in response to the second instruction information.
[0197] After receiving the second indication information sent by the attribute service, the startup customization service responds to the second indication information and reads the channel information of the pre-installed application from the second file.
[0198] Therefore, according to the execution steps S607 to S609 above, when the state of the channel attribute hot update switch is the start-up state, the startup customization service reads the channel information from the second file.
[0199] S610: The startup customization service obtains the name of the installation package of the pre-installed application from the channel information.
[0200] S611, the boot customization service saves the installation package name and channel information in the form of key-value pairs in the first file.
[0201] After the startup customization service reads the channel information of the preinstalled application from the second file, the startup customization service can parse the channel information of the preinstalled application and obtain the installation package name of the preinstalled application from the channel information of the preinstalled application. Then, the startup customization service can save the installation package name of the preinstalled application and the channel information of the preinstalled application in the first file in the form of a key-value pair.
[0202] It should be noted that after the system service writes the channel information of the pre-installed application into the second file, the boot-up customization service also needs to read the channel information of the pre-installed application from the second file and save the channel information of the pre-installed application to the first file again. This is because the system service has no external data interface, and the upper-level application (such as the pre-installed application) cannot directly obtain the channel information of the pre-installed application from the second file, while the boot-up customization service provides an external data interface, so that the upper-level application (such as the pre-installed application) can obtain the channel information of the pre-installed application from the first file.
[0203] Furthermore, since the boot customization service cannot directly obtain the channel information sent by the pre-installed application, it needs to obtain the channel information sent by the pre-installed application through the system service and write it into the second file before the boot customization service can read the channel information from the second file.
[0204] In some embodiments, the first file in which the boot customization service saves the channel information may be a system cache file. When the electronic device stops working (such as shutting down), the channel information of the pre-installed applications saved in the first file will be lost. Therefore, each time the electronic device is turned on, the boot customization service will read the channel information of the pre-installed applications from the second file once, and save the channel information of the pre-installed applications once in the first file. Only when the electronic device is turned on for the first time will the system service write the channel information of the pre-installed applications into the second file once.
[0205] S612, the startup customization service sets the state of the channel attribute hot update switch to the end state.
[0206] S613: The attribute service monitors that the status of the channel attribute hot update switch is ended.
[0207] After the startup customization service saves the installation package name and the channel information in the form of a key-value pair in the first file, the startup customization service can set the state of the channel attribute hot update switch to the end state (ie, the finish state).
[0208] The attribute service can monitor the status of the channel attribute hot update switch in real time based on the channel hot update event and processing function. Therefore, after the startup customization service sets the status of the channel attribute hot update switch to the end state, the attribute service can monitor that the status of the channel attribute hot update switch is the end state.
[0209] After the execution step of S611, that is, after the channel information is saved in the first file, when the preinstalled application is started, the preinstalled application obtains the channel information from the first file based on the installation package name of the preinstalled application; the preinstalled application reports the channel information to the server.
[0210] When the user opens the preinstalled application, that is, starts the preinstalled application, the preinstalled application can obtain the channel information of the preinstalled application from the first file based on the installation package name of the preinstalled application; then, the preinstalled application sends the obtained channel information of the preinstalled application to the server.
[0211] Exemplarily, the preinstalled application can send the channel information of the preinstalled application to the server through the communication module. The communication module is used to realize data transmission across devices. Among them, the communication module can include a mobile communication module or a wireless communication module, which is not limited in the embodiments of the present application.
[0212] Combined with the above Figures 4 to 6 , the method for reporting channel information provided in the embodiment of the present application is described, and the device for executing the above method provided in the embodiment of the present application is described below. Figure 7 As shown, Figure 7A schematic diagram of a channel information reporting device provided in an embodiment of the present application. The channel information reporting device may be an electronic device in an embodiment of the present application, or a chip or chip system in an electronic device.
[0213] like Figure 7 As shown, the channel information reporting device 700 includes: a processing unit 701 and a communication unit 702. The processing unit 701 is used to support the channel information reporting device 700 to perform the above processing steps; the communication unit 702 is used to support the channel information reporting device 700 to perform the above data sending and data receiving steps. The communication unit 702 can be an input or output interface, a pin or a circuit, etc.
[0214] Specifically, the processing unit 701 is used to determine whether it is necessary to install the pre-installed application according to the configuration file when the electronic device is turned on for the first time, and the first startup includes the first startup after leaving the factory or restarting after restoring the factory settings; the processing unit 701 is used to read the channel information of the pre-installed application from the configuration file when the pre-installed application needs to be installed, and the channel information is used to indicate the installation channel of the pre-installed application, which is installed through the installation package stored before leaving the factory after the first startup; the processing unit 701 is used to save the channel information in the first file; the processing unit 701 is used to obtain the channel information from the first file when the pre-installed application is started; the communication unit 702 is used to report the channel information to the server.
[0215] In a possible implementation, the channel information reporting device 700 further includes a storage unit 703. The storage unit 703 and the processing unit 701 are connected via a line. The storage unit 703 may include one or more memories, and the memory may be a device used to store programs or data in one or more devices or circuits. The storage unit 703 may exist independently and be connected to the processing unit 701 via a communication bus. The storage unit 703 may also be integrated with the processing unit 701.
[0216] The storage unit 703 can store computer-executable instructions of the method in the electronic device so that the processing unit 701 executes the method in the above embodiment. The storage unit 703 can be a register, a cache, or a random access memory (RAM), etc. The storage unit 703 can be integrated with the processing unit 701. The storage unit 703 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 703 can be independent of the processing unit 701.
[0217] Figure 8 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. Figure 8 As shown, the chip 800 includes one or more (including two) processors 801 , a communication line 802 and a communication interface 803 . Optionally, the chip 800 also includes a memory 804 .
[0218] In some implementations, the memory 804 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
[0219] The method described in the above embodiment of the present application can be applied to the processor 801, or implemented by the processor 801. The processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 801 or an instruction in the form of software. The above processor 801 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 801 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.
[0220] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 804, and the processor 801 reads the information in the memory 804 and completes the steps of the above method in combination with its hardware.
[0221] The processor 801 , the memory 804 , and the communication interface 803 may communicate with each other via the communication line 802 .
[0222] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
[0223] The present application embodiment also provides a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another 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 by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatiledisc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0224] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above-mentioned channel information reporting method.
[0225] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.
[0226] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program or instruction. The above method is implemented when the computer program or instruction is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.
[0227] As a possible design, the computer-readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer-readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of the medium. Disks and optical discs as used herein include compact discs (CDs), laser discs, optical discs, DVDs, floppy disks and Blu-ray discs, where disks generally reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.
[0228] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0229] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above are only specific implementation methods of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.
Claims
1. A method for reporting channel information, characterized in that: Applied to an electronic device, the electronic device stores an installation package and a configuration file of a pre-installed application before leaving the factory, and the method comprises: When the electronic device is powered on for the first time, the electronic device determines whether the pre-installed application needs to be installed according to the configuration file; the first power-on includes the first power-on after leaving the factory or restarting after restoring the factory settings; In the case where the pre-installed application needs to be installed, the electronic device reads the channel information of the pre-installed application from the configuration file; the channel information is used to indicate the installation channel of the pre-installed application, which is installed through the installation package stored before leaving the factory after the first startup; The electronic device stores the channel information in a first file; When the preinstalled application is started, the electronic device obtains the channel information from the first file; The electronic device reports the channel information to a server.
2. The method according to claim 1, characterized in that The electronic device stores the channel information in a first file, including: The electronic device writes the channel information into a second file; the second file is different from the first file; The electronic device reads the channel information from the second file; The electronic device obtains the installation package name of the pre-installed application from the channel information; The electronic device saves the installation package name and the channel information in the first file in the form of a key-value pair.
3. The method according to claim 2, characterized in that The electronic device includes a system service; the electronic device reads the channel information of the pre-installed application from the configuration file, including: The pre-installed application reads the channel information from the configuration file; Correspondingly, the electronic device writes the channel information into the second file, including: The pre-installed application sends the channel information to the system service; The system service generates the second file and writes the channel information into the second file.
4. The method according to claim 3, characterized in that: The electronic device further includes a startup customization service; the electronic device reads the channel information from the second file, including: When the channel information is written into the second file, the preinstalled application sets the state of the channel attribute hot update switch to the start state; When the state of the channel attribute hot update switch is the startup state, the startup customization service reads the channel information from the second file.
5. The method according to claim 4, characterized in that In the case where the channel information is written into the second file, the preinstalled application sets the state of the channel attribute hot update switch to the start state, including: In a case where the system service writes the channel information into the second file, the system service sends first indication information to the preinstalled application; the first indication information is used to indicate that the channel information has been written into the second file; In response to the first indication information, the preinstalled application sets the state of the channel attribute hot update switch to the enabled state.
6. The method according to claim 4, characterized in that The electronic device further includes an attribute service; when the state of the channel attribute hot update switch is the startup state, the startup customization service reads the channel information from the second file, including: When the attribute service monitors that the state of the channel attribute hot update switch is the startup state, the attribute service sends second indication information to the startup customization service; the second indication information is used to indicate that the state of the channel attribute hot update switch is the startup state; The startup customization service reads the channel information from the second file in response to the second indication information.
7. The method according to claim 4, characterized in that The electronic device obtains the installation package name of the pre-installed application from the channel information, including: The startup customization service obtains the installation package name of the pre-installed application from the channel information; Correspondingly, the electronic device saves the installation package name and the channel information in the first file in the form of a key-value pair, including: The startup customization service saves the installation package name and the channel information in the first file in the form of a key-value pair.
8. The method according to claim 7, characterized in that The electronic device further includes an attribute service; after the startup customization service saves the installation package name and the channel information in the first file in the form of a key-value pair, it also includes: The startup customization service sets the state of the channel attribute hot update switch to the end state; The attribute service monitors that the state of the channel attribute hot update switch is the end state.
9. The method according to any one of claims 1 to 8, characterized in that The configuration file includes the first SIM card information associated with the pre-installed application; The electronic device determines whether the preinstalled application needs to be installed according to the configuration file, including: The electronic device obtains second SIM card information corresponding to the SIM card installed in the electronic device; The electronic device determines whether the first SIM card information matches the second SIM card information; When the first SIM card information matches the second SIM card information, the electronic device determines that the preinstalled application needs to be installed; when the first SIM card information does not match the second SIM card information, the electronic device determines that the preinstalled application does not need to be installed.
10. The method according to any one of claims 1 to 8, characterized in that The configuration file includes first country information associated with the pre-installed application; The electronic device determines whether the preinstalled application needs to be installed according to the configuration file, including: The electronic device obtains second country information of the country where the electronic device is located; The electronic device determines whether the first country information matches the second country information; When the first country information matches the second country information, the electronic device determines that the preinstalled application needs to be installed; when the first country information does not match the second country information, the electronic device determines that the preinstalled application does not need to be installed.
11. The method according to claim 2, characterized in that In the case of starting the preinstalled application, the electronic device obtains the channel information from the first file, including: When the preinstalled application is started, the preinstalled application obtains the channel information from the first file based on the installation package name of the preinstalled application; Accordingly, the electronic device reports the channel information to the server, including: The preinstalled application reports the channel information to the server.
12. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the channel information reporting method according to any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction. When the computer program or instruction is executed, the method for reporting channel information according to any one of claims 1 to 11 is implemented.
14. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, enables a computer to execute the method for reporting channel information according to any one of claims 1 to 11.
Citation Information
Patent Citations
Processing method and device of channel information of application
CN104657631A
Application program information reporting and receiving method and device
CN110737563A
Method and device for determining source channel, equipment and computer storage medium
CN111367963A
Application installation method and terminal
CN112119378A
Channel information processing method and device, computer equipment and storage medium
CN116955089A