A playing task display method and device, equipment and storage medium
By calculating the screen scaling ratio and using the parent container rendering component, the problem of existing screen design patterns being unable to meet users' complex and personalized needs and low rendering efficiency is solved, achieving efficient screen rendering and a user-friendly experience.
Patent Information
- Application Number
- CN202311829218.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-12-28
AI Technical Summary
The existing screen design pattern is unable to meet the complex and personalized needs of users, the page rendering efficiency is low, and the multi-task switching operation is cumbersome, resulting in a poor user experience.
By obtaining the playback task ID information, calculating the screen scaling ratio, generating the screen layout, and adding the components to the preset parent container for rendering, the parent container is used to realize the rendering of components and the playback of materials, and partial updates are supported.
It improves rendering efficiency, meets users' personalized needs, reduces developer intervention, and enhances user experience.
Smart Images

Figure CN117806579B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image rendering technology, and in particular to a method, apparatus, device, and storage medium for displaying playback tasks. Background Technology
[0002] Currently, the display of marketing screens in stores suffers from the following problems: Firstly, the existing screen design patterns are insufficient to meet the more complex needs of users. For example, in actual application scenarios, store users often need to conduct different promotional and marketing activities, requiring the issuance of different screen tasks. However, the existing screen design patterns cannot meet the more complex and personalized needs of users. To achieve richer visual effects, it is often necessary to communicate the activity concept to the developers, who then implement it. This process is time-consuming and prone to misunderstandings of requirements. If users need to make adjustments to the screen, it is difficult to implement them immediately. Secondly, user screen displays are mostly displayed on devices with limited RAM. When parsing complex content, the page rendering efficiency is low, often resulting in page lag and other unfriendly experiences. In addition, in daily use, users may encounter scenarios where multiple screens are played in a loop. This requires creating multiple tasks and setting intervals, which is cumbersome. Furthermore, switching between different tasks directly also leads to a poor user experience. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a playback task display method, apparatus, device, and storage medium that can meet the user's needs for the screen and improve the efficiency of screen rendering. The specific solution is as follows:
[0004] In a first aspect, the present invention discloses a method for displaying playback tasks, comprising:
[0005] Obtain the current playback task ID information recorded in the active alarm clock, and retrieve the playback task data packet from the local database based on the current playback task ID information;
[0006] The screen scaling ratio is calculated based on the playback task data packet to obtain the current screen ratio information and render it to generate the current screen layout.
[0007] Determine the target component contained in the current playback task corresponding to the current playback task ID information, add the target component to the corresponding preset parent container, and add the obtained target parent container to the current screen layout;
[0008] Obtain the target material corresponding to the current playback task, and add the target material to the corresponding target parent container for playback.
[0009] Optionally, before obtaining the current playback task ID information recorded in the active alarm clock, and before retrieving the playback task data packet from the local database based on the current playback task ID information, the method further includes:
[0010] Receive a playback task sent from the web client, and parse the playback task to obtain the playback task data packet;
[0011] Determine the playback task data in each playback task data packet; wherein, the playback task data includes the task playback validity date, playback time period, playback cycle, preset standard size screen data, original component data, and resource data played in the component;
[0012] All playback task data are stored in the local database;
[0013] Accordingly, calculating the screen scaling ratio based on the playback task data packet includes:
[0014] The image scaling ratio is calculated based on the preset standard size image data and the target size image data of the current playback device.
[0015] Optionally, after storing all the playback task data in the local database, the method further includes:
[0016] Obtain the playback time period for each playback task data to obtain the playback end time;
[0017] Compare the playback end time with the current time, and determine the playback task data whose playback end time is earlier than the current time as expired task data.
[0018] Based on the expired task data, determine the non-expired task data from all the playback task data;
[0019] A start alarm is set for each of the non-expired task data based on the playback start time of the playback period, and an end alarm is set for each of the non-expired task data based on the playback end time of the playback period.
[0020] Optionally, after adding the target material to the corresponding target parent container for playback, the method further includes:
[0021] When the current time reaches the playback end time, the end alarm is triggered;
[0022] End the current playback task and clear all target parent containers in the current screen layout.
[0023] Optionally, before adding the target component to the corresponding preset parent container, the method further includes:
[0024] Based on the screen scaling ratio and the original component data, target component data for creating the preset parent container is calculated; the original component data includes the original component width, original component height, and original component position, and the target component data includes the target component width, target component height, and target component position.
[0025] An empty preset parent container is created based on the target component data;
[0026] Accordingly, adding the target component to the corresponding preset parent container and adding the obtained target parent container to the current screen layout includes:
[0027] Add the target component to the corresponding empty preset parent container so that the target component inherits the properties of the preset parent container to obtain the rendered component;
[0028] Add the target parent container containing the rendered component to the current screen layout.
[0029] Optionally, after adding the target material to the corresponding target parent container for playback, the method further includes:
[0030] Determine whether the information in the current playback task has changed;
[0031] If the information in the current playback task changes, then the target parent container in the current screen layout is deleted;
[0032] Obtain the changed playback task data packet from the changed playback task, and determine the changed component data in the changed playback task data packet as the new original component data, then re-enter the step of calculating the target component data for creating the preset parent container based on the screen scaling ratio and the original component data.
[0033] Optionally, obtaining the target material corresponding to the current playback task and adding the target material to the corresponding target parent container for playback includes:
[0034] Obtain the target URL address and download the corresponding target material based on the target URL address;
[0035] Obtain the material ID information from the target material, and determine the corresponding target playback task data package based on the material ID information and a preset ID mapping table; the preset ID mapping table is an information table used to characterize the association relationship between the material ID information and the component ID information in the current playback task ID information.
[0036] The target material is added to the target parent container corresponding to the target playback task data package for playback.
[0037] Secondly, the present invention discloses a playback task display device, comprising:
[0038] The playback task data packet acquisition module is used to acquire the current playback task ID information recorded in the active alarm clock, and to acquire the playback task data packet from the local database based on the current playback task ID information.
[0039] The screen layout rendering module is used to calculate the screen scaling ratio based on the playback task data package, so as to obtain the current screen ratio information and render it to generate the current screen layout.
[0040] The component addition module is used to determine the target component contained in the current playback task corresponding to the current playback task ID information, add the target component to the corresponding preset parent container, and add the obtained target parent container to the current screen layout;
[0041] The media playback module is used to obtain the target media corresponding to the current playback task and add the target media to the corresponding target parent container for playback.
[0042] Thirdly, the present invention discloses an electronic device, comprising:
[0043] Memory, used to store computer programs;
[0044] A processor is configured to execute the computer program to implement the steps of the playback task display method disclosed above.
[0045] Fourthly, the present invention discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the playback task display method disclosed above.
[0046] As can be seen, the present invention provides a playback task display method, comprising: obtaining the current playback task ID information recorded in an active alarm clock; obtaining a playback task data packet from a local database based on the current playback task ID information; calculating the screen scaling ratio based on the playback task data packet to obtain the current screen ratio information and rendering it to generate a current screen layout; determining the target component contained in the current playback task corresponding to the current playback task ID information, adding the target component to the corresponding preset parent container, and adding the obtained target parent container to the current screen layout; obtaining the target material corresponding to the current playback task, and adding the target material to the corresponding target parent container for playback. Thus, the present invention maintains the same screen ratio on screens of different sizes by calculating the screen scaling ratio, and implements component rendering through a parent container, with one component corresponding to one parent container. When a component changes, the corresponding component can be modified individually without affecting other components, thus meeting the user's needs for the screen and improving the efficiency of screen rendering. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0048] Figure 1 This is a flowchart of a playback task display method disclosed in this invention;
[0049] Figure 2 This is a schematic diagram illustrating the task content settings disclosed in this invention;
[0050] Figure 3 This is a schematic diagram of the task playback settings disclosed in this invention;
[0051] Figure 4 This is a flowchart of a specific playback task display method disclosed in this invention;
[0052] Figure 5 A schematic diagram of the playback task display device provided by the present invention;
[0053] Figure 6 This invention provides a structural diagram of an electronic device. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] Currently, on the one hand, existing screen design patterns are insufficient to meet the increasingly complex needs of users. They struggle to fulfill more intricate and personalized user requirements, and existing methods are prone to misunderstandings of these needs. On the other hand, user screen displays are often displayed on devices with limited RAM. When parsing complex content, page rendering efficiency is low, frequently resulting in page stuttering and other unpleasant experiences. Furthermore, in daily use, users often encounter scenarios where multiple screens loop in rotation. This requires creating multiple tasks, setting intervals, which is cumbersome, and switching between different tasks further degrades the user experience. Therefore, this invention provides a playback task display method that meets user needs for screen display and improves screen rendering efficiency.
[0056] This invention discloses a method for displaying playback tasks, see [link to relevant documentation]. Figure 1 As shown, the method includes:
[0057] Step S11: Obtain the current playback task ID information recorded in the active alarm clock, and obtain the playback task data packet from the local database based on the current playback task ID information.
[0058] In this embodiment, before obtaining the current playback task ID information recorded in the active alarm clock, a playback task sent from the web client is received, and the playback task is parsed to obtain the playback task data packet; the playback task data in each playback task data packet is determined; wherein, the playback task data includes the task playback validity date, playback time period, playback cycle, preset standard size screen data, original component data, and resource data played in the component; all the playback task data is stored in the local database. It can be understood that by first receiving the playback task sent from the web client and parsing out multiple playback task data packets, each playback task data packet contains playback task data, mainly including the task playback validity date, playback time period, playback cycle (e.g., weekly, monthly), component data in the screen (e.g., component type, width, height, position, etc.), and resource data to be played in the component (e.g., image, video download address). After the client receives the data through a network request, all the data is stored in the local database, avoiding frequent client calls to the server interface; only local data needs to be read each time the device boots up.
[0059] It is understandable that, such as Figure 2 As shown, when creating a playback task, information such as task name, ad type, and screen selection are set. Ad types include regular ads, H5 ads, live stream ads, and custom screens; screen selection includes a blank screen in portrait mode. Figure 3 As shown, the playback task data package settings include playback device, playback validity period, playback frequency, playback time period, synchronization interval, and strong synchronization selection.
[0060] Step S12: Calculate the screen scaling ratio based on the playback task data packet to obtain the current screen ratio information and render it to generate the current screen layout.
[0061] In this embodiment, the current playback task ID information recorded in the active alarm clock is obtained. Based on this ID, a playback task data packet is retrieved from the local database. Then, the screen scaling ratio is calculated based on the playback task data packet to obtain the current screen ratio information and render it, generating the current screen layout. It is understood that the screen scaling ratio is calculated based on the preset standard size screen data and the target size screen data of the current playback device. Specifically, since the server data is fixed, but the screen models on the device side are very diverse, conventional rendering methods cannot meet the requirements. This invention uses a proportional scaling method for rendering. The client and server agree on the preset standard size screen data, for example, the preset standard size screen data is 24 units wide and 12 units high. At this time, the target device's screen width is 2000px (pixels) and height is 1000px, so the scaling ratio is 2000 / 24, approximately 83.3 times. It is understood that the preset standard size screen data is stored in the playback task data packet on the device's local storage. Different tasks can set different standard sizes to adapt to different types of devices, but the standard size is the same for multiple tasks on the same device.
[0062] Step S13: Determine the target component contained in the current playback task corresponding to the current playback task ID information, add the target component to the corresponding preset parent container, and add the obtained target parent container to the current screen layout.
[0063] In this embodiment, the screen scaling ratio is calculated based on the playback task data package to obtain the current screen ratio information and render it. After generating the current screen layout, the target component contained in the current playback task corresponding to the current playback task ID information is determined, and the target component is added to the corresponding preset parent container. The obtained target parent container is then added to the current screen layout. It can be understood that before adding the target component to the corresponding preset parent container, target component data for creating the preset parent container is calculated based on the screen scaling ratio and the original component data. The original component data includes the original component width, original component height, and original component position; the target component data includes the target component width, target component height, and target component position. An empty preset parent container is created based on the target component data. Adding the target component to the corresponding preset parent container and adding the obtained target parent container to the current screen layout includes: adding the target component to the corresponding empty preset parent container so that the target component inherits the attributes of the preset parent container to obtain the rendered component; and adding the target parent container containing the rendered component to the current screen layout.
[0064] Understandably, before drawing the multiple components contained in each task (the order in which components are drawn within the same task is not important), the preset parent container for each component must first be drawn. Finally, the specific component is added to the preset parent container. Therefore, the width and height of the preset parent container are the width and height of the component, and the position of the preset parent container on the screen is the position of the component. That is, the preset parent container is created using component data. For example, the component data is as follows:
[0065] The code `{"x":10,"y":0,"w":14,"h":12,"i":1,"id":"P5EX6GRAOIYAF2YLCC B8BM4P89XYZGIFV"}` calculates the width, height, and position of the preset parent container based on a scaling factor of, for example, 83.3. For instance, the parent container's x-coordinate is 10 × 83.3 = 833px; y-coordinate is 0 × 83.3 = 0; width is 14 × 83.3 = 1166.2px; and height is 12 × 83.3 = 999.6px. After obtaining the actual data of the preset parent container, a view is created, and its width, height, and coordinate position are set. At this point, an empty preset parent container view is created on the screen.
[0066] Initialize the specific components. Component types include images, videos, text, live streams, etc. Taking images as an example, create an image carousel component, set the component ID and the duration of each image carousel. At this point, only the image component is initialized; it is not yet added to the screen, and the content cannot be played. Then, add the initialized component to the preset parent container to obtain the target parent container. It can be understood that the preset parent container has already been rendered and the corresponding component initialized. Adding the initialized component to the preset parent container to obtain the target parent container completes the component rendering. Since the parent container has fixed width, height, and position coordinates, the component added at this point inherits the parent container's properties (including width, height, and coordinates) after filling the parent container. The component's width, height, and position coordinates have now been scaled, achieving component rendering.
[0067] Furthermore, the target parent container view is added to the device screen, where the width, height, and position of the components are displayed correctly. However, the footage cannot be played at this point.
[0068] Step S14: Obtain the target material corresponding to the current playback task, and add the target material to the corresponding target parent container for playback.
[0069] In this embodiment, after adding the obtained target parent container to the current screen layout, the target material corresponding to the current playback task is obtained, and the target material is added to the corresponding target parent container for playback. Specifically, the target URL (Uniform Resource Locator) address is obtained, and the corresponding target material is downloaded based on the target URL address; the material ID information in the target material is obtained, and the corresponding target playback task data package is determined based on the material ID information and a preset ID mapping table; the preset ID mapping table is an information table used to represent the association between the material ID information and the component ID information in the current playback task ID information; the target material is added to the target parent container corresponding to the target playback task data package for playback. It can be understood that, since some materials are large and need to be downloaded locally in advance, the materials cannot be set first. Instead, the target material corresponding to the current playback task is obtained while the target parent container is added to the main screen, thereby improving the screen rendering speed.
[0070] Furthermore, after adding the target material to the corresponding target parent container for playback, it is determined whether the information in the current playback task has changed; if the information in the current playback task has changed, the target parent container in the current screen layout is deleted; the changed playback task data package in the changed playback task is obtained, and the changed component data in the changed playback task data package is determined as the new original component data, and the process re-enters the step of calculating the target component data for creating the preset parent container based on the screen scaling ratio and the original component data.
[0071] It is understandable that when playing the current task, if the web client changes the task (e.g., adding or deleting components, modifying component parameters, or modifying materials), such as changing the component's width and height, after obtaining the new component width and height data, the new component width and height are recalculated based on the screen scaling ratio. Then, the corresponding component and target parent container are found according to the component ID, the target parent container is removed from the main screen, and the process re-enters the step of calculating the target component data for creating the preset parent container based on the screen scaling ratio and the original component data. In this invention, only the modified components need to be re-rendered, and other components do not need to be redrawn, resulting in better performance and faster rendering speed.
[0072] This invention enables large-screen displays to receive and parse playback tasks created based on multiple custom screen schemes, achieving optimized display of these tasks. Users can flexibly, conveniently, and easily drag and drop to create desired page effects; the screen can respond promptly to different screen sizes while maintaining the same aspect ratio; it can play more complex screens with larger playback materials on devices with lower performance; and multiple screens can be played in a better loop or rotation. Users with no prior experience can easily and conveniently build their desired screens and create playback tasks for distribution, displaying the playback effects on the corresponding large-screen display.
[0073] As can be seen, the present invention provides a playback task display method, comprising: obtaining the current playback task ID information recorded in an active alarm clock; obtaining a playback task data packet from a local database based on the current playback task ID information; calculating the screen scaling ratio based on the playback task data packet to obtain the current screen ratio information and rendering it to generate a current screen layout; determining the target component contained in the current playback task corresponding to the current playback task ID information, adding the target component to the corresponding preset parent container, and adding the obtained target parent container to the current screen layout; obtaining the target material corresponding to the current playback task, and adding the target material to the corresponding target parent container for playback. Thus, the present invention maintains the same screen ratio on screens of different sizes by calculating the screen scaling ratio, and implements component rendering through a parent container, with one component corresponding to one parent container. When a component changes, the corresponding component can be modified individually without affecting other components, thus meeting the user's needs for the screen and improving the efficiency of screen rendering.
[0074] See Figure 4 As shown, this embodiment of the invention discloses a method for displaying playback tasks. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.
[0075] Step S21: Set an end alarm for each of the unexpired task data based on the playback end time of the playback period.
[0076] In this embodiment, an end alarm is set for each of the non-expired task data based on the playback end time of the playback time period. Specifically, the playback time period of each playback task data is obtained to obtain the playback end time; the playback end time is compared with the current time, and the playback task data whose playback end time is earlier than the current time is determined as expired task data; non-expired task data is determined from all the playback task data based on the expired task data; a start alarm is set for each of the non-expired task data based on the playback start time of the playback time period, and an end alarm is set for each of the non-expired task data based on the playback end time of the playback time period. It can be understood that the expiration of a task is determined based on the playback time period of the task in the obtained task data (0:00 to 24:00 daily), the playback end time is compared with the current time, expired tasks are excluded, and the remaining valid tasks (i.e., non-expired tasks) are set with local timed alarms based on the task start and end times. Simultaneously, the unique ID of each task is recorded in the alarm parameters (each task has a start alarm and an end alarm; the web-based data ensures that task playback times do not overlap).
[0077] Step S22: Obtain the current playback task ID information recorded in the active alarm clock, and obtain the playback task data packet from the local database based on the current playback task ID information.
[0078] Step S23: Calculate the screen scaling ratio based on the playback task data packet to obtain the current screen ratio information and render it to generate the current screen layout.
[0079] Understandably, the page layout is quickly achieved using a grid layout and absolute positioning. An algorithmic conversion layer calculates the position and dimensions of components on different screen sizes. The layout and component content are rendered separately. The rendering area of the screen design page and the client window are divided into a grid with the same number of horizontal and vertical lines. Each time a component moves or resizes, the position of its top-left corner within the grid and the number of grid lines occupied by its width and height are stored as the component's position and dimensions in the layout information of the screen description. Upon receiving the task notification, the client first divides the page according to the same number of grid lines as the screen design rendering area before rendering the screen. Based on the aspect ratio set in the screen design module, the size of each grid is calculated, and the layout information in the screen description is converted into specific pixel values using an algorithm. When text components are involved, the width of the screen design page rendering area is set as the base width based on the client window width. The ratio of these two widths is used to convert the text size (px) value set in the design module into a size suitable for the current playback device, thus achieving text component adaptation for different screen sizes.
[0080] Step S24: Determine the target component contained in the current playback task corresponding to the current playback task ID information, add the target component to the corresponding preset parent container, and add the obtained target parent container to the current screen layout.
[0081] Step S25: Obtain the target material corresponding to the current playback task, and add the target material to the corresponding target parent container for playback.
[0082] Understandably, the data package contains the URLs of the source materials. While rendering the visuals, the materials are downloaded. Once the download is complete, the corresponding component is located based on the component ID (the component ID is set during initialization), and the material is added to the component for playback. After the visuals are rendered (at this point, the component may not be playing content; if local materials are available, they will play directly; otherwise, they need to be downloaded), a playback task is initiated, and the material download continues simultaneously.
[0083] Step S26: When the current time reaches the playback end time, the end alarm is triggered.
[0084] In this embodiment, after the target material is added to the corresponding target parent container for playback, the end alarm is triggered when the current time reaches the playback end time. Specifically, when the current time reaches the playback end time, the end alarm is triggered; the current playback task ends, and all target parent containers in the current screen layout are cleared. It can be understood that when the end alarm takes effect, the current task playback immediately ends, the screen content is cleared, and the system waits for the next start alarm to take effect before re-entering the step of obtaining the current playback task ID information recorded in the already activated alarms. Furthermore, users can define multiple custom screen schemes and set corresponding polling requirements for component materials; the task settings for the playback task are implemented by associating them with each custom screen scheme. When a task is published, multiple custom screen schemes and playback settings within the same task are sent together to the target device for parsing and playback display.
[0085] This invention can quickly fulfill user requirements for visuals, reducing the time developers spend understanding, implementing, and verifying those requirements. Users can directly set the visual effects, saving time and quickly meeting their needs. This facilitates daily store management and operations, and helps users handle unexpected situations, such as changing the title text on the screen or altering the duration of promotional image slideshows. The task creation function of this invention helps users manage the visuals played on their devices. Existing technology only binds one visual to one task when it is assigned, and the screen stops playing when the set end time is reached. However, in daily use, multiple visuals often loop on a single device. In existing technology, to play n visuals, n tasks must be created and looped m times. That is, m staggered playback periods are set within the start and end time of each task. However, when executing different tasks, there are short black screen periods between each task due to WebSocket issues, resulting in poor visual transitions. This invention allows for the binding of multiple screens within a single task, with each screen having a set playback period or duration. This enables a seamless transition from one screen to the next after its playback time is reached, and allows for the setting of various screen transition effects to enhance the user experience.
[0086] Furthermore, in existing technologies, screens are often displayed in a 3x3 grid, with each grid showing a monitoring view. These are rendered together during screen rendering, which can cause page stuttering or even crashes when there are many components or large content. This invention, however, stores page layout information and component attribute information separately. When the client installed on the Android device receives a task from a WebSocket, it first retrieves the screen layout information from the task information. Based on the positioning, width, and height of different components described in the layout information, and considering the screen width, it calculates the specific size of each component on the device and renders the layout using a grid+absoulute method. Then, it retrieves the specific attribute information of the component from the unique identifier in the layout information, renders the specific component, and enables playback of the content. This invention can render the page layout first when dealing with screens with a large number of components or large content, improving the user experience.
[0087] This invention can also achieve partial updates. When a task is issued and the screen is already playing on the device, if a user wants to change an image, they can directly enter the task, replace the image, and then simply save the task again. The background method will then reissue the task, and the client will respond by comparing and confirming the changes. Only the source material of the changed component will be modified, thus achieving a partial update and avoiding re-rendering of the screen.
[0088] For details regarding steps S22 and S24, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0089] As can be seen, this embodiment sets an end alarm for each of the non-expired task data based on the playback end time of the playback period; obtains the current playback task ID information recorded in the active alarm, and obtains the playback task data package from the local database based on the current playback task ID information; calculates the screen scaling ratio based on the playback task data package to obtain the current screen ratio information and renders it to generate the current screen layout; determines the target component contained in the current playback task corresponding to the current playback task ID information, adds the target component to the corresponding preset parent container, and adds the obtained target parent container to the current screen layout; obtains the target material corresponding to the current playback task, and adds the target material to the corresponding target parent container for playback; when the current time reaches the playback end time, the end alarm is triggered, which meets the user's needs for the screen and improves the efficiency of screen rendering.
[0090] See Figure 5 As shown, this embodiment of the invention also discloses a playback task display device, comprising:
[0091] The playback task data packet acquisition module 11 is used to acquire the current playback task ID information recorded in the active alarm clock, and to acquire the playback task data packet from the local database based on the current playback task ID information.
[0092] The screen layout rendering module 12 is used to calculate the screen scaling ratio based on the playback task data package, so as to obtain the current screen ratio information and render it to generate the current screen layout.
[0093] The component adding module 13 is used to determine the target component contained in the current playback task corresponding to the current playback task ID information, add the target component to the corresponding preset parent container, and add the obtained target parent container to the current screen layout;
[0094] The media playback module 14 is used to obtain the target media corresponding to the current playback task and add the target media to the corresponding target parent container for playback.
[0095] As can be seen, the present invention includes: obtaining the current playback task ID information recorded in an active alarm clock; obtaining a playback task data package from a local database based on the current playback task ID information; calculating the screen scaling ratio based on the playback task data package to obtain the current screen ratio information and rendering it to generate the current screen layout; determining the target component contained in the current playback task corresponding to the current playback task ID information, adding the target component to the corresponding preset parent container, and adding the obtained target parent container to the current screen layout; obtaining the target material corresponding to the current playback task, and adding the target material to the corresponding target parent container for playback. Therefore, the present invention maintains the same screen ratio on screens of different sizes by calculating the screen scaling ratio, and implements component rendering through a parent container. One component corresponds to one parent container. When a component changes, the corresponding component can be modified individually without affecting other components, thus meeting the user's needs for the screen and improving the efficiency of screen rendering.
[0096] In some specific embodiments, before the playback task data packet acquisition module 11, the system further includes:
[0097] The playback task receiving unit is used to receive playback tasks sent from the web client.
[0098] A playback task parsing unit is used to parse the playback task to obtain the playback task data packet;
[0099] A playback task data determination unit is used to determine the playback task data in each playback task data packet; wherein, the playback task data includes the task playback validity date, playback time period, playback cycle, preset standard size screen data, original component data, and resource data played in the component;
[0100] A playback task data storage unit is used to store all the playback task data in the local database;
[0101] The playback end time determination unit is used to obtain the playback time period of each playback task data to obtain the playback end time;
[0102] A playback end time comparison unit is used to compare the playback end time with the current time;
[0103] An expired task data determination unit is used to determine the playback task data whose playback end time is earlier than the current time as expired task data.
[0104] The non-expired task data determination unit is used to determine non-expired task data from all the playback task data based on the expired task data.
[0105] The alarm clock setting unit is used to set an alarm clock for each of the unexpired task data based on the playback start time of the playback period.
[0106] An alarm clock setting unit is used to set an alarm clock for each of the unexpired task data based on the playback end time of the playback period.
[0107] In some specific embodiments, the playback task data packet acquisition module 11 specifically includes:
[0108] The current playback task ID information acquisition unit is used to obtain the current playback task ID information recorded in the active alarm clock;
[0109] The playback task data packet acquisition unit is used to acquire the playback task data packet from the local database based on the current playback task ID information.
[0110] In some specific embodiments, the screen layout rendering module 12 specifically includes:
[0111] The screen scaling ratio calculation unit is used to calculate the screen scaling ratio based on the preset standard size screen data and the target size screen data of the current playback device;
[0112] The current screen layout rendering unit is used to obtain the current screen ratio information and render it to generate the current screen layout.
[0113] In some specific embodiments, the component adding module 13 specifically includes:
[0114] The target component determination unit is used to determine the target component contained in the current playback task corresponding to the current playback task ID information;
[0115] The target component data calculation unit is used to calculate target component data for creating the preset parent container based on the screen scaling ratio and the original component data; the original component data includes the original component width, the original component height, and the original component position, and the target component data includes the target component width, the target component height, and the target component position.
[0116] An empty preset parent container creation unit is used to create an empty preset parent container based on the target component data;
[0117] The target component adding unit is used to add the target component to the corresponding empty preset parent container so that the target component inherits the properties of the preset parent container to obtain the rendered component.
[0118] The target parent container adding unit is used to add the target parent container containing the rendered component to the current screen layout.
[0119] In some specific embodiments, the material playback module 14 specifically includes:
[0120] The URL address acquisition unit is used to obtain the target URL address;
[0121] The target material download unit is used to download the corresponding target material based on the target URL address;
[0122] A material ID information acquisition unit is used to acquire material ID information from the target material;
[0123] The target playback task data packet determination unit is used to determine the corresponding target playback task data packet based on the material ID information and a preset ID mapping relationship table; the preset ID mapping relationship table is an information table used to characterize the association relationship between the material ID information and the component ID information in the current playback task ID information.
[0124] The target material playback unit is used to add the target material to the target parent container corresponding to the target playback task data package for playback;
[0125] An alarm clock termination unit is used to trigger the alarm clock termination when the current time reaches the playback end time.
[0126] The current playback task termination unit is used to terminate the current playback task;
[0127] The target parent container clearing unit is used to clear all the target parent containers in the current screen layout;
[0128] The current playback task determination unit is used to determine whether the information in the current playback task has changed;
[0129] The target parent container deletion unit is used to delete the target parent container in the current screen layout if the information in the current playback task changes.
[0130] The changed playback task data packet acquisition unit is used to acquire the changed playback task data packet in the changed playback task.
[0131] The new original component data determination unit is used to determine the changed component data in the changed playback task data package as the new original component data, and re-enter the step of calculating the target component data for creating the preset parent container based on the screen scaling ratio and the original component data.
[0132] Furthermore, embodiments of the present invention also provide an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of the invention.
[0133] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present invention. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the playback task display method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0134] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this invention, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0135] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0136] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the playback task display method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0137] Furthermore, this embodiment of the invention also discloses a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the playback task display method steps disclosed in any of the foregoing embodiments.
[0138] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0139] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0140] The above provides a detailed description of a playback task display method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for displaying playback tasks, characterized in that, include: Obtain the current playback task ID information recorded in the active alarm clock, and retrieve the playback task data packet from the local database based on the current playback task ID information; The screen scaling ratio is calculated based on the playback task data packet to obtain the current screen ratio information and render it to generate the current screen layout. Determine the target component contained in the current playback task corresponding to the current playback task ID information, add the target component to the corresponding preset parent container, and add the obtained target parent container to the current screen layout; Obtain the target material corresponding to the current playback task, and add the target material to the corresponding target parent container for playback; Before adding the target component to the corresponding preset parent container, the method further includes: Based on the screen scaling ratio and the original component data, target component data for creating the preset parent container is calculated; the original component data includes the original component width, original component height, and original component position, and the target component data includes the target component width, target component height, and target component position; the original component data is the data in the playback task data package; An empty preset parent container is created based on the target component data; Accordingly, adding the target component to the corresponding preset parent container and adding the obtained target parent container to the current screen layout includes: Add the target component to the corresponding empty preset parent container so that the target component inherits the properties of the preset parent container to obtain the rendered component; Add the target parent container containing the rendered component to the current screen layout.
2. The playback task display method according to claim 1, characterized in that, Before obtaining the current playback task ID information recorded in the active alarm clock, and before retrieving the playback task data packet from the local database based on the current playback task ID information, the method further includes: Receive a playback task sent from the web client, and parse the playback task to obtain the playback task data packet; Determine the playback task data in each playback task data packet; wherein, the playback task data includes the task playback validity date, playback time period, playback cycle, preset standard size screen data, original component data, and resource data played in the component; All playback task data are stored in the local database; Accordingly, calculating the screen scaling ratio based on the playback task data packet includes: The image scaling ratio is calculated based on the preset standard size image data and the target size image data of the current playback device.
3. The playback task display method according to claim 2, characterized in that, After storing all the playback task data in the local database, the method further includes: Obtain the playback time period for each playback task data to obtain the playback end time; Compare the playback end time with the current time, and determine the playback task data whose playback end time is earlier than the current time as expired task data. Based on the expired task data, determine the non-expired task data from all the playback task data; A start alarm is set for each of the non-expired task data based on the playback start time of the playback period, and an end alarm is set for each of the non-expired task data based on the playback end time of the playback period.
4. The playback task display method according to claim 3, characterized in that, After adding the target material to the corresponding target parent container for playback, the method further includes: When the current time reaches the playback end time, the end alarm is triggered; End the current playback task and clear all target parent containers in the current screen layout.
5. The playback task display method according to claim 1, characterized in that, After adding the target material to the corresponding target parent container for playback, the method further includes: Determine whether the information in the current playback task has changed; If the information in the current playback task changes, then the target parent container in the current screen layout is deleted; Obtain the changed playback task data packet from the changed playback task, and determine the changed component data in the changed playback task data packet as the new original component data, then re-enter the step of calculating the target component data for creating the preset parent container based on the screen scaling ratio and the original component data.
6. The playback task display method according to any one of claims 1 to 5, characterized in that, The step of obtaining the target material corresponding to the current playback task and adding the target material to the corresponding target parent container for playback includes: Obtain the target URL address and download the corresponding target material based on the target URL address; Obtain the material ID information from the target material, and determine the corresponding target playback task data package based on the material ID information and a preset ID mapping table; the preset ID mapping table is an information table used to characterize the association relationship between the material ID information and the component ID information in the current playback task ID information. The target material is added to the target parent container corresponding to the target playback task data package for playback.
7. A playback task display device, characterized in that, include: The playback task data packet acquisition module is used to acquire the current playback task ID information recorded in the active alarm clock, and to acquire the playback task data packet from the local database based on the current playback task ID information. The screen layout rendering module is used to calculate the screen scaling ratio based on the playback task data package, so as to obtain the current screen ratio information and render it to generate the current screen layout. The component addition module is used to determine the target component contained in the current playback task corresponding to the current playback task ID information, add the target component to the corresponding preset parent container, and add the obtained target parent container to the current screen layout; The media playback module is used to obtain the target media corresponding to the current playback task and add the target media to the corresponding target parent container for playback; The preset parent container creation module is used to calculate target component data for creating the preset parent container based on the screen scaling ratio and the original component data; the original component data includes the original component width, original component height, and original component position, and the target component data includes the target component width, target component height, and target component position; the original component data is the data in the playback task data package; An empty preset parent container is created based on the target component data; Accordingly, the component adding module is specifically used to add the target component to the corresponding empty preset parent container so that the target component inherits the properties of the preset parent container to obtain the rendered component; Add the target parent container containing the rendered component to the current screen layout.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the playback task display method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the playback task display method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Carousel graph display method and device, equipment and medium
CN112835499A
Large-screen data visual display method and device, storage medium and computer device
CN113127784A
Information display method, device and system and electronic equipment
CN115134663A