Data processing method and electronic device
By controlling commands and configuring layers, the visual integration of the video window and the wallpaper target object is achieved, solving the visual disjointedness caused by traditional floating windows and improving user experience and desktop interaction efficiency.
Patent Information
- Application Number
- CN202610734115.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-26
- Publication Date
- 2026-08-25
AI Technical Summary
Traditional video playback floating windows cause visual discontinuity and poor user experience after exiting the video application, making it impossible to achieve smooth parallel operation of video content with other applications.
By obtaining control instructions to display the target video window in the target display area, the display content of the target video window is matched with the target display area, making it the display content of the target object in the wallpaper layer. The Z-axis order of the display layers is configured to ensure that the video window is located on the upper layer of the wallpaper layer and the lower layer of the desktop application layer. Combined with intelligent agent recognition and output surface processing, the visual fusion of video content and wallpaper target object is achieved.
It improves the visual integration between video content and wallpaper, enhances the user's immersive experience, and ensures the convenience of desktop interaction, avoiding the problem of floating windows obscuring desktop elements.
Smart Images

Figure CN122640580A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method and an electronic device. Background Technology
[0002] Currently, when users still need to watch videos after exiting a video application, they often use a floating window to allow them to operate the video content and other applications simultaneously. A traditional video playback floating window refers to converting the video player's display interface into a small window that always remains on top of other application interfaces, allowing users to continue watching videos and operating other functions of their electronic devices even after exiting the video playback application. Summary of the Invention
[0003] In view of the above problems, this application provides a data processing method and an electronic device, the specific solution of which is as follows:
[0004] The first aspect of this application provides a data processing method applied to an operating system, comprising:
[0005] A control instruction is obtained to display a target video window in a target display area, the target display area corresponding to the display area enclosed by the outline of the target object in the wallpaper layer;
[0006] In response to the control command, the display content of the target video window is matched with the target display area to serve as the display content of the target object's display area.
[0007] In one possible implementation, the data processing method also includes:
[0008] Configure the display layer of the target video window so that the display layer of the target video window is located above the wallpaper layer and below the desktop application layer;
[0009] The content of the target video window is displayed in the target display area.
[0010] In one possible implementation, the data processing method also includes:
[0011] An output surface corresponding to the target display area is created, the output surface being used to carry video frame data to draw the display content.
[0012] In one possible implementation, control commands are triggered by toggle commands and / or drag commands;
[0013] The switching instruction is sent by the first video application that generates the target video window in response to the selection operation of the switching button in the application interface, and the drag instruction is triggered by the drag operation of the target video window.
[0014] In one possible implementation, the data processing method also includes:
[0015] In response to the drag command, an indicator mark for the target display area is displayed, the target display area being obtained by the agent recognizing the outline of the target object.
[0016] In one possible implementation, after displaying the content of the target video window in the target display area, the method further includes:
[0017] In response to a sliding operation on the display area of the target object, the display content of the target video window does not respond.
[0018] In one possible implementation, after displaying the content of the target video window in the target display area, the method further includes:
[0019] In response to a page switching operation on the desktop launcher, the target video window remains in the same position relative to the electronic device.
[0020] In one possible implementation, controlling the display content of the target video window to match the target display area includes:
[0021] The display content of the target video window is geometrically transformed to adapt the display content of the target video window to the pose of the target display area.
[0022] In one possible implementation, the data processing method also includes:
[0023] An intelligent agent is invoked to identify the outline of a display device on the wallpaper layer using an image recognition model, in order to locate the target display area, wherein the target object includes the display device.
[0024] A second aspect of this application provides an electronic device, comprising: a display for displaying a wallpaper layer, a desktop application layer, and a target video window; a processor for receiving a control instruction to display the target video window in a target display area, the target display area corresponding to a display area enclosed by the outline of a target object in the wallpaper layer; and, in response to the control instruction, controlling the display content of the target video window to match the target display area as the display content of the display area of the target object.
[0025] By means of the above technical solution, the present application provides a data processing method and an electronic device. The method obtains a control instruction to display a target video window in a target display area, the target display area corresponding to the display area enclosed by the outline of a target object in a wallpaper layer; in response to the control instruction, the method controls the display content of the target video window to match the target display area, so as to serve as the display content of the display area of the target object. Attached Figure Description
[0026] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0027] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application;
[0028] Figure 2 An example is shown in the illustration comparing the display effects of a video window;
[0029] Figure 3 A schematic diagram illustrating a video window display effect provided in an embodiment of this application;
[0030] Figure 4 A schematic diagram illustrating yet another video window display effect provided in an embodiment of this application;
[0031] Figure 5 A schematic diagram illustrating yet another video window display effect provided in an embodiment of this application;
[0032] Figure 6 A schematic diagram illustrating yet another video window display effect provided in an embodiment of this application;
[0033] Figure 7 This is a schematic flowchart illustrating a data processing method provided in an embodiment of this application.
[0034] Figure 8 A schematic diagram of the structure of a data processing device provided in this application;
[0035] Figure 9 A schematic diagram of the specific structure of an electronic device provided in this application. Detailed Implementation
[0036] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0037] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0038] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar elements and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing elements with the same properties in the description of embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0039] Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this application, as shown below. Figure 1 As shown in the figure, the data processing method provided in this application embodiment may include steps S101 to S102, which are described in detail below.
[0040] S101, Obtain control instructions to display the target video window in the target display area.
[0041] In this embodiment, the target display area corresponds to the display area enclosed by the outline of the target object in the wallpaper layer.
[0042] In this embodiment, the wallpaper layer refers to the display layer on the desktop of an electronic device's operating system used to carry wallpaper content. Wallpaper content can be a static image (e.g., a photograph or illustration) or a dynamic image (e.g., a live wallpaper or video wallpaper). The target object includes a visual element within the wallpaper content. Optionally, the target object includes a visual element with display attributes, which visually carries the displayed content. For example, if the wallpaper content is a live wallpaper depicting a television, then the screen area of the television is a target object. As another example, if the wallpaper content is a photograph with a frame, then the internal area of the frame is a target object.
[0043] In this embodiment, the outline of the target object is the edge shape of the target object in the wallpaper layer. The continuous closed area enclosed by the boundary line of the target object is the target display area. The shape of the target display area depends on the shape of the target object in the wallpaper.
[0044] In this embodiment, the control command is used to trigger the display of video content in the target display area. Optionally, the control command can originate from various scenarios. As one optional example, the user can trigger the control command in the video playback application interface; as another optional example, the user can trigger the control command by dragging the floating window of the playing video content.
[0045] In this embodiment, the target video window refers to a window object used to carry and display video content. The window object can be created and managed by the operating system.
[0046] S102. Respond to the control command and control the display content of the target video window to match the target display area, so as to use it as the display content of the target object's display area.
[0047] In this embodiment, in response to the received control command, the operating system performs a matching operation on the display content of the target video window, so that the display content and the target display area form a visual correspondence, and are presented as the content displayed by the target object in its display area.
[0048] In this embodiment, the content displayed in the target video window is determined according to control instructions. For example, the video content comes from a local video file or a network video stream. As an optional example, the control instructions are used to instruct the movie currently playing in the video player application to be played in the target video window, and the video frame data of the movie is the content displayed in the target video window.
[0049] In this embodiment, matching includes performing one or more adaptation processes on the display content of the target video window to make it suitable for display in the target display area. For example, position adaptation includes the operating system positioning the display content of the target video window to the coordinate range of the target display area on the screen, ensuring that the video image is displayed in the correct screen position. Another example is size adaptation, which involves the operating system scaling the display content of the target video window according to the size of the target display area. If the target display area is small, the video image is scaled down proportionally; if the target display area is large, the video image is scaled up proportionally. If the aspect ratio of the target display area is inconsistent with the aspect ratio of the video image, cropping or margining can be used for processing.
[0050] As can be seen from the above technical solutions, the data processing method provided in this application provides a method that obtains a control command and, in response to the control command, matches the display content of the target video window with the target display area, so that the display content is limited to the outline area of the target object in the wallpaper layer. Visually, it presents the effect of the display content as the display of the target object itself, improves the visual integration between the display content and the wallpaper, eliminates the floating layer and disjointed feeling of traditional floating windows, and enhances the immersive experience of users watching the display content.
[0051] Furthermore, since the content is displayed in the form of a target video window, other elements on the desktop can still be operated normally while the content is displayed, thus balancing an immersive viewing experience with the convenience of desktop interaction.
[0052] Taking the display effect of video content on a TV screen in the wallpaper layer as an example, Figure 2 This example illustrates a comparison of video window display effects.
[0053] Depend on Figure 2 As shown in (a), (a) is an example of a mobile phone desktop visual effect, in which the wallpaper content carried by the mobile phone wallpaper layer is a wallpaper image containing a TV. When the first video application plays the first video, after the floating window is opened, the floating window of the first video application is created on the mobile phone desktop, and the video content of the first video is displayed in the floating window.
[0054] like Figure 2 As shown in (b), after a user opens the video floating window, they can drag it to the TV screen area in the wallpaper image and adjust its size (as indicated by the arrows around the floating window) to fit the TV screen area. However, by manually adjusting it, it is visually easy to distinguish that the video content is not what the TV in the wallpaper is playing, but rather an independent window superimposed on top of the TV. This visual disjointedness results in a poor user experience.
[0055] Furthermore, through the data processing method provided in this application embodiment, the operating system obtains a control command instructing the video window to be displayed on the television screen, controls the video content of the video window to match the corresponding display area of the television screen, and finally makes the video content the content being played on the television screen.
[0056] like Figure 2 As shown in (c), (c) illustrates the display effect after the operating system controls the video content of the video window to match the display area corresponding to the TV screen. The TV screen in the wallpaper plays the first video, presenting the visual effect of a dynamic wallpaper, improving the visual integration between the video content of the first video and the wallpaper, and enhancing the immersive experience of the user in viewing the displayed content.
[0057] In one optional embodiment, to prevent the target video window from obscuring interactive elements (such as application icons, widgets, etc.) in the desktop application layer, while ensuring that the video content visually appears as the display content of the target object itself in the wallpaper, the display layer of the target video window needs to be configured. Based on this, the data processing method provided in this application embodiment further includes: configuring the display layer of the target video window so that the display layer of the target video window is located above the wallpaper layer and below the desktop application layer, displaying the content of the target video window in the target display area.
[0058] In this embodiment, the wallpaper layer refers to the display layer on the operating system desktop of the electronic device used to carry wallpaper content. It is located at the bottom or lower level of the layer stack and is used to display static images (such as photos and illustrations) or dynamic images (such as live wallpapers and video wallpapers). The desktop application layer refers to the display layer corresponding to the operating system desktop (i.e., the desktop launcher) of the electronic device, located at the top or higher level of the layer stack. The desktop application layer is used to carry various desktop elements on the desktop. Optionally, desktop elements include application icons, folders, widgets, the Dock, the status bar, and interactive controls on the desktop background.
[0059] Specifically, the operating system configures layer positions by setting the Z-axis order of the display layer corresponding to the target video window. At the operating system's underlying level, each display layer has a corresponding Z-axis order value, which determines the vertical arrangement of layers: layers with smaller Z-axis order values are located below, and layers with larger Z-axis order values are located above. In this step, the operating system configures the Z-axis order value of the display layer corresponding to the target video window to be greater than the Z-axis order value of the wallpaper layer and less than the Z-axis order value of the desktop application layer, thus placing the display layer of the target video window between the wallpaper layer and the desktop application layer.
[0060] It should be noted that in traditional floating window technology, the floating window is usually configured above the desktop application layer, which causes the floating window to cover desktop icons. Users need to close or move the floating window before they can operate the covered icons, resulting in a poor user experience.
[0061] Through the aforementioned layer configuration, this application positions the content of the target video window above the wallpaper layer, allowing the content to be overlaid on top of the wallpaper image, thus serving as the display content of the target object within the wallpaper and creating a visual effect of the content embedded in the wallpaper. Furthermore, the target video window's display layer is located below the desktop application layer, ensuring that interactive elements such as icons and widgets in the desktop application layer are always displayed above the target video window. This guarantees that the displayed content will not obscure application icons and widgets on the desktop, and that normal user operations such as clicking and dragging desktop icons remain unaffected.
[0062] Figure 3 This is a schematic diagram illustrating a video window display effect provided in an embodiment of this application. Figure 3 As shown, the desktop of an electronic device (mobile phone) displays multiple application icons (specifically, applications 1 through 8). A television is set as the target object in the wallpaper layer, with the television screen area as the target display area. The content displayed in the target video window (i.e., the video image) is configured to play within the television screen area. Because the display layer configuring the target video window is located below the desktop application layer, the application icons in the desktop application layer are displayed above the target video window. Applications 4 and 6 overlap in their display positions on the screen with the television screen area, yet their icons are displayed normally and are not obscured by the video image. Users can normally click on application 4 or application 6 to launch the corresponding application; video playback is unaffected, and desktop interaction is not interfered with.
[0063] pass Figure 3 As can be seen from the display effect shown, this application achieves visual integration of video content and target objects in wallpaper by configuring the display layer of the target video window above the wallpaper layer and below the desktop application layer, while ensuring the normal display and operation of desktop icons, thus balancing the immersive viewing experience with the convenience of desktop interaction.
[0064] In an alternative embodiment, control commands are triggered by switching commands and / or drag-and-drop commands.
[0065] In this embodiment, the switching command is sent by the first video application that generates the target video window in response to the selection operation of the switching button in the application interface.
[0066] Specifically, the operating system receives a control command triggered by a switching command from a first video application (e.g., a video player application), responds to the control command, and controls the display content of the target video window to match the target display area, so as to use it as the display content of the target object's display area, thereby switching the content being played in the first video application to the target display area in the wallpaper.
[0067] Based on this, the operating system automatically switches the display position of the content from the application interface to the target object in the wallpaper according to the control instructions triggered inside the first video application, without requiring the operating system to manually adjust the position or resize the video window.
[0068] In this embodiment, the drag command is triggered by a drag operation on the target video window.
[0069] Specifically, in the scenario of playing in a floating window, the target video window is a floating window that has been triggered by the first video application. The operating system detects the drag operation on the target video window, recognizes the user's intention to display the content displayed in the floating window on the target object in the wallpaper, and thus controls the display content of the target video window to match the target display area, so as to use it as the display content of the target object's display area, thereby realizing the switching of the content being played in the target video window to the target display area in the wallpaper.
[0070] Based on this, the operating system automatically moves the video content from the original location of the target video window to the display location of the target object in the wallpaper according to the control instructions triggered by the drag operation on the target video window, without requiring the operating system to manually adjust the position or resize the video window.
[0071] It's worth noting that the switching command trigger method allows users to switch videos with a single click within the first video application interface, resulting in a short and efficient operation path. The drag-and-drop command trigger method allows users to place video content onto a target object in the wallpaper using a drag-and-drop gesture, offering a natural and intuitive experience. In summary, the trigger method for control commands can be flexibly selected based on the current usage scenario, thereby improving flexibility and user experience.
[0072] Based on the above optional embodiments, in the drag command triggering scenario, the operating system can also determine whether to trigger a control command by identifying whether the endpoint of the drag operation is located within the position range corresponding to the target display area. Based on this, a data processing method provided in this application embodiment further includes: in response to the drag command, displaying an indicator mark of the target display area, wherein the target display area is obtained by the intelligent agent recognizing the outline of the target object.
[0073] In this embodiment, the indicator mark is used to indicate the position and outline of the target display area. When the operating system detects a drag command for the target video window, the operating system responds to the drag command by visually displaying the indicator mark on the wallpaper layer.
[0074] Figure 4 This is a schematic diagram illustrating another video window display effect provided in an embodiment of this application, as shown below. Figure 4As shown, the indicator mark can be represented by a highlighted red border, which is drawn by the operating system along the outline edge of the target object, clearly marking the boundary of the target display area and used to indicate the position and outline of the target object.
[0075] In summary, by displaying this indicator, the operating system provides visual guidance to the user, enabling the user to drag the target video window to the area within the red border and release it. Furthermore, the operating system accurately determines whether to trigger a control command based on the position of the drag operation's endpoint, thereby improving the reliability of drag operation-triggered control commands and the user experience.
[0076] In an optional embodiment, the data processing method provided in this application further includes the step of obtaining the outline of the display area of the target object to locate the target display area, wherein the target object includes a display device, such as an electronic device with display attributes, such as a television, a mobile phone, and a large electronic screen, and the outline information includes information items such as position, shape, and size used to locate the display area.
[0077] In this embodiment, the specific method for obtaining the outline of the display area of the target object includes at least one of the following:
[0078] The first method involves extracting the outline information of the target object's display area from the wallpaper information. This outline information indicates the outline of the display device on the wallpaper layer. Optionally, when the wallpaper is downloaded, wallpaper information including the outline information of the display device is also downloaded.
[0079] Based on this, the operating system can directly extract the outline information of the display device from the wallpaper information without real-time recognition, thereby saving computing resources and improving response speed.
[0080] The second method involves invoking an intelligent agent to identify the outline of the display device on the wallpaper layer using an image recognition model, in order to locate the target display area.
[0081] In this embodiment, the intelligent agent can be invoked when the wallpaper takes effect (e.g., after the user sets a new wallpaper), or after receiving a switching or dragging command. The intelligent agent includes an artificial intelligence module equipped with an image recognition model. The operating system invokes the intelligent agent to perform image recognition on the wallpaper content in the wallpaper layer, detect whether there is a display device in the wallpaper, and identify the outline of the display device.
[0082] Through intelligent agent recognition, the operating system can automatically locate the target display area formed by the outline of the display device from the wallpaper content, without the need for the user to manually select or mark it, thus realizing intelligent and automated recognition of the target display area.
[0083] In one specific implementation, the first and second recognition methods are combined. For example, after receiving a control command, the operating system first obtains the outline of the display area of the target object from the wallpaper information. If it is not recorded in the wallpaper information, the intelligent agent is called to perform real-time recognition. After the recognition is completed, the outline information is recorded in the wallpaper information for subsequent use. This achieves the goal of ensuring recognition accuracy while taking into account the system's processing efficiency and power consumption.
[0084] In an optional embodiment, the data processing method provided in this application further includes: creating an output surface corresponding to the target display area.
[0085] In this embodiment, the output surface is used to carry video frame data to draw display content. The output surface is an independent display buffer allocated by the underlying operating system for video content, serving as a video carrier container for the corresponding display layer.
[0086] Specifically, in response to control commands, the operating system creates a new output surface corresponding to the target display area. This output surface is used to receive video frame data from the first video application and composite the video image. For example, the operating system creates an output surface that matches the location and size of the target display area, and notifies the first video application providing the video content of the reference information of this output surface. This causes the first video application to switch the output target of the video frame data to this output surface, and obtains the display content of the target video window by outputting video frame data to the output surface.
[0087] It should be noted that by creating an output surface corresponding to the target display area, this application achieves the precise display of video content on the target display area.
[0088] In an optional embodiment, after the data processing method provided in this application displays the display content of the target video window in the target display area, it further includes: in response to a sliding operation on the target display area, the display content of the target video window does not respond.
[0089] In this embodiment, by configuring the target video window not to receive swipe events, swipe operations applied to the target display area will not trigger any response from the target video window. For example, when a user swipes on the video playback area, the video playback in the target video window will not respond (i.e., it will not pause, fast forward, or bring up the control bar, etc.), ensuring that playback is not disturbed.
[0090] In one optional embodiment, the data processing method provided in this application, after displaying the content of the target video window in the target display area, further includes: in response to a page switching operation for the desktop launcher, the display position of the target video window relative to the electronic device remains unchanged.
[0091] In this embodiment, page switching refers to the left and right swiping page turning behavior performed by the user on the desktop launcher. By configuring the target video window not to receive page switching related events, the target video window will not move with the page switching swiping operation, and the display position of the target video window relative to the electronic device screen will remain unchanged.
[0092] Figure 5 This is a schematic diagram illustrating yet another video window display effect provided in an embodiment of this application. Figure 5 The first page shows the desktop display before page switching; the TV screen area in the wallpaper is playing video content normally, and the desktop displays the application icons from the first page. Users can... Figure 5 The first example shows how to switch pages by swiping right on the desktop. Figure 5 The second page shows the desktop display effect after the page switch. The desktop switches to the second page and displays the second page. That is, even if the starting point of the swipe operation is located in the TV screen area (i.e., the video playback area), the position of the target video window does not change and remains fixed in the TV screen area, while the desktop completes the page switch normally.
[0093] It should be noted that the interactive behavior of the target video window can be configured to not receive specific types of events. Specifically, the operating system can configure the target video window not to receive swipe events (i.e., the first event) to make the displayed content of the target video window unresponsive to swipe operations, and / or configure the target video window not to receive page switching events (i.e., the second event, including but not limited to swipe events used to trigger page switching) to ensure that the target video window maintains its display position during desktop launcher page switching.
[0094] Based on the above embodiments, the target video window will not be affected by the user's swiping operation, nor will it change its display position due to desktop page switching. The video content is always stably displayed within the outline area of the target object in the wallpaper, realizing an immersive visual effect of embedding video content into the wallpaper, while ensuring that the user's normal interactive operation of the desktop launcher is not interfered with.
[0095] In one optional embodiment, the data processing method provided in this application, which controls the display content of a target video window to match the target display area, includes: performing a geometric transformation on the display content of the target video window so that the display content of the target video window adapts to the pose of the target display area.
[0096] In this embodiment, pose refers to the spatial orientation of the target display area on the screen, including information such as the orientation, tilt angle, and perspective relationship of the target object. For example, the television screen in the wallpaper is tilted at a certain angle or has a perspective distortion effect.
[0097] In this embodiment, the operating system performs geometric transformations (such as rotation, scaling, skewing, perspective transformation, etc.) on the display content of the target video window to make the visual orientation of the video image consistent with the pose of the target object, thereby enhancing the visual integration between the video content and the target object in the wallpaper, and making the video image more naturally adapt to the shape and orientation of the target display area.
[0098] Specifically, the operating system calculates a transformation matrix based on the pose information of the target display area, mapping the original video image to the spatial form of the target display area, so that the video image visually blends with the target object in the wallpaper, further enhancing the realism and immersion of the video content embedded in the wallpaper.
[0099] Figure 6 This is a schematic diagram illustrating another video window display effect provided in an embodiment of this application, wherein the television screen in the wallpaper layer is rotated within the wallpaper image. The operating system performs corresponding rotation transformations on the video image based on the pose information of the television screen, so that the transformed video image matches the tilt angle of the television screen, and the edges of the video image align with the contour edges of the television screen. Visually, the video content appears to be the image being played by the tilted television itself, enhancing the visual integration and realism between the video content and the television display screen.
[0100] Based on the above embodiments, the data processing method provided in this application achieves a visual fusion effect where the video content is displayed as the target object itself in the wallpaper by matching the video content with the outline of the target object in the wallpaper. Figure 7 This is a schematic flowchart illustrating a data processing method provided in an embodiment of this application, as shown below. Figure 7 As shown, an optional specific implementation flow of the data processing method provided in this application embodiment includes:
[0101] S701, Obtain control command.
[0102] In this embodiment, the control command indicates a control command to display the target video window in the target display area, wherein the target display area corresponds to the display area enclosed by the outline of the target object in the wallpaper layer. Optionally, the control command is triggered by a toggle command (sent by the first video application in response to the toggle button being selected) and / or a drag command (triggered by a drag operation on the target video window).
[0103] It should be noted that, in response to the drag command, an indicator mark of the target display area is displayed. This indicator mark is drawn along the outline edge of the target object and is used to indicate the position and outline of the target display area.
[0104] S702, Obtain the area information of the target display area.
[0105] In this embodiment, the region information includes the outline information of the display device in the wallpaper extracted from the wallpaper information, and / or the outline information of the display device on the wallpaper layer obtained by the agent through the image recognition model.
[0106] S703, Create the output surface.
[0107] In this embodiment, an output surface corresponding to the target display area is created. This output surface is used to carry video frame data to draw the display content.
[0108] S704, Configuration: The display layer hierarchy of the target video window and the option to not receive scroll events.
[0109] In this embodiment, the display layer of the target video window is configured such that the display layer of the target video window is located above the wallpaper layer and below the desktop application layer.
[0110] In this embodiment, the target video window is configured not to receive swipe events, so that after display, in response to a swipe operation on the target display area, the display content of the target video window does not respond, and in response to a page switching operation on the desktop launcher, the display position of the target video window relative to the electronic device remains unchanged.
[0111] S705, Match the displayed content.
[0112] In this embodiment, the display content of the target video window is matched with the target display area to serve as the display content of the target object's display area. Optionally, the matching includes position adaptation, size adaptation, and pose matching.
[0113] S706, rendering and display.
[0114] In this embodiment, the first video application outputs video frame data to the output surface. The layer compositer composites each layer in Z-axis order from bottom to top, according to the wallpaper layer, the display layer of the target video window, and the desktop application layer, and outputs the composited display frame to the screen, so that the video content is presented in the target display area.
[0115] The above describes a data processing method provided by an embodiment of this application. The following describes an apparatus for performing the above data processing method.
[0116] Figure 8This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 8 As shown, the data processing device 800 includes:
[0117] The instruction detection unit is used to obtain a control instruction that instructs the target video window to be displayed in a target display area, wherein the target display area corresponds to the display area enclosed by the outline of the target object in the wallpaper layer;
[0118] The instruction response unit is used to respond to the control instruction and control the display content of the target video window to match the target display area, so as to serve as the display content of the display area of the target object.
[0119] In one possible implementation, the instruction response unit is also used for:
[0120] Configure the display layer of the target video window so that the display layer of the target video window is located above the wallpaper layer and below the desktop application layer;
[0121] The content of the target video window is displayed in the target display area.
[0122] In one possible implementation, the instruction response unit is also used for:
[0123] An output surface corresponding to the target display area is created, the output surface being used to carry video frame data to draw the display content.
[0124] In one possible implementation, control commands are triggered by toggle commands and / or drag commands;
[0125] The switching instruction is sent by the first video application that generates the target video window in response to the selection operation of the switching button in the application interface, and the drag instruction is triggered by the drag operation of the target video window.
[0126] In one possible implementation, the instruction response unit is also used for:
[0127] In response to the drag command, an indicator mark for the target display area is displayed, the target display area being obtained by the agent recognizing the outline of the target object.
[0128] In one possible implementation, the instruction response unit is also used for:
[0129] After the target video window content is displayed in the target display area, the display content of the target video window becomes unresponsive in response to a sliding operation on the display area of the target object.
[0130] In one possible implementation, the instruction response unit is also used for:
[0131] After the content of the target video window is displayed in the target display area, the display position of the target video window relative to the electronic device remains unchanged in response to a page switching operation for the desktop launcher.
[0132] In one possible implementation, when the instruction response unit controls the display content of the target video window to match the target display area, it is specifically used for:
[0133] The display content of the target video window is geometrically transformed to adapt the display content of the target video window to the pose of the target display area.
[0134] In one possible implementation, the instruction response unit is also used for:
[0135] An intelligent agent is invoked to identify the outline of a display device on the wallpaper layer using an image recognition model, in order to locate the target display area, wherein the target object includes the display device.
[0136] This application also provides an electronic device, specifically, the electronic device includes a display and a processor.
[0137] In this embodiment, the display is used to show the wallpaper layer, the desktop application layer, and the target video window.
[0138] In this embodiment, the processor is configured to obtain a control instruction to display a target video window in a target display area, the target display area corresponding to the display area enclosed by the outline of a target object in the wallpaper layer; in response to the control instruction, the processor controls the display content of the target video window to match the target display area, so as to serve as the display content of the display area of the target object.
[0139] It should be noted that the processor is also used to execute various steps of a data processing method provided in the embodiments of this application, and the specific implementation is described in the above embodiments.
[0140] It should be further noted that the electronic device also includes a memory connected to the processor, wherein the memory is used to store a computer program, which is executed by the processor to implement a data processing method of any implementation. The electronic device in this application embodiment may include, but is not limited to, terminal devices such as smartphones, laptops, PDAs (personal digital assistants), and PADs (tablet computers).
[0141] Figure 9 A schematic diagram of a specific structure of an electronic device is shown, such as... Figure 9As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. When the electronic device is powered on, the RAM 903 also stores various programs and data required for the operation of the electronic device. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0142] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, displays, speakers, vibrators, etc.; storage devices 908 including, for example, memory cards, hard drives, etc.; and communication devices 909. Communication device 909 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0143] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the data processing methods provided in this application.
[0144] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the data processing methods provided in this application.
[0145] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0147] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0148] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A data processing method, applied to an operating system, comprising: A control instruction is obtained to display a target video window in a target display area, the target display area corresponding to the display area enclosed by the outline of the target object in the wallpaper layer; In response to the control command, the display content of the target video window is matched with the target display area to serve as the display content of the target object's display area.
2. The data processing method according to claim 1 further includes: Configure the display layer of the target video window so that the display layer of the target video window is located above the wallpaper layer and below the desktop application layer; The content of the target video window is displayed in the target display area.
3. The data processing method according to claim 1 further includes: An output surface corresponding to the target display area is created, the output surface being used to carry video frame data to draw the display content.
4. The data processing method according to claim 1, wherein the control command is triggered by a switching command and / or a drag-and-drop command; in, The switching command is sent by the first video application that generates the target video window in response to the selection operation of the switching button in the application interface, and the drag command is triggered by the drag operation of the target video window.
5. The data processing method according to claim 4 further includes: In response to the drag command, an indicator mark for the target display area is displayed, the target display area being obtained by the agent recognizing the outline of the target object.
6. The data processing method according to claim 1, after displaying the content of the target video window in the target display area, further comprising: In response to a sliding operation on the display area of the target object, the display content of the target video window does not respond.
7. The data processing method according to claim 1, after displaying the content of the target video window in the target display area, further comprising: In response to a page switching operation on the desktop launcher, the target video window remains in the same position relative to the electronic device.
8. The data processing method according to claim 1, controlling the display content of the target video window to match the target display area, includes: The display content of the target video window is geometrically transformed to adapt the display content of the target video window to the pose of the target display area.
9. The data processing method according to claim 1, further comprising: An intelligent agent is invoked to identify the outline of a display device on the wallpaper layer using an image recognition model, in order to locate the target display area, wherein the target object includes the display device.
10. An electronic device, comprising: A monitor used to display wallpaper layers, desktop application layers, and the target video window; The processor is configured to receive a control instruction to display a target video window in a target display area, the target display area corresponding to the display area enclosed by the outline of a target object in the wallpaper layer; In response to the control command, the display content of the target video window is matched with the target display area to serve as the display content of the target object's display area.
