Method and device for displaying image in widget, electronic equipment and storage medium
By requesting stitching images, index position sequences and display time series from the server, the problem of poor display of widget images is solved, the success rate and efficiency of image requests are improved, and the smooth and efficient carousel display of images is achieved.
Patent Information
- Application Number
- CN202411919862.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-24
AI Technical Summary
In the prior art, when widgets display images, the image display effect is poor, and the image request success rate and efficiency are low.
By requesting display information from the server, including a stitching diagram, an index position sequence and a display time series, the stitching diagram is made of stitching images to be displayed, and the target image to be displayed is obtained and displayed based on the index position sequence and display time series.
It improves the success rate and efficiency of image requests, realizes smooth and efficient carousel display of images, and flexibly controls the carousel order, number and speed of images, improving the image display effect.
Smart Images

Figure CN119847660A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method, device, electronic device, and storage medium for displaying an image in a widget. Background Art
[0002] In the related art, a widget of an application software can be understood as a miniature view embedded in other applications (such as a device screen) and displaying data related to the application software. In the scheme of displaying images through widgets, images are usually requested and displayed at equal intervals, and the image display effect needs to be improved. Summary of the invention
[0003] The embodiments of the present disclosure provide a method, device, electronic device, and storage medium for displaying an image in a widget, which can improve the image display effect.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for displaying an image in a widget, comprising:
[0005] Requesting display information from the server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by stitching the images to be displayed;
[0006] According to the index position sequence, the target images to be displayed are sequentially obtained from the spliced image; wherein the display time sequence sequentially includes the display time information of the target images to be displayed;
[0007] According to the display time information, the corresponding target image to be displayed is displayed in the view window of the widget.
[0008] In a second aspect, an embodiment of the present disclosure provides a method for displaying an image in a widget, including:
[0009] Receiving a display information request sent by the application software;
[0010] Acquire the images to be displayed according to the display information request, and splice the images to be displayed to obtain a spliced image;
[0011] Determining an index position sequence according to index position information of the image to be displayed in the spliced image;
[0012] Determining a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence;
[0013] Display information is generated according to the mosaic graph, the index position sequence and the display time sequence, and the display information is sent to the application software, so that the application software displays the image in the view window of the widget according to the display information.
[0014] In a third aspect, an embodiment of the present disclosure further provides a device for displaying an image in a widget, including:
[0015] A request module, used for requesting display information from a server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by stitching together the images to be displayed;
[0016] An image acquisition module, used to sequentially acquire target images to be displayed from the spliced image according to the index position sequence; wherein the display time sequence sequentially includes display time information of the target images to be displayed;
[0017] A display module is used to display the corresponding target image to be displayed in the view window of the widget according to the display time information.
[0018] In a fourth aspect, an embodiment of the present disclosure further provides a device for displaying an image in a widget, including:
[0019] A receiving module, used for receiving a display information request sent by the application software;
[0020] A mosaic image determination module, used for obtaining the images to be displayed according to the display information request, and mosaicing the images to be displayed to obtain a mosaic image;
[0021] A first sequence determination module, configured to determine an index position sequence according to index position information of the image to be displayed in the spliced image;
[0022] A second sequence determination module, used to determine a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence;
[0023] The sending module is used to generate display information according to the mosaic image, the index position sequence and the display time sequence, and send the display information to the application software, so that the application software displays the image in the view window of the widget according to the display information.
[0024] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0025] one or more processors;
[0026] a storage device for storing one or more programs,
[0027] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for displaying an image in a widget as described in any one of the embodiments of the present disclosure.
[0028] In a sixth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the method for displaying an image in a widget as described in any one of the embodiments of the present disclosure.
[0029] In the technical solution of the disclosed embodiment, a request for display information can be made to the server; wherein the display information includes: a mosaic, an index position sequence and a display time sequence; the mosaic is composed of images to be displayed; according to the index position sequence, the target images to be displayed are sequentially obtained from the mosaic; wherein the display time sequence sequentially includes the display time information of the target images to be displayed; according to the display time information, the corresponding target images to be displayed are displayed in the view window of the widget. By requesting the mosaic, it is beneficial to request multiple images to be displayed at one time, which can improve the success rate and request efficiency of image requests, and can realize smooth and efficient carousel display of images. On this basis, by requesting the index position sequence and the display time sequence, it is possible to flexibly control the carousel order, number of carousels and carousel speed of the images to be displayed in the mosaic, which can improve the image display effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0031] Figure 1 A schematic diagram of a flow chart of a method for displaying an image in a widget provided by an embodiment of the present disclosure;
[0032] Figure 2 A schematic diagram of a spliced image in a method for displaying an image in a widget provided by an embodiment of the present disclosure;
[0033] Figure 3 A schematic diagram of a view window in a method for displaying an image in a widget provided by an embodiment of the present disclosure;
[0034] Figure 4 A schematic diagram of a flow chart of a method for displaying an image in a widget provided by an embodiment of the present disclosure;
[0035] Figure 5 A schematic diagram of a timeline of display moments of a method for displaying an image in a widget provided by an embodiment of the present disclosure;
[0036] Figure 6 A schematic diagram of a flow chart of a method for displaying an image in a widget provided by an embodiment of the present disclosure;
[0037] Figure 7A schematic diagram of a flow chart of a method for displaying an image in a widget provided by an embodiment of the present disclosure;
[0038] Figure 8 A schematic diagram of the structure of a device for displaying an image in a widget provided by an embodiment of the present disclosure;
[0039] Fig. 9 A schematic diagram of the structure of a device for displaying an image in a widget provided by an embodiment of the present disclosure;
[0040] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0042] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0043] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0044] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0045] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0046] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0047] Figure 1 A flowchart of a method for displaying an image in a widget provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the case where an image is displayed through a view window of a widget. The method can be executed by a device for displaying an image in a widget, which can be implemented in the form of software and / or hardware. The device can be integrated into a widget of an application, and can be configured in an electronic device along with the widget, such as a mobile phone, a computer, or other device.
[0048] like Figure 1 As shown, the method for displaying an image in a widget provided in this embodiment may include:
[0049] S110, requesting display information from the server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by mosaicking the images to be displayed.
[0050] In the embodiments of the present disclosure, different application software may include multimedia display interfaces (which may be referred to as functional interfaces) corresponding to different business functions. For example, in social application software, a functional interface for displaying multimedia content posted by communication users may be included; in content sharing application software, a functional interface for displaying multimedia content posted by followed users may be included, etc. Among them, the widget of the application software can be presented on the device screen, and the relevant images of the specified functional interface in the application software can be displayed through a miniature view window. For example, in the case of displaying images of functional pages that aggregate multimedia content through widgets, when the multimedia content is an image, the widget can directly display the image; when the multimedia content is a video, graphic, etc., the widget can display the corresponding cover image.
[0051] In this embodiment, the widget can respond to a preset trigger, start the application software in the background without the user's perception, and send a display information request to the server through the application software to request the display information. Among them, the requested display information can be set according to the specific business scenario. Exemplarily, when the widget displays related images of multimedia content posted by the communication user, it can request related images of multimedia content posted by the communication user within a preset time range (for example, within 3 days), and / or, it can request related images of unread multimedia content in the multimedia content posted by the communication user.
[0052] Accordingly, the server may obtain several related images corresponding to the display information request as images to be displayed, and stitch the several images to be displayed into a stitched image. Figure 2 A schematic diagram of a spliced image in a method for displaying an image in a widget provided by an embodiment of the present disclosure. Figure 2, the server can horizontally splice n images to be displayed to obtain a spliced image. In addition, n images to be displayed can also be spliced vertically or in a grid to obtain a spliced image, etc., which are not exhaustively listed here.
[0053] The regional position of the image to be displayed in the mosaic image can be represented by index position information. Figure 2 , 1-n can be used as the index position information of n images to be displayed in the horizontal long image. Then, the regional position of the image to be displayed in the spliced image corresponding to the index position information i can be determined according to the preset length and width dimensions of the image to be displayed in the spliced image and the splicing method, where i∈[1,n]. For example, Figure 2 In the stitching method shown, when the index position information is 1, the area enclosed by 0 to a preset length in the horizontal direction and 0 to a preset width in the vertical direction can be used as the area position of the image to be displayed in the stitching image corresponding to the index position information.
[0054] Among them, the server can determine the index position sequence based on the preset display strategy of the image to be displayed and the index position information of the image to be displayed in the mosaic. For example, the index position sequence can be randomly generated based on the index position information of the image to be displayed based on the random display strategy. Among them, each index position information can appear at least once in the index position sequence, that is, the index position sequence can contain the same index position information. For another example, based on the reverse display strategy, the corresponding index position information can be sequentially composed into an index position sequence according to the reverse order of the release time of the image to be displayed. Among them, the index position sequence can also include multiple rounds of index position information arranged in sequence to achieve multiple rounds of display of the image to be displayed. By sequentially obtaining the index position information in the index position sequence, the target image to be displayed can be obtained from the mosaic according to the preset display strategy, and the carousel order and number of carousels of the image to be displayed can be flexibly controlled to improve the image display effect.
[0055] After determining the index position sequence, the server can also determine the display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence. The server can traverse the index position sequence and determine the display time information corresponding to the traversed index position information according to the first display duration of the to-be-displayed images corresponding to the traversed index position information and the number of occurrences of the traversed index position information in the historical traversal. Furthermore, the server can determine the display time sequence according to the display time information determined in sequence.
[0056] The process of determining the first display duration may include: the server may identify the content information amount of the image to be displayed through a pre-built image processing model, and determine the first display duration of the image to be displayed according to the content information amount. The content information amount is positively correlated with the first display duration, that is, the more content information there is in the image to be displayed, the longer its first display duration is.
[0057] Among them, the display time information can be used to characterize the display duration of the image to be displayed, and the process of determining the display time information can include: according to the number of occurrences of the traversed index position information in the historical traversal, attenuating the first display duration of the image to be displayed corresponding to the traversed index position information; according to the attenuated first display duration, determining the display time information of the image to be displayed corresponding to the traversed index position information, that is, the display time information corresponding to the traversed index position information. Among them, the number of occurrences and the attenuation of the attenuation can be positively correlated, that is, the more the number of occurrences of the traversed index position information in the historical traversal, the greater the degree of attenuation of the corresponding first display duration. And, when the number of occurrences is 0, the display time information can be determined according to the first display duration.
[0058] It is understandable that as the number of times the index position information appears in the traversal increases, the number of times the widget presents the corresponding image to be displayed increases, and the user obtains relatively more comprehensive content information of the image to be displayed. The same image to be displayed can be displayed in the view window with a correspondingly reduced display time as the number of times it is presented increases, so as to flexibly control the rotation speed of the image to be displayed and improve the image display effect.
[0059] In addition, it can be known from the above disclosure that the index position sequence and the display time sequence have the same sequence length and have a corresponding relationship. It can be considered that the display time information of the to-be-displayed image corresponding to the index position information of a certain order in the index position sequence is the display time information of the same order in the display time sequence.
[0060] The server may generate display information according to the splicing graph, the index position sequence and the display time sequence, and send the display information to the application software, so that the application software forwards the display information to the widget.
[0061] S120, sequentially acquiring target images to be displayed from the spliced graph according to the index position sequence; wherein the display time sequence sequentially includes display time information of the target images to be displayed.
[0062] In the disclosed embodiment, after obtaining the display information, the widget of the application can traverse the index position sequence, and determine the regional position of the image to be displayed corresponding to the traversed index position information in the mosaic according to the traversed index position information, the preset length and width dimensions, and the mosaic method. Then, the corresponding image to be displayed, that is, the target image to be displayed, can be obtained from the mosaic according to the regional position. Since the index position sequence has a corresponding relationship with the display time sequence, the display time information corresponding to the target image to be displayed obtained in sequence is included in the display time sequence in sequence.
[0063] In some optional implementations, obtaining the target image to be displayed in sequence from the mosaic image according to the index position sequence may include: obtaining index position information in sequence from the index position sequence, and determining a cutting range of the mosaic image according to the index position information; and cutting the mosaic image according to the cutting range to obtain the target image to be displayed.
[0064] The index position information obtained in sequence can be considered as the traversed index position information. The process of determining the cutting range according to the index position information can include: determining the regional position of the image to be displayed corresponding to the traversed index position information in the splicing map according to the traversed index position information, the preset length and width dimensions, and the splicing method. The regional position can be considered as the cutting range.
[0065] In these optional implementations, the mosaic image can be cut according to the cutting range to obtain the target display image. Since the view window of the widget is usually small, it has a low requirement for the resolution of the image. By cutting the mosaic image, the target image to be displayed can be quickly obtained for display, which can greatly improve the image display efficiency.
[0066] In addition, in other implementations, the displacement of the mosaic in the view window can be determined based on the regional position of the image to be displayed in the mosaic corresponding to the index position information, so that the part presented in the view window is the target image to be displayed, thereby realizing a multi-image carousel based on the same mosaic without cutting or loading.
[0067] S130: Display the corresponding target image to be displayed in the view window of the widget according to the display time information.
[0068] In this embodiment, there is no strict time sequence relationship between step S120 and step S130.
[0069] For example, first, the index position information traversed in the index position sequence can be used; then, while obtaining the target image to be displayed from the spliced graph according to the index position information, the display time information in the same order as the traversed index position information can be obtained from the display time sequence; finally, according to the display time information, the target image to be displayed is displayed in the view window for a corresponding length of time.
[0070] For another example, the display time information can be first obtained in sequence from the display time sequence; then, according to the display time information, the index position information can be periodically traversed from the index position sequence; finally, the target image to be displayed can be determined according to the index position information and displayed in the view window. This method can also realize the display of the target image to be displayed for a corresponding time according to the display time information.
[0071] For example, Figure 3 A schematic diagram of a view window in a method for displaying an image in a widget provided by an embodiment of the present disclosure. Figure 3 , 300 may represent a device screen, 301 may represent a view window of a widget, and 302 may represent a segmented progress control. Among them, the progress control corresponding to the target image to be displayed currently displayed in the segmented progress control can be displayed separately from the progress controls corresponding to other images to be displayed. Figure 3 As shown, the progress control corresponding to the target image to be displayed can be longer than the progress controls corresponding to other images to be displayed. The index position sequence can include multiple rounds of index position information arranged in sequence, so that after a round of images to be displayed is displayed in sequence, the first image to be displayed can be jumped back to the first image to be displayed for the next round of display. Accordingly, after the last progress control of the multi-segment progress control is displayed in a differentiated manner, the first progress control can be displayed in a differentiated manner.
[0072] In the related art, due to the limitation of device performance, the number of images requested each time is limited. Therefore, in the case of a large number of image carousels, a long time span is required to send multiple image requests to the server to obtain all the carousel images. However, the long time span is easily affected by various factors (such as network factors, application software running factors, etc.), resulting in a low success rate of image requests and a long time for image loading. In the embodiment of the present disclosure, by requesting a mosaic image, it is beneficial to obtain a large number of images to be displayed in one request, which can improve the success rate and request efficiency of image requests, and is conducive to realizing smooth and efficient carousel display of images.
[0073] In the related art, images are usually rotated at equal intervals (e.g., 10 minutes), and the display effect is relatively simple. In the embodiment of the present disclosure, the rotation order, rotation number, and rotation speed of the images to be displayed in the spliced image can be flexibly controlled according to the index position sequence and the display time sequence, which can improve the image display effect.
[0074] In addition, in the disclosed embodiment, the application may also request new display information from the server in response to completing the carousel of images to be displayed in the view window of the widget according to the index position sequence and the display time sequence, and perform a multi-image carousel according to the new display information.
[0075] In some optional implementations, the method for displaying an image in a widget may further include at least one of the following: in response to the view window receiving an access instruction, accessing a functional interface corresponding to the image to be displayed; wherein, when the access instruction is received, the target image to be displayed displayed by the view window is located at the first position of the functional interface; in response to the view interface receiving a switching instruction, switching the target image to be displayed displayed by the view window.
[0076] The view window may include a view written based on an existing programming language according to business requirements, such as a list view, etc. In the process of writing the view window, multiple interaction modes may be defined.
[0077] For example, when a click operation is received in the first area (such as the middle area) of the view window, an access instruction may be triggered; accordingly, the widget of the application software may respond to the access instruction, start the application software and access the function page corresponding to the image to be displayed. Among them, the widget may pass the image identifier of the target image to be displayed displayed in the view window when receiving the access instruction to the application software; the application software may forcibly insert the corresponding target image to be displayed into the first position of the function interface according to the image identifier to improve the user experience.
[0078] For example, when a click operation is received in the second area of the view window (such as the two side areas), a switching instruction can be triggered; accordingly, the widget of the application software can respond to the switching instruction, obtain the previous / next target image to be displayed, and display the view window according to its corresponding display time information.
[0079] In these optional implementations, the widget can respond to the access instruction and / or the switching instruction to perform corresponding interactive actions to improve the user interaction experience. In addition, other interactive modes of the view window can also be included here, and are not exhaustive again.
[0080] In some optional implementations, the display information also includes the request time; the method for displaying an image in a widget may also include: when the request time is met and the network condition meets the preset conditions, requesting new display information from the server; when the request time is met and the network condition does not meet the preset conditions, continuing to display the image in the view window according to the display information.
[0081] In the related art, the next round of images to be displayed is usually requested at equal intervals (for example, 12 hours), which may result in failure to access the latest images in a timely manner, resulting in a poor user experience.
[0082] In these optional implementations of the present disclosure, the server can predict the request time according to the business traffic trend of the business corresponding to the image to be displayed. For example, the request time can be determined according to the peak period of business traffic. Accordingly, the widget can request new display information from the server through the application software when the request time is met and the network condition of the device to which it belongs meets the preset conditions (such as preset network speed and other conditions), which is conducive to the timely access to the latest images. In addition, if the request time is met, but the network condition of the device to which it belongs does not meet the preset conditions, the image carousel can continue to be displayed according to the current display information until the network condition meets the preset conditions, and then new display information is requested again to ensure that the widget performs normal image carousel.
[0083] In the technical solution of the disclosed embodiment, a request for display information can be made to the server; wherein the display information includes: a mosaic, an index position sequence and a display time sequence; the mosaic is composed of images to be displayed; according to the index position sequence, the target images to be displayed are sequentially obtained from the mosaic; wherein the display time sequence sequentially includes the display time information of the target images to be displayed; according to the display time information, the corresponding target images to be displayed are displayed in the view window of the widget. By requesting the mosaic, it is beneficial to request multiple images to be displayed at one time, which can improve the success rate and request efficiency of image requests, and can realize smooth and efficient carousel display of images. On this basis, by requesting the index position sequence and the display time sequence, it is possible to flexibly control the carousel order, number of carousels and carousel speed of the images to be displayed in the mosaic, which can improve the image display effect.
[0084] The various optional schemes in the method of displaying images in the widget provided in the embodiments of the present disclosure and the above embodiments can be combined. The method of displaying images in the widget provided in this embodiment describes in detail the image display process when the display time information is the display moment. By simulating the preset clock based on the clock component of the operating system, when the preset clock runs to each display moment, the target image to be displayed can be obtained and displayed according to the corresponding index position information, thereby realizing a multi-image carousel driven by the timeline composed of the display moments.
[0085] Figure 4 The following is a flow chart of a method for displaying an image in a widget provided by an embodiment of the present disclosure. Figure 4 As shown, the method for displaying an image in a widget provided by this embodiment, when the display time information includes the display time, may include:
[0086] S410, requesting display information from the server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by mosaicking the images to be displayed.
[0087] S420: Obtain a preset clock constructed based on a clock component of the operating system to which it belongs, and configure and start the preset clock according to the first moment from the request to the presentation of information.
[0088] In this embodiment, the operating system to which the application belongs may refer to the operating system of the device to which the application belongs. Among them, the widget of the application can pre-build a preset clock based on the clock component of the operating system. Among them, the preset clock is different from the clock component of the operating system, which is a simulated clock. Compared with the clock component, the time unit of the preset clock can be larger (for example, it can be 1s), and the preset clock can perform operations such as time pause, that is, its time can be different from the world standard time.
[0089] In response to receiving the display information request, the widget of the application program may set the preset clock to the first moment when the display information request is received, and start running the preset clock.
[0090] S430, sequentially obtain display moments from the display time sequence, and when the preset clock runs to the display moment, obtain the target image to be displayed from the spliced image according to the index position information corresponding to the display moment in the index position sequence, and display the target image to be displayed in the view window.
[0091] In this embodiment, the display time information includes the display time, wherein the display time may be composed of hours, minutes and seconds, for example. Figure 5 A schematic diagram of a timeline of display moments of a method for displaying an image in a widget provided by an embodiment of the present disclosure. Figure 5 The display time sequence shown may include 500 display moments from 10:00:01 to 10:19:58, and the 500 display moments may constitute a display timeline of the image to be displayed.
[0092] For example, Table 1 shows the corresponding relationship between the display time in the display time sequence and the index position information in the index position sequence. It can be considered that the timeline composed of the display time in Table 1 is Figure 5 The timeline shown is the same.
[0093] Table 1
[0094] Showtime 10:00:01 10:00:05 10:00:15 ... 10:19:50 10:19:58 Index location information 1 2 3 ... 2 3
[0095] As can be seen from Table 1, the length of the display time sequence and the index position sequence are the same and have a corresponding relationship. The index position sequence may contain the same index position information, so that multiple displays of the same image to be displayed can be achieved.
[0096] by Figure 5Taking the timeline shown as an example, the display process of the target image to be displayed may include: the application widget requests the display information at 10:00:00, sets the preset clock to 10:00:00 and starts running. Then, 500 display moments can be obtained from the display time sequence, and the preset clock configuration can be configured to respond to the display moments. Correspondingly, every time the preset clock runs to one of the display moments, the application widget can obtain the index position information corresponding to the display moment according to the corresponding relationship shown in Table 1 ( Figure 5 The target image to be displayed is obtained from the mosaic image according to the index position information, and the target image to be displayed is displayed in the view window, so that a multi-image carousel driven by the timeline composed of the display moments can be realized.
[0097] In some optional implementations, the method may further include: in response to the view window switching to an invisible state, pausing a preset clock; or, in response to the view window switching to an invisible state, stopping acquiring the target image to be displayed when the preset clock runs to the display time.
[0098] The invisible state can be understood as a state where the widget cannot be displayed on the device screen, such as a locked screen state, a state where the corresponding application software or other software is opened in the foreground, etc. Correspondingly, the visible state is a state where the widget is displayed on the device screen.
[0099] Among them, when the view window is invisible, the widget of the application can suspend the running of the preset clock, and the time of the preset clock is different from the actual time. Correspondingly, when the view window is switched to a visible state, the widget of the application can start running the preset clock, and restart the multi-image carousel according to the time of the preset clock and the display time. In this case, if the display information includes the request time, the time when the carousel of the images to be displayed is completed according to the index position sequence and the display time sequence, is usually later than the request time. At this time, the widget of the application can respond to the completion of the carousel of the images to be displayed, request new display information from the server through the corresponding application software, and reconfigure the preset clock according to the new display information to drive the multi-image carousel based on the new timeline.
[0100] In addition, when the view window is invisible, the preset clock can continue to run, and the time of the preset clock remains the same as the actual time. However, in this case, if the preset clock runs to the display time, the acquisition of the target image to be displayed can be stopped. When the view window is switched to a visible state, the target image to be displayed can be acquired according to the index position information corresponding to the previous display time, and displayed in the view window. In this case, the moment when the carousel of the images to be displayed is completed according to the index position sequence and the display time sequence can be the same as the request moment, and the widget of the application can request new display information from the server through the corresponding application software in response to the request moment being met. For example, see again Figure 5 The request time may be 10:20:00, and the application widget may request new display information from the server through the corresponding application software in response to satisfying the request time.
[0101] In these optional implementations, two strategies are provided: pausing a preset clock or pausing acquisition of a target image to be displayed when the widget is invisible, which can achieve flexible changes in image display and improve the robustness of image display.
[0102] The technical solution of the embodiment of the present disclosure describes in detail the image display process when the display time information is the display moment. By simulating the preset clock based on the clock component of the operating system, when the preset clock runs to each display moment, the target image to be displayed can be obtained and displayed according to the corresponding index position information, thereby realizing a multi-image carousel driven by the timeline composed of the display moments. The method for displaying images in the widget provided by the embodiment of the present disclosure and the method for displaying images in the widget provided by the above-mentioned embodiment belong to the same public concept. The technical details not described in detail in this embodiment can be referred to the above-mentioned embodiment, and the same technical features have the same beneficial effects in this embodiment and the above-mentioned embodiment.
[0103] The various optional schemes in the method of displaying images in a widget provided in the embodiments of the present disclosure and the above embodiments can be combined. The method of displaying images in a widget provided in the present embodiment provides a detailed description of the image display process when the display time information is the display duration. By simulating a preset timer based on a clock component of an operating system, when the current target image to be displayed is obtained according to an index position sequence, the preset timer can be configured and started according to the corresponding display duration. Moreover, the current target image to be displayed can be displayed during the countdown of the preset timer, and the next target image to be displayed can be obtained when the timer countdown ends, thereby realizing a multi-image carousel driven by a countdown.
[0104] Figure 6 The following is a flow chart of a method for displaying an image in a widget provided by an embodiment of the present disclosure. Figure 6As shown, the method for displaying an image in a widget provided by this embodiment, when the display time information includes the display duration, may include:
[0105] S610, requesting display information from the server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by stitching together the images to be displayed.
[0106] S620: Obtain a preset timer constructed based on a clock component of the operating system.
[0107] In this embodiment, the widget of the application program may construct a preset timer based on the clock component of the operating system in advance, and the preset timer may have a countdown response function.
[0108] S630: Obtain target images to be displayed in sequence from the spliced graph according to the index position sequence.
[0109] In this embodiment, the widget of the application program may sequentially obtain the index position information in the index position sequence in response to the request for display information, and may obtain the target image to be displayed from the spliced image according to the index position information.
[0110] S640: In response to acquiring a target image to be displayed according to the index position sequence, configuring and starting a preset timer according to a corresponding display duration.
[0111] Exemplarily, Table 2 shows the correspondence between the display duration in the display time sequence and the index position information in the index position sequence.
[0112] Table 2
[0113] Display duration (seconds) 4 10 5 ... 8 2 Index location information 1 2 3 ... 2 3
[0114] As can be seen from Table 2, the length of the display time sequence and the index position sequence are the same and have a corresponding relationship. The index position sequence may contain the same index position information, and the corresponding display time may gradually decrease as the number of occurrences of the same index position information increases.
[0115] In this embodiment, in response to each acquisition of the target image to be displayed, the application's widget can obtain the display duration of the same order from the display time sequence according to the corresponding relationship shown in Table 2 and the order of the index position information in the index position sequence, and configure and start the preset timer according to the display duration, so that the preset timer counts down according to the display duration. According to Tables 1 and 2, the carousel order, carousel number and carousel speed of the carousel images to be displayed based on the corresponding relationship shown in Table 1 are the same as the carousel order, carousel number and carousel speed of the carousel images to be displayed based on the corresponding relationship shown in Table 2.
[0116] S650: In response to the preset timer starting, display the target display image in the view window.
[0117] S660: In response to the preset timer being executed to the end, obtaining the next target image to be displayed according to the index position sequence.
[0118] In this embodiment, the widget of the application can display the current target image to be displayed during the countdown of the preset timer, and can obtain the next target image to be displayed when the timer countdown ends, thereby realizing a multi-image carousel driven by countdown.
[0119] In some optional implementations, the method for displaying an image in a widget may further include: pausing a preset timer in response to the view window switching to an invisible state; or, stopping acquiring the next target image to be displayed in response to the view window switching to an invisible state and the preset timer terminating.
[0120] Among them, when the view window is invisible, the widget of the application can pause the preset timer to pause the countdown. Correspondingly, when the view window is switched to a visible state, the widget of the application can start running the preset timer, and can continue to display the target image to be displayed when it was last visible according to the remaining countdown of the preset timer. In this case, if the display information includes the request time, the time when the carousel of the images to be displayed is completed according to the index position sequence and the display time sequence is usually later than the request time. At this time, the widget of the application can respond to the completion of the carousel of the images to be displayed and request new display information from the server through the corresponding application software.
[0121] In addition, when the view window is invisible, the preset timer can continue to run until the countdown ends. However, in this case, the widget can stop acquiring the next target image to be displayed when the preset timer ends, and can acquire and display the next target image to be displayed when the view window switches to a visible state. In this case, if the display information includes the request time, the time when the carousel of the images to be displayed is completed according to the index position sequence and the display time sequence is usually later than the request time. At this time, the widget of the application can request new display information from the server through the corresponding application software in response to the completion of the carousel of the images to be displayed.
[0122] Among these optional implementations, two strategies are provided: pausing a preset timer or pausing acquisition of a target image to be displayed when the widget is invisible, which can achieve flexible changes in image display and improve the robustness of image display.
[0123] The technical solution of the embodiment of the present disclosure describes in detail the image display process when the display time information is the display duration. By simulating the preset timer based on the clock component of the operating system, when the current target image to be displayed is obtained according to the index position sequence, the preset timer can be configured and started according to the corresponding display duration. In addition, the current target image to be displayed can be displayed during the countdown of the preset timer, and the next target image to be displayed can be obtained when the timer countdown ends, thereby realizing a multi-image carousel driven by countdown. The method for displaying images in the widget provided by the embodiment of the present disclosure and the method for displaying images in the widget provided by the above-mentioned embodiment belong to the same public concept. The technical details not fully described in this embodiment can be referred to the above-mentioned embodiment, and the same technical features have the same beneficial effects in this embodiment and the above-mentioned embodiment.
[0124] Figure 7 A flowchart of a method for displaying an image in a widget provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to a situation where a server sends display information to enable a widget of an application to display an image. The method can be executed by a device for displaying an image in a widget, which can be implemented in the form of software and / or hardware, and can be configured in an electronic device, such as a server.
[0125] like Figure 7 As shown, the method for displaying an image in a widget provided in this embodiment may include:
[0126] S710: Receive a display information request sent by application software.
[0127] In an embodiment of the present disclosure, a request for display information may include a widget of an application software, and a request sent through the application software. The widget may start the application software in the background without the user's awareness in response to a preset trigger, and send a display information request to the server through the application software to request display information. Among them, the requested display information may be set according to a specific business scenario. Exemplarily, in the case where the widget displays related images of multimedia content posted by a communication user, related images of multimedia content posted by the communication user within a preset time range (for example, within 3 days) may be requested, and / or related images of unread multimedia content in the multimedia content posted by the communication user may be requested.
[0128] S720: Acquire images to be displayed according to the display information request, and splice the images to be displayed to obtain a spliced image.
[0129] In the disclosed embodiment, the server may obtain several related images corresponding to the display information request as images to be displayed, and splice the several images to be displayed into a spliced image. For example, the several images to be displayed may be spliced in a horizontal, vertical or grid splicing manner to obtain a spliced image.
[0130] S730: Determine an index position sequence according to index position information of the image to be displayed in the stitched image.
[0131] In the disclosed embodiment, the regional position of the image to be displayed in the mosaic can be represented by index position information. The server can determine the index position sequence based on the preset display strategy of the image to be displayed and the index position information of the image to be displayed in the mosaic.
[0132] For example, based on a random display strategy, an index position sequence may be randomly generated according to the index position information of the image to be displayed. Each index position information may appear at least once in the index position sequence, that is, the index position sequence may contain the same index position information. For another example, based on a reverse display strategy, the corresponding index position information may be sequentially organized into an index position sequence according to the reverse order of the release time of the image to be displayed. The index position sequence may also contain multiple rounds of index position information arranged in sequence to achieve multiple rounds of display of the image to be displayed.
[0133] S740: Determine a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence.
[0134] In this embodiment, after determining the index position sequence, the server can traverse the index position sequence and determine the display time information corresponding to the traversed index position information according to the factors of the preset dimensions of the to-be-displayed image corresponding to the traversed index position information. Furthermore, the server can determine the display time sequence according to the display time information determined in sequence.
[0135] In some optional implementations, determining a display time sequence based on images to be displayed corresponding to index position information in an index position sequence may include: determining a first display duration of an image to be displayed based on the amount of content information of the image to be displayed; traversing the index position sequence, and determining display time information corresponding to the traversed index position information based on the first display duration of the image to be displayed corresponding to the traversed index position information and the number of occurrences of the traversed index position information in historical traversals; and determining a display time sequence based on the display time information determined in sequence.
[0136] The process of determining the first display duration may include: the server may identify the content information amount of the image to be displayed through a pre-built image processing model, and determine the first display duration of the image to be displayed according to the content information amount. The content information amount is positively correlated with the first display duration, that is, the more content information there is in the image to be displayed, the longer its first display duration is.
[0137] Among them, the display time information can be used to characterize the display duration of the image to be displayed, and the process of determining the display time information can include: according to the number of occurrences of the traversed index position information in the historical traversal, attenuating the first display duration of the image to be displayed corresponding to the traversed index position information; according to the attenuated first display duration, determining the display time information of the image to be displayed corresponding to the traversed index position information, that is, the display time information corresponding to the traversed index position information. Among them, the number of occurrences and the attenuation of the attenuation can be positively correlated, that is, the more the number of occurrences of the traversed index position information in the historical traversal, the greater the degree of attenuation of the corresponding first display duration. And, when the number of occurrences is 0, the display time information can be determined according to the first display duration.
[0138] It is understandable that as the number of times the index position information appears in the traversal increases, the number of times the widget presents the corresponding image to be displayed increases, and the user obtains relatively more comprehensive content information of the image to be displayed. The same image to be displayed can be displayed in the view window with a correspondingly reduced display time as the number of times it is presented increases, so as to flexibly control the rotation speed of the image to be displayed and improve the image display effect.
[0139] In these optional implementations, the display time information of the image to be displayed can be set according to the content information volume and the number of consumption times of the image, which is conducive to improving the image display effect and can enhance the user's experience of watching the carousel images.
[0140] S750 , generating display information according to the splicing graph, the index position sequence and the display time sequence, and sending the display information to the application software, so that the application software displays the image in the view window of the widget according to the display information.
[0141] In this embodiment, the server can generate display information according to the mosaic, index position sequence and display time sequence, and send the display information to the application software, so that the application software forwards the display information to the widget. Correspondingly, after obtaining the display information, the widget of the application can sequentially obtain the target image to be displayed from the mosaic according to the index position sequence; and can display the corresponding target image to be displayed in the view window according to the display time information.
[0142] In some optional implementations, the display information request carries performance information of the device to which the application software belongs; the method also includes: determining the request time based on the performance information and the business traffic trend information corresponding to the display information request; wherein the display information is also generated based on the request time; the request time is used to trigger the sending of a new display information request.
[0143] The device to which the application software belongs can be considered to be the same as the device to which the widget disclosed above belongs. The performance information of the device to which the application software belongs can include at least one of the following: performance information of hardware such as the central processing unit, image processing unit, memory, battery, etc.; performance information of the operating environment related to remaining memory, device temperature, device power, freeze conditions, and operating power consumption; performance information of the network environment related to network speed and / or network throughput.
[0144] The business traffic can be understood as the data transmission volume of the business. The process of determining the business traffic trend can include: the server obtains the business traffic within a preset time range based on the historical business traffic prediction model through a pre-built data prediction model.
[0145] The display information request may carry the performance information of the device to which the application software belongs. Accordingly, the server may parse the display information request to obtain the performance information; it may also determine the request time for receiving the display information request next time based on the performance information and the business traffic trend information corresponding to the display information request. The server may determine the request time based on the performance information and the business traffic trend information through a pre-built data processing model. The better the device performance represented by the performance information, the more frequently the display information can be requested; the more frequently the business traffic trend is at the peak of the business traffic, the more frequently the display information can be requested.
[0146] In these optional implementations, the server determines the request time based on performance information and business traffic trend information, which helps the widget to access the latest display information in a timely manner within the range supported by the device performance, thereby improving the user experience.
[0147] In the technical solution of the disclosed embodiment, a display information request sent by an application software can be received; wherein the display information request includes a widget of the application software, and a request sent by the application software; the image to be displayed is obtained according to the display information request, and the image to be displayed is spliced to obtain a spliced image; the index position sequence is determined according to the index position information of the image to be displayed in the spliced image; the display time sequence is determined according to the image to be displayed corresponding to the index position information in the index position sequence; the display information is generated according to the spliced image, the index position sequence and the display time sequence, and the display information is sent to the application software, so that the application displays the image in the view window of the widget according to the display information. By determining and returning the spliced image, the index position sequence and the display time sequence by the server, not only can the widget realize smooth and efficient image carousel display, but also the widget can realize the carousel display with flexible control of the carousel order, the number of carousels and the carousel speed of the images to be displayed in the spliced image, which can improve the image display effect.
[0148] In addition, the method for displaying an image in a widget provided in the embodiment of the present disclosure and the method for displaying an image in a widget provided in the above embodiment belong to the same public concept, and the technical details not fully described in this embodiment can be referred to the above embodiment, and the same technical features have the same beneficial effects in this embodiment and the above embodiment.
[0149] Figure 8 The schematic diagram of the structure of a device for displaying an image in a widget provided by an embodiment of the present disclosure is as follows. The device for displaying an image in a widget provided by this embodiment is applicable to the case where an image is displayed through a view window of a widget.
[0150] like Figure 8 As shown, the device for displaying an image in a widget provided by an embodiment of the present disclosure may include:
[0151] The request module 810 is used to request the server to display information; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by splicing the images to be displayed;
[0152] The image acquisition module 820 is used to sequentially acquire the target images to be displayed from the spliced image according to the index position sequence; wherein the display time sequence sequentially includes the display time information of the target images to be displayed;
[0153] The display module 830 is used to display the corresponding target image to be displayed in the view window of the widget according to the display time information.
[0154] In some optional implementations, when the presentation time information includes the presentation time, the presentation module may be configured to:
[0155] Obtain a preset clock constructed based on a clock component of the operating system to which it belongs, and configure and start the preset clock according to the first moment from the request to the display information;
[0156] Obtaining display moments in sequence from the display time sequence, and when a preset clock runs to the display moment, obtaining a target image to be displayed from the spliced image through an image acquisition module according to index position information corresponding to the display moment in the index position sequence;
[0157] Display the target image to be displayed in the viewing window.
[0158] In some optional implementations, the display module may also be used to:
[0159] In response to the view window being switched to an invisible state, pausing the preset clock; or,
[0160] In response to the view window being switched to an invisible state, when the preset clock runs to the display time, the image acquisition module stops acquiring the target image to be displayed.
[0161] In some optional implementations, when the display time information includes the display duration, the display module may be used to:
[0162] Get a preset timer built based on the clock component of the operating system to which it belongs;
[0163] In response to acquiring the target image to be displayed according to the index position sequence, configuring and starting a preset timer according to the corresponding display duration;
[0164] In response to the preset timer being started, displaying the target display image in the viewing window;
[0165] In response to the preset timer being executed to the end, the image acquisition module acquires the next target image to be displayed according to the index position sequence.
[0166] In some optional implementations, the display module may also be used to:
[0167] In response to the view window being switched to an invisible state, pausing a preset timer; or,
[0168] In response to the view window being switched to an invisible state and the preset timer being executed to an end, the image acquisition module stops acquiring the next target image to be displayed.
[0169] In some optional implementations, the image acquisition module may be used to:
[0170] Sequentially obtain index position information from the index position sequence, and determine a cutting range of the spliced graph according to the index position information;
[0171] The spliced image is cut according to the cutting range to obtain the target image to be displayed.
[0172] In some optional implementations, the presentation information also includes the request time;
[0173] The request module can be used to request new display information from the server when the request time is met and the network condition meets the preset conditions;
[0174] The display module can be used to continue to display images in the view window according to the display information when the request time is met and the network situation does not meet the preset conditions.
[0175] In some optional implementations, the device for displaying an image in a widget may further include:
[0176] The interaction module is configured to perform at least one of the following:
[0177] In response to the view window receiving the access instruction, accessing the function interface corresponding to the image to be displayed; wherein the target image to be displayed displayed by the view window when receiving the access instruction is located at the first position of the function interface;
[0178] In response to the view interface receiving the switching instruction, the target image to be displayed displayed by the view window is switched.
[0179] The device for displaying an image in a widget provided by the embodiments of the present disclosure can execute the method for displaying an image in a widget applied to an application provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
[0180] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0181] Fig. 9 The schematic diagram of the structure of a device for displaying an image in a widget provided by an embodiment of the present disclosure is applicable to the situation where a server sends display information to enable a widget of an application to display an image.
[0182] like Fig. 9 As shown, the device for displaying an image in a widget provided by an embodiment of the present disclosure may include:
[0183] The receiving module 910 is used to receive a display information request sent by the application software;
[0184] A mosaic image determination module 920 is used to obtain images to be displayed according to the display information request, and to mosaic the images to be displayed to obtain a mosaic image;
[0185] A first sequence determination module 930, configured to determine an index position sequence according to index position information of the image to be displayed in the spliced image;
[0186] A second sequence determination module 940 is used to determine a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence;
[0187] The sending module 950 is used to generate display information according to the mosaic image, the index position sequence and the display time sequence, and send the display information to the application software, so that the application software displays the image in the view window of the widget according to the display information.
[0188] In some optional implementations, the display information request carries the performance information of the device to which the application software belongs; and the means for displaying the image in the widget may further include:
[0189] A request time determination module, used to determine the request time according to the performance information and the business traffic trend information corresponding to the display information request;
[0190] The display information is also generated based on the request time; the request time is used to trigger the sending of a new display information request.
[0191] In some optional implementations, the second sequence determination module may be used to:
[0192] Determine the initial display duration of the image to be displayed according to the content information of the image to be displayed;
[0193] Traversing the index position sequence, and determining the display time information corresponding to the traversed index position information according to the first display duration of the to-be-displayed image corresponding to the traversed index position information and the number of occurrences of the traversed index position information in the historical traversal;
[0194] A display time sequence is determined according to the display time information determined in sequence.
[0195] The device for displaying an image in a widget provided by the embodiments of the present disclosure can execute the method for displaying an image in a widget applied to a server provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
[0196] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0197] Reference below Fig.10 , which shows an electronic device (eg, Fig.10 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0198] like Fig.10 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0199] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0200] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method for displaying an image in a widget of an embodiment of the present disclosure are executed.
[0201] The electronic device provided in the embodiment of the present disclosure and the method for displaying an image in a widget provided in the above embodiment belong to the same disclosed concept. For technical details not fully described in this embodiment, reference can be made to the above embodiment. This embodiment has the same beneficial effects as the above embodiment.
[0202] The embodiments of the present disclosure provide a storage medium of computer executable instructions. When the computer executable instructions are executed by a computer processor, they can be used to execute the method for displaying an image in a widget provided by the above embodiments.
[0203] It should be noted that the storage medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory (FLASH), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing executable instructions, which may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable executable instruction. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit executable instructions for use by or in conjunction with an instruction execution system, apparatus, or device. The executable instructions contained on the storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0204] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0205] The storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0206] The storage medium carries one or more executable instructions. When the one or more executable instructions are executed by the electronic device, the electronic device:
[0207] Requesting display information from the server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is composed of images to be displayed; according to the index position sequence, sequentially obtaining target images to be displayed from the mosaic image; wherein the display time sequence sequentially includes display time information of the target images to be displayed; according to the display time information, displaying the corresponding target images to be displayed in the view window of the widget.
[0208] Alternatively, the computer-readable medium carries one or more executable instructions, and when the one or more executable instructions are executed by the electronic device, the electronic device:
[0209] Receive a display information request sent by the application software; obtain the image to be displayed according to the display information request, and splice the image to be displayed to obtain a spliced image; determine the index position sequence according to the index position information of the image to be displayed in the spliced image; determine the display time sequence according to the image to be displayed corresponding to the index position information in the index position sequence; generate display information according to the spliced image, the index position sequence and the display time sequence, and send the display information to the application software, so that the application displays the image in the view window of the widget according to the display information.
[0210] Executable instructions for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The executable instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0211] An embodiment of the present disclosure further provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for displaying an image in a widget provided by any embodiment of the present disclosure can be implemented.
[0212] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code for the disclosed operation, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0213] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0214] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the names of the units and modules do not, in some cases, limit the units and modules themselves.
[0215] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.
[0216] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0217] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, the method comprising:
[0218] Requesting display information from the server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by stitching the images to be displayed;
[0219] According to the index position sequence, the target images to be displayed are sequentially obtained from the spliced image; wherein the display time sequence sequentially includes the display time information of the target images to be displayed;
[0220] According to the display time information, the corresponding target image to be displayed is displayed in the view window of the widget.
[0221] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0222] In some optional implementations, when the display time information includes a display time, the display process of the target image to be displayed includes:
[0223] Acquire a preset clock constructed based on a clock component of the operating system to which it belongs, and configure and start the preset clock according to the first moment from the request to the display information;
[0224] The display moments are sequentially acquired from the display time sequence, and when the preset clock runs to the display moment, a target image to be displayed is acquired from the spliced image according to index position information corresponding to the display moment in the index position sequence, and the target image to be displayed is displayed in a view window.
[0225] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0226] In some optional implementations, in response to the view window being switched to an invisible state, the preset clock is paused; or,
[0227] In response to the view window being switched to an invisible state, when the preset clock runs to the display time, the acquisition of the target image to be displayed is stopped.
[0228] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0229] In some optional implementations, when the display time information includes a display duration, the display process of the target image to be displayed includes:
[0230] Get a preset timer built based on the clock component of the operating system to which it belongs;
[0231] In response to acquiring the target image to be displayed according to the index position sequence, configuring and starting the preset timer according to the corresponding display duration;
[0232] In response to the preset timer being started, displaying the target display image in the view window;
[0233] In response to the preset timer being executed to the end, the next target image to be displayed is acquired according to the index position sequence.
[0234] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0235] In some optional implementations, in response to the view window being switched to an invisible state, the preset timer is paused; or,
[0236] In response to the view window being switched to an invisible state and the preset timer being executed to the end, the acquisition of the next target image to be displayed is stopped.
[0237] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0238] In some optional implementations, sequentially acquiring target images to be displayed from the spliced image according to the index position sequence includes:
[0239] Sequentially acquiring index position information from the index position sequence, and determining a cutting range of the spliced graph according to the index position information;
[0240] The mosaic image is cut according to the cutting range to obtain the target image to be displayed.
[0241] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0242] In some optional implementations, the display information further includes a request time; and the method further includes:
[0243] When the request time is met and the network condition meets the preset conditions, requesting new display information from the server;
[0244] When the request time is met and the network condition does not meet the preset condition, continue to display the image in the view window according to the display information.
[0245] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0246] In some optional implementations, at least one of the following is also included:
[0247] In response to the view window receiving the access instruction, accessing the function interface corresponding to the image to be displayed; wherein the target image to be displayed displayed by the view window when receiving the access instruction is located at the first position of the function interface;
[0248] In response to the view interface receiving the switching instruction, the target image to be displayed in the view window is switched.
[0249] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, the method comprising:
[0250] Receiving a display information request sent by an application software;
[0251] Acquire the images to be displayed according to the display information request, and splice the images to be displayed to obtain a spliced image;
[0252] Determining an index position sequence according to index position information of the image to be displayed in the spliced image;
[0253] Determining a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence;
[0254] Display information is generated according to the mosaic graph, the index position sequence and the display time sequence, and the display information is sent to the application software, so that the application software displays the image in the view window of the widget according to the display information.
[0255] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0256] In some optional implementations, the display information request carries performance information of the device to which the application software belongs; and the method further includes:
[0257] Determining a request time according to the performance information and the business traffic trend information corresponding to the display information request;
[0258] The display information is also generated based on the request time; the request time is used to trigger sending a new display information request.
[0259] According to one or more embodiments of the present disclosure, a method for displaying an image in a widget is provided, further comprising:
[0260] In some optional implementations, determining the display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence includes:
[0261] Determining the first display duration of the image to be displayed according to the content information amount of the image to be displayed;
[0262] Traversing the index position sequence, and determining display time information corresponding to the traversed index position information according to the first display duration of the to-be-displayed image corresponding to the traversed index position information and the number of occurrences of the traversed index position information in the historical traversal;
[0263] A display time sequence is determined according to the display time information determined in sequence.
[0264] According to one or more embodiments of the present disclosure, a device for displaying an image in a widget is provided, the device comprising:
[0265] A request module, used for requesting display information from a server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by stitching together the images to be displayed;
[0266] An image acquisition module, used to sequentially acquire target images to be displayed from the spliced image according to the index position sequence; wherein the display time sequence sequentially includes display time information of the target images to be displayed;
[0267] A display module is used to display the corresponding target image to be displayed in the view window of the widget according to the display time information.
[0268] According to one or more embodiments of the present disclosure, a device for displaying an image in a widget is provided, the device comprising:
[0269] A receiving module, used for receiving a display information request sent by the application software;
[0270] A mosaic image determination module, used for obtaining the images to be displayed according to the display information request, and mosaicing the images to be displayed to obtain a mosaic image;
[0271] A first sequence determination module, configured to determine an index position sequence according to index position information of the image to be displayed in the spliced image;
[0272] A second sequence determination module, used to determine a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence;
[0273] The sending module is used to generate display information according to the mosaic image, the index position sequence and the display time sequence, and send the display information to the application software, so that the application software displays the image in the view window of the widget according to the display information.
[0274] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0275] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0276] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for displaying an image in a widget, characterized in that: include: Requesting display information from the server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by stitching the images to be displayed; According to the index position sequence, the target images to be displayed are sequentially obtained from the spliced image; wherein the display time sequence sequentially includes the display time information of the target images to be displayed; According to the display time information, the corresponding target image to be displayed is displayed in the view window of the widget.
2. The method according to claim 1, characterized in that In the case where the display time information includes a display time, the display process of the target image to be displayed includes: Acquire a preset clock constructed based on a clock component of the operating system to which it belongs, and configure and start the preset clock according to the first moment from the request to the display information; The display moments are sequentially acquired from the display time sequence, and when the preset clock runs to the display moment, a target image to be displayed is acquired from the spliced image according to index position information corresponding to the display moment in the index position sequence, and the target image to be displayed is displayed in the view window.
3. The method according to claim 2, characterized in that Also includes: In response to the view window being switched to an invisible state, pausing the preset clock; or, In response to the view window being switched to an invisible state, when the preset clock runs to the display time, the acquisition of the target image to be displayed is stopped.
4. The method according to claim 1, characterized in that: In the case where the display time information includes the display duration, the display process of the target image to be displayed includes: Get a preset timer based on the clock component of the operating system to which it belongs; In response to acquiring the target image to be displayed according to the index position sequence, configuring and starting the preset timer according to the corresponding display duration; In response to the preset timer being started, displaying the target display image in the view window; In response to the preset timer being executed to the end, the next target image to be displayed is acquired according to the index position sequence.
5. The method according to claim 4, characterized in that Also includes: In response to the view window being switched to an invisible state, pausing the preset timer; or, In response to the view window being switched to an invisible state and the preset timer being executed to the end, the acquisition of the next target image to be displayed is stopped.
6. The method according to claim 1, characterized in that The step of sequentially acquiring target images to be displayed from the spliced image according to the index position sequence includes: Sequentially acquiring index position information from the index position sequence, and determining a cutting range of the spliced graph according to the index position information; The mosaic image is cut according to the cutting range to obtain the target image to be displayed.
7. The method according to claim 1, characterized in that The display information also includes the request time; and the method further includes: When the request time is met and the network condition meets the preset conditions, requesting new display information from the server; When the request time is met and the network condition does not meet the preset condition, continue to display the image in the view window according to the display information.
8. The method according to claim 1, characterized in that Also includes at least one of the following: In response to the view window receiving the access instruction, accessing the function interface corresponding to the image to be displayed; wherein the target image to be displayed displayed by the view window when receiving the access instruction is located at the first position of the function interface; In response to the view interface receiving the switching instruction, the target image to be displayed in the view window is switched.
9. A method for displaying an image in a widget, characterized in that: include: Receiving a display information request sent by an application software; Acquire the images to be displayed according to the display information request, and splice the images to be displayed to obtain a spliced image; Determining an index position sequence according to index position information of the image to be displayed in the spliced image; Determining a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence; Display information is generated according to the mosaic graph, the index position sequence and the display time sequence, and the display information is sent to the application software, so that the application software displays the image in the view window of the widget according to the display information.
10. The method according to claim 9, characterized in that The display information request carries the performance information of the device to which the application software belongs; the method further includes: Determining a request time according to the performance information and the business traffic trend information corresponding to the display information request; The display information is also generated based on the request time; the request time is used to trigger sending a new display information request.
11. The method according to claim 9, characterized in that The step of determining a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence includes: Determining the first display duration of the image to be displayed according to the content information amount of the image to be displayed; Traversing the index position sequence, and determining display time information corresponding to the traversed index position information according to the first display duration of the to-be-displayed image corresponding to the traversed index position information and the number of occurrences of the traversed index position information in the historical traversal; A display time sequence is determined according to the display time information determined in sequence.
12. A device for displaying an image in a widget, characterized in that: include: A request module, used for requesting display information from a server; wherein the display information includes: a mosaic image, an index position sequence and a display time sequence; the mosaic image is formed by stitching together the images to be displayed; An image acquisition module, used to sequentially acquire target images to be displayed from the spliced image according to the index position sequence; wherein the display time sequence sequentially includes display time information of the target images to be displayed; A display module is used to display the corresponding target image to be displayed in the view window of the widget according to the display time information.
13. A device for displaying an image in a widget, characterized in that: include: A receiving module, used for receiving a display information request sent by the application software; A mosaic image determination module, used for obtaining the images to be displayed according to the display information request, and mosaicing the images to be displayed to obtain a mosaic image; A first sequence determination module, configured to determine an index position sequence according to index position information of the image to be displayed in the spliced image; A second sequence determination module, used to determine a display time sequence according to the to-be-displayed images corresponding to the index position information in the index position sequence; The sending module is used to generate display information according to the mosaic image, the index position sequence and the display time sequence, and send the display information to the application software, so that the application software displays the image in the view window of the widget according to the display information.
14. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for displaying an image in a widget as described in any one of claims 1-8 or 9-11.
15. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the method for displaying an image in a widget according to any one of claims 1 to 8 or 9 to 11 when executed by a computer processor.
16. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the method for displaying an image in a widget according to any one of claims 1 to 8 or 9 to 11.
Citation Information
Patent Citations
User interface with media content prediction
CN103999017A
Widget-based display method and apparatus, and terminal device
CN106528136A
Method and device for displaying works covers by using widget and mobile terminal
CN108038244A
Control display method, device and system and computer readable storage medium
CN111488087A
Carousel graph display method and system, storage medium and terminal equipment
CN113791751A
Cited By
Method and apparatus for displaying image in widget, electronic device, and storage medium
WO2026138641A1