Function update method, electronic device and computer-readable storage medium

WO2026174977A1PCT designated stage Publication Date: 2026-08-27SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/148020
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-24
Filing Date
2025-12-31
Publication Date
2026-08-27

Smart Images

  • Figure CN2025148020_27082026_PF_FP_ABST
    Figure CN2025148020_27082026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are a function update method, an electronic device, and a computer-readable storage medium. The method comprises: in response to receiving a target attribute, notifying a registered local layer module of the target attribute; determining whether an attribute of the local layer module is updated; and when the attribute of the local layer module is updated, updating a function of the local layer module. In this way, the present solution can update the function of the local layer module without restarting a device.
Need to check novelty before this filing date? Find Prior Art

Description

Function update methods, electronic devices and computer-readable storage media

[0001] This application claims priority to Chinese patent application filed on February 24, 2025, with application number 2025102105650 and entitled "Functional update method, apparatus, electronic device and computer-readable storage medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, specifically to a function update method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0003] C and C++ are statically compiled languages. Once compiled, the code and data layout in the executable file are fixed and will not change during runtime. Therefore, if you want to update the functionality of a module written in C or C++ in the native layer, you need to modify the code and recompile the module. Technical issues

[0004] If you want to update the functionality of a local layer module that has already been published to a user device, since the user device does not have a compilation environment, you can only do it through system self-upgrade. The upgrade process requires restarting the user device, which is time-consuming and inefficient, and seriously affects the user experience. Technical solutions

[0005] This application provides a function update method, apparatus, electronic device, and computer-readable storage medium, which can update the function of the local layer module without restarting the device.

[0006] In a first aspect, embodiments of this application provide a function update method, including:

[0007] In response to the customized feature attribute management service receiving the target attribute, the target attribute is notified to the registered local layer module;

[0008] Based on the target attribute, determine whether the attribute of the local layer module needs to be updated; and

[0009] When the attributes of the local layer module are updated, the functionality of the local layer module is also updated.

[0010] In one embodiment, updating the functionality of the local layer module when its attributes are updated includes:

[0011] When the attributes of the local layer module are updated, the on / off state of the local layer module's functions is adjusted according to the target attributes.

[0012] In one embodiment, prior to the customized feature attribute management service receiving the target attribute, the method further includes:

[0013] Get configuration data;

[0014] Parse the configuration data to obtain the attribute configuration data;

[0015] The target attribute is determined from the attribute configuration data;

[0016] The target attribute is sent to the customized feature attribute management service.

[0017] In one embodiment, determining the target attribute from the attribute configuration data includes:

[0018] Obtain the attribute name from the attribute configuration data;

[0019] Check whether the attribute name includes the target identifier;

[0020] When the attribute name includes the target identifier, the attribute corresponding to the attribute name is determined as the target attribute.

[0021] In one embodiment, sending the target attribute to the customized feature attribute management service includes:

[0022] Obtain the process ID of the process where the customized feature attribute management service is located;

[0023] Based on the process ID, the target attribute is sent to the customized feature attribute management service.

[0024] In one embodiment, obtaining the configuration data includes:

[0025] Obtain the configuration data sent from the cloud.

[0026] In one embodiment, before notifying the registered local layer module of the target attribute, the method further includes:

[0027] Register the local layer module in the custom feature attribute management service.

[0028] Secondly, embodiments of this application provide a function update apparatus, including:

[0029] The response module is used to notify the registered local layer module of the target attribute in response to the customized feature attribute management service receiving the target attribute;

[0030] The determining module is configured to determine whether the attributes of the local layer module have been updated based on the target attributes; and

[0031] The update module is used to update the functionality of the local layer module when the attributes of the local layer module are updated.

[0032] In one embodiment, the update module includes:

[0033] An adjustment unit is used to adjust the on / off state of the local layer module's functions according to the target attribute when the attributes of the local layer module are updated.

[0034] In one embodiment, prior to the customized feature attribute management service receiving the target attribute, the apparatus further includes:

[0035] The acquisition module is used to retrieve configuration data;

[0036] The parsing module is used to parse the configuration data to obtain attribute configuration data;

[0037] A target attribute determination module is used to determine the target attribute from the attribute configuration data;

[0038] The sending module is used to send the target attribute to the customized feature attribute management service.

[0039] In one embodiment, the target attribute determination module includes:

[0040] The name acquisition unit is used to acquire the attribute name from the attribute configuration data;

[0041] An identifier acquisition unit is used to verify whether the attribute name includes a target identifier;

[0042] The target attribute determination unit is used to determine the attribute corresponding to the attribute name as the target attribute when the attribute name includes the target identifier.

[0043] In one embodiment, the sending module includes:

[0044] The process ID acquisition unit is used to acquire the process ID of the process in which the customized feature attribute management service is located;

