WO2024012402A1 - 显示方法和电子设备 - Google Patents

显示方法和电子设备 Download PDF

Info

Publication number
WO2024012402A1
WO2024012402A1 PCT/CN2023/106545 CN2023106545W WO2024012402A1 WO 2024012402 A1 WO2024012402 A1 WO 2024012402A1 CN 2023106545 W CN2023106545 W CN 2023106545W WO 2024012402 A1 WO2024012402 A1 WO 2024012402A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
display area
target display
cursor
abscissa
Prior art date
Application number
PCT/CN2023/106545
Other languages
English (en)
French (fr)
Inventor
韩朝相
夏永霖
周宇
陶煜
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024012402A1 publication Critical patent/WO2024012402A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels

Definitions

  • the embodiments of the present application relate to the field of electronic technology, and more specifically, to a display method and an electronic device.
  • This application provides a display method and electronic device. This technical solution can improve the user's operating efficiency and user experience by limiting the cursor to the area where the display interface is located.
  • a display method is provided. The method is applied to a first electronic device.
  • the method includes: the first electronic device receives a control instruction from a second electronic device, and the control instruction includes position information of a cursor. ;
  • the first electronic device determines whether the first position of the cursor is within a target display area based on the position information, and the target display area is an area where the first electronic device actually displays content; after determining the When the first position is not within the target display area, the first electronic device corrects the first position to obtain a second position, and the second position is within the target display area;
  • the first electronic device displays the cursor at the second location.
  • the first electronic device may be a large-screen device such as a smart TV, a monitor, a projector, or a notebook computer
  • the second electronic device may be an input device such as a mobile phone, a mouse, an air mouse, a touch pad, etc.
  • the first electronic device can obtain the position information of the cursor from the received control instruction, and determine whether the cursor is in the target display area of the actual displayed content based on the position information. When the first position of the cursor is not in When the cursor is within the target display area, the first position of the cursor is corrected so that the corrected second position is located in the target display area.
  • This technical solution can keep the cursor in the area where the content is actually displayed when the user controls the first electronic device through the second electronic device, thereby improving the user's operating efficiency and user experience.
  • the method further includes: when determining that the first position is within the target display area, the first electronic device The cursor is displayed at the position.
  • the cursor when the first position is within the target display area where the content is actually displayed, the cursor can be directly displayed at the first position. This can improve the user's operating efficiency.
  • the method further includes : The first electronic device acquires the target display area.
  • the first electronic device needs to first determine which areas in the display screen belong to the target display area, so as to facilitate subsequent judgment of the position of the cursor.
  • the first electronic device obtains the target display area, including: the first electronic device obtains the target display area through a system interface.
  • the first electronic device can directly obtain the target display area through the system interface, thereby making the solution simple and easy to implement.
  • the first electronic device obtaining the target display area includes: the first electronic device taking a screenshot of the display screen of the first electronic device. , obtain the first picture of the display screen; the third An electronic device determines the target display area from the first screen.
  • the first electronic device may not be able to obtain the target display area directly from the system interface. In this case, the first electronic device can obtain the screen image and determine the target display area based on the image.
  • the first electronic device needs to first determine which areas in the display screen belong to the target display area, so as to facilitate subsequent judgment of the position of the cursor.
  • the first electronic device determines the target display area from the first screen, including: the first electronic device determines the target display area from the first screen n pixels are extracted from each row of pixels in the first picture, and m pixels are extracted from each column of pixels in the first picture; the first electronic device sums the brightness values of the n pixels to obtain the A brightness value s1 and summing the brightness values of the m pixels to obtain a second brightness value s2; when the first electronic device determines the first brightness value s1q>(n*b)+ ⁇ of the qth row , determine that some pixels in the q-th row belong to the target display area, and when the first electronic device determines that the second brightness value s2p>(m*b)+ ⁇ of the p-th column, determines that the p-th Some pixels in the column belong to the target display area, where b represents the brightness value of the pixel being black, ⁇ is the preset error value, and q and p
  • Each row and each column of pixels included in the first picture can be judged, and each boundary of the target display area can be determined based on the judgment results, so that the target display area can be determined.
  • the first electronic device determines whether the first position of the cursor is within the target display area according to the position information, including: the first electronic device The device determines whether the first position is within the target display area based on the coordinates of the first position and the vertex coordinates of the target display area.
  • Whether the cursor's position is within the target display area can be determined based on the coordinates of the cursor's position and the vertex coordinates of the target display area, which is helpful for the first electronic device to further determine whether to correct the cursor position.
  • the first electronic device when it is determined that the first position is not within the target display area, the first electronic device corrects the first position. , get the second position, including:
  • the abscissa of the first position is less than the abscissa of the straight line where the first boundary of the target display area is located, then the abscissa of the first position is corrected to the abscissa of the straight line where the first boundary is located, as the The abscissa of the second position;
  • the abscissa of the first position is greater than the abscissa of the straight line where the second boundary of the target display area is parallel to the first boundary, then the abscissa of the first position is corrected to the second boundary.
  • the abscissa of the straight line is used as the abscissa of the second position;
  • the ordinate of the first position is smaller than the ordinate of the straight line where the third boundary of the target display area is located, then the ordinate of the first position is corrected to the ordinate of the straight line where the third boundary is located, as the the ordinate of the second position; or,
  • the ordinate of the first position is greater than the ordinate of the straight line of the fourth border of the target display area that is parallel to the third border, then the ordinate of the first position is corrected to the fourth border.
  • the ordinate of the straight line is used as the ordinate of the second position.
  • the position of the cursor located outside the target display area can be corrected to be located within the target display area, so that the cursor can be moved within the target display area, thereby improving the user's operating efficiency.
  • the method before the first electronic device receives the control instruction of the second electronic device, the method further includes: the first electronic device and the second electronic device. Electronic devices establish connection relationships.
  • control instruction is input by the user in an application program in the second electronic device.
  • a display device including: a receiving module, configured to receive a control instruction, where the control instruction includes position information of a cursor; and a processing module, configured to determine a first position of the cursor based on the position information. Whether it is within the target display area, the target display area is the area where the display device actually displays content; the processing module is also configured to determine that the first position is not within the target display area, The first position is corrected to obtain a second position, and the second position is located within the target display area; a display module is used to display the cursor at the second position.
  • the display module when the processing module determines that the first position is within the target display area, the display module is further configured to: The cursor is displayed at the position.
  • the processing module before the processing module determines whether the first position of the cursor is within the target display area according to the position information, the processing module is further configured to: : Get the target display area.
  • the processing module is specifically configured to obtain the target display area through a system interface.
  • the processing module is specifically configured to: display on the display device Screen capture processing is performed on the screen to obtain a first picture of the display screen; and the target display area is determined from the first picture.
  • the processing module is specifically configured to: extract n pixel points from each row of pixels in the first picture, and extract n pixel points from each row of pixels in the first picture. Extract m pixels from each column of pixels; sum the brightness values of the n pixels to obtain the first brightness value s1 and sum the brightness values of the m pixels to obtain the second brightness value s2; when determined When the first brightness value of the qth row is s1q>(n*b)+ ⁇ , it is determined that some pixels in the qth row belong to the target display area.
  • the second brightness value of the pth column is s2p>(m *b) + ⁇
  • the processing unit is specifically configured to: determine whether the first position is in the target according to the coordinates of the first position and the vertex coordinates of the target display area. within the display area.
  • the processing unit is specifically used to:
  • the abscissa of the first position is less than the abscissa of the straight line where the first boundary of the target display area is located, then the abscissa of the first position is corrected to the abscissa of the straight line where the first boundary is located, as the The abscissa of the second position;
  • the abscissa of the first position is greater than the abscissa of the straight line where the second boundary of the target display area is parallel to the first boundary, then the abscissa of the first position is corrected to the second boundary.
  • the abscissa of the straight line is used as the abscissa of the second position;
  • the ordinate of the first position is smaller than the ordinate of the straight line where the third boundary of the target display area is located, then the ordinate of the first position is corrected to the ordinate of the straight line where the third boundary is located, as the the ordinate of the second position; or,
  • the ordinate of the first position is greater than the ordinate of the straight line of the fourth border of the target display area that is parallel to the third border, then the ordinate of the first position is corrected to the fourth border.
  • the ordinate of the straight line is used as the ordinate of the second position.
  • the processing module is further configured to: establish a connection relationship with the second electronic device.
  • an electronic device including one or more processors; one or more memories; the one or more memories store one or more computer programs, and the one or more computer programs include Instructions, when executed by one or more processors, cause the display method in the above first aspect and any possible implementation thereof to be executed.
  • a chip in a fourth aspect, includes a processor and a communication interface.
  • the communication interface is used to receive signals and transmit the signals to the processor.
  • the processor processes the signals.
  • the display method in the above first aspect and any possible implementation manner thereof is executed.
  • a computer-readable storage medium is provided.
  • Computer instructions are stored in the computer-readable storage medium.
  • the computer instructions are run on an electronic device, the above-mentioned first aspect and any one thereof are achieved.
  • the display method in the possible implementation is executed.
  • a computer program product includes computer program code.
  • the computer program product includes computer program code.
  • Figure 1 is a scene diagram of an electronic device displaying a vertical screen application provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of a screen projection provided by an embodiment of the present application.
  • FIG. 3 is a schematic system framework diagram of the display method provided by the embodiment of the present application.
  • FIG. 4 is a schematic system framework diagram of the display method provided by the embodiment of the present application.
  • Figure 5 is a schematic diagram of determining a display area provided by an embodiment of the present application.
  • FIG. 6 is another schematic diagram for determining a display area provided by an embodiment of the present application.
  • Figure 7 is a schematic flow chart of a display method provided by an embodiment of the present application.
  • FIG. 8 is a schematic frame diagram of a display device provided by an embodiment of the present application.
  • FIG. 9 is a schematic frame diagram of an electronic device provided by an embodiment of the present application.
  • the display method in the embodiment of the present application can be applied to large-screen display devices such as smart TVs, smart screens, monitors, and projectors. It can also be applied to electronic devices such as tablet computers, notebook computers, personal computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (personal digital assistants, PDA) vehicle-mounted equipment, etc.
  • UMPC ultra-mobile personal computers
  • PDA personal digital assistants
  • the embodiments of the present application There are no restrictions on the specific type of electronic equipment.
  • FIG 1 is a scene diagram of an electronic device displaying a vertical screen application provided by an embodiment of the present application.
  • the electronic device 100a may be a large-screen device such as a smart TV, a monitor, or a notebook computer.
  • the electronic device 100b may be a smartphone, a mouse, a touch pad, an air mouse, or other devices capable of completing input operations.
  • the electronic device 100b is a mobile phone and the electronic device 100a is a smart TV as an example for description.
  • the display interface of the application may be displayed on the smart TV in a vertical screen format. phenomenon in the middle region.
  • the display interface 120 of the application is located in the middle area of the display screen of the smart TV, while other areas of the display screen of the smart TV do not display images, such as In the area 110a and the display area 110b, when the mobile phone and the smart TV establish a connection relationship, the user can use the mobile phone 100b to control the cursor 121 and thereby control the smart TV.
  • the cursor 121 will move throughout the entire display screen of the smart TV, making the user's operation efficiency low and affecting the user's experience.
  • the embodiments of the present application do not limit the manner in which a mobile phone and a smart TV establish a connection relationship.
  • the mobile phone can be connected to the smart TV through the docking station, or the mobile phone can be connected to the smart TV through wireless local area networks (WLAN), Bluetooth, ultra wide band (UWB), wired and other connection methods. connect.
  • WLAN wireless local area networks
  • UWB ultra wide band
  • the screen content in the mobile phone can be displayed on the screen of the smart TV, and the situation shown in Figure 1 may also occur.
  • the display interface 120 of the mobile phone can be located in the middle area of the smart TV.
  • the cursor 121 will also move throughout the entire display screen of the smart TV, making the user's operation more efficient. Low, affecting the user experience.
  • FIG 2 is a schematic diagram of a screen projection provided by an embodiment of the present application.
  • the screen content of the mobile phone 200a can be displayed on the display screen of the smart TV 200b.
  • the display interface 220 can be located at any position on the screen of the smart TV.
  • the cursor 221 will also move throughout the entire display screen of the smart TV, making the user's The operation efficiency is low, which affects the user experience.
  • embodiments of the present application provide a display method, a display device, and an electronic device.
  • This technical solution can improve the user's operating efficiency and user experience by limiting the cursor to the area where the display interface is located.
  • Figure 3 is a schematic system framework diagram of a display method provided by an embodiment of the present application.
  • the system 300 may include an input device 300a, a host device 300b and a display device 300c.
  • the host device 300b may be a control device of the display device 300c, and the display device 300c may serve as a display screen of the host device 300b.
  • the host device 300b is a host of a personal computer
  • the display device 300c is a display screen of a personal computer.
  • the input device 300a may be used to input cursor position information.
  • the input device 300a can send cursor position information to the host device 300b according to the user's movement operation, and the host device 300b sends the cursor position information to the display device 300c, and the display device 300c displays the cursor; or, the input device 300a can send the cursor position information to the host device 300b according to the user's movement operation. Clicking, dragging, and other operations send cursor-related data to the host device 300b, and the host device 300b sends the relevant data to the display device 300c.
  • the input device can be a mobile phone, a mouse, a touch pad, an air mouse, etc.
  • the control software in the mobile phone can provide corresponding functions.
  • the display interface of the mobile phone includes a cursor control area, and the user controls the cursor in the cursor control area.
  • the host device 300b may include a cursor input module 310, a display area determination module 320, a cursor display module 330, etc.
  • the cursor input module 310 can be used to read the data corresponding to the user's operation on the input device, such as the data corresponding to the movement operation. Location data.
  • the display area determination module 320 may be used to determine the display area of the display device 300c that actually displays content.
  • the cursor display module 330 can be used to limit the cursor within the display area according to the display area where the content is actually displayed, so that the mouse can only move and perform other related operations in the display area where the content is actually displayed.
  • the cursor input module 310 and the display area discrimination module 320 can be integrated in one module, such as a processor, a processing unit, a microcontroller unit (MCU), etc.; or, the cursor input module 310 and the display area discrimination module
  • the module 320 and the cursor display module 330 can also be integrated into one module, which is not limited in the embodiment of this application.
  • the display device 300c is used to display a display interface adapted to an application adapted to a mobile phone (or an application adapted to a tablet), or a display interface projected onto a screen of a mobile phone.
  • the display device 300c is also used to display a cursor.
  • one or more of the cursor input module 310, the display area determination module 320, and the cursor display module 330 may also be located in the display device 300c, which is not limited by the embodiments of this application.
  • Figure 4 is a schematic system framework diagram of the display method provided by the embodiment of the present application.
  • the system 400 may include an input device 400a and a display device 400b.
  • the display device 400b may include a cursor input module 410, a display area determination module 420, and a cursor display module 430.
  • the relevant functions of the cursor input module 410, the display area determination module 420 and the cursor display module 430 can be referred to the foregoing description, and for the sake of brevity, they will not be described again.
  • an application adapted to a mobile phone or an application adapted to a tablet is run on a smart TV and the user uses the mobile phone to control the cursor as an example for explanation.
  • FIG. 5 is a schematic diagram of determining a display area provided by an embodiment of the present application.
  • the display area of the smart TV is the display area 510 .
  • the display interface of the application adapted to the mobile phone (or the application adapted to the tablet) running on the smart TV is the display interface 520 .
  • the cursor 521 can be limited to the display interface 520, thereby preventing the cursor 521 from moving to other positions on the screen of the smart TV other than the display interface 520. Therefore, it is necessary to determine the display area where the display interface 520 is located.
  • the vertex O of the display area of the smart TV can be used as the coordinate origin
  • the direction of the first side length (such as the upper boundary) of the display area is the X-axis direction
  • the second side length (such as For example, the direction of the left boundary) is the Y-axis direction to establish a plane rectangular coordinate system.
  • the target display area where the actual display interface 520 of the application is located can be directly obtained through the system interface, such as the abscissa x1 to x2 and the vertical coordinates y1 to y2.
  • the smart TV can limit the acquired cursor position to the target display area.
  • the smart TV determines that point C is within the target display area, it can directly display the cursor at point C. That is, when the smart TV determines that x1 ⁇ x3 ⁇ x2 and y1 ⁇ y3 ⁇ y2, it can determine that C(x3, y3) is located within the target display area, and then the cursor can be directly displayed at point C(x3, y3).
  • the smart TV determines that point C is outside the target display area, it can correct the coordinates of point C so that the corrected coordinates of point C1 are within the target display area, and display the cursor at point C1 in the target display area.
  • the smart TV s correction rules for the cursor position are as follows:
  • the initial position of the cursor may be located at the center of the display area where the display interface 520 is located or at a preset position, which is not limited by the embodiments of this application.
  • the display area may be located in the middle of the display screen of the smart TV, or may be located at other locations, which is not limited by the embodiments of this application.
  • the display area where the display interface 520 is located can also be in other shapes, such as circles, ellipses, polygons and other shapes, which are not limited by the embodiments of this application.
  • this technical solution can automatically limit the cursor to the display area where the application's display interface is located, thereby preventing the cursor from moving to other positions on the smart TV's display screen, thereby improving the efficiency of the user's cursor control, thereby improving the user's ability to control the cursor. experience.
  • the display interface of the mobile phone application can be displayed on the smart TV.
  • the smart TV obtains the target display area through the system interface, it can only obtain the area of the entire display screen and cannot obtain the specific location of the target display area.
  • FIG. 6 is another schematic diagram for determining a display area provided by an embodiment of the present application.
  • the screen displayed on the display screen of the smart TV is display screen 610 .
  • the display interface of the application running on the mobile phone or the application running on the tablet is projected onto the display interface 620 of the smart TV.
  • the display screen of the smart TV includes a plurality of pixels 611 .
  • a picture is presented to the user through the plurality of pixels 611 .
  • the length of the first side of the display screen of the smart TV is W
  • the length of the second side is H.
  • the smart TV When the smart TV determines the target display area, it can perform a screenshot operation on the display screen to obtain the entire display screen. After acquiring the entire display screen, the smart TV can extract n pixels from each row in the first direction (horizontal), scan the brightness values and superimpose the brightness values to obtain s1, and extract each column in the second direction (vertical). Scan the brightness values of m pixels and superimpose the brightness values to obtain s2. Let the brightness value of a single black pixel be b, and the allowable error be ⁇ .
  • Smart TVs can determine whether a row of pixels is black based on the relationship between s1 and (n*b)+ ⁇ .
  • s1 ⁇ (n*b)+ ⁇ it can be determined that the pixels in this row are black, that is, they do not belong to the target display area;
  • s1>(n*b)+ ⁇ it can be determined that the pixels in this row are not black. That is, it belongs to the target display area, that is, the row of pixels begins to present the picture.
  • Smart TVs can determine whether a column of pixels is black based on the relationship between s2 and (m*b)+ ⁇ .
  • s2 ⁇ (m*b)+ ⁇ it can be determined that the pixels in this column are black, that is, they do not belong to the target display area;
  • s2>(m*b)+ ⁇ it can be determined that the pixels in this column are not black. That is, it belongs to the target display area, that is to say, the pixels in this column begin to present the picture.
  • the left and right boundaries of the target display area can be determined.
  • the upper and lower boundaries and the left and right boundaries of the target display area can be determined respectively, so that the complete target display area can be determined.
  • the embodiment of the present application does not limit the acquisition method of m and n.
  • m and n may be extracted at the same intervals or different intervals, or m and n may be randomly selected.
  • the embodiments of this application do not limit the specific values of m and n.
  • m is 108 and n is 192, or m is 54 and n is 96, etc.; or, m and n may be the same or different.
  • W includes 1920 pixels and H includes 1080 pixels, then n can be 192 and m can be 108.
  • the smart TV can also acquire one frame of the video stream projected by the mobile phone, thereby also acquiring the entire display screen.
  • the smart TV can obtain the target display area according to the above process.
  • the smart TV can also limit the obtained cursor position to the target display area.
  • the smart TV can also limit the obtained cursor position to the target display area.
  • the smart TV can take screenshots of the display screen or obtain one frame of the screen-cast video stream. And calculate the target display area based on this screen. This technical solution can determine the target display area, which is beneficial to the subsequent correction process of the cursor position, thereby helping to improve the efficiency of the user's cursor manipulation.
  • Figure 7 is a schematic flow chart of a display method provided by an embodiment of the present application. As shown in FIG. 7 , the method 700 may be applied to the first electronic device, and the method 700 may include steps 710 to 740 .
  • the first electronic device receives a control instruction from the second electronic device, where the control instruction includes the position information of the cursor.
  • the first electronic device may be a large-screen device such as a smart TV, a monitor, a projector, or a notebook computer
  • the second electronic device may be an input device such as a mobile phone, a mouse, an air mouse, a touch pad, etc.
  • the control instruction may be an instruction generated by the user's operation on the second electronic device.
  • it may include position information of the cursor, and may also include data such as click and drag of the cursor.
  • the position information may be the position coordinates of the cursor or position indication information, etc.
  • a corresponding control application is installed in the second electronic device, and the user can input control instructions through the control application. For example, when the second electronic device runs the control application, the user enters the control instruction on the second electronic device. Input control instructions through sliding, clicking, etc.
  • the first electronic device determines whether the first position of the cursor is within the target display area based on the position information.
  • the target display area is the area where the first electronic device actually displays content.
  • the first electronic device can install and run an application adapted to a mobile phone or an application adapted to a tablet. At this time, the display interface of the application does not completely cover the display screen of the first electronic device. Or, the first electronic device displays the screencast content of another electronic device.
  • the area where the first electronic device actually displays content is a partial area of the display screen.
  • the target display area may be the display area where the display interface 120 is located.
  • the target display area may be the display area where the display interface 220 is located.
  • the first electronic device corrects the first position to obtain a second position, and the second position is within the target display area.
  • the first position may be the position of the cursor obtained in real time from the position information sent by the second electronic device.
  • the first position can be corrected so that the corrected second position is located in the area where the content is actually displayed.
  • the first electronic device displays the cursor at the second position.
  • the second position is the position of the cursor after correcting the first position.
  • the first device can display the cursor at the second position.
  • the first electronic device is a smart TV
  • the second position may be C(x3, y3)
  • the smart TV may display the cursor 521 at point C.
  • the first electronic device can also respond to the user's click, drag, and other operations at the second location.
  • the first electronic device can obtain the position information of the cursor from the received control instruction, and determine whether the cursor is in the target display area of the actual displayed content based on the position information. When the first position of the cursor is not in When the cursor is within the target display area, the first position of the cursor is corrected so that the corrected second position is located in the target display area.
  • This technical solution can keep the cursor in the area where the content is actually displayed when the user controls the first electronic device through the second electronic device, thereby improving the user's operating efficiency and user experience.
  • the method 700 may also include:
  • the first electronic device displays the cursor at the first position.
  • the cursor when the first position is within the target display area where the content is actually displayed, the cursor can be directly displayed at the first position. This can improve the user's operating efficiency.
  • the method 700 may further include:
  • the first electronic device acquires the target display area.
  • the first electronic device needs to first determine which areas in the display screen belong to the target display area, so as to facilitate subsequent judgment of the position of the cursor.
  • the first electronic device obtains the target display area, including:
  • the first electronic device acquires the target display area through the system interface.
  • mobile phone or tablet applications are installed on the first electronic device.
  • the first electronic device runs these applications, it can directly obtain the area where the content is actually displayed through its own system interface.
  • the first electronic device can directly obtain the target display area through the system interface, thereby making the solution simple and easy to implement.
  • the first electronic device obtains the target display area, including:
  • the first electronic device takes a screenshot of the display screen of the first electronic device to obtain the first picture of the display screen; the first electronic device determines the target display area from the first picture.
  • the first electronic device may not be able to obtain the target display area directly from the system interface. In this case, the first electronic device can obtain the screen image and determine the target display area based on the image.
  • the first electronic device takes a screenshot of the display screen to obtain a display screen 610 , and determines the target display area based on the display screen 610 .
  • the first electronic device needs to first determine which areas in the display screen belong to the target display area, so as to facilitate subsequent judgment of the position of the cursor.
  • the first electronic device determines the target display area from the first picture, including: the first electronic device extracts n pixels from each row of pixels in the first picture, and extracts n pixels from each column in the first picture. Extract m pixel points from the pixels; the first electronic device sums the brightness values of the n pixel points to obtain the first brightness value s1 and sums the brightness values of the m pixel points to obtain the second brightness value s2; when the When an electronic device determines the first brightness value s1q>(n*b)+ ⁇ in the q-th row, it determines that some pixels in the q-th row belong to the target display area.
  • the first electronic device determines the second brightness value in the p-th column
  • the brightness value s2p>(m*b)+ ⁇ it is determined that some pixels in the p-th column belong to the target display area, where b represents the brightness value when the pixel is black, ⁇ is the preset error value, q and p All are integers.
  • the first brightness value s1 is a superposition of the brightness values of n pixels extracted from a row of pixels.
  • the second brightness value s2 is a superposition of the brightness values of m pixels extracted from a column of pixels.
  • the first electronic device uses the above calculation method to determine whether the pixels in the qth row or the pth column belong to the target display area. Refer to the relevant description in FIG. 6 and will not be repeated for the sake of brevity.
  • the upper and lower boundaries and the left and right boundaries of the target display area can be determined respectively through the above calculation method, so that the complete target display area can be determined.
  • the embodiment of the present application does not limit the acquisition method of m and n.
  • m and n may be extracted at the same intervals or different intervals, or m and n may be randomly selected.
  • the embodiments of this application do not limit the specific values of m and n.
  • m is 108 and n is 192, or m is 54 and n is 96; or, m and n may be the same or different.
  • the first electronic device can also acquire one frame of the screen-cast video stream, thereby also acquiring the entire display image.
  • each row and each column of pixels included in the first picture can be judged, and each boundary of the target display area can be determined based on the judgment results, so that the target display area can be determined.
  • the first electronic device determines whether the first position of the cursor is within the target display area according to the position information, including: the first electronic device determines the first position according to the coordinates of the first position and the vertex coordinates of the target display area. Whether it is within the target display area.
  • the first electronic device can determine whether the position of the cursor is in the area where the display interface 520 is located by comparing the real-time position of the cursor with the vertex coordinates of the display interface 520 .
  • whether the cursor's position is within the target display area can be determined based on the coordinates of the cursor's position and the vertex coordinates of the target display area, which is helpful for the first electronic device to further determine whether to correct the cursor position.
  • the first electronic device when determining that the first position is not within the target display area, corrects the first position to obtain the second position, including:
  • the abscissa of the first position is less than the abscissa of the straight line where the first boundary of the target display area is located, then the abscissa of the first position is corrected to the abscissa of the straight line where the first boundary is located, as the abscissa of the second position;
  • the abscissa of the first position is greater than the abscissa of the straight line where the second boundary of the target display area is parallel to the first boundary, then the abscissa of the first position is corrected to the abscissa of the straight line where the second boundary is, as the second The abscissa of the position;
  • the ordinate of the first position is less than the ordinate of the straight line where the third boundary of the target display area is located, then the ordinate of the first position is corrected to the ordinate of the straight line where the third boundary is located, as the ordinate of the second position; or,
  • the ordinate of the first position is greater than the ordinate of the straight line of the fourth border of the target display area that is parallel to the third border, then the ordinate of the first position is corrected to the ordinate of the straight line of the fourth border as the second position. ordinate of .
  • the first boundary may be AD, when the abscissa of the first position is less than the abscissa of the straight line where AD is located When x1, the abscissa of the first position can be corrected to x1.
  • the second boundary may be EB.
  • the abscissa of the first position is greater than the abscissa x2 of the straight line where the EB is located, the abscissa of the first position may be corrected to x2.
  • the third boundary may be AE.
  • the ordinate of the first position is less than the ordinate y1 of the straight line where the AE is located, the ordinate of the first position may be corrected to y1.
  • the fourth boundary may be DB.
  • the ordinate of the first position is greater than the ordinate y2 of the straight line where the DB is located, the ordinate of the first position may be corrected to y2.
  • the position of the cursor located outside the target display area can be corrected to be located within the target display area, so that the cursor can be moved within the target display area, thereby improving the user's operating efficiency.
  • the method 700 may further include: establishing a connection relationship between the first electronic device and the second electronic device.
  • the embodiments of the present application do not limit the manner in which the first electronic device and the second electronic device establish a connection relationship.
  • it can be through WLAN, Bluetooth, ultra wide band (UWB), wired and other connection methods.
  • control instruction is input by the user in an application program in the second electronic device.
  • embodiments of the present application also provide a display method, which is applied to a display system.
  • the display system includes a first electronic device, a second electronic device, and a third electronic device.
  • the method includes:
  • the first electronic device receives a control instruction from the second electronic device, where the control instruction includes position information of the cursor;
  • the first electronic device determines whether the first position of the cursor is within the target display area based on the position information, and the target display area is the area where the third electronic device actually displays content;
  • the first electronic device corrects the first position to obtain a second position, and the second position is within the target display area;
  • the first electronic device sends the second position of the cursor to the third electronic device
  • a third electronic device displays the cursor at the second location.
  • the third electronic device may serve as a display device of the first electronic device.
  • the first electronic device obtains the target display area, determines whether the first position is within the target display area, and corrects the first position for specific descriptions. Refer to the relevant descriptions above, which will not be repeated for the sake of brevity. Repeat.
  • FIG. 8 is a schematic frame diagram of a display device provided by an embodiment of the present application.
  • the display device 800 may include a receiving module 810 , a processing module 820 and a display module 830 .
  • the receiving module 810 may be configured to receive control instructions, where the control instructions include position information of the cursor.
  • the processing module 820 may be configured to determine whether the first position of the cursor is within a target display area according to the position information.
  • the target display area is an area where the display device actually displays content.
  • the processing module 820 is also configured to correct the first position to obtain a second position when it is determined that the first position is not within the target display area.
  • the second position is within the target display area.
  • the display module 830 may be used to display the cursor at the second position.
  • the display device 800 may be the display device 400b mentioned above.
  • it can be large-screen devices such as smart TVs, laptops, and smart screens.
  • the display module 830 is further configured to: display the cursor at the first position.
  • the processing module 820 before the processing module 820 determines whether the first position of the cursor is within the target display area according to the position information, the processing module 820 is further configured to: obtain the target display area.
  • the processing module 820 is specifically configured to obtain the target display area through the system interface.
  • the processing module 820 is specifically configured to: perform a screenshot processing on the display screen of the display device to obtain the first picture of the display screen; and determine the target display area from the first picture.
  • processing module 820 is specifically used to:
  • the processing unit 820 is specifically configured to: determine whether the first position is within the target display area according to the coordinates of the first position and the vertex coordinates of the target display area.
  • processing unit 820 is specifically used to:
  • the abscissa of the first position is less than the abscissa of the straight line where the first boundary of the target display area is located, then the abscissa of the first position is corrected to the abscissa of the straight line where the first boundary is located, as the abscissa of the second position;
  • the abscissa of the first position is greater than the abscissa of the straight line where the second boundary of the target display area is parallel to the first boundary, then the abscissa of the first position is corrected to the abscissa of the straight line where the second boundary is, as the second The abscissa of the position;
  • the ordinate of the first position is less than the ordinate of the straight line where the third boundary of the target display area is located, then the ordinate of the first position is corrected to the ordinate of the straight line where the third boundary is located, as the ordinate of the second position; or,
  • the ordinate of the first position is greater than the ordinate of the straight line of the fourth border of the target display area that is parallel to the third border, then the ordinate of the first position is corrected to the ordinate of the straight line of the fourth border as the second position. ordinate.
  • the processing module 820 before the receiving module 810 receives the control instruction, the processing module 820 is also used to:
  • FIG. 9 is a schematic frame diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 900 may include one or more processors 910; one or more memories 920; the one or more memories 920 store one or more computer programs, and the one or more computer programs It includes instructions that, when executed by one or more processors, cause the display method described in any of the above possible implementations to be executed.
  • the electronic device 900 may be the display device 400b mentioned above.
  • it can be large-screen devices such as smart TVs, laptops, and smart screens.
  • An embodiment of the present application also provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is used to receive signals and transmit the signals to the processor.
  • the processor processes the signals. This causes the display method described in any of the previous possible implementations to be executed.
  • the electronic device includes corresponding hardware and/or software modules that perform each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.
  • This embodiment can divide the electronic device into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. In actual implementation, there may be other division methods.
  • This embodiment also provides a computer-readable storage medium.
  • Computer instructions are stored in the computer-readable storage medium.
  • the electronic device causes the electronic device to execute the above-mentioned related method steps to implement the above-mentioned embodiments. Display method.
  • This embodiment also provides a computer program product.
  • the computer program product When the computer program product is run on a computer, it causes the computer to perform the above related steps to implement the display method in the above embodiment.
  • inventions of the present application also provide a device.
  • This device may be a chip, a component or a module.
  • the device may include a connected processor and a memory.
  • the memory is used to store computer execution instructions.
  • the processor can execute computer execution instructions stored in the memory, so that the chip executes the display method in each of the above method embodiments.
  • the electronic devices, computer-readable storage media, computer program products or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the above provided The beneficial effects of the corresponding methods will not be described again here.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请提供了一种显示方法、显示装置和电子设备,该方法可以应用于第一电子设备,该方法包括:所述第一电子设备接收第二电子设备的控制指令,所述控制指令包括光标的位置信息;所述第一电子设备根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内,所述目标显示区域为所述第二电子设备实际显示内容的区域;在确定所述第一位置未处于所述目标显示区域之内时,所述第一电子设备对所述第一位置进行修正,得到第二位置,所述第二位置位于所述目标显示区域之内;所述第一电子设备在所述第二位置处显示所述光标。该技术方案可以通过将光标限制在显示界面所在的区域内,从而可以提升用户的操作效率,提升用户体验。

