Method and apparatus for flashing of smart device
Patent Information
- Application Number
- CN202211042146.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2042-08-29
AI Technical Summary
[0004]本申请提供一种智能设备的刷机方法及装置,旨在解决现有技术中刷机的成本较高的问题
[0072]本申请提供一种智能设备的刷机方法及装置,该智能设备的刷机方法包括:获取刷机指令中的当前网络供应实体ID;根据当前网络供应实体ID从预设的多个第一网络供应实体集合中确定当前网络供应实体ID所属的目标网络供应实体集合,第一网络供应实体集合包括至少一个网络供应实体ID;从服务器获取各个第一网络供应实体集合共用的通用镜像和目标网络供应实体集合的实体集合镜像;加载通用镜像和实体集合镜像中与当前网络供应实体ID对应的网络供应实体专属配置信息。本申请将需要刷入的配置信息分为各个第一网络供应实体集合共用的通用镜像和目标网络供应实体集合的实体集合镜像,在对当前网络供应实体ID的智能设备进行刷机时,根据当前网络供应实体ID快速从服务器获取通用镜像和实体集合镜像,然后从实体集合镜像中加载当前网络供应实体ID对应的网络供应实体专属配置信息,针对不同的当前网络供应实体ID可以重复利用通用镜像,提高了镜像复用度,无需为每个网络供应实体ID单独编译镜像,进而降低了刷机的成本。
Smart Images