[0045] The target attribute sending unit is used to send the target attribute to the customized feature attribute management service according to the process number.

[0046] In one embodiment, the acquisition module includes:

[0047] The cloud acquisition unit is used to acquire the configuration data sent from the cloud.

[0048] In one embodiment, before notifying the registered local layer module of the target attribute, the apparatus further includes a registration module for registering the local layer module with the custom feature attribute management service.

[0049] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the above-described function update method.

[0050] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-described function update method.

[0051] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application. Beneficial effects

[0052] In summary, in this embodiment, the customized feature attribute management service receives the target attribute and can notify the registered local layer module of the target attribute. The local layer module can determine whether its attributes need to be updated based on the target attribute, and if so, update the functionality of the local layer module. Thus, updating the functionality of the local layer module can be achieved without recompiling it or restarting the device, significantly saving update time, improving update efficiency, and avoiding impact on user experience. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 is a schematic diagram of the steps of a function update method provided in an embodiment of this application;

[0055] Figure 2 is a schematic diagram of the architecture of a function update method provided in an embodiment of this application;

[0056] Figure 3 is a flowchart illustrating a function update method provided in an embodiment of this application;

[0057] Figure 4 is a schematic diagram of the structure of a function update device provided in an embodiment of this application;

[0058] Figure 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Embodiments of the present invention

[0059] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0060] In one embodiment, as shown in FIG1, a function update method is provided. Although the logical order is shown in the step diagram, in some cases, the steps shown or described may be performed in a different order than that shown in the figures. Specifically, this function update method can be applied to electronic devices, wherein the electronic devices may include, but are not limited to, one or more of smartphones, tablets, laptops, desktop computers, and in-vehicle computers.

[0061] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0062] According to the function update method shown in Figure 1, the method includes at least steps S110 to S130, which are detailed below: In step S110, in response to the customized feature attribute management service receiving the target attribute, the target attribute is notified to the registered local layer module.

[0063] Custom feature attribute management service is used to manage target attributes. Target attributes can include customized attributes and non-customized attributes. When the custom feature attribute management service receives a target attribute, it indicates that the attribute has changed. This change may be due to the customer customizing different attributes, or it may be due to the developers adjusting the attributes of the electronic device. Customized attributes are attributes or features of electronic devices that can be customized; they can be customized based on the needs of customers, users, or specific scenarios to obtain customized attributes for software, hardware, services, etc.

[0064] Optionally, the target attribute may include attributes at multiple levels. These multiple levels may include, but are not limited to, software, hardware, and service layers.

[0065] Optionally, the target attributes of the software layer may include, but are not limited to: operating system attributes, pre-installed application attributes, user interface attributes, and security attributes. Customizing the operating system attribute can involve customizing different operating systems for different electronic devices; for example, some electronic devices can be customized to use the native Android system, while others can be customized to use the iOS operating system. Customizing the pre-installed application attribute can involve pre-installing different applications on different electronic devices; for example, some electronic devices may have a map application pre-installed, while others may not. Customizing the user interface attribute can involve customizing different themes, fonts, and / or wallpapers for different electronic devices; for example, some electronic devices may have a red wallpaper, while others may have a green wallpaper. Customizing security attributes can involve customizing different permission management schemes and / or anti-harassment functions for different electronic devices; for example, some electronic devices may only block calls from restricted numbers, while others may block both calls and SMS messages from restricted numbers.

[0066] Optionally, hardware layer target attributes may include, but are not limited to, processor attributes, storage (ROM) attributes, and / or sensor attributes. Customizing processor attributes can involve tailoring different processors for different electronic devices, such as customizing the number of cores to 4, 6, or 8 cores. Different core counts may lead to different task processing logic within the electronic device, thus customization of the processor attributes at the hardware layer may result in corresponding changes to the functionality of the local layer modules of the electronic device. Customizing storage attributes can involve customizing different storage capacities and / or interface types for different electronic devices, such as customizing storage capacity to 512GB or 1TB. Different storage capacities may lead to differences in the functionality and performance of the electronic device, which in turn may result in corresponding changes to the functionality of the local layer modules. Customizing sensor attributes can involve customizing different sensors for different electronic devices, such as using a fingerprint sensor or a facial recognition sensor for unlocking the electronic device. Different sensor attributes may result in corresponding changes to the functionality of the local layer modules of the electronic device.

[0067] Optionally, the target attributes of the service layer may include, but are not limited to, subscription attributes and / or cloud service attributes. Customizing subscription attributes can involve tailoring different subscription services to different electronic devices; for example, it could involve customizing the subscription service for a first video platform and / or a second video platform. When customizing different subscription services, the local layer module of the electronic device may need to implement the ability to interface with different video platforms. Customizing cloud service attributes can involve tailoring different cloud services to different electronic devices; for example, it could involve customizing the automatic storage of photos and / or memos to cloud space. When customizing different subscription services, the local layer module of the electronic device may need to implement the ability to retrieve files from different file storage paths.

