Screen mirroring system switching method, device, electronic device, storage medium and vehicle
By controlling the on-off and simulated plug-in and unplugging of the communication port connected to the screen projection, the communication interface loss and safety hazards during the switching of the screen projection system in the vehicle are solved, and convenient switching of the screen projection system and equipment connection are achieved.
Patent Information
- Application Number
- CN202110572246.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-25
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-05-25
AI Technical Summary
When switching the screen projection system in a vehicle, it is necessary to plug and unplug the data connection cable, resulting in communication interface losses and potential safety hazards.
By controlling the on-off of the communication port connected to the screen projection, the plug-in and unplug the data connection line is simulated, and the switching of the screen projection system is realized, avoiding actual plug-in and unplug operations.
It reduces the loss of the communication interface, extends the service life of the communication interface, improves the user experience and avoids operational risks.
Smart Images

Figure CN115395983B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and particularly to a method and apparatus for switching a screen mirroring system, an electronic device, a storage medium, and a vehicle. Background Art
[0002] Screen mirroring refers to synchronously displaying the screen content of an electronic device on the screen of another device outside the electronic device. A relatively typical application is, for example, to real-time screen mirror the screen content of screen mirroring devices such as mobile phones and tablets to a screen mirroring device such as a television. The premise for its implementation is that a relevant screen mirroring system is installed on the screen mirroring device, which is used to enable data interaction and achieve screen mirroring between the two devices by providing corresponding protocols when the hardware connection between the screen mirroring device and the device to be screen mirrored is ready.
[0003] Common screen mirroring methods include wired screen mirroring and wireless screen mirroring. Wireless screen mirroring is achieved by sharing the wireless network in the same environment between the screen mirroring device and the device to be screen mirrored. Since a vehicle cannot obtain a stable and covered wireless network source during movement, a wired screen mirroring method is usually adopted. Moreover, wired screen mirroring can ensure the stability of data transmission compared with wireless screen mirroring, especially having great advantages when playing audio and video files.
[0004] For example, an in-vehicle system is connected to an external client through a data connection line at a communication interface such as USB (Universal Serial Bus) to achieve screen mirroring interaction between a mobile terminal and the in-vehicle system. There are multiple screen mirroring systems in the in-vehicle system to support screen mirroring, such as the vehicle networking software CarLife of Baidu Inc. and the vehicle networking software HiCar of Huawei Technologies Co., Ltd. After switching between different screen mirroring systems, it is necessary to re-plug the data connection line to enable the screen mirroring system to recognize the device to be screen mirrored for a new screen mirroring connection. Such plugging and unplugging operations will inevitably cause performance loss to the communication interface and the data connection line on the one hand, and on the other hand, it is more likely to cause safety hazards if performed during driving. Summary of the Invention
[0005] An object of the present invention is to provide a method for switching a screen mirroring system, which has the advantage that by controlling the on / off of the communication port of the screen mirroring connection, the switching of the screen mirroring system can be completed without plugging and unplugging the data connection line at the communication interface when switching the screen mirroring, reducing the loss of the communication interface.
[0006] Another object of the present invention is to provide a method for switching a screen mirroring system, which has the advantage that by automatically adjusting the power supply level of the communication interface to achieve the on / off of the communication interface, the screen mirroring system can recognize the device to be screen mirrored and complete the screen mirroring switching while the screen mirroring device and the device to be screen mirrored remain connected, thereby simplifying the operation of screen mirroring switching and improving the user experience.
[0007] Another object of the present invention is to provide a method for switching a screen mirroring system. Its advantage lies in that by resetting the code of the communication interface, the on-off of the communication interface is realized, so that the screen mirroring application can recognize the device to be screen mirrored without involving electrical operations on the hardware, reducing the loss of hardware such as the communication interface and ensuring the performance safety of the communication interface and the device where it is located.
[0008] Another object of the present invention is to provide a screen mirroring system switching device. Its advantage lies in that by automatically controlling the on-off of the communication port of the screen mirroring connection, the plugging and unplugging actions of the analog data connection line at the communication interface are realized, so that the screen mirroring switching can be completed while the screen mirroring device and the device to be screen mirrored remain connected, reducing the loss of the communication interface.
[0009] Another object of the present invention is to provide a screen mirroring system switching device. Its advantage lies in that by adjusting the power supply level of the communication interface, the on-off of the communication interface is automatically realized, so that the screen mirroring system can recognize the device to be screen mirrored and complete the screen mirroring switching while the screen mirroring device and the device to be screen mirrored remain connected, simplifying the operation of screen mirroring switching, reducing the operation risk caused by plugging and unplugging the data connection line, and improving the user experience.
[0010] Another object of the present invention is to provide a screen mirroring system switching device. Its advantage lies in that by resetting the code of the communication interface, the screen mirroring application can recognize the device to be screen mirrored without performing electrical operations on the hardware to make the communication interface on and off, reducing the loss of hardware such as the communication interface and ensuring the performance safety of the relevant devices.
[0011] Another object of the present application is to provide an electronic device. Its advantage lies in that by executing the screen mirroring system switching method through the electronic device, the screen mirroring system can recognize the device to be screen mirrored and complete the screen mirroring switching while the screen mirroring device and the device to be screen mirrored remain connected.
[0012] Another object of the present application is to provide a storage medium, on which a computer program is stored and can be called and executed when needed, so as to realize that the screen mirroring system can recognize the device to be screen mirrored and complete the screen mirroring switching while the screen mirroring device and the device to be screen mirrored remain connected.
[0013] Another object of the present invention is to provide a vehicle. Its advantage lies in that by setting a screen mirroring system switching device, the automatic on-off control of the communication port of the screen mirroring connection can be performed, simulating the plugging and unplugging actions of the data connection line at the communication interface, so that the screen mirroring switching can be completed while the screen mirroring device and the device to be screen mirrored remain connected during the screen mirroring switching, extending the service life of the communication interface.
[0014] The first aspect of the present invention provides a method for switching a screen mirroring system, including the following steps:
[0015] Obtain a screen mirroring system switching request;
[0016] According to the screen mirroring system switching request, obtain the flag bit of the system to be screen mirrored;
[0017] According to the screen mirroring system switching request, cut off and restore the screen mirroring connection;
[0018] Determine the system to be screen mirrored according to the flag bit of the system to be screen mirrored;
[0019] Screen mirror the system to be screen mirrored.
[0020] The second aspect of the present invention provides a screen mirroring system switching device, including:
[0021] A hard wire switch;
[0022] A display device;
[0023] One or more first processors, the one or more first processors communicate with the hard wire switch and the display device; and a first memory, the first memory is configured to store instructions, when the instructions are executed by the one or more first processors, cause the one or more first processors to execute steps, the steps include:
[0024] Obtain a screen mirroring system switching request;
[0025] According to the screen mirroring system switching request, obtain the flag bit of the system to be screen mirrored;
[0026] According to the screen mirroring system switching request, control the hard wire switch to cut off and restore the screen mirroring connection;
[0027] Determine the system to be screen mirrored according to the flag bit of the system to be screen mirrored;
[0028] Screen mirror the system to be screen mirrored to the display device.
[0029] The third aspect of the present invention provides an electronic device, including a second memory, a second processor, and a computer program stored on the second memory and executable on the second processor, and the second processor implements the steps of the above screen mirroring system switching method when executing the computer program.
[0030] The fourth aspect of the present invention provides a computer storage medium, on which a computer program is stored, and the computer program implements the steps of the above screen mirroring system switching method when executed by a processor.
[0031] The fifth aspect of the present invention provides a vehicle, including the above screen mirroring system switching device. Description of the Drawings
[0032] Figure 1Flowchart of the screen mirroring system switching method according to Embodiment 1 of the present invention.
[0033] Figure 2 Schematic diagram of the modules of the screen mirroring system switching device according to Embodiment 2 of the present invention.
[0034] Figure 3 Block diagram of the structure of the electronic device according to Embodiment 3 of the present invention.
[0035] Figure 4 Screen mirroring diagram according to Embodiment 5 of the present invention. Detailed implementation manners
[0036] The present invention will be further described below by way of embodiments, but the present invention is not limited to the scope of the described embodiments.
[0037] Embodiment 1
[0038] Refer to Figure 1 As shown, this embodiment provides a screen mirroring system switching method for mirroring the screen content of a device to be mirrored to a screen mirroring device. Among them, the device to be mirrored can be a mobile phone, and the screen mirroring device can be a vehicle-mounted terminal with a screen. Both the mobile phone and the vehicle-mounted terminal have communication interfaces and are connected through a data connection line. The vehicle-mounted terminal is equipped with at least two screen mirroring systems, which can be used to identify the device to be mirrored, i.e., the mobile phone, and provide relevant support protocols to complete the screen mirroring connection. Although this embodiment is described by taking the screen mirroring from a mobile phone to a vehicle-mounted terminal as an example, this method is not limited to being applied to mobile phones and vehicle-mounted terminals only.
[0039] The screen mirroring system switching method of this embodiment includes the following steps:
[0040] S1. Obtain a screen mirroring system switching request.
[0041] S2. According to the screen mirroring system switching request, obtain the flag bit of the system to be mirrored.
[0042] S3. According to the screen mirroring system switching request, cut off and restore the screen mirroring connection.
[0043] S4. Determine the system to be mirrored according to the flag bit of the system to be mirrored.
[0044] S5. Mirror the system to be mirrored.
[0045] Step S1: Obtain the switching request of the screen mirroring system. When the mobile phone and the in-vehicle terminal are connected via a data cable, the hardware for screen mirroring is ready. At this time, the screen mirroring systems that can be selected are displayed on the screen of the in-vehicle terminal. For example, the user originally used CarLife for screen mirroring on the in-vehicle terminal, and now receives a switching request to re-select another screen mirroring system such as HiCar. The switching request can come from a user instruction, such as through voice control or by touching a menu item on the screen of the in-vehicle terminal, etc.
[0046] In step S2, obtain the flag bit of the system to be screen mirrored according to the screen mirroring system switching request. Usually, in order to support different screen mirroring systems for terminal device operating systems such as Android and Apple, the screen mirroring system flag bits correspond one-to-one with each screen mirroring system, and the flag bits can be used to represent different screen mirroring systems. For example, at this time, the system to be screen mirrored is HiCar, and its corresponding flag bit is obtained for subsequent steps.
[0047] In step S3, according to the screen mirroring system switching request, cut off and restore the screen mirroring connection. After obtaining the switching request of the screen mirroring system, first automatically disconnect and then automatically reconnect the data connection between the screen mirroring device and the device to be screen mirrored. This is equivalent to simulating a plugging and unplugging operation of the data cable at the communication interface, enabling the screen mirroring system to read the information of the device to be screen mirrored for screen mirroring.
[0048] In steps S4 and S5, determine the system to be screen mirrored according to the flag bit of the system to be screen mirrored, and perform the screen mirroring operation through the system to be screen mirrored.
[0049] Determine the new screen mirroring system HiCar according to the flag bit of the system to be screen mirrored. Since step S3 causes the communication interface to be automatically turned on and off, the screen mirroring system HiCar can re-recognize the device to be screen mirrored, the mobile phone, and provide relevant support protocols based on the operating system of the mobile phone, enabling the screen content of the mobile phone to be screen mirrored to the screen of the in-vehicle terminal.
[0050] In summary, taking the application scenario of the in-vehicle terminal and the mobile phone inside the vehicle as an example, when switching the screen mirroring system, just open the relevant menu on the in-vehicle terminal and click on the screen to determine the screen mirroring system to be switched, and then the method of this embodiment can automatically complete the new screen mirroring connection between the mobile phone and the in-vehicle terminal.
[0051] As an optional implementation manner, cutting off and restoring the screen mirroring connection in step S3 includes:
[0052] Pull down or pull up the power supply level of the communication interface for controlling the screen mirroring connection to cut off the screen mirroring connection;
[0053] Pull up or pull down the power supply level of the communication interface for controlling the screen mirroring connection to restore the screen mirroring connection.
[0054] In this embodiment, the disconnection and restoration of the screen mirroring connection are achieved by performing electrical operations on the communication interface. Specifically, the communication interface is switched between the connected state and the disconnected state by adjusting the power supply level of the communication interface. In this embodiment, the power supply level of the communication interface is pulled low or pulled high to cause the communication interface that controls the screen mirroring connection to change from the connected state to the disconnected state, and the connection is restored by the corresponding pulling high or pulling low operation. This process can equivalently simulate a hot plugging and unplugging of the data connection cable on the communication interface, so that the screen mirroring system can re-read the data interaction request of the communication interface and make a response, so that the mobile phone can be recognized and the connection can be established, so as to project the screen to the in-vehicle terminal through the screen mirroring system HiCar.
[0055] As another alternative embodiment, the disconnection and restoration of the screen mirroring connection in step S3 may further include: resetting the code of the communication interface for controlling the screen mirroring connection to disconnect and restore the screen mirroring connection.
[0056] In this embodiment, it is completed by a software method of reading and writing operations on the communication interface without involving electrical operations. Resetting the control code of the communication interface can change the communication interface from the connected state to the disconnected state, and restore the connection in a corresponding manner. This process can also simulate a hot plugging and unplugging of the data connection cable on the communication interface, so that the mobile phone waits for the screen mirroring device to be recognized, starts to establish a connection and projects the screen on the screen mirroring device.
[0057] As a preferred embodiment, the communication interface is a USB interface. In this embodiment, both the in-vehicle terminal of the screen mirroring device and the mobile phone of the device to be screen mirrored are provided with communication interfaces. Of course, generally this method is applied to the communication interface of the screen mirroring device, but if the device to be screen mirrored such as a mobile phone can obtain a request to switch the screen mirroring system, it is not excluded to be used for the communication interface of the device to be screen mirrored.
[0058] The interface types of the communication interface may include the more common Type-A, Micro-USB, and Type-C (Type-A, Micro-USB, and Type-C are all USB interface types), etc.; according to the data protocols supported by the interface, they may include USB2.0, USB3.0, and USB3.1, etc. It depends specifically on the types and models of the screen mirroring device and the device to be screen mirrored. Of course, data interaction can also be performed through a high-definition multimedia interface and a high-definition data cable.
[0059] The screen mirroring system switching method of this embodiment avoids the need to plug and unplug the data connection cable for screen mirroring switching by automatically adjusting the on and off of the communication interface, reduces the loss of the communication interface, extends the service life of the communication interface, makes the screen mirroring switching operation more convenient, and improves the user experience.
[0060] Embodiment 2
[0061] See Figure 2As shown in the figure, a screen mirroring system switching device is provided, which includes a hardwired switch 1, a display device 2, one or more first processors 3, and a first memory 4; the first processor 3 communicates with the hardwired switch 1 and the display device 2; the first memory 4 is configured to store instructions, and when the first processor 3 executes the stored instructions, it executes steps S1 to S5 in Embodiment 1. Among them, step S3 controls the hardwired switch 1 to cut off and restore the screen mirroring connection; step S5 mirrors the system to be screen mirrored on the display device 2.
[0062] As an optional implementation manner, the screen mirroring system switching device further includes a bus extender 5 connected to the hardwired switch 1; specifically, controlling the hardwired switch 1 to cut off and restore the screen mirroring connection is achieved by:
[0063] Controlling the bus extender 5 through the hardwired switch 1 to pull down or pull up the power supply level of the communication interface for controlling the screen mirroring connection to cut off the screen mirroring connection; controlling the bus extender 5 through the hardwired switch 1 to pull up or pull down the power supply level of the communication interface for controlling the screen mirroring connection to restore the screen mirroring connection. Among them, pulling up and pulling down the power supply level are corresponding operations. For example, if the connection is cut off by pulling up, the connection is restored by pulling down.
[0064] As an optional implementation manner, specifically controlling the hardwired switch 1 to cut off and restore the screen mirroring connection is achieved by resetting the code of the communication interface for controlling the screen mirroring connection to cut off and restore the screen mirroring connection.
[0065] As a preferred implementation manner, the communication interface is a USB interface.
[0066] The screen mirroring system switching device of this embodiment simulates the plugging and unplugging actions by automatically adjusting the on-off of the communication interface, avoiding the need to plug and unplug the data connection cable for screen mirroring switching, reducing the loss of the communication interface, extending the service life of the communication interface, making the screen mirroring switching operation more convenient, and improving the user experience.
[0067] Embodiment 3
[0068] See Figure 3 As shown in the figure, this embodiment provides an electronic device 30, which includes a second processor 31, a second memory 32, and a computer program stored on the second memory 32 and executable on the second processor 31. When the second processor 31 executes the program, it implements the screen mirroring system switching method in Embodiment 1. Figure 3 The shown electronic device 30 is only an example and should not bring any limitations to the functions and usage scope of the embodiments of the present invention.
[0069] The electronic device 30 may be embodied in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one of the above-mentioned second processors 31, at least one of the above-mentioned second memories 32, and a bus 33 connecting different system components (including the second memory 32 and the second processor 31).
[0070] The bus 33 includes a data bus, an address bus, and a control bus.
[0071] The second memory 32 may include volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322, and may further include a read-only memory (ROM) 323.
[0072] The second memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324. Such program modules 324 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0073] The second processor 31 executes various functional applications and data processing by running computer programs stored in the second memory 32, such as the screen mirroring system switching method in Embodiment 1 of the present invention.
[0074] The electronic device 30 may also communicate with one or more external devices 34 (such as a keyboard, a pointing device, etc.). Such communication may be carried out through an input / output (I / O) interface 35. Moreover, the model-generating electronic device 30 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 36. The network adapter 36 communicates with other modules of the model-generating electronic device 30 through the bus 33. Other hardware and / or software modules may be used in combination with the model-generating electronic device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (redundant array of independent disks) systems, tape drives, and data backup storage systems, etc.
[0075] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. In fact, according to the embodiments of the present invention, the features and functions of two or more units / modules described above may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided and embodied by multiple units / modules.
[0076] Embodiment 4
[0077] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps in the screen mirroring system switching method in Embodiment 1 are implemented.
[0078] Among them, the more specific forms that the readable storage medium can adopt may include but are not limited to: portable disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories, optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0079] In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the steps in the screen mirroring system switching method in Embodiment 1.
[0080] Among them, the program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, executed as an independent software package, partially on the user device and partially on a remote device, or entirely on a remote device.
[0081] Embodiment 5
[0082] This embodiment provides a vehicle, which includes the screen mirroring system switching device in Embodiment 2. Thus, the vehicle in this embodiment can automatically adjust the on / off of the communication interface through the screen mirroring system switching device. Figure 4 An application scenario of the vehicle in this embodiment is shown. The mobile phone 100 and the in-vehicle terminal 200 are connected by wire and realize screen mirroring from the mobile phone 100 to the in-vehicle terminal 200 through the screen mirroring system switching device.
[0083] This implementation realizes that during the process of switching the screen mirroring system, screen mirroring can be completed while maintaining the wired connection state between the device to be screen-mirrored and the screen-mirroring device. Thereby, the loss of the communication interface is reduced, and the service life of the communication interface is extended. At the same time, it also avoids the potential safety hazards of vehicle driving caused by the in-vehicle personnel operating the screen mirroring, and improves the user experience.
[0084] Although the specific implementation manners of the present invention are described above, those skilled in the art should understand that this is only for illustration. The protection scope of the present invention is defined by the appended claims. Without departing from the principles and essence of the present invention, those skilled in the art can make various changes or modifications to these implementation manners, but these changes and modifications all fall within the protection scope of the present invention.
Claims
1. A method for switching a screen mirroring system, characterized in that, It includes the following steps: Obtain a screen mirroring system switching request; According to the screen mirroring system switching request, obtain the flag bit of the system to be screen mirrored; According to the screen mirroring system switching request, cut off and restore the screen mirroring connection; According to the flag bit of the system to be screen mirrored, determine the system to be screen mirrored; Screen mirror the system to be screen mirrored; The cutting off and restoring the screen mirroring connection includes: Pull down or pull up the power supply level of the communication interface for controlling the screen mirroring connection to cut off the screen mirroring connection; Pull up or pull down the power supply level of the communication interface for controlling the screen mirroring connection to restore the screen mirroring connection; and / or, The cutting off and restoring the screen mirroring connection includes: Reset the code of the communication interface for controlling the screen mirroring connection to cut off and restore the screen mirroring connection.
2. The screen mirroring system switching method according to claim 1, wherein the communication interface is a USB interface.
3. A screen mirroring system switching device, characterized in that, It includes: A hard wire switch; A display device; One or more processors, the one or more processors communicate with the hard wire switch and the display device; And a memory, the memory is configured to store instructions, when the instructions are executed by the one or more processors, cause the one or more processors to execute steps, the steps include: Obtain a screen mirroring system switching request; According to the screen mirroring system switching request, obtain the flag bit of the system to be screen mirrored; According to the screen mirroring system switching request, control the hard wire switch to cut off and restore the screen mirroring connection; According to the flag bit of the system to be screen mirrored, determine the system to be screen mirrored; Screen mirror the system to be screen mirrored to the display device; The screen mirroring system switching device further includes a bus extender, and the bus extender is connected to the hard wire switch; The controlling the hard wire switch to cut off and restore the screen mirroring connection includes: Control the hard wire switch to control the bus extender, pull down or pull up the power supply level of the communication interface for controlling the screen mirroring connection to cut off the screen mirroring connection; Control the hard wire switch to control the bus extender, pull up or pull down the power supply level of the communication interface for controlling the screen mirroring connection to restore the screen mirroring connection; and / or, The controlling the hard wire switch to cut off and restore the screen mirroring connection includes: reset the code of the communication interface for controlling the screen mirroring connection to cut off and restore the screen mirroring connection.
4. The screen mirroring system switching device according to claim 3, wherein the communication interface is a USB interface.
5. An electronic device, comprising a second memory, a second processor, and a computer program stored on the second memory and executable on the second processor, characterized in that, When the second processor executes the computer program, it implements the steps of the screen mirroring system switching method according to claim 1 or 2.
6. A computer storage medium, on which a computer program is stored, characterized in that, When the program is executed by the processor, it implements the steps of the screen mirroring system switching method according to claim 1 or 2.
7. A vehicle, characterized in that, It includes the screen mirroring system switching device according to claim 3 or 4.
Citation Information
Patent Citations
Screen projection method and device based on mDNS protocol, equipment and storage medium
CN111970389A
USB on -off testing device and system thereof
CN208109980U