Parameter updating method and terminal device
By configuring the application framework layer, system runtime layer and cross-process access service interface on the terminal device, the parameter update of the local service module is realized, which solves the problem of low parameter update efficiency in the existing technology, improves the user experience and reduces the cost. cost.
Patent Information
- Application Number
- CN202310498797.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-05-05
AI Technical Summary
In the existing technology, when updating parameters, the local service module of the terminal device needs to rely on an upper-layer application or a third-party application as an intermediate agent, resulting in low efficiency of parameter update and failure to implement it in a timely manner, which affects the user experience.
By configuring the first interface at the application framework layer of the terminal device, the second interface at the system runtime layer, the cross-process access service, and the third interface at the hardware abstraction layer, the parameters of the local service module are updated and the system version upgrade is avoided. Dependency allows parameter updates without upper-layer applications or third-party applications.
It realizes timely parameter updates of local service modules, improves user experience, reduces manufacturers' R&D and backend maintenance costs, and reduces traffic consumption.
Smart Images

Figure CN117707562B
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a parameter updating method and a terminal device. Background Art
[0002] To facilitate later maintenance, some business modules of the application layer, application framework layer and system runtime layer on the terminal device will separate the parameters and variables that need to be changed from the basic code and manage them independently, so that when there are defects in the business or public opinion problems on the existing network, these parameters can be updated through remote services to quickly fix existing problems. Among them, when the local service module of the system runtime layer updates the parameters, the local service module needs to register the relevant information with the software update application first, and the software update application can request the update parameters corresponding to the local service module from the server according to the relevant information registered by the local service module. In addition, after the software update application completes the parameter update of the local service module, it is also necessary to notify the local service module of the parameter update results to implement the parameter update of the local service module.
[0003] At present, when the local service module updates parameters, it needs to rely on the upper-layer application or third-party application of the local service module to transmit the registration module related information and notify the parameter update results. However, for some local service modules that are not configured with upper-layer applications or third-party applications, the software update application cannot update their parameters and can only rely on the system version of the terminal device to synchronously update its parameters.
[0004] System version upgrades usually require a long testing cycle, and the release cycle of system upgrade packages is also long. For local service modules that need parameter updates, their parameter updates cannot be implemented in a timely manner, resulting in inefficient parameter updates of local service modules of terminal devices and poor user experience. Summary of the invention
[0005] The present application provides a parameter updating method and a terminal device, which configures a first interface at the application framework layer of the terminal device, a second interface and a cross-process access service at the system runtime layer, and a third interface at the hardware abstraction layer, so that the local service module on the terminal device can realize timely update of parameters, which is beneficial to timely optimization of the business corresponding to the local service module on the terminal device, thereby improving the user experience.
[0006] In a first aspect, the present application provides a parameter updating method, which is applied to a terminal device, and the method comprises: calling a first interface of an application framework layer through an application layer program to query configuration information of a local service module, wherein the local service module is arranged in a system runtime layer of the terminal device; calling a second interface of the system runtime layer through the first interface, accessing a database of the system runtime layer through the second interface to obtain the configuration information, wherein the second interface is a standard C / C++ interface; obtaining update parameters of the local service module from a first server through an application layer program based on the configuration information; and updating the local service module through the application layer program based on the update parameters. The service module updates parameters and obtains parameter update results, wherein the parameter update results include the module identifier of the local service module whose parameters have been updated; the first interface is called through the application layer program, and the third interface of the hardware abstraction layer is called through the first interface to access the cross-process access service, and the parameter update result is passed to the cross-process access service, and the cross-process access service is set in the system runtime library layer; based on the module identifier, the callback interface corresponding to the module identifier is queried through the cross-process access service, and the callback interface is set in the hardware abstraction layer; through the callback interface, the parameter update completion message is passed to the local service module corresponding to the callback interface.
[0007] In the embodiment of the present application, through the first interface provided in the terminal device application framework layer, the second interface in the system runtime layer, and the third interface in the cross-process access service and the hardware abstraction layer, it is possible to implement parameter updates for local service modules without upper-layer applications and third-party applications as intermediate proxy applications, so that these local service modules do not need to wait for a longer system upgrade cycle, and can perform parameter updates in a timely manner. At the same time, local service modules with upper-layer applications or third-party applications can also perform parameter updates according to the method provided in the present application, which is conducive to the unified maintenance and management of the parameter update process. The method provided in the present application is conducive to reducing the R&D and background maintenance costs of manufacturers. The local service module of the user terminal device can obtain parameter updates in a timely manner while consuming less traffic, which is conducive to improving the user experience.
[0008] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: calling the second interface through the local service module, and writing the configuration information of the local service module to the database of the system runtime layer through the second interface; setting a callback function through the second interface, and constructing a callback interface, and the callback interface is used to call the callback function; calling the third interface through the local service module, and adding the callback interface to the cross-process access service through the third interface.
[0009] In the embodiment of the present application, the local service module writes the configuration information of the local service module into the database of the system runtime layer through the second interface, and sets a callback function to pass the constructed callback interface to the cross-process access service, so that the application layer program can query and obtain the configuration information of the local service module by calling the first interface and then calling the second interface. The application layer program can also obtain the update parameters of the local service module from the first server based on the configuration information, and after completing the parameter update of the local service module, the application layer program generally uses the first interface to call the third interface again through the callback interface in the cross-process access service to pass the parameter update completion message to the local service module. Through the method provided by the present application, regardless of whether the local service module has an upper-layer application or a third-party application as an intermediate proxy application, its parameter update can be achieved, which is conducive to timely optimization of the user's terminal device and improving the user experience.
[0010] In combination with the first aspect, in certain implementations of the first aspect, the configuration information includes at least one of the following: a module identifier of the local service module; a sub-module identifier of the local service module; a version identifier of the current parameters of the local service module; an effectiveness mode of the updated parameters, the effectiveness mode being restart effectiveness or non-restart effectiveness; a delayed restart time of the terminal device; an installation path of the parameter package of the updated parameters; or a system version identifier with which the updated parameters are compatible.
[0011] In a possible implementation, the above configuration information may also include a relative path for updating parameter storage, which is not specifically limited in this application.
[0012] In combination with the first aspect, in some implementations of the first aspect, the factory configuration of the terminal device includes the first interface, the second interface, the third interface, and the cross-process access service.
[0013] In an embodiment of the present application, for terminal devices that have not yet left the factory, the first interface, the second interface, the third interface and the cross-process access service can be configured for them on the production line, so that the user can update the parameters of the local service module through the parameter update method provided in the present application when turning on the terminal device.
[0014] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: based on the system configuration information of the terminal device, obtaining system upgrade data from the second server through the application layer program, the system upgrade data including the first interface, the second interface, the third interface and the code of the cross-process access service; based on the system upgrade data, performing a system upgrade on the terminal device through the application layer program.
[0015] In combination with the first aspect, in certain implementations of the first aspect, the system configuration information includes at least one of the following: an identifier of the terminal device; an identifier of a current system version of the terminal device; or an installation path of a data packet of the system upgrade data.
[0016] It should be understood that the first server in the example of this application refers to a cloud-side server that stores update parameters, and the second server is a cloud-side server that stores system upgrade data. The first server and the second server may be the same or different, and this application does not make any specific limitations on this.
[0017] It should also be understood that the application layer program queries (searches packages) on the second server based on the system configuration information of the terminal device. If the second server has system upgrade data available to the terminal device (generally higher than the current system version), the system upgrade data is obtained.
[0018] In an embodiment of the present application, for terminal devices that have been put into use, the first interface, the second interface, the third interface and the cross-process access service can be configured for them in a way that the system can be upgraded, so that the local service module of the terminal device can perform parameter updates in a timely manner according to the parameter update method provided by the present application, which is conducive to improving the user experience of existing users.
[0019] In combination with the first aspect, in certain implementations of the first aspect, calling the third interface of the hardware abstraction layer through the first interface to access the cross-process access service includes: the first interface calls the third interface of the hardware abstraction layer to access the cross-process access service through inter-process communication at the kernel layer.
[0020] In combination with the first aspect, in certain implementations of the first aspect, the parameter update completion message is passed to the local service module corresponding to the callback interface through the callback interface, including: based on inter-process communication at the kernel layer, the parameter update completion message is passed to the local service module corresponding to the callback interface through the callback interface.
[0021] It should be understood that the local service module process and the application layer program process belong to different processes and need to establish a communication connection through cross-process access services to achieve inter-process communication.
[0022] Optionally, the inter-process communication may be IPC communication of Binder, which is implemented based on a Binder (IPC) driver of the Linux kernel layer.
[0023] In combination with the first aspect, in some implementations of the first aspect, the first interface is a Java native method interface JNI.
[0024] It should be understood that Java and C / C++ can call each other through the Java native interface (JNI).
[0025] In an embodiment of the present application, the application layer program can access the database of the system runtime layer through JNI calling the standard C / C++ interface (that is, the second interface) of the system runtime layer to obtain the configuration information written by the local service module. It can also call the cross-process access service of the third interface of the hardware abstraction layer through JNI to pass the parameter update results to the local service module through inter-process communication, thereby completing the parameter update of the local service module in a timely manner.
[0026] In combination with the first aspect, in some implementations of the first aspect, the cross-process access service is a stable Android interface definition language Stable AIDL service, and the third interface is a Stable AIDL service interface.
[0027] It should be understood that the stable Android interface definition language Stable (AIDL) service is a way of cross-process communication. It can be used to define the programming interface for inter-process communication (IPC) between the client and the server. The third interface is the Stable AIDL service interface, which has the ability to pass messages across processes and partitions.
[0028] In combination with the first aspect, in certain implementations of the first aspect, the first interface, the second interface, the third interface, and the cross-process access service are defined through a cloud parameter programming framework.
[0029] It should be understood that the cloud-based parameter programming framework here is a program code written based on the programming framework that can be used to update the updated parameters in the cloud-side server to the terminal device. Optionally, the programming framework can be a Kit, and the cloud-based parameter programming framework is the cloud-based parameter Kit. The embodiment of the present application does not specifically limit the programming framework when writing this program code.
[0030] In an embodiment of the present application, the first interface, the second interface, the third interface and the cross-process access service are defined through a cloud parameter programming framework, so that the local service module of the terminal device can update parameters in a timely manner without relying on upper-level applications or third-party applications, which is conducive to improving user experience.
[0031] In a second aspect, the present application provides a terminal device, which is used to execute the method in any possible implementation of the first aspect. Specifically, the terminal device includes a transceiver module and a processing module.
[0032] The processing module is used to call the first interface of the application framework layer through the application layer program to query the configuration information of the local service module, and the local service module is arranged in the system runtime layer of the terminal device; call the second interface of the system runtime layer through the first interface, access the database of the system runtime layer through the second interface, and obtain the configuration information, and the second interface is a standard C / C++ interface; the transceiver module is used to obtain the update parameters of the local service module from the first server through the application layer program based on the configuration information; the processing module is also used to perform update of the local service module through the application layer program based on the update parameters. Perform parameter update to obtain parameter update results, wherein the parameter update results include the module identifier of the local service module of the updated parameters; call the first interface through the application layer program, call the third interface of the hardware abstraction layer through the first interface to access the cross-process access service, and pass the parameter update result to the cross-process access service, wherein the cross-process access service is located in the system runtime layer; based on the module identifier, query the callback interface corresponding to the module identifier through the cross-process access service, wherein the callback interface is located in the hardware abstraction layer; and pass the parameter update completion message to the local service module corresponding to the callback interface through the callback interface.
[0033] In combination with the second aspect, in certain implementations of the second aspect, the processing module is also used to call the second interface through the local service module, and write the configuration information of the local service module to the database of the system runtime layer through the second interface; set the callback function through the second interface, and construct a callback interface, and the callback interface is used to call the callback function; and call the third interface through the local service module, and add the callback interface to the cross-process access service through the third interface.
[0034] In combination with the second aspect, in certain implementations of the second aspect, the configuration information includes at least one of the following: a module identifier of the local service module; a sub-module identifier of the local service module; a version identifier of the current parameters of the local service module; an effectiveness mode of the updated parameters, the effectiveness mode being restart effectiveness or non-restart effectiveness; a delayed restart time of the terminal device; an installation path of the parameter package of the updated parameters; or a system version identifier with which the updated parameters are compatible.
[0035] In combination with the second aspect, in some implementations of the second aspect, the factory configuration of the terminal device includes the first interface, the second interface, the third interface, and the cross-process access service.
[0036] In combination with the second aspect, in certain implementations of the second aspect, the transceiver module is also used to obtain system upgrade data from the second server through the application layer program based on the system configuration information of the terminal device, and the system upgrade data includes the first interface, the second interface, the third interface and the code of the cross-process access service; the processing module is also used to perform a system upgrade on the terminal device through the application layer program based on the system upgrade data.
[0037] In combination with the second aspect, in certain implementations of the second aspect, the system configuration information includes at least one of the following: an identifier of the terminal device; an identifier of a current system version of the terminal device; or an installation path of a data packet of the system upgrade data.
[0038] In combination with the second aspect, in some implementations of the second aspect, the processing module is also used to call the third interface of the hardware abstraction layer through the first interface, and access the cross-process access service through inter-process communication of the kernel layer.
[0039] In combination with the second aspect, in some implementations of the second aspect, the processing module is also used to transmit the parameter update completion message to the local service module corresponding to the callback interface through the callback interface based on inter-process communication at the kernel layer.
[0040] In combination with the second aspect, in some implementations of the second aspect, the first interface is a Java native method interface JNI.
[0041] In combination with the second aspect, in some implementations of the second aspect, the cross-process access service is a stable Android interface definition language Stable AIDL service, and the third interface is a Stable AIDL service interface.
[0042] In combination with the second aspect, in certain implementations of the second aspect, the first interface, the second interface, the third interface, and the cross-process access service are defined through a cloud parameter programming framework.
[0043] Optionally, the modules corresponding to the methods / operations / steps / actions described in the first aspect executed by the terminal device may be hardware circuits, software, or a combination of hardware circuits and software.
[0044] In a third aspect, the present application provides a terminal device, comprising: a processor and a memory, wherein the processor is used to read instructions stored in the memory to execute a method in any possible implementation of the first aspect above.
[0045] Optionally, there are one or more processors and one or more memories.
[0046] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0047] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.
[0048] The terminal device in the third aspect mentioned above can be a chip, and the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[0049] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program (also referred to as code, or instructions) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect described above.
[0050] In a fifth aspect, the present application provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0052] Figure 2 A schematic block diagram of the software structure of a terminal device provided in an embodiment of the present application;
[0053] Figure 3 It is a schematic diagram of a parameter updating method in the prior art;
[0054] Figure 4 An exemplary flow chart of a parameter updating method provided in an embodiment of the present application;
[0055] Figure 5 An exemplary flow chart of another parameter updating method provided in an embodiment of the present application;
[0056] Figure 6An exemplary flow chart of another parameter updating method provided in an embodiment of the present application;
[0057] Figure 7 An exemplary flow chart of another parameter updating method provided in an embodiment of the present application;
[0058] Figure 8 An exemplary flow chart of another parameter updating method provided in an embodiment of the present application;
[0059] Fig. 9 A schematic structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0061] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0062] It should be noted that in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" 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 "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0063] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" 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, a--c, bc, or abc, where a, b, c can be single or multiple.
[0064] In order to better understand the embodiments of the present application, the terminal device involved in the embodiments of the present application is introduced below.
[0065] Figure 1A schematic diagram of the structure of a terminal device 100 provided in an embodiment of the present application.
[0066] The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0067] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 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.
[0068] The processor 110 may include one or more processing units, for example, the processor 110 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.
[0069] 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.
[0070] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0071] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0072] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.
[0073] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0074] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0075] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0076] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
[0077] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0078] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.
[0079] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0080] The charging management module 140 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 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device through the power management module 141.
[0081] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0082] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0083] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of 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.
[0084] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves 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 150 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 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0085] 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 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0086] The wireless communication module 160 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 terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0087] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 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. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0088] The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0089] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0090] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0091] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0092] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0093] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0094] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0095] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0096] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0097] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 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 terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 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 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0098] The terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0099] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0100] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0101] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.
[0102] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.
[0103] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0104] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0105] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0106] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0107] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
[0108] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and applied to applications such as horizontal and vertical screen switching and pedometers.
[0109] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0110] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.
[0111] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.
[0112] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0113] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0114] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.
[0115] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0116] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.
[0117] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0118] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0119] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
[0120] The software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes the Android system of the layered architecture as an example to exemplify the software structure of the terminal device 100.
[0121] Figure 2 A schematic block diagram of the software structure of the terminal device 100 provided in an embodiment of the present application.
[0122] The layered architecture divides the software into several layers, each with 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: application layer, application framework layer, system runtime layer, hardware abstraction layer (HAL) and Linux kernel layer.
[0123] The application layer may include a series of application packages.
[0124] like Figure 2 As shown, the application package may include software update, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0125] In a possible implementation, the software update application is used to perform a system upgrade on the terminal device, or to perform a parameter update on an underlying module in the terminal device.
[0126] The application framework layer provides an application programming interface (API) and a programming framework for the application programs in the application layer. The application framework layer includes some predefined functions.
[0127] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a service manager, and the like.
[0128] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0129] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0130] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0131] The phone manager is used to provide communication functions of the terminal device 100, such as management of call status (including connection, disconnection, etc.).
[0132] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0133] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc.
[0134] In some possible implementations of the embodiments of the present application, the application framework layer also includes a first interface for implementing mutual calls between Java and C / C++.
[0135] The system runtime layer (Native) is divided into two parts: C / C++ program library and Android runtime library.
[0136] The Android runtime library includes the core library and the virtual machine. The Android runtime library is responsible for the scheduling and management of the Android system.
[0137] 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.
[0138] The application layer and the application framework layer run in the 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.
[0139] The C / C++ library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0140] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0141] 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: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0142] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0143] A 2D graphics engine is a drawing engine for 2D drawings.
[0144] The local service module involved in the embodiment of the present application is a module of a C / C++ program library. In some possible implementations of the embodiment of the present application, the system runtime layer also includes a second interface (standard C / C++) interface.
[0145] The HAL layer is an interface layer between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. In order to protect the intellectual property rights of hardware manufacturers, it hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms. From the perspective of software and hardware testing, the testing of software and hardware can be completed based on the hardware abstraction layer, making it possible to conduct software and hardware testing in parallel. In layman's terms, the actions to control the hardware are placed in the hardware abstraction layer.
[0146] The HAL layer mainly includes driver codes for GPS, Wi-Fi, Audio, Camera, etc. In the embodiment of the present application, the HAL layer also includes code for accessing the third interface of the cross-process access service, and code for the callback interface of the callback function for receiving the parameter update result.
[0147] The Linux kernel layer is the layer between hardware and software. The Linux kernel layer contains at least display driver, camera driver, audio driver, sensor driver, and inter-process communication Binder (IPC) driver.
[0148] The following is an illustrative description of the software and hardware workflow of the terminal device 100 in conjunction with the capture and photo shooting scene.
[0149] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into raw input events (including touch coordinates, timestamp of the touch operation, and other information). The raw input events are stored in the Linux kernel layer. The application framework layer obtains the raw input events from the Linux kernel layer and identifies the controls corresponding to the input events. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the Linux kernel layer to capture static images or videos through the camera 193.
[0150] To facilitate subsequent maintenance, some business modules at the application layer, application framework layer, and system runtime layer on the terminal device will separate the parameters and variables that need to be changed from the basic code and manage them independently, so that when defects occur in the business or public opinion problems on the existing network, these parameters can be updated through remote services to quickly repair existing problems.
[0151] Among them, when the local service module of the system runtime layer is updating parameters, the local service module needs to register relevant information with the software update application first. The software update application can then request the update parameters corresponding to the local service module from the server based on the relevant information registered by the local service module. In addition, after the software update application completes the parameter update of the local service module, it is also necessary to notify the local service module of the parameter update result to implement the parameter update of the local service module.
[0152] Currently, the software update application only provides the ability for the Android installation package (APK) application to access parameter updates. The APK application can directly register its own relevant information with the software update application, and the software update application will search for packages from the server based on the relevant information of the APK application, and update the parameters of the corresponding APK application after obtaining the update parameters. After the update is complete, the software update application can also directly notify the APK application of the parameter update results. However, if the parameter update of the local service module is to be implemented, the local service module needs to rely on the upper-level application or a third-party application to register the relevant information of the local service module to the software update application. The software update application can search for packages from the server based on the relevant information registered by the local service module, and update the parameters of the corresponding local service module after obtaining the update parameters. After the update is complete, the software update application also needs to notify the local service module of the parameter update results through the upper-level application or a third-party application of the local service module (such as Figure 3 However, for some local service modules that are not configured with upper-layer applications or third-party applications, Figure 3 The parameter update method shown can only rely on the synchronization of the terminal device's parameters when the system version is upgraded. However, the system version upgrade usually requires a long test cycle, and the release cycle of the system upgrade package is also long. For the local service module that needs to update its parameters, its parameter update cannot be realized in time, and the local service module parameter update efficiency of the terminal device is low, and the user experience is poor.
[0153] In view of this, an embodiment of the present application provides a parameter updating method and a terminal device, which realizes timely updating of local service module parameters on the terminal device by configuring a first interface at the application framework layer of the terminal device, configuring a second interface and cross-process access service at the system runtime layer, and configuring a third interface at the hardware abstraction layer, thereby improving user experience.
[0154] 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.
[0155] Figure 4 The following is an exemplary flow chart of a parameter updating method 400 provided in an embodiment of the present application. The method 400 can be applied to a terminal device. The hardware structure of the terminal device can be as follows: Figure 1 As shown, the software structure of the terminal device can be as follows Figure 2 However, this embodiment of the present application does not limit this. Figure 4 The method 400 may specifically include the following steps:
[0156] S401. Calling a first interface of an application framework layer through an application layer program to query configuration information of a local service module, where the local service module is located in a system runtime layer of a terminal device.
[0157] S402, calling the second interface of the system runtime layer through the first interface, accessing the database of the system runtime layer through the second interface, and obtaining configuration information, wherein the second interface is a standard C / C++ interface.
[0158] S403: Based on the configuration information, obtain update parameters of the local service module from the first server through an application layer program.
[0159] S404: Based on the updated parameters, update the parameters of the local service module through the application layer program to obtain a parameter update result, where the parameter update result includes a module identifier of the local service module with updated parameters.
[0160] S405, calling the first interface through the application layer program, calling the third interface of the hardware abstraction layer through the first interface to access the cross-process access service, passing the parameter update result to the cross-process access service, and the cross-process access service is set in the system runtime layer.
[0161] S406 , based on the module identifier, query the callback interface corresponding to the module identifier through the cross-process access service, and the callback interface is set in the hardware abstraction layer.
[0162] S407: passing the parameter update completion message to the local service module corresponding to the callback interface through the callback interface.
[0163] It should be understood that the above-mentioned application layer program is an application layer set in the software architecture layer of the terminal device, and is an application program that can perform parameter updates or system updates for the terminal device. Optionally, the application layer program can be a software update application, which is not specifically limited in this application. In a specific implementation, the user can find the software update application through the "Settings" application on the display interface of the terminal device, click: Settings -> System and Updates -> Software Update.
[0164] In a possible implementation manner, the application layer program is configured to query the first server at every preset time interval whether there are updated parameters of the local service module, and if so, obtain the updated parameters.
[0165] In another possible implementation, the user can actively click "Check Update" corresponding to the application layer program on the terminal device to trigger the application layer program to query whether there is an update parameter of the local service module, and if so, obtain the update parameter.
[0166] In yet another possible implementation, the application layer program obtains update parameters of the local service module from the first server based on the upgrade notification received from the application server.
[0167] It should also be understood that if the application layer program obtains update parameters of multiple local service modules from the first server and updates the parameters of multiple local service modules, the above-mentioned parameter update results may include the module identifiers of the local service modules with multiple updated parameters. When the callback interface corresponding to the module identifier is queried in the cross-process access service, the parameter update completion message is passed to the local service module corresponding to the callback interface. At this time, the parameter update completion message may include information on the success / failure of the local service module update, but does not include the package module identifier; if the application layer program obtains update parameters of a local service module from the first server, the above-mentioned parameter update results only include the module identifier of the local service module with the updated parameters. At this time, the parameter update completion message may be the same as the information contained in the parameter update result.
[0168] Optionally, the parameter update result may also include the submodule identifier of the local service module of the updated parameter, the relative path of the updated parameter storage, and the information of success / failure of the update. This application does not specifically limit the information contained in the parameter update result.
[0169] In the embodiment of the present application, through the first interface provided in the application framework layer of the terminal device, the second interface in the system runtime layer, and the third interface in the cross-process access service and the hardware abstraction layer, the parameter update of the local service module without the upper-layer application and the third-party application as the intermediate proxy application can be realized, so that these local service modules do not need to wait for the system upgrade with a longer period, and the parameters can be updated in time. At the same time, the local service module with the upper-layer application or the third-party application can also be updated according to the method provided in the present application, which is conducive to the unified maintenance and management of the parameter update process. The method provided in the present application enables the local service module on the terminal device to update the parameters in time, which is conducive to improving the user experience. Compared with the parameter update of the local service module through the system upgrade, the parameter update method provided in the present application updates less data, which is conducive to reducing the manufacturer's R&D and background maintenance costs, and also helps to reduce the user's traffic consumption.
[0170] As an optional embodiment, in the above S405, a possible implementation method of accessing the cross-process access service by calling the third interface of the hardware abstraction layer through the first interface includes: the first interface calls the third interface of the hardware abstraction layer, and accesses the cross-process access service through inter-process communication of the kernel layer.
[0171] As an optional embodiment, a possible implementation of the above S407 includes: based on the inter-process communication of the kernel layer, passing the parameter update completion message to the local service module corresponding to the callback interface through the callback interface.
[0172] It should be understood that the local service module process and the application layer program process belong to different processes and need to establish a communication connection through cross-process access services to achieve inter-process communication.
[0173] Optionally, the inter-process communication may be IPC communication of Binder, which is implemented based on a Binder (IPC) driver of the Linux kernel layer.
[0174] Figure 5 The following is an exemplary flow chart of a parameter updating method 500 provided in an embodiment of the present application. The method 500 can be applied to a terminal device. The hardware structure of the terminal device can be as follows: Figure 1 As shown, the software structure of the terminal device can be as follows Figure 2 However, this embodiment of the present application does not limit this. Figure 5 Before the above S401, the method further includes the following steps:
[0175] S501. Calling a second interface through a local service module, and writing configuration information of the local service module into a database of a system runtime layer through the second interface.
[0176] S502: Set a callback function through the second interface and construct a callback interface, where the callback interface is used to call the callback function.
[0177] S503: Call the third interface through the local service module, and add the callback interface to the cross-process access service through the third interface.
[0178] It should be understood that the local service module can be a business module of the system runtime layer (also called the Native layer). In the partition of the terminal device system, the local service module can be a module of the system partition, a module of the vendor partition, or a module of other partitions, and this application does not make specific limitations on this.
[0179] It should also be understood that the second interface is a standard C / C++ interface, so the local service module can call the second interface to write the configuration information required by the application layer program to obtain the update parameters from the first server into the database of the system runtime layer. Optionally, the database can be set in a Linux file system, which is not specifically limited in this application.
[0180] It is worth noting that after the application layer program completes the parameter update of the local service module, it needs to notify the local service module of the parameter update result so that the local service module can search and obtain the updated parameters and execute the business process according to the updated parameters. Therefore, while the local service module calls the second interface to write the configuration information of the local service module to the database of the system runtime layer, it sets a callback function for receiving the parameter update result in the second interface, constructs a callback interface of the callback function, and then calls the third interface, and adds the callback interface to the cross-process access service through the third interface, so that the application program can pass the parameter update result to the local service module through the callback interface in the cross-process access service.
[0181] In a possible implementation, each time the terminal device is powered on and initialized, the local service module may be automatically started to execute the above S501 to S503, so that the application layer program can update the parameters of the local service module in a timely manner.
[0182] In the embodiment of the present application, the local service module writes the configuration information of the local service module into the database of the system runtime layer through the second interface, and sets a callback function to pass the constructed callback interface to the cross-process access service, so that the application layer program can query and obtain the configuration information of the local service module by calling the first interface and then calling the second interface. The application layer program can also obtain the update parameters of the local service module from the first server based on the configuration information, and after completing the parameter update of the local service module, the application layer program generally uses the first interface to call the third interface again through the callback interface in the cross-process access service to pass the parameter update completion message to the local service module. Through the method provided by the present application, regardless of whether the local service module has an upper-layer application or a third-party application as an intermediate proxy application, its parameter update can be achieved, which is conducive to timely optimization of the user's terminal device and improving the user experience.
[0183] As an optional embodiment, the configuration information includes at least one of the following: a module identifier of the local service module; a sub-module identifier of the local service module; a version identifier of the current parameters of the local service module; a method for updating the parameters to take effect, which may be restart or non-restart; a delayed restart time of the terminal device; an installation path of a parameter package of the updated parameters; or a system version identifier with which the updated parameters are compatible.
[0184] It should be understood that if a sub-module of the local service module executes the above-mentioned registration process S501 to S503, the configuration information of the sub-module of the local service module should at least include the module identifier of the local service module and the sub-module identifier of the local service module; if the local service module executes the above-mentioned registration process S501 to S503, the configuration information of the local service module may not include the sub-module identifier of the local service module.
[0185] It should also be understood that the effectiveness mode of the updated parameters includes restart effectiveness or non-restart effectiveness. When the effectiveness mode of the updated parameters in the configuration information is restart effectiveness, the configuration information should also include the delayed restart time of the terminal device.
[0186] In a possible implementation, the above configuration information may also include a relative path for updating parameter storage, which is not specifically limited in this application.
[0187] As an optional embodiment, the factory configuration of the terminal device includes a first interface, a second interface, a third interface, and a cross-process access service.
[0188] In an embodiment of the present application, for terminal devices that have not yet left the factory, the first interface, the second interface, the third interface and the cross-process access service can be configured for them on the production line, so that the user can update the parameters of the local service module through the parameter update method provided in the present application when turning on the terminal device.
[0189] As an optional embodiment, another possible implementation method of configuring the first interface, the second interface, the third interface and the cross-process access service of the terminal device includes: based on the system configuration information of the terminal device, obtaining system upgrade data from the second server through the application layer program, the system upgrade data including the first interface, the second interface, the third interface and the code of the cross-process access service; based on the system upgrade data, performing a system upgrade on the terminal device through the application layer program.
[0190] In a possible implementation, the system configuration information includes at least one of the following: an identifier of the terminal device; an identifier of a current system version of the terminal device; or an installation path of a data packet of system upgrade data.
[0191] It should be understood that the first server in the example of this application refers to a cloud-side server that stores update parameters, and the second server is a cloud-side server that stores system upgrade data. The first server and the second server may be the same or different, and this application does not make any specific limitations on this.
[0192] It should also be understood that the application layer program queries (searches packages) on the second server based on the system configuration information of the terminal device, and if the second server has system upgrade data available to the terminal device (generally higher than the current system version), the system upgrade data is obtained. In this embodiment, the system upgrade data includes the first interface, the second interface, the third interface, and the code for cross-process access services.
[0193] Optionally, when the application layer program performs a system upgrade on the terminal device and updates the parameters of the local service module of the terminal device, both can be achieved through over-the-air technology (OTA), but this application does not make specific limitations on this.
[0194] In an embodiment of the present application, for terminal devices that have been put into use, the first interface, the second interface, the third interface and the cross-process access service can be configured for them in a way that the system can be upgraded, so that the local service module of the terminal device can perform parameter updates in a timely manner according to the parameter update method provided by the present application, which is conducive to improving the user experience of existing users.
[0195] As an optional embodiment, the first interface is a Java native method interface JNI.
[0196] It should be understood that Java and C / C++ can call each other through the Java native interface (JNI).
[0197] In an embodiment of the present application, the application layer program can access the database of the system runtime layer through JNI calling the standard C / C++ interface (that is, the second interface) of the system runtime layer to obtain the configuration information written by the local service module. It can also call the cross-process access service of the third interface of the hardware abstraction layer through JNI to pass the parameter update results to the local service module through inter-process communication, thereby completing the parameter update of the local service module in a timely manner.
[0198] As an optional embodiment, the cross-process access service is a stable Android interface definition language StableAIDL service, and the third interface is a Stable AIDL service interface.
[0199] It should be understood that the stable Android interface definition language Stable (AIDL) service is a way of cross-process communication. It can be used to define the programming interface for inter-process communication (IPC) between the client and the server. The third interface is the Stable AIDL service interface, which has the ability to pass messages across processes and partitions.
[0200] As an optional embodiment, the first interface, the second interface, the third interface and the cross-process access service are defined through a cloud parameter programming framework.
[0201] It should be understood that the cloud-based parameter programming framework here is a program code written based on the programming framework that can be used to update the updated parameters in the cloud-side server to the terminal device. Optionally, the programming framework can be a Kit, and the cloud-based parameter programming framework is the cloud-based parameter Kit. The embodiment of the present application does not specifically limit the programming framework when writing this program code.
[0202] In an embodiment of the present application, the first interface, the second interface, the third interface and the cross-process access service are defined through a cloud parameter programming framework, so that the local service module of the terminal device can update parameters in a timely manner without relying on upper-level applications or third-party applications, which is conducive to improving user experience.
[0203] In one possible implementation, the first interface may be JNI, the second interface may be a standard C / C++ interface, the cross-process access service may be a Stable AIDL service, and the third interface may be a Stable AIDL service interface, which may be defined by the above-mentioned cloud parameter Kit.
[0204] In the specific implementation, the JNI provided by the cloud parameter kit can be encapsulated in libcloudcfgkit_jni.so after compilation, and installed in the terminal device system / system / lib, / system / lib64 directory after packaging, to provide an interface for the platform signature application HnOUC.apk in the System partition. The JNI interface is defined to notify the parameter update results and pass the configuration information of the local service module.
[0205] The standard c / c++ interface provided by the cloud parameter kit to the local service module can be encapsulated in libcloudcfgkit.so after compilation, and installed in the terminal device system / system / lib, / system / lib64, / vendor / lib, / vendor / lib64 directories after packaging. The local service modules of the system partition and the vendor partition can directly reference this libcloudcfgkit.so and call the standard c / c++ interface. Optionally, the name of the standard c / c++ interface can be set_cloud_cfg_module_info, which is not specifically limited in this application. In addition to the above-mentioned configuration information, the interface definition also includes a callback function callback that receives the parameter update result, and constructs a callback interface callback interface of the callback function.
[0206] The Cloud Parameter Kit registers the Stable AIDL server process in the Service Manager, which allows the local service module to add a callback interface for the callback function that receives the parameter update result to this service while registering the configuration information. When the application layer program completes the parameter update of the local service module, it can also pass the parameter update result to this service. This service searches for the callback interface that has been added to the module corresponding to the parameter update result, and passes the parameter update completion message to the corresponding local service module through the callback interface. After compiling this server process, the vendor.honor.hardware.cloudcfgkit-service binary file is generated and packaged and installed in the mobile phone system / vendor / bin / hw directory, generating the vendor.honor.hardware.cloudcfgkit-service.rc file (used to start
[0207] vendor.honor.hardware.cloudcfgkit-service service configuration file) is packaged and installed in the terminal device system / vendor / etc / init directory.
[0208] The cloud parameter kit also defines a Stable AIDL service interface for accessing the Stable AIDL service. After compilation, the StableAIDL service interface can be encapsulated in the vendor.honor.hardware.cloudcfgkit-V1-ndk.so library, packaged and installed in the terminal device system / system / lib, / system / lib64, / vendor / lib, / vendor / lib64 directories, providing a Stable AIDL service interface for libcloudcfgkit.so in the System and Vendor partitions. The StableAIDL service interface is defined to receive parameter update notifications, pass the callback interface of the callback function that receives the parameter update results, and cancel the callback interface.
[0209] Below, in combination with the software architecture diagram of the terminal device, the first interface is JNI, the second interface is the standard C / C++ interface, the cross-process access service is the Stable AIDL service, the third interface is the Stable AIDL service interface, and the above-mentioned cloud parameter Kit definition is taken as an example, and the application layer program is a software update application as an example, the above-mentioned parameter update method is explained in detail.
[0210] Figure 6 An exemplary flow chart of a parameter updating method 600 provided in an embodiment of the present application can be applied to a terminal device. The hardware structure of the terminal device can be as follows: Figure 1 As shown, the software structure of the terminal device can be as follows Figure 2 As shown, but this embodiment of the present application is not limited to this. The method 600 includes the following steps:
[0211] S601. The local service module calls the standard C / C++ interface to write the configuration information of the local service module to the database of the cloud parameter Kit. At the same time, a callback function for receiving parameter update results is set, and a callback interface for calling back the callback function is constructed.
[0212] It should be understood that the system operation layer includes the local service module of the System partition, the local service module of the Vendor partition, and the local service modules of other partitions, which is not limited in this application. If the system operation layer includes local service modules of multiple partitions, the cloud parameter Kit sets corresponding standard C / C++ interfaces in multiple partitions to realize the registration of local service modules of each partition.
[0213] Optionally, the local service module may be a near field communication (NFC) radio frequency module.
[0214] After the terminal device is powered on, the local service module calls the standard C / C++ interface, which starts the registration process of the local service module.
[0215] S602. The local service module calls the Stable AIDL service interface and adds the callback interface to the Stable AIDL service.
[0216] It should be understood that the local service module calls the standard C / C++ interface, and the local service module process runs in the cloud parameter Kit. Thereafter, the local service module process calls the Stable AIDL service interface as a client, and adds the callback interface to the server process of the Stable AIDL service through the Stable AIDL service interface. The inter-process communication from the local service module process to the Stable AIDL service process is implemented based on the Binder (IPC) driver of the Linux kernel layer.
[0217] Optionally, the number of Binder (IPC) drivers at the Linux kernel layer may be one or more, which is not specifically limited in this application.
[0218] At this point, the local service module has completed registration and is ready for parameter update.
[0219] S603: The software update application of the application layer calls JNI.
[0220] S604. In JNI, JNI calls a standard C / C++ interface to query and obtain the configuration information of the local service module from the cloud parameter Kit database.
[0221] S605: The software update application obtains update parameters of the local service module from the first server based on the configuration information, completes parameter update of the local service module, and obtains parameter update results.
[0222] It should be understood that the software update application completing the parameter update of the local service module should include: downloading the update parameters and installing the parameter package of the update parameters.
[0223] In an embodiment of the present application, the configuration information of the local service module can be uniformly managed by the cloud parameter Kit to facilitate subsequent maintenance. Regardless of whether the local service module has an upper-layer application or a third-party application as an intermediate agent, the configuration information can be registered through the cloud parameter Kit, so that the local service module can update parameters in a timely manner.
[0224] Figure 7 An exemplary flow chart of a parameter updating method 700 provided in an embodiment of the present application, based on the above method 600, the method 700 includes the following steps:
[0225] S701. The software update application calls JNI.
[0226] S702. In JNI, JNI calls the Stable AIDL service interface and passes the parameter update result to the Stable AIDL service.
[0227] It should be understood that the software update application is an independent process. The software update application process, as a client, calls the Stable AIDL service interface and transmits the parameter update result to the Stable AIDL service process through Binder (IPC) communication.
[0228] S703. The Stable AIDL service queries the callback interface corresponding to the module identifier carried in the parameter update result, calls the callback interface, and passes the parameter update result to the implementation object of the callback interface.
[0229] It should be understood that multiple local service modules can add multiple callback interfaces to the Stable AIDL service, and the multiple callback interfaces can be queried according to the module identifiers of their corresponding local service modules.
[0230] In this embodiment, the server process of the Stable AIDL service transmits the parameter update result to the client process of the local service module through Binder (IPC) communication.
[0231] S704: The local service module calls back a parameter update completion message.
[0232] It should be understood that after receiving the Binder (IPC) message, the callback interface implementation object in the client process of the local service module calls back the parameter update completion message to the local service module, so that the local service module runs based on the updated parameters.
[0233] In the embodiment of the present application, the cloud parameter Kit provides a Stable AIDL service, which transmits inter-process messages through Binder (IPC) communication, so that the local service module can access parameter updates through the standard C / C++ interface and receive notifications of parameter update results in a timely manner.
[0234] For example, in the above Figure 6 and Figure 7 On the basis of, when the local service module is an NFC radio frequency module, the exemplary flow chart of the parameter updating method 800 provided in the embodiment of the present application can also be as follows Figure 8 As shown, its implementation principle is similar to the above technical solution and will not be repeated here.
[0235] Combined with the above Figures 1 to 8 , describes the method of the embodiment of the present application in detail, and will be combined with Fig. 9 Describe the terminal device of the embodiment of the present application.
[0236] Fig. 9 A schematic structural diagram of a terminal device 900 provided in an embodiment of the present application. The device 900 includes a processor 901, a transceiver 902, and a memory 903. The processor 901, the transceiver 902, and the memory 903 communicate with each other through an internal connection path, the memory 903 is used to store instructions, and the processor 901 is used to execute the instructions stored in the memory 903 to control the transceiver 902 to receive and / or send signals.
[0237] It should be understood that the terminal device 900 can be used to execute the various steps and / or processes corresponding to the terminal device in the above method. Optionally, the memory 903 may include a read-only memory and a random access memory, and provide instructions and data to the processor 901. A part of the memory may also include a non-volatile random access memory. For example, the memory 903 may also store information about the device type. The processor 901 may be used to execute the instructions stored in the memory 903, and when the processor 901 executes the instructions stored in the memory, the processor 901 is used to execute the various steps and / or processes of the above method. The transceiver 902 may include a transmitter and a receiver, the transmitter may be used to implement the various steps and / or processes corresponding to the above transceiver for performing the sending action, and the receiver may be used to implement the various steps and / or processes corresponding to the above transceiver for performing the receiving action.
[0238] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0239] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0240] The present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the technical solution in the above method embodiment.
[0241] The present application also provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer can execute the technical solution in the above method embodiment.
[0242] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0243] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0244] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0245] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0246] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0247] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0248] The above is only a specific implementation of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the present application, which should be included in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.
Claims
1. A parameter updating method, characterized in that: Applied to a terminal device, the method comprises: Calling a first interface of an application framework layer through an application layer program to query configuration information of a local service module, wherein the local service module is provided in a system runtime layer of the terminal device; Calling the second interface of the system runtime layer through the first interface, accessing the database of the system runtime layer through the second interface, and acquiring the configuration information, wherein the second interface is a standard C / C++ interface; Based on the configuration information, obtaining update parameters of the local service module from the first server through an application layer program; Based on the update parameters, updating the parameters of the local service module through an application layer program to obtain a parameter update result, wherein the parameter update result includes a module identifier of the local service module with updated parameters; Calling the first interface through an application layer program, calling the third interface of the hardware abstraction layer through the first interface to access the cross-process access service, passing the parameter update result to the cross-process access service, and the cross-process access service is set in the system runtime layer; Based on the module identifier, querying a callback interface corresponding to the module identifier through the cross-process access service, wherein the callback interface is provided in the hardware abstraction layer; Through the callback interface, the parameter update completion message is transmitted to the local service module corresponding to the callback interface.
2. The method according to claim 1, characterized in that: Before calling the first interface of the application framework layer through the application layer program, the method further includes: Calling the second interface through the local service module, and writing the configuration information of the local service module into the database of the system runtime layer through the second interface; Setting a callback function through the second interface and constructing a callback interface, wherein the callback interface is used to call the callback function; The third interface is called through the local service module, and the callback interface is added to the cross-process access service through the third interface.
3. The method according to claim 1, characterized in that The configuration information includes at least one of the following: The module identifier of the local service module; The submodule identifier of the local service module; A version identifier of the current parameters of the local service module; The validity mode of the updated parameters, wherein the validity mode is restart validity or non-restart validity; The delayed restart time of the terminal device; The installation path of the parameter package of the update parameters; or, The system version identifier that the update parameter is compatible with.
4. The method according to any one of claims 1 to 3, characterized in that The factory configuration of the terminal device includes the first interface, the second interface, the third interface and the cross-process access service.
5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Based on the system configuration information of the terminal device, obtaining system upgrade data from the second server through the application layer program, the system upgrade data including the first interface, the second interface, the third interface and the code of the cross-process access service; Based on the system upgrade data, the terminal device is upgraded through the application layer program.
6. The method according to claim 5, characterized in that The system configuration information includes at least one of the following: The identification of the terminal device; The current system version identifier of the terminal device; or, The installation path of the data package of the system upgrade data.
7. The method according to any one of claims 1 to 3 and 6, characterized in that: The step of calling the third interface of the hardware abstraction layer through the first interface to access the cross-process access service includes: The first interface calls the third interface of the hardware abstraction layer to access the cross-process access service through the inter-process communication of the kernel layer.
8. The method according to any one of claims 1 to 3 and 6, characterized in that: The method of transmitting the parameter update completion message to the local service module corresponding to the callback interface through the callback interface includes: Based on the inter-process communication of the kernel layer, the parameter update completion message is transmitted to the local service module corresponding to the callback interface through the callback interface.
9. The method according to any one of claims 1 to 3 and 6, characterized in that: The first interface is the Java Native Method Interface JNI.
10. The method according to any one of claims 1 to 3 and 6, characterized in that The cross-process access service is a stable Android interface definition language Stable AIDL service, and the third interface is a Stable AIDL service interface.
11. The method according to any one of claims 1 to 3 and 6, characterized in that: The first interface, the second interface, the third interface and the cross-process access service are defined through a cloud parameter programming framework.
12. A terminal device, characterized in that: include: A processor, wherein the processor is coupled to a memory, wherein the memory is used to store a computer program, and when the processor calls the computer program, the terminal device executes the method according to any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 11.
14. A computer program product, characterized in that The computer program product includes a computer program code, and when the computer program code is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 11.
