Disclosure of Invention
The invention mainly aims to provide a signal channel switching method, a display terminal and a storage medium, and aims to solve the technical problem that the display terminal cannot automatically switch signal channels.
In order to achieve the above object, the present invention provides a signal channel switching method, comprising:
establishing data connection with a first external device connected with a first hot plug pin;
acquiring a first voltage detected by a second hot plug pin, and judging whether the first voltage meets a preset rule or not;
if the first voltage meets a preset rule, acquiring information of second external equipment connected with the second hot plug pin;
disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information.
Preferably, the step of obtaining a first voltage detected by a second hot plug pin and determining whether the first voltage meets a preset rule includes:
acquiring a first voltage detected by a second hot plug pin, and judging whether the first voltage is higher than a first preset voltage or not;
if the first voltage is higher than the first preset voltage, recording the duration of the first voltage, and judging whether the duration is longer than preset time;
if the first voltage meets a preset rule, the step of acquiring information of a second external device connected with the second hot plug pin comprises the following steps:
and if the duration is greater than the preset time, acquiring second external equipment information connected with the second hot plug pin.
Preferably, the step of acquiring the information of the second external device connected to the second hot plug pin if the first voltage meets a preset rule includes:
acquiring user setting information, and judging whether to allow signal channel switching according to the user setting information;
if the signal channel switching is allowed, executing: the step of disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information.
Preferably, before the step of disconnecting the data connection from the first external device and establishing the data connection with the second external device according to the second external device information, the method further includes:
judging the priority of the first external equipment and the second external equipment according to a pre-stored priority table;
if the second external device has priority over the first external device, executing: the step of disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information.
Preferably, the second external device information includes EDID information, and the step of obtaining the second external device information connected to the second hot plug pin if the first voltage meets a preset rule includes:
if the first voltage meets a preset rule, obtaining EDID information of the second external equipment connected with the second hot plug pin;
analyzing the EDID information, and judging whether the EDID information is matched with the pre-read EDID information;
if the EDID information is matched with the pre-read EDID information, executing: the step of disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information.
Preferably, the step of disconnecting the data connection from the first external device and establishing the data connection with the second external device according to the second external device information is followed by:
receiving display information sent by the second external equipment;
determining an optimization rule corresponding to the EDID information;
and decoding the display information according to the optimization rule to generate an optimized display picture.
Preferably, the step of decoding the display information according to the optimization rule to generate an optimized display picture includes:
acquiring a second voltage detected by a third hot plug pin, and judging whether the second voltage meets a preset rule or not;
if the second voltage meets a preset rule, acquiring information of third external equipment connected with the third hot plug pin;
disconnecting data connection with the second external device and establishing data connection with the third external device according to the third external device information.
Preferably, after the step of disconnecting the data connection from the second external device and establishing the data connection with the third external device according to the third external device information, the method further includes:
receiving an external equipment switching instruction sent by a user;
and establishing data connection with the external equipment corresponding to the external equipment switching instruction.
In order to achieve the above object, the present invention further provides a display terminal, including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the signal channel switching method when executing the program;
to achieve the above object, the present invention further provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the signal channel switching method as described above.
According to the signal channel switching method, the terminal and the storage medium provided by the embodiment of the invention, data connection is established through a first external device connected with a first hot plug pin; acquiring a first voltage detected by a second hot plug pin, and judging whether the first voltage meets a preset rule or not; if the first voltage meets a preset rule, acquiring information of second external equipment connected with the second hot plug pin; disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information. Therefore, the display terminal can automatically switch the signal channel to be connected with the external equipment, and the use experience of a user is improved.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a signal channel switching method, a display terminal and a storage medium.
As shown in fig. 1, the method of the present invention is applicable to display terminals, including but not limited to the following display terminals: tablet, computer, television, etc. The display terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a touch-sensitive pad, touch screen, keyboard, and the optional user interface 1003 may also comprise a standard wired, wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the display terminal may further include an RF (Radio Frequency) circuit, an audio circuit, a WiFi module, and the like. Of course, the display terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer and a thermometer, which are not described herein again.
Those skilled in the art will appreciate that the display terminal configuration shown in fig. 1 is not intended to be limiting of display terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a signal channel switching program.
In the display terminal shown in fig. 1, the processor 1001 may be configured to call a signal channel switching program stored in the memory 1005, and perform the following operations:
establishing data connection with a first external device connected with a first hot plug pin;
acquiring a first voltage detected by a second hot plug pin, and judging whether the first voltage meets a preset rule or not;
if the first voltage meets a preset rule, acquiring information of second external equipment connected with the second hot plug pin;
disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information.
Further, the processor 1001 may call the signal channel switching program stored in the memory 1005, and also perform the following operations:
acquiring a first voltage detected by a second hot plug pin, and judging whether the first voltage is higher than a first preset voltage or not;
if the first voltage is higher than the first preset voltage, recording the duration of the first voltage, and judging whether the duration is longer than preset time;
if the first voltage meets a preset rule, the step of acquiring information of a second external device connected with the second hot plug pin comprises the following steps:
and if the duration is greater than the preset time, acquiring second external equipment information connected with the second hot plug pin.
Further, the processor 1001 may call the signal channel switching program stored in the memory 1005, and also perform the following operations:
acquiring user setting information, and judging whether to allow signal channel switching according to the user setting information;
if the signal channel switching is allowed, executing: the step of disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information. Further, the processor 1001 may call the signal channel switching program stored in the memory 1005, and also perform the following operations:
judging the priority of the first external equipment and the second external equipment according to a pre-stored priority table;
if the second external device has priority over the first external device, executing: the step of disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information.
Further, the processor 1001 may call the signal channel switching program stored in the memory 1005, and also perform the following operations:
if the first voltage meets a preset rule, obtaining EDID information of the second external equipment connected with the second hot plug pin;
analyzing the EDID information, and judging whether the EDID information is matched with the pre-read EDID information;
if the EDID information is matched with the pre-read EDID information, executing: the step of disconnecting data connection with the first external device and establishing data connection with the second external device according to the second external device information.
Further, the processor 1001 may call the signal channel switching program stored in the memory 1005, and also perform the following operations:
receiving display information sent by the second external equipment;
determining an optimization rule corresponding to the EDID information;
and decoding the display information according to the optimization rule to generate an optimized display picture.
Further, the processor 1001 may call the signal channel switching program stored in the memory 1005, and also perform the following operations:
acquiring a second voltage detected by a third hot plug pin, and judging whether the second voltage meets a preset rule or not;
if the second voltage meets a preset rule, acquiring information of third external equipment connected with the third hot plug pin;
disconnecting data connection with the second external device and establishing data connection with the third external device according to the third external device information.
Further, the processor 1001 may call the signal channel switching program stored in the memory 1005, and also perform the following operations:
receiving an external equipment switching instruction sent by a user;
and establishing data connection with the external equipment corresponding to the external equipment switching instruction.
Based on the above hardware structure, various embodiments of the signal channel switching method in the present application are proposed.
Referring to fig. 2, a first embodiment of the present invention provides a signal channel switching method, where the signal channel switching method includes:
step S100, establishing data connection with a first external device connected with a first hot plug pin;
in this embodiment, the first hot plug pin is a hot plug pin of a High Definition Multimedia Interface (HDMI) of a display terminal, and the first external device is connected to the display terminal through an HDMI cable.
Preferably, the Data connection between the Display terminal and the first external device may be specifically implemented by reading Extended Display Identification Data (EDID) information stored in a memory of the first external device through a Data channel in the HDMI, establishing Data connection with the first external device when detecting that the EDID information matches the EDID information read in advance in the Display terminal, and receiving and displaying a digital signal sent by the first external device by the Display terminal.
Step S110, acquiring a first voltage detected by a second hot plug pin, and judging whether the first voltage meets a preset rule or not;
step S120, if the first voltage meets a preset rule, obtaining information of a second external device connected with the second hot plug pin;
if the first voltage does not accord with a preset rule, no processing is carried out;
in this embodiment, the second hot plug pin is a hot plug pin of another HDMI interface of the display terminal, and when the second hot plug pin detects the first voltage and the first voltage meets a preset rule, it indicates that the HDMI interface of the display terminal has access to the second external device at this time, the display terminal obtains, through a data channel in the HDMI, the second external device information stored in the memory of the second external device, where the second external device information includes the EDID information of the second external device.
Further, the preset rule may be that whether the first voltage reaches a preset voltage is first determined, and if the first voltage reaches the preset voltage, whether the duration of the first voltage is longer than a preset time is then determined, for example: and judging whether the first voltage reaches 2V or not, and if the first voltage reaches 2V, judging whether the duration time of the first voltage is more than 100ms or not.
When the second external device is in hot plug with the display terminal, a mechanical contact of the HDMI interface can bounce instantly when contacting with the HDMI wire plug to cause voltage oscillation, therefore, a slow starting circuit can be preset in the display terminal, when the HDMI interface of the display terminal is connected with the plug, the power-on time of the HDMI interface is delayed, hardware damage possibly caused by voltage oscillation is prevented, and only when the duration time of the first voltage is longer than the preset time, the display terminal can establish data connection with the second external device.
Step S130, disconnecting data connection from the first external device, and establishing data connection with the second external device according to the second external device information.
In this embodiment, after it is detected that the first external device is connected to the display terminal, the second external device is connected to the display terminal, and the first voltage obtained by the second external device through hot plug detection conforms to the preset rule, at this time, the display terminal disconnects the data connection with the first external device, and establishes the data connection with the second external device, so that the connection between the automatic switching signal channel and the external device is realized, and the use experience of the user is improved.
Further, a second embodiment is proposed based on the first embodiment, referring to fig. 3, fig. 3 is a detailed flow diagram of step S110 of the signal channel switching method shown in fig. 2, in this embodiment, the step S110 includes:
step S200, acquiring a first voltage detected by a second hot plug pin, and judging whether the first voltage is higher than a first preset voltage;
in this embodiment, the first preset voltage should be set to be smaller, and optionally, the first preset voltage may be set to be 2V.
Preferably, a voltage range may be set, and when determining whether the first voltage is within the voltage range, for example, whether the first voltage is between 2V and 5V, when the first voltage is higher than 5V, it may be that the first voltage is too high due to a power failure, and the display terminal is not connected to the second external device, so as to prevent the circuit from being damaged due to the too high first voltage; when the first voltage is lower than 2V, the voltage is too low, the voltage in the circuit is low, the display terminal cannot normally operate, and the display terminal does not establish data connection with the second external equipment.
Step S210, if the first voltage is higher than the first preset voltage, recording the duration of the first voltage, and judging whether the duration is longer than preset time;
if the first voltage is lower than or equal to the first preset voltage, no processing is performed;
if the duration is greater than the preset time, executing the step S120;
that is, step S120 specifically includes:
if the duration is longer than the preset time, acquiring information of second external equipment connected with the second hot plug pin;
and if the duration time is less than or equal to the preset time, not processing.
In this embodiment, when the first voltage is greater than the first preset voltage, it is determined whether the duration of the first voltage is greater than a preset time, because a voltage oscillation phenomenon occurs when the second external device is just connected to the display terminal, it should be determined that the first voltage is stable, that is, after the duration of the first voltage is greater than the preset time, a data connection with the second external device is attempted.
In this embodiment, only when the first voltage meets a preset rule, the display terminal may attempt to connect to the second external device, and by setting the preset rule, it is ensured that the display terminal can be normally connected to the second external device.
Further, a third embodiment is proposed based on the first embodiment, and referring to fig. 4, in this embodiment, after step S120, the method includes:
step S300, acquiring user setting information, and judging whether to allow signal channel switching according to the user setting information;
in this embodiment, the user setting information is generated after the user sets the display terminal by using software and is stored in the memory of the display terminal, and the user setting information may specifically be whether to allow signal channel switching information, and preferably, the display terminal may be pre-installed with signal channel control software, and the user may start the signal channel control software through a remote controller and perform setting.
If the signal channel switching is allowed, the step S130 is executed
If the signal channel is not allowed to be switched, no processing is carried out.
In this embodiment, the user may select whether to allow the signal channel switching, and when not allowed, that is, the user selects to turn off the function of the display terminal for automatically switching the signal channel, preferably, the user may further set, through the signal channel control software, that one or more HDMI interfaces of the display terminal allow the signal channel switching, and other disallowed signal channels to be switched, and the user may perform setting according to personal preferences, so that the use is more free and convenient.
Further, a fourth embodiment is proposed based on the first embodiment, and referring to fig. 5, in this embodiment, before step S130, the method further includes:
step S400, judging the priority of the first external equipment and the second external equipment according to a pre-stored priority table;
if the second external device has priority over the first external device, performing step S130;
and if the first external equipment has priority over the second external equipment, not processing.
In this embodiment, the pre-stored priority table may be generated and stored in the display terminal according to a setting of a user, specifically, the user may view device names of the first external device and the second external device according to the obtained EDID information, and when the first external device and the second external device are simultaneously connected to the display terminal (for example, when the display terminal is powered on, both the first external device and the second external device are connected to the display terminal), the user may set which external device the display terminal establishes a data connection with, for example: and a user sets the display terminal to establish data connection with the second external equipment, and the processor of the display terminal judges that the priority of the second external equipment is higher than that of the first external equipment, generates a pre-stored priority table and stores the pre-stored priority table.
Further, the user may not set the pre-stored priority table, and when the pre-stored priority table does not exist in the display terminal, the data connection establishment between the display terminal and the first external device and the second external device is performed by automatically switching signal channel connection.
In this embodiment, the user is allowed to set the connection order of the external devices by setting the pre-stored priority table, which increases the operability of the user.
Further, a fifth embodiment is proposed based on the first embodiment, referring to fig. 6, fig. 6 is a detailed flowchart of step S120 of the signal channel switching method of the present invention shown in fig. 5, in this embodiment, the step S120 includes:
step S500, if the first voltage meets a preset rule, obtaining EDID information of the second external device connected with the second hot plug pin;
step S510, analyzing the EDID information, and judging whether the EDID information is matched with the pre-read EDID information;
in this embodiment, the EDID information is Extended Display Identification Data (EDID) information of the second external device, where the EDID information includes vendor information, a maximum image size, a color setting, vendor preset information, and the like of the second external device, and the pre-read EDID information is preset when the Display terminal leaves a factory, and the Display terminal can only be connected to an external device matching the pre-read EDID information.
If the EDID information matches the pre-read EDID information, executing the step S130;
and if the EDID information is not matched with the pre-read EDID information, not processing.
In this embodiment, when the EDID information matches the pre-read EDID information, the second external device establishes data connection with the display terminal, thereby avoiding that the picture of the display terminal is not displayed or a problem occurs in picture display due to EDID mismatch.
Further, a sixth embodiment is proposed based on the fifth embodiment, and referring to fig. 7, in this embodiment, if the step S130 is executed if the EDID information matches the pre-read EDID information, the step S includes:
step S600, receiving display information sent by the second external equipment;
step S610, determining an optimization rule corresponding to the EDID information;
step S620, decoding the display information according to the optimization rule to generate an optimized display picture;
in this embodiment, the display information sent by the second external device includes a digital signal sent by the second external device, and the display terminal obtains the EDID information of the second external device and then obtains an optimization rule corresponding to the EDID information, where the optimization rule is obtained by testing when the display terminal leaves a factory, and is stored in a memory of the display terminal by establishing a mapping table between the optimization rule and the EDID information, and the optimization rule is used to decode the digital signal, optimize video resolution information, color information, and the like obtained after decoding, and generate and display an optimized display picture. According to the scheme, the optimized display picture is obtained through the preset optimization rule, and the watching experience of a user is improved.
Further, a seventh embodiment is proposed based on the sixth embodiment, and referring to fig. 8, in this embodiment, after step S620, the method includes:
step S700, acquiring a second voltage detected by a third hot plug pin, and judging whether the second voltage meets a preset rule;
step S710, if the second voltage meets a preset rule, obtaining information of a third external device connected with the third hot plug pin;
if the second voltage does not accord with the preset rule, no processing is carried out;
step S720, disconnecting data connection from the second external device, and establishing data connection with the third external device according to the third external device information.
In this embodiment, when a third external device is connected to the display terminal, if the third external device meets the connection requirement, the display terminal is disconnected from the second external device before the connection, and is connected to the third external device through data.
Further, when the display terminal automatically establishes data connection with the plurality of external devices, the plurality of external devices are connected with the display terminal at different times, and the display terminal establishes data connection with the external device which is connected last.
In this embodiment, when a user is connected to the display terminal facing a plurality of external devices, the user only needs to connect the external device to be used with the display terminal, and the automatic switching of the signal channel of the display terminal can be achieved.
Further, an eighth embodiment is proposed based on the seventh embodiment, and referring to fig. 9, in this embodiment, after step S720, the method includes:
step S800, receiving an external equipment switching instruction sent by a user;
step S810, establishing data connection with the external device corresponding to the external device switching instruction.
In this embodiment, a user may send an external device switching instruction through a remote controller key, and preferably, the user may open software preset in the display terminal, where the software records device names of a plurality of external devices currently connected to each HDMI interface of the display terminal, and select to switch the external device to be used through remote control, and the user performs manual switching after knowing the device names of the external devices, thereby avoiding the problem that the user blindly switches the signal channel for many times without knowing the device names of the plurality of external devices connected to each HDMI interface, and improving the user experience.
Furthermore, the present invention also provides a storage medium having a computer program stored thereon, which when executed by a processor implements the steps of the signal channel switching method as described above.
The specific embodiment of the storage medium of the present invention is substantially the same as the embodiments of the signal channel switching method, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.