Widget addition processing method, and apparatus, and storage medium

By traversing the target signaling matching widgets in the system widget library, the problem that users cannot select multiple widgets is solved, and the user experience and application display opportunities are improved.

WO2024234765A1PCT designated stage expired Publication Date: 2024-11-21ZTE CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/077769
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-17
Filing Date
2024-02-20
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

In the prior art, applications only support default widgets when adding widgets to the desktop, and users cannot select other non-default widgets or multiple widgets, which affects the user experience.

Method used

By obtaining the widget add request for the target application, building a widget Request request, and traversing the widgets that match the target signaling in the system widget library, displaying and allowing users to select and add multiple widgets.

Benefits of technology

Improves the user experience, provides more selectivity and display opportunities, enhances the application's activation rate, and solves the problem that users cannot select non-default widgets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077769_21112024_PF_FP_ABST
    Figure CN2024077769_21112024_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a widget addition processing method, and an apparatus, and a storage medium. The method comprises: acquiring a widget addition request of a target application, and determining that the widget addition request comprises target signaling used for indicating that target widget information needs to be presented (S302); constructing a widget request on the basis of the widget addition request (S304); and if the widget request carries the target signaling, traversing in a system widget library widgets matching the target signaling, and presenting the widgets, wherein the widgets comprise at least one target widget (S306).
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and storage medium for processing widget addition

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on the Chinese patent application with application number 2023105621924 and application date May 17, 2023, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application as a reference. Technical Field

[0003] The present application relates to the field of widget technology, and in particular to a method, device, and storage medium for processing widget addition. Background Art

[0004] A widget is a lightweight user interface that displays personalized information for users. Users can quickly and easily browse information such as weather, news, and photo galleries. Widgets are also an important entry point for applications. In related technologies, widgets are often used in terminal desktop or negative-one-screen desktop management technologies, such as desktop service cards, desktop widgets, or desktop widgets.

[0005] However, with current related technologies, applications can provide more and more widgets. When adding widgets from an application to the desktop, only one default widget is supported. Users cannot select the desired non-default widget or multiple widgets, which affects the user experience.

[0006] Summary of the Invention

[0007] Embodiments of the present application provide a method, apparatus, and storage medium for processing widget addition.

[0008] According to one embodiment of the present application, a method for processing widget addition is provided, which is applied to an electronic device. The method includes: obtaining a widget addition request from a target application; determining that the widget addition request includes target signaling indicating that target widget information needs to be displayed; constructing a widget request based on the widget addition request; if the widget request carries the target signaling, traversing a system widget library for widgets that match the target signaling and displaying the widgets; the widgets include at least one target widget.

[0009] According to another embodiment of the present application, a storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.

[0010] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0012] FIG1 is a schematic structural diagram of an electronic device provided by one embodiment of the present application;

[0013] FIG2 is a schematic diagram showing the effect of a method for processing widget addition provided by an embodiment of the present application;

[0014] FIG3 is a flow chart of a method for processing widget addition provided by one embodiment of the present application;

[0015] FIG4 is a schematic diagram of a widget display initiation request provided by one embodiment of the present application;

[0016] FIG5 is a schematic diagram of dragging and adding a widget according to an embodiment of the present application;

[0017] FIG6 is a flowchart of a method for processing widget addition provided by another embodiment of the present application;

[0018] FIG7 is a schematic diagram of a process of dragging and adding a widget provided by an embodiment of the present application;

[0019] FIG8 is a schematic diagram showing the effect of a method for processing widget addition provided by one embodiment of the present application;

[0020] FIG9 is a schematic structural diagram of an apparatus for processing widget addition provided by one embodiment of the present application. DETAILED DESCRIPTION

[0021] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.

[0022] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0023] Example 1

[0024] The method embodiment provided in Example 1 of the present application can be executed in an electronic device, such as a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal for a method of processing widget addition in an embodiment of the present application. As shown in Figure 1, the mobile terminal 10 may include one or more (only one is shown in Figure 1) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. In this embodiment, the above-mentioned mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that the structure shown in Figure 1 is only for illustration and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than those shown in Figure 1, or have a configuration different from that shown in Figure 1.

[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for processing widget addition in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may include a memory remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal 10 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0026] The transmission device 106 is used to receive or send data via a network. Examples of such networks may include wireless networks provided by the telecommunications provider of the mobile terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0027] For ease of understanding, the method of processing widget addition in related technologies is first described.

