Component refreshing method and electronic device
Through component data agents, the life cycle decoupling between component users and component providers is solved, which solves the problem of increased power consumption and memory usage during component refreshing, reduces the system burden of component refreshing, and improves the performance of electronic devices.
Patent Information
- Application Number
- PCT/CN2024/070925
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-26
- Filing Date
- 2024-01-05
- Publication Date
- 2024-12-05
AI Technical Summary
In the prior art, the component refresh process in electronic devices requires pulling up the process of component providers and data providers, resulting in an increase in power consumption and memory footprint, especially when the number and type of components increase, which becomes a serious problem.
By introducing component data agents, the life cycle decoupling between component users and component providers is achieved. Component users subscribe to component data. Component providers do not need to be permanent. The data agent is responsible for receiving and caching update data, realizing timely refreshing and self-refreshing of components and self-refreshing of components refresh.
It reduces power consumption and memory usage during component refresh process, reduces development complexity, and improves the performance and efficiency of electronic devices.
Smart Images

Figure CN2024070925_05122024_PF_FP_ABST
Abstract
Description
Component refreshing method and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on May 26, 2023, with application number 202310603225.5 and invention name "A component refresh method and electronic device", the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present application relate to the field of terminal technology, and in particular to a component refresh method and an electronic device. Background Art
[0004] With the popularization of electronic devices, in addition to providing users with basic application icons on the desktop, many operating systems can also provide users with some shortcut functions of applications or display some key information of applications in the form of components such as service cards and desktop widgets.
[0005] Some components display time-sensitive information. To ensure users always have the latest information, timely data refresh is generally necessary. Currently, refreshing a component requires launching both the component provider's process and the component data provider's process. As the number and types of components on electronic devices continue to increase, power consumption and memory usage are becoming increasingly important.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a component refresh method and an electronic device to solve the problem that an application process needs to be resident to implement component refresh, thereby reducing the system power consumption and memory overhead of the electronic device.
[0008] In a first aspect, embodiments of the present application provide a component refresh method. In this method, component data published by a data provider of the component is received; in response to a subscription event for the component data, the component data is transmitted to a component user, which is configured to refresh the component data and display it in the component; wherein the subscription event is used to instruct the component user to subscribe to the refresh of the component data.
[0009] This method decouples the lifecycles of component users and component providers. Component data providers can publish updated data, and based on component user subscriptions to component data, timely refreshes and displays can be achieved. By dividing the component lifecycle into data publishing and data subscription, self-refresh can be achieved without relying on the data provider. This method solves the problem of component refreshes requiring the component provider process to be started, thereby reducing power consumption and memory issues caused by component refreshes.
[0010] In addition, the method can realize that the component provider does not need to integrate the software development kit (SDK) of other data providers by providing a component data proxy. The component data proxy can realize the connection between the component provider and the data provider, thereby reducing the development complexity.
[0011] In one possible design, the data provider is an application (APP), a system or a server; wherein the APP is the APP to which the component belongs; wherein the APP includes the APP to which the component belongs, or the APP associated with the component data of the component; wherein the APP associated with the component data of the component can be understood as, the component data of an APP can be derived from other APPs, for example, the step data of a third-party sports health APP can be derived from the step data of the system sports health APP. In addition, the component can have a data provider and a component provider, and the component provider can be used to provide component layout, control the control layout on the component, and control click events, etc.; wherein, the data provider can be the same APP as the component provider, or a different APP, or the data provider can also be a way to publish data such as a system or server, and this application does not limit this.
[0012] In this design, during component refreshes, there's no need to start the component provider, nor does the data provider process need to be resident. When updated data is available, the data provider publishes it to the component data proxy or component management service. This reduces power consumption and memory usage.
[0013] In one possible design, the component data is transmitted to the component user, which can be implemented as transmitting the component data to the component user through a component management service, and the component management service is used to manage the component. Exemplarily, a functional unit of a component data agent can be responsible for receiving component data published by a data provider, and a component user can subscribe to data to the component data agent through a component management service to achieve data refresh of the component. It can be understood that the component data agent and the component management service are logical functional units, which can be two independent functional units or an integrated functional unit, and this application does not limit this.
[0014] In this design, the component management service and component data proxy can be used to implement the component refresh method provided in the embodiment of the present application, decoupling the lifecycles of component users and component providers, thereby reducing power consumption and memory issues caused by component refresh.
[0015] In some possible designs, the card data agent may have but is not limited to the following capabilities: defining uniform resource identifiers (URIs) and corresponding data formats, providing standardized SDK interfaces, providing data storage, providing necessary data access permission checking capabilities, etc.
[0016] In one possible design, before transmitting the component data to the component user in response to a subscription event for the component data, the method further includes: detecting the subscription event, the subscription event being used to indicate receipt of a subscription request sent by the component user, the subscription request including a component identifier of the component, and the subscription request being used to indicate a subscription to a refresh of the component based on the component identifier.
[0017] In this design, component users can subscribe to component refresh data based on component identification, and data providers can publish component refresh data based on component identification. In this way, component identification can be used to connect data between component users and data providers, so that the data published by the data provider can be refreshed to component users who subscribe to the component data.
[0018] In a possible design, the subscription request also includes the subscribed data type. In this design, by including the data type, more accurate component refresh can be achieved.
[0019] In one possible design, the component is a service card or widget. In another possible design, the component user is a host app. The host app includes, but is not limited to, one or more of the following: a desktop app, a negative-first-screen app, a notification bar app, or any other app that can create a component.
[0020] In a second aspect, the present application provides an electronic device comprising multiple functional modules; the multiple functional modules interact with each other to implement the method performed by the electronic device in any of the above aspects and its respective embodiments. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on the specific implementation.
[0021] In a third aspect, the present application provides an electronic device comprising at least one processor and at least one memory, wherein the at least one memory stores computer program instructions. When the electronic device is running, the at least one processor executes the method executed by the electronic device in any of the above aspects and its various embodiments.
[0022] In a fourth aspect, the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes any one of the above aspects and its possible methods for designing electronic devices to execute.
[0023] 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 any of the above aspects and possible methods of designing electronic devices.
[0024] In a sixth aspect, an embodiment of the present application also provides a graphical user interface on an electronic device, which has a display screen, one or more memories, and one or more processors, wherein the one or more processors are used to execute one or more computer programs stored in the one or more memories, and the graphical user interface includes a graphical user interface displayed when the electronic device executes any of the above aspects and its possible designs.
[0025] In a seventh aspect, the present application also provides a chip, which is used to read a computer program stored in a memory and execute any of the above aspects and their possible methods of designing electronic devices to execute.
[0026] In an eighth aspect, the present application further provides a chip system, comprising a processor for supporting a computer device in implementing any of the above aspects and possible methods for designing electronic devices for execution. In one possible design, the chip system further comprises a memory for storing programs and data necessary for the computer device. The chip system may be composed of a chip or may include a chip and other discrete devices.
[0027] For the beneficial effects of any of the second to eighth aspects and their possible designs, please refer to the beneficial effects of the various possible designs in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] FIG1a is a schematic diagram of a scene of a card generation process;
[0029] FIG1b is a diagram of a possible card display interface of an electronic device;
[0030] FIG2 is a schematic diagram of the hardware structure of a possible electronic device provided in an embodiment of the present application;
[0031] FIG3 is a software structure block diagram of an electronic device provided in an embodiment of the present application;
[0032] FIG4 is a schematic diagram of a scenario of a component refresh method provided in an embodiment of the present application;
[0033] FIG5 is a schematic diagram of another scenario of a component refresh method provided in an embodiment of the present application;
[0034] FIG6 is a flow chart of a component refresh method provided in an embodiment of the present application;
[0035] FIG7 is a flow chart of a component refresh method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0037] The embodiments of the present application can be applied to the field of terminal technology, and specifically can be applied to scenarios where desktop components including but not limited to service cards and desktop widgets are displayed on the display interface of an electronic device.
[0038] In the following embodiments, cards are used as an example for introduction. Cards are a form of service that can provide a more fine-grained atomic service capability than applications (APPs), and directly display the services or content that users care about most to users in the form of interactive cards. In addition, cards can also track how services or content change over time and display the latest services or content. For example, the card corresponding to the weather APP displays more timely weather information, the card corresponding to the clock APP displays accurate time information, and the card corresponding to the sports health APP displays updated step information. Cards can be displayed through various forms of card hosts, for example, they can be set to display on the desktop, on the negative one screen, or they can be embedded in various APPs or interactive scenarios to better meet user needs. Users can jump to the corresponding APP or a service page within the APP by clicking on the card, reducing the difficulty of application operation.
[0039] In a possible scenario, refer to Figure 1a, which is a schematic diagram of a card generation process. For example, the card generation process is generally implemented by the joint operation of the card user, card management service, card provider, and data provider.
[0040] (1) Card user (also called "card host"): It is the host application that displays the card content and controls the location of the card in the host. For example, the card user can generally be a desktop application or process of an electronic device, such as realizing the display of a card on a mobile phone desktop, etc. As shown in FIG1b, interface 100A is a mobile phone desktop interface, and area 101 shown in the mobile phone desktop interface includes cards for the calendar app and cards for the weather app. For another example, the card user can also be a host application such as a negative one-screen application or process, a notification bar process, etc. of an electronic device, as shown in FIG1b, interface 100B is a negative one-screen display interface, and area 102 shown in the negative one-screen display interface includes cards for mobile phone usage time, sports and health apps, calendar apps, and weather apps.
[0041] (2) Card Management Service: A resident agent service for managing cards added to the system, including the management and use of card objects, as well as periodic card refreshes. The card management service may include but is not limited to the following modules:
[0042] 2-1) Refresh Module: After a card is added, a scheduled task is started according to the card's refresh policy to periodically trigger the card's refresh. For example, a calendar app's cards can be updated daily to display the latest date information. Another example is a weather app's cards that can be updated in response to trigger events to display the latest weather information. Trigger events may include, but are not limited to, a user clicking on a weather app card, a desktop process displaying a desktop interface containing a weather app card, and so on.
[0043] 2-2) Cache module: After a card is added to the card management service, the card view information is cached so that the cached data can be directly returned the next time the card is retrieved, reducing latency.
[0044] 2-3) Lifecycle Management Module: Pauses card refresh when the card switches to the background or is blocked; and updates and cleans up card data when the card is upgraded or uninstalled.
[0045] 2-4) Object Management Module: manages the remote procedure call (RPC) objects of the card user, and is used for verification of user requests and callback processing after the card is updated.
[0046] 2-5) Communication Adaptation Layer: Responsible for RPC communication with card users and card providers.
[0047] (3) Card provider: a system application or third-party application that provides card layout and style, controls the card control layout and control click events, etc. The card provider may include but is not limited to the following modules:
[0048] 3-1) Card service module: Developers can use the onCreateForm instruction to create a card, the onUpdateForm instruction to update a card, and the onDeleteForm instruction to delete a card to enable the developed application to provide corresponding card services.
[0049] 3-2) Instance Management Module: implemented by the card provider developer, responsible for the persistent management of the card instances allocated by the card management service.
[0050] 3-3) Communication Adaptation Layer: Provided by the Software Development Kit (SDK), it is responsible for communicating with the card management service and is used to actively push card update data to the card management service.
[0051] Card users and card providers do not need to be resident. When a card user needs to add a card, delete a card, or request to update a card, the card management service will pull up the card provider to obtain the card information.
[0052] (4) Data provider: A server, system, or application that provides some type of specific data included in the card display content. For example, the card provider corresponding to the weather app card is the weather app, and the corresponding data provider can be the weather app, or a platform, system, or server that specifically provides weather data. For another example, the data provider corresponding to the card of a third-party weather app can be the weather app on a mobile phone; it can be understood that the weather app can be understood as a system application on the mobile phone.
[0053] In some scenarios, the card provider and the data provider can be different. For example, a health app can be the card provider, providing a card that includes a step counting function, while the data provider for this card is a sports health app. In this case, the card provider and the data provider are different. In other scenarios, the card provider and the data provider can be the same. For example, a sports health app can not only provide cards but also provide step counting through sensors and other devices.
[0054] In order to provide users with the latest information through components such as cards and desktop widgets, the information displayed on the cards needs to be refreshed in a timely manner. In conjunction with the scenario shown in Figure 1a, card information refresh usually requires the card management service to trigger the pull-up of the card provider and data provider. After receiving the updated information returned by the card provider and data provider, the card management service returns it to the card user, who then displays the refreshed information. However, each refresh of the card requires the pull-up of the card provider and data provider, and as the number of cards on the electronic device increases, the resulting memory usage and power consumption problems are also more serious.
[0055] In view of this, an embodiment of the present application provides a component refresh method. By setting a component data proxy function, the method can define a uniform resource identifier (URI) and the corresponding data format, and can receive and cache updated data published by component providers and / or data providers, as well as accept subscriptions from component users and push updated data to component users. Through this method, the life cycle of component users and component providers and / or data providers can be decoupled, and self-refresh can be achieved without relying on data source applications, thereby reducing memory usage and power consumption, and improving the performance of electronic devices.
[0056] The technical solutions in the embodiments of the present application can be applied to electronic devices, and the electronic devices can be any devices that support component functions. For example, the electronic devices can be electronic devices such as mobile phones, tablet computers, wearable devices (e.g., watches, bracelets, etc.), vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart home devices (e.g., smart TVs, smart speakers, etc.) that can display components on a desktop. It is understandable that the embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0057] The electronic devices to which the embodiments of the present application can be applied include but are not limited to electronic devices equipped with Or electronic devices with other operating systems. The electronic device may be, for example, the terminal device introduced in the above embodiments.
[0058] FIG2 shows a schematic diagram of the hardware structure of a possible electronic device. Wherein, the electronic device 200 includes components such as a radio frequency (RF) circuit 210, a power supply 220, a processor 230, a memory 240, an input unit 250, a display unit 260, an audio circuit 270, a communication interface 280, and a Wi-Fi module 290. Those skilled in the art will appreciate that the hardware structure of the electronic device 200 shown in FIG2 does not constitute a limitation on the electronic device 200. The electronic device 200 provided in the embodiment of the present application may include more or fewer components than shown, may combine two or more components, or may have different component configurations. The various components shown in FIG2 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application-specific integrated circuits.
[0059] The following is a detailed introduction to the various components of the electronic device 200 with reference to FIG. 2 :
[0060] The RF circuit 210 can be used to receive and transmit data during communications or calls. Specifically, after receiving downlink data from the base station, the RF circuit 210 sends it to the processor 230 for processing. Furthermore, it sends uplink data to the base station. Typically, the RF circuit 210 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, and the like.
[0061] In addition, the RF circuit 210 can also communicate with other devices via a wireless communication network. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0062] Wi-Fi technology is a short-range wireless transmission technology. The electronic device 200 can connect to an access point (AP) through the Wi-Fi module 290 to achieve access to the data network. The Wi-Fi module 290 can be used for receiving and sending data during the communication process. In an embodiment of the present application, when the electronic device 200 is a tablet computer, the tablet computer can synchronize data with other electronic devices through the Wi-Fi module 290. For example, the tablet computer can obtain the user's latest step count from the mobile phone, so that information that is more consistent with the user's actual step count can be displayed on the components of the sports health APP on the tablet computer.
[0063] The electronic device 200 can be physically connected to other devices via the communication interface 280. Optionally, the communication interface 280 is connected to the communication interface of the other device via a cable to achieve data transmission between the electronic device 200 and the other device.
[0064] The electronic device 200 can also implement communication services and interact with other electronic devices. Therefore, the electronic device 200 needs to have a data transmission function, that is, the electronic device 200 needs to include a communication module. Although Figure 2 shows communication modules such as the RF circuit 210, the Wi-Fi module 290, and the communication interface 280, it is understandable that the electronic device 200 contains at least one of the above components or other communication modules (such as a Bluetooth module) for implementing communication to perform data transmission.
[0065] For example, when the electronic device 200 is a mobile phone, the electronic device 200 may include the RF circuit 210, and may also include the Wi-Fi module 290, or may include a Bluetooth module (not shown in Figure 2); when the electronic device 200 is a tablet computer, the electronic device 200 may include the Wi-Fi module, or may include a Bluetooth module (not shown in Figure 2); when the electronic device 200 is a smart home device, the electronic device 200 may include the Wi-Fi module 290, or may include a Bluetooth module (not shown in Figure 2).
[0066] The memory 240 can be used to store software programs and modules. The processor 230 executes various functional applications and data processing of the electronic device 200 by running the software programs and modules stored in the memory 240. Optionally, the memory 240 may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system (mainly including the corresponding software programs or modules of the kernel layer, system layer, application framework layer and application layer).
[0067] In addition, the memory 240 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, or other volatile solid-state storage device. In the embodiment of the present application, the memory 240 may store data published by component providers and / or data providers for component users to refresh the component.
[0068] The input unit 250 may be configured to receive user input for editing operations on various types of data objects, such as numbers or characters, and to generate key signal inputs related to user settings and function control of the electronic device 200. Optionally, the input unit 250 may include a touch panel 251 and other input devices 252.
[0069] The touch panel 251, also known as a touch screen, can collect user touch operations on or near it (for example, operations performed by a user using a finger, stylus, or any other suitable object or accessory on or near the touch panel 251) and drive corresponding connected devices according to a pre-set program. In an embodiment of the present application, the touch panel 251 can collect user operations on or near it; for example, when the electronic device 200 is a mobile phone, the user operations can be used by the user to view, add, change, or delete components on the mobile phone interface.
[0070] Optionally, the other input devices 252 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, etc.
[0071] The display unit 260 can be used to display information input by the user or information provided to the user and various menus of the electronic device 200. The display unit 260 is the display system of the electronic device 200, which is used to present the interface and realize human-computer interaction. The display unit 260 may include a display panel 261. Optionally, the display panel 261 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In the embodiment of the present application, the display unit 260 can be used to display a desktop interface including components, or a negative one-screen interface, etc., and can also be used to display information after the component is refreshed, etc.
[0072] The processor 230 is the control center of the electronic device 200. It connects various components using various interfaces and lines, executes or runs software programs and / or modules stored in the memory 240, and calls data stored in the memory 240 to perform various functions of the electronic device 200 and process data, thereby realizing various services based on the electronic device 200. In the embodiment of the present application, the processor 230 can be used to implement the method provided in the embodiment of the present application.
[0073] The electronic device 200 also includes a power supply 220 (such as a battery) for powering various components. Optionally, the power supply 220 can be logically connected to the processor 230 through a power management system, thereby managing charging, discharging, and power consumption through the power management system.
[0074] As shown in Figure 2, the electronic device 200 also includes an audio circuit 270, a microphone 271 and a speaker 272, which can provide an audio interface between the user and the electronic device 200. The audio circuit 270 can be used to convert audio data into a signal that can be recognized by the speaker 272, and transmit the signal to the speaker 272, which is converted into a sound signal for output by the speaker 272. The microphone 271 is used to collect external sound signals (such as the sound of a person speaking, or other sounds, etc.), and convert the collected external sound signals into signals that can be recognized by the audio circuit 270 and send them to the audio circuit 270. The audio circuit 270 can also be used to convert the signal sent by the microphone 271 into audio data, and then output the audio data to the RF circuit 210 to send it to, for example, another electronic device, or output the audio data to the memory 240 for subsequent further processing.
[0075] Although not shown, the electronic device 200 may further include a camera, at least one sensor, etc., which will not be described in detail herein. The at least one sensor may include but is not limited to a pressure sensor, an air pressure sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a touch sensor, a temperature sensor, etc.
[0076] The operating system (OS) involved in the embodiments of the present application is the most basic system software running on the electronic device 200. The software system of the electronic device 200 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application use an operating system adopting a layered architecture as an example to illustrate the software structure of the electronic device 200.
[0077] Figure 3 is a block diagram of the software structure of an electronic device provided in an embodiment of the present application. As shown in Figure 3, the software structure of the electronic device can be a layered architecture. For example, the software can be divided 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 operating system is divided into five layers, from top to bottom, namely, the application layer, the application framework layer (framework, FWK), the runtime and system library, the kernel layer, and the hardware layer.
[0078] The application layer can include a series of application packages. As shown in Figure 3, the application layer can include camera, settings, skin modules, user interface (UI), third-party applications, etc. Among them, third-party applications can include wireless local area network (WLAN), music, call, Bluetooth, video, etc.
[0079] In one possible implementation, applications can be developed using Java by calling the application programming interface (API) provided by the application framework layer. Developers can use the application framework layer to interact with the underlying operating system layers (e.g., the hardware layer, kernel layer, etc.) to develop their own applications. The application framework layer primarily provides a series of services and management systems for the operating system.
[0080] The application framework layer provides an application programming interface and programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 3, the application framework layer can include an activity manager, a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and so on.
[0081] The activity manager is used to manage the life cycle of each application and provide common navigation back functions, providing an interactive interface for all program windows.
[0082] The window manager manages windowed applications. It can determine the display size, determine whether a status bar is present, lock the screen, and take screenshots. Content providers store and retrieve data and make it accessible to applications. This data can include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and phone books.
[0083] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0084] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).
[0085] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0086] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0087] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.
[0088] The core library consists of two parts: one containing the Java language's callable functions and the other containing the operating system's core libraries. The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0089] The system library can include multiple functional modules, such as a surface manager, a media framework, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).
[0090] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional and 3D layers for multiple applications.
[0091] The media framework supports playback and recording of a variety of common audio and video formats, as well as static image files. The media framework can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0092] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0093] A 2D graphics engine is a drawing engine for 2D drawings.
[0094] In some embodiments, a three-dimensional graphics processing library may be used to draw a three-dimensional motion trajectory image, and a two-dimensional graphics engine may be used to draw a two-dimensional motion trajectory image.
[0095] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0096] The hardware layer can include various sensors, such as accelerometers, gravity sensors, touch sensors, etc.
[0097] Typically, the electronic device 200 can run multiple applications simultaneously. In simpler cases, one application corresponds to one process, while in more complex cases, one application corresponds to multiple processes. Each process has a process ID.
[0098] It should be understood that in the embodiments of the present application, "at least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple. "Multiple" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships can 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 subsequent associated objects are in an "or" relationship.
[0099] In addition, it should be understood that, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0100] It should be understood that the hardware structure of the electronic device can be as shown in Figure 2, and the software system architecture can be as shown in Figure 3, wherein the software programs and / or modules corresponding to the software system architecture in the electronic device can be stored in the memory 240, and the processor 230 can run the software programs and applications stored in the memory 240 to execute the process of a component refresh method provided in an embodiment of the present application.
[0101] In order to facilitate understanding of a component refresh method provided by the present application, the following describes the implementation process of the method provided by the present application in combination with the contents shown in Figures 4 to 7. The embodiment of the present application is applicable to scenarios in which components are displayed on the desktop of an electronic device; wherein the components may be, for example, components in service cards, desktop widgets, etc. that require data refresh, and may be used to display services or content of interest to users on some display interfaces of electronic devices. It should be noted that the embodiment of the present application does not limit the style, type, display position, etc. of the components; taking cards as an example, the style of the cards may be 1×2 style, 2×2 style, and the color of the cards may be blue, red, etc.
[0102] In one possible embodiment, refer to FIG4 , which is a schematic diagram of a scenario for a component refresh method provided in an embodiment of the present application. In the following embodiments, a service card (referred to as a "card") is used as an example. The scenario may include: a card user 401, a card management service 402, a card data agent 403, a card provider 404A, and a data provider 404B. In FIG4 , the card user 401, the card management service 402, the card provider 404A, and the data provider 404B are shown. For example, the card user 401 may initiate a scheduled task based on the card's refresh policy to periodically trigger a card refresh; in response to the card user 401's refresh request, the card management service 402 may subscribe to or query data from the card data agent 403; the card provider 404A and / or the data provider 404B may publish data to the card data agent 403; and after receiving the return data from the card data agent 403, the card management service 402 may continue to return data to the card user 401. As can be seen from FIG4 , in the embodiment of the present application, a card data agent 403 may also be provided. The card data agent 403 may be used to provide, but not limited to, the following capabilities:
[0103] (1) Define a uniform resource identifier (URI) and the corresponding data format. In some possible embodiments, the card data agent 403 can implement the agent of various types of cards by defining the URI and the corresponding data format. For example, the URI of the card of the weather app and the weather data format corresponding to the weather app can be defined; the URI of the card of the calendar app and the date data format corresponding to the calendar app can also be defined; the URI of the card of the sports health app and the step data format corresponding to the sports health app can also be defined. In this way, the card management service 402 can subscribe to data from the card data agent 403 based on the URI of the data to be subscribed; and the card provider 404A and / or the data provider 404B can use the defined URI and the corresponding data format to publish the updated data to the card data agent 403.
[0104] In some possible embodiments, data is typically stored in a database (key-value) in a key-value pair format; wherein the key can be understood as a URI, such as the data of a sports health APP, and the value can be understood as the specific data corresponding to the key, such as json (a data format) data, such as the number of steps (stepcount: 9999), date (date: 05 / 05), and health status (healthstate: normal). Exemplarily, the card management service 402 can transmit a URI to the card data agent 403, and receive the callback data through a callback function (callback); taking the card provider 404A as an example, when publishing data, the card provider 404A can transmit a URI and the specific data corresponding to the URI, so that the card data agent 403 can store the data published by the card provider 404A for subscription by the card management service 402.
[0105] (2) Providing a standardized SDK interface; the SDK interface can be used for subscription, query, and access to data publications. Referring to the module diagram shown in FIG1a , the card data agent 403 can also provide a communication adaptation layer. This communication adaptation layer, which can be provided by the SDK, is responsible for communicating with the card provider 404A and / or the data provider 404B to receive data published by the card provider 404A and / or the data provider 404B. It can also be responsible for communicating with the card management service 402 to receive data subscriptions from the card management service 402 and send refreshed data to the card management service 402.
[0106] (3) Providing data storage. In some possible embodiments, the card data agent 403 may also provide centralized storage or distributed storage. For example, the card data agent 403 may store the following data: number of steps, power (including but not limited to local devices and distributed devices), weather, heart rate, calendar, etc.
[0107] (4) Providing necessary data access permission checking capabilities. In some embodiments, the card data agent 403 can allow some verified data providers 404B to publish data, thereby ensuring the security and accuracy of card data refresh.
[0108] Among them, the card user 401 can be understood as the host application of the card, for example, it can be a desktop APP or desktop process, a negative one screen APP or a negative one screen process, etc.
[0109] In some possible embodiments, after creating a card, card user 401 may trigger a subscription request to be sent to card data agent 403 via card management service 402. In one optional embodiment, the subscription request may include a card identifier, which can be used by card data agent 403 to return the subscribed card data to card user 401 based on the card identifier. In another optional embodiment, the subscription request may include a card identifier and a subscribed data type, which can be used to indicate the specific data type of the card to which card user 401 is subscribing, such as a step count data type or a date data type.
[0110] In another possible embodiment, see Figure 5, which illustrates another scenario of a component refresh method provided by an embodiment of the present application. This scenario may include the card user 401, card provider 404A, and data provider 404B shown in Figure 4. The card data proxy 403 in this scenario may be integrated into a card management service, for example, referred to as card management service 402'. It is understood that card management service 402' can implement not only the logical functions of card management service 402 described in Figure 4, but also the logical functions of card data proxy 403 described in Figure 4. For example, card user 401 may initiate a scheduled task based on the card's refresh policy to periodically trigger card refreshes. Card management service 402' may receive refresh requests from card user 401 and, in response to these requests, perform local data subscription and query. Card provider 404A and / or data provider 404B may publish data to card management service 402'. Upon detecting the presence of newly published data in the local cache, card management service 402' may return the data to card user 401. The logical functions of the card management service 402 ′ can refer to the logical functions of the card management service 402 and the card data agent 403 described in FIG. 4 , and will not be described in detail here.
[0111] Taking the scenario described in FIG4 as an example, FIG6 is a flow chart of a component refresh method provided by an embodiment of the present application. The flow may include the following steps:
[0112] Step 601a: Sports Health publishes data. In some possible embodiments, the Sports Health app can serve as the data provider for the card corresponding to the Sports Health app. In the embodiment of the present application, the Sports Health app can promptly publish the latest step count to the card data agent in response to changes in the step count.
[0113] Step 601b: The power management system publishes the current system power. In some possible embodiments, the power management data source may be the data provider for the card corresponding to the power management data source. In the embodiment of the present application, the power management data source may be, for example, the operating system of the electronic device. The power management data source may promptly publish the current system power to the card data agent in response to changes in power.
[0114] It is understandable that after the card data agent receives the data published by the data provider through step 601a or step 601b, it can cache the data.
[0115] Step 602: The card provider sets a refresh policy. In some possible embodiments, the card provider can set a refresh policy based on the data type, and can publish data according to the refresh policy. For example, the refresh policy can be based on a period or time. For example, the card corresponding to the calendar app can set a refresh policy based on a time point, and the card corresponding to the calendar app can be updated at 12:00 AM every day. For another example, the refresh policy can also be based on a trigger event. The trigger event may include, but is not limited to: the user clicking on the card operation instruction, the desktop process displaying the desktop interface including the card trigger event, etc.
[0116] Step 603: The card data agent detects that the refresh policy is satisfied. In some possible embodiments, upon detecting the user's operation of adding a card in the desktop process, the desktop process can subscribe to data from the card data agent in response to the operation. The desktop process can carry the URI corresponding to the card when subscribing to data from the card data agent based on the specific type of the card. For example, if the card is a card for a sports health app, the URI can be the data of the sports health app. In this way, at least one data corresponding to the data format defined by the sports health app can be obtained, such as but not limited to: "stepcount: 9999", "date: 05 / 05", and "healthstate: normal".
[0117] In other possible embodiments, after receiving data published by the card provider and / or data provider, the card data agent may also return the received published data to the card user who subscribes to the data based on the card user's subscription event for the data.
[0118] Step 604a: The card data agent refreshes the step count to the desktop process.
[0119] Step 604b: The card data agent refreshes the current system power to the desktop process.
[0120] Step 605: The desktop process updates the card.
[0121] The method provided by the embodiments of the present application can solve the problem of requiring the card provider process to be launched for card refresh, thereby reducing the power consumption and memory issues caused by card refresh. Furthermore, the method can decouple the lifecycles of the card user and the card provider, thereby enabling self-refresh independent of the data provider. Furthermore, by providing a card data proxy, the method can eliminate the need for the card provider to integrate the SDK of other data providers. The card data proxy can be used to connect the card provider and the data provider, thereby reducing development complexity.
[0122] In one possible implementation, FIG7 is another flow chart of a component refresh method provided in an embodiment of the present application. The method can be applied to an electronic device including components, and the process may include the following steps:
[0123] Step 701: Receive component data published by the data provider of the component.
[0124] In an optional embodiment, the electronic device may include functional units of a component data agent and a component management service; in this scenario, the component data agent may be responsible for receiving the component data.
[0125] In another optional embodiment, the electronic device may include a functional unit integrating a component data agent and a component management service; in this scenario, the integrated functional unit may be responsible for receiving the component data.
[0126] Step 702: In response to a subscription event for the component data, the component data is transmitted to a component user, and the component user is used to refresh the component data and display it in the component; wherein the subscription event is used to instruct the component user to subscribe to the refresh of the component data.
[0127] In an optional embodiment, in a scenario where an electronic device includes functional units of a component data proxy and a component management service, a component user can subscribe to component data from the component data proxy through the component management service. In this way, the component data proxy can return the component data sent by the data provider to the component user through the component management service. Exemplarily, when sending a subscription request, the component user can indicate the component identifier, or can indicate the component identifier and the type of data subscribed; similarly, when publishing data, the data provider can indicate the component identifier, or can indicate the component identifier and the type of data included in the component. Therefore, the card data proxy can achieve accurate component refresh based on the component identifier, or based on the component identifier and the data type.
[0128] In another optional embodiment, in a scenario where the electronic device includes a functional unit that integrates a component data agent and a component management service, a component user can subscribe to component data from the integrated functional unit.
[0129] Based on the above embodiments, the present application also provides an electronic device, which includes multiple functional modules; the multiple functional modules interact with each other to implement the functions performed by the electronic device in each method described in the embodiments of the present application. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on the specific implementation. For example, steps 601a to 605 performed by the electronic device in the embodiment shown in Figure 6 are executed; it can be understood that the card provider and card data agent shown in Figure 6 are logical functional units in the electronic device, which can be implemented by the processor in the electronic device, and the desktop process, sports health, power management, etc. are applications in the electronic device, which can also be implemented by the processor in the electronic device. Alternatively, steps 701 to 702 performed by the electronic device in the embodiment shown in Figure 7 are executed. It can be understood that the electronic device can also include a logical functional unit of the card management service, or a functional unit integrating the card management service and the card data agent.
[0130] Based on the above embodiments, the present application further provides an electronic device, comprising at least one processor and at least one memory, wherein the at least one memory stores computer program instructions. When the electronic device is running, the at least one processor performs the functions performed by the electronic device in each method described in the embodiments of the present application. For example, steps 601a to 605 performed by the electronic device in the embodiment shown in FIG6 are executed; it can be understood that the card provider and card data agent shown in FIG6 are logical functional units in the electronic device, which can be implemented by the processor in the electronic device, and the desktop process, sports health, power management, etc. are applications in the electronic device, which can also be implemented by the processor in the electronic device. Alternatively, steps 701 to 702 performed by the electronic device in the embodiment shown in FIG7 are executed. It can be understood that the electronic device can also include a logical functional unit of a card management service, or a functional unit integrating the card management service and the card data agent. Based on the above embodiments, the present application further provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, causes the computer to perform the methods described in the embodiments of the present application.
[0131] Based on the above embodiments, the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the methods described in the embodiments of the present application.
[0132] Based on the above embodiments, the present application further provides a chip, which is used to read a computer program stored in a memory to implement the various methods described in the embodiments of the present application.
[0133] Based on the above embodiments, the present application provides a chip system, which includes a processor for supporting a computer device to implement the various methods described in the embodiments of the present application. In one possible design, the chip system also includes a memory, which is used to store the necessary programs and data for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices. It should be understood by those skilled in the art that the embodiments of the present application can be provided as a method, system, or computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0135] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0137] Obviously, those skilled in the art may make various modifications and variations to this application without departing from the scope of protection of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A component refresh method, characterized in that: include: Receive component data published by a data provider of the component; In response to a subscription event to the component data, the component data is transmitted to a component user, and the component user is used to refresh the component data and display it in the component; wherein the subscription event is used to instruct the component user to subscribe to the refresh of the component data.
2. The method according to claim 1, characterized in that The data provider is an application APP, a system or a server; wherein the APP includes the APP to which the component belongs, or the APP associated with the component data of the component.
3. The method according to claim 1 or 2, characterized in that: The transmitting the component data to the component user comprises: The component data is transmitted to a component user through a component management service, and the component management service is used to manage the component.
4. The method according to any one of claims 1 to 3, characterized in that Before transmitting the component data to the component user in response to the subscription event of the component data, the method further includes: The subscription event is detected, the subscription event is used to indicate that a subscription request sent by the component user is received, the subscription request includes a component identifier of the component, and the subscription request is used to indicate a subscription to a refresh of the component based on the component identifier.
5. The method according to claim 4, characterized in that The subscription request also includes the subscribed data type.
6. The method according to any one of claims 1 to 5, characterized in that The component is a service card or a widget.
7. The method according to any one of claims 1 to 6, characterized in that The user of the component is the host APP.
8. The method according to claim 7, characterized in that The host APP includes one or more of the following APPs: Desktop APP, or negative one screen APP, notification bar APP.
9. An electronic device, characterized in that: The system comprises at least one processor coupled to at least one memory, wherein the at least one processor is configured to read a computer program stored in the at least one memory to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 8.
11. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Express parcel widget and control method based on express parcel widget
CN113721805A
Widget loading method and device, equipment and storage medium
CN115309470A
Card interface updating method and device, electronic equipment and storage medium
CN115756534A
Actionable widget cards
US20180174229A1
Method and device for releasing and updating desktop application component
WO2017107851A1