[0068] Native layer modules refer to modules developed using C and C++ languages ​​within the native layer. The native layer is a relatively low level of the system architecture, adjacent to the hardware driver layer and the operating system kernel. The native layer is primarily developed using C and C++, languages ​​known for their high performance and direct hardware access capabilities. Native layer modules can interact directly with the hardware driver layer and the operating system kernel, reducing intermediate layer overhead and significantly improving performance. Therefore, the native layer can handle performance-critical tasks such as graphics rendering and multimedia processing (audio and video encoding / decoding, image recognition). When handling performance-intensive tasks like graphics rendering and multimedia processing, native layer modules can respond and process data quickly, ensuring smooth system operation.

[0069] Modules can be categorized based on multiple dimensions, such as module function, hardware access, or performance optimization. For example, based on module function, modules can be divided into image recognition modules or audio / video encoding / decoding modules; based on hardware access, modules can be divided into modules that interact with sensors or storage access modules; and based on performance optimization, modules can be divided into high-performance computing modules or real-time processing modules. A local layer module might be an image recognition module when categorized based on module function; a storage access module when categorized based on hardware access; and a high-performance computing module when categorized based on performance optimization.

[0070] Optionally, the local layer module can be a graphics rendering module for rendering graphics; for example, the graphics rendering module of the local layer can realize real-time rendering of complex scenes in 3D games.

[0071] Optionally, the local layer module can be a multimedia processing module for processing image and audio / video data; for example, the multimedia processing module of the local layer can encode and decode audio and video data in real time during video calls to ensure smooth calls. Optionally, the local layer module can be a module for interacting with sensors; for example, the module of the local layer that interacts with sensors can read sensor data and perform corresponding data processing based on the sensor data.

[0072] In one embodiment, before notifying the registered local layer module of the target attribute, the method further includes registering the local layer module with a custom feature attribute management service.

[0073] Local layer modules can pre-register with the custom feature attribute management service. The local layer module calls the registration function provided by the custom feature attribute management service and passes its own information to the service. The service then stores the received information and completes the registration.

[0074] The information passed from the local layer module to the custom feature attribute management service helps the service identify, manage, and schedule the local layer module. This information can include module identifiers, interface information, and callback functions. The module identifier can include the module name and / or module ID; the custom feature attribute management service can accurately locate and invoke the local layer module based on the module identifier. Interface information can include the input and output data formats of the local layer module and the interface definitions provided by the local layer module. The interface definitions provided by the local layer module can include function names, parameter lists, and return value types. Based on the interface information, the custom feature attribute management service can determine how to pass information to the local layer module. Callback functions are used for event notification; the custom feature attribute management service can notify the registered local layer module through callback functions when it receives a target attribute. Optionally, the information passed from the local layer module to the custom feature attribute management service can also include dependencies, parameter information, and / or description information. Dependency information can include module dependencies and version dependencies. Based on module dependencies, the custom feature attribute management service can ensure that dependent modules are correctly initialized first when loading and starting the module; based on version dependencies, the custom feature attribute management service can ensure system stability and compatibility by using the correct dependency versions. The parameter information can include the configuration parameters of the local layer module. Based on the configuration parameters, the customized feature attribute management service can initialize the local layer module and ensure that it starts in the correct state. The description information can include descriptions of the module's functions or attributes. Based on the description information, the customized feature attribute management service can determine whether the received target attribute is an attribute of the local layer module.

[0075] After receiving information from the local layer module, the customized feature attribute management service can store the module identifier, interface information, and callback function of the local layer module to complete the registration. Optionally, it can also store the dependency relationships and / or parameter information of the local layer module.

[0076] Electronic devices can retrieve configuration data from the cloud, local storage, or other storage devices. This configuration data is used to configure the electronic device. It can include attribute configuration data, which is data related to specific attributes within the configuration data. After retrieving the configuration data, the electronic device can parse it to obtain the attribute configuration data.

[0077] After obtaining the property configuration data, it can be passed to the Property Service. The Property Service validates the property configuration data, retrieving each property and its name. The Property Service checks if the property name includes a target identifier; if so, it identifies the property as the target property. The target identifier can be set according to actual needs; for example, a fixed character can be used as the target identifier in the prefix of the property name. A target property is one whose name includes the target identifier. A target property is a property that has undergone changes.

[0078] When an attribute changes, the functionality of the corresponding local layer module will also change accordingly. To enable the custom feature attribute management service to notify local layer modules to adjust their functionality, the attribute service, after determining the target attribute, sends the target attribute to the custom feature attribute management service. Upon receiving the target attribute, the custom feature attribute management service, based on the information of the local layer modules registered with the custom feature attribute management service, calls the callback functions provided by the local layer modules and proactively sends callback notifications containing the target attribute to these local layer modules. The local layer modules receive the callback notifications sent by the custom feature attribute management service and obtain the target attribute.