[0028] Widgets, a crucial feature, are generally added to the desktop or the negative-one-screen desktop in two ways. The first involves a pre-installed widget library on the phone, allowing users to add them. The second involves a pop-up widget add box within a specific application, prompting the user to add the widget to the desktop. In the first approach, due to the phone's pre-installed settings, users must return to the desktop to add a widget and select from a list of widgets displayed, making the process cumbersome. Alternatively, pre-installed technologies implemented at the launcher layer can selectively block some widgets, prompting users with insufficient space or missing widgets from the widget list when trying to add another. In the second approach, an application can contain multiple widgets. However, when adding a widget to the desktop from an application, the system pop-up window for adding widgets is displayed. This pop-up window is constructed by the system process and contains information about only one default widget. Therefore, adding a widget from an application only provides the default widgets for the application, preventing users from selecting their desired widgets and hindering access to all the application's widgets.

[0029] This application supports the display and addition of multiple widget data when the widget addition box is called from the application, without interfering with the original system request construction process. As shown in Figure 2, Figure 2 is a schematic diagram of the effect of the method for processing widget addition provided by an embodiment of this application. It can be seen that this application greatly improves the user experience in this application scenario, makes it possible for the application to display more widgets, increases user selectivity, and provides more display opportunities for the application, thereby improving the application's activation rate.

[0030] In this embodiment, in order to solve at least some of the above problems, a method for processing widget addition running on the above mobile terminal is provided. As shown in FIG3 , the method for processing widget addition includes the following steps:

[0031] Step S302: Obtain a widget adding request of a target application; determine whether the widget adding request includes target signaling indicating that target widget information needs to be displayed;

[0032] Step S304: construct a widget request based on the widget adding request;

[0033] Step S306: If the widget Request carries target signaling, the widgets matching the target signaling are traversed in the system widget library and displayed; the widgets include at least one target widget.

[0034] Through the above steps, a widget addition request from the target application is obtained, and it is determined that the widget addition request includes target signaling indicating that target widget information needs to be displayed. A widget request is constructed based on the widget addition request. If the widget request carries target signaling, the system widget library is searched for widgets that match the target signaling and the widgets are displayed. The widgets include at least one target widget. This method searches for widgets that match the target signaling in the system widget library and then displays all matched widgets. This solves the problem of related technologies that prevent users from selecting widgets when adding widgets to the application interface. It achieves the goal of freely displaying all widgets corresponding to the target signaling, providing users with selectivity when adding widgets and improving the user experience.

[0035] In this embodiment, the mobile terminal that executes the above steps can be not only a mobile phone, but also a tablet computer, a laptop computer, a handheld computer, a PDA (Personal Digital Assistant), a PMP (Portable Media Player), etc., but is not limited to these.

[0036] In one embodiment, obtaining a widget addition request of a target application includes: obtaining a preset signaling rule, where the signaling rule is a mapping rule between the widget to be added of the application and the signaling; determining a target signaling corresponding to the widget to be added based on the widget to be added and the signaling rule; and generating a widget addition request indicating the addition of the widget to be added of the target application based on the target signaling.

[0037] In this embodiment, signaling rules can be pre-agreed upon for the application and the Android system desktop launcher (Launcher) that reads the widget request. When obtaining the widget addition request of the target application, the target signaling corresponding to the widget to be added can be determined according to the signaling rule. The target signaling and the widget to be added can have a one-to-one correspondence, or one target signaling can correspond to multiple widgets to be added, without limitation. The target signaling can include one signaling or multiple signalings, without limitation.

[0038] For example, the widgets to be added for application A are obtained as widget 1, widget 2, and widget 3. According to the signaling rule, it is determined that widget 1 corresponds to signaling a, widget 2 corresponds to signaling b, and widget 3 corresponds to signaling c. The target signaling is signaling a, signaling b, and signaling c. The widget addition request of application A carries signaling a, signaling b, and signaling c.

[0039] It should be noted that after the widget request is constructed, the target signaling can be read by a reader such as a Launcher, and widgets 1, 2, and 3 can be matched from the system widget library according to signaling a, signaling b, and signaling c. That is, the widget to be added is the target widget matched in the subsequent steps.

