Network picture display method and system of real-time activity component

By creating a shared directory in the real-time activity component, the problem of the real-time activity component being unable to display network images was solved, enabling the rendering and display of real-time network images, and improving the display effect of real-time status information and user experience.

CN121597928APending Publication Date: 2026-03-03GUANGZHOU NETSTAR INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511550835.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-28
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

The real-time activity component cannot directly load network images, which prevents the display of real-time updated network images and affects the display effect of real-time status information.

Method used

A shared directory is created through the system's sharing mechanism. Network images are downloaded to the shared directory, and file paths are generated, enabling real-time activity components to access and render the network images.

Benefits of technology

It enables real-time display of network images by the real-time activity component, expands the display content of real-time status information, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597928A_ABST
    Figure CN121597928A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a network picture display method and system of a real-time activity component. According to the technical scheme provided by the embodiment of the invention, the downloading address of the current to-be-displayed network picture is acquired, and the network picture is acquired based on the downloading address; the network picture is written into a shared directory created based on a system sharing mechanism, a file path of the network picture in the shared directory is generated, and the system sharing mechanism is used for data sharing of the application and the real-time activity component; and sending the file path to the real-time activity component, accessing the file path based on the real-time activity component to extract the network picture, and rendering and displaying the network picture. By adopting the technical means, the network picture display limitation of the real-time activity component can be eliminated, the network picture can be updated and displayed through the real-time activity component, the display effect of the real-time state information is improved, the display requirements of the real-time state information in different scenes are met, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method and system for displaying network images using real-time active components. Background Technology

[0002] Currently, mobile devices often use Live Activity components to display real-time status information, allowing applications to show such information, like live stream status or order progress, on the lock screen and in designated areas. Because Live Activity components are strictly managed by the terminal system, their operating environment is limited, preventing them from actively initiating network requests and thus hindering direct image loading. Therefore, the main application needs to pre-package the images to be displayed when downloading the Live Activity component. Subsequently, when displaying real-time status information, the pre-packaged images are retrieved from the Live Activity component for display.

[0003] However, when displaying images, the real-time activity component can only display pre-packaged images and cannot show real-time updated network images. For example, when displaying the live streaming status of a live streaming application on the lock screen, it can usually only display the pre-downloaded application icon and cannot display the image information of the corresponding live streaming room. This limits the display of network images and affects the display effect of real-time status information. Summary of the Invention

[0004] This application provides a method and system for displaying network images in a real-time activity component. By creating a shared directory through a system sharing mechanism, network images are downloaded to the shared directory, enabling the real-time activity component to retrieve and render these images. This achieves real-time display of network images by the real-time activity component, solving the technical problem of limited network image display in real-time activity components. Compared with existing real-time status information display schemes, this application eliminates the limitations on network image display in real-time activity components, ensuring that network images can be updated and displayed through the real-time activity component, thereby improving the display effect of real-time status information and enhancing the user experience.

[0005] In a first aspect, embodiments of this application provide a method for displaying network images using a real-time active component, comprising: Get the download address of the currently displayed online image, and retrieve the online image based on the download address; Write network images to a shared directory created based on the system sharing mechanism, and generate the file path of the network images in the shared directory. The system sharing mechanism is used for data sharing between applications and real-time activity components. The file path is sent to the live activity component, and the live activity component accesses the file path to extract the network image and render and display the network image.

[0006] In a second aspect, embodiments of this application provide a network image display system with real-time active components, comprising: The acquisition module is configured to obtain the download address of the network image to be displayed, and then retrieve the network image based on the download address. The write module is configured to write network images to a shared directory created based on the system sharing mechanism, and generate the file path of the network images in the shared directory. The system sharing mechanism is used for data sharing between applications and real-time activity components. The display module is configured to send the file path to the real-time activity component, and extract the network image based on the file path accessed by the real-time activity component, as well as render and display the network image.

[0007] In a third aspect, embodiments of this application provide a network image display device with real-time active components, including: Memory and one or more processors; The memory is configured to store 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 network image display method for real-time active components as described in the first aspect.

[0008] In a fourth aspect, embodiments of this application provide a non-volatile computer-readable storage medium storing computer-executable instructions that, when executed by a computer processor, are configured to perform the network image display method of the real-time active component as described in the first aspect.