[0079] Optionally, the customized feature attribute management service acts as the sender of the callback notification. Based on the module identifier provided by the local layer module during registration, it can determine the receiver of the callback notification. The receiver is the local layer module that has registered with the customized feature attribute management service and provided a module identifier. The customized feature attribute management service, based on the interface information and callback function provided by the local layer module during registration, can determine how to send the callback notification to the local layer module. Specifically, it can send the callback notification by calling the corresponding callback function, and determine how to pass the callback notification to the corresponding local layer module based on the interface information.

[0080] The target attribute is the content of the callback notification. The local layer modules registered with the custom feature attribute management service can include one or more. After receiving the target attribute, the custom feature attribute management service can notify each registered local layer module of the target attribute through the callback notification.

[0081] Optionally, the customized feature attribute management service can determine whether the received target attribute is an attribute corresponding to a local layer module based on the description information provided by the local layer module during registration. An attribute corresponding to a local layer module can include one or more attributes. Optionally, the description information of the local layer module can include a description of the format of the attribute corresponding to the local layer module, or it can include the name of the attribute corresponding to the local layer module, etc. After receiving the target attribute, the customized feature attribute management service matches the information of the target attribute with the description information of the attributes corresponding to each registered local layer module to determine whether the target attribute is an attribute corresponding to a local layer module. Then, it only needs to send a callback notification of the target attribute to the corresponding local layer module, avoiding the waste of transmission and computing resources caused by sending the target attribute to an irrelevant local layer module.

[0082] In this way, the local layer module is pre-registered with the custom feature attribute management service. After receiving the target attribute, the custom feature attribute management service can send a callback notification of the target attribute to the local layer module based on the information of the pre-registered local layer module.

[0083] In step S120, based on the target attribute, it is determined whether the attribute of the local layer module should be updated.

[0084] In step S130, when the attributes of the local layer module are updated, the functionality of the local layer module is updated.

[0085] In C and C++, the functionality of native layer modules is managed through attributes, with a direct correspondence between their functions and attributes. Before customization of an electronic device, the attributes of the native layer modules are adapted to the device's pre-customization configuration. When the electronic device undergoes different customizations, its target attributes (such as the software-layer, hardware-layer, and / or service-layer customization attributes described earlier) change accordingly. The customization attribute management service receives the target attributes and sends a callback notification to the native layer module. Upon receiving the target attributes, the native layer module compares them with the original attributes to determine if the module's attributes have been updated. This, in turn, determines whether the module's functionality needs to be changed to align with the electronic device's configuration corresponding to the target attributes.

[0086] For example, the functionality of a local layer module was originally designed for the Android operating system, and correspondingly, the operating system attributes of the local layer module were originally Android operating system attributes. When the operating system of an electronic device changes from Android to iOS, and the operating system attributes of the electronic device change, the customized feature attribute management service can receive the changed iOS operating system attributes. The customized feature attribute management service will send a callback notification of the iOS operating system attributes to the local layer module. By comparing the received iOS operating system attributes with its own original Android operating system attributes, the local layer module can know that its attributes have been updated. In order to avoid compatibility issues, the local layer module may adjust its API interface functions and / or permission management functions to adapt to the changed iOS operating system.

[0087] When the properties of the pre-installed application in the local layer module change, because the pre-installed application may have a dependency relationship with the local layer module, the local layer module may adjust its dependent functions in response to the received changed properties of the pre-installed application.

[0088] When the user interface properties of the local layer module change, the data input and output formats may change because the adjustment of the user interface may cause changes. In order to avoid interface rendering problems, the local layer module may adjust its data processing functions in response to the received changed user interface properties.

[0089] When the security attributes of the local layer module change, it may be due to changes in the encryption or authentication mechanism. Therefore, in response to the received changes in security attributes, the local layer module may adjust its data processing flow in terms of security.

[0090] When the hardware layer attributes of the local layer module change, because the changes in the hardware layer will directly affect the operating capabilities and performance of the local layer module, the local layer module may adjust its functions related to the hardware layer, such as processor architecture, storage capacity and / or sensor data processing, in response to the received changes in the hardware layer attributes.

[0091] When the service layer attributes of the local layer module change, because the changes in the service layer will affect the external dependencies and extensibility of the local layer module, the local layer module may adjust its functions related to the service layer, such as subscription permissions, subscription content, cloud service APIs and / or cloud service updates, in response to the received changed service layer attributes.

[0092] In one embodiment, the customized feature attribute management service sends a target attribute callback notification to each registered local layer module. After receiving the target attribute, each local layer module determines whether the target attribute is the attribute corresponding to itself.

