Resolution setting method, device, electronic device and storage medium

By detecting the status information of the external display and adding supported resolution information to the configuration information of the electronic device, the problem of mismatch between the resolutions of the electronic device and the external display is solved, and a stable image display effect is achieved.

CN117032610BActive Publication Date: 2025-02-25龙芯中科(成都)技术有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310871476.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2025-02-25
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

The resolution supported by the electronic device does not match the external display, resulting in problems such as missing frames in the image display.

Method used

By detecting the status information of the external display, filtering out the resolution information it supports, and adding the resolution information to the configuration information of the electronic device, thereby setting the target resolution of the display port.

Benefits of technology

It effectively avoids the problem of image display loss due to resolution mismatch and improves the image display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117032610B_ABST
    Figure CN117032610B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a resolution setting method, device, electronic device and storage medium, which are applied to electronic devices, and the method includes: when detecting an event that an external display is connected to the display port of the electronic device, obtaining the status information of the external display; filtering the status information to obtain the first resolution information of the external display; when the first resolution information does not exist in the built-in configuration information of the electronic device, adjusting the configuration information according to the first resolution information to add the first resolution information to the configuration information; setting the target resolution corresponding to the display port according to the first resolution information. The embodiment of the present invention can adaptively adjust the configuration information of the electronic device to adapt the target resolution for the connected external display, which is conducive to improving the image display effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a resolution setting method, device, electronic equipment and storage medium. Background Art

[0002] There are many types of external monitors on the market, and different external monitors support different resolutions. For example, some external monitors support a resolution of 1024*768, and some external monitors support a resolution of 1024*820, and so on. The external monitor is connected to an electronic device with a display output function through a High Definition Multimedia Interface (HDMI) to output image information. Among them, the HDMI protocols supported by the electronic device and the external monitor may be different. For example, one supports the HDMI2.0 protocol and the other supports the HDMI1.4 protocol. Different HDMI protocols usually support different resolutions. If the resolutions supported by the electronic device and the external monitor do not match, the external monitor cannot normally display the image information output by the electronic device. Summary of the invention

[0003] The embodiments of the present invention provide a method and device for setting resolution, an electronic device and a storage medium, which can solve the problem of mismatch between the resolution supported by the electronic device and the external display.

[0004] In order to solve the above problem, an embodiment of the present invention discloses a resolution setting method, which is applied to an electronic device, and the method includes:

[0005] When an event that an external display is connected to the display port of the electronic device is detected, obtaining status information of the external display;

[0006] Filtering the status information to obtain first resolution information of the external display;

[0007] When the first resolution information does not exist in the configuration information built into the electronic device, adjusting the configuration information according to the first resolution information to add the first resolution information to the configuration information;

[0008] The target resolution corresponding to the display port is set according to the first resolution information.

[0009] Optionally, the electronic device includes a first process; when an event that an external display is connected to a display port of the electronic device is detected, acquiring status information of the external display includes:

[0010] When an event that an external display is connected to the display port is detected, the first process is run; the first process is used to obtain status information of the external display.

[0011] Optionally, the electronic device further includes a second process and a third process; and when the first resolution information does not exist in the configuration information built into the electronic device, adjusting the configuration information according to the first resolution information to add the first resolution information to the configuration information includes:

[0012] The second process receives a first bus signal sent by the first process; the first bus signal is used to indicate the first resolution information;

[0013] The second process compares the first resolution information with configuration information built into the electronic device;

[0014] In a case where the first resolution information does not exist in the configuration information, the second process sends the first bus signal to the third process to trigger the third process to add the first resolution information to the configuration information.

[0015] Optionally, setting a target resolution corresponding to the display port according to the first resolution information includes:

[0016] In a case where the first resolution information exists in the configuration information, the second process is run to set the target resolution corresponding to the display port according to the first resolution information.

[0017] Optionally, the method further comprises:

[0018] The second process sends a second bus signal to the first process; the second bus signal is used to indicate that the second process has received the first bus signal;

[0019] The first process continues to send the first bus signal to the second process until it stops after receiving the second bus signal.

[0020] Optionally, the method further comprises:

[0021] The third process sends a third bus signal to the second process when the first resolution information is successfully added to the configuration information; the third bus signal is used to indicate that the first resolution information has been added to the configuration information;

[0022] When the second process receives the third bus signal, it sets the target resolution corresponding to the display port according to the first resolution information.

[0023] Optionally, the method further comprises:

[0024] Obtain image information to be displayed;

[0025] The image information is displayed on the external display according to the target resolution.

[0026] On the other hand, an embodiment of the present invention discloses a resolution setting device, which is applied to an electronic device, and the device includes:

[0027] A resolution acquisition module, configured to acquire status information of the external display when detecting that an external display is connected to the display port of the electronic device;

[0028] A screening module, used for screening the state information to obtain the first resolution information of the external display;

[0029] A first setting module, configured to adjust the configuration information according to the first resolution information so as to add the first resolution information to the configuration information when the first resolution information does not exist in the configuration information built into the electronic device;

[0030] The second setting module is used to set the target resolution corresponding to the display port according to the first resolution information.

[0031] Optionally, the electronic device includes a first process; the resolution acquisition module includes:

[0032] The acquisition submodule is used to run the first process when an event that an external display is connected to the display port is detected; the first process is used to obtain status information of the external display.

[0033] Optionally, the electronic device further includes a second process and a third process, the second process includes the first setting module, and the first setting module includes:

[0034] A receiving submodule, configured to receive a first bus signal sent by the first process; the first bus signal is used to indicate the first resolution information;

[0035] A comparison submodule, used for comparing the first resolution information with the configuration information built into the electronic device;

[0036] The sending submodule is used to send the first bus signal to the third process when the first resolution information does not exist in the configuration information, so as to trigger the third process to add the first resolution information to the configuration information.

[0037] Optionally, the second setting module includes:

[0038] The setting submodule is used to run the second process when the first resolution information exists in the configuration information, and the second process is used to set the target resolution corresponding to the display port according to the first resolution information.

[0039] Optionally, the second process also includes:

[0040] A first sending module, configured to send a second bus signal to the first process; the second bus signal is used to indicate that the second process has received the first bus signal;

[0041] The first process includes:

[0042] The second sending module is used to continuously send the first bus signal to the second process until it stops after receiving the second bus signal.

[0043] Optionally, the third process includes:

[0044] A third sending module is used to send a third bus signal to the second process when the first resolution information is successfully added to the configuration information; the third bus signal is used to indicate that the first resolution information has been added to the configuration information;

[0045] The second process also includes:

[0046] The third setting module is used to set the target resolution corresponding to the display port according to the first resolution information when the third bus signal is received.

[0047] Optionally, the device further comprises:

[0048] An image acquisition module, used to acquire image information to be displayed;

[0049] An image display module is used to display the image information on the external display according to the target resolution.

[0050] On the other hand, an embodiment of the present invention further discloses an electronic device, which includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to execute the aforementioned resolution setting method.

[0051] The embodiment of the present invention further discloses a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the aforementioned resolution setting method.

[0052] The embodiments of the present invention include the following advantages:

[0053] An embodiment of the present invention provides a resolution setting method. When the resolution of an electronic device and a connected external display do not match, the configuration information of the electronic device can be adaptively adjusted to adapt the target resolution for the connected external display. This can effectively avoid problems such as image display frame loss caused by the mismatch between the resolution supported by the electronic device and the external display, and is beneficial to improving the image display effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0055] Figure 1 is a flowchart of steps of a resolution setting embodiment of the present invention;

[0056] Figure 2 It is a schematic diagram of the architecture of an application scenario of the present invention;

[0057] Figure 3 is a resolution setting flow chart of the present invention;

[0058] Figure 4 is a structural block diagram of an embodiment of a resolution setting device of the present invention;

[0059] Figure 5 The present invention provides an example of an electronic device for setting resolution. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] Method Embodiment

[0062] Reference Figure 1 , shows a flowchart of a method for setting resolution according to an embodiment of the present invention, the method is applied to an electronic device, and the method may specifically include the following steps:

[0063] Step 101: when an event that an external display is connected to a display port of the electronic device is detected, obtaining status information of the external display;

[0064] Step 102: Filter the status information to obtain first resolution information of the external display;

[0065] Step 103: if the first resolution information does not exist in the configuration information built into the electronic device, adjust the configuration information according to the first resolution information to add the first resolution information to the configuration information;

[0066] Step 104: Set a target resolution corresponding to the display port according to the first resolution information.

[0067] An embodiment of the present invention provides a method for setting resolution, which can be applied to an electronic device having a display output function. Figure 2 , shows a schematic diagram of the architecture of an application scenario in an embodiment of the present invention. Figure 2 As shown, the electronic device is connected to the external display via a connecting cable. It is understandable that one end of the connecting cable is inserted into the display port of the electronic device, and the other end is inserted into the input port of the external display. The display port may include an HDMI interface, a video graphics array (VGA) interface, a digital video interface standard (Display Port, DP) interface, and the like. For example, the two ends of the HDMI cable are respectively inserted into the HDMI interface of the electronic device and the input port of the external display. Among them, the electronic device may include but is not limited to a server, a computer host, a personal computer, a television, a TV box, a DVD player, an amplifier, and the like. Further, the electronic device may be equipped with an embedded operating system, such as Linux, uClinux, VxWorks, and the like, and the resolution setting method provided by the embodiment of the present invention is implemented by the embedded operating system, so as to output image information according to the set target resolution and display it in the external display.

[0068] If it is detected that an external display is connected to the display port, the status information of the external display can be obtained, and the obtained status information can be filtered to obtain the first resolution information of the external display. The status information includes the resolution information supported by the external display, and the first resolution information is any resolution supported by the external display. In a possible application scenario, the first resolution information includes the optimal resolution information that the external display can support. The configuration information is used to indicate the resolution supported by the electronic device.

[0069] It is understandable that the electronic device can obtain the status information of the external display in a variety of ways, and the embodiment of the present invention does not specifically limit this. For example, the electronic device can obtain the status information of the connected external display with the help of resolution test tools such as Mode Test, Monitor Test, LCD Test, etc.

[0070] The first resolution information of the external display is compared with the built-in configuration information of the electronic device. If the first resolution information of the external display does not exist in the built-in configuration information of the electronic device, it means that the electronic device does not support the first resolution information at this time. In this case, the configuration information of the electronic device can be adjusted according to the first resolution information, that is, the first resolution information is added to the configuration information, and the electronic device is adapted to the first resolution information supported by the external display, so that the electronic device can output image information with the first resolution information and display it on the external display. It should be noted that the configuration information of the electronic device is usually saved in the configuration file of the electronic device, so the configuration file of the electronic device can be modified to add the first resolution information to its configuration information. Exemplarily, the configuration information of the electronic device can be modified by an extended configuration tool, such as xrandr, xorg, etc., and the first resolution information of the external display can be added to its built-in configuration information.

[0071] If the first resolution information of the external display is present in the built-in configuration information of the electronic device, it means that the electronic device supports the first resolution information. In this case, the target resolution corresponding to the display port connected to the external display can be directly set according to the first resolution information. Then, the image information is output at the target resolution and displayed on the external display.

[0072] Optionally, the method further includes: acquiring image information to be displayed; and displaying the image information on the external display according to the target resolution.

[0073] The image information may include but is not limited to video streams, pictures, animations, etc. The electronic device may output the image information to an external display through a display port, and display the image information on the external display according to a target resolution.

[0074] As an example, assume that an external display is connected to an electronic device through an HDMI port, the first resolution information of the external display is 1024*820, and the built-in configuration information of the electronic device includes 1024*768, 1152*864, and 800*600. Obviously, the first resolution information 1024*820 does not exist in the configuration information. In this case, the configuration information of the electronic device can be modified through xrandr to add the first resolution information of the external display to its built-in configuration information. After the modification, the configuration information of the electronic device includes the first resolution information 1024*820 supported by the external display, and 1024*820 is directly set as the target resolution corresponding to the display port HDMI, so that the image information is output and displayed to the external display through the HDMI port with a resolution of 1024*820.

[0075] It can be understood that the resolution setting method provided in the embodiment of the present invention can also be used to set the target resolution and perform display control for each external display separately when the electronic device is connected to multiple external displays. Specifically, for each external display connected to the display port, its corresponding target resolution is set according to steps 101 to 103, and then the image information to be displayed is output from the display port to the external display according to the target resolution. The target resolution corresponding to each external display can be the same or different. Furthermore, based on the connection relationship between the external display and the display port, a mapping relationship between the external display and the display port, as well as a mapping relationship between the display port and the target resolution can be established, so as to accurately output the image information to the corresponding external display according to the target resolution, thereby realizing independent control of each external display.

[0076] As an example, assume that the external display X0 is connected to the electronic device through the display port HDMI-0, the external display X1 is connected to the electronic device through the display port HDMI-1, and the external display X2 is connected to the electronic device through the display port HDMI-2, wherein the first resolution information of the external display X0 is 1024*820, the first resolution information of the external display X1 is 1152*864, the first resolution information of the external display X2 is 1280*1024, and the built-in configuration information of the electronic device includes 1024*768, 1152*864, and 800*600. For the external display X0, perform steps 101 and 102, add 1024*820 to the configuration information of the electronic device, and then determine 1024*820 as the target resolution corresponding to the display port HDMI-0. For the external display X1, the configuration information includes the first resolution information 1152*864 of the external display X1, so 1152*864 can be directly determined as the target resolution corresponding to the display port HDMI-1. For the external display X2, execute steps 101 and 102, add 1280*1024 to the configuration information of the electronic device, and then determine 1280*1024 as the target resolution corresponding to the display port HDMI-2. Finally, output the image information to be displayed in each external display through the display port and target resolution corresponding to each external display.

[0077] The resolution setting method provided in an embodiment of the present invention can adaptively adjust the configuration information of the electronic device to adapt the target resolution for the connected external display when the resolution of the electronic device and the connected external display do not match. This can effectively avoid problems such as image display frame loss caused by the mismatch between the resolution supported by the electronic device and the external display, and is conducive to improving the image display effect.

[0078] In an optional embodiment of the present invention, the electronic device includes a first process; when an event that an external display is connected to a display port of the electronic device is detected in step 101, obtaining status information of the external display includes:

[0079] When an event that an external display is connected to the display port is detected, the first process is run; the first process is used to obtain status information of the external display.

[0080] In an embodiment of the present invention, the state information of the connected external display can be detected by a first process, and the detected state information can be filtered to obtain the first resolution information of the external display. The first process can be a resolution detection process, such as Mode Test, Monitor Test, and so on.

[0081] Optionally, the electronic device further includes a second process and a third process; in step 102, when the first resolution information does not exist in the configuration information built into the electronic device, adjusting the configuration information according to the first resolution information to add the first resolution information to the configuration information includes:

[0082] Step S11: the second process receives a first bus signal sent by the first process; the first bus signal is used to indicate the first resolution information;

[0083] Step S12: the second process compares the first resolution information with the configuration information built into the electronic device;

[0084] Step S13: When the first resolution information does not exist in the configuration information, the second process sends the first bus signal to the third process to trigger the third process to add the first resolution information to the configuration information.

[0085] In the embodiment of the present invention, adaptive setting of resolution can be achieved through three processes in a coordinated manner.

[0086] Specifically, the first process can detect the external display access event, and when it is detected that the external display is connected to the display port, the external display status information is obtained and the first resolution information is filtered out. The first process transmits the obtained first resolution information to the second process.

[0087] It should be noted that processes can communicate with each other through a message bus system (Desktop-Bus, D-Bus). Exemplarily, the first process can transmit the first resolution information of the external display to the second process through a first bus signal. It can be understood that the first bus signal is a bus signal corresponding to the first resolution information. After determining the first resolution information, the first process converts the first resolution information into a first bus signal and sends it to the second process.

[0088] After receiving the first resolution information, the second process compares the first resolution information with the configuration information built into the electronic device. If the first resolution information of the external display does not exist in the configuration information, the second process can transmit the first resolution information to the third process by sending a first bus signal to the third process.

[0089] After receiving the first bus signal, the third process modifies the configuration information of the electronic device and adds the first resolution information to the configuration information so that the second process can set the target resolution.

[0090] Optionally, setting a target resolution corresponding to the display port according to the first resolution information includes:

[0091] In a case where the first resolution information exists in the configuration information, the second process is run, and the second process is used to set a target resolution corresponding to the display port according to the first resolution information.

[0092] If the configuration information contains the first resolution information of the external display, the second process can directly set the target resolution corresponding to the display port according to the first resolution information without triggering the third process.

[0093] In an optional embodiment of the present invention, the method further includes:

[0094] Step S21: the second process sends a second bus signal to the first process; the second bus signal is used to indicate that the second process has received the first bus signal;

[0095] Step S22: The first process continues to send the first bus signal to the second process until it receives the second bus signal and stops.

[0096] In the embodiment of the present invention, a signal handshake protection mechanism may be used between processes to communicate, so as to prevent abnormal resolution setting caused by abnormal conditions such as information not being sent or not being received normally after being sent.

[0097] Exemplarily, after acquiring the first resolution information of the connected external display, the first process may continue to send the first bus signal to the second process (according to a preset period). After receiving the first bus signal, the second process feeds back a second bus signal to the first process to indicate that the first bus signal has been received. When the first process receives the second bus signal, it may no longer send the first bus signal. If the first process does not receive the second bus signal, the first bus signal is repeatedly sent to the second process to ensure that the second process receives the first bus signal normally and that subsequent processing can proceed normally.

[0098] Optionally, the method further comprises:

[0099] Step S31: When the third process successfully adds the first resolution information to the configuration information, the third process sends a third bus signal to the second process; the third bus signal is used to indicate that the first resolution information has been added to the configuration information;

[0100] Step S32: When the second process receives the third bus signal, the second process sets the target resolution corresponding to the display port according to the first resolution information.

[0101] After the third process receives the first bus signal sent by the second process, it modifies the configuration information of the electronic device, adds the first resolution information to the configuration information, and after completing the addition of the first resolution information, sends a third bus signal to the second process to inform the second process that the first resolution information has been added to the configuration information.

[0102] After receiving the third bus signal, the second process sets the target resolution corresponding to the display port connected to the external display according to the first resolution information, and then outputs the image information according to the set target resolution and displays it on the external display.

[0103] Reference Figure 3 , shows a resolution setting flow chart provided by an embodiment of the present invention. Figure 3 As shown, the external display X0 is connected to the electronic device via the display port HDMI-0, the external display X1 is connected to the electronic device via the display port HDMI-1, and the external display X2 is connected to the electronic device via the display port HDMI-2. Among them, the first resolution information of the external display X0 is 1024*820, the first resolution information of the external display X1 is 1152*864, and the first resolution information of the external display X2 is 1280*1024. The built-in configuration information of the electronic device includes 1024*768, 1152*864, and 800*600. Figure 3 Taking as an example, the specific processing procedure of the first process, the second process and the third process in the embodiment of the present invention cooperating to realize the adaptive setting of the resolution is described.

[0104] When the first process detects that an external display is connected to the display port HDMI-0, it obtains the current status information of the external display X0, and filters the obtained status information to obtain the first resolution information of the external display X0 as 1024*820. Then, the first resolution information is sent to the second process through the first bus signal.

[0105] After receiving the first resolution information, the second process compares the first resolution information with the configuration information built into the electronic device. At this time, the first resolution information 1024*820 of the external display X0 does not exist in the configuration information. Therefore, the second process sends a first bus signal to the third process to pass the first resolution information to the third process. In addition, the second process feeds back a second bus signal to the first process to inform the first process that the first bus signal has been received.

[0106] After receiving the first bus signal sent by the second process, the third process modifies the configuration information of the electronic device, adds the first resolution information 1024*820 to the configuration information, and after completing the addition of the first resolution information, sends the third bus signal to the second process.

[0107] After receiving the third bus signal, the second process sets the target resolution corresponding to the display port HDMI-0 to 1024*820.

[0108] When the first process detects that an external display is connected to the display port HDMI-1, it obtains the current status information of the external display X1, and filters the obtained status information to obtain the first resolution information of the external display X1 as 1152*864. Then, the first resolution information is sent to the second process through the first bus signal.

[0109] After receiving the first resolution information, the second process compares the first resolution information with the configuration information built into the electronic device. In addition, the second process feeds back a second bus signal to the first process to inform the first process that the first bus signal has been received. At this time, the configuration information contains the first resolution information 1152*864 of the external display X1. Therefore, the second process can directly determine 1152*864 as the target resolution corresponding to the display port HDMI-1 without triggering the third process.

[0110] The processing flow after the external display X2 is connected can refer to the corresponding processing process of the external display X0, and the embodiment of the present invention will not be further described here.

[0111] Finally, the image information to be displayed on each external display can be output through the display port corresponding to each external display and the target resolution.

[0112] After the above processing, the resolution can be set individually for each external display, realizing adaptive setting of resolution and independent display control.

[0113] In summary, an embodiment of the present invention provides a resolution setting method, which can adaptively adjust the configuration information of the electronic device when the resolution of the electronic device and the connected external display do not match, and adapt the target resolution for the connected external display. This can effectively avoid problems such as image display frame loss caused by the mismatch between the resolution supported by the electronic device and the external display, and is conducive to improving the image display effect.

[0114] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0115] Device Embodiment

[0116] Reference Figure 4 , shows a structural block diagram of an embodiment of a resolution setting device of the present invention, the device is applied to electronic equipment, and the device may specifically include:

[0117] The resolution acquisition module 401 is used to acquire the status information of the external display when detecting that an external display is connected to the display port of the electronic device;

[0118] A screening module 402, configured to screen the state information to obtain first resolution information of the external display;

[0119] A first setting module 403 is used to adjust the configuration information according to the first resolution information so as to add the first resolution information to the configuration information when the first resolution information does not exist in the configuration information built into the electronic device;

[0120] The second setting module 404 is configured to set a target resolution corresponding to the display port according to the first resolution information.

[0121] Optionally, the electronic device includes a first process; the resolution acquisition module includes:

[0122] The acquisition submodule is used to run the first process when an event that an external display is connected to the display port is detected; the first process is used to obtain status information of the external display.

[0123] Optionally, the electronic device further includes a second process and a third process, the second process includes the first setting module, and the first setting module includes:

[0124] A receiving submodule, configured to receive a first bus signal sent by the first process; the first bus signal is used to indicate the first resolution information;

[0125] A comparison submodule, used for comparing the first resolution information with the configuration information built into the electronic device;

[0126] The sending submodule is used to send the first bus signal to the third process when the first resolution information does not exist in the configuration information, so as to trigger the third process to add the first resolution information to the configuration information.

[0127] Optionally, the second setting module includes:

[0128] The setting submodule is used to run the second process when the first resolution information exists in the configuration information, and the second process is used to set the target resolution corresponding to the display port according to the first resolution information.

[0129] Optionally, the second process also includes:

[0130] A first sending module, configured to send a second bus signal to the first process; the second bus signal is used to indicate that the second process has received the first bus signal;

[0131] The first process includes:

[0132] The second sending module is used to continuously send the first bus signal to the second process until it stops after receiving the second bus signal.

[0133] Optionally, the third process includes:

[0134] A third sending module is used to send a third bus signal to the second process when the first resolution information is successfully added to the configuration information; the third bus signal is used to indicate that the first resolution information has been added to the configuration information;

[0135] The second process also includes:

[0136] The third setting module is used to set the target resolution corresponding to the display port according to the first resolution information when the third bus signal is received.

[0137] Optionally, the device further comprises:

[0138] An image acquisition module, used to acquire image information to be displayed;

[0139] An image display module is used to display the image information on the external display according to the target resolution.

[0140] In summary, an embodiment of the present invention provides a resolution setting device, which can adaptively adjust the configuration information of the electronic device when the resolution of the electronic device and the connected external display do not match, so as to adapt the target resolution for the connected external display. This can effectively avoid problems such as image display frame loss caused by the mismatch between the resolution supported by the electronic device and the external display, and is conducive to improving the image display effect.

[0141] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0142] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0143] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0144] An embodiment of the present invention provides an electronic device for setting resolution, the electronic device comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:

[0145] A11. When an event that an external display is connected to the display port of the electronic device is detected, obtaining status information of the external display;

[0146] A12. Filter the status information to obtain first resolution information of the external display;

[0147] A13. If the first resolution information does not exist in the configuration information built into the electronic device, adjust the configuration information according to the first resolution information to add the first resolution information to the configuration information;

[0148] A14. Set a target resolution corresponding to the display port according to the first resolution information.

[0149] Optionally, the electronic device includes a first process;

[0150] The step of acquiring the status information of the external display when detecting that the display port of the electronic device has an external display connected thereto comprises:

[0151] When an event that an external display is connected to the display port is detected, the first process is run; the first process is used to obtain status information of the external display.

[0152] Optionally, the electronic device further includes a second process and a third process;

[0153] When the first resolution information does not exist in the configuration information built into the electronic device, adjusting the configuration information according to the first resolution information to add the first resolution information to the configuration information includes:

[0154] The second process receives a first bus signal sent by the first process; the first bus signal is used to indicate the first resolution information;

[0155] The second process compares the first resolution information with the configuration information;

[0156] In a case where the first resolution information does not exist in the configuration information, the second process sends the first bus signal to the third process to trigger the third process to add the first resolution information to the configuration information.

[0157] Optionally, setting a target resolution corresponding to the display port according to the first resolution information includes:

[0158] In a case where the first resolution information exists in the configuration information, the second process is run to set a target resolution corresponding to the display port according to the first resolution information.

[0159] Optionally, the electronic device is further configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

[0160] The second process sends a second bus signal to the first process; the second bus signal is used to indicate that the second process has received the first bus signal;

[0161] The first process continues to send the first bus signal to the second process until it stops after receiving the second bus signal.

[0162] Optionally, the electronic device is further configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

[0163] The third process sends a third bus signal to the second process when the first resolution information is successfully added to the configuration information; the third bus signal is used to indicate that the first resolution information has been added to the configuration information;

[0164] When the second process receives the third bus signal, it sets the target resolution corresponding to the display port according to the first resolution information.

[0165] Optionally, the electronic device is further configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

[0166] Obtain image information to be displayed;

[0167] The image information is displayed on the external display according to the target resolution.

[0168] Figure 5 is a structural block diagram of an electronic device 600 for setting resolution according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0169] Reference Figure 5 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .

[0170] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.

[0171] The memory 604 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0172] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.

[0173] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal external display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0174] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice information processing mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0175] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0176] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the external display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0177] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency information processing (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0178] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0179] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0180] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device (server or terminal), enables the processor to execute Figure 1 The resolution setting method is shown.

[0181] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0182] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0183] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0184] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a predictable manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0186] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0187] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0188] The above is a detailed introduction to a resolution setting method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for setting resolution, characterized in that: Applied to an electronic device, the electronic device includes a first process, a second process and a third process, and the method includes: When an event that an external display is connected to the display port of the electronic device is detected, obtaining status information of the external display; Filtering the status information to obtain first resolution information of the external display; When the first resolution information does not exist in the configuration information built into the electronic device, adjusting the configuration information according to the first resolution information to add the first resolution information to the configuration information; Setting a target resolution corresponding to the display port according to the first resolution information; The adjusting the configuration information according to the first resolution information specifically includes: passing the acquired first resolution information to the second process through the first process; The first resolution information is compared with the configuration information by using the second process. If the first resolution information does not exist in the configuration information, the first resolution information is passed to the third process through the second process, so that the third process adds the first resolution information to the configuration information. The adaptive setting of the first resolution information is achieved through the collaboration of the first process, the second process and the third process.

2. The method according to claim 1, characterized in that The electronic device includes a first process; when an event that an external display is connected to a display port of the electronic device is detected, obtaining status information of the external display includes: When an event that an external display is connected to the display port is detected, the first process is run; the first process is used to obtain status information of the external display.