[0009] In a fifth aspect, embodiments of this application provide a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the network image display method for real-time active components as described in the first aspect.

[0010] This application embodiment obtains the download address of the network image to be displayed, retrieves the network image based on the download address, writes the network image to a shared directory created based on the system sharing mechanism, and generates the file path of the network image in the shared directory. The system sharing mechanism is used for data sharing between the application and the real-time activity component. The file path is sent to the real-time activity component, and the network image is retrieved and rendered based on the file path accessed by the real-time activity component. By using the above technical means, a shared directory is created through the system sharing mechanism, and the network image is downloaded to the shared directory, enabling the real-time activity component to retrieve and render the network image based on the shared directory, thus realizing the real-time display of the network image by the real-time activity component. This eliminates the network image display limitations of the real-time activity component, ensures that the network image can be updated and displayed through the real-time activity component, expands the display content of real-time status information, improves the display effect of real-time status information, meets the real-time status information display needs in different scenarios, and improves the user experience. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating a method for displaying network images using a real-time active component, as provided in an embodiment of this application. Figure 2 This is a flowchart illustrating the process of acquiring network images in an embodiment of this application; Figure 3 This is a flowchart of the preprocessing process for network images in this application embodiment; Figure 4 This is a schematic diagram showing a network image in an embodiment of this application; Figure 5 This is a flowchart illustrating the image file cleaning process in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a network image display system with real-time active components provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a network image display device with a real-time activity component provided in an embodiment of this application. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0013] The network image display method for real-time active components provided in this application aims to enable real-time display of network images by real-time active components, eliminating the limitations of network image display for real-time active components.

[0014] When displaying real-time status information using the real-time activity component, its operating environment is restricted due to the strict management of the terminal system, preventing it from actively initiating network requests and thus hindering the direct loading of images. Therefore, the main application needs to pre-package the images to be displayed when downloading the real-time activity component. Subsequently, when displaying real-time status information, the pre-packaged images are retrieved from the real-time activity component for display. This display scheme limits the real-time activity component to displaying only pre-packaged images, preventing the display of real-time updated network images. For example, when displaying the live streaming status of a live streaming application on the lock screen, typically only the pre-downloaded application icon is displayed, not the image information of the corresponding live stream room. This restricts the display of network images, affecting the display effect of real-time status information.

[0015] Based on this, an embodiment of this application provides a method for displaying network images in a real-time active component to solve the technical problem of limited network image display in real-time active components.

[0016] Example: Figure 1A flowchart of a network image display method for a real-time active component provided in this application embodiment is given. The network image display method for a real-time active component provided in this embodiment can be executed by a network image display device for the real-time active component. This network image display device for the real-time active component can be implemented by software and / or hardware. The network image display device for the real-time active component can consist of two or more physical entities, or it can consist of a single physical entity. Generally, the network image display device for the real-time active component can be a terminal device such as a computer, mobile phone, or tablet.

[0017] The following description uses a network image display device as the main example to illustrate a method for displaying network images, where the device itself is the real-time active component. (Refer to...) Figure 1 The method for displaying network images in this real-time activity component specifically includes: S110. Obtain the download address of the network image to be displayed, and retrieve the network image based on the download address.

[0018] This application, when displaying network images via a real-time activity component, obtains the download address of the network image to be displayed and retrieves the image based on that address. It determines the network image to be displayed during real-time status information display based on the currently running application (defined as the main application), obtains the download address of that network image, and downloads it based on that address. Subsequently, when displaying real-time status information via the real-time activity component, the network image can be rendered and displayed. For example, when the user's phone is locked, the live streaming application displays the network image on the lock screen via the real-time activity component; when the user minimizes the current live streaming application, the live streaming application displays the network image at the top of the phone's desktop via the real-time activity component, thus achieving real-time status information display for the live streaming application.

[0019] Optionally, depending on actual needs, the main application can also monitor system status and only trigger the download of network images when the device is locked or the current main application is minimized. This avoids loading redundant network images without actually triggering the display of real-time status information of real-time active components, thus preventing image cache occupancy.