Figure CN117119039B_ABST
Abstract
Description
Technical Field
[0001] This application mainly relates to the field of computer technology, and specifically to a method and apparatus for flashing a smart device. Background Technology
[0002] The demands of the mobile phone industry are already quite mature, with different customers and operators having their own detailed requirements, including but not limited to pre-installed applications, home screen layouts, wallpapers, browser homepage bookmarks, email signatures, call notification ringtones, logical functions, and default on / off states. Because customer needs and pre-integrated features differ greatly, manufacturers need to compile and release software versions for each customer, resulting in poor reusability and high development, testing, and maintenance costs.
[0003] In other words, flashing the firmware is relatively expensive using existing technologies. Summary of the Invention
[0004] This application provides a method and apparatus for flashing a smart device, aiming to solve the problem of high flashing costs in the prior art.
[0005] Firstly, this application provides a method for flashing a smart device, the method comprising:
[0006] Retrieve the current network provider ID from the flashing command;
[0007] Based on the current network supply entity ID, determine the target network supply entity set to which the current network supply entity ID belongs from a plurality of preset first network supply entity sets, wherein the first network supply entity set includes at least one network supply entity ID;
[0008] Obtain from the server a common image shared by all first network supply entity sets and an entity set image of the target network supply entity set;
[0009] Load the network supply entity-specific configuration information corresponding to the current network supply entity ID from the general image and the entity set image.
[0010] Optionally, determining the target network supply entity set to which the current network supply entity ID belongs from a preset set of multiple first network supply entities based on the current network supply entity ID includes:
[0011] Obtain the MADA protocol to which the current network provider entity ID belongs;
[0012] The target network supply entity set to which the current network supply entity ID belongs is determined from multiple preset first network supply entity sets according to the MADA protocol to which the current network supply entity ID belongs. The MADA protocols to which the network supply entity ID belongs are different in different first network supply entity sets.
[0013] Optionally, determining the target network provider set to which the current network provider ID belongs from a preset set of multiple first network provider sets based on the MADA protocol to which the current network provider ID belongs includes:
[0014] Obtain the administrative region to which the current network supply entity ID belongs;
[0015] Based on the administrative region to which the current network supply entity ID belongs and the MADA protocol to which the current network supply entity ID belongs, the target network supply entity set to which the current network supply entity ID belongs is determined from multiple preset first network supply entity sets. The MADA protocol and administrative region to which the network supply entity ID belongs are different in different first network supply entity sets.
[0016] Optionally, before determining the target network supply entity set to which the current network supply entity ID belongs from a preset set of multiple first network supply entities based on the current network supply entity ID, the following steps are included:
[0017] Obtain the administrative region and MADA protocol to which each network provider entity ID belongs;
[0018] Based on the MADA protocol to which each network provider ID belongs and the administrative region to which each network provider ID belongs, multiple network provider IDs are divided into multiple second network provider sets;
[0019] Multiple sets of first network supply entities are determined based on multiple sets of second network supply entities.
[0020] Optionally, determining the multiple first network supply entity sets based on the multiple second network supply entity sets includes:
[0021] Determine whether the number of multiple sets of second network supply entities exceeds a preset number;
[0022] If the number of multiple second network supply entity sets exceeds the preset number, then the second network supply entity sets are sorted from largest to smallest according to the number of network supply entity IDs in each second network supply entity set;
[0023] The network supply entity IDs of multiple second network supply entity sets that are sorted after a preset number are assigned to second network supply entity sets that are sorted before and after the preset number, thus obtaining a first network supply entity set of the preset number.
[0024] Secondly, this application provides a method for flashing a smart device, the method comprising:
[0025] Obtain user configuration information for each network provider entity ID;
[0026] According to the first preset partitioning strategy, the user configuration information of each network supply entity ID is divided into general configuration information shared by each first network supply entity set and network supply entity-specific configuration information corresponding to each network supply entity ID.
[0027] The common configuration information shared by each set of first network supply entities is compiled into a common image shared by each set of first network supply entities;
[0028] The network-specific configuration information corresponding to each network supply entity ID is compiled into the respective entity set image corresponding to each first network supply entity set.
[0029] Optionally, the universal image includes an SSI image and a Preload image, and the step of compiling the common configuration information shared by each set of first network provisioning entities into a universal image shared by each set of first network provisioning entities includes:
[0030] According to the second preset partitioning strategy, the common configuration information shared by each first network supply entity set is divided into ROM common configuration information and project common configuration information.
[0031] Compile the ROM general configuration information into an SSI image;
[0032] Compile the project's general configuration information into a Preload image.
[0033] Optionally, the user configuration information includes at least one of the following: application list, power-on / off animation, wallpaper, desktop layout, ringtone, homepage, and bookmarks.
[0034] Thirdly, this application provides a flashing device for a smart device, the flashing device for the smart device comprising:
[0035] The first acquisition unit is used to acquire the current network supply entity ID in the flashing command;
[0036] The determining unit is configured to determine, from a plurality of preset first network supply entity sets, the target network supply entity set to which the current network supply entity ID belongs, based on the current network supply entity ID; the first network supply entity set includes at least one network supply entity ID.
[0037] The second acquisition unit is used to acquire a common image shared by each first network supply entity set and an entity set image of the target network supply entity set from the server;
[0038] The configuration loading unit is used to load the network supply entity-specific configuration information corresponding to the current network supply entity ID from the general image and the entity set image.
[0039] Optionally, the determining unit is configured to:
[0040] Obtain the MADA protocol to which the current network provider entity ID belongs;
[0041] The target network supply entity set to which the current network supply entity ID belongs is determined from multiple preset first network supply entity sets according to the MADA protocol to which the current network supply entity ID belongs. The MADA protocols to which the network supply entity ID belongs are different in different first network supply entity sets.
[0042] Optionally, the determining unit is configured to:
[0043] Obtain the administrative region to which the current network supply entity ID belongs;
[0044] Based on the administrative region to which the current network supply entity ID belongs and the MADA protocol to which the current network supply entity ID belongs, the target network supply entity set to which the current network supply entity ID belongs is determined from multiple preset first network supply entity sets. The MADA protocol and administrative region to which the network supply entity ID belongs are different in different first network supply entity sets.
[0045] Optionally, the determining unit is configured to:
[0046] Obtain the administrative region and MADA protocol to which each network provider entity ID belongs;
[0047] Based on the MADA protocol to which each network provider ID belongs and the administrative region to which each network provider ID belongs, multiple network provider IDs are divided into multiple second network provider sets;
[0048] Multiple sets of first network supply entities are determined based on multiple sets of second network supply entities.
[0049] Optionally, the determining unit is configured to:
[0050] Determine whether the number of multiple sets of second network supply entities exceeds a preset number;
[0051] If the number of multiple second network supply entity sets exceeds the preset number, then the second network supply entity sets are sorted from largest to smallest according to the number of network supply entity IDs in each second network supply entity set;
[0052] The network supply entity IDs of multiple second network supply entity sets that are sorted after a preset number are assigned to second network supply entity sets that are sorted before and after the preset number, thus obtaining a first network supply entity set of the preset number.
[0053] Fourthly, this application provides a flashing device for a smart device, the flashing device for the smart device comprising:
[0054] The acquisition unit is used to acquire user configuration information for each network provider entity ID;
[0055] The partitioning unit is used to divide the user configuration information of each network supply entity ID into general configuration information shared by each first set of network supply entities and network supply entity-specific configuration information corresponding to each network supply entity ID according to the first preset partitioning strategy.
[0056] The first compilation unit is used to compile the common configuration information shared by each set of first network supply entities into a common image shared by each set of first network supply entities.
[0057] The second compilation unit is used to compile the network-specific configuration information corresponding to each network supply entity ID into the respective entity set image corresponding to each first network supply entity set.
[0058] Optionally, the universal image includes an SSI image and a Preload image, and the first compilation unit is used for:
[0059] According to the second preset partitioning strategy, the common configuration information shared by each first network supply entity set is divided into ROM common configuration information and project common configuration information.
[0060] Compile the ROM general configuration information into an SSI image;
[0061] Compile the project's general configuration information into a Preload image.
[0062] Optionally, the user configuration information includes at least one of the following: application list, power-on / off animation, wallpaper, desktop layout, ringtone, homepage, and bookmarks.
[0063] Fifthly, this application provides an intelligent device, the intelligent device comprising:
[0064] One or more processors;
[0065] Memory; and
[0066] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the flashing method of the smart device as described in any one of the first aspects.
[0067] Sixthly, this application provides a server, the server comprising:
[0068] One or more processors;
[0069] Memory; and
[0070] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the flashing method of the smart device as described in any of the second aspects.
[0071] In a seventh aspect, this application provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to perform steps in the flashing method for a smart device as described in any one of the first aspects or to perform steps in the flashing method for a smart device as described in any one of the second aspects.
[0072] This application provides a method and apparatus for flashing a smart device. The flashing method includes: obtaining the current network provider entity ID from a flashing command; determining the target network provider entity set to which the current network provider entity ID belongs from a plurality of preset first network provider entity sets based on the current network provider entity ID, wherein each first network provider entity set includes at least one network provider entity ID; obtaining a common image shared by each of the first network provider entity sets and an entity set image of the target network provider entity set from a server; and loading network provider entity-specific configuration information corresponding to the current network provider entity ID from the common image and the entity set image. This application divides the configuration information to be flashed into a common image shared by each of the first network provider entity sets and an entity set image of the target network provider entity set. When flashing a smart device with the current network provider entity ID, the common image and the entity set image are quickly obtained from the server based on the current network provider entity ID, and then the network provider entity-specific configuration information corresponding to the current network provider entity ID is loaded from the entity set image. The common image can be reused for different current network provider entity IDs, improving image reusability and eliminating the need to compile an image separately for each network provider entity ID, thereby reducing the cost of flashing. Attached Figure Description
[0073] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0074] Figure 1 This is a schematic diagram of a scenario for a flashing system for a smart device provided in an embodiment of this application;
[0075] Figure 2 This is a schematic flowchart of an embodiment of the flashing method for a smart device provided in this application.
[0076] Figure 3 This is a schematic flowchart of another embodiment of the flashing method for smart devices provided in this application;
[0077] Figure 4 This is a schematic diagram of an embodiment of the flashing device for a smart device provided in this application.
[0078] Figure 5 This is a schematic diagram of another embodiment of the flashing device for a smart device provided in this application.
[0079] Figure 6 This is a schematic diagram of an embodiment of the smart device provided in this application. Detailed Implementation
[0080] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0081] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0082] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0083] This application provides a method and apparatus for flashing a smart device, which will be described in detail below.
[0084] Please see Figure 1 , Figure 1 This is a schematic diagram of a flashing system for a smart device provided in an embodiment of this application. The flashing system for a smart device may include a server 100 and multiple smart devices 110 connected to the server 100 via a network. Each smart device 110 integrates a flashing device for the smart device.
[0085] In this embodiment, the server 100 can be a standalone server, a server network, or a server cluster. For example, the server 100 described in this embodiment includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0086] In this embodiment, the aforementioned smart device 110 can be a general-purpose smart device or a dedicated smart device. In specific implementations, the smart device 110 can be a desktop computer, a portable computer, a network server, a PDA (Personal Digital Assistant), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, a car, an air conditioner, etc. This embodiment does not limit the type of smart device 110.
[0087] Those skilled in the art will understand that Figure 1 The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include more than one application scenario. Figure 1 The more or fewer smart devices shown may also include, as understood, one or more other smart devices capable of processing data, which are not specifically limited here.
[0088] It should be noted that, Figure 1 The schematic diagram of the flashing system for smart devices shown is merely an example. The flashing system and scenarios for smart devices described in this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of flashing systems for smart devices and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.
[0089] First, this application provides a method for flashing a smart device. The method includes: obtaining the current network provider entity ID from the flashing command; determining the target network provider entity set to which the current network provider entity ID belongs from a plurality of preset first network provider entity sets based on the current network provider entity ID, wherein the first network provider entity set includes at least one network provider entity ID; obtaining a common image shared by each of the first network provider entity sets and an entity set image of the target network provider entity set from the server; and loading the network provider entity-specific configuration information corresponding to the current network provider entity ID from the common image and the entity set image.
[0090] like Figure 2 As shown, Figure 2 This is a schematic flowchart of an embodiment of the flashing method for a smart device provided in this application. The flashing method for the smart device includes the following steps S201 to S204:
[0091] S201. Obtain the current network supply entity ID from the flashing command.
[0092] In this embodiment, when a flashing command is received, the current network provider entity ID is obtained from the flashing command. For example, the current network provider entity ID is XX, representing China Mobile. The network provider entity ID can be the operator ID of each operator.
[0093] Furthermore, the current network provider entity ID is written into an indelible partition in the smart device to prevent the network provider entity ID of the smart device from being tampered with.
[0094] S202. Determine the target network supply entity set to which the current network supply entity ID belongs from a set of multiple preset first network supply entity sets based on the current network supply entity ID. The first network supply entity set includes at least one network supply entity ID.
[0095] In this embodiment, the target network supply entity set to which the current network supply entity ID belongs is determined from a plurality of preset first network supply entity sets based on the current network supply entity ID. The first network supply entity set includes at least one network supply entity ID. Prior to this, it may include:
[0096] (1) Obtain the administrative region and MADA protocol to which each network supply entity ID belongs.
[0097] The Google MADA (Mobile Agreement) is a distribution agreement for mobile applications that allows hardware manufacturers to pre-install Google's Android apps, such as YouTube or Gmail, on their devices. According to MADA, hardware manufacturers wishing to pre-install a Google app must pre-install all of its apps. While Android is an open-source system, Google services are not, and pre-installation requires Google's authorization. MADA restricts how manufacturers can pre-install Google apps. Simultaneously, Google is increasingly adding Android code to its closed-source services. If an Android device sold is intended to use any Google services, it must pre-install the full suite of Google apps.
[0098] Among them, administrative regions can be countries, continents, or other administrative divisions.
[0099] (2) Based on the MADA protocol to which each network supply entity ID belongs and the administrative region to which each network supply entity ID belongs, the multiple network supply entity IDs are divided into multiple second network supply entity sets.
[0100] In this embodiment of the application, the administrative region and the MADA protocol to which the network supply entity ID belonging to the same second network supply entity set are the same.
[0101] (3) Determine the first network supply entity set based on multiple second network supply entity sets.
[0102] In one specific embodiment, determining the first network supply entity set based on a plurality of second network supply entity sets includes: determining the plurality of second network supply entity sets as a plurality of first network supply entity sets.
[0103] Since there may be a large number of network provider entity IDs and a large number of network provider entity sets, in order to reduce the number of network provider entity sets, in another specific embodiment, determining multiple first network provider entity sets based on multiple second network provider entity sets may include:
[0104] (1) Determine whether the number of multiple second network supply entity sets exceeds the preset number.
[0105] The preset quantity can be set according to specific circumstances. It is determined whether the number of multiple second network supply entity sets exceeds the preset quantity. If the number of multiple second network supply entity sets exceeds the preset quantity, it indicates that there are too many network supply entity sets. Therefore, the second network supply entity sets are sorted according to the number of network supply entity IDs in each set, thereby reducing the number of network supply entity sets. If the number of multiple second network supply entity sets does not exceed the preset quantity, it indicates that the number of network supply entity sets is appropriate. Then, the multiple second network supply entity sets are determined as multiple first network supply entity sets.
[0106] (2) If the number of multiple second network supply entity sets exceeds the preset number, then sort each second network supply entity set from largest to smallest according to the number of network supply entity IDs in each second network supply entity set.
[0107] (3) Assign the network supply entity IDs from multiple second network supply entity sets that are sorted after a preset number to the second network supply entity sets that are sorted before and after the preset number, to obtain a first network supply entity set of a preset number.
[0108] In one specific embodiment, the network supply entity IDs from multiple second network supply entity sets ranked after a preset number are evenly distributed to the second network supply entity sets ranked before and after the preset number. In another specific embodiment, the network supply entity IDs from multiple second network supply entity sets ranked after a preset number are distributed to the second network supply entity sets ranked at the preset number, resulting in a first network supply entity set of the preset number. That is, the network supply entity IDs with a smaller number are merged.
[0109] Furthermore, the total number of users owned by each second network provider entity set ranked up to and including a preset number is obtained. Then, the network provider entity IDs from the multiple second network provider entity sets ranked after the preset number are assigned to the second network provider entity set with the highest total number of users, resulting in multiple first network provider entity sets. The total number of users owned by each second network provider entity set is the sum of the number of users owned by all network provider entity IDs within that second network provider entity set. The number of users owned by a network provider entity ID refers to the number of people using the communication services provided by that network provider entity ID.
[0110] In this embodiment, the target network supply entity set to which the current network supply entity ID belongs is determined from a plurality of preset first network supply entity sets based on the current network supply entity ID. The first network supply entity set includes at least one network supply entity ID, and may include:
[0111] (1) Obtain the MADA protocol to which the current network supply entity ID belongs.
[0112] (2) Determine the target network supply entity set to which the current network supply entity ID belongs from multiple preset first network supply entity sets according to the MADA protocol to which the current network supply entity ID belongs, wherein the MADA protocols to which the network supply entity ID belongs are different in different first network supply entity sets.
[0113] In one specific embodiment, network provider entity IDs with the same MADA protocol are used as a first set of network provider entities. The MADA protocol of the current network provider entity ID is matched with the MADA protocols of each first set of network provider entities to obtain the target set of network provider entities to which the current network provider entity ID belongs. The MADA protocol of the current network provider entity ID is the same as the MADA protocol of the target set of network provider entities.
[0114] In another specific embodiment, determining the target network supply entity set to which the current network supply entity ID belongs from a set of preset first network supply entity sets based on the MADA protocol to which the current network supply entity ID belongs may include: determining the target network supply entity set to which the current network supply entity ID belongs from a set of preset first network supply entity sets based on the administrative region to which the current network supply entity ID belongs and the MADA protocol to which the current network supply entity ID belongs, wherein the MADA protocol and administrative region to which the network supply entity ID belongs are different in different first network supply entity sets.
[0115] In one specific embodiment, the MADA protocol and administrative region of each network provider ID in the same first network provider entity set are the same.
[0116] S203. Obtain from the server the common image shared by each first network supply entity set and the entity set image of the target network supply entity set.
[0117] The server stores a common image shared by all first network provider sets and an entity set image for the target network provider set. Both the common image and the entity set image are downloaded from the server. The common image contains user configuration information usable by all first network provider entities, enabling image reuse, avoiding the need for a separate image for each network provider ID, reducing resource redundancy, and lessening server load.
[0118] S204. Load the network supply entity-specific configuration information corresponding to the current network supply entity ID from the general image and entity collection image.
[0119] Since the entity set image of the target network provider entity set contains the unique configuration information for each network provider entity ID under the target network provider entity set, it is sufficient to download the entity set image of the target network provider entity set from the server and load the unique configuration information of the network provider entity corresponding to the current network provider entity ID from the entity set image.
[0120] like Figure 3 As shown, Figure 3 This is a schematic flowchart of an embodiment of the flashing method for a smart device provided in this application. The flashing method for the smart device includes the following steps S301 to S304:
[0121] S301. Obtain user configuration information for each network supply entity ID.
[0122] The user configuration information includes at least one of the following: application list, power-on / off animation, wallpaper, desktop layout, ringtone, homepage, and bookmarks.
[0123] S302. According to the first preset partitioning strategy, the user configuration information of each network supply entity ID is divided into general configuration information shared by each first network supply entity set and network supply entity-specific configuration information corresponding to each network supply entity ID.
[0124] The first preset partitioning strategy is determined based on experience. The common configuration information shared by all first network supply entity sets refers to the user configuration information required when flashing the firmware for each network supply entity ID within each first network supply entity set. For example, the common configuration information could include multiple applications such as calling and SMS. The network supply entity-specific configuration information corresponding to each network supply entity ID can be unique to each network supply entity ID; for example, China Mobile's exclusive xx1 APP and China Unicom's exclusive xx2 APP, which cannot be shared across different network supply entity IDs.
[0125] S303. Compile the common configuration information shared by each set of first network supply entities into a common image shared by each set of first network supply entities.
[0126] Compilation (or compilation) is: 1. The process of using a compiler to generate a target program from a source program written in a source language. 2. The action of using a compiler to generate a target program. Compilation is the process of converting a high-level language into a binary language that a computer can understand. Computers only understand 1s and 0s; the compiler converts the familiar language into binary. The process of a compiler translating a source program into a target program consists of five stages: lexical analysis; syntax analysis; semantic checking and intermediate code generation; code optimization; and target code generation. The main stages are lexical analysis and syntax analysis, also known as source program analysis. During the analysis, syntax errors are found and warning messages are given. A compiled language is a programming language implemented using a compiler. Unlike interpreted languages, which are executed line by line by an interpreter, compiled languages use a compiler to first compile the code into machine code before execution. Theoretically, any programming language can be compiled or interpreted. The difference between them depends only on the application of the program.
[0127] The server compiles common configuration information into a common image shared by various first network supply entities, which can be downloaded and used by smart devices.
[0128] Furthermore, the common configuration information shared by each set of first network supply entities may include ROM common configuration information and project common configuration information. ROM common configuration information is the configuration information that all projects under the same ROM need to use, such as calling application, SMS application, etc. Project common configuration information is the configuration information shared by each network supply entity ID under the same project.
[0129] Compiling the common configuration information shared by each first network supply entity set into a common image shared by each first network supply entity set may include: dividing the common configuration information shared by each first network supply entity set into ROM common configuration information and project common configuration information according to a second preset partitioning strategy; compiling the ROM common configuration information into an SSI image; and turning the project common configuration information into a Preload image.
[0130] In an SSI, product-specific software components and OEM extensions are placed in a new product partition. Components in the product partition interact with components in the system partition using well-defined, stable interfaces. OEMs can choose to build a single SSI or use a small number of SSIs across multiple device SKUs. Once the latest version of the Android operating system is released, the OEM only needs to invest time and effort once to update the SSI to the latest Android version. The SSI can then be reused to update multiple devices without updating the product partition. SSI: An SSI is a generic image for the OEM and can exist on multiple devices. It does not contain any hardware-specific or product-specific components. By definition, everything in a specified SSI is shared across all devices using that SSI. An SSI can consist of a single system image or two partitions: system and system_ext. The system partition contains AOSP-based components, while the system_ext implementation contains OEM and SoC vendor extensions, as well as components tightly coupled to AOSP components. For example, an OEM Java framework library that provides custom APIs for the OEM's own applications is better suited to the system_ext partition than the system partition. The contents of both the system and system_ext partitions are built based on OEM-modified Android source code. The system_ext partition is optional, but it is recommended that you use it for any custom features and extensions tightly coupled with AOSP-based components. These distinctions will help you determine the changes needed to migrate such components from the system_ext partition to the product partition over a period of time.
[0131] S304. Compile the network supply entity-specific configuration information corresponding to each network supply entity ID into the entity set image corresponding to each first network supply entity set.
[0132] Based on the Google SSI framework, this application adds general configuration information for Preload image storage projects and specific configuration information for each first network supply entity set corresponding to the entity set image storage.
[0133] To better implement the flashing method for smart devices in this application embodiment, based on the flashing method for smart devices, this application embodiment also provides a flashing device for smart devices. The flashing device for smart devices is integrated into the smart device, such as... Figure 4 As shown, the flashing device 400 for smart devices includes:
[0134] The first acquisition unit 401 is used to acquire the current network supply entity ID in the flashing command;
[0135] The determining unit 402 is configured to determine the target network supply entity set to which the current network supply entity ID belongs from a plurality of preset first network supply entity sets based on the current network supply entity ID, wherein the first network supply entity set includes at least one network supply entity ID;
[0136] The second acquisition unit 403 is used to acquire a common image shared by each first network supply entity set and an entity set image of the target network supply entity set from the server.
[0137] The configuration loading unit 404 is used to load the network supply entity-specific configuration information corresponding to the current network supply entity ID from the general image and the entity set image.
[0138] Optionally, the determining unit 402 is configured to:
[0139] Obtain the MADA protocol to which the current network provider entity ID belongs;
[0140] The target network supply entity set to which the current network supply entity ID belongs is determined from multiple preset first network supply entity sets according to the MADA protocol to which the current network supply entity ID belongs. The MADA protocols to which the network supply entity ID belongs are different in different first network supply entity sets.
[0141] Optionally, the determining unit 402 is configured to:
[0142] Obtain the administrative region to which the current network supply entity ID belongs;
[0143] Based on the administrative region to which the current network supply entity ID belongs and the MADA protocol to which the current network supply entity ID belongs, the target network supply entity set to which the current network supply entity ID belongs is determined from multiple preset first network supply entity sets. The MADA protocol and administrative region to which the network supply entity ID belongs are different in different first network supply entity sets.
[0144] Optionally, the determining unit 402 is configured to:
[0145] Obtain the administrative region and MADA protocol to which each network provider entity ID belongs;
[0146] Based on the MADA protocol to which each network provider ID belongs and the administrative region to which each network provider ID belongs, multiple network provider IDs are divided into multiple second network provider sets;
[0147] Multiple sets of first network supply entities are determined based on multiple sets of second network supply entities.
[0148] Optionally, the determining unit 402 is configured to:
[0149] Determine whether the number of multiple sets of second network supply entities exceeds a preset number;
[0150] If the number of multiple second network supply entity sets exceeds the preset number, then the second network supply entity sets are sorted from largest to smallest according to the number of network supply entity IDs in each second network supply entity set;
[0151] The network supply entity IDs of multiple second network supply entity sets that are sorted after a preset number are assigned to second network supply entity sets that are sorted before and after the preset number, thus obtaining a first network supply entity set of the preset number.
[0152] To better implement the flashing method for smart devices in this application embodiment, based on the flashing method for smart devices, this application embodiment also provides a flashing device for smart devices, which is integrated into a server, such as... Figure 5 As shown, the flashing device 500 for smart devices includes:
[0153] The acquisition unit 501 is used to acquire user configuration information for each network provider entity ID;
[0154] The partitioning unit 502 is used to partition the user configuration information of each network supply entity ID into general configuration information shared by each first network supply entity set and network supply entity-specific configuration information corresponding to each network supply entity ID according to the first preset partitioning strategy.
[0155] The first compilation unit 503 is used to compile the common configuration information shared by each first network supply entity set into a common image shared by each first network supply entity set.
[0156] The second compilation unit 504 is used to compile the network supply entity-specific configuration information corresponding to each network supply entity ID into the entity set image corresponding to each first network supply entity set.
[0157] Optionally, the universal image includes an SSI image and a Preload image, and the first compilation unit 503 is used for:
[0158] According to the second preset partitioning strategy, the common configuration information shared by each first network supply entity set is divided into ROM common configuration information and project common configuration information.
[0159] Compile the ROM general configuration information into an SSI image;
[0160] Compile the project's general configuration information into a Preload image.
[0161] Optionally, the user configuration information includes at least one of the following: application list, power-on / off animation, wallpaper, desktop layout, ringtone, homepage, and bookmarks.
[0162] This application embodiment also provides a smart device that integrates the flashing device of any of the smart devices provided in this application embodiment. The smart device includes:
[0163] One or more processors;
[0164] Memory; and
[0165] One or more applications, wherein the applications are stored in memory and configured to be executed by a processor as steps of the flashing method for a smart device in any of the embodiments described above.
[0166] like Figure 6 As shown, it illustrates a structural schematic diagram of the smart device involved in the embodiments of this application, specifically:
[0167] The intelligent device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will understand that the intelligent device structure shown in the figures does not constitute a limitation on the intelligent device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0168] The processor 601 is the control center of the intelligent device. It connects various parts of the intelligent device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 602, and by calling data stored in the memory 602, thereby providing overall monitoring of the intelligent device. Optionally, the processor 601 may include one or more processing cores; the processor 601 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, physical interface, and application programs, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may not be integrated into the processor 601.
[0169] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the smart device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0170] The smart device also includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0171] The smart device may also include an input unit 604, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to physical settings and function control.
[0172] Although not shown, the smart device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the smart device loads the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 runs the applications stored in the memory 602 to realize various functions, as follows:
[0173] Obtain the current network provider entity ID from the flashing command; determine the target network provider entity set to which the current network provider entity ID belongs from multiple preset first network provider entity sets based on the current network provider entity ID, wherein the first network provider entity set includes at least one network provider entity ID; obtain the common image shared by each first network provider entity set and the entity set image of the target network provider entity set from the server; load the network provider entity-specific configuration information corresponding to the current network provider entity ID from the common image and the entity set image.
[0174] This application embodiment also provides a server that integrates the flashing device for any of the smart devices provided in this application embodiment. The server includes:
[0175] One or more processors;
[0176] Memory; and
[0177] One or more applications, wherein the applications are stored in memory and configured to be executed by a processor as steps of the flashing method for a smart device in any of the embodiments described above.
[0178] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0179] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the flashing methods for a smart device provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps:
[0180] Obtain the current network provider entity ID from the flashing command; determine the target network provider entity set to which the current network provider entity ID belongs from multiple preset first network provider entity sets based on the current network provider entity ID, wherein the first network provider entity set includes at least one network provider entity ID; obtain the common image shared by each first network provider entity set and the entity set image of the target network provider entity set from the server; load the network provider entity-specific configuration information corresponding to the current network provider entity ID from the common image and the entity set image.
[0181] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.
[0182] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.
[0183] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0184] The above provides a detailed description of a flashing method and apparatus for a smart device according to the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for flashing the firmware of a smart device, characterized in that, The flashing method for the smart device includes: Retrieve the current network provider ID from the flashing command; Obtain the administrative region and MADA protocol to which each network provider entity ID belongs; Based on the MADA protocol to which each network provider ID belongs and the administrative region to which each network provider ID belongs, multiple network provider IDs are divided into multiple second network provider sets; Multiple sets of first network supply entities are determined based on multiple sets of second network supply entities; Based on the current network supply entity ID, determine the target network supply entity set to which the current network supply entity ID belongs from a plurality of preset first network supply entity sets, wherein the first network supply entity set includes at least one network supply entity ID; Obtain from the server a common image shared by all first network supply entity sets and an entity set image of the target network supply entity set; Load the network supply entity-specific configuration information corresponding to the current network supply entity ID from the general image and the entity set image.
2. The flashing method for a smart device according to claim 1, characterized in that, The step of determining the target network supply entity set to which the current network supply entity ID belongs from a preset set of multiple first network supply entities based on the current network supply entity ID includes: Obtain the MADA protocol to which the current network provider entity ID belongs; The target network supply entity set to which the current network supply entity ID belongs is determined from multiple preset first network supply entity sets according to the MADA protocol to which the current network supply entity ID belongs. The MADA protocols to which the network supply entity ID belongs are different in different first network supply entity sets.
3. The flashing method for a smart device according to claim 2, characterized in that, The step of determining the target network provider set to which the current network provider ID belongs from a preset set of multiple first network provider sets according to the MADA protocol to which the current network provider ID belongs includes: Obtain the administrative region to which the current network supply entity ID belongs; Based on the administrative region to which the current network supply entity ID belongs and the MADA protocol to which the current network supply entity ID belongs, the target network supply entity set to which the current network supply entity ID belongs is determined from multiple preset first network supply entity sets. The MADA protocol and administrative region to which the network supply entity ID belongs are different in different first network supply entity sets.
4. The flashing method for a smart device according to claim 1, characterized in that, The step of determining multiple sets of first network supply entities based on multiple sets of second network supply entities includes: Determine whether the number of multiple sets of second network supply entities exceeds a preset number; If the number of multiple second network supply entity sets exceeds the preset number, then the second network supply entity sets are sorted from largest to smallest according to the number of network supply entity IDs in each second network supply entity set; The network supply entity IDs of multiple second network supply entity sets that are sorted after a preset number are assigned to second network supply entity sets that are sorted before and after the preset number, thus obtaining a first network supply entity set of the preset number.
5. A method for flashing the firmware of a smart device, characterized in that, include: Obtain user configuration information for each network provider entity ID; According to the first preset partitioning strategy, the user configuration information of each network supply entity ID is divided into general configuration information shared by each first network supply entity set and network supply entity-specific configuration information corresponding to each network supply entity ID; wherein, the first network supply entity set is determined by dividing multiple network supply entity IDs into multiple second network supply entity sets according to the MADA protocol to which each network supply entity ID belongs and the administrative region to which each network supply entity ID belongs, and the first network supply entity set is determined according to the multiple second network supply entity sets; The common configuration information shared by each set of first network supply entities is compiled into a common image shared by each set of first network supply entities; The network-specific configuration information corresponding to each network supply entity ID is compiled into the respective entity set image corresponding to each first network supply entity set.
6. The flashing method for a smart device according to claim 5, characterized in that, The universal image includes an SSI image and a Preload image. The process of compiling the common configuration information shared by each set of first network providers into a universal image shared by each set of first network providers includes: According to the second preset partitioning strategy, the common configuration information shared by each first network supply entity set is divided into ROM common configuration information and project common configuration information. Compile the ROM general configuration information into an SSI image; Compile the project's general configuration information into a Preload image.
7. The flashing method for a smart device according to claim 5, characterized in that, The user configuration information includes at least one of the following: application list, power-on / off animation, wallpaper, desktop layout, ringtone, homepage, and bookmarks.
8. A flashing device for a smart device, characterized in that, The flashing device for the smart device includes: The first acquisition unit is used to acquire the current network supply entity ID in the flashing command; The determining unit is used to obtain the administrative region and MADA protocol to which each network supply entity ID belongs; divide the multiple network supply entity IDs into multiple second network supply entity sets according to the MADA protocol to which each network supply entity ID belongs and the administrative region to which each network supply entity ID belongs; determine multiple first network supply entity sets according to the multiple second network supply entity sets; and determine the target network supply entity set to which the current network supply entity ID belongs from the multiple preset first network supply entity sets according to the current network supply entity ID, wherein the first network supply entity set includes at least one network supply entity ID; The second acquisition unit is used to acquire a common image shared by each first network supply entity set and an entity set image of the target network supply entity set from the server; The configuration loading unit is used to load the network supply entity-specific configuration information corresponding to the current network supply entity ID from the general image and the entity set image.
9. A flashing device for a smart device, characterized in that, The flashing device for the smart device includes: The acquisition unit is used to acquire user configuration information for each network provider entity ID; The partitioning unit is used to divide the user configuration information of each network supply entity ID into general configuration information shared by each first network supply entity set and network supply entity-specific configuration information corresponding to each network supply entity ID according to a first preset partitioning strategy; wherein, the first network supply entity set is determined by dividing multiple network supply entity IDs into multiple second network supply entity sets according to the MADA protocol to which each network supply entity ID belongs and the administrative region to which each network supply entity ID belongs, and the first network supply entity set is determined according to the multiple second network supply entity sets; The first compilation unit is used to compile the common configuration information shared by each set of first network supply entities into a common image shared by each set of first network supply entities. The second compilation unit is used to compile the network-specific configuration information corresponding to each network supply entity ID into the respective entity set image corresponding to each first network supply entity set.
10. A smart device, characterized in that, The intelligent device includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the flashing method of the smart device according to any one of claims 1 to 4.
11. A server, characterized in that, The server includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the flashing method of the smart device according to any one of claims 5 to 7.
12. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to execute the steps of the flashing method for the smart device according to any one of claims 1 to 4, or to execute the steps of the flashing method for the smart device according to any one of claims 5 to 7.
Citation Information
Patent Citations
BIOS + ME mirror image refreshing method, system and device and readable medium
CN111176666A