Description

显示方法和电子设备
本申请要求于2022年07月15日提交中国专利局、申请号为202210836674.X、申请名称为“显示方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及电子技术领域,并且更具体地,涉及一种显示方法和电子设备。
背景技术
当智能电视、显示器等大屏设备运行适配手机的应用或适配平板的应用时,或者大屏设备作为被投屏设备显示手机上运行的应用或平板上运行的应用时,应用的显示界面位于大屏设备的显示屏的部分区域中。当用户使用手机等输入设备操控大屏设备时,光标会在大屏设备的整个显示屏中移动,使得用户的操作效率较低,影响了用户的体验。
发明内容
本申请提供一种显示方法和电子设备,该技术方案通过将光标限制在显示界面所在的区域内,从而可以提升用户的操作效率,提升用户体验。
第一方面,提供了一种显示方法,所述方法应用于第一电子设备,所述方法包括:所述第一电子设备接收第二电子设备的控制指令,所述控制指令包括光标的位置信息;所述第一电子设备根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内,所述目标显示区域为所述第一电子设备实际显示内容的区域;在确定所述第一位置未处于所述目标显示区域之内时,所述第一电子设备对所述第一位置进行修正,得到第二位置,所述第二位置位于所述目标显示区域之内;所述第一电子设备在所述第二位置处显示所述光标。
应理解,该第一电子设备可以是智能电视、显示器、投影仪、笔记本电脑等大屏设备,该第二电子设备可以是手机、鼠标、空鼠、触控板等输入设备。
本申请实施例中,第一电子设备可以从接收的控制指令中获取光标的位置信息,并根据该位置信息确定光标是否处于其实际显示内容的目标显示区域内,当光标的第一位置未在目标显示区域内时,对光标的第一位置进行修正,使得修正后的第二位置位于目标显示区域中。该技术方案可以在用户通过第二电子设备控制第一电子设备时,使得光标始终处于实际显示内容的区域中,从而能够提升用户的操作效率,提升用户体验。
结合第一方面,在第一方面的一种实现方式中,所述方法还包括:在确定所述第一位置处于所述目标显示区域之内时,所述第一电子设备在所述第一位置处显示所述光标。
该技术方案中,当第一位置处于实际显示内容的目标显示区域内时,可以直接在第一位置处显示光标。从而能够提升用户的操作效率。
结合第一方面,在第一方面的一种实现方式中,在所述第一电子设备根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内之前,所述方法还包括:所述第一电子设备获取所述目标显示区域。
第一电子设备需要先确定显示屏中的哪些区域属于目标显示区域,从而有利于后续判断光标的位置。
结合第一方面,在第一方面的一种实现方式中,所述第一电子设备获取所述目标显示区域,包括:所述第一电子设备通过系统接口获取所述目标显示区域。
第一电子设备通过系统接口可以直接获取到目标显示区域,从而使得方案简单易于实现。
结合第一方面,在第一方面的一种实现方式中,所述第一电子设备获取所述目标显示区域,包括:所述第一电子设备对所述第一电子设备的显示屏进行截屏处理,获取所述显示屏的第一画面;所述第 一电子设备从所述第一画面中确定所述目标显示区域。
在一些投屏的场景下,第一电子设备可能无法直接从系统接口获取到目标显示区域,此时第一电子设备可以获取显示屏的画面,并根据该画面来确定目标显示区域。
第一电子设备需要先确定显示屏中的哪些区域属于目标显示区域,从而有利于后续判断光标的位置。
结合第一方面,在第一方面的一种实现方式中,所述第一电子设备从所述第一画面中确定所述目标显示区域,包括:所述第一电子设备从所述第一画面中的每一行像素中抽取n个像素点,从所述第一画面中的每一列像素中抽取m个像素点;所述第一电子设备将所述n个像素点的亮度值求和得到第一亮度值s1和将所述m个像素点的亮度值求和得到第二亮度值s2;当所述第一电子设备确定第q行的第一亮度值s1q>(n*b)+δ时,确定所述第q行的部分像素点属于所述目标显示区域,当所述第一电子设备确定第p列的第二亮度值s2p>(m*b)+δ时,确定所述第p列的部分像素点属于所述目标显示区域,其中,b表示像素点为黑色的亮度值,δ为预设误差值,q和p均为整数。
可以对第一画面中包括的每一行每一列像素点进行判断,根据判断的结果可以确定目标显示区域的各个边界,从而可以确定目标显示区域。
结合第一方面,在第一方面的一种实现方式中,所述第一电子设备根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内,包括:所述第一电子设备根据所述第一位置的坐标和所述目标显示区域的顶点坐标确定所述第一位置是否处于目标显示区域之内。
可以根据光标的位置的坐标和目标显示区域的顶点坐标来确定光标的位置是否处于目标显示区域之内,从而有利于第一电子设备进一步确定是否对光标位置进行修正。
结合第一方面,在第一方面的一种实现方式中,所述在确定所述第一位置未处于所述目标显示区域之内时,所述第一电子设备对所述第一位置进行修正,得到第二位置,包括:
若所述第一位置的横坐标小于所述目标显示区域的第一边界所在直线的横坐标,则将所述第一位置的横坐标修正为所述第一边界所在直线的横坐标,作为所述第二位置的横坐标;
若所述第一位置横坐标大于所述目标显示区域的与所述第一边界平行的第二边界所在的直线的横坐标,则将所述第一位置的横坐标修正为所述第二边界所在的直线的横坐标,作为所述第二位置的横坐标;
若所述第一位置的纵坐标小于所述目标显示区域的第三边界所在直线的纵坐标,则将所述第一位置的纵坐标修正为所述第三边界所在直线的纵坐标,作为所述第二位置的纵坐标;或者,
若所述第一位置的纵坐标大于所述目标显示区域的与所述第三边界平行的第四边界所在直线的纵坐标,则将所述第一位置的纵坐标修正为所述第四边界所在直线的纵坐标,作为所述第二位置的纵坐标。
可以对位于目标显示区域之外的光标的位置修正为位于目标显示区域之内,从而可以使得光标在目标显示区域内移动,从而可以提升用户的操作效率。
结合第一方面,在第一方面的一种实现方式中,在所述第一电子设备接收第二电子设备的控制指令之前,所述方法还包括:所述第一电子设备与所述第二电子设备建立连接关系。
在一些实施例中,所述控制指令为用户在所述第二电子设备中的应用程序中输入的。
第二方面,提供了一种显示装置,包括:接收模块,用于接收控制指令,所述控制指令包括光标的位置信息;处理模块,用于根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内,所述目标显示区域为所述显示装置实际显示内容的区域;所述处理模块,还用于在确定所述第一位置未处于所述目标显示区域之内时,对所述第一位置进行修正,得到第二位置,所述第二位置位于所述目标显示区域之内;显示模块,用于在所述第二位置处显示所述光标。
结合第二方面,在第二方面的一种实现方式中,在所述处理模块确定所述第一位置处于所述目标显示区域之内时,所述显示模块还用于:在所述第一位置处显示所述光标。
结合第二方面,在第二方面的一种实现方式中,在所述处理模块根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内之前,所述处理模块还用于:获取所述目标显示区域。
结合第二方面,在第二方面的一种实现方式中,所述处理模块具体用于:通过系统接口获取所述目标显示区域。
结合第二方面,在第二方面的一种实现方式中,所述处理模块具体用于:对所述显示装置的显示 屏进行截屏处理,获取所述显示屏的第一画面;从所述第一画面中确定所述目标显示区域。
结合第二方面,在第二方面的一种实现方式中,所述处理模块具体用于:从所述第一画面中的每一行像素中抽取n个像素点,从所述第一画面中的每一列像素中抽取m个像素点;将所述n个像素点的亮度值求和得到第一亮度值s1和将所述m个像素点的亮度值求和得到第二亮度值s2;当确定第q行的第一亮度值s1q>(n*b)+δ时,确定所述第q行的部分像素点属于所述目标显示区域,当确定第p列的第二亮度值s2p>(m*b)+δ时,确定所述第p列的部分像素点属于所述目标显示区域,其中,b表示像素点为黑色的亮度值,δ为预设误差值,q和p均为整数。
结合第二方面,在第二方面的一种实现方式中,所述处理单元具体用于:根据所述第一位置的坐标和所述目标显示区域的顶点坐标确定所述第一位置是否处于目标显示区域之内。
结合第二方面,在第二方面的一种实现方式中,所述处理单元具体用于:
若所述第一位置的横坐标小于所述目标显示区域的第一边界所在直线的横坐标,则将所述第一位置的横坐标修正为所述第一边界所在直线的横坐标,作为所述第二位置的横坐标;
若所述第一位置横坐标大于所述目标显示区域的与所述第一边界平行的第二边界所在的直线的横坐标,则将所述第一位置的横坐标修正为所述第二边界所在的直线的横坐标,作为所述第二位置的横坐标;
若所述第一位置的纵坐标小于所述目标显示区域的第三边界所在直线的纵坐标,则将所述第一位置的纵坐标修正为所述第三边界所在直线的纵坐标,作为所述第二位置的纵坐标;或者,
若所述第一位置的纵坐标大于所述目标显示区域的与所述第三边界平行的第四边界所在直线的纵坐标,则将所述第一位置的纵坐标修正为所述第四边界所在直线的纵坐标,作为所述第二位置的纵坐标。
结合第二方面,在第二方面的一种实现方式中,其特征在于,在所述接收模块接收控制指令之前,所述处理模块还用于:与第二电子设备建立连接关系。
第三方面,提供了一种电子设备,包括一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被一个或多个处理器执行时,使得如上述第一方面及其任一种可能的实现方式中的显示方法被执行。
第四方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如上述第一方面及其任一种可能的实现方式中的显示方法被执行。
第五方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在电子设备上运行时,使得如上述第一方面及其任一种可能的实现方式中的显示方法被执行。
第六方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得如上述第一方面及其任一种可能的实现方式中的显示方法被执行。
附图说明
图1是本申请实施例提供的一种电子设备显示竖屏应用的场景图。
图2是本申请实施例提供的一种投屏的示意图。
图3是本申请实施例提供的显示方法的系统示意性框架图。
图4是本申请实施例提供的显示方法的系统示意性框架图。
图5是本申请实施例提供的一种确定显示区域的示意图。
图6是本申请实施例提供的另一种确定显示区域的示意图。
图7是本申请实施例提供的一种显示方法的示意性流程图。
图8是本申请实施例提供的一种显示装置的示意性框架图。
图9是本申请实施例提供的一种电子设备的示意性框架图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
本申请实施例中的显示方法可以应用于智能电视、智慧屏、显示器、投影仪等大屏显示设备中, 还可以应用于平板电脑、笔记本电脑、个人计算机、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)车载设备等电子设备中,本申请实施例对电子设备的具体类型不作任何限制。
图1是本申请实施例提供的一种电子设备显示竖屏应用的场景图。如图1所示,电子设备100a可以是智能电视、显示器,笔记本电脑等大屏设备。电子设备100b可以是智能手机、鼠标、触控板、空鼠等能够完成输入操作的设备。
本申请实施例中,以电子设备100b为手机,电子设备100a为智能电视为例进行说明。
随着智能电视能力的增强,智能电视上也可以安装适配手机的应用、或适配平板的应用,而智能电视运行这些应用时,可能会出现应用的显示界面以竖屏方式显示在智能电视的中间区域的现象。参见图1,智能电视运行适配手机的应用或适配平板的应用时,应用的显示界面120位于智能电视的显示屏的中间区域,而智能电视的显示屏的其他区域不显示画面,如显示区域110a和显示区域110b,在手机和智能电视建立连接关系的情况下,用户可以使用手机100b控制光标121进而操控智能电视。此时,响应于用户在手机上的操作,光标121会在智能电视的整个显示屏中移动,使得用户的操作效率较低,影响了用户的体验。
应理解,本申请实施例对于手机和智能电视建立连接关系的方式不予限定。例如,手机可以通过扩展坞与智能电视建立连接,或者,手机还可以通过无线局域网(wireless local area networks,WLAN)、蓝牙、超宽带(ultra wide band,UWB)、有线等连接方式与智能电视建立连接。
在另一些实施例中,在投屏场景下,手机中的屏幕内容可以显示在智能电视的屏幕中,也可能会出现图1中所示的情况。这种情况下,手机的显示界面120可以位于智能电视的中间区域,当用户使用手机控制光标121操控时,同样会出现光标121在智能电视的整个显示屏中移动的情况,使得用户的操作效率较低,影响了用户的体验。
图2是本申请实施例提供的一种投屏的示意图。如图2所示,手机200a的屏幕内容可以显示在智能电视200b的显示屏中。这种情况下,显示界面220可以位于智能电视的屏幕的任意位置,当用户使用手机控制光标221操控显示界面220时,同样会出现光标221在智能电视的整个显示屏中移动的情况,使得用户的操作效率较低,影响了用户的体验。
应理解,手机200a与智能电视200b建立连接的方式可以参见前文中的相关描述,为了简洁,不再赘述。
结合图1至图2,当智能电视、显示器等大屏设备运行适配手机的应用或适配平板的应用时,或者大屏设备作为被投屏设备显示手机上运行的或平板上运行的应用时,应用的显示界面位于显示设备的显示屏的部分区域中,当用户使用手机等输入设备操控显示设备时,光标会在显示设备的整个显示屏中移动,使得用户的操作效率较低,影响了用户的体验。
有鉴于此,本申请实施例提供一种显示方法、显示装置和电子设备,该技术方案通过将光标限制在显示界面所在的区域内,从而可以提升用户的操作效率,提升用户体验。
下文将结合图3至图9介绍本申请实施例中的显示方法和电子设备。
图3是本申请实施例提供的显示方法的示意性系统框架图。如图3所示,该系统300可以包括输入设备300a,主机设备300b和显示设备300c。其中,该主机设备300b可以是显示设备300c的控制设备,该显示设备300c可以作为主机设备300b的显示屏。例如,该主机设备300b为个人电脑的主机,该显示设备300c为个人电脑的显示屏。
在一些实施例中,该输入设备300a可以用于输入光标的位置信息。例如,输入设备300a根据用户的移动操作,可以向主机设备300b发送光标的位置信息,主机设备300b将光标的位置信息发送至显示设备300c,显示设备300c显示光标;或者,输入设备300a根据用户的点击、拖动等操作,向主机设备300b发送光标的相关数据,主机设备300b将相关数据发送至显示设备300c。
应理解,该输入设备可以是手机、鼠标、触控板、空鼠等。示例性地,当输入设备为手机时,手机中的操控软件可以提供相应功能。当手机打开该操控软件时,手机的显示界面中包括可以光标控制区域,用户在该光标控制区域内对光标进行控制。
在一些实施例中,该主机设备300b中可以包括光标输入模块310、显示区域判别模块320和光标显示模块330等。
其中,该光标输入模块310可以用于读取用户在输入设备的操作对应的数据,如移动操作对应的 位置数据。
该显示区域判别模块320可以用于确定显示设备300c的实际显示内容的显示区域。
该光标显示模块330可以用于根据实际显示内容的显示区域,将光标限制在该显示区域内,以使得鼠标仅能够在实际显示内容的显示区域中进行移动和其他相关操作。
应理解,该光标输入模块310、显示区域判别模块320可以集成在一个模块中,如处理器,处理单元,微控制单元(microcontroller unit,MCU)等;或者,该光标输入模块310、显示区域判别模块320和光标显示模块330也可以集成在一个模块中,本申请实施例不予限定。
该显示设备300c用于显示适配手机的应用(或适配平板的应用)的显示界面,或手机投屏的显示界面,该显示设备还用于显示光标。
在另一些实施例中,该光标输入模块310、显示区域判别模块320和光标显示模块330中的一个或多个也可以位于显示设备300c中,本申请实施例不予限定。
图4是本申请实施例提供的显示方法的示意性系统框架图。如图4所示,该系统400可以包括输入设备400a和显示设备400b。
在一些实施例中,该显示设备400b可以包括光标输入模块410、显示区域判别模块420和光标显示模块430。
应理解,对于该光标输入模块410、显示区域判别模块420和光标显示模块430的相关功能可以参见前文中的描述,为了简洁,不再赘述。
应理解,对于该输入设备400a的相关功能可以参见前文中的描述,为了简洁,不再赘述。
本申请实施例中,以智能电视上运行适配手机的应用或适配平板的应用,用户使用手机控制光标为例进行说明。
图5是本申请实施例提供的一种确定显示区域的示意图。如图5所示,智能电视的显示屏可以显示的区域为显示区域510。其中,智能电视上运行的适配手机的应用(或适配平板的应用)的显示界面为显示界面520。
为了提升用户控制鼠标的效率,可以将光标521限制在显示界面520内,从而可以避免光标521移动到智能电视的屏幕中除显示界面520之外的其他位置处。因此,需要确定显示界面520所在的显示区域。
在一些实施例中,参见图5,可以以智能电视的显示区域的顶点O为坐标原点,以显示区域的第一边长(如上边界)所在的方向为X轴方向,以第二边长(如左边界)所在的方向为Y轴方向建立平面直角坐标系。
当智能电视上安装有适配手机的应用(或适配平板的应用)时,在后续运行该应用时,可以通过系统接口直接获取到应用实际显示界面520所在的目标显示区域,如横坐标x1至x2、纵坐标y1至y2所形成的矩形。在用户使用手机操控光标时,智能电视可以将获取到的光标的位置限制在该目标显示区域中。
示例性地,参见图5,若目标显示区域的两个对角顶点分别为A、B,对应的坐标分别为(x1,y1)、(x2,y2),其余两个顶点为D、E,智能电视的显示区域的第一边长的长度为W,第二边长的长度为H,则存在关系x1<x2≤W,y1<y2≤H。假设获取的光标的实时位置为C点,对应的坐标为(x3,y3)。
当智能电视确定C点位于目标显示区域之内时,则可以直接在C点处显示光标。即当智能电视确定x1≤x3≤x2且y1≤y3≤y2时,可以确定C(x3,y3)位于目标显示区域之内,则可以直接在C(x3,y3)点处显示光标。
当智能电视确定C点位于目标显示区域之外时,可以对C点的坐标进行修正,使得修正后的C1点的坐标位于目标显示区域之内,并在目标显示区域中的C1点处显示光标。其中,智能电视对于光标的位置的修正规则如下:
(1)若确定x3<x1、y1≤y3≤y2,则将x3修正为x1,得到修正后的光标位置C1(x1,y3);
(2)若确定x3<x1、y3<y1,则将x3修正为x1,将y3修正为y1,得到修正后的光标位置C1(x1,y1);
(3)若确定x3<x1、y3>y2,则将x3修正为x1,将y3修正为y2,得到修正后的光标位置C1(x1,y2);
(4)若确定x1≤x3≤x2、y3<y1,则将y3修正为y1,得到修正后的光标位置C1(x3,y1);
(5)若确定x1≤x3≤x2、y3>y2,则将y3修正为y2,得到修正后的光标位置C1(x3,y2);
(6)若确定x3>x2、y3<y1,则将x3修正为x2,将y3修正为y1,得到修正后的光标位置C1(x2,y1);
(7)若确定x3>x2、y1≤y3≤y2,则将x3修正为x2,得到修正后的光标位置C1(x2,y3);
(8)若确定x3>x2、y3>y2,则将x3修正为x2,将y3修正为y2,得到修正后的光标位置C1(x2,y2);
应理解,用户最初使用手机控制光标时,光标的初始位置可以位于显示界面520所在的显示区域的中心位置或者是预设位置,本申请实施例不予限定。
应理解,该显示区域可以位于智能电视的显示屏的中间位置,也可以位于其他位置,本申请实施例不予限定。
在一些实施例中,显示界面520所在的显示区域也可以为其他形状,如圆形、椭圆、多边形等其他形状,本申请实施例不予限定。
在本申请的一个实施例中,在智能电视上运行适配手机的应用或适配平板的应用,且该应用的显示界面未铺满智能电视的显示屏的情况下,当用户使用手机控制智能电视的光标时,该技术方案可以自动将光标限制在应用的显示界面所在的显示区域中,从而可以避免光标移动到智能电视的显示屏的其他位置,以提升用户操控光标的效率,进而提升用户体验。
在一些情况下,当用户使用手机向智能电视投屏时,智能电视上可以显示手机的应用的显示界面。然而,当智能电视通过系统接口获取目标显示区域时,只能获取整个显示屏的区域,并不能够获取上述目标显示区域的具体位置。
图6是本申请实施例提供的另一种确定显示区域的示意图。如图6所示,智能电视的显示屏显示的画面为显示画面610。其中,手机上运行应用或平板上运行的应用的显示界面投屏显示在智能电视的显示界面620。
参见图6,智能电视的显示屏上包括多个像素点611,当显示屏上显示内容时,通过该多个像素点611向用户呈现画面。假设智能电视的显示屏的第一边长的长度为W,第二边长的长度为H,。
智能电视在确定目标显示区域时,可以对显示屏执行截屏操作,以获取整个显示画面。在获取整个显示画面之后,智能电视可以在第一方向(横向)上对每一行抽取n个像素点进行亮度值扫描并叠加亮度值得到s1,在第二方向(竖向)上对每一列抽取m个像素点进行亮度值扫描并叠加亮度值得到s2,设单个像素黑色的亮度值为b,允许误差为δ。
智能电视可以根据s1与(n*b)+δ的关系确定一行像素是否是黑色。当s1≤(n*b)+δ时,则可以确定该行像素为黑色,即不属于目标显示区域;当s1>(n*b)+δ时,则可以确定该行像素不为黑色,即属于目标显示区域,也就是说,该行像素开始呈现画面。通过这种方式对每一行像素进行判断,则可以确定目标显示区域的上下边界。
智能电视可以根据s2与(m*b)+δ的关系确定一列像素是否是黑色。当s2≤(m*b)+δ时,则可以确定该列像素为黑色,即不属于目标显示区域;当s2>(m*b)+δ时,则可以确定该列像素不为黑色,即属于目标显示区域,也就是说,该列像素开始呈现画面。通过这种方式对每一列像素进行判断,则可以确定目标显示区域的左右边界。
通过上述的计算方式分别可以确定目标显示区域的上下边界和左右边界,从而可以确定完整的目标显示区域。
应理解,本申请实施例对于m、n的获取方式不予限定,例如可以以相同间隔或不同间隔的方式抽取m、n,也可以随机抽取m、n等。本申请实施例对于m、n的具体取值不予限定,例如,m为108、n为192,或者m为54、n为96等;或者,m和n也可以相同,也可以不同。
示例性地,W包括1920个像素点,H包括1080个像素点,则n可以取192、m可以取108。
在另一个实施例中,智能电视还可以获取手机投屏的视频流的一帧的画面,从而也可以获取整个显示画面。
应理解,智能电视可以根据上述过程获取到目标显示区域,在用户使用手机操控光标时,智能电视同样可以将获取到的光标的位置限制在该目标显示区域中,具体可以参见前文中的描述,为了简洁,不再赘述。
在本申请的一个实施例中,智能电视可以对显示屏进行截屏处理,或获取投屏视频流一帧的画面, 并根据该画面计算目标显示区域。该技术方案可以确定目标显示区域,有利于后续对光标的位置执行修正过程,从而有利于提升用户操控光标的效率。
图7是本申请实施例提供的一种显示方法的示意性流程图。如图7所示,该方法700可以应用于第一电子设备,该方法700可以包括步骤710至740。
710,第一电子设备接收第二电子设备的控制指令,该控制指令包括光标的位置信息。
应理解,该第一电子设备可以是智能电视、显示器、投影仪、笔记本电脑等大屏设备,该第二电子设备可以是手机、鼠标、空鼠、触控板等输入设备。
该控制指令可以是用户在第二电子设备操作产生的指令,例如,可以包括光标的位置信息,还可以包括光标的点击、拖动等数据。
该位置信息可以是光标的位置坐标或者位置的指示信息等等。
在一些实施例中,第二电子设备中安装有相应的操控应用程序,用户可以通过该操控应用程序输入控制指令,例如,第二电子设备运行该操控应用程序时,用户在该第二电子设备中通过滑动、点击等输入控制指令。
720,第一电子设备根据位置信息确定光标的第一位置是否处于目标显示区域之内,目标显示区域为第一电子设备实际显示内容的区域。
如前文所述,第一电子设备中可以安装并运行适配手机的应用或适配平板的应用,此时,应用的显示界面并未完全铺满第一电子设备的显示屏。或者,第一电子设备上显示另一电子设备的投屏内容。
应理解,在这些场景下,第一电子设备实际显示内容的区域是显示屏的部分区域。
示例性地,参见图1,该目标显示区域可以是显示界面120所在的显示区域。
示例性地,参见图2,该目标显示区域可以是显示界面220所在的显示区域。
730,在确定第一位置未处于目标显示区域之内时,第一电子设备对第一位置进行修正,得到第二位置,第二位置位于目标显示区域之内。
应理解,该第一位置可以是从第二电子设备发送的位置信息中实时获取的光标的位置。当确定该第一位置未在实际显示内容的区域时,可以对第一位置进行修正,使得修正好的第二位置位于实际显示内容的区域内。
740,第一电子设备在第二位置处显示光标。
第二位置为对第一位置修正后,光标所在的位置,此时第一设备可以在第二位置处显示光标。
示例性地,参见图5,第一电子设备为智能电视,该第二位置可以是C(x3,y3),则智能电视可以在C点显示光标521。
在另一些实施例中,第一电子设备还可以在第二位置处响应用户的点击、拖动等操作。
本申请实施例中,第一电子设备可以从接收的控制指令中获取光标的位置信息,并根据该位置信息确定光标是否处于其实际显示内容的目标显示区域内,当光标的第一位置未在目标显示区域内时,对光标的第一位置进行修正,使得修正后的第二位置位于目标显示区域中。该技术方案可以在用户通过第二电子设备控制第一电子设备时,使得光标始终处于实际显示内容的区域中,从而能够提升用户的操作效率,提升了用户体验。
在一些实施例中,该方法700还可以包括:
在确定第一位置处于目标显示区域之内时,第一电子设备在第一位置处显示光标。
该技术方案中,当第一位置处于实际显示内容的目标显示区域内时,可以直接在第一位置处显示光标。从而能够提升用户的操作效率。
在一些实施例中,在第一电子设备根据位置信息确定光标的第一位置是否处于目标显示区域之内之前,该方法700还可以包括:
第一电子设备获取目标显示区域。
本申请实施例中,第一电子设备需要先确定显示屏中的哪些区域属于目标显示区域,从而有利于后续判断光标的位置。
在一些实施例中,第一电子设备获取目标显示区域,包括:
第一电子设备通过系统接口获取目标显示区域。
在一些情况下,例如,第一电子设备上安装了手机或平板应用,当第一电子设备运行这些应用时,可以通过自身的系统接口直接获取到实际显示内容的区域。
本申请实施例中,第一电子设备通过系统接口可以直接获取到目标显示区域,从而使得方案简单易于实现。
在一些实施例中,第一电子设备获取目标显示区域,包括:
第一电子设备对第一电子设备的显示屏进行截屏处理,获取显示屏的第一画面;第一电子设备从第一画面中确定目标显示区域。
在一些投屏的场景下,第一电子设备可能无法直接从系统接口获取到目标显示区域,此时第一电子设备可以获取显示屏的画面,并根据该画面来确定目标显示区域。
示例性地,参见图6,第一电子设备对显示屏进行截图,得到显示画面610,并根据该显示画面610确定目标显示区域。
本申请实施例中,第一电子设备需要先确定显示屏中的哪些区域属于目标显示区域,从而有利于后续判断光标的位置。
在一些实施例中,第一电子设备从第一画面中确定目标显示区域,包括:第一电子设备从第一画面中的每一行像素中抽取n个像素点,从第一画面中的每一列像素中抽取m个像素点;第一电子设备将该n个像素点的亮度值求和得到第一亮度值s1和将该m个像素点的亮度值求和得到第二亮度值s2;当第一电子设备确定第q行的第一亮度值s1q>(n*b)+δ时,确定第q行的部分像素点属于所述目标显示区域,当第一电子设备确定第p列的第二亮度值s2p>(m*b)+δ时,确定第p列的部分像素点属于所述目标显示区域,其中,b表示像素点为黑色的亮度值,δ为预设误差值,q和p均为整数。
应理解,第一亮度值s1为对一行像素点抽取n个像素点的亮度值的叠加。第二亮度值s2为对一列像素点抽取m个像素点的亮度值的叠加。
示例性地,第一电子设备通过上述计算方法确定第q行或第p列的像素点是否属于目标显示区域的具体描述可以参见图6中的相关描述,为了简洁不再赘述。
应理解,通过上述的计算方式分别可以确定目标显示区域的上下边界和左右边界,从而可以确定完整的目标显示区域。
应理解,本申请实施例对于m、n的获取方式不予限定,例如可以以相同间隔或不同间隔的方式抽取m、n,也可以随机抽取m、n等。本申请实施例对于m、n的具体取值不予限定,例如,m为108,n为192,或者,m为54,n为96;或者,m和n也可以相同,也可以不同。
在另一个实施例中,第一电子设备还可以获取投屏视频流的一帧的画面,从而也可以获取整个显示画面。
本申请实施例中,可以对第一画面中包括的每一行每一列像素点进行判断,根据判断的结果可以确定目标显示区域的各个边界,从而可以确定目标显示区域。
在一些实施例中,第一电子设备根据位置信息确定光标的第一位置是否处于目标显示区域之内,包括:第一电子设备根据第一位置的坐标和目标显示区域的顶点坐标确定第一位置是否处于目标显示区域之内。
示例性地,参见图5,第一电子设备可以通过对比光标的实时位置和显示界面520的顶点坐标,可以确定光标的位置是否在显示界面520所在的区域。
本申请实施例中,可以根据光标的位置的坐标和目标显示区域的顶点坐标来确定光标的位置是否处于目标显示区域之内,从而有利于第一电子设备进一步确定是否对光标位置进行修正。
在一些实施例中,在确定第一位置未处于目标显示区域之内时,第一电子设备对所述第一位置进行修正,得到第二位置,包括:
若第一位置的横坐标小于目标显示区域的第一边界所在直线的横坐标,则将第一位置的横坐标修正为第一边界所在直线的横坐标,作为第二位置的横坐标;
若第一位置横坐标大于目标显示区域的与第一边界平行的第二边界所在的直线的横坐标,则将第一位置的横坐标修正为第二边界所在的直线的横坐标,作为第二位置的横坐标;
若第一位置的纵坐标小于目标显示区域的第三边界所在直线的纵坐标,则将第一位置的纵坐标修正为第三边界所在直线的纵坐标,作为第二位置的纵坐标;或者,
若第一位置的纵坐标大于目标显示区域的与第三边界平行的第四边界所在直线的纵坐标,则将第一位置的纵坐标修正为第四边界所在直线的纵坐标,作为第二位置的纵坐标。
示例性地,参见图5,该第一边界可以是AD,当第一位置的横坐标小于该AD所在直线的横坐标 x1时,可以将第一位置的横坐标修正为x1。
该第二边界可以是EB,当第一位置的横坐标大于该EB所在直线的横坐标x2时,可以将第一位置的横坐标修正为x2。
该第三边界可以是AE,当第一位置的纵坐标小于该AE所在直线的纵坐标y1时,可以将第一位置的纵坐标修正为y1。
该第四边界可以是DB,当第一位置的纵坐标大于该DB所在直线的纵坐标y2时,可以将第一位置的纵坐标修正为y2。
基于本申请实施例,可以对位于目标显示区域之外的光标的位置修正为位于目标显示区域之内,从而可以使得光标在目标显示区域内移动,从而可以提升用户的操作效率。
在一些实施例中,在第一电子设备接收第二电子设备的控制指令之前,该方法700还可以包括:第一电子设备与第二电子设备建立连接关系。
应理解,本申请实施例对于第一电子设备与第二电子设备建立连接关系的方式不予限定。例如,可以是通过WLAN、蓝牙、超宽带(ultra wide band,UWB)、有线等连接方式。
在一些实施例中,该控制指令为用户在第二电子设备中的应用程序中输入的。
在另一些实施例中,本申请实施例还提供一种显示方法,该显示方法应用于显示系统,该显示系统包括第一电子设备、第二电子设备和第三电子设备,该方法包括:
第一电子设备接收第二电子设备的控制指令,所述控制指令包括光标的位置信息;
第一电子设备根据位置信息确定光标的第一位置是否处于目标显示区域之内,目标显示区域为第三电子设备实际显示内容的区域;
在确定第一位置未处于目标显示区域之内时,第一电子设备对第一位置进行修正,得到第二位置,第二位置位于目标显示区域之内;
第一电子设备向第三电子设备发送所述光标的第二位置;
第三电子设备在所述第二位置处显示所述光标。
本申请实施例中,第三电子设备可以作为第一电子设备的显示设备。
应理解,该实施例中,第一电子设备获取目标显示区域、确定第一位置是否处于目标显示区域之内、对第一位置进行修正的具体描述可以参见前文中的相关描述,为了简洁不再赘述。
图8是本申请实施例提供的一种显示装置的示意性框架图。如图8所示,该显示装置800可以包括接收模块810、处理模块820和显示模块830。
其中,该接收模块810可以用于,接收控制指令,控制指令包括光标的位置信息。
该处理模块820可以用于,根据位置信息确定光标的第一位置是否处于目标显示区域之内,目标显示区域为显示装置实际显示内容的区域。
该处理模块820还用于,在确定第一位置未处于目标显示区域之内时,对第一位置进行修正,得到第二位置,第二位置位于目标显示区域之内。
该显示模块830可以用于,在第二位置处显示光标。
在一些实施例中,该显示装置800可以是前文中的显示设备400b。例如,可以是智能电视、笔记本电脑、智慧屏等大屏设备。
在一些实施例中,在处理模块820确定第一位置处于目标显示区域之内时,显示模块830还用于:在第一位置处显示所述光标。
在一些实施例中,在处理模块820根据位置信息确定光标的第一位置是否处于目标显示区域之内之前,处理模块820还用于:获取目标显示区域。
在一些实施例中,处理模块820具体用于:通过系统接口获取目标显示区域。
在一些实施例中,处理模块820具体用于:对显示装置的显示屏进行截屏处理,获取显示屏的第一画面;从第一画面中确定所述目标显示区域。
在一些实施例中,所述处理模块820具体用于:
从第一画面中的每一行像素中抽取n个像素点,从第一画面中的每一列像素中抽取m个像素点;
将n个像素点的亮度值求和得到第一亮度值s1和将m个像素点的亮度值求和得到第二亮度值s2;当确定第q行的第一亮度值s1q>(n*b)+δ时,确定第q行的部分像素点属于目标显示区域,当确定第p列的第二亮度值s2p>(m*b)+δ时,确定第p列的部分像素点属于目标显示区域,其中,b表示 像素点为黑色的亮度值,δ为预设误差值,q和p均为整数。
在一些实施例中,处理单元820具体用于:根据第一位置的坐标和目标显示区域的顶点坐标确定第一位置是否处于目标显示区域之内。
在一些实施例中,所述处理单元820具体用于:
若第一位置的横坐标小于目标显示区域的第一边界所在直线的横坐标,则将第一位置的横坐标修正为第一边界所在直线的横坐标,作为第二位置的横坐标;
若第一位置横坐标大于目标显示区域的与第一边界平行的第二边界所在的直线的横坐标,则将第一位置的横坐标修正为第二边界所在的直线的横坐标,作为第二位置的横坐标;
若第一位置的纵坐标小于目标显示区域的第三边界所在直线的纵坐标,则将第一位置的纵坐标修正为第三边界所在直线的纵坐标,作为第二位置的纵坐标;或者,
若第一位置的纵坐标大于目标显示区域的与第三边界平行的第四边界所在直线的纵坐标,则将第一位置的纵坐标修正为第四边界所在直线的纵坐标,作为第二位置的纵坐标。
在一些实施例中,在接收模块810接收控制指令之前,所述处理模块820还用于:
与第二电子设备建立连接关系。
图9是本申请实施例提供的一种电子设备的示意性框架图。如图9所示,该电子设备900可以包括一个或多个处理器910;一个或多个存储器920;该一个或多个存储器920存储有一个或多个计算机程序,该一个或多个计算机程序包括指令,当该指令被一个或多个处理器执行时,使得如前文中任一种可能的实现方式中所述的显示方法被执行。
在一些实施例中,该电子设备900可以是前文中的显示设备400b。例如,可以是智能电视、笔记本电脑、智慧屏等大屏设备。
本申请实施例还提供一种芯片,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如前文中任一种可能的实现方式中所述的显示方法被执行。
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
本实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的显示方法。
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的显示方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的显示方法。
其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (12)

  1. 一种显示方法,其特征在于,所述方法应用于第一电子设备,所述方法包括:
    所述第一电子设备接收第二电子设备的控制指令,所述控制指令包括光标的位置信息;
    所述第一电子设备根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内,所述目标显示区域为所述第一电子设备实际显示内容的区域;
    在确定所述第一位置未处于所述目标显示区域之内时,所述第一电子设备对所述第一位置进行修正,得到第二位置,所述第二位置位于所述目标显示区域之内;
    所述第一电子设备在所述第二位置处显示所述光标。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在确定所述第一位置处于所述目标显示区域之内时,所述第一电子设备在所述第一位置处显示所述光标。
  3. 根据权利要求1或2所述的方法,其特征在于,在所述第一电子设备根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内之前,所述方法还包括:
    所述第一电子设备获取所述目标显示区域。
  4. 根据权利要求3所述的方法,其特征在于,所述第一电子设备获取所述目标显示区域,包括:
    所述第一电子设备通过系统接口获取所述目标显示区域。
  5. 根据权利要求3所述的方法,其特征在于,所述第一电子设备获取所述目标显示区域,包括:
    所述第一电子设备对所述第一电子设备的显示屏进行截屏处理,获取所述显示屏的第一画面;
    所述第一电子设备从所述第一画面中确定所述目标显示区域。
  6. 根据权利要求5所述的方法,其特征在于,所述第一电子设备从所述第一画面中确定所述目标显示区域,包括:
    所述第一电子设备从所述第一画面中的每一行像素中抽取n个像素点,从所述第一画面中的每一列像素中抽取m个像素点;
    所述第一电子设备将所述n个像素点的亮度值求和得到第一亮度值s1和将所述m个像素点的亮度值求和得到第二亮度值s2;
    当所述第一电子设备确定第q行的第一亮度值s1q>(n*b)+δ时,确定所述第q行的部分像素点属于所述目标显示区域,当所述第一电子设备确定第p列的第二亮度值s2p>(m*b)+δ时,确定所述第p列的部分像素点属于所述目标显示区域,其中,b表示像素点为黑色的亮度值,δ为预设误差值,q和p均为整数。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述第一电子设备根据所述位置信息确定所述光标的第一位置是否处于目标显示区域之内,包括:
    所述第一电子设备根据所述第一位置的坐标和所述目标显示区域的顶点坐标确定所述第一位置是否处于目标显示区域之内。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述在确定所述第一位置未处于所述目标显示区域之内时,所述第一电子设备对所述第一位置进行修正,得到第二位置,包括:
    若所述第一位置的横坐标小于所述目标显示区域的第一边界所在直线的横坐标,则将所述第一位置的横坐标修正为所述第一边界所在直线的横坐标,作为所述第二位置的横坐标;
    若所述第一位置横坐标大于所述目标显示区域的与所述第一边界平行的第二边界所在的直线的横坐标,则将所述第一位置的横坐标修正为所述第二边界所在的直线的横坐标,作为所述第二位置的横坐标;
    若所述第一位置的纵坐标小于所述目标显示区域的第三边界所在直线的纵坐标,则将所述第一位置的纵坐标修正为所述第三边界所在直线的纵坐标,作为所述第二位置的纵坐标;或者,
    若所述第一位置的纵坐标大于所述目标显示区域的与所述第三边界平行的第四边界所在直线的纵坐标,则将所述第一位置的纵坐标修正为所述第四边界所在直线的纵坐标,作为所述第二位置的纵坐标。
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,在所述第一电子设备接收第二电子设备 的控制指令之前,所述方法还包括:
    所述第一电子设备与所述第二电子设备建立连接关系。
  10. 一种电子设备,其特征在于,包括:一个或多个处理器;一个或多个存储器;该一个或多个存储器存储有一个或多个计算机程序,该一个或多个计算机程序包括指令,当该指令被一个或多个处理器执行时,使得如权利要求1-9中任一项所述的显示方法被执行。
  11. 一种芯片,其特征在于,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如权利要求1-9中任一项所述的显示方法被执行。
  12. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在计算机上运行时,使得如权利要求1-9中任一项所述的显示方法被执行。
PCT/CN2023/106545 2022-07-15 2023-07-10 显示方法和电子设备 WO2024012402A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210836674.XA CN117435086A (zh) 2022-07-15 2022-07-15 显示方法和电子设备
CN202210836674.X 2022-07-15

Publications (1)

Publication Number Publication Date
WO2024012402A1 true WO2024012402A1 (zh) 2024-01-18

Family

ID=89535610

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/106545 WO2024012402A1 (zh) 2022-07-15 2023-07-10 显示方法和电子设备

Country Status (2)

Country Link
CN (1) CN117435086A (zh)
WO (1) WO2024012402A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6440799B1 (ja) * 2017-10-27 2018-12-19 一 榎 マルチ画面システムに対して表示ポインタの位置補正を行う補正装置、プログラム、およびサービス提供方法
CN111880870A (zh) * 2020-06-19 2020-11-03 维沃移动通信有限公司 控制电子设备的方法、装置和电子设备
CN112527222A (zh) * 2019-09-19 2021-03-19 华为技术有限公司 一种信息处理方法及电子设备
CN112558825A (zh) * 2019-09-26 2021-03-26 华为技术有限公司 一种信息处理方法及电子设备
CN114153348A (zh) * 2020-09-04 2022-03-08 华为终端有限公司 光标提示方法和主机

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6440799B1 (ja) * 2017-10-27 2018-12-19 一 榎 マルチ画面システムに対して表示ポインタの位置補正を行う補正装置、プログラム、およびサービス提供方法
CN112527222A (zh) * 2019-09-19 2021-03-19 华为技术有限公司 一种信息处理方法及电子设备
CN112558825A (zh) * 2019-09-26 2021-03-26 华为技术有限公司 一种信息处理方法及电子设备
CN111880870A (zh) * 2020-06-19 2020-11-03 维沃移动通信有限公司 控制电子设备的方法、装置和电子设备
CN114153348A (zh) * 2020-09-04 2022-03-08 华为终端有限公司 光标提示方法和主机