[0020] Specifically, the main application dynamically parses the download addresses of network images that need to be loaded by monitoring changes in the application's real-time state information or receiving update notifications pushed by the server. For example, when the live streaming application detects that a user has entered a live stream, it downloads the avatar of that live stream as a network image. This effectively utilizes the main application's full network permissions, pre-preparing network images that the real-time activity components themselves cannot obtain, providing a data foundation for subsequent sharing and rendering.

[0021] Optionally, refer to Figure 2Images obtained from the internet based on download URLs include: S1101, Query application image cache based on download address; S1102. If a cached image matching the download address exists in the application image cache, extract the cached image as the network image. S1103. If no cached image matching the download address exists in the application's image cache, send an image request to the download address and download the network image based on the image request.

[0022] Before initiating a network request based on a network image download address, this application prioritizes checking the local cache to optimize the entire image loading process. Specifically, the main application maintains a dedicated image cache, using the hashed URL of the network image as the key and storing the corresponding image data as the value. When a network image needs to be retrieved based on its download address, the application first searches the cache index for that address. If a matching index (i.e., the hashed URL key) is found, it means the image has been downloaded by the application at some point in the past, and the cache has not yet been cleared. In this case, the image file can be directly read from the local image cache. The entire process is completed locally, enabling rapid delivery of network image data and improving network image display efficiency.

[0023] For example, in the real-time status information display scenario of a live streaming application, the images displayed in real-time activities are generally small in size, while some images, such as the anchor's avatar or the live stream cover, may have been downloaded in larger sizes in earlier scenarios. When retrieving these network images, the previously downloaded image data can be found directly, and the image processing flow can be executed directly, reducing network download and processing steps, thereby saving bandwidth and improving the speed of image display.

[0024] On the other hand, if no image matching the download address is found in the image cache, the system switches to network download. In this case, the main application constructs a standard HTTP / HTTPS request pointing to the download address, and then downloads the required network image from that address. Optionally, after the network image is successfully downloaded, it will not only be used for displaying the current real-time status information, but will also be stored in the application's image cache, indexed by its download address. Subsequently, when the same real-time activity or other functions within the application require the same image, it can be directly retrieved from the cache, avoiding repeated network transmissions.

[0025] By combining cache traversal with network download, the efficiency and reliability of image acquisition can be improved, unnecessary network traffic consumption can be reduced, and real-time status information can be updated more quickly and stably.

[0026] Optionally, after sending the image request to the download address, the method further includes: If downloading a network image based on an image request fails, a default image is retrieved as the network image.

[0027] Considering that network requests for images may fail for various reasons, such as unstable mobile network signals, temporary server unresponsiveness, removal of image resources, or incorrect download addresses, this application provides a fault-tolerance mechanism to prevent interruptions in the entire network image display process. This further avoids situations such as missing images, blank spaces, or abnormal component rendering on the lock screen or designated display areas. When a network download failure is detected (e.g., by capturing network request exceptions, receiving HTTP error status codes, or request timeouts), a pre-packaged default image is retrieved from the application's local resources to replace the network image that should have been downloaded.

[0028] The default image can be a static resource embedded in the application installation package during the main application development phase, such as a generic application icon, a placeholder image representing a specific state (such as a gray user avatar outline), or a logo. Because it is packaged with the application, it does not depend on any external network conditions. When a download failure occurs, the main application calls the local resource loading method to load this default image into memory, using it as the network image. By seamlessly switching to the local default image in case of network anomalies, it effectively prevents blank interfaces or display errors caused by image loading failures, thereby enhancing the robustness of network image display and the consistency of the user experience, ensuring that real-time status information is presented to the user in a complete and controllable form under any circumstances.

[0029] S120. Write the network image to the shared directory created based on the system sharing mechanism, and generate the file path of the network image in the shared directory. The system sharing mechanism is used for data sharing between applications and real-time activity components.

[0030] Furthermore, the main application leverages the cross-process data sharing capabilities provided by the operating system to write the acquired network images into a shared directory created based on the system sharing mechanism, generating corresponding file paths. Within the operating system, data exchange between the main application and real-time active components can be achieved by creating an App Group (a sandbox sharing mechanism that allows main applications and their extensions (submodules) within the same development team to share data (such as images and status files)) container directory. The system sharing mechanism ensures through access control that only application components belonging to the same development team can access this directory, guaranteeing data security while achieving efficient inter-process communication.

[0031] After downloading the image, the main application writes it to the shared directory and generates a unique filename based on its content characteristics (such as using a UUID or timestamp) to avoid file overwriting conflicts. Then, based on the storage location and filename of the network image, a file path is generated for the real-time activity component to extract the image. The real-time activity component is a system component used to display real-time status information at a specified location on the lock screen or desktop. It is created by the main application and acts as a submodule of the main application to render and display network images. The file path can use a standardized URL format, containing the absolute path to the shared directory and the filename, enabling the real-time activity component to accurately locate the resource.

[0032] Before writing network images to a shared directory created based on the system's sharing mechanism, the following steps are also included: Adjust the image size of the online image to the set size, and compress the image storage size of the online image to the set storage size.

[0033] Reference Figure 3 Before acquiring and writing the network image to the shared directory, the main application precisely scales and crops the image based on the fixed UI frame size reserved for image display in a specific area of ​​the lock screen or desktop by the live activity component. For example, if the image display area defined by the live activity component is 100x100 pixels, then regardless of whether the original network image is an ultra-high-resolution live stream cover or a user avatar, it will be resampled to that target size using an image processing algorithm. This ensures that the image is not distorted due to aspect ratio during display and removes redundant pixels that are not useful for the final display, reducing the space occupied by the image in memory and during storage.

[0034] Furthermore, this application also performs secondary optimization on image file size. For example, lossy compression algorithms or other encoding methods are used to reduce the image file size to below a preset threshold while ensuring that the visual quality is not affected. It is understandable that the storage space shared by the real-time activity component and the main application (i.e., the App Group container) is usually a system-allocated resource with limited capacity. If uncompressed high-resolution images are written frequently, the available space in the shared directory will be quickly exhausted, potentially leading to the system cleaning up older images or even causing new image writing failures. By processing these network images, not only is the writing efficiency of individual images guaranteed, but the overall stability and sustainable use of the shared directory are also maintained, avoiding interruptions to the entire process due to insufficient storage space.

[0035] S130. Send the file path to the real-time activity component, and extract the network image based on the file path accessed by the real-time activity component, and render and display the network image.

[0036] Ultimately, the main application sends the network image file path from the shared directory to the live activity component, which then reads the image data based on the file path and renders it. The main application passes the file path as a state update parameter to the live activity component via the system-provided live activity update API (ActivityKit framework). Upon receiving the file path, the live activity component uses the system's file manager to access the shared directory, loads the image file at that path, and decodes it into a renderable bitmap format. Because the image data is stored locally in the shared space, the live activity component can directly obtain the latest content without any network requests, and then uses the graphics rendering engine to draw the image onto the lock screen or a designated area of ​​the desktop. This bypasses the network access restrictions of the live activity component, allowing images that require real-time updates, such as live stream covers and dynamic product images, to be smoothly displayed on the lock screen or a designated area of ​​the desktop.

[0037] For example, during the real-time status information display process of a live streaming application, when the user minimizes the main application and returns to the phone's home screen, the main application calls the real-time activity component to render and display the corresponding network image (such as the live stream avatar) at the top of the screen. (See reference...) Figure 4 The network image A is rendered and displayed at the corresponding position at the top of the desktop, thereby realizing the display of real-time status information of the live streaming application.

[0038] Optionally, the file path is sent to the live activity component, and the network image is extracted based on the live activity component's access to the file path, including: A static attribute structure message is constructed based on the file path and sent to the real-time activity component; The file path is read from the static property structure message based on the real-time activity component, and the network image is loaded from the file path.

[0039] After obtaining the image file path in the shared directory, the main application encapsulates it in a predefined, structured data object. This data object is a static attribute structured message, containing all the data fields and their types that need to be transmitted. Based on this static attribute structured message, the main application notifies the real-time activity component of this encapsulated file path static attribute structured message through the system's update APIs specifically provided for real-time activities (such as the update method in the ActivityKit framework).

[0040] On the real-time activity component side, the static property structure is parsed to extract the key data field: the complete path of the network image in the shared directory. Then, the real-time activity component uses the system file manager to access the shared directory (App Group container) created by the main application and readable by both parties, and loads the image file data from the specified path into its own memory space. After the image data is successfully loaded, the real-time activity component can call its UI rendering engine to draw the network image onto a system-level interface such as the lock screen or a specified area of ​​the desktop, thus completing the dynamic display of real-time status information.

[0041] Optionally, after rendering and displaying the online image, the process also includes: Listen for real-time activity events of the real-time activity component; If the rendering and display of the network image of the current real-time activity is completed based on the real-time activity event, the historical image path of the current real-time activity is queried according to the activity identifier of the current real-time activity, and the historical image file stored in the historical image path is deleted. If the current real-time activity has ended based on the real-time activity event, delete the image file associated with the activity identifier.

[0042] Reference Figure 5 The main application registers a listener to continuously monitor lifecycle events from the live activity component, defined as live activity events. These events include image update events when the live activity component successfully renders and displays a network image, and activity termination events when the entire live activity has completely ended. Specifically, once the live activity event confirms that the network image has been successfully rendered, the live activity is considered to have completed its image update. At this point, the application uses the unique activity ID to query the historical image paths maintained by the main application (e.g., the image file paths used in the last update), and then deletes the old image files pointed to by those paths. This timely cleanup of historical images frees up storage space in the shared directory, preventing data accumulation.

[0043] When a real-time activity is confirmed to have completely ended based on the activity event, all image files associated with that activity are scanned using its unique Activity ID. All image files with the Activity ID as a filename prefix or stored in its dedicated subdirectories are deleted. This ensures that regardless of how many times a real-time activity updates images during its lifecycle, all image resources generated by that activity and temporarily stored in the shared directory will be deleted when the activity ends. This ensures efficient and sustainable use of the system's shared directory storage space, guaranteeing the long-term and stable operation of the entire network image display function.

[0044] Optionally, after rendering and displaying the online image, the process also includes: The system periodically scans the shared directory and filters out expired files based on the last access time of each file and the set expiration time threshold.

[0045] In addition, the main application starts a background scheduled task, for example, at a set period (e.g., every 24 hours). When the task executes, it retrieves a list of files in the entire shared directory and then iterates through each file. For each file, it retrieves key attributes such as the last access time using the file manager. The last access time records when the file was last read. By comparing this time with the current time, the duration the file has not been accessed is calculated. This duration is then compared with a predefined expiration time threshold (e.g., 48 hours). If a file has not been accessed for longer than this threshold, it is determined that the file has expired. At this point, the expired file is deleted, thereby reclaiming the storage space it occupied.

[0046] Optionally, the main application can also set different expiration time thresholds for different images based on image type and business usage scenario. For example, for image files with high real-time requirements, such as user avatars and cover images, the expiration time threshold is shorter, while for image files used in certain fixed scenarios, the expiration time threshold can be set to longer, thereby adaptively performing cleanup on different types of image files.

[0047] For example, based on the network image display method using the aforementioned real-time activity component, in a live streaming application runtime scenario, if a user's device has real-time activity permission enabled and they enter the live stream as a viewer, the live streaming application will download relevant information about the current streamer's live stream, such as the streamer's avatar and the live stream cover image, and write it to a shared directory. When the user exits the live streaming application to the background or locks the screen, the main application calls the real-time activity component to render and display the network image, which can then be displayed in the top area of ​​the desktop or on the lock screen. View the live stream information of the current streamer. When a user switches to another live stream, the new streamer's information is downloaded and written to the shared directory, triggering a refresh of the real-time activity. When the user exits to the background or locks the screen, the real-time activity component displays the information of the most recently entered live stream. Additionally, when a streamer receives a virtual gift, the component retrieves the gift icon and displays it at the top of the screen or on the lock screen, notifying the user that the streamer has received a gift. When the streamer ends the live stream, the real-time activity component updates to show the end of the live stream.

[0048] The above describes a process where the download address of the network image to be displayed is obtained, and the image is retrieved based on that address. The image is then written to a shared directory created using a system sharing mechanism, and its file path within that directory is generated. This system sharing mechanism facilitates data sharing between the application and the real-time activity component. The file path is sent to the real-time activity component, which accesses the file path to retrieve and render the image. By employing this technique, a shared directory is created using the system sharing mechanism, and the network image is downloaded to this directory. This allows the real-time activity component to retrieve and render the network image, enabling real-time display of the image. This eliminates the limitations on network image display in the real-time activity component, ensuring that network images can be updated and displayed through the component, expanding the content of real-time status information, improving its display effect, meeting the needs of different scenarios, and enhancing the user experience.

[0049] Based on the above embodiments, Figure 6 This is a schematic diagram of the structure of a network image display system with a real-time active component, as provided in this application. (Reference) Figure 6 The network image display system for real-time active components provided in this embodiment specifically includes: an acquisition module 21, a writing module 22, and a display module 23.

[0050] Among them, the acquisition module 21 is configured to acquire the download address of the network image to be displayed, and acquire the network image based on the download address; The writing module 22 is configured to write network images to a shared directory created based on the system sharing mechanism, and generate the file path of the network images in the shared directory. The system sharing mechanism is used for data sharing between applications and real-time activity components. Display module 23 is configured to send the file path to the real-time activity component, and to extract network images based on the file path accessed by the real-time activity component, as well as to render and display the network images.

[0051] Specifically, obtaining network images based on download URLs includes: Query application image cache based on download address; and If a cached image matching the download address exists in the application's image cache, the cached image is extracted as the network image; or, if no cached image matching the download address exists in the application's image cache, an image request is sent to the download address, and the network image is downloaded based on the image request.

[0052] After sending the image request to the download address, it also includes: If downloading a network image based on an image request fails, a default image is retrieved as the network image.

[0053] Specifically, before writing network images to a shared directory created based on the system sharing mechanism, the following steps are also included: Adjust the image size of the online image to the set size, and compress the image storage size of the online image to the set storage size.

[0054] Specifically, the file path is sent to the live activity component, which then accesses the file path to extract the network image, including: A static attribute structure message is constructed based on the file path and sent to the real-time activity component; The file path is read from the static property structure message based on the real-time activity component, and the network image is loaded from the file path.

[0055] After rendering and displaying the online image, the process also includes: Listen for real-time activity events of the real-time activity component; If the rendering and display of the network image of the current real-time activity is completed based on the real-time activity event, the historical image path of the current real-time activity is queried according to the activity identifier of the current real-time activity, and the historical image file stored in the historical image path is deleted. If the current real-time activity has ended based on the real-time activity event, delete the image file associated with the activity identifier.

[0056] After rendering and displaying the online image, the process also includes: The system periodically scans the shared directory and filters out expired files based on the last access time of each file and the set expiration time threshold.

[0057] The above describes a process where the download address of the network image to be displayed is obtained, and the image is retrieved based on that address. The image is then written to a shared directory created using a system sharing mechanism, and its file path within that directory is generated. This system sharing mechanism facilitates data sharing between the application and the real-time activity component. The file path is sent to the real-time activity component, which accesses the file path to retrieve and render the image. By employing this technique, a shared directory is created using the system sharing mechanism, and the network image is downloaded to this directory. This allows the real-time activity component to retrieve and render the network image, enabling real-time display of the network image. This eliminates the limitations on network image display in the real-time activity component, ensuring that network images can be updated and displayed through the component, expanding the content of real-time status information, improving the display effect, meeting the real-time status information display needs in different scenarios, and enhancing the user experience.

[0058] The network image display system for real-time active components provided in this application embodiment can be configured to execute the network image display method for real-time active components provided in the above embodiment, and has corresponding functions and beneficial effects.

[0059] Based on the above practical examples, this application also provides a network image display device with a real-time active component, referring to... Figure 7 The real-time activity component network image display device includes: a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The memory 32, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the real-time activity component network image display method described in any embodiment of this application (e.g., the acquisition module, writing module, and display module in the real-time activity component network image display system). The communication module 33 is configured to perform data transmission. The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory, thereby implementing the aforementioned real-time activity component network image display method. The input device 34 can be configured to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device 35 may include a display screen or other display device. The aforementioned real-time activity component network image display device can be configured to execute the real-time activity component network image display method provided in the above embodiments, possessing corresponding functions and beneficial effects.

[0060] Based on the above embodiments, this application also provides a non-volatile computer-readable storage medium storing computer-executable instructions. These computer-executable instructions, when executed by a computer processor, are configured to perform a method for displaying network images of a real-time active component. The storage medium can be any type of memory device or storage device. Of course, the computer-executable instructions in the non-volatile computer-readable storage medium provided in this application are not limited to the method for displaying network images of a real-time active component as described above; they can also perform related operations in the method for displaying network images of a real-time active component provided in any embodiment of this application.

[0061] Based on the above embodiments, this application also provides a computer program product. The technical solution of this application, in essence or in other words, the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer program product is stored in a storage medium and includes several instructions to cause a computer device, mobile terminal, or processor therein to execute all or part of the steps of the network image display method of the real-time active component described in the various embodiments of this application.

Claims

1. A method for displaying network images using a real-time active component, characterized in that, include: Obtain the download address of the network image to be displayed, and obtain the network image based on the download address; The network image is written to a shared directory created based on the system sharing mechanism, and the file path of the network image in the shared directory is generated. The system sharing mechanism is used for data sharing between applications and real-time activity components. The file path is sent to the real-time activity component, and the network image is extracted based on the file path accessed by the real-time activity component, and the network image is rendered and displayed.

2. The method for displaying network images using a real-time active component according to claim 1, characterized in that, The step of sending the file path to the real-time activity component and retrieving the network image based on the file path accessed by the real-time activity component includes: A static attribute structure message is constructed based on the file path, and the static attribute structure message is sent to the real-time activity component; The real-time activity component reads the file path from the static attribute structure message and loads the network image from the file path.

3. The method for displaying network images using a real-time active component according to claim 1, characterized in that, The step of obtaining the network image based on the download address includes: Query the application's image cache based on the download address; and If a cached image matching the download address exists in the application image cache, the cached image is extracted as the network image; or, if no cached image matching the download address exists in the application image cache, an image request is sent to the download address, and the network image is downloaded based on the image request.

4. The method for displaying network images of a real-time active component according to claim 3, characterized in that, After sending the image request to the download address, the process also includes: If downloading the network image based on the image request fails, a default image is obtained as the network image.

5. The method for displaying network images of a real-time active component according to claim 1, characterized in that, Before writing the network image to the shared directory created based on the system sharing mechanism, the method further includes: Adjust the image size of the network image to a set size, and compress the image storage size of the network image to a set storage size.

6. The method for displaying network images of a real-time active component according to any one of claims 1-5, characterized in that, After rendering and displaying the network image, the process also includes: Listen for real-time activity events of the real-time activity component; If it is determined based on the real-time activity event that the current real-time activity has completed the rendering and display of the network image, the historical image path of the current real-time activity is queried according to the activity identifier of the current real-time activity, and the historical image file stored in the historical image path is deleted; If the current real-time activity is determined to have ended based on the real-time activity event, the image file associated with the activity identifier is deleted.

7. The method for displaying network images of a real-time active component according to any one of claims 1-5, characterized in that, After rendering and displaying the network image, the process also includes: The shared directory is periodically scanned, and expired files are filtered out based on the last access time of each file in the shared directory and the set expiration time threshold.

8. A network image display system with real-time active components, characterized in that, include: The acquisition module is configured to acquire the download address of the network image to be displayed, and acquire the network image based on the download address; The writing module is configured to write the network image to a shared directory created based on the system sharing mechanism, and generate the file path of the network image in the shared directory. The system sharing mechanism is used for data sharing between applications and real-time activity components. The display module is configured to send the file path to the real-time activity component, extract the network image based on the file path accessed by the real-time activity component, and render and display the network image.

9. A network image display device with real-time active components, characterized in that, include: Memory and one or more processors; The memory is configured to store 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 network image display method for real-time active components as described in any one of claims 1-7.

10. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions that, when executed by a computer processor, are configured to perform the network image display method of any one of claims 1-7 for a real-time active component.

11. A computer program product, characterized in that, The computer program product includes instructions that, when executed on a computer or processor, cause the computer or processor to perform the network image display method for real-time active components as described in any one of claims 1-7.