[0040] It should be noted that the above description that widget 1 corresponds to signaling a, widget 2 corresponds to signaling b, and widget 3 corresponds to signaling c is only an example. One signaling may correspond to widget 1, widget 2, and widget 3, or other corresponding relationships are also possible, without limitation.

[0041] The target signaling of the target widget information to be displayed may include an indication identifier of the widget to be added, and may also include the actual content of the widget to be added, such as provisioning information.

[0042] In one embodiment, the target signaling includes an indicator of the widget to be added. Traversing the widgets matching the target signaling in the system widget library and displaying the widgets includes: traversing all target widgets matching the indicator in the system widget library and displaying the indicator corresponding to all the matched target widgets.

[0043] In this embodiment, the target signaling is distinguished by the indicator identifier. When matching the widget of the target signaling, the indicator identifier can be used to traverse the matching in the system widget library. All target widgets that match the indicator identifier are displayed on the display interface, providing users with more choices when adding widgets, improving the user experience, and only displaying the indicator identifier of the target widget during display without loading the actual content, thereby improving the display speed.

[0044] It should be noted that the indicator identifier can be a mark that can distinguish the widget to be added, such as the name or ID information of the widget to be added. For example, the signaling can carry the names of multiple widgets that the application intends to display. Of course, in this embodiment, the supply information of the widget to be added may not be loaded, which does not mean that the target signaling cannot indicate the content of the application intention display. In fact, the signaling can be both a mark and the intention content without limitation.

[0045] In one embodiment, the widget request also carries original indication information for indicating the default widget information of the target application. After constructing the widget request based on the widget add request, the method further includes: if the widget request does not carry the target signaling, reading the original indication information and displaying the default widget information corresponding to the original indication information; if the widget request carries the target signaling, abandoning the reading of the original indication information and continuing to perform the steps of traversing the system widget library for widgets matching the target signaling and displaying the widget.

[0046] In this embodiment, the widget request may also carry original indication information, which includes information about the default widget displayed for the application. When the reader reads the widget request, if the widget request carries target signaling, the original indication information is not read and the corresponding widget is matched according to the target signaling. If the widget request does not contain target signaling, or if the signaling is present but cannot be recognized, the default widget information corresponding to the original indication information is displayed.

[0047] In this embodiment, the original indication information refers to the information carried in the widget request request that only displays one default widget at a time in the related art. The original indication information may include the default widget information of the application, such as the name of the default displayed widget, a preview image, and the supply information (Provider) of the default displayed widget, etc., without limitation. By carrying signaling in the widget request request, the method in the embodiment of the present application can be implemented through the existing architecture without rebuilding a new architecture. On the basis of the original architecture, all widgets corresponding to the target signaling can be freely displayed, providing selectivity when the user adds widgets, improving the user experience, and, when the widget request request does not carry signaling, it can still be displayed in the original manner, with good compatibility.

[0048] When displaying all matched widgets, only the widget names can be displayed. After the user determines the target widget to be added from all widgets, the target widget is added. During the adding process, the preview image and supply information of the target widget are loaded. This can reduce data transmission during the display process and improve the response speed of the display.

[0049] In one embodiment, after displaying the widget, the method further includes: obtaining a drag instruction of a target widget in the widget, and obtaining a default widget preview image and default widget provisioning information in the default drag information, obtaining a target preview image of the target widget corresponding to the drag instruction, replacing the default widget preview image with the target preview image, and loading the target preview image, determining a target position when the drag instruction ends, obtaining target widget provisioning information corresponding to the target signaling, replacing the default widget provisioning information with the target widget provisioning information corresponding to the target signaling, and loading the target widget provisioning information, and adding the target widget at the target position according to the target widget provisioning information.

[0050] In this embodiment, the drag command can be a gesture command issued by the user to drag the widgets displayed on the display interface, such as pressing and holding any target widget or selecting multiple target widgets and then dragging. Before dragging, the target widgets can only display their respective names on the display interface. During dragging, a target preview image of the target widget selected by the drag command can be obtained, and the target widget can be displayed along with the target preview image. When the drag ends, the provider information (Provider) of the target widget is obtained, and the target widget is added to the target location where the drag ends based on the provider information.

[0051] In this embodiment, a target preview of the target widget being dragged is displayed during dragging, so that the user can understand the shape, size, and style of the target widget being dragged, so that the user can independently choose to drag it to the target location. Moreover, the target widget is added according to the supply information after the dragging is completed, avoiding the waste of data transmission caused by premature loading of the widget and the user ultimately not adding it.

[0052] In this embodiment, the method in the embodiment of the present application can be implemented through the existing architecture without rebuilding a new architecture. On the basis of the original architecture, the default widget preview image and the default widget supply information in the default drag information are obtained. When obtaining the target preview image corresponding to the drag instruction, the target preview image is used to replace the default widget preview image. When obtaining the target widget supply information, the target widget supply information is used to replace the default widget supply information. That is, the original architecture of the default drag information is used, but in fact the specific dragged image content and the release widget supply information have been replaced. The drag and add is completed by "disguising" the default drag information.

[0053] It should be understood that during the dragging process, there is a deletion area in the display interface. If the target position of the user's dragging is the deletion area, it indicates that the user does not need to add the target widget, and the step of continuing to obtain the supply information of the target widget is terminated.

[0054] In one embodiment, the widget request carries a default widget preview image. After obtaining a drag instruction for a target widget in the widget, and before obtaining a target preview image of the target widget corresponding to the drag instruction, the method further includes:

[0055] Determine whether the widget Request carries target signaling;

[0056] If the widget request carries target signaling, then abandon loading the default widget preview image in the widget request and continue to execute the step of obtaining the target preview image of the target widget corresponding to the drag instruction;

[0057] If the widget request does not carry the target signaling, the default widget preview image in the widget request is loaded, and the target position when the drag instruction ends is determined, and the provisioning information of the target widget corresponding to the target signaling is obtained.

[0058] In this embodiment, before obtaining the target preview image of the target widget corresponding to the drag instruction, it is determined whether the widget Request request carries target signaling. If it carries target signaling, the default widget preview image in the widget Request request is no longer loaded, and the target preview image of the target widget selected during dragging is displayed. If the widget Request request does not carry target signaling, or the carried target signaling cannot be recognized by the reading end, the default widget preview image in the widget Request request is read, and displayed during the dragging process according to the default widget preview image.

[0059] In this embodiment, the method in the embodiment of the present application can be implemented through the existing architecture. The default widget preview image can still be carried in the widget request. When carrying the target signaling, the default widget preview image is no longer read. During the drag-and-drop process, any one or more target widgets displayed can be freely selected. When dragging, the target preview image of the target widget or the target preview images corresponding to multiple target widgets are displayed along with the drag gesture, thereby achieving the effect of convenient preview of the target widget.

[0060] It should be noted that, if the target widget is added successfully, the preview image in the dragging process described above is the icon of the widget displayed on the display interface after the target widget is added successfully.

[0061] In one embodiment, the widget request carries default widget provisioning information (also referred to as default provisioning information, i.e., provisioning information corresponding to the default widget). After determining the target position at the end of the drag instruction and before obtaining the provisioning information of the target widget corresponding to the target signaling, the method further includes:

[0062] Determine whether the widget Request carries target signaling;

[0063] If the widget request carries the target signaling, then the default provisioning information in the widget request is abandoned and the step of obtaining the target widget provisioning information corresponding to the target signaling is continued;

[0064] If the widget request does not carry target signaling, the default provisioning information in the widget request is loaded. The default provisioning information corresponds to the default widget, and the default widget is added at the target location according to the default provisioning information.

[0065] In this embodiment, before obtaining the supply information of the target widget corresponding to the target signaling, it is determined whether the widget Request carries the target signaling. If it carries the target signaling, the default supply information in the widget Request is no longer loaded, and the target widget is added according to the supply information of the target widget selected during dragging. If the widget Request does not carry the target signaling, the default supply information is loaded, and the default widget is added at the target position where the dragging ends according to the default supply information.

[0066] In this embodiment, the widget request can still carry the default provisioning information. When carrying the target signaling, the default provisioning information is no longer loaded. Instead, the provisioning information of the target widget corresponding to the target signaling is loaded and replaced with the default provisioning information. With the help of the original architecture, it has good compatibility. When the widget request does not carry the target signaling, the default widget is still added according to the default provisioning information.

[0067] In one embodiment, before adding after display, that is, before obtaining a drag instruction of a target widget in the widgets, the method may further include: determining that multiple target widgets are selected.

[0068] Accordingly, adding a target widget at a target location according to the target widget provision information includes: simultaneously adding multiple target widgets at a target location according to multiple target widget provision information, where the target location includes a desktop target location or a negative one screen target location.

[0069] In this embodiment, multiple target widgets can be selected simultaneously on the widget display interface and added to the target location, greatly improving the speed of widget addition. For any of the selected target widgets, the addition process is the same as the process for selecting a target widget and adding it, so this will not be repeated here. It should be understood that when adding multiple target widgets simultaneously, the default widget preview in the default drag information is replaced with multiple target preview images, and the default widget provisioning information is replaced with multiple target widget provisioning information, leveraging the existing structure.

[0070] It should be noted that, in the above embodiment, the construction of the widget request based on the widget addition request can be performed in the system, and the constructed widget request can be sent to the Launcher, which reads the widget request and determines whether the widget request carries target signaling without limitation.

[0071] In one embodiment, the process of initiating a request to display a widget adding box is shown in FIG4 , and the process of dragging and adding a widget is shown in FIG5 .

[0072] Application A initiates a request process to display the widget add box. The system (framework) constructs a widget request (also called a request request or widget request) and sends the request to the reader. The reader can be the Android system desktop launcher Launcher. The Launcher reads the signaling in the request, matches the widget corresponding to the signaling, and displays all matched widgets in the widget add box (also called a view) for display.

[0073] After long pressing the target widget in the view interface, you can start dragging (the long press time here can be freely set, for example, continuous pressing for 2 seconds can be considered a long press). The Launcher starts the drag process and builds the drag process through the Request request in the system. After dragging to the target location, the Launcher starts the adding process after releasing the hand, reads the supply information of the target widget, adds the widget, and successfully adds the widget to the desktop.

[0074] In this application, signaling rules are designed. On the application side, a bundle (a bundle is a form of data transmission) is defined according to the rule requirements, and information that complies with the rules is carried in it as communication signaling. The signaling contains the names of multiple widgets that the application intends to display, and the signaling serves as both a marker and the content of the intent.

[0075] The reader identifies the Request with the agreed signaling by reading the signaling in the Bundle. After reading the signaling, it abandons reading the content in the original Request and instead reads the intent content carried in the signaling, matches it in the system, and displays the matched widget.

[0076] When the user long presses a widget in the selection box to drag it, the original Request transmission process is not changed. Instead, the drag preview is changed according to the long-pressed view content. When the user releases the widget, the provider information of the corresponding widget is changed to complete the drag.

[0077] The above description includes the widget display process and the drag-and-drop adding process after display.

[0078] In one embodiment, the operation process of supporting multi-widget data display is shown in Figure 6 and includes:

[0079] Step 601: Initiate a request to add a widget from the application side;

[0080] Step 602: The application defines a Bundle A, which carries the description information of the widget to be displayed (signaling a). When initiating a request, the Bundle is sent to the system as a signaling and is prepared to be carried in the Request.

[0081] Step 603: The system constructs a Request R, which carries the Bundle A information.

[0082] Step 604: Launcher receives the request R. Launcher, as the receiving end (or reading end), receives the request R.

[0083] Step 605: The Launcher determines whether the Request R contains Bundle A carrying signaling a. If the Request contains signaling information, the process proceeds to step 606; if not, the process proceeds to step 610.

[0084] Step 606: Abandon reading the information carried in the original Request R;

[0085] Step 607: Read the signaling a carried in Bundle A; for example, the widget description information in the signaling a may be read;

[0086] Step 608: Traverse all widgets registered in the entire system and search for all widgets that match the widget information carried in signaling a;

[0087] Step 609: Display all matched widgets;

[0088] Step 610: Read the widget information carried in R;

[0089] Step 611: Display the widget information.

[0090] In one embodiment, the operation process of supporting drag-and-drop addition is shown in FIG7 and includes:

[0091] Step 701: Long press the displayed widget to add a view in the selection box;

[0092] Step 702: Determine whether the Request carries signaling information; if it carries signaling information (such as signaling a), execute step 703; if not, execute step 713;

[0093] Step 703: Abandon reading the default preview image information in the Request;

[0094] Step 704: Get the corresponding preview image in the View;

[0095] Step 705: Replace the default preview image carried in the Request request with the corresponding preview image in the View;

[0096] Step 706: Using other information carried in the Request, start the drag process;

[0097] Step 707: Release the hand at the appropriate position;

[0098] Step 708: Determine whether the Request carries signaling information; if it carries signaling information (such as signaling a), execute step 709; if not, execute step 714;

[0099] Step 709: Abandon reading the default widget Provider information in the Request;

[0100] Step 710: Get the widget Provider information corresponding to the view;

[0101] Step 711: Use the widget provider information corresponding to the view to replace the default widget provider information carried in the original request;

[0102] Step 712: Start the Launcher to add widget process;

[0103] Step 713: Read the default information carried in the Request and execute step 706;

[0104] Step 714: Read the default widget provider information carried in the Request and execute step 712.

[0105] In the above embodiment, when adding a widget from the application side, the display and drag-and-drop addition of multiple widget data are supported. The acquisition of widget data is specified by the application, and the widget dragging process is an existing process. To support the current multi-data display, a clever drag-and-drop solution is designed. When dragging, the preview image in the data source is replaced, and when placing, the widget supply information is replaced. This solves the problem of related technologies that can only display the application's only default widget when adding widgets to the application. It achieves the free display of all widgets corresponding to the target signaling, provides users with selectivity when adding widgets, and improves the user experience.

[0106] It should be noted that after using the solution of the present application, when the addition of widgets is called up from the application, the display and addition of multiple widgets can be supported. For example, the application can be a search application, as shown in Figure 8, wherein Widget 1 and Widget 2 are the search widget 1 and search widget 2 of the search application. By touching the icon of Widget 1 or Widget 2, you can move it at will on the home screen and add Widget 1 or Widget 2 to the location you want to add it. Moreover, the format or size of the two widgets when displayed can be different, so that the user can understand the actual format or size of the added widget before adding it, which can greatly improve the user experience in this scenario.

[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the method described in each embodiment of the present application.

[0108] Example 2

[0109] In this embodiment, a device for processing widget addition is also provided, which is used to implement the above-mentioned embodiments and implementation methods, and the details that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0110] FIG9 is a schematic structural diagram of an apparatus for processing widget addition according to an embodiment of the present application. As shown in FIG9 , the apparatus includes:

[0111] The acquisition module 902 is configured to acquire a widget adding request of a target application; determine that the widget adding request includes target signaling indicating that target widget information needs to be displayed;

[0112] A construction module 904 is configured to construct a widget request based on the widget adding request;

[0113] The display module 906 is configured to, if the widget Request carries the target signaling, traverse the widgets matching the target signaling in the system widget library and display the widgets; the widgets include at least one target widget.

[0114] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0115] Example 3

[0116] An embodiment of the present application further provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0117] In this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0118] Obtaining a widget adding request of a target application; determining that the widget adding request includes target signaling for indicating that target widget information needs to be displayed;

[0119] Constructing a widget request based on the widget adding request;

[0120] If the widget Request carries the target signaling, the widgets matching the target signaling are traversed in the system widget library and displayed; the widgets include at least one target widget.

[0121] In this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0122] Example 4

[0123] An embodiment of the present application further provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps of any of the above method embodiments. The memory 104 in FIG1 is used as an example of a memory in the electronic device.

[0124] In this embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0125] In this embodiment, the processor may be configured to execute the following steps through a computer program:

[0126] Obtaining a widget adding request of a target application; determining that the widget adding request includes target signaling for indicating that target widget information needs to be displayed;

[0127] Constructing a widget request based on the widget adding request;

[0128] If the widget Request carries the target signaling, the widgets matching the target signaling are traversed in the system widget library and displayed; the widgets include at least one target widget.

[0129] The examples in this embodiment can refer to the examples described in the above embodiments and implementation methods, and this embodiment will not be described in detail here.

[0130] Through this application, a widget addition request of a target application is obtained; a target signaling indicating the need to display target widget information is determined to be included in the widget addition request; a widget request is constructed based on the widget addition request; if the widget request carries the target signaling, the widgets matching the target signaling are traversed in the system widget library and displayed; the widgets include at least one target widget. This method traverses the system widget library to match the corresponding widgets based on the target signaling, and then displays all matched widgets. This solves the problem of the related art that users cannot select when adding widgets to the application interface, thereby achieving the free display of all widgets corresponding to the target signaling, providing users with selectivity when adding widgets, and improving the user experience.

[0131] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, or they can be implemented using program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0132] The above descriptions are merely examples of embodiments of the present application and are not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present application shall be within the scope of protection of the present application.

Claims

1. A method for processing widget addition, applied to an electronic device, the method comprising: Get the widget adding request of the target application; Determining that the widget adding request includes target signaling for indicating that target widget information needs to be displayed; Constructing a widget request based on the widget adding request; If the widget Request carries the target signaling, traverse the widgets matching the target signaling in the system widget library and display the widgets; The widgets include at least one target widget.

2. The method according to claim 1, wherein: Get the widget adding request of the target application, including: Obtaining a preset signaling rule; the signaling rule is a mapping rule between the widget to be added and the signaling of the application; Determine, according to the widget to be added and the signaling rule, a target signaling corresponding to the widget to be added; The widget adding request indicating adding the to-be-added widget of the target application is generated according to the target signaling.

3. The method according to claim 2, wherein: The target signaling includes an indication identifier of the widget to be added; Traversing the widgets matching the target signaling in the system widget library and displaying the widgets includes: Traversing all the target widgets matching the indication identifier in the system widget library; The indication marks respectively corresponding to all the matched target widgets are displayed.

4. The method according to claim 1, wherein: The widget request also carries original indication information for indicating the default widget information of the target application; After constructing a widget request based on the widget adding request, traversing the widgets matching the target signaling in the system widget library, and before displaying the widget, the method further includes: If the widget Request does not carry the target signaling, reading the original indication information, and displaying the default widget information corresponding to the original indication information; If the widget Request carries the target signaling, the reading of the original indication information is abandoned, and the steps of traversing the widgets matching the target signaling in the system widget library and displaying the widgets are continued.

5. The method according to claim 1, wherein: After displaying the widget, the method further includes: Obtaining a drag instruction of a target widget in the widgets, and obtaining a default widget preview image and default widget provision information in the default drag information; Obtaining a target preview image of the target widget corresponding to the drag instruction, replacing the default widget preview image with the target preview image, and loading the target preview image; determining a target position when the drag instruction ends, obtaining target widget provisioning information corresponding to the target signaling, replacing the default widget provisioning information with the target widget provisioning information corresponding to the target signaling, and loading the target widget provisioning information; The target widget is added at the target location according to the target widget provision information.

6. The method according to claim 5, wherein: After obtaining the drag instruction of the target widget in the widgets, and before obtaining the target preview image of the target widget corresponding to the drag instruction, the method further includes: Determine whether the widget Request carries the target signaling; If the widget Request carries the target signaling, then abandoning loading the default widget preview image, and continuing to execute the step of obtaining the target preview image of the target widget corresponding to the drag instruction; If the widget request does not carry the target signaling, the default widget preview is loaded and confirmation is performed. The step of determining a target position when the drag command ends, and acquiring provisioning information of a target widget corresponding to the target signaling.

7. The method according to claim 5, wherein: After determining the target position when the drag instruction ends and before acquiring the supply information of the target widget corresponding to the target signaling, the method further includes: Determine whether the widget Request carries the target signaling; If the widget Request carries the target signaling, abandoning loading the default widget provisioning information, and continuing to execute the step of acquiring the target widget provisioning information corresponding to the target signaling; If the widget Request does not carry the target signaling, the default widget provision information is loaded, the default widget provision information corresponds to a default widget, and the default widget is added at the target location according to the default widget provision information.

8. The method according to claim 5, wherein: Before obtaining the drag instruction of the target widget in the widgets, the method further includes: determining that a plurality of the target widgets are selected; Accordingly, adding the target widget at the target location according to the target widget provision information includes: Adding a plurality of target widgets at the target location simultaneously according to the plurality of target widget supply information; the target location includes a desktop target location or a negative one screen target location.

9. A storage medium storing a computer program, wherein: The computer program is configured to execute the method for processing widget addition as claimed in any one of claims 1 to 8 when executed. 10 . An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method for processing widget addition according to claim 1 .

Citation Information

Patent Citations

  • Widget loading method and device

    CN106886435A

  • Component display method and related product

    CN107291453A

  • Widget interface generation method and device, storage medium and electronic equipment

    CN112395027A

  • Front-end interface construction method and device, electronic equipment and storage medium

    CN114090002A

  • Method and device for processing widget addition and storage medium

    CN116820454A