Also Published As

Publication number Publication date
CN117435086A (zh) 2024-01-23

Similar Documents

Publication Publication Date Title
US8398246B2 (en) Real-time projection management
US8818027B2 (en) Computing device interface
US10802663B2 (en) Information processing apparatus, information processing method, and information processing system
US20220319139A1 (en) Multi-endpoint mixed-reality meetings
Schmitz et al. Ad-Hoc Multi-Displays for Mobile Interactive Applications.
US6594616B2 (en) System and method for providing a mobile input device
CN108347657B (zh) 一种显示弹幕信息的方法和装置
WO2022166927A1 (zh) 基于远程桌面的光标显示方法、装置、介质及电子设备
CN110502293B (zh) 一种截屏方法及终端设备
US9691357B2 (en) Information processing method and electronic device thereof, image calibration method and apparatus, and electronic device thereof
CN110139040B (zh) 云台摄像机定位的方法、装置、云台摄像机、设备及介质
CN111309203B (zh) 一种鼠标光标的定位信息的获取方法及装置
JP2013106352A (ja) 画像中の投影領域の決定方法、及び装置
WO2022088974A1 (zh) 一种遥控方法、电子设备及系统
WO2023193639A1 (zh) 图像渲染方法、装置、可读介质及电子设备
CN110781823A (zh) 录屏检测方法、装置、可读介质及电子设备
WO2024037556A1 (zh) 图像处理方法、装置、设备及存储介质
CN114240754A (zh) 投屏处理方法、装置、电子设备及计算机可读存储介质
WO2024012402A1 (zh) 显示方法和电子设备
WO2024045770A1 (zh) 内容控制方法、装置、存储介质及电子设备
CN115657893A (zh) 一种显示控制方法、显示控制装置及智能设备
US11256466B2 (en) Information processing apparatus, information processing method, and recording medium recording information processing program
CN112308767A (zh) 一种数据展示方法、装置、存储介质以及电子设备
US20210390927A1 (en) Information processing apparatus, information processing method, and program
JP2021056899A (ja) 画像処理装置、画像処理方法およびプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23838894

Country of ref document: EP

Kind code of ref document: A1