[0093] A target attribute corresponding to a local layer module means that this target attribute will affect the functionality of that local layer module. It can be understood that the local layer module itself originally possesses attributes corresponding to the target attribute. As in the previous example, the target attribute could be a modified iOS operating system attribute, while the local layer module originally possessed Android operating system attributes.

[0094] When the target attribute is not a corresponding attribute of the local layer module, it can be ignored. When the target attribute is a corresponding attribute of the local layer module, the local layer module can compare the target attribute with its corresponding attribute to determine whether the local layer module's attribute has been updated. If the target attribute and its corresponding attribute in the local layer module are the same, it is determined that the local layer module's attribute has not been updated; if they are different, it is determined that the local layer module's attribute has been updated.

[0095] The data format of the target attribute can be a basic data type format (such as string, number, boolean value, or enumeration), a structured data format (such as key-value pairs, lists, or nested structures), or a configuration file format (such as JSON, XML, or YAML files). This application embodiment does not impose any requirements on this. The target attribute and the corresponding attribute in the local layer module have the same format. The consistency between the target attribute and the corresponding attribute in the local layer module can be determined by comparing the text of the target attribute with the text of the corresponding attribute.

[0096] The target attribute may include one or more, and the local layer modules registered in the custom feature attribute management service may include one or more. After receiving each target attribute, the custom feature attribute management service can notify each registered local layer module of each target attribute through callback notification, or it can only notify each local layer module corresponding to each target attribute through callback notification.

[0097] In one embodiment, step S130 may include: when the attributes of the local layer module are updated, adjusting the on / off state of the local layer module's functionality based on the target attribute.

[0098] Updating the properties of a local layer module involves updating the original properties to the target properties. Therefore, the functionality of the local layer module can be updated according to the target properties.

[0099] For the same type of attribute, the local layer module has the corresponding functions for each attribute within that category. By toggling the functions, you can control which function corresponding to that attribute is active. For example, if the local layer module has functions corresponding to both the Android and iOS operating systems, when the local layer module's attribute is originally an Android operating system attribute, the Android operating system function is enabled, and the iOS operating system function is disabled. When the local layer module's attribute changes to an iOS operating system attribute, the Android operating system function is disabled, and the iOS operating system function is enabled.

[0100] In the local layer module, adjusting functionality can be abstracted as turning a switch on and off. Each function in the local layer module has complex code implementations behind it; adjusting these functions via switches provides a simplified interface for complex operations. Therefore, the functionality of the local layer module can be updated by adjusting its on / off switches.

[0101] Thus, by adjusting the on / off switches of the local layer module's functionality, the module's capabilities can be updated intuitively and flexibly. In another embodiment, the functionality of the local layer module can also be adjusted at runtime by using function pointers to select different functions based on the module's target attributes to execute its functions.

[0102] By adopting the technical solution of this application embodiment, the customized feature attribute management service receives a target attribute and can notify the registered local layer module of the target attribute. The local layer module can determine whether its attributes need to be updated based on the target attribute. When the attributes of the local layer module are updated, the functionality of the local layer module is updated. In this way, the functionality of the local layer module can be updated without recompiling the local layer module or restarting the device, which can greatly save update time, improve update efficiency, and avoid affecting the user experience.

[0103] Based on the above technical solution, as an embodiment, as shown in the schematic diagram of the function update method in Figure 2, before the customized feature attribute management service receives the target attribute, the method may further include: obtaining configuration data; parsing the configuration data to obtain attribute configuration data; determining the target attribute from the attribute configuration data; and sending the target attribute to the customized feature attribute management service.

[0104] Configuration data is data used to configure an electronic device, which may include attribute configuration data for configuring attributes, and the attribute configuration data may include target attributes. Target attributes may include attributes of one or more local layer modules. In one embodiment, obtaining configuration data may include: obtaining configuration data sent from the cloud.

[0105] Configuration data can be sent from the cloud. When it is necessary to update the functionality of the local layer modules of multiple electronic devices, only the configuration data stored in the cloud needs to be updated. Then, the cloud pushes the configuration data to multiple electronic devices simultaneously, thereby quickly and conveniently modifying the functionality of the local layer modules of multiple electronic devices.

[0106] Thus, by pushing configuration data from the cloud, the efficiency of updating the functionality of the local layer modules of electronic devices can be improved. Optionally, the corresponding method for updating the functionality of the local layer modules can be executed immediately after the configuration data is sent to the cloud; alternatively, the configuration data can be saved locally first after being sent to the cloud, and then retrieved from the local machine when needed or when idle, and the corresponding method for updating the functionality of the local layer modules can be executed based on the retrieved configuration data.

[0107] In another embodiment, obtaining configuration data can be done by retrieving configuration data from a storage device. The configuration data is stored in the storage device, and the configuration data from the storage device is transferred to the electronic device, thereby updating the functionality of the local layer module of the electronic device.

[0108] After obtaining the configuration data, the electronic device can parse it to obtain attribute configuration data. Attribute configuration data consists of attribute-related data within the configuration data. Optionally, the configuration file can be parsed by an Android application package (APK) named ConfigProvider (global configuration). ConfigProvider is primarily used to interact with the cloud to download configuration data, process the content, and save it.

[0109] Optionally, Firebase Cloud Messaging (FCM) can be used to update attribute configuration files at different levels via the cloud, migrating the entire database maintenance to the local layer. When attribute configuration files at different levels need to be updated, the cloud can generate a message containing the updated attributes. For example, if software layer attributes need to be adjusted, the cloud will prepare configuration data containing the adjusted software layer attributes. Through the FCM service, the cloud sends out the prepared package configuration data. FCM will accurately push the message to the corresponding client application based on the registration token of each electronic device. Each electronic device with the FCM application installed will obtain a unique registration token when registering with FCM. After receiving the configuration data pushed by FCM, the electronic device will pass the configuration data to the local layer. For example, in the iOS operating system, a bridging mechanism can be used to pass the received configuration data to the local layer module.

[0110] After receiving the configuration data, the local layer module interacts directly with the database to save the configuration data. The local layer module can also perform database maintenance tasks, such as periodically backing up the database. It can call the database backup interface according to predetermined strategies (such as time intervals or data volume thresholds) to save the database data as a backup file.

[0111] After obtaining the attribute configuration data, it can be passed to the attribute service. The attribute service validates the attribute configuration data, retrieves each attribute and its name from it, and then determines the target attribute from the attributes contained in the attribute configuration data.

[0112] Optionally, determining the target attribute from the attribute configuration data may include: obtaining the attribute name from the attribute configuration data; verifying whether the attribute name includes a target identifier; and determining the attribute corresponding to the attribute name as the target attribute when the attribute name includes a target identifier.

[0113] The attribute service retrieves each attribute and its name from the attribute configuration data. The target attribute's name can include a target identifier, which can be set according to actual needs; for example, a fixed character can be set as the target identifier in the prefix of the attribute name.

[0114] The attribute service checks whether the attribute name includes the target identifier. If the attribute name includes the target identifier, the attribute corresponding to the attribute name is determined as the target attribute.

[0115] Optionally, the target identifier can be a fixed character [persist.tcl.feature] in the prefix of the attribute name. The attribute service checks whether the prefix of the attribute name of each attribute includes the fixed character [persist.tcl.feature]. If the prefix of the attribute name includes the fixed character [persist.tcl.feature], the attribute corresponding to that attribute name is determined as the target attribute.

[0116] In this way, by validating the attribute name, it can be determined whether the attribute is the target attribute, so that the target attribute can be sent to the customized feature attribute management service, thereby updating the functionality of the local layer module.

[0117] After the target attribute is determined, the attribute service can send the target attribute to the custom feature attribute management service.

[0118] By adopting the technical solution of this application embodiment, configuration data can be obtained, the configuration data can be parsed, the target attribute can be determined, and the target attribute can be sent to the customized feature attribute management service. When the customized feature attribute management service receives the target attribute, it can notify the registered local layer module of the target attribute, thereby realizing the update of the function of the local layer module and improving the update efficiency of the function of the local layer module.

[0119] Based on the above technical solution, as an example, sending the target attribute to the customized feature attribute management service may include: obtaining the process ID of the process in which the customized feature attribute management service is located; and sending the target attribute to the customized feature attribute management service according to the process ID.

[0120] The attribute service extracts target attributes and passes them to the custom feature attribute management service. The attribute service resides in the initialization (Init) process, while the custom feature attribute management service resides in the asynchronous input / output (Aio) process. The attribute service requires cross-process communication to send the target attributes to the custom feature attribute management service.

[0121] The init process can start a series of system services based on the system configuration file. The Aio process allows a program to continue executing other tasks after initiating an input / output request without waiting for the input / output operation to complete. When the input / output operation is completed, the system notifies the program through mechanisms such as callbacks or event notifications.

[0122] Communication between the Init process and the Aio process can be achieved by sending signals. Signals are a software interrupt mechanism used to deliver asynchronous event notifications between processes. To send target attributes to the custom attribute management service in the Aio process, the attribute service in the Init process needs to know the process ID of the Aio process. The process ID is a unique character that identifies a process.

[0123] Optionally, the process ID of the Aio process hosting the custom feature attribute management service can be obtained by querying the target file. The Aio process can pre-write its process ID to the target file upon startup. Alternatively, the process ID of the Aio process can be obtained by querying the process registry. The target file is a specific file used to store the process ID of the Aio process, and can be a configuration file, a log file, or a custom data file. The target file can serve as a configuration file to record the process ID of the Aio process. The Aio process can write its process ID to the log file upon startup, thus the process ID of the Aio process can be obtained from the log file. Developers can set up a custom data file, into which the Aio process can write its process ID upon startup.

[0124] Once the Init process obtains the process ID of the Aio process, it can use the corresponding functions provided by the system to send the target attribute to the Aio process. This ensures that the target attribute is accurately sent to the custom feature attribute management service in the Aio process and is not mistakenly sent to other processes, thereby enabling communication between the Init process and the Aio process.

[0125] The technical solution adopted in this application uses a signal mechanism to send the target attribute across processes to the customized feature attribute management service, which is simple and efficient. By sending through the process ID of the process where the customized feature attribute management service is located, it can be ensured that the target attribute can be accurately sent to the customized feature attribute management service in the Aio process.

[0126] Optionally, the attribute service can send the target attribute to the custom feature attribute management service across processes. This can be achieved through instrumentation interception in the `HandlePropertySet` method of AOSP (the open-source version of Android). The custom feature attribute management service can include a functional interface module, a file parsing module, and a callback notification module. The functional interface module can receive the target attribute, the file parsing module can analyze the target attribute, and the callback notification module can send a callback notification of the target attribute to the registered local layer module. Communication between the local layer module and the custom feature attribute management service can be achieved through a management interface. The local layer module sends information to the management interface, which then sends the information to the custom feature attribute management service.

[0127] Figure 3 is a flowchart illustrating a function update method provided in an embodiment of this application. In step S301, configuration data is deployed in the cloud. In step S302, the ConfigProvider parses the configuration data. In step S303, the Property_Service verifies the attribute name. In step S304, it is determined whether the attribute name includes a target identifier. If the attribute name does not include a target identifier, proceed to step S305; if the attribute name includes a target identifier, proceed to step S306. In step S305, the local layer module is loaded normally. In step S306, a cross-process notification is sent to the customized feature attribute service. In step S307, the registered local layer module is notified. In step S308, the local layer module determines whether the attribute has been updated. If the attribute has not been updated, proceed to step S309; ​​if the attribute has been updated, proceed to step S310. In step S309, no processing is performed. In step S310, the function of the local layer module is switched on / off.

[0128] To facilitate better implementation of the function update method of this application, this application also provides a function update apparatus based on the above function update method. The meanings of the terms used are the same as in the function update method described above, and specific implementation details can be found in the descriptions of the method embodiments.

[0129] Please refer to Figure 4, which is a schematic diagram of the structure of the function update device provided in an embodiment of this application. The function update device includes:

[0130] Response module 401 is used to respond to the custom feature attribute management service receiving the target attribute and to notify the registered local layer module of the target attribute;

[0131] Module 402 is used to determine whether the attributes of the local layer module need to be updated based on the target attributes; and

[0132] Update module 403 is used to update the functionality of the local layer module when the attributes of the local layer module are updated.

[0133] In one embodiment, the update module 403 includes:

[0134] The adjustment unit is used to adjust the on / off state of the local layer module's functions based on the target attributes when the local layer module's attributes are updated.

[0135] In one embodiment, before the customized feature attribute management service receives the target attribute, the apparatus further includes:

[0136] The acquisition module is used to retrieve configuration data;

[0137] The parsing module is used to parse the configuration data and obtain the attribute configuration data;

[0138] The target attribute determination module is used to determine the target attribute from the attribute configuration data;

[0139] The sending module is used to send the target attributes to the custom feature attribute management service.

[0140] In one embodiment, the target attribute determination module includes:

[0141] The name retrieval unit is used to retrieve the attribute name from the attribute configuration data;

[0142] The identifier acquisition unit is used to verify whether the attribute name includes the target identifier;

[0143] The target attribute determination unit is used to determine the attribute corresponding to the attribute name as the target attribute when the attribute name includes the target identifier.

[0144] In one embodiment, the sending module includes:

[0145] The process ID acquisition unit is used to obtain the process ID of the process in which the customized feature attribute management service resides.

[0146] The target attribute sending unit is used to send the target attribute to the customized feature attribute management service based on the process ID.

[0147] In one embodiment, the acquisition module includes:

[0148] The cloud acquisition unit is used to acquire configuration data sent from the cloud.

[0149] In one embodiment, the apparatus further includes: before notifying the registered local layer module of the target attribute.

[0150] The registration module is used to register local layer modules with the customized feature attribute management service.

[0151] By adopting the technical solution of this application embodiment, the customized feature attribute management service receives a target attribute and can notify the registered local layer module of the target attribute. The local layer module can determine whether its attributes need to be updated based on the target attribute. When the attributes of the local layer module are updated, the functionality of the local layer module is updated. In this way, the functionality of the local layer module can be updated without recompiling the local layer module or restarting the device, which can greatly save update time, improve update efficiency, and avoid affecting the user experience.

[0152] Specific limitations regarding the function update device can be found in the limitations regarding the function update method above, and will not be repeated here. Each module in the aforementioned function update device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0153] In addition, this application also provides an electronic device, as shown in Figure 5, which illustrates the structural schematic diagram of the electronic device involved in this application. Specifically:

[0154] The electronic device may include components such as a processor 501 with one or more processing cores and a memory 502 of one or more computer-readable storage media. Those skilled in the art will understand that the electronic device structure shown in FIG5 does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0155] The processor 501 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 502, and by calling data stored in the memory 502, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 501.

[0156] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0157] In one embodiment, the electronic device further includes a power supply 503 that supplies power to the various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 503 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0158] In one embodiment, the electronic device may further include an input unit 504, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0159] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 runs the applications stored in the memory 502, thereby implementing the steps in any of the function update methods provided in the embodiments of this application.

[0160] Those skilled in the art will understand that the structure shown in Figure 5 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0161] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described in any embodiment of this application.

[0162] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of this application.

[0163] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the methods described in any embodiment of this application.

[0164] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0165] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0166] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the function update methods provided in this application. Specific implementations of the above operations can be found in the preceding embodiments and will not be repeated here.

[0167] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0168] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the function update methods provided in this application, the beneficial effects that any of the function update methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0169] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element.

[0170] The above provides a detailed description of a function update method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A function update method, wherein, include: In response to the customized feature attribute management service receiving the target attribute, the target attribute is notified to the registered local layer module; Based on the target attribute, determine whether the attribute of the local layer module should be updated; as well as When the attributes of the local layer module are updated, the functionality of the local layer module is also updated.

2. The method according to claim 1, wherein, The step of updating the functionality of the local layer module when its attributes are updated includes: When the attributes of the local layer module are updated, the on / off state of the local layer module's functions is adjusted according to the target attributes.

3. The method according to claim 1, wherein, Before the customized feature attribute management service receives the target attribute, the method further includes: Get configuration data; Parse the configuration data to obtain the attribute configuration data; The target attribute is determined from the attribute configuration data; The target attribute is sent to the customized feature attribute management service.

4. The method according to claim 3, wherein, Determining the target attribute from the attribute configuration data includes: Obtain the attribute name from the attribute configuration data; Check whether the attribute name includes the target identifier; When the attribute name includes the target identifier, the attribute corresponding to the attribute name is determined as the target attribute.

5. The method according to claim 3, wherein, Sending the target attribute to the customized feature attribute management service includes: Obtain the process ID of the process in which the customized feature attribute management service resides; Based on the process ID, the target attribute is sent to the customized feature attribute management service.

6. The method according to claim 3, wherein, The acquisition of configuration data includes: acquiring the configuration data sent from the cloud.

7. The method according to claim 1, wherein, Before notifying the registered local layer module of the target attribute, the method further includes: Register the local layer module in the custom feature attribute management service.

8. The method according to claim 7, wherein, The step of registering the local layer module with the customized feature attribute management service includes: The local layer module pre-calls the registration function provided by the customized feature attribute management service and passes its own information to the customized feature attribute management service. The customized feature attribute management service will store the information received from the local layer module and complete the registration.

9. The method according to claim 8, wherein, The information passed from the local layer module to the customized feature attribute management service is information for identifying, managing, and scheduling the local layer module, including module identifier, interface information, and callback functions.

10. The method according to claim 9, wherein, The information passed from the local layer module to the customized feature attribute management service also includes: dependencies, parameter information, and / or description information.

11. The method according to claim 1, wherein, The customized feature attribute management service is a service used to manage the target attribute; The target attributes include customized attributes and non-customized attributes.

12. The method according to claim 1, wherein, The target attributes include attributes at multiple levels; these multiple levels include: software layer, hardware layer, and service layer.

13. The method according to claim 12, wherein, The target attributes of the software layer include: operating system attributes, pre-installed application attributes, user interface attributes, and security attributes.

14. The method according to claim 12, wherein, The target attributes of the hardware layer include: processor attributes, storage attributes, and / or sensor attributes.

15. The method according to claim 12, wherein, The target attributes of the service layer include: subscription attributes and / or cloud service attributes.

16. The method according to claim 1, wherein, The local layer module refers to the module developed in the local layer using C and C++ languages.

17. The method according to claim 1, wherein, The step of notifying the registered local layer module of the target attribute includes: Based on the information of the local layer module registered in the customized feature attribute management service, the callback function provided by the local layer module is invoked to actively send a callback notification containing the target attribute to the local layer module, so that the local layer module receives the callback notification sent by the customized feature attribute management service and obtains the target attribute.

18. The method according to claim 1, wherein, The update of the functionality of the local layer module includes: Update the original attributes of the local layer module to the target attributes.

19. An electronic device, wherein, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the function update method as described in any one of claims 1 to 18.

20. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the function update method as described in any one of claims 1 to 18.