3. The method according to claim 2, characterized in that The electronic device also includes a second process and a third process; When the first resolution information does not exist in the configuration information built into the electronic device, adjusting the configuration information according to the first resolution information to add the first resolution information to the configuration information includes: The second process receives a first bus signal sent by the first process; the first bus signal is used to indicate the first resolution information; The second process compares the first resolution information with the configuration information; In a case where the first resolution information does not exist in the configuration information, the second process sends the first bus signal to the third process to trigger the third process to add the first resolution information to the configuration information.

4. The method according to claim 3, characterized in that The step of setting the target resolution corresponding to the display port according to the first resolution information includes: In a case where the first resolution information exists in the configuration information, the second process is run to set a target resolution corresponding to the display port according to the first resolution information.

5. The method according to claim 3, characterized in that: The method further comprises: The second process sends a second bus signal to the first process; the second bus signal is used to indicate that the second process has received the first bus signal; The first process continues to send the first bus signal to the second process until it stops after receiving the second bus signal.

6. The method according to claim 3, characterized in that The method further comprises: The third process sends a third bus signal to the second process when the first resolution information is successfully added to the configuration information; the third bus signal is used to indicate that the first resolution information has been added to the configuration information; When the second process receives the third bus signal, it sets the target resolution corresponding to the display port according to the first resolution information.

7. The method according to claim 1, characterized in that The method further comprises: Obtain image information to be displayed; The image information is displayed on the external display according to the target resolution.

8. A resolution setting device, characterized in that: Applied to an electronic device, the electronic device includes a first process, a second process and a third process, and the device includes: A resolution acquisition module, configured to acquire status information of the external display when detecting that an external display is connected to the display port of the electronic device; A screening module, used for screening the state information to obtain the first resolution information of the external display; A first setting module, configured to adjust the configuration information according to the first resolution information so as to add the first resolution information to the configuration information when the first resolution information does not exist in the configuration information built into the electronic device; A second setting module, configured to set a target resolution corresponding to the display port according to the first resolution information; The first setting module is specifically used to: passing the acquired first resolution information to the second process through the first process; The first resolution information is compared with the configuration information by using the second process. If the first resolution information does not exist in the configuration information, the first resolution information is passed to the third process through the second process, so that the third process adds the first resolution information to the configuration information. The adaptive setting of the first resolution information is achieved through the collaboration of the first process, the second process and the third process.

9. The device according to claim 8, characterized in that The electronic device includes a first process; the resolution acquisition module includes: The acquisition submodule is used to run the first process when an event that an external display is connected to the display port is detected; the first process is used to obtain status information of the external display.

10. The device according to claim 9, characterized in that The electronic device further includes a second process and a third process, the second process includes the first setting module, and the first setting module includes: A receiving submodule, configured to receive a first bus signal sent by the first process; the first bus signal is used to indicate the first resolution information; A comparison submodule, used to compare the first resolution information with the configuration information; The sending submodule is used to send the first bus signal to the third process when the first resolution information does not exist in the configuration information, so as to trigger the third process to add the first resolution information to the configuration information.

11. The device according to claim 10, characterized in that The second setting module includes: The setting submodule is used to run the second process when the first resolution information exists in the configuration information, and the second process is used to set the target resolution corresponding to the display port according to the first resolution information.

12. The device according to claim 10, characterized in that The second process also includes: A first sending module, configured to send a second bus signal to the first process; the second bus signal is used to indicate that the second process has received the first bus signal; The first process includes: The second sending module is used to continuously send the first bus signal to the second process until it stops after receiving the second bus signal.

13. The device according to claim 10, characterized in that The third process includes: A third sending module is used to send a third bus signal to the second process when the first resolution information is successfully added to the configuration information; the third bus signal is used to indicate that the first resolution information has been added to the configuration information; The second process also includes: The third setting module is used to set the target resolution corresponding to the display port according to the first resolution information when the third bus signal is received.

14. The device according to claim 8, characterized in that The device also includes: An image acquisition module, used to acquire image information to be displayed; An image display module is used to display the image information on the external display according to the target resolution.

15. An electronic device, characterized in that: The electronic device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to execute the resolution setting method according to any one of claims 1 to 7 by one or more processors.

16. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the processor is enabled to execute the resolution setting method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multi-screen display method, device and system and host equipment

    CN111736790A