A dual-screen watermark overlay method, apparatus, device, and medium
By obtaining the two-dimensional display coordinate map of the main and secondary screens and calculating the target top-covering watermark size, the problem of wasted resources in the dual-screen watermark display window is solved, achieving minimum complete coverage and improving display efficiency and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU AIRCRAFT INDUSTRY GROUP
- Filing Date
- 2022-09-09
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies for setting watermark display windows in dual-screen configurations can easily lead to wasted system resources and low display efficiency, and cannot adapt to different screen arrangement combinations, resulting in a poor user experience.
By obtaining the two-dimensional display coordinate map corresponding to the arrangement and combination of the main screen and the secondary screen, the first and second positional relationships are divided according to the relationship between the starting coordinate value of the secondary screen and the preset horizontal coordinate threshold, and the relationship between the first and second positions and the width of the main screen is determined. The size of the target top-covering watermark is calculated to achieve minimum complete coverage.
It greatly reduces memory usage, minimizes the impact on computer performance, improves monitor display efficiency, and enhances the adaptability of dual-screen monitor software to screen watermarks.
Smart Images

Figure CN116301684B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a dual-screen watermarking overlay method, apparatus, device, and medium. Background Technology
[0002] With the development and popularization of internet and computer technologies, computers and networks have become essential tools for work and business activities in all walks of life. While bringing convenience to people, the problem of leakage of confidential corporate information through taking photos, videos, screenshots, and screen recordings is becoming increasingly serious.
[0003] Enterprise or classified organizations' internal networks contain a large amount of sensitive information. Screen watermarking can effectively counter intentional or unintentional photo taking and screenshotting by internal network users, preventing data leakage. The simplest scenario is when the computer is connected to only one monitor. In this case, the watermark display window size can be configured to match the monitor's resolution, with an XY axis offset of 0. When the computer is connected to two monitors, the arrangement and resolution of the primary and secondary monitors will result in different distributions, and the coordinate values of the pixels on each monitor will also change.
[0004] Currently, the common method to solve the problem of minimum full coverage of dual screens is the "giant screen method," which does not consider screen resolution and number of screens, and directly sets the size and offset of the watermark display window to a large value. When the monitor configuration is low, the large watermark display window will occupy a lot of system resources, which can easily cause the monitor to be unsuitable and waste resources, seriously affecting the normal use of the user. Summary of the Invention
[0005] The main purpose of this application is to provide a dual-screen watermark overlay method, apparatus, device and medium, which aims to solve the problem that watermark display windows obtained by existing technologies are prone to causing waste of system resources.
[0006] To solve the above-mentioned technical problems, this application provides the following technical solution:
[0007] In a first aspect, embodiments of this application provide a dual-screen watermark overlay method, comprising the following steps:
[0008] Based on the arrangement of the main screen and the secondary screen, a two-dimensional display coordinate graph corresponding to the arrangement is obtained; wherein, the two-dimensional display coordinate graph includes the starting coordinate value and the ending coordinate value of the main screen and the secondary screen;
[0009] Based on the relationship between the horizontal axis coordinate value in the starting coordinate value of the secondary screen and the preset horizontal axis threshold, a first positional relationship or a second positional relationship is obtained.
[0010] Wherein, in the first positional relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is less than the preset horizontal coordinate threshold, and in the second positional relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is greater than or equal to the preset horizontal coordinate threshold;
[0011] Determine the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and the width of the main screen in the first positional relationship or the second positional relationship, so as to obtain a first or second determined positional relationship between the main screen and the secondary screen;
[0012] Wherein, in the first determined positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the width of the main screen, and in the second determined positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is greater than or equal to the width of the main screen;
[0013] Based on the first or second determined positional relationship, obtain the target top-mounted watermark of the main screen and the secondary screen.
[0014] Optionally, the main screen and the secondary screen have the first determined positional relationship; obtaining the target top-mounted overlay watermark of the main screen and the secondary screen according to the first determined positional relationship or the second determined positional relationship includes:
[0015] Based on the two-dimensional display coordinate map corresponding to the first determined positional relationship, obtain the first size of the target top-mounted watermark;
[0016] The first dimension includes a first width and a first height;
[0017] Based on the first size, obtain the target top-mounted overlay watermark.
[0018] Optionally, obtaining the first size of the target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the first determined positional relationship includes:
[0019] Obtain the total screen width corresponding to the first determined positional relationship;
[0020] If the total screen width is equal to the sum of the main screen width and the secondary screen width, then the first width is equal to the sum of the main screen width and the secondary screen width, and the first height is equal to the sum of the main screen height and the secondary screen height;
[0021] If the total screen width is greater than the secondary screen width, but less than the sum of the main screen width and the secondary screen width, then the first width is calculated based on the offset of the secondary screen in the horizontal direction, and the first height is equal to the sum of the main screen height and the secondary screen height.
[0022] Optionally, obtaining the target top-mounted watermark based on the first size includes:
[0023] Configure the size of the target top-mounted watermark according to the first width and the first height to obtain the target top-mounted watermark.
[0024] Optionally, the main screen and the secondary screen have the second determined positional relationship; obtaining the target top-mounted overlay watermark of the main screen and the secondary screen according to the first determined positional relationship or the second determined positional relationship includes:
[0025] Based on the two-dimensional display coordinate map corresponding to the second determined positional relationship, obtain the second size of the corresponding target top-mounted watermark; wherein, the second size includes a second width and a second height;
[0026] Based on the second size, obtain the target top-mounted overlay watermark.
[0027] Optionally, obtaining the second size of the target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the second determined positional relationship includes:
[0028] Obtain the total screen height corresponding to the second determined positional relationship;
[0029] If the total screen height is equal to the sum of the main screen height and the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is equal to the sum of the main screen height and the secondary screen height.
[0030] If the total screen height is equal to the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is equal to the secondary screen height;
[0031] If the total screen height is greater than the secondary screen height, but less than the sum of the main screen height and the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is calculated based on the offset of the secondary screen in the vertical direction.
[0032] Optionally, obtaining the target top-mounted overlay watermark based on the second size includes:
[0033] Configure the size of the target top-mounted watermark according to the second width and the second height to obtain the target top-mounted watermark.
[0034] Secondly, embodiments of this application provide a dual-screen watermark overlay device, comprising:
[0035] The acquisition module is used to acquire a two-dimensional display coordinate map corresponding to the arrangement of the main screen and the secondary screen; wherein, the two-dimensional display coordinate map includes the start coordinate value and the end coordinate value of the main screen and the secondary screen;
[0036] The first position determination module is used to obtain a first position relationship or a second position relationship based on the relationship between the horizontal axis coordinate value in the starting coordinate value of the sub-screen and a preset horizontal axis threshold; wherein, in the first position relationship, the horizontal axis coordinate value in the starting coordinate value of the sub-screen is less than the preset horizontal axis threshold, and in the second position relationship, the horizontal axis coordinate value in the starting coordinate value of the sub-screen is greater than or equal to the preset horizontal axis threshold;
[0037] The second position determination module is used to determine the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and the width of the main screen in the first position relationship or the second position relationship, so as to obtain a first determined position relationship or a second determined position relationship between the main screen and the secondary screen; wherein, in the first determined position relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the width of the main screen, and in the second determined position relationship, the horizontal axis coordinate value of the secondary screen is greater than or equal to the width of the main screen;
[0038] The watermark acquisition module is used to acquire the target top-mounted watermark of the main screen and the secondary screen based on the first determined positional relationship or the second determined positional relationship.
[0039] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor can execute the method of the first aspect by calling the program instructions.
[0040] Fourthly, embodiments of this application provide a storage medium storing a computer program, which is executed by a processor to perform the method of the first aspect.
[0041] This application divides the main screen and secondary screen into a first positional relationship or a second positional relationship based on their arrangement. Then, it determines the relationship between the horizontal axis coordinate value of the secondary screen's starting coordinates and the width of the main screen within the first or second positional relationship. This further divides the main screen and secondary screen into a first defined positional relationship or a second defined positional relationship. For each defined positional relationship, the size of the target top-covering watermark is calculated, thereby achieving minimum complete coverage of dual screens in screen watermarking application scenarios. This significantly reduces memory usage, minimizes the impact on computer performance, improves display efficiency, and enhances the adaptability of dual-screen display software to screen watermarking software. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of this application;
[0043] Figure 2 A flowchart illustrating a dual-screen watermark overlay method provided in an embodiment of this application;
[0044] Figure 3 This application provides a schematic diagram of two-dimensional display coordinates corresponding to a first determined positional relationship between the main screen and the secondary screen.
[0045] Figure 4 This application provides another two-dimensional display coordinate diagram of the main screen and the secondary screen corresponding to a first determined positional relationship.
[0046] Figure 5 This application provides another two-dimensional display coordinate diagram of the main screen and the secondary screen corresponding to a first determined positional relationship.
[0047] Figure 6 This application provides a schematic diagram of two-dimensional display coordinates corresponding to a second determined positional relationship between the main screen and the secondary screen.
[0048] Figure 7 This application provides another two-dimensional display coordinate diagram of the main screen and the secondary screen corresponding to a second determined positional relationship.
[0049] Figure 8 This application provides another two-dimensional display coordinate diagram of the main screen and the secondary screen corresponding to a second determined positional relationship.
[0050] Figure 9 This is a schematic diagram of a dual-screen watermark overlay device provided in an embodiment of this application. Detailed Implementation
[0051] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0052] The main solution of this application embodiment is: to propose a dual-screen watermarking overlay method, apparatus, device, and medium, which obtains a two-dimensional display coordinate map corresponding to the arrangement of the main screen and the sub-screen; wherein the two-dimensional display coordinate map includes the starting coordinate values and ending coordinate values of the main screen and the sub-screen; and obtains a first positional relationship or a second positional relationship based on the relationship between the horizontal axis coordinate value of the starting coordinate value of the sub-screen and a preset horizontal axis threshold; wherein, in the first positional relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is less than the preset horizontal axis threshold, and in the second positional relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is less than the preset horizontal axis threshold. The value is greater than or equal to the preset horizontal coordinate threshold; the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen in the first positional relationship or the second positional relationship and the width of the main screen is determined to obtain a first determined positional relationship or a second determined positional relationship between the main screen and the secondary screen; wherein, in the first determined positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the width of the main screen, and in the second determined positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is greater than or equal to the width of the main screen; based on the first determined positional relationship or the second determined positional relationship, the target top-mounted overlay watermark of the main screen and the secondary screen is obtained.
[0053] With the development and popularization of internet and computer technologies, computers and networks have become essential tools for work and business activities across all industries. While bringing convenience, the problem of leaks of confidential corporate information due to photography, videography, screenshots, and screen recordings is becoming increasingly serious. Enterprise or classified unit intranets contain a large amount of sensitive information, and screen watermarking can effectively counter the intentional or unintentional photography and screenshotting behaviors of intranet users, preventing data leaks.
[0054] The common method for implementing screen watermarking is to draw a transparent window that covers the computer screen and remains on top. In practice, the width and height of the watermark display window, as well as the XY coordinate offset, need to be configured. The simplest scenario is when the computer is connected to only one monitor; in this case, the watermark display window size can be configured to match the monitor's resolution, and the XY coordinate offset can be 0. However, when the computer is connected to two monitors, for operating systems like Windows, the origin of the screen coordinate system is the top-left corner of the primary monitor. Therefore, when the primary and secondary monitors are positioned differently, the coordinate values of the pixels on each monitor will change. Thus, the arrangement and resolution of the primary and secondary monitors will lead to different distributions, and the coordinate values of the pixels on each monitor will also change. In this case, the above method fails, and the minimum complete coverage problem for dual screens needs to be considered.
[0055] Currently, the common method to solve the problem of minimum complete coverage on dual screens is the "giant screen method." This method disregards screen resolution and the number of screens, directly setting the watermark display window size and offset to a large value, such as configuring the watermark display window size to 10000*10000, with an X offset of -4000 and a Y offset of -3000, thus forming a "giant screen" covering the computer screen. This method has limitations. Regardless of the number of monitors connected to the computer, the watermark display window size remains the same, resulting in extremely low display efficiency and wasted resources. For low-configuration computers, rendering a 10000*10000 watermark display window requires significant system resources, causing system lag or even crashes, severely impacting normal user experience. Furthermore, there are special arrangement scenarios where the offset is greater than 4000 or 3000, which can lead to incomplete watermark coverage.
[0056] To address this, this application provides a solution by obtaining a two-dimensional display coordinate graph corresponding to the arrangement of the main screen and the secondary screen; wherein the two-dimensional display coordinate graph includes the starting coordinate values and ending coordinate values of the main screen and the secondary screen; based on the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and a preset horizontal axis threshold, a first positional relationship or a second positional relationship is obtained; wherein, in the first positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the preset horizontal axis threshold, and in the second positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is greater than or equal to the preset horizontal axis threshold; and the first positional relationship or... The second positional relationship is determined by the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and the width of the main screen, to obtain a first or second determined positional relationship between the main screen and the secondary screen. In the first determined positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the width of the main screen, and in the second determined positional relationship, the horizontal axis coordinate value of the secondary screen is greater than or equal to the width of the main screen. Based on the first or second determined positional relationship, a target top-mounted watermark is obtained for the main screen and the secondary screen, solving the problem that watermark display windows obtained through existing technologies easily lead to system resource waste.
[0057] See attached document Figure 1 , attached Figure 1This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of this application. The electronic device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. The communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 104 may also include a standard wired interface or a wireless interface. The network interface 103 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 105 may be a storage device independent of the aforementioned processor 101. The memory 105 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as at least one disk storage device. The processor 101 may be a general-purpose processor, including a central processing unit, a network processor, etc., or it may be a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component.
[0058] Those skilled in the art will understand that the appendix Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0059] As attached Figure 1 As shown, the memory 105, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a dual-screen watermark overlay device.
[0060] In the appendix Figure 1 In the electronic device shown, the network interface 103 is mainly used for data communication with the network server; the user interface 104 is mainly used for data interaction with the user; the processor 101 and the memory 105 in the electronic device of this application can be set in the electronic device. The electronic device calls the dual-screen watermark overlay device stored in the memory 105 through the processor 101 and executes the dual-screen watermark overlay method provided in the embodiment of this application.
[0061] See attached document Figure 2 , attached Figure 2 A flowchart illustrating a dual-screen watermark overlay method provided in this application embodiment includes the following steps:
[0062] Step 201: Based on the arrangement of the main screen and the secondary screen, obtain the two-dimensional display coordinate map corresponding to the arrangement; wherein, the two-dimensional display coordinate map includes the starting coordinate value and the ending coordinate value of the main screen and the secondary screen.
[0063] In the specific implementation process, the different arrangement order and resolution of the main screen and the secondary screen result in different arrangement methods for the main screen and the secondary screen. The arrangement methods of the main screen and the secondary screen can be drawn using a Vue page. The Vue page is the source code of the page in the front-end development framework Vue, which contains the backend API interface called by the Vue page through axios. The two-dimensional display coordinate graph is a precise representation of the main screen and the secondary screen in a two-dimensional display coordinate system, including the coordinate values of the main screen and the secondary screen.
[0064] Step 202: Based on the relationship between the horizontal axis coordinate value in the starting coordinate value of the sub-screen and the preset horizontal coordinate threshold, obtain the first positional relationship or the second positional relationship;
[0065] Wherein, in the first positional relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is less than the preset horizontal coordinate threshold, and in the second positional relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is greater than or equal to the preset horizontal coordinate threshold.
[0066] In the specific implementation process, the preset horizontal coordinate threshold is 0. Based on whether the horizontal coordinate value in the initial coordinate value of the secondary screen is positive, the two-dimensional display coordinate graph is divided into a first positional relationship or a second positional relationship. The first positional relationship is where the horizontal coordinate value in the initial coordinate value of the secondary screen is less than 0, denoted as the left part; the second positional relationship is where the horizontal coordinate value in the initial coordinate value of the secondary screen is greater than or equal to 0, denoted as the right part. The coordinate values of the left and right parts are symmetrical about the origin.
[0067] Step 203: Determine the relationship between the horizontal axis coordinate value of the starting coordinate value of the sub-screen and the width of the main screen in the first positional relationship or the second positional relationship, so as to obtain the first or second determined positional relationship between the main screen and the sub-screen.
[0068] In the specific implementation process, based on the relationship between the horizontal axis coordinate value in the starting coordinate value of the secondary screen and the width of the primary screen, the primary screen and secondary screen corresponding to the first positional relationship or the second positional relationship are further divided into a first determined positional relationship or a second determined positional relationship.
[0069] In the first confirmed positional relationship, if the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the width of the main screen, it is called a vertical split screen; in the second confirmed positional relationship, if the horizontal axis coordinate value of the starting coordinate value of the secondary screen is greater than or equal to the width of the main screen, it is called a strict horizontal split screen.
[0070] Step 204: Based on the first determined positional relationship or the second determined positional relationship, obtain the target top-mounted overlay watermark of the main screen and the secondary screen.
[0071] In the specific implementation process, depending on whether the main screen and the secondary screen have a first or second determined positional relationship, the corresponding size is selected to design the target top-mounted overlay watermark; the target top-mounted overlay watermark is the minimum complete overlay watermark for both the main screen and the secondary screen.
[0072] This application embodiment divides the main screen and the secondary screen into a first positional relationship or a second positional relationship based on their arrangement. Then, it determines the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and the width of the main screen in the first or second positional relationship, further dividing the main screen and the secondary screen into a first determined positional relationship or a second determined positional relationship. For the first or second determined positional relationship, it calculates the size of the target top-covering watermark, thereby achieving minimum complete coverage of dual screens in screen watermarking application scenarios. This greatly reduces memory usage, lowers the impact on computer performance, improves display efficiency, and enhances the adaptability of dual-screen display software to screen watermarking software.
[0073] In one optional implementation, the main screen and the secondary screen have the first determined positional relationship; obtaining the target top-mounted watermark covering the main screen and the secondary screen according to the first determined positional relationship or the second determined positional relationship includes:
[0074] Based on the two-dimensional display coordinate map corresponding to the first determined positional relationship, obtain the first size of the target top-mounted watermark;
[0075] The first dimension includes a first width and a first height;
[0076] Based on the first size, obtain the target top-mounted overlay watermark.
[0077] The step of obtaining the first size of the target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the first determined positional relationship includes:
[0078] Obtain the total screen width corresponding to the first determined positional relationship;
[0079] If the total screen width is equal to the sum of the main screen width and the secondary screen width, then the first width is equal to the sum of the main screen width and the secondary screen width, and the first height is equal to the sum of the main screen height and the secondary screen height;
[0080] If the total screen width is greater than the secondary screen width, but less than the sum of the main screen width and the secondary screen width, then the first width is calculated based on the offset of the secondary screen in the horizontal direction, and the first height is equal to the sum of the main screen height and the secondary screen height.
[0081] The step of obtaining the target top-mounted watermark based on the first size includes:
[0082] Configure the size of the target top-mounted watermark according to the first width and the first height to obtain the target top-mounted watermark.
[0083] In this embodiment, the main screen and the secondary screen have a first defined positional relationship, that is, the main screen and the secondary screen are split vertically. In this case, the size of the target watermark covering the top includes the following three cases:
[0084] (1) First case: Refer to the appendix Figure 3 , attached Figure 3 A two-dimensional display coordinate diagram showing the primary screen and secondary screen in a first determined positional relationship, as provided in the embodiments of this application, is attached. Figure 3 As shown, the total screen width corresponding to the split screen is equal to the sum of the width of the main screen and the width of the secondary screen. At this time, the first width is equal to the sum of the width of the main screen and the width of the secondary screen, and the first height is equal to the sum of the height of the main screen and the height of the secondary screen.
[0085] (2) Second case: Refer to the appendix Figure 4 , attached Figure 4 Another two-dimensional display coordinate diagram showing the first determined positional relationship between the main screen and the secondary screen provided in this application embodiment is shown in the attached diagram. Figure 4 As shown, the total screen width corresponding to the top and bottom split screens is equal to the width of the secondary screen. At this time, the first width is equal to the width of the secondary screen, and the first height is equal to the sum of the height of the main screen and the height of the secondary screen.
[0086] (3) The third case: refer to the appendix Figure 5 , attached Figure 5 Another two-dimensional display coordinate diagram showing the first determined positional relationship between the main screen and the secondary screen provided in this application embodiment is shown in the attached diagram. Figure 5 As shown, the total screen width corresponding to the top and bottom split screens is greater than the width of the secondary screen, but less than the sum of the widths of the main screen and the secondary screen. In this case, the first width is calculated based on the offset of the secondary screen in the horizontal direction, and the first height is equal to the sum of the heights of the main screen and the secondary screen.
[0087] Configure the size of the target top-mounted watermark based on the first width and the first height to obtain the target top-mounted watermark when splitting the screen vertically.
[0088] In this embodiment, when the main screen and the secondary screen are in a first determined positional relationship, the first height of the target top-covering watermark is fixed, and the first height is equal to the sum of the height of the main screen and the height of the secondary screen. The first width is calculated according to the corresponding values of the above three cases to obtain the minimum complete coverage watermark of the dual screens when the main screen and the secondary screen are in a first determined positional relationship. This greatly reduces the memory occupation, reduces the impact on computer performance, improves the display efficiency of the monitor, and enhances the adaptability of the dual-screen display software to the screen watermarking software.
[0089] In one optional implementation, the main screen and the secondary screen have the second determined positional relationship; obtaining the target top-mounted overlay watermark of the main screen and the secondary screen according to the first determined positional relationship or the second determined positional relationship includes:
[0090] Based on the two-dimensional display coordinate map corresponding to the second determined positional relationship, obtain the second size of the corresponding target top-mounted watermark; wherein, the second size includes a second width and a second height;
[0091] Based on the second size, obtain the target top-mounted overlay watermark.
[0092] The step of obtaining the second size of the target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the second determined positional relationship includes:
[0093] Obtain the total screen height corresponding to the second determined positional relationship;
[0094] If the total screen height is equal to the sum of the main screen height and the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is equal to the sum of the main screen height and the secondary screen height.
[0095] If the total screen height is equal to the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is equal to the secondary screen height;
[0096] If the total screen height is greater than the secondary screen height, but less than the sum of the main screen height and the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is calculated based on the offset of the secondary screen in the vertical direction.
[0097] The step of obtaining the target top-mounted watermark based on the second size includes:
[0098] Configure the size of the target top-mounted watermark according to the second width and the second height to obtain the target top-mounted watermark.
[0099] In this embodiment, the main screen and the secondary screen have a second defined positional relationship, that is, the main screen and the secondary screen are strictly split vertically. In this case, the size of the target top-mounted watermark includes the following three cases:
[0100] (1) First case: Refer to the appendix Figure 6 , attached Figure 6 A two-dimensional display coordinate diagram showing a second determined positional relationship between the main screen and the secondary screen, as provided in this application embodiment, is attached. Figure 6 As shown, the total screen height corresponding to a strict split-screen layout is equal to the sum of the height of the main screen and the height of the secondary screen. At this time, the second width is equal to the sum of the width of the main screen and the width of the secondary screen, and the second height is equal to the sum of the height of the main screen and the height of the secondary screen.
[0101] (2) Second case: Refer to the appendix Figure 7 , attached Figure 7 A two-dimensional display coordinate diagram illustrating another primary screen and secondary screen with a second defined positional relationship, provided in an embodiment of this application, is attached. Figure 7 As shown, the total screen height corresponding to a strict top-to-bottom split screen is equal to the height of the secondary screen. This second width is equal to the sum of the width of the main screen and the width of the secondary screen, and the second height is equal to the height of the secondary screen.
[0102] (3) The third case: refer to the appendix Figure 8 , attached Figure 8 A two-dimensional display coordinate diagram illustrating another primary screen and secondary screen with a second defined positional relationship, provided in an embodiment of this application, is attached. Figure 8 As shown, the total screen height corresponding to the strict top and bottom split screen is greater than the height of the secondary screen, but less than the sum of the height of the main screen and the height of the secondary screen. In this case, the second width is equal to the sum of the width of the main screen and the width of the secondary screen. The second height is calculated based on the offset of the secondary screen in the vertical direction.
[0103] In this embodiment, when the main screen and the secondary screen are in a second determined positional relationship, the second width of the target top-covering watermark is fixed, and the second width is equal to the sum of the width of the main screen and the width of the secondary screen. The second height is calculated according to the corresponding values of the above three cases to obtain the minimum complete coverage watermark of the dual screens when the main screen and the secondary screen are in a second determined positional relationship. This greatly reduces the memory occupation, reduces the impact on computer performance, improves the display efficiency of the monitor, and enhances the adaptability of the dual-screen display software to the screen watermarking software.
[0104] See attached document Figure 9 The attached figure is a schematic diagram of the dual-screen watermark overlay device 300 provided in an embodiment of this application. This device can be a module, program segment, or code on an electronic device. It should be understood that this device is related to the aforementioned attached figure. Figure 2 Corresponding to the method implementation examples, it is capable of executing the attached... Figure 2 The various steps involved in the method embodiments, and the specific functions of the device, can be found in the description above. To avoid repetition, detailed descriptions are appropriately omitted here. (See attached...) Figure 9 As shown, the device includes: an acquisition module 301, a first position determination module 302, a second position determination module 303, and a watermark acquisition module 304; wherein:
[0105] The acquisition module 301 is used to acquire a two-dimensional display coordinate map corresponding to the arrangement of the main screen and the sub-screen; wherein, the two-dimensional display coordinate map includes the start coordinate value and the end coordinate value of the main screen and the sub-screen;
[0106] The first position determination module 302 is used to obtain a first position relationship or a second position relationship based on the relationship between the horizontal axis coordinate value in the starting coordinate value of the sub-screen and a preset horizontal axis threshold; wherein, in the first position relationship, the horizontal axis coordinate value in the starting coordinate value of the sub-screen is less than the preset horizontal axis threshold, and in the second position relationship, the horizontal axis coordinate value in the starting coordinate value of the sub-screen is greater than or equal to the preset horizontal axis threshold;
[0107] The second position determination module 303 is used to determine the relationship between the horizontal axis coordinate value of the starting coordinate value of the sub-screen and the width of the main screen in the first position relationship or the second position relationship, so as to obtain a first determined position relationship or a second determined position relationship between the main screen and the sub-screen; wherein, in the first determined position relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is less than the width of the main screen, and in the second determined position relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is greater than or equal to the width of the main screen;
[0108] The watermark acquisition module 304 is used to acquire the target top-mounted overlay watermark of the main screen and the sub-screen based on the first determined positional relationship or the second determined positional relationship.
[0109] As an optional implementation, the watermark acquisition module 304 is specifically used for:
[0110] Based on the two-dimensional display coordinate map corresponding to the first determined positional relationship, obtain the first size of the target top-mounted watermark;
[0111] The first dimension includes a first width and a first height;
[0112] Based on the first size, obtain the target top-mounted overlay watermark.
[0113] As an optional implementation, the watermark acquisition module 304 is specifically used for:
[0114] Obtain the total screen width corresponding to the first determined positional relationship;
[0115] If the total screen width is equal to the sum of the main screen width and the secondary screen width, then the first width is equal to the sum of the main screen width and the secondary screen width, and the first height is equal to the sum of the main screen height and the secondary screen height;
[0116] If the total screen width is equal to the secondary screen width, then the first width is equal to the secondary screen width, and the first height is equal to the sum of the main screen height and the secondary screen height;
[0117] If the total screen width is greater than the secondary screen width, but less than the sum of the main screen width and the secondary screen width, then the first width is calculated based on the offset of the secondary screen in the horizontal direction, and the first height is equal to the sum of the main screen height and the secondary screen height.
[0118] As an optional implementation, the watermark acquisition module 304 is specifically used for:
[0119] Configure the size of the target top-mounted watermark according to the first width and the first height to obtain the target top-mounted watermark.
[0120] As an optional implementation, the watermark acquisition module 304 is specifically used for:
[0121] The main screen and the secondary screen have the second determined positional relationship; obtaining the target top-mounted overlay watermark of the main screen and the secondary screen according to the first determined positional relationship or the second determined positional relationship includes:
[0122] Based on the two-dimensional display coordinate map corresponding to the second determined positional relationship, obtain the second size of the corresponding target top-mounted watermark; wherein, the second size includes a second width and a second height;
[0123] Based on the second size, obtain the target top-mounted overlay watermark.
[0124] As an optional implementation, the watermark acquisition module 304 is specifically used for:
[0125] The step of obtaining the second size of the target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the second determined positional relationship includes:
[0126] Obtain the total screen height corresponding to the second determined positional relationship;
[0127] If the total screen height is equal to the sum of the main screen height and the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is equal to the sum of the main screen height and the secondary screen height.
[0128] If the total screen height is equal to the height of the secondary screen, then the second width is equal to the sum of the width of the main screen and the width of the secondary screen, and the second height is equal to the height of the secondary screen;
[0129] If the total screen height is greater than the secondary screen height, but less than the sum of the main screen height and the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is calculated based on the offset of the secondary screen in the vertical direction.
[0130] As an optional implementation, the watermark acquisition module 304 is specifically used for:
[0131] The step of obtaining the target top-mounted watermark based on the second size includes:
[0132] Configure the size of the target top-mounted watermark according to the second width and the second height to obtain the target top-mounted watermark.
[0133] In summary, this application divides the main screen and secondary screen into a first positional relationship or a second positional relationship based on their arrangement. Then, it determines the relationship between the horizontal axis coordinate value of the secondary screen's starting coordinates and the width of the main screen within the first or second positional relationship. This further divides the main screen and secondary screen into a first defined positional relationship or a second defined positional relationship. For each defined positional relationship, the size of the target top-covering watermark is calculated, thereby achieving minimum complete coverage of dual screens in screen watermarking application scenarios. This significantly reduces memory usage, minimizes the impact on computer performance, improves display efficiency, and enhances the adaptability of dual-screen display software to screen watermarking software.
[0134] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the methods provided in the above-described method embodiments, such as: obtaining a two-dimensional display coordinate map corresponding to the arrangement of the main screen and the secondary screen; wherein the two-dimensional display coordinate map includes the starting coordinate values and ending coordinate values of the main screen and the secondary screen; obtaining a first positional relationship or a second positional relationship based on the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and a preset horizontal axis threshold; wherein, in the first positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the... A preset horizontal coordinate threshold is set, wherein the horizontal coordinate value of the starting coordinate value of the secondary screen in the second positional relationship is greater than or equal to the preset horizontal coordinate threshold; the relationship between the horizontal coordinate value of the starting coordinate value of the secondary screen in the first positional relationship or the second positional relationship and the width of the main screen is determined to obtain a first or second determined positional relationship between the main screen and the secondary screen; wherein, the horizontal coordinate value of the starting coordinate value of the secondary screen in the first determined positional relationship is less than the width of the main screen, and the horizontal coordinate value of the starting coordinate value of the secondary screen in the second determined positional relationship is greater than or equal to the width of the main screen; based on the first or second determined positional relationship, a target top-mounted watermark is obtained for the main screen and the secondary screen.
[0135] This embodiment provides a storage medium storing computer instructions that cause a computer to execute the methods provided in the above-described method embodiments. For example, the methods include: obtaining a two-dimensional display coordinate map corresponding to the arrangement of a main screen and a secondary screen; wherein the two-dimensional display coordinate map includes the starting coordinate values and ending coordinate values of the main screen and the secondary screen; obtaining a first positional relationship or a second positional relationship based on the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and a preset horizontal axis threshold; wherein, in the first positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the preset horizontal axis threshold, and in the second positional relationship, the horizontal axis coordinate value of the secondary screen is less than the preset horizontal axis threshold. The horizontal axis coordinate value in the starting coordinate value is greater than or equal to the preset horizontal coordinate threshold; the relationship between the horizontal axis coordinate value in the starting coordinate value of the secondary screen and the width of the main screen is determined in the first positional relationship or the second positional relationship to obtain a first determined positional relationship or a second determined positional relationship between the main screen and the secondary screen; wherein, in the first determined positional relationship, the horizontal axis coordinate value in the starting coordinate value of the secondary screen is less than the width of the main screen, and in the second determined positional relationship, the horizontal axis coordinate value in the starting coordinate value of the secondary screen is greater than or equal to the width of the main screen; based on the first determined positional relationship or the second determined positional relationship, the target top-mounted watermark of the main screen and the secondary screen is obtained.
[0136] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0137] Furthermore, the units described as separate components may or may not be physically separate. 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0138] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0139] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0140] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A dual-screen watermarking overlay method, characterized by, include: Based on the arrangement of the main screen and the secondary screen, a two-dimensional display coordinate map corresponding to the arrangement is obtained; wherein, the two-dimensional display coordinate map includes the starting coordinate value and the ending coordinate value of the main screen and the secondary screen; Based on the relationship between the horizontal axis coordinate value in the starting coordinate value of the secondary screen and the preset horizontal axis threshold, a first positional relationship or a second positional relationship is obtained. Wherein, in the first positional relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is less than the preset horizontal coordinate threshold, and in the second positional relationship, the horizontal axis coordinate value of the starting coordinate value of the sub-screen is greater than or equal to the preset horizontal coordinate threshold; Determine the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and the width of the main screen in the first positional relationship or the second positional relationship, so as to obtain a first or second determined positional relationship between the main screen and the secondary screen; Wherein, in the first determined positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the width of the main screen, and in the second determined positional relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is greater than or equal to the width of the main screen; the main screen and the secondary screen are in the first determined positional relationship; Based on the first or second determined positional relationship, the target top-mounted watermark of the main screen and the secondary screen is obtained, including: obtaining a first size of the corresponding target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the first determined positional relationship; wherein the first size includes a first width and a first height; and obtaining the target top-mounted watermark based on the first size. The step of obtaining the first size of the target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the first determined positional relationship includes: obtaining the total screen width corresponding to the first determined positional relationship; if the total screen width is equal to the sum of the main screen width and the secondary screen width, then the first width is equal to the sum of the main screen width and the secondary screen width, and the first height is equal to the sum of the main screen height and the secondary screen height; if the total screen width is equal to the secondary screen width, then the first width is equal to the secondary screen width, and the first height is equal to the sum of the main screen height and the secondary screen height; if the total screen width is greater than the secondary screen width and less than the sum of the main screen width and the secondary screen width, then the first width is calculated based on the offset of the secondary screen in the horizontal direction, and the first height is equal to the sum of the main screen height and the secondary screen height.
2. The method according to claim 1, characterized in that, The step of obtaining the target top-mounted watermark based on the first size includes: Configure the size of the target top-mounted watermark according to the first width and the first height to obtain the target top-mounted watermark.
3. The method according to claim 1, characterized in that, The main screen and the secondary screen have the second determined positional relationship; obtaining the target top-mounted overlay watermark of the main screen and the secondary screen according to the first determined positional relationship or the second determined positional relationship includes: Based on the two-dimensional display coordinate map corresponding to the second determined positional relationship, obtain the second size of the corresponding target top-mounted watermark; wherein, the second size includes a second width and a second height; Based on the second size, obtain the target top-mounted overlay watermark.
4. The method according to claim 3, characterized in that, The step of obtaining the second size of the target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the second determined positional relationship includes: Obtain the total screen height corresponding to the second determined positional relationship; If the total screen height is equal to the sum of the main screen height and the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is equal to the sum of the main screen height and the secondary screen height. If the total screen height is equal to the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is equal to the secondary screen height; If the total screen height is greater than the secondary screen height, but less than the sum of the main screen height and the secondary screen height, then the second width is equal to the sum of the main screen width and the secondary screen width, and the second height is calculated based on the offset of the secondary screen in the vertical direction.
5. The method according to claim 3, characterized in that, The step of obtaining the target top-mounted watermark based on the second size includes: Configure the size of the target top-mounted watermark according to the second width and the second height to obtain the target top-mounted watermark.
6. A dual-screen watermark overlay device, characterized in that, include: The acquisition module is used to acquire a two-dimensional display coordinate map corresponding to the arrangement of the main screen and the secondary screen; wherein, the two-dimensional display coordinate map includes the start coordinate value and the end coordinate value of the main screen and the secondary screen; The first position determination module is used to obtain a first position relationship or a second position relationship based on the relationship between the horizontal axis coordinate value in the starting coordinate value of the sub-screen and a preset horizontal axis threshold; wherein, in the first position relationship, the horizontal axis coordinate value in the starting coordinate value of the sub-screen is less than the preset horizontal axis threshold, and in the second position relationship, the horizontal axis coordinate value in the starting coordinate value of the sub-screen is greater than or equal to the preset horizontal axis threshold; The second position determination module is used to determine the relationship between the horizontal axis coordinate value of the starting coordinate value of the secondary screen and the width of the main screen in the first position relationship or the second position relationship, so as to obtain a first determined position relationship or a second determined position relationship between the main screen and the secondary screen; wherein, in the first determined position relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is less than the width of the main screen, and in the second determined position relationship, the horizontal axis coordinate value of the starting coordinate value of the secondary screen is greater than or equal to the width of the main screen; the main screen and the secondary screen are in the first determined position relationship; A watermark acquisition module is used to acquire a target top-mounted watermark on the main screen and the secondary screen based on the first determined positional relationship or the second determined positional relationship, including: acquiring a first size of the corresponding target top-mounted watermark based on a two-dimensional display coordinate map corresponding to the first determined positional relationship; wherein the first size includes a first width and a first height; and acquiring the target top-mounted watermark based on the first size. The step of obtaining the first size of the target top-mounted watermark based on the two-dimensional display coordinate map corresponding to the first determined positional relationship includes: obtaining the total screen width corresponding to the first determined positional relationship; if the total screen width is equal to the sum of the main screen width and the secondary screen width, then the first width is equal to the sum of the main screen width and the secondary screen width, and the first height is equal to the sum of the main screen height and the secondary screen height; if the total screen width is equal to the secondary screen width, then the first width is equal to the secondary screen width, and the first height is equal to the sum of the main screen height and the secondary screen height; if the total screen width is greater than the secondary screen width and less than the sum of the main screen width and the secondary screen width, then the first width is calculated based on the offset of the secondary screen in the horizontal direction, and the first height is equal to the sum of the main screen height and the secondary screen height.
7. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when executed by the processor, perform the method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, performs the method as described in any one of claims 1 to 5.