Method and apparatus for displaying image in widget, electronic device and storage medium
By generating spliced images and controlling the display of images in widgets using time series, the problems of monotonous image display effects and low request success rate in widgets are solved, achieving efficient and smooth image carousel.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2024-12-24
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, the image display effect of widgets is monotonous, the image request success rate is low, and the loading time is long, making it difficult to achieve smooth and efficient carousel display.
By requesting display information from the server, a mosaic image, index position sequence, and display time sequence are generated. The target images to be displayed are obtained in sequence and their display in the widget view window is controlled, allowing for flexible control of the carousel order, number of times, and speed.
It improved the success rate and efficiency of image requests, enabled smooth and efficient image carousel display, and enhanced the user experience.
Smart Images

Figure CN119847660B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to a method, apparatus, electronic device, and storage medium for displaying images in a widget. Background Technology
[0002] In related technologies, application software widgets can be understood as miniature views embedded in other applications (such as device screens) and displaying data related to the application software. In schemes that display images via widgets, images are typically requested and displayed at equal intervals, and the image display quality needs improvement. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for displaying images in a widget, which can improve the image display effect.
[0004] In a first aspect, embodiments of this disclosure provide a method for displaying an image in a widget, including:
[0005] The system requests information to be displayed from the server; the displayed information includes: a mosaic image, an index position sequence, and a display time sequence; the mosaic image is composed of images to be displayed.
[0006] Based on the index position sequence, the target images to be displayed are sequentially obtained from the stitched image; wherein, the display time sequence contains the display time information of the target images to be displayed in sequence;
[0007] Based on the display time information, the corresponding target image to be displayed is shown in the widget's view window.
[0008] Secondly, embodiments of this disclosure provide a method for displaying an image in a widget, including:
[0009] Receive display information requests sent by application software;
[0010] The image to be displayed is obtained according to the display information request, and the image to be displayed is stitched together to obtain a stitched image;
[0011] Determine the index position sequence based on the index position information of the image to be displayed in the stitched image;
[0012] The display time sequence is determined based on the image to be displayed corresponding to the index position information in the index position sequence;
[0013] Display information is generated based on the stitched image, the index position sequence, and the display time sequence, and the display information is sent to the application software so that the application software can display the image in the widget's view window based on the display information.
[0014] Thirdly, embodiments of this disclosure also provide an apparatus for displaying images in a widget, comprising:
[0015] The request module is used to request 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.
[0016] The image acquisition module is used to sequentially acquire target images to be displayed from the stitched image according to the index position sequence; wherein, the display time sequence contains the display time information of the target images to be displayed in sequence;
[0017] The 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] Fourthly, embodiments of this disclosure also provide an apparatus for displaying images in a widget, comprising:
[0019] The receiving module is used to receive display information requests sent by the application software;
[0020] The stitching image determination module is used to request and obtain the image to be displayed according to the display information, and stitch the image to be displayed to obtain the stitched image;
[0021] The first sequence determination module is used to determine the index position sequence based on the index position information of the image to be displayed in the stitched image;
[0022] The second sequence determination module is used to determine the display time sequence based on the image to be displayed corresponding to the index position information in the index position sequence.
[0023] The sending module is used to generate display information based on 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 software can display the image in the view window of the widget based on the display information.
[0024] Fifthly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0025] One or more processors;
[0026] 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 a method for displaying an image in a widget as described in any embodiment of this disclosure.
[0028] Sixthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a method for displaying an image in a widget as described in any of the embodiments of this disclosure.
[0029] In the technical solution of this disclosure embodiment, display information can be requested from the server. The display information includes: a stitched image, an index position sequence, and a display time sequence. The stitched image is composed of images to be displayed. Target images to be displayed are sequentially obtained from the stitched image according to the index position sequence. The display time sequence sequentially contains display time information for the target images to be displayed. Based on the display time information, the corresponding target images to be displayed are displayed in the widget's view window. Requesting the stitched image facilitates obtaining multiple images to be displayed at once, improving the success rate and efficiency of image requests, and enabling smooth and efficient image carousel display. Furthermore, by requesting the index position sequence and display time sequence, the carousel order, number of carousels, and carousel speed of the images to be displayed in the stitched image can be flexibly controlled, improving the image display effect. Attached Figure Description
[0030] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote 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 This is a flowchart illustrating a method for displaying an image in a widget according to an embodiment of this disclosure;
[0032] Figure 2 This is a schematic diagram of a stitched image in a method for displaying an image in a widget provided in an embodiment of this disclosure;
[0033] Figure 3 A schematic diagram of a view window in a method for displaying an image in a widget provided in an embodiment of this disclosure;
[0034] Figure 4 This is a flowchart illustrating a method for displaying an image in a widget according to an embodiment of this disclosure;
[0035] Figure 5 A timeline diagram illustrating the display time of a method for displaying an image in a widget provided in an embodiment of this disclosure;
[0036] Figure 6 This is a flowchart illustrating a method for displaying an image in a widget according to an embodiment of this disclosure;
[0037] Figure 7This is a flowchart illustrating a method for displaying an image in a widget according to an embodiment of this disclosure;
[0038] Figure 8 This is a schematic diagram of the structure of a device for displaying images in a micro-device, provided in an embodiment of this disclosure;
[0039] Figure 9 This is a schematic diagram of the structure of a device for displaying images in a micro-device, provided in an embodiment of this disclosure;
[0040] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0041] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0042] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0043] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based 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". Definitions of other terms will be given in the description below.
[0044] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0045] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0046] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0047] Figure 1 This is a flowchart illustrating a method for displaying an image in a widget, as provided in an embodiment of this disclosure. This embodiment is applicable to situations where images are displayed through a view window of a widget. The method can be executed by a device for displaying images in a widget, which can be implemented in software and / or hardware. This device can be integrated into a widget within an application and can be configured with the widget in an electronic device, such as a mobile phone or computer.
[0048] like Figure 1 As shown, the method for displaying images in a widget provided in this embodiment may include:
[0049] S110. Request information to be displayed from the server; the information to be displayed includes: a mosaic image, an index position sequence, and a display time sequence; the mosaic image is composed of images to be displayed.
[0050] In this embodiment of the disclosure, different application software may include multimedia display interfaces (hereinafter referred to as functional interfaces) corresponding to different business functions. For example, social application software may include a functional interface for displaying multimedia content posted by communication users; content sharing application software may include a functional interface for displaying multimedia content posted by followed users, etc. The application software widgets can be displayed on the device screen and can display relevant images of specified functional interfaces within the application software through miniature view windows. For example, when displaying images of a functional page that aggregates multimedia content through a widget, if the multimedia content is an image, the widget can directly display the image; if the multimedia content is video, text, etc., the widget can display the corresponding cover image.
[0051] In this embodiment, the widget can respond to a preset trigger and launch the application software in the background without the user's awareness. The application software then sends a request to the server to display information. The requested display information can be set according to the specific business scenario. For example, when the widget displays images related to multimedia content posted by a communication user, it can request images related to multimedia content posted by the communication user within a preset time range (e.g., within 3 days), and / or, it can request images related to unread multimedia content posted by the communication user.
[0052] Accordingly, the server can obtain several relevant images corresponding to the information display request as images to be displayed, and then stitch these images together to form a composite image. For example, Figure 2 This is a schematic diagram of a stitched image in a method for displaying an image in a widget provided in an embodiment of this disclosure. See also... Figure 2The server can horizontally stitch together n images to be displayed to obtain a stitched image. Alternatively, it can stitch together n images vertically or in a grid pattern to obtain stitched images, etc., but these are not exhaustive examples here.
[0053] The location of the image to be displayed within the stitched image can be represented using index location information. For example, see again... Figure 2 In a horizontal long image, the numbers 1 to n can be used as the index positions of the n images to be displayed. Furthermore, based on the preset length and width dimensions of the images to be displayed in the stitched image, and the stitching method, the region position of the image to be displayed corresponding to index position information i in the stitched image can be determined, where i ∈ [1, n]. For example, in... Figure 2 In the stitching method shown, when the index position information is 1, the area enclosed by the horizontal dimension 0 to the preset length dimension and the vertical dimension 0 to the preset width dimension can be used as the area position of the image to be displayed in the stitched image corresponding to the index position information.
[0054] The server can determine the index position sequence based on the preset display strategy of the images to be displayed and their index position information in the stitched image. For example, it can use a random display strategy to randomly generate the index position sequence based on the index position information of the images to be displayed. Each index position information can appear at least once in the index position sequence, meaning the index position sequence can contain the same index position information. Alternatively, it can use a reverse order display strategy, arranging the corresponding index position information into an index position sequence in reverse order of the images' publication time. The index position sequence can also contain multiple rounds of sequentially arranged index position information to achieve multi-round display of the images 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 stitched image according to the preset display strategy, enabling flexible control over the carousel order and number of carousels of the images to be displayed, thus improving the image display effect.
[0055] After determining the index position sequence, the server can further determine the display time sequence based on the images to be displayed corresponding to the index position information in the sequence. Specifically, the server can iterate through the index position sequence and determine the display time information corresponding to each iterated index position based on the initial display duration of the image corresponding to that index position and the number of times that index position information appears in the historical iterations. Furthermore, the server can determine the display time sequence based on the sequentially determined display time information.
[0056] The process of determining the initial display duration may include: the server can identify the amount of content information in the image to be displayed through a pre-built image processing model, and determine the initial display duration based on the amount of content information. The amount of content information is positively correlated with the initial display duration; that is, the more content information in the image to be displayed, the longer its initial display duration.
[0057] The display time information can be used to characterize the display duration of the image to be displayed. The process of determining the display time information can include: attenuating the initial display duration of the image corresponding to the traversed index position information based on the number of times the index position information appears in the historical traversal; and determining the display time information of the image corresponding to the traversed index position information based on the attenuated initial display duration. The number of occurrences and the attenuation can be positively correlated; that is, the more times the traversed index position information appears in the historical traversal, the greater the degree of attenuation of the corresponding initial display duration. Furthermore, when the number of occurrences is 0, the display time information can be determined based on the initial display duration.
[0058] Understandably, as the index position information appears more frequently during traversal, the widget displays the corresponding image more often, allowing users to obtain more comprehensive information about the displayed image. The same image can have its display time in the view window reduced as the number of times it is displayed increases, thus flexibly controlling the image carousel speed and improving the image display effect.
[0059] Furthermore, as disclosed above, the index position sequence and the display time sequence have the same sequence length and a corresponding relationship. It can be assumed that the display time information of the image to be displayed corresponding to the index position information of a certain order in the index position sequence is the same as the display time information of the image in the same order in the display time sequence.
[0060] The server can generate display information based on the splicing diagram, index position sequence, and display time sequence, and send the display information to the application software so that the application software can forward the display information to the widget.
[0061] S120. Based on the index position sequence, sequentially obtain the target images to be displayed from the stitched image; wherein, the display time sequence contains the display time information of the target images to be displayed.
[0062] In this embodiment of the disclosure, after obtaining the display information, the application widget can traverse the index position sequence and determine the region position of the image to be displayed corresponding to the traversed index position information in the stitched image based on the traversed index position information, the preset length and width dimensions, and the stitching method. Then, the corresponding image to be displayed, i.e., the target image to be displayed, can be obtained from the stitched image based on the region position. Since the index position sequence and the display time sequence have a correspondence, the display time information corresponding to the target images to be displayed obtained sequentially is sequentially included in the display time sequence.
[0063] In some optional implementations, the target image to be displayed is sequentially obtained from the stitched image according to the index position sequence. This may include: sequentially obtaining index position information from the index position sequence and determining the cutting range of the stitched image according to the index position information; cutting the stitched image according to the cutting range to obtain the target image to be displayed.
[0064] The sequentially acquired index position information can be considered as the traversed index position information. The process of determining the cutting range based on the index position information may include: determining the region position of the image to be displayed in the stitched image corresponding to the traversed index position information, based on the traversed index position information, preset length and width dimensions, and stitching method. This region position can be considered as the cutting range.
[0065] Among these optional implementations, the stitched image can be cut according to the cutting range to obtain the target display image. Since the view window of a widget is usually small, its image resolution requirements are low. By cutting the stitched image, the target image to be displayed can be quickly obtained and displayed, which can greatly improve the image display efficiency.
[0066] In addition, in other implementation methods, the displacement of the mosaic image in the view window can be determined according to the regional position of the image to be displayed in the mosaic image corresponding to the index position information, so that the part displayed in the view window is the target image to be displayed, thereby realizing multi-image carousel based on the same mosaic image without cutting or loading.
[0067] S130. Based on the display time information, display the corresponding target image to be displayed in the widget's view window.
[0068] In this embodiment, steps S120 and S130 do not have a strict temporal order.
[0069] For example, you can first obtain the index position information traversed in the index position sequence; then, while obtaining the target image to be displayed from the stitched image based on the index position information, you can also obtain the display time information in the same order as the traversed index position information from the display time sequence; finally, based on the display time information, you can display the target image to be displayed in the view window for the corresponding duration.
[0070] For example, one could first retrieve the display time information sequentially from the time series; then, based on the display time information, periodically traverse the index position information from the index position sequence; finally, determine the target image to be displayed based on the index position information and display it in the view window. This method can also achieve the display of the target image for a corresponding duration based on the display time information.
[0071] For example, Figure 3 This is a schematic diagram of a view window in a method for displaying an image in a widget provided in an embodiment of this disclosure. See also... Figure 3 300 can represent the device screen, 301 can represent the view window of the widget, and 302 can represent a segmented progress control. Among these, the progress control corresponding to the currently displayed target image can be displayed differently from the progress controls corresponding to other images to be displayed. For example... 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 contain multiple sequentially arranged index position information, allowing the display to jump back to the first image to be displayed after one round of images has been completed. Correspondingly, after the last progress control has been clearly displayed, the first progress control can be clearly displayed.
[0072] In related technologies, due to limitations in device performance, the number of images requested each time is limited. Therefore, when performing 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, a long time span is easily affected by various factors (such as network factors, application software operation factors, etc.), resulting in a low image request success rate and long image loading time. In the embodiments of this disclosure, by requesting image stitching, it is beneficial to obtain a large number of images to be displayed at once, which can improve the image request success rate and request efficiency, and facilitate a smooth and efficient image carousel display.
[0073] In related technologies, images are typically displayed in a loop at equal intervals (e.g., 10 minutes), resulting in a rather monotonous display effect. However, in this embodiment, by using the index position sequence and the display time sequence, the looping order, number of loops, and looping speed of the images to be displayed in the stitched image can be flexibly controlled, thereby improving the image display effect.
[0074] Furthermore, in this embodiment of the present disclosure, 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 based on the index position sequence and the display time sequence, and perform multi-image carousel based on the new display information.
[0075] In some alternative implementations, the method for displaying an image in a widget may further include at least one of the following: in response to a view window receiving an access instruction, accessing the functional interface corresponding to the image to be displayed; wherein, when the access instruction is received, the target image to be displayed displayed in the view window is located at the top of the functional interface; in response to a view interface receiving a switching instruction, switching the target image to be displayed displayed in the view window.
[0076] The view window can include views written in existing programming languages according to business requirements, such as list views. Multiple interaction methods can be defined during the view window development process.
[0077] For example, when a click is received in the first area (such as the middle area) of the view window, an access command can be generated. Correspondingly, the application software widget can respond to the access command, launch the application software, and access the function page corresponding to the image to be displayed. The widget can transmit the image identifier of the target image displayed in the view window when the access command is received to the application software. The application software can then forcefully insert the corresponding target image to be displayed at the top of the function interface based on the image identifier, thereby improving 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 generated; accordingly, the application software widget can respond to the switching instruction, obtain the target image to be displayed before / after, and display the view window according to its corresponding display time information.
[0079] Among these optional implementations, widgets can respond to access and / or toggle commands to perform corresponding interactive actions, improving the user experience. Furthermore, other interaction methods for view windows can also be included here, but will not be exhaustively listed.
[0080] In some optional implementations, the display information also includes the request time; the method of displaying an image in a widget may also include: requesting new display information from the server when the request time is met and the network conditions meet preset conditions; and continuing to display the image in the view window based on the display information when the request time is met but the network conditions do not meet preset conditions.
[0081] In related technologies, images for the next round of display are usually requested at equal intervals (e.g., 12 hours), which can easily lead to situations where the latest images cannot be accessed in a timely manner, resulting in a poor user experience.
[0082] In these optional implementations disclosed herein, the server can predict the request time based on the traffic trend of the service corresponding to the image to be displayed. For example, the request time can be determined based on peak traffic periods. Accordingly, the widget can request new display information from the server through the application software when the request time is met and the network conditions of its device meet preset conditions (such as preset network speed), which is conducive to timely delivery of the latest images. In addition, if the request time is met, but the network conditions of its device do not meet the preset conditions, image carousel can continue to be performed based on the current display information until the network conditions meet the preset conditions, at which point new display information can be requested again to ensure that the widget performs normal image carousel.
[0083] In the technical solution of this disclosure embodiment, display information can be requested from the server. The display information includes: a stitched image, an index position sequence, and a display time sequence. The stitched image is composed of images to be displayed. Target images to be displayed are sequentially obtained from the stitched image according to the index position sequence. The display time sequence sequentially contains display time information for the target images to be displayed. Based on the display time information, the corresponding target images to be displayed are displayed in the widget's view window. Requesting the stitched image facilitates obtaining multiple images to be displayed at once, improving the success rate and efficiency of image requests, and enabling smooth and efficient image carousel display. Furthermore, by requesting the index position sequence and display time sequence, the carousel order, number of carousels, and carousel speed of the images to be displayed in the stitched image can be flexibly controlled, improving the image display effect.
[0084] This disclosure embodiment can be combined with various optional solutions in the methods for displaying images in widgets provided in the above embodiments. The method for displaying images in widgets provided in this embodiment describes in detail the image display process when the display time information is the display moment. By simulating a preset clock using a clock component based on the operating system, the target image to be displayed can be obtained and displayed according to the corresponding index position information when the preset clock reaches each display moment, thereby realizing a multi-image carousel driven by a timeline composed of display moments.
[0085] Figure 4 This is a flowchart illustrating a method for displaying an image in a widget, as provided in an embodiment of this disclosure. Figure 4 As shown, the method for displaying an image in a widget provided in this embodiment, when the display time information includes the display time, may include:
[0086] S410. Request information to be displayed from the server; the information to be displayed includes: a mosaic image, an index position sequence, and a display time sequence; the mosaic image is composed of images to be displayed.
[0087] S420: Obtain the preset clock built based on the clock component of the operating system, and configure and start the preset clock according to the first moment from the request to the display of information.
[0088] In this embodiment, the operating system refers to the operating system of the device to which the application belongs. The application's widget can pre-build a preset clock based on the operating system's clock component. This preset clock differs from the operating system's clock component; it is an analog clock. Compared to the clock component, the preset clock can have a larger time unit (e.g., 1 second), and it can perform operations such as time pause; that is, its time can differ from Coordinated Universal Time (UTC).
[0089] The application's widget can respond to the request for display information by setting a preset clock to the first moment the request for display information is received, and start running the preset clock.
[0090] S430. Sequentially obtain the display time from the display time sequence, and when the preset clock reaches the display time, obtain the target image to be displayed from the stitched image according to the index position information corresponding to the display time in the index position sequence, and display the target image to be displayed in the view window.
[0091] In this embodiment, the displayed time information includes the displayed moment, which may be composed of hours, minutes, and seconds, for example. Figure 5 This is a timeline diagram illustrating the display time of a method for displaying an image in a widget provided in an embodiment of this disclosure. Figure 5 The displayed time series can contain 500 display moments between 10:00:01 and 10:19:58, and these 500 display moments can form the display timeline of the image to be displayed.
[0092] For example, Table 1 shows the correspondence between the display moments in the display time series and the index position information in the index position series. The timeline composed of the display moments in Table 1 can be considered as... Figure 5 The timelines shown are the same.
[0093] Table 1
[0094] Presentation Time 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 shown in Table 1, the time series and the index position series have the same length and correspond to each other. The index position series can contain the same index position information, thus enabling the same image to be displayed multiple times.
[0096] by Figure 5Taking the timeline shown as an example, the display process of the target image to be displayed can include: the application widget requests 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 series, and the preset clock can be configured with timing responses based on these display moments. Correspondingly, whenever the preset clock reaches one of the display moments, the application widget can obtain the index position information corresponding to the display moment according to the correspondence shown in Table 1. Figure 5 The target image to be displayed is obtained from the stitched image based on the index position information (marked in the box above the display time), and then displayed in the view window, thus realizing a multi-image carousel driven by the timeline formed by the display time.
[0097] In some alternative implementations, the method may also include: pausing the preset clock in response to the view window switching to an invisible state; or, stopping the acquisition of the target image to be displayed when the preset clock reaches the display time in response to the view window switching to an invisible state.
[0098] Invisible state can be understood as the state in which widgets cannot be displayed on the device screen, such as the locked screen state, the state of the application or other software running in the foreground, etc. Correspondingly, visible state is the state in which widgets are displayed on the device screen.
[0099] When the view window is invisible, the application widget can pause the preset clock, causing a discrepancy between the preset clock's time and the actual time. Conversely, when the view window becomes visible, the application widget can restart the preset clock and resume the multi-image carousel based on the preset clock's time and the display time. In this case, if the display information includes a requested time, the time for completing the image carousel, based on the index position sequence and display time sequence, is typically later than the requested time. At this point, the application widget, in response to completing the image carousel, requests new display information from the server through its application software and reconfigures the preset clock based on the new display information to drive the multi-image carousel according to the new timeline.
[0100] Furthermore, even when the view window is invisible, the preset clock can continue to run, maintaining the same time as the actual time. However, in this case, if the preset clock reaches the display time, acquiring the target image to be displayed can stop. When the view window becomes visible, the target image to be displayed can be acquired based on the index position information corresponding to the previous display time and displayed in the view window. In this case, the time when the image carousel is completed based on the index position sequence and display time sequence can be the same as the requested time. The application widget can respond to the fulfillment of the requested time by requesting new display information from the server through its application software. For example, see again... Figure 5 The request time can be 10:20:00. The application widget can respond to the request time by requesting new display information from the server through its application software.
[0101] Among these optional implementations, two strategies are provided: pausing the preset clock or pausing the acquisition of the target image to be displayed when the widget is invisible. This enables flexible changes in image display and improves the robustness of image display.
[0102] The technical solution of this disclosure provides a detailed description of the image display process when the display time information is the display moment. By simulating a preset clock using a clock component based on the operating system, the target image to be displayed can be obtained and displayed according to the corresponding index position information when the preset clock reaches each display moment, thereby realizing a multi-image carousel driven by a timeline composed of display moments. The method for displaying images in a widget provided in this disclosure is based on the same concept as the method for displaying images in a widget provided in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and the same technical features have the same beneficial effects in this embodiment and the above embodiments.
[0103] This disclosure embodiment can be combined with various optional solutions in the methods for displaying images in widgets provided in the above embodiments. The method for displaying images in widgets provided in this embodiment describes the image display process when the display time information is a display duration. By simulating a preset timer using an operating system-based clock component, 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. Furthermore, the current target image to be displayed can be displayed during the preset timer countdown, and the next target image to be displayed can be obtained after the timer countdown ends, thereby realizing a countdown-driven multi-image carousel.
[0104] Figure 6 This is a flowchart illustrating a method for displaying an image in a widget, as provided in an embodiment of this disclosure. Figure 6As shown, the method for displaying images in a widget provided in this embodiment, when the display time information includes the display duration, may include:
[0105] S610. Request information to be displayed from the server; the information to be displayed includes: a mosaic image, an index position sequence, and a display time sequence; the mosaic image is composed of images to be displayed.
[0106] S620: Obtain a preset timer built based on the clock component of the operating system.
[0107] In this embodiment, the application widget can pre-build a preset timer based on the operating system's clock component, and the preset timer can have a countdown response function.
[0108] S630. Based on the index position sequence, sequentially obtain the target images to be displayed from the stitched image.
[0109] In this embodiment, the application widget can respond to the request for display information, sequentially obtain the index position information in the index position sequence, and obtain the target image to be displayed from the stitched image based on the index position information.
[0110] S640. In response to obtaining the target image to be displayed based on the index position sequence, configure and start a preset timer according to the corresponding display duration.
[0111] For example, Table 2 shows the correspondence between the display duration in the display time series and the index position information in the index position series.
[0112] Table 2
[0113] Display duration (seconds) 4 10 5 ... 8 2 Index location information 1 2 3 ... 2 3
[0114] As shown in Table 2, the time series and the index position series have the same length and correspond to each other. The index position series can contain the same index position information, and the display duration gradually decreases as the frequency of occurrence of the same index position information increases.
[0115] In this embodiment, in response to each acquisition of a target image to be displayed, the application widget can, according to the correspondence shown in Table 2, obtain the display duration of the same order from the display time sequence based on the order of the index position information in the index position sequence, and configure and start a preset timer according to the display duration, so that the preset timer counts down according to the display duration. As can be seen from Tables 1 and 2, the carousel order, number of carousels, and carousel speed of the images to be displayed based on the correspondence shown in Table 1 are the same as those based on the correspondence shown in Table 2.
[0116] S650, in response to the start of a preset timer, displays the target image in the view window.
[0117] S660: In response to the end of the preset timer execution, obtain the next target image to be displayed according to the index position sequence.
[0118] In this embodiment, the application widget can display the current target image to be displayed during the countdown of a preset timer, and can acquire the next target image to be displayed after the countdown ends, thereby realizing a multi-image carousel driven by a countdown.
[0119] In some alternative implementations, the method for displaying an image in a widget may also include: pausing a preset timer in response to the view window switching to an invisible state; or, stopping the acquisition of the next target image to be displayed in response to the view window switching to an invisible state and the preset timer finishing execution.
[0120] When the view window is invisible, the application widget can pause a preset timer to stop the countdown. Conversely, when the view window becomes visible, the application widget can start the preset timer and resume displaying the target image from the last visible state, based on the remaining countdown. In this case, if the display information includes a requested time, the time when the image carousel is completed, based on the index position sequence and display time sequence, is usually later than the requested time. At this point, the application widget can request new display information from the server through its application software in response to completing the image carousel.
[0121] Furthermore, even when the view window is invisible, the preset timer can continue running 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 when the view window becomes visible. In this scenario, if the display information includes a requested time, the time when the image carousel is completed based on the index position sequence and display time sequence is usually later than the requested time. At this point, the application's widget can request new display information from the server through its application software in response to completing the image carousel.
[0122] Among these optional implementations, two strategies are provided: pausing the preset timer or pausing the acquisition of the target image to be displayed when the widget is invisible. This enables flexible changes in image display and improves the robustness of image display.
[0123] This disclosure provides a detailed description of the image display process when the display time information is the display duration. By simulating a preset timer using an operating system-based clock component, the preset timer can be configured and started according to the corresponding display duration once the current target image to be displayed is obtained based on the index position sequence. Furthermore, the current target image to be displayed can be displayed during the preset timer countdown, and the next target image to be displayed can be obtained after the timer countdown ends, thereby achieving a countdown-driven multi-image carousel. The method for displaying images in a widget provided in this disclosure is based on the same concept as the method for displaying images in a widget provided in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and the same technical features have the same beneficial effects in this embodiment and the above embodiments.
[0124] Figure 7 This is a flowchart illustrating a method for displaying an image in a widget, as provided in an embodiment of this disclosure. This embodiment is applicable to situations where a server sends display information to cause an application's widget to display an image. The method can be executed by a device for displaying images in a widget, which can be implemented in 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 images in a widget provided in this embodiment may include:
[0126] S710 receives display information requests sent by application software.
[0127] In this embodiment of the disclosure, the information display request may include a widget of the application software, and the request may be sent through the application software. The widget may, in response to a preset trigger, launch the application software in the background without the user's awareness, and send an information display request to the server through the application software to request the display of information. The requested information can be set according to specific business scenarios. For example, when the widget displays images related to multimedia content published by a communication user, it may request images related to multimedia content published by the communication user within a preset time range (e.g., within 3 days), and / or, it may request images related to unread multimedia content published by the communication user.
[0128] S720. Obtain the image to be displayed according to the display information request, and stitch the images to be displayed together to obtain the stitched image.
[0129] In this embodiment of the disclosure, the server can obtain several related images corresponding to the information display request as images to be displayed, and stitch these images together to form a composite image. For example, the images to be displayed can be stitched together in a horizontal, vertical, or grid-like manner to obtain a composite image.
[0130] S730. Determine the index position sequence based on the index position information of the image to be displayed in the stitched image.
[0131] In this embodiment of the disclosure, the regional position of the image to be displayed in the stitched image can be characterized using 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 in the stitched image.
[0132] For example, a random display strategy can be used to randomly generate an index position sequence based on the index position information of the images to be displayed. Each index position information can appear at least once in the index position sequence, meaning the sequence can contain identical index position information. Alternatively, a reverse order display strategy can be used to sequentially assemble the corresponding index position information into an index position sequence based on the reverse order of the images' publication time. This sequence can also contain multiple rounds of sequentially arranged index position information to achieve multi-round display of the images.
[0133] S740. Determine the display time series based on the image to be displayed 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 based on the preset dimension factors of the image to be displayed corresponding to the traversed index position information. Then, the server can determine the display time sequence based on the sequentially determined display time information.
[0135] In some optional implementations, determining the display time sequence based on the image to be displayed corresponding to the index position information in the index position sequence may include: determining the initial display duration of the image to be displayed based on the amount of content information of the image to be displayed; traversing the index position sequence and determining the display time information corresponding to the traversed index position information based on the initial display duration of the image to be displayed corresponding to the traversed index position information and the number of times the traversed index position information appears in the historical traversal; and determining the display time sequence based on the sequentially determined display time information.
[0136] The process of determining the initial display duration may include: the server can identify the amount of content information in the image to be displayed through a pre-built image processing model, and determine the initial display duration based on the amount of content information. The amount of content information is positively correlated with the initial display duration; that is, the more content information in the image to be displayed, the longer its initial display duration.
[0137] The display time information can be used to characterize the display duration of the image to be displayed. The process of determining the display time information can include: attenuating the initial display duration of the image corresponding to the traversed index position information based on the number of times the index position information appears in the historical traversal; and determining the display time information of the image corresponding to the traversed index position information based on the attenuated initial display duration. The number of occurrences and the attenuation can be positively correlated; that is, the more times the traversed index position information appears in the historical traversal, the greater the degree of attenuation of the corresponding initial display duration. Furthermore, when the number of occurrences is 0, the display time information can be determined based on the initial display duration.
[0138] Understandably, as the index position information appears more frequently during traversal, the widget displays the corresponding image more often, allowing users to obtain more comprehensive information about the displayed image. The same image can have its display time in the view window reduced as the number of times it is displayed increases, thus flexibly controlling the image carousel speed and improving the image display effect.
[0139] Among these optional implementation methods, the display time information of the image to be displayed can be set according to the content information and consumption frequency of the image, which is conducive to improving the image display effect and enhancing the user's viewing experience of the carousel images.
[0140] S750 generates display information based on the mosaic image, index position sequence, and display time sequence, and sends the display information to the application software so that the application can display the image in the widget's view window based on the display information.
[0141] In this embodiment, the server can generate display information based on the stitched image, index position sequence, and display time sequence, and send the display information to the application software, so that the application software can forward the display information to the widget. Accordingly, after obtaining the display information, the application's widget can sequentially obtain the target image to be displayed from the stitched image 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 the same as the device to which the widgets disclosed above belong. The performance information of the device may include at least one of the following: performance information related to hardware such as the central processing unit, graphics processor, memory, and battery; performance information related to the operating environment such as remaining memory, device temperature, device battery level, lag issues, and power consumption; and performance information related to the network environment such as network speed and / or network throughput.
[0144] Here, business traffic can be understood as the amount of data transmitted in a business transaction. The process of determining business traffic trends can include: the server using a pre-built data prediction model to predict business traffic within a preset time range based on historical business traffic.
[0145] The information request can include performance information about the device to which the application software belongs. Correspondingly, the server can parse the information request to obtain the performance information; it can also determine the next time to receive an information request based on the performance information and the corresponding business traffic trend information. Specifically, the server can determine the request time based on the performance information and business traffic trend information using a pre-built data processing model. The better the device performance indicated by the performance information, the more frequently information requests can be made; similarly, if the business traffic trend is during peak business traffic periods, information requests can be made more frequently.
[0146] Among these optional implementation methods, determining the request time by the server based on performance information and business traffic trend information is beneficial for widgets to reach the latest display information in a timely manner within the range supported by device performance, which can improve user experience.
[0147] In the technical solution of this disclosure embodiment, a display information request sent by application software can be received. The display information request includes a widget of the application software, which sends the request through the application software. An image to be displayed is obtained according to the display information request, and the image to be displayed is stitched together to obtain a stitched image. An index position sequence is determined based on the index position information of the image to be displayed in the stitched image. A display time sequence is determined based on the image to be displayed corresponding to the index position information in the index position sequence. Display information is generated based on the stitched 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 stitched image, the index position sequence, and the display time sequence by the server, not only can the widget achieve smooth and efficient image carousel display, but it can also flexibly control the carousel display order, number of carousels, and carousel speed of the images to be displayed in the stitched image, thereby improving the image display effect.
[0148] Furthermore, the method for displaying images in a widget provided in this embodiment belongs to the same disclosed concept as the method for displaying images in a widget provided in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and the same technical features have the same beneficial effects in this embodiment and the above embodiments.
[0149] Figure 8 This is a schematic diagram of a device for displaying images in a widget, provided in an embodiment of this disclosure. The device for displaying images in a widget provided in this embodiment is suitable for situations where images are displayed through a view window of the widget.
[0150] like Figure 8 As shown in the embodiments of this disclosure, the apparatus for displaying images in a widget may include:
[0151] The request module 810 is used to request display information from the server; 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.
[0152] The image acquisition module 820 is used to sequentially acquire the target images to be displayed from the stitched image according to the index position sequence; wherein, the display time sequence contains the display time information of the target images to be displayed.
[0153] Display module 830 is used to display the corresponding target image to be displayed in the widget's view window based on the display time information.
[0154] In some alternative implementations, where the display time information includes the display moment, the display module can be used for:
[0155] Obtain a preset clock built based on the clock component of the operating system, and configure and start the preset clock according to the first moment from the request to the display of information;
[0156] The display time is sequentially obtained from the display time series. When the preset clock reaches the display time, the target image to be displayed is obtained from the stitched image by the image acquisition module according to the index position information corresponding to the display time in the index position sequence.
[0157] Display the target image in the view window.
[0158] In some alternative implementations, the display module can also be used for:
[0159] In response to the view window becoming invisible, pause the preset clock; or,
[0160] In response to the view window switching to an invisible state, when the preset clock reaches the display time, the acquisition of the target image to be displayed through the image acquisition module is stopped.
[0161] In some alternative implementations, where the display time information includes the display duration, the display module can be used for:
[0162] Retrieve a preset timer built based on the clock component of the operating system;
[0163] In response to obtaining the target image to be displayed based on the index position sequence, a preset timer is configured and started according to the corresponding display duration;
[0164] In response to a preset timer, the target image is displayed in the view window;
[0165] In response to the end of the preset timer, the image acquisition module retrieves the next target image to be displayed based on the index position sequence.
[0166] In some alternative implementations, the display module can also be used for:
[0167] In response to the view window becoming invisible, pause the preset timer; or,
[0168] In response to the view window switching to an invisible state and the preset timer ending, the acquisition of the next target image to be displayed through the image acquisition module is stopped.
[0169] In some alternative implementations, the image acquisition module can be used for:
[0170] The index position information is obtained sequentially from the index position sequence, and the cutting range of the mosaic image is determined based on the index position information;
[0171] The stitched image is cut according to the cutting range to obtain the target image to be displayed.
[0172] In some optional implementations, the displayed information also includes the time of the request;
[0173] The request module can be used to request new display information from the server when the request is fulfilled and the network conditions meet preset requirements.
[0174] The display module can be used to continue displaying images in the view window based on display information when the request is fulfilled but the network conditions do not meet the preset conditions.
[0175] In some alternative implementations, the means for displaying an image in a widget may further include:
[0176] An interactive module, used to perform at least one of the following:
[0177] In response to receiving an access command in the view window, the corresponding function interface of the image to be displayed is accessed; wherein, when the access command is received, the target image to be displayed in the view window is located at the top of the function interface.
[0178] In response to a switching command received from the view interface, the target image to be displayed in the view window is switched.
[0179] The apparatus for displaying images in a widget provided in the embodiments of this disclosure can execute the method for displaying images in a widget applied to an application provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the 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 division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0181] Figure 9 This is a schematic diagram of a device for displaying images in a widget, provided in an embodiment of this disclosure. The device for displaying images in a widget provided in this embodiment is suitable for situations where a server sends display information to enable an application's widget to display an image.
[0182] like Figure 9 As shown in the embodiments of this disclosure, the apparatus for displaying images in a widget may include:
[0183] The receiving module 910 is used to receive display information requests sent by the application software;
[0184] The stitching image determination module 920 is used to obtain the image to be displayed according to the display information request, and stitch the image to be displayed to obtain the stitched image;
[0185] The first sequence determination module 930 is used to determine the index position sequence based on the index position information of the image to be displayed in the stitched image;
[0186] The second sequence determination module 940 is used to determine the display time series based on the image to be displayed corresponding to the index position information in the index position sequence;
[0187] The sending module 950 is used to generate display information based on the splicing diagram, index position sequence and display time sequence, and send the display information to the application software so that the application can display the image in the view window of the widget according to the display information.
[0188] In some alternative implementations, the information request may carry performance information about the device to which the application software belongs; the device for displaying an image in the widget may also include:
[0189] The request timing determination module is used to determine the request timing based on the business traffic trend information corresponding to the performance information and the display information request.
[0190] The displayed 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 alternative implementations, the second sequence determination module can be used for:
[0192] Determine the initial display duration of the image based on the amount of information contained in the image to be displayed;
[0193] Traverse the index position sequence, and determine the 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 times the traversed index position information appears in the historical traversal.
[0194] The display time sequence is determined based on the sequentially determined display time information.
[0195] The apparatus for displaying images in a widget provided in this disclosure can execute the method for displaying images in a widget applied to a server provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the 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 division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0197] The following is for reference. Figure 10 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 10 The diagram below shows the structure of the terminal device or server 1000. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0198] like Figure 10 As shown, the electronic device 1000 may include a processing unit (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 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0199] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 10 An electronic device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0200] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via 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, it performs the functions defined in the method of displaying images in a widget according to embodiments of this disclosure.
[0201] The electronic device provided in this embodiment and the method for displaying images in the microdevices provided in the above embodiments belong to the same disclosed concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0202] This disclosure provides a storage medium for computer-executable instructions, which, when executed by a computer processor, can be used to perform the method for displaying images in a widget provided in the above embodiments.
[0203] It should be noted that the storage medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory (FLASH), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores executable instructions that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable executable instructions. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit executable instructions for use by or in connection with an instruction execution system, apparatus, or device. Executable instructions contained on the storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0204] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0205] The aforementioned storage medium may be included in the aforementioned electronic device; or it may exist independently and not be assembled into the electronic device.
[0206] The aforementioned storage medium carries one or more executable instructions, which, when executed by the electronic device, cause the electronic device to:
[0207] Request display information from the server; 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, the target images to be displayed are sequentially obtained from the mosaic image; the display time sequence contains the display time information of the target images to be displayed in sequence; according to the display time information, the corresponding target images to be displayed are displayed in the widget's view window.
[0208] Alternatively, the aforementioned computer-readable medium carries one or more executable instructions that, when executed by the electronic device, cause the electronic device to:
[0209] The application receives a display information request from the application software; it acquires the image to be displayed according to the display information request, and stitches the image to be displayed together to obtain a stitched image; it determines the index position sequence according to the index position information of the image to be displayed in the stitched image; it determines the display time sequence according to the image to be displayed corresponding to the index position information in the index position sequence; it generates display information based on the stitched image, the index position sequence, and the display time sequence, and sends the display information to the application software so that the application can display the image in the widget's view window according to the display information.
[0210] Executable instructions for performing the operations of this disclosure can 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, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The executable instructions can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via 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., via the Internet using an Internet service provider).
[0211] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement a method for displaying images in a widget as provided in any embodiment of this disclosure.
[0212] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via 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., via the Internet using an Internet service provider).
[0213] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0214] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units and modules do not, in certain circumstances, constitute a limitation on the unit or module itself.
[0215] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, 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), and so on.
[0216] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0217] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, the method comprising:
[0218] The system requests information to be displayed from the server; the displayed information includes: a mosaic image, an index position sequence, and a display time sequence; the mosaic image is composed of images to be displayed.
[0219] Based on the index position sequence, the target images to be displayed are sequentially obtained from the stitched image; wherein, the display time sequence contains the display time information of the target images to be displayed in sequence;
[0220] Based on the display time information, the corresponding target image to be displayed is shown in the widget's view window.
[0221] According to one or more embodiments of this 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 the display time, the display process of the target image to be displayed includes:
[0223] Obtain a preset clock constructed based on the clock component of the operating system, configure and start the preset clock according to the first moment of the request to the displayed information;
[0224] The display time is sequentially obtained from the display time sequence. When the preset clock reaches the display time, the target image to be displayed is obtained from the stitched image according to the index position information corresponding to the display time in the index position sequence, and the target image to be displayed is displayed in the view window.
[0225] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, further comprising:
[0226] In some alternative implementations, the preset clock is paused in response to the view window becoming invisible; or,
[0227] In response to the view window switching to an invisible state, when the preset clock reaches the display time, the acquisition of the target image to be displayed is stopped.
[0228] According to one or more embodiments of this 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 display duration, the display process of the target image to be displayed includes:
[0230] Retrieve a preset timer built based on the clock component of the operating system;
[0231] In response to obtaining the target image to be displayed based on the index position sequence, the preset timer is configured and started according to the corresponding display duration;
[0232] In response to the start of the preset timer, the target display image is displayed in the view window;
[0233] In response to the end of the preset timer, the next target image to be displayed is obtained according to the index position sequence.
[0234] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, further comprising:
[0235] In some alternative implementations, the preset timer is paused in response to the view window becoming invisible; or,
[0236] In response to the view window switching to an invisible state and the preset timer ending, the acquisition of the next target image to be displayed is stopped.
[0237] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, further comprising:
[0238] In some optional implementations, the step of sequentially obtaining the target image to be displayed from the stitched image according to the index position sequence includes:
[0239] The index position information is obtained sequentially from the index position sequence, and the cutting range of the stitched image is determined based on the index position information;
[0240] The stitched image is cut according to the cutting range to obtain the target image to be displayed.
[0241] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, further comprising:
[0242] In some optional implementations, the displayed information also includes the request time; the method further includes:
[0243] When the request is fulfilled and the network conditions meet preset requirements, a request is sent to the server for new display information.
[0244] If the request is fulfilled but the network conditions do not meet the preset conditions, the image will continue to be displayed in the view window based on the displayed information.
[0245] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, further comprising:
[0246] Some optional implementations also include at least one of the following:
[0247] In response to receiving an access command in the view window, the function interface corresponding to the image to be displayed is accessed; wherein, when the access command is received, the target image to be displayed in the view window is located at the top of the function interface.
[0248] In response to the view interface receiving a switching command, the target image to be displayed in the view window is switched.
[0249] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, the method comprising:
[0250] Receive display information requests sent by application software;
[0251] The image to be displayed is obtained according to the display information request, and the image to be displayed is stitched together to obtain a stitched image;
[0252] Determine the index position sequence based on the index position information of the image to be displayed in the stitched image;
[0253] The display time sequence is determined based on the image to be displayed corresponding to the index position information in the index position sequence;
[0254] Display information is generated based on the stitched image, the index position sequence, and the display time sequence, and the display information is sent to the application software so that the application software can display the image in the widget's view window based on the display information.
[0255] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, further comprising:
[0256] In some optional implementations, the information display request carries performance information of the device to which the application software belongs; the method further includes:
[0257] The request time is determined based on the performance information and the business traffic trend information corresponding to the display information request;
[0258] The displayed information is also generated based on the request time; the request time is used to trigger the sending of a new request for the displayed information.
[0259] According to one or more embodiments of this disclosure, a method for displaying an image in a widget is provided, further comprising:
[0260] In some optional implementations, determining the display time series based on the image to be displayed corresponding to the index position information in the index position sequence includes:
[0261] The initial display duration of the image to be displayed is determined based on the amount of content information in the image to be displayed.
[0262] Traverse the index position sequence, and determine the 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 times the traversed index position information appears in the historical traversal.
[0263] The display time sequence is determined based on the sequentially determined display time information.
[0264] According to one or more embodiments of the present disclosure, an apparatus for displaying an image in a widget is provided, the apparatus comprising:
[0265] The request module is used to request 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.
[0266] The image acquisition module is used to sequentially acquire target images to be displayed from the stitched image according to the index position sequence; wherein, the display time sequence contains the display time information of the target images to be displayed in sequence;
[0267] The 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, an apparatus for displaying an image in a widget is provided, the apparatus comprising:
[0269] The receiving module is used to receive display information requests sent by the application software;
[0270] The stitching image determination module is used to request and obtain the image to be displayed according to the display information, and stitch the image to be displayed to obtain the stitched image;
[0271] The first sequence determination module is used to determine the index position sequence based on the index position information of the image to be displayed in the stitched image;
[0272] The second sequence determination module is used to determine the display time sequence based on the image to be displayed corresponding to the index position information in the index position sequence.
[0273] The sending module is used to generate display information based on 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 software can display the image in the view window of the widget based on the display information.
[0274] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0275] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0276] Although the subject matter has been described using language specific to structural features and / or methodological logic, 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. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for displaying an image in a widget, characterized in that, include: Request information to be displayed from the server; wherein, the information to be displayed includes: a mosaic image, an index position sequence, and a display time sequence; the mosaic image is composed of images to be displayed, and the mosaic image is composed of one or more of the following: horizontal mosaic, vertical mosaic, and grid mosaic; Based on the index position sequence, the target images to be displayed are sequentially obtained from the stitched image; wherein, the display time sequence contains the display time information of the target images to be displayed in sequence; Based on the display time information, the corresponding target image to be displayed is shown in the view window of the widget; The step of sequentially obtaining the target image to be displayed from the stitched image according to the index position sequence includes: The index position information is obtained sequentially from the index position sequence, and the cutting range of the stitched image is determined based on the index position information; The stitched image is cut according to the cutting range to obtain the target image to be displayed.
2. The method according to claim 1, characterized in that, When the display time information includes the display time, the display process of the target image to be displayed includes: Obtain a preset clock constructed based on the clock component of the operating system, configure and start the preset clock according to the first moment of the request to the displayed information; The display time is sequentially obtained from the display time sequence. When the preset clock reaches the display time, the target image to be displayed is obtained from the stitched image according to the index position information corresponding to the display time 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 switching to an invisible state, the preset clock is paused; or, In response to the view window switching to an invisible state, when the preset clock reaches the display time, the acquisition of the target image to be displayed is stopped.
4. The method according to claim 1, characterized in that, When the display time information includes the display duration, the display process of the target image to be displayed includes: Retrieve a preset timer built based on the clock component of the operating system; In response to obtaining the target image to be displayed based on the index position sequence, the preset timer is configured and started according to the corresponding display duration; In response to the start of the preset timer, the target image to be displayed is shown in the view window; In response to the end of the preset timer, the next target image to be displayed is obtained according to the index position sequence.
5. The method according to claim 4, characterized in that, Also includes: In response to the view window switching to an invisible state, the preset timer is paused; or, In response to the view window switching to an invisible state and the preset timer ending, the acquisition of the next target image to be displayed is stopped.
6. The method according to claim 1, characterized in that, The displayed information also includes the request time; the method further includes: When the request is fulfilled and the network conditions meet preset requirements, a request is sent to the server for new display information. If the request is fulfilled but the network conditions do not meet the preset conditions, the image will continue to be displayed in the view window based on the displayed information.
7. The method according to claim 1, characterized in that, It also includes at least one of the following: In response to receiving an access command in the view window, the function interface corresponding to the image to be displayed is accessed; wherein, when the access command is received, the target image to be displayed in the view window is located at the top of the function interface. In response to the view window receiving a switching command, the target image to be displayed in the view window is switched.
8. A method for displaying an image in a widget, characterized in that, include: Receive display information requests sent by application software; The image to be displayed is obtained according to the display information request, and the image to be displayed is stitched together to obtain a stitched image. The stitching method of the stitched image includes one or more of the following: horizontal stitching, vertical stitching, and grid stitching. Determine the index position sequence based on the index position information of the image to be displayed in the stitched image; The display time sequence is determined based on the image to be displayed corresponding to the index position information in the index position sequence; Display information is generated based on the stitched image, the index position sequence, and the display time sequence, and the display information is sent to the application software so that the application software can display the image in the view window of the widget based on the display information; The step of determining the display time series based on the image to be displayed corresponding to the index position information in the index position sequence includes: The initial display duration of the image to be displayed is determined based on the amount of content information in the image to be displayed. Traverse the index position sequence, and determine the 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 times the traversed index position information appears in the historical traversal. The display time sequence is determined based on the sequentially determined display time information.
9. The method according to claim 8, characterized in that, The information display request carries performance information of the device to which the application software belongs; the method further includes: The request time is determined based on the performance information and the business traffic trend information corresponding to the display information request; The displayed information is also generated based on the request time; the request time is used to trigger the sending of a new request for the displayed information.
10. A device for displaying images in a micro-device, characterized in that, include: The request module is used to request 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, and the mosaic image is composed of one or more of the following: horizontal mosaic, vertical mosaic, and grid mosaic; The image acquisition module is used to sequentially acquire target images to be displayed from the stitched image according to the index position sequence; wherein, the display time sequence contains the display time information of the target images to be displayed in sequence; The 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; The image acquisition module is specifically used for: sequentially acquiring index position information from the index position sequence, and determining the cutting range of the stitched image based on the index position information; cutting the stitched image according to the cutting range to obtain the target image to be displayed.
11. A device for displaying images in a micro-device, characterized in that, include: The receiving module is used to receive display information requests sent by the application software; The image stitching determination module is used to obtain the image to be displayed according to the display information request, and stitch the image to be displayed to obtain the image stitching. The stitching method of the image stitching includes one or more of the following: horizontal stitching, vertical stitching and grid stitching. The first sequence determination module is used to determine the index position sequence based on the index position information of the image to be displayed in the stitched image; The second sequence determination module is used to determine the display time sequence based on the image to be displayed corresponding to the index position information in the index position sequence. The sending module is used to generate display information based on 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 software can display the image in the view window of the widget based on the display information; The second sequence determination module is specifically used for: determining the initial display duration of the image to be displayed based on the amount of content information of the image to be displayed; traversing the index position sequence, determining the display time information corresponding to the traversed index position information based on the initial display duration of the image to be displayed corresponding to the traversed index position information and the number of times the traversed index position information appears in the historical traversal; and determining the display time sequence based on the sequentially determined display time information.
12. An electronic device, characterized in that, The electronic device includes: One or more processors; 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 of displaying an image in a widget as described in any one of claims 1-7 or 8-9.
13. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform a method of displaying an image in a widget as described in any one of claims 1-7 or 8-9.
14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of displaying an image in a widget as described in any one of claims 1-7 or 8-9.
Citation Information
Patent Citations
Method and device for displaying works covers by using widget and mobile terminal
CN108038244A
Carousel method, electronic equipment and storage medium
CN113867601A
Method and device for generating carousel component
CN115098104A