CN116700826A - Widget starting method, device, equipment and computer readable storage medium - Google Patents

Widget starting method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN116700826A
CN116700826A CN202310636460.2A CN202310636460A CN116700826A CN 116700826 A CN116700826 A CN 116700826A CN 202310636460 A CN202310636460 A CN 202310636460A CN 116700826 A CN116700826 A CN 116700826A
Authority
CN
China
Prior art keywords
widget
data
application
broadcast request
starting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310636460.2A
Other languages
Chinese (zh)
Inventor
郑彩虹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wutong Chelian Technology Co Ltd
Original Assignee
Beijing Wutong Chelian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wutong Chelian Technology Co Ltd filed Critical Beijing Wutong Chelian Technology Co Ltd
Priority to CN202310636460.2A priority Critical patent/CN116700826A/en
Publication of CN116700826A publication Critical patent/CN116700826A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a widget starting method, a device, equipment and a computer readable storage medium, belonging to the technical field of terminals, wherein the method comprises the following steps: storing application data for providing a first application of the target widget in a case of closing the target widget; acquiring a first dynamic broadcast request for starting a target widget, wherein the execution priority of the first dynamic broadcast request is higher than that of a static broadcast queue, and the static broadcast queue comprises a plurality of static broadcast requests to be started; based on the first dynamic broadcast request, before executing the static broadcast request in the static broadcast queue, acquiring first widget data for starting the target widget according to the stored application data of the first application; the targeted widget is activated based on the first widget data. The method ensures that the starting of the widget does not need to wait in a static broadcast queue, can accelerate the starting speed of the widget and improves the starting experience of the terminal.

Description

Widget starting method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for widget startup.
Background
Widgets (widgets) are widgets of one application that may be embedded into other applications for use. For example, the widget may be a widget of an application such as a clock, a memo, or a weather forecast, and the widget may be added to a desktop of the terminal for use, thereby increasing the functionality of the desktop.
In the related art, a terminal acquires broadcast requests from various applications in a starting-up stage, wherein the broadcast requests comprise broadcast requests for starting up a widget, the terminal puts all the broadcast requests into a static broadcast request queue according to the acquisition time sequence, sequentially executes each broadcast request, and when the execution of the broadcast requests for starting up the widget is completed, the widget is started up.
However, since the number of broadcast requests in the static broadcast request queue is large in the terminal start-up stage, it takes much time to wait for the completion of the execution of the broadcast request before the broadcast request for starting the widget, resulting in a slow widget start-up speed.
Disclosure of Invention
The application provides a widget starting method, a widget starting device, widget starting equipment and a computer readable storage medium, which can solve the problems in the related technology.
In a first aspect, a widget launching method is provided, the method including: under the condition of closing the target widget, storing application data of a first application corresponding to the target widget, wherein the first application is an application for providing the target widget; acquiring a first dynamic broadcast request for starting a target widget, wherein the execution priority of the first dynamic broadcast request is higher than that of a static broadcast queue, and the static broadcast queue comprises a plurality of static broadcast requests to be started; based on the first dynamic broadcast request, before executing the static broadcast request in the static broadcast queue, acquiring first widget data for starting the target widget according to the stored application data of the first application; the target widget is started according to the first widget data.
In one possible implementation, obtaining a first dynamic broadcast request for launching a target widget includes: starting a process of a second application, wherein the second application is an application for displaying the target widget; and acquiring a dynamic broadcast request initiated by the second application aiming at the target widget for starting the target widget.
In one possible implementation, after the process of starting the second application, the method further includes: registering a listener for the second application, the listener being for the second application to listen for widget data; starting the target widget according to the first widget data, including: and under the condition that the listener listens to the first widget data, loading and displaying the first widget data at the position of the target widget in the display interface of the second application.
In one possible embodiment, acquiring first widget data for launching a target widget according to stored application data of a first application includes: extracting first data from application data of a first application for the first data meeting a quick start condition, wherein the quick start condition comprises static data or a change period of the data is larger than a time interval between closing time and starting time; and acquiring second data which does not meet the quick start condition in the first widget data based on the running data of the first application.
In one possible embodiment, before acquiring the second data based on the running data of the first application, the method further includes: starting a process of the first application, and registering a dynamic broadcast request receiver for the first application, wherein the dynamic broadcast request receiver is used for receiving a dynamic broadcast request by the first application; and receiving the running data of the first application sent by the first application based on the first dynamic broadcast request under the condition that the dynamic broadcast request receiver receives the first dynamic broadcast request.
In one possible embodiment, the first widget data includes at least one of display data indicating at least one of a layout, an interface size, or control data of the target widget, the control data including at least one of a type, a position, an icon, a color, and content of each control included in the target widget.
In one possible embodiment, after the target widget is started according to the first widget data, the method further includes: acquiring a second dynamic broadcast request for updating the target widget, wherein the execution priority of the second dynamic broadcast request is higher than that of the static broadcast queue, and the second dynamic broadcast request comprises an operation instruction; based on the second dynamic broadcast request, acquiring second widget data for updating the target widget before executing the static broadcast request in the static broadcast queue; and updating the target widget according to the second widget data, wherein the second widget data comprises response data corresponding to the operation instruction.
In a second aspect, there is provided a widget launching device, the device comprising:
the storage module is used for storing application data of a first application corresponding to the target widget under the condition of closing the target widget, wherein the first application is an application for providing the target widget;
the system comprises a first acquisition module, a second acquisition module and a first control module, wherein the first acquisition module is used for acquiring a first dynamic broadcast request for starting a target widget, the execution priority of the first dynamic broadcast request is higher than that of a static broadcast queue, and the static broadcast queue comprises a plurality of static broadcast requests to be started;
the second acquisition module is used for acquiring first widget data for starting the target widget according to the stored application data of the first application before executing the static broadcast request in the static broadcast queue based on the first dynamic broadcast request;
and the starting module is used for starting the target widget according to the first widget data.
In one possible implementation manner, the first obtaining module is used for starting a process of a second application, and the second application is an application for displaying the target widget; and acquiring a dynamic broadcast request initiated by the second application aiming at the target widget for starting the target widget.
In one possible embodiment, the apparatus further comprises: the registration module is used for registering a monitor for the second application, and the monitor is used for the second application to monitor the widget data; and the starting module is used for loading and displaying the first widget data at the position of the target widget in the display interface of the second application under the condition that the monitor monitors the first widget data.
In one possible implementation manner, the second obtaining module extracts, for the first data meeting the rapid start condition in the first widget data, the first data in the application data of the first application, where the rapid start condition includes static data or a period of change of the data is greater than a time interval between the off time and the start time; and acquiring second data which does not meet the quick start condition in the first widget data based on the running data of the first application.
In one possible embodiment, the apparatus further comprises: the registration module is used for starting the process of the first application, registering a dynamic broadcast request receiver for the first application, wherein the dynamic broadcast request receiver is used for receiving the dynamic broadcast request by the first application; the device also comprises a receiving module, which is used for receiving the running data of the first application sent by the first application based on the first dynamic broadcast request under the condition that the dynamic broadcast request receiver receives the first dynamic broadcast request.
In one possible embodiment, the first widget data includes at least one of display data indicating at least one of a layout, an interface size, or control data of the target widget, the control data including at least one of a type, a position, an icon, a color, and content of each control included in the target widget.
In one possible implementation manner, the first obtaining module is further configured to obtain a second dynamic broadcast request for updating the target widget, where an execution priority of the second dynamic broadcast request is higher than an execution priority of the static broadcast queue, and the second dynamic broadcast request includes an operation instruction; the second acquisition module is further used for acquiring second widget data for updating the target widget before executing the static broadcast request in the static broadcast queue based on the second dynamic broadcast request; the starting module is further used for updating the target widget according to second widget data, wherein the second widget data comprises response data corresponding to the operation instruction.
In a third aspect, there is also provided a computer device, the computer device including a processor and a memory, the memory storing at least one program code, the at least one program code being loaded and executed by the processor to cause the computer device to implement the widget launching method according to any one of the above.
In a fourth aspect, there is also provided a computer readable storage medium having stored therein at least one program code loaded and executed by a processor to cause a computer to implement the widget launching method according to any one of the above.
In a fifth aspect, there is also provided a computer program product or computer program comprising 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 the processor executes the computer instructions so that the computer device performs any of the widget launching methods described above.
The technical scheme provided by the application at least has the following beneficial effects:
according to the technical scheme provided by the application, the widget is started through the dynamic broadcast request, and the execution priority of the dynamic broadcast request is higher than that of the static broadcast queue, namely, the widget is started preferentially before the static broadcast request in the static broadcast queue is executed. Therefore, the starting of the widget does not need to wait in a static broadcast queue, the starting speed of the widget is accelerated, and the starting experience of the terminal is improved. In addition, the application data of the first application is stored in advance, so that the efficiency of acquiring the first widget data for starting the target widget is higher, and the starting speed of the widget is further increased.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of a widget start-up procedure provided in the related art;
FIG. 2 is a schematic diagram of an implementation environment of a widget launching method according to an embodiment of the present application;
FIG. 3 is a flowchart of a widget launching method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a widget start-up procedure provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a widget launching device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
Along with the increasing popularity of widget (widget), during the starting process of a terminal, the widget is used as a widget displayed on a terminal desktop, so that the starting speed of the widget is related to the starting speed of the terminal desktop, that is, the starting experience of the terminal is directly affected. Therefore, how to increase the start-up speed of the widget is a urgent problem to be solved.
In the related art, referring to fig. 1, fig. 1 is a schematic diagram of a widget start process in the related art according to an embodiment of the present application. As shown in fig. 1, a host application (host app) (e.g., desktop) for displaying a widget sends a widget initialization broadcast request to a system service, the system service adds the widget initialization broadcast request to a static broadcast request queue including a plurality of broadcast requests, and executes the widget initialization broadcast request according to the queue order of the static broadcast request queue, and after the execution of a broadcast request before the widget initialization broadcast request is completed, executes the widget initialization broadcast request; further, a provider application (provider app) for providing a widget (for example, the clock, the memo, or the weather forecast) receives the widget initialization broadcast request through the static broadcast request receiver, and sends widget data corresponding to the widget initialization broadcast request to the host app; thus, after receiving the widget data, the host app realizes the start of the widget by loading the widget data.
However, since the widget needs to be started to wait for the execution of the broadcast requests in the static broadcast request queue before the widget is initialized, the number of the static broadcast requests from each application in the starting stage of the terminal is larger, that is, the number of the broadcast requests in the static broadcast request queue before the widget is initialized, so that the time spent by the widget waiting for starting is longer, and the starting speed of the widget is slower.
The embodiment of the application provides a widget starting method, which sets a broadcasting request for starting a widget as a dynamic broadcasting request, and the dynamic broadcasting request is not required to be executed according to the sequence of a static broadcasting queue, so that the widget can be started quickly without waiting for the sequential execution time in the static broadcasting queue, and the starting speed of the widget is improved.
FIG. 2 is a schematic diagram of an implementation environment of a widget launching method according to an embodiment of the present application. The implementation environment comprises: a computer device 101. In one possible implementation, the computer device 101 includes a desktop application that correspondingly includes at least one widget, which may be a widget of an application such as a clock, a memo, or a weather forecast. By adopting the method provided by the embodiment of the application, at least one widget on the desktop can be started quickly in the starting-up stage of the computer equipment 101.
Wherein the computer device 101 may be referred to as a terminal. By way of example, the terminal may be any electronic product that can interact with a user by one or more of a keyboard, touchpad, touch screen, remote control, voice interaction, or handwriting device, such as a personal computer (Personal Computer, PC), smart phone, personal digital assistant (Personal Digital Assistant, PDA), wearable device, palm PC (PPC), tablet, smart car set, etc.
Those skilled in the art will appreciate that the computer device 101 described above is by way of example only, and that other computer devices, now known or hereafter developed, may be adapted for use with the present application and are intended to be within the scope of the present application and are hereby incorporated by reference.
The embodiment of the application provides a widget starting method, which can be applied to the implementation environment shown in fig. 2, for example, the widget starting method is executed by the computer equipment 101. As shown in fig. 3, the widget launching method provided in the embodiment of the present application includes, but is not limited to, the following steps 301 to 304.
In step 301, under the condition of closing the target widget, storing application data of a first application corresponding to the target widget, wherein the first application is an application for providing the target widget.
In the embodiment of the application, the first application is an application for providing the target widget, and the first application is a clock application under the condition that the target widget is a clock widget. And under the condition that the target widget is closed and a shutdown instruction can be triggered for the computer equipment, storing application data generated when the first application runs under the shutdown time. For example, taking the first application as a clock application as an example, the application data of the clock application may be a date, a week, a time, a region, a weather, etc. under the shutdown time.
Step 302, a first dynamic broadcast request for starting a target widget is acquired, wherein the execution priority of the first dynamic broadcast request is higher than that of a static broadcast queue, and the static broadcast queue comprises a plurality of static broadcast requests to be started.
In the embodiment of the application, the target widget is a widget displayed in a second application, namely, the second application is an application for displaying the target widget. For example, the second application may be a desktop application, and the target widget may be a widget such as a clock, a memo, or a weather forecast. The embodiment of the application does not limit the number of the target widgets displayed by the second application, and when the number of the target widgets is multiple, multiple first dynamic broadcast requests for starting the multiple target widgets are acquired, the multiple first dynamic broadcast requests correspond to multiple first applications, and the multiple first dynamic broadcast requests can be executed sequentially.
In the starting process of the terminal, the process of each application running on the terminal starts to start, so that the system service receives the static broadcast request sent by each application. Because the static broadcast requests sent by each application are all queued in the static broadcast queue and the static broadcast requests queued in the starting-up stage of the terminal are more, especially on the terminal with poor hardware performance, the first application cannot receive the static broadcast request of the second application for a long time, so that the second application always displays the default interface of the target widget within a certain period of starting up, for example, about 1 minute, and the clicking operation on the target widget cannot be responded, thereby influencing the starting-up experience.
In the embodiment of the present application, the manner of acquiring the first dynamic broadcast request for starting the target widget may be to start a process of the second application; a first dynamic broadcast request initiated by a second application for a target widget for launching the target widget is obtained. The execution priority of the first dynamic broadcast request is higher than that of the static broadcast queue, namely the first dynamic broadcast request does not need to be queued for execution in the static broadcast queue, and the response speed of the target widget in the starting-up stage is effectively improved.
Optionally, after the process of the second application is started, the system service also registers a listener for the second application, e.g., the second application registers a listener with the system service. The monitor registered by the second application is used for monitoring the change of the first widget data in the system service by the second application, so that when the first application sends the updated first widget data, the second application can monitor the updated first widget data so as to timely and synchronously display the updated first widget data on a display interface of the second application.
Step 303, based on the first dynamic broadcast request, acquiring first widget data for starting the target widget according to the stored application data of the first application before executing the static broadcast request in the static broadcast queue.
In the embodiment of the application, under the condition that the first dynamic broadcasting request is acquired, the first dynamic broadcasting request is not put into the static broadcasting queue, but is prioritized over the static broadcasting queue, and the first widget data required for starting the target widget is directly acquired according to the stored application data of the first application.
Optionally, acquiring the first widget data for starting the target widget according to the stored application data of the first application includes: extracting first data from application data of a first application for the first data meeting a quick start condition, wherein the quick start condition comprises static data or a change period of the data is larger than a time interval between closing time and starting time; and acquiring second data which does not meet the quick start condition in the first widget data based on the running data of the first application. The first widget data may include at least one of first data and second data.
The first data meets the quick start condition, and the first data is static data or the change period of the data is larger than the time interval between the closing time and the starting time. The static data may refer to data that does not change in real time over time, and thus, the static data at power on is generally the same as the static data at power off. For example, the target widget is a memo, and the content of the memo is usually not changed in real time along with time, so that the content of the memo is static data in the widget data of the memo, and the content of the memo at the time of starting and the content of the memo at the time of shutting down are the same.
For data that may change in real time over time, it may also be considered static data if the period of change in the data is greater than the time interval between the off time and the on time. For example, the target widget is a date, and the period of change of the date is one day, and if the time interval between the off time and the on time is less than one day, the date at the time of startup is the same as the date at the time of shutdown. The first data meeting the quick starting condition can be directly obtained from the application data stored during shutdown, so that the first data obtaining efficiency is higher, and the starting speed of the target widget is further improved. Especially, the starting speed of the target widget can be effectively improved for the case that the first widget data for starting the target widget only comprises the first data.
For the second data which does not meet the quick start condition in the first widget data, the second data needs to be acquired based on the running data of the first application, and the running data of the first application needs to be acquired after the first application is run. Optionally, before acquiring the second data based on the running data of the first application, a process of the first application is started first, and a dynamic broadcast request receiver is registered for the first application. The dynamic broadcast request receiver is used for receiving a first dynamic broadcast request by the first application so that the first application can timely receive the first dynamic broadcast request sent by the second application and used for starting the target widget.
In the case that the first application registers the dynamic broadcast request receiver, the process of acquiring the second data based on the running data of the first application may be that, in the case that the dynamic broadcast request receiver of the first application receives the first dynamic broadcast request, the first application actively transmits the first widget data required for starting the target widget, so that the system service receives the running data of the first application transmitted by the first application based on the first dynamic broadcast request. The running data of the first application comprises second data in the first widget data, or the running data of the first application comprises the second data and the first data in the first widget data.
In an embodiment of the present application, the first widget data may include at least one of display data or control data, where the display data indicates at least one of a layout, an interface size, or control data of the target widget, and the control data includes at least one of a type, a position, an icon, a color, a content, and the like of each control included in the target widget.
Step 304, the target widget is started according to the first widget data.
In the case that the second application registers the listener, the process of starting the target widget according to the first widget data may be to load and display the first widget data at the location of the target widget in the display interface of the second application when the listener listens to the first widget data. Thus, the quick start of the target widget is realized.
Optionally, after the target widget is started according to the first widget data, the method further includes: acquiring a second dynamic broadcast request for updating the target widget, wherein the execution priority of the second dynamic broadcast request is higher than that of the static broadcast queue, and the second dynamic broadcast request comprises an operation instruction; based on the second dynamic broadcast request, acquiring second widget data for updating the target widget before executing the static broadcast request in the static broadcast queue; and updating the target widget according to the second widget data, wherein the second widget data comprises response data corresponding to the operation instruction. The method can improve the starting speed of the target widget in the starting process of the terminal, and can also improve the updating response speed of the target widget in the starting process of the terminal.
Wherein, for the embodiment of obtaining the second dynamic broadcast request for updating the target widget, refer to the embodiment of obtaining the first dynamic broadcast request for starting the target widget in step 302; based on the second dynamic broadcast request, before executing the static broadcast request in the static broadcast queue, the embodiment of acquiring the second widget data for updating the target widget may refer to the embodiment of acquiring the first widget data for starting the target widget according to the stored application data of the first application before executing the static broadcast request in the static broadcast queue based on the first dynamic broadcast request in step 303; according to an embodiment of updating the target widget based on the second widget data, reference may be made to an embodiment of starting the target widget based on the first widget data in step 304. And will not be described in detail herein.
For example, taking the example that the first piece of data includes the second piece of data as an example, referring to fig. 4, fig. 4 is a schematic diagram of a widget start procedure provided in an embodiment of the present application, where a widget dynamic broadcast request corresponds to a first dynamic broadcast request in the embodiment of the present application. As shown in fig. 4, a host application (host app) (e.g., desktop) for displaying a widget sends a widget dynamic broadcast request and a static broadcast request corresponding to other applications to a system service, and the system service adds the static broadcast request to a static broadcast request queue including a plurality of broadcast requests, and executes the static broadcast request according to the queue order of the static broadcast request queue; the system service adds the widget dynamic broadcast request into a dynamic broadcast request queue, wherein the dynamic broadcast request queue comprises n broadcasts, n is a positive integer, and the broadcasts in the dynamic broadcast request queue are directly executed without queuing; further, a provider application (provider app) for providing the widget receives the widget dynamic broadcast request through a dynamic broadcast request receiver, and sends widget data corresponding to the widget dynamic broadcast request to the host app; thus, after receiving the widget data, the host app realizes the start of the widget by loading the widget data.
The widget starting method provided by the embodiment of the application is illustrated by combining the widget starting process shown in fig. 4. The host app corresponds to the second application in the embodiment of the present application, and the provider app corresponds to the first application in the embodiment of the present application. Illustratively, host app for displaying widgets loads the widget default layout; the system service starts a process for providing provider apps of widgets; the provider app registers a dynamic broadcast request receiver with a system service; the host app registers a monitor to the system service, and the monitor is used for receiving widget data of the provider app and transmitting a dynamic broadcast request capable of enabling the provider app to actively update the widget data; a dynamic broadcast request receiver of the provider app receives a dynamic broadcast request of the host app and sends widget data to a system service; the host app obtains widget data sent by the provider app through a monitor.
Since the host app sends the widget dynamic broadcast request to the system service when registering the listener for receiving the widget data provided by the provider app, the system service can directly execute the widget dynamic broadcast request, so that the provider app actively provides updated widget data. The provider app registers a dynamic broadcast request receiver when the process is started, so that the provider app can receive a widget dynamic broadcast request in a dynamic broadcast queue of a system service.
According to the method provided by the embodiment of the application, the widget is started through the dynamic broadcast request, and the execution priority of the dynamic broadcast request is higher than that of the static broadcast queue, namely, the widget is started preferentially before the static broadcast request in the static broadcast queue is executed. Therefore, the starting of the widget does not need to wait in a static broadcast queue, so that the queuing time caused by the sequential execution of the static broadcast request in the widget starting process is avoided, the starting speed of the widget is accelerated, and the starting experience of the terminal is improved. In addition, the application data of the first application is stored in advance, so that the efficiency of acquiring the first widget data for starting the target widget is higher, and the starting speed of the widget is further increased.
Referring to fig. 5, an embodiment of the present application provides a widget launching device, including:
the storage module 501 is configured to store application data of a first application corresponding to a target widget when the target widget is closed, where the first application is an application for providing the target widget;
a first obtaining module 502, configured to obtain a first dynamic broadcast request for starting a target widget, where an execution priority of the first dynamic broadcast request is higher than an execution priority of a static broadcast queue, where the static broadcast queue includes a plurality of static broadcast requests to be started;
A second obtaining module 503, configured to obtain, based on the first dynamic broadcast request, first widget data for starting the target widget according to the stored application data of the first application before executing the static broadcast request in the static broadcast queue;
a starting module 504, configured to start the target widget according to the first widget data.
In one possible implementation, the first obtaining module 502 is configured to start a process of a second application, where the second application is an application for displaying the target widget; and acquiring a dynamic broadcast request initiated by the second application aiming at the target widget for starting the target widget.
In one possible embodiment, the apparatus further comprises: the registration module is used for registering a monitor for the second application, and the monitor is used for the second application to monitor the widget data; and the starting module is used for loading and displaying the first widget data at the position of the target widget in the display interface of the second application under the condition that the monitor monitors the first widget data.
In one possible implementation manner, the second obtaining module 503 extracts, for the first data satisfying the quick start condition in the first widget data, the first data in the application data of the first application, where the quick start condition includes static data or a period of change of the data is greater than a time interval between the off time and the start time; and acquiring second data which does not meet the quick start condition in the first widget data based on the running data of the first application.
In one possible embodiment, the apparatus further comprises: the registration module is used for starting the process of the first application, registering a dynamic broadcast request receiver for the first application, wherein the dynamic broadcast request receiver is used for receiving the dynamic broadcast request by the first application; the device also comprises a receiving module, which is used for receiving the running data of the first application sent by the first application based on the first dynamic broadcast request under the condition that the dynamic broadcast request receiver receives the first dynamic broadcast request.
In one possible embodiment, the first widget data includes at least one of display data indicating at least one of a layout, an interface size, or control data of the target widget, the control data including at least one of a type, a position, an icon, a color, and content of each control included in the target widget.
In a possible implementation manner, the first obtaining module 502 is further configured to obtain a second dynamic broadcast request for updating the target widget, where an execution priority of the second dynamic broadcast request is higher than an execution priority of the static broadcast queue, and the second dynamic broadcast request includes an operation instruction; the second obtaining module 503 is further configured to obtain, based on the second dynamic broadcast request, second widget data for updating the target widget before executing the static broadcast request in the static broadcast queue; the starting module 504 is further configured to update the target widget according to second widget data, where the second widget data includes response data corresponding to the operation instruction.
According to the device provided by the embodiment of the application, the widget is started through the dynamic broadcast request, and the execution priority of the dynamic broadcast request is higher than that of the static broadcast queue, namely, the widget is started preferentially before the static broadcast request in the static broadcast queue is executed. Therefore, the starting of the widget does not need to wait in a static broadcast queue, the starting speed of the widget is accelerated, and the starting experience of the terminal is improved. In addition, the application data of the first application is stored in advance, so that the efficiency of acquiring the first widget data for starting the target widget is higher, and the starting speed of the widget is further increased.
It should be understood that, in implementing the functions of the apparatus provided in the foregoing embodiments, only the division of the foregoing functional modules is illustrated, and in practical applications, the foregoing functional allocation may be implemented by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
Referring to fig. 6, a schematic structural diagram of a computer device according to an embodiment of the application is shown. The computer device may be a terminal, for example: a smart phone, a tablet, an MP3 (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook or a desktop. Terminals may also be referred to by other names as user equipment, portable terminals, laptop terminals, desktop terminals, etc.
Generally, the terminal includes: a processor 1501 and a memory 1502.
The processor 1501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1501 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1501 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1501 may be integrated with a GPU (Graphics Processing Unit, image processor) for taking care of rendering and rendering of content to be displayed by the display screen. In some embodiments, the processor 1501 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1502 may include one or more computer-readable storage media, which may be non-transitory. Memory 1502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1502 is configured to store at least one instruction for execution by processor 1501 to cause the terminal to implement the widget launching method provided by the method embodiments of the present application.
In some embodiments, the terminal may further optionally include: a peripheral interface 1503 and at least one peripheral device. The processor 1501, memory 1502 and peripheral interface 1503 may be connected by a bus or signal lines. The individual peripheral devices may be connected to the peripheral device interface 1503 via a bus, signal lines, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1504, a display 1505, a camera assembly 1506, audio circuitry 1507, and a power supply 1508.
A peripheral interface 1503 may be used to connect I/O (Input/Output) related at least one peripheral device to the processor 1501 and the memory 1502. In some embodiments, processor 1501, memory 1502, and peripheral interface 1503 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1501, the memory 1502, and the peripheral interface 1503 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 1504 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1504 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1504 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1504 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuit 1504 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuit 1504 may also include NFC (Near Field Communication, short range wireless communication) related circuits, which the present application is not limited to.
Display 1505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When display screen 1505 is a touch display screen, display screen 1505 also has the ability to collect touch signals at or above the surface of display screen 1505. The touch signal may be input to the processor 1501 as a control signal for processing. At this point, display 1505 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1505 may be one, disposed on the front panel of the terminal; in other embodiments, the display 1505 may be at least two, respectively disposed on different surfaces of the terminal or in a folded design; in other embodiments, the display 1505 may be a flexible display disposed on a curved surface or a folded surface of the terminal. Even more, the display 1505 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display screen 1505 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 1506 is used to capture images or video. Optionally, the camera assembly 1506 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1506 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuitry 1507 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and the environment, converting the sound waves into electric signals, inputting the electric signals to the processor 1501 for processing, or inputting the electric signals to the radio frequency circuit 1504 for voice communication. For the purpose of stereo acquisition or noise reduction, a plurality of microphones can be respectively arranged at different parts of the terminal. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 1501 or the radio frequency circuit 1504 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 1507 may also include a headphone jack.
The power supply 1508 is used to power the various components in the terminal. The power source 1508 may be alternating current, direct current, disposable battery, or rechargeable battery. When the power source 1508 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal further includes one or more sensors 1509. The one or more sensors 1509 include, but are not limited to: an acceleration sensor 1510, a gyro sensor 1511, a pressure sensor 1512, an optical sensor 1513, and a proximity sensor 1514.
The acceleration sensor 1510 may detect the magnitudes of accelerations on three coordinate axes of a coordinate system established with a terminal. For example, the acceleration sensor 1510 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1501 may control the display screen 1505 to display the user interface in either a landscape view or a portrait view based on the gravitational acceleration signal collected by the acceleration sensor 1510. The acceleration sensor 1510 may also be used for acquisition of motion data of a game or user.
The gyro sensor 1511 may detect a body direction and a rotation angle of the terminal, and the gyro sensor 1511 may collect a 3D motion of the user to the terminal in cooperation with the acceleration sensor 1510. The processor 1501, based on the data collected by the gyro sensor 1511, may implement the following functions: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 1512 may be disposed on a side frame of the terminal and/or below the display 1505. When the pressure sensor 1512 is disposed on a side frame of the terminal, a grip signal of the terminal by the user may be detected, and the processor 1501 performs a left-right hand recognition or a quick operation according to the grip signal collected by the pressure sensor 1512. When the pressure sensor 1512 is disposed at the lower layer of the display screen 1505, the processor 1501 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 1505. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The optical sensor 1513 is used to collect the ambient light intensity. In one embodiment, processor 1501 may control the display brightness of display screen 1505 based on the intensity of ambient light collected by optical sensor 1513. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1505 is turned up; when the ambient light intensity is low, the display luminance of the display screen 1505 is turned down. In another embodiment, the processor 1501 may also dynamically adjust the shooting parameters of the camera assembly 1506 based on the ambient light intensity collected by the optical sensor 1513.
A proximity sensor 1514, also referred to as a distance sensor, is typically provided on the front panel of the terminal. The proximity sensor 1514 is used to collect the distance between the user and the front face of the terminal. In one embodiment, when the proximity sensor 1514 detects a gradual decrease in the distance between the user and the front face of the terminal, the processor 1501 controls the display 1505 to switch from the on-screen state to the off-screen state; when the proximity sensor 1514 detects that the distance between the user and the front face of the terminal gradually increases, the processor 1501 controls the display screen 1505 to switch from the off-screen state to the on-screen state.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In an exemplary embodiment, a computer device is also provided that includes a processor and a memory having at least one program code stored therein. The at least one program code is loaded into and executed by one or more processors to cause a computer device to implement any of the widget launching methods described above.
In an exemplary embodiment, there is also provided a computer-readable storage medium having stored therein at least one program code loaded and executed by a processor of a computer apparatus to cause the computer to implement any of the above-described widget launching methods.
Alternatively, the above-mentioned computer readable storage medium may be a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Read-Only optical disk (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform any of the widget launching methods described above.
The terms "first," "second," "third," and "fourth" and the like in the description and in the claims and drawings are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprising," "including," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
It should be noted that, the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, presented data, etc.), and signals related to the present application are all authorized by the user or are fully authorized by the parties, and the collection, use, and processing of the related data is required to comply with the relevant laws and regulations and standards of the relevant countries and regions. For example, the dynamic broadcast requests involved in the present application are all acquired with sufficient authorization.
The foregoing description of the preferred embodiments of the present application is not intended to be limiting, but rather, any modifications, equivalents, improvements, etc. that fall within the principles of the present application are intended to be included within the scope of the present application.

Claims (10)

1. A widget launching method, the method comprising:
under the condition of closing a target widget, storing application data of a first application corresponding to the target widget, wherein the first application is an application for providing the target widget;
acquiring a first dynamic broadcast request for starting the target widget, wherein the execution priority of the first dynamic broadcast request is higher than that of a static broadcast queue, and the static broadcast queue comprises a plurality of static broadcast requests to be started;
Acquiring first widget data for starting the target widget according to the stored application data of the first application before executing the static broadcast request in the static broadcast queue based on the first dynamic broadcast request;
and starting the target widget according to the first widget data.
2. The method of claim 1, wherein the obtaining a first dynamic broadcast request for launching the target widget comprises:
starting a process of a second application, wherein the second application is an application for displaying the target widget;
and acquiring a dynamic broadcast request initiated by the second application aiming at the target widget, wherein the dynamic broadcast request is used for starting the target widget.
3. The method of claim 2, further comprising, after the launching of the process of the second application:
registering a listener for the second application, the listener being for the second application to listen for widget data;
the enabling the target widget according to the first widget data comprises the following steps:
and under the condition that the monitor monitors the first widget data, loading and displaying the first widget data at the position of the target widget in the display interface of the second application.
4. The method of claim 1, wherein the obtaining first widget data for launching the target widget according to the stored application data of the first application comprises:
extracting first data meeting a quick start condition from the first widget data, wherein the quick start condition comprises static data or a change period of the data is larger than a time interval between closing time and starting time;
and for second data which does not meet the quick start condition in the first widget data, acquiring the second data based on the running data of the first application.
5. The method of claim 4, wherein prior to the obtaining the second data based on the running data of the first application, further comprising:
starting the process of the first application, and registering a dynamic broadcast request receiver for the first application, wherein the dynamic broadcast request receiver is used for receiving a dynamic broadcast request by the first application;
and receiving the running data of the first application, which is sent by the first application based on the first dynamic broadcast request, under the condition that the dynamic broadcast request receiver receives the first dynamic broadcast request.
6. The method of any of claims 1-5, wherein the first widget data comprises at least one of display data or control data or at least one of control data, the display data indicating at least one of a layout, an interface size, or control data of the target widget, the control data comprising at least one of a type, a location, an icon, a color, a content of each control included by the target widget.
7. The method of any of claims 1-6, wherein after the target widget is launched according to the first widget data, further comprising:
acquiring a second dynamic broadcast request for updating the target widget, wherein the execution priority of the second dynamic broadcast request is higher than that of the static broadcast queue, and the second dynamic broadcast request comprises an operation instruction;
based on the second dynamic broadcast request, acquiring second widget data for updating the target widget before executing the static broadcast request in the static broadcast queue;
and updating the target widget according to the second widget data, wherein the second widget data comprises response data corresponding to the operation instruction.
8. A widget launching device, the device comprising:
the storage module is used for storing application data of a first application corresponding to a target widget under the condition of closing the target widget, wherein the first application is an application for providing the target widget;
the first acquisition module is used for acquiring a first dynamic broadcast request for starting the target widget, wherein the execution priority of the first dynamic broadcast request is higher than that of a static broadcast queue, and the static broadcast queue comprises a plurality of static broadcast requests to be started;
the second acquisition module is used for acquiring first widget data for starting the target widget according to the stored application data of the first application before executing the static broadcast request in the static broadcast queue based on the first dynamic broadcast request;
and the starting module is used for starting the target widget according to the first widget data.
9. A computer device comprising a processor and a memory, wherein the memory stores at least one computer program or instruction that is loaded and executed by the processor to cause the computer device to implement the widget launching method according to any one of claims 1 to 7.
10. A computer readable storage medium having stored therein at least one program code, the at least one program code being loaded and executed by a processor to cause a computer to implement the widget launching method according to any one of claims 1 to 7.
CN202310636460.2A 2023-05-31 2023-05-31 Widget starting method, device, equipment and computer readable storage medium Pending CN116700826A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310636460.2A CN116700826A (en) 2023-05-31 2023-05-31 Widget starting method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310636460.2A CN116700826A (en) 2023-05-31 2023-05-31 Widget starting method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116700826A true CN116700826A (en) 2023-09-05

Family

ID=87835088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310636460.2A Pending CN116700826A (en) 2023-05-31 2023-05-31 Widget starting method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116700826A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988413A (en) * 2021-02-07 2021-06-18 杭州复杂美科技有限公司 Trade batch broadcasting dynamic adjustment method, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988413A (en) * 2021-02-07 2021-06-18 杭州复杂美科技有限公司 Trade batch broadcasting dynamic adjustment method, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110308956B (en) Application interface display method and device and mobile terminal
CN110602321B (en) Application program switching method and device, electronic device and storage medium
CN110368689B (en) Game interface display method, system, electronic equipment and storage medium
WO2021063237A1 (en) Control method for electronic device, and electronic device
CN108762881B (en) Interface drawing method and device, terminal and storage medium
CN109068008B (en) Ringtone setting method, device, terminal and storage medium
CN110362366B (en) Application interface display method and device
CN110677713B (en) Video image processing method and device and storage medium
CN110297684B (en) Theme display method and device based on virtual character and storage medium
CN109783176B (en) Page switching method and device
CN116700826A (en) Widget starting method, device, equipment and computer readable storage medium
CN111061369B (en) Interaction method, device, equipment and storage medium
CN112825048B (en) Message reminding method and device, electronic equipment and storage medium
CN111930438A (en) Method, device and equipment for determining page loading duration and storage medium
CN111914985B (en) Configuration method, device and storage medium of deep learning network model
CN110992954A (en) Method, device, equipment and storage medium for voice recognition
CN113448692B (en) Method, device, equipment and storage medium for calculating distributed graph
CN110941458B (en) Method, device, equipment and storage medium for starting application program
CN111464829B (en) Method, device and equipment for switching media data and storage medium
CN116842047A (en) Cache updating method, device, equipment and computer readable storage medium
CN114594885A (en) Application icon management method, device and equipment and computer readable storage medium
CN114550717A (en) Voice sound zone switching method, device, equipment and storage medium
CN109189525B (en) Method, device and equipment for loading sub-page and computer readable storage medium
CN108519913B (en) Application program running state management method and device, storage medium and terminal
CN113495770A (en) Method, device, terminal and storage medium for displaying